/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(t,define){define("util/main.min",["kendo.core.min"],t)}(function(){return function(){function t(t){return typeof t!==O}function e(t,e){var a=n(e);return E.round(t*a)/a}function n(t){return t?E.pow(10,t):1}function a(t,e,n){return E.max(E.min(t,n),e)}function r(t){return t*U}function i(t){return t/U}function o(t){return"number"==typeof t&&!isNaN(t)}function u(e,n){return t(e)?e:n}function s(t){return t*t}function h(t){var e,n=[];for(e in t)n.push(e+t[e]);return n.sort().join("")}function d(t){var e,n=2166136261;for(e=0;e<t.length;++e)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=t.charCodeAt(e);return n>>>0}function c(t){return d(h(t))}function l(t){var e,n=t.length,a=R,r=N;for(e=0;e<n;e++)r=E.max(r,t[e]),a=E.min(a,t[e]);return{min:a,max:r}}function p(t){return l(t).min}function f(t){return l(t).max}function v(t){return m(t).min}function g(t){return m(t).max}function m(t){var e,n,a,r=R,i=N;for(e=0,n=t.length;e<n;e++)a=t[e],null!==a&&isFinite(a)&&(r=E.min(r,a),i=E.max(i,a));return{min:r===R?void 0:r,max:i===N?void 0:i}}function b(t){if(t)return t[t.length-1]}function w(t,e){return t.push.apply(t,e),t}function S(t){return V.template(t,{useWithBlock:!1,paramName:"d"})}function C(e,n){return t(n)&&null!==n?" "+e+"='"+n+"' ":""}function x(t){var e,n="";for(e=0;e<t.length;e++)n+=C(t[e][0],t[e][1]);return n}function k(e){var n,a,r="";for(n=0;n<e.length;n++)a=e[n][1],t(a)&&(r+=e[n][0]+":"+a+";");if(""!==r)return r}function y(t){return"string"!=typeof t&&(t+="px"),t}function A(t){var e,n,a=[];if(t)for(e=V.toHyphens(t).split("-"),n=0;n<e.length;n++)a.push("k-pos-"+e[n]);return a.join(" ")}function B(e){return""===e||null===e||"none"===e||"transparent"===e||!t(e)}function M(t){for(var e={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},n=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],a="";t>0;)t<n[0]?n.shift():(a+=e[n[0]],t-=n[0]);return a}function T(t){var e,n,a,r,i;for(t=t.toLowerCase(),e={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},n=0,a=0,r=0;r<t.length;++r){if(i=e[t.charAt(r)],!i)return null;n+=i,i>a&&(n-=2*a),a=i}return n}function _(t){var e=Object.create(null);return function(){var n,a="";for(n=arguments.length;--n>=0;)a+=":"+arguments[n];return a in e?e[a]:e[a]=t.apply(this,arguments)}}function W(t){for(var e,n,a=[],r=0,i=t.length;r<i;)e=t.charCodeAt(r++),e>=55296&&e<=56319&&r<i?(n=t.charCodeAt(r++),56320==(64512&n)?a.push(((1023&e)<<10)+(1023&n)+65536):(a.push(e),r--)):a.push(e);return a}function P(t){return t.map(function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}).join("")}function I(t,e){function n(t,n){for(var a=[],r=0,i=0,o=0;r<t.length&&i<n.length;)e(t[r],n[i])<=0?a[o++]=t[r++]:a[o++]=n[i++];return r<t.length&&a.push.apply(a,t.slice(r)),i<n.length&&a.push.apply(a,n.slice(i)),a}return t.length<2?t.slice():function a(t){var e,r,i;return t.length<=1?t:(e=Math.floor(t.length/2),r=t.slice(0,e),i=t.slice(e),r=a(r),i=a(i),n(r,i))}(t)}var E=Math,V=window.kendo,L=V.deepExtend,U=E.PI/180,R=Number.MAX_VALUE,N=-Number.MAX_VALUE,O="undefined",F=Date.now;F||(F=function(){return(new Date).getTime()}),L(V,{util:{MAX_NUM:R,MIN_NUM:N,append:w,arrayLimits:l,arrayMin:p,arrayMax:f,defined:t,deg:i,hashKey:d,hashObject:c,isNumber:o,isTransparent:B,last:b,limitValue:a,now:F,objectKey:h,round:e,rad:r,renderAttr:C,renderAllAttr:x,renderPos:A,renderSize:y,renderStyle:k,renderTemplate:S,sparseArrayLimits:m,sparseArrayMin:v,sparseArrayMax:g,sqr:s,valueOrDefault:u,romanToArabic:T,arabicToRoman:M,memoize:_,ucs2encode:P,ucs2decode:W,mergeSort:I}}),V.drawing.util=V.util,V.dataviz.util=V.util}(),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/text-metrics.min",["kendo.core.min","util/main.min"],t)}(function(){!function(t){function e(){return{width:0,height:0,baseline:0}}function n(t,e,n){return c.current.measure(t,e,n)}function a(t,e){var n=[];if(t.length>0&&document.fonts){try{n=t.map(function(t){return document.fonts.load(t)})}catch(a){i.logToConsole(a)}Promise.all(n).then(e,e)}else e()}var r=document,i=window.kendo,o=i.Class,u=i.util,s=u.defined,h=o.extend({init:function(t){this._size=t,this._length=0,this._map={}},put:function(t,e){var n=this,a=n._map,r={key:t,value:e};a[t]=r,n._head?(n._tail.newer=r,r.older=n._tail,n._tail=r):n._head=n._tail=r,n._length>=n._size?(a[n._head.key]=null,n._head=n._head.newer,n._head.older=null):n._length++},get:function(t){var e=this,n=e._map[t];if(n)return n===e._head&&n!==e._tail&&(e._head=n.newer,e._head.older=null),n!==e._tail&&(n.older&&(n.older.newer=n.newer,n.newer.older=n.older),n.older=e._tail,n.newer=null,e._tail.newer=n,e._tail=n),n.value}}),d=t("<div style='position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;' />")[0],c=o.extend({init:function(t){this._cache=new h(1e3),this._initOptions(t)},options:{baselineMarkerSize:1},measure:function(n,a,i){var o,h,c,l,p,f,v,g;if(!n)return e();if(o=u.objectKey(a),h=u.hashKey(n+o),c=this._cache.get(h),c)return c;l=e(),p=i?i:d,f=this._baselineMarker().cloneNode(!1);for(v in a)g=a[v],s(g)&&(p.style[v]=g);return t(p).text(n),p.appendChild(f),r.body.appendChild(p),(n+"").length&&(l.width=p.offsetWidth-this.options.baselineMarkerSize,l.height=p.offsetHeight,l.baseline=f.offsetTop+this.options.baselineMarkerSize),l.width>0&&l.height>0&&this._cache.put(h,l),p.parentNode.removeChild(p),l},_baselineMarker:function(){return t("<div class='k-baseline-marker' style='display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;' />")[0]}});c.current=new c,i.util.TextMetrics=c,i.util.LRUCache=h,i.util.loadFonts=a,i.util.measureText=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("util/base64.min",["util/main.min"],t)}(function(){return function(){function t(t){var n,a,r,o,u,s,h,d="",c=0;for(t=e(t);c<t.length;)n=t.charCodeAt(c++),a=t.charCodeAt(c++),r=t.charCodeAt(c++),o=n>>2,u=(3&n)<<4|a>>4,s=(15&a)<<2|r>>6,h=63&r,isNaN(a)?s=h=64:isNaN(r)&&(h=64),d=d+i.charAt(o)+i.charAt(u)+i.charAt(s)+i.charAt(h);return d}function e(t){var e,n,a="";for(e=0;e<t.length;e++)n=t.charCodeAt(e),n<128?a+=r(n):n<2048?(a+=r(192|n>>>6),a+=r(128|63&n)):n<65536&&(a+=r(224|n>>>12),a+=r(128|n>>>6&63),a+=r(128|63&n));return a}var n=window.kendo,a=n.deepExtend,r=String.fromCharCode,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a(n.util,{encodeBase64:t,encodeUTF8:e})}(),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("mixins/observers.min",["kendo.core.min"],t)}(function(){return function(t){var e=Math,n=window.kendo,a=n.deepExtend,r=t.inArray,i={observers:function(){return this._observers=this._observers||[]},addObserver:function(t){return this._observers?this._observers.push(t):this._observers=[t],this},removeObserver:function(t){var e=this.observers(),n=r(t,e);return n!=-1&&e.splice(n,1),this},trigger:function(t,e){var n,a,r=this._observers;if(r&&!this._suspended)for(a=0;a<r.length;a++)n=r[a],n[t]&&n[t](e);return this},optionsChange:function(t){t=t||{},t.element=this,this.trigger("optionsChange",t)},geometryChange:function(){this.trigger("geometryChange",{element:this})},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=e.max((this._suspended||0)-1,0),this},_observerField:function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)}};a(n,{mixins:{ObserversMixin:i}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()}),function(t,define){define("kendo.dataviz.barcode.min",["kendo.dataviz.core.min","kendo.drawing.min"],t)}(function(){return function(t,e){function n(t,e,n){return t.substring(e,e+n)}var a,r,i,o,u,s,h=window.kendo,d=h.ui.Widget,c=t.extend,l=h.deepExtend,p=t.inArray,f=t.isPlainObject,v=h.drawing,g=h.geometry,m=h.util,b=m.defined,w=h.dataviz,S=w.Box2D,C=w.TextBox,x=300,k=100,y=10,A=/^\d+$/,B=/^[a-z0-9]+$/i,M="Character '{0}' is not valid for symbology {1}",T=h.Class.extend({init:function(t){this.setOptions(t)},setOptions:function(t){var e=this;e.options=c({},e.options,t),e.quietZoneLength=e.options.addQuietZone?2*e.options.quietZoneLength:0},encode:function(t,e,n){var a=this;return b(t)&&(t+=""),a.initValue(t,e,n),a.options.addQuietZone&&a.addQuietZone(),a.addData(),a.options.addQuietZone&&a.addQuietZone(),{baseUnit:a.baseUnit,pattern:a.pattern}},options:{quietZoneLength:y,addQuietZone:!0,addCheckSum:!0},initValue:function(){},addQuietZone:function(){this.pattern.push(this.options.quietZoneLength||y)},addData:function(){},invalidCharacterError:function(t){throw Error(h.format(M,t,this.name))}}),_={},W=T.extend({minBaseUnitLength:.7,addData:function(){var t,e=this,n=e.value;for(e.addStart(),t=0;t<n.length;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.pushCheckSum(),e.addStop(),e.prepareValues()},addCharacter:function(t){var e=this,n=e.characterMap[t];n||e.invalidCharacterError(t),e.addBase(n)},addBase:function(){}}),P={addCharacter:function(t){var e=this;e.characterMap[t]?e.addBase(e.characterMap[t]):t.charCodeAt(0)>127?e.invalidCharacterError(t):e.addExtended(t.charCodeAt(0))},addExtended:function(t){var n,a,r,i=this;for(a=0;a<i.extendedMappings.length;a++)if(n=i.extendedMappings[a].call(i,t)){for(r=0;r<n.length;r++)i.addBase(n[r]);return i.dataLength+=n.length-1,e}},extendedMappings:[function(t){if(97<=t&&t<=122){var e=this;return[e.characterMap[e.shiftCharacters[0]],e.characterMap[String.fromCharCode(t-32)]]}},function(t){if(33<=t&&t<=58){var e=this;return[e.characterMap[e.shiftCharacters[1]],e.characterMap[String.fromCharCode(t+32)]]}},function(t){if(1<=t&&t<=26){var e=this;return[e.characterMap[e.shiftCharacters[2]],e.characterMap[String.fromCharCode(t+64)]]}},function(t){var e,n,a,r=this;if(r.specialAsciiCodes[t])for(e=[],a=0;a<r.specialAsciiCodes[t].length;a++)e.push(r.characterMap[r.shiftCharacters[3]]),e.push(r.characterMap[r.specialAsciiCodes[t][a]]);else n=6*Math.floor(t/32)+(t-27)%32+64,e=[r.characterMap[r.shiftCharacters[3]],r.characterMap[String.fromCharCode(n)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]};_.code39=W.extend({name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",initValue:function(t,e,n){var a=this;a.width=e,a.height=n,a.value=t,a.dataLength=t.length,a.pattern=[],a.patternString=""},prepareValues:function(){var t,e,n=this,a=n.minBaseUnitLength,r=n.maxRatio,i=n.minRatio,o=Math.max(.15*n.width,24);if(n.height<o)throw Error("Insufficient Height. The minimum height for value: "+n.value+" is: "+o);for(;(t=n.getBaseUnit(r))<a&&r>i;)r=parseFloat((r-.1).toFixed(1));if(t<a)throw e=Math.ceil(n.getBaseWidth(i)*a),Error("Insufficient width. The minimum width for value: "+n.value+" is: "+e);n.ratio=r,n.baseUnit=t,n.patternString=n.patternString.substring(0,n.patternString.length-1),n.pattern=n.pattern.concat(n.patternString.replace(/ratio/g,r).split(n.splitCharacter))},getBaseUnit:function(t){return this.width/this.getBaseWidth(t)},getBaseWidth:function(t){var e=this,n=3*(t+2);return e.quietZoneLength+n*(e.dataLength+2)+e.gapWidth*(e.dataLength+1)},addStart:function(){var t=this;t.addPattern(t.characterMap.START.pattern),t.addCharacterGap()},addBase:function(t){this.addPattern(t.pattern),this.addCharacterGap()},addStop:function(){this.addPattern(this.characterMap.START.pattern)},addPattern:function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},addCharacterGap:function(){var t=this;t.patternString+=t.gapWidth+t.splitCharacter},patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}},options:{addCheckSum:!1}}),_.code39extended=_.code39.extend(l({},P,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})),_.code93=W.extend({name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,initValue:function(t,e,n){var a=this;a.value=t,a.width=e,a.height=n,a.pattern=[],a.values=[],a.dataLength=t.length},prepareValues:function(){var t=this,e=Math.max(.15*t.width,24);if(t.height<e)throw Error("Insufficient Height");if(t.setBaseUnit(),t.baseUnit<t.minBaseUnitLength)throw Error("Insufficient Width")},setBaseUnit:function(){var t=this,e=2;t.baseUnit=t.width/(9*(t.dataLength+2+e)+t.quietZoneLength+1)},addStart:function(){var t=this.characterMap.START.pattern;this.addPattern(t)},addStop:function(){var t=this;t.addStart(),t.pattern.push(t.characterMap.TERMINATION_BAR)},addBase:function(t){this.addPattern(t.pattern),this.values.push(t.value)},pushCheckSum:function(){var t,e,n=this,a=n._getCheckValues();for(n.checksum=a.join(""),e=0;e<a.length;e++)t=n.characterMap[n._findCharacterByValue(a[e])],n.addPattern(t.pattern)},_getCheckValues:function(){var t,e,n,a=this,r=a.values,i=r.length,o=0;for(n=i-1;n>=0;n--)o+=a.weightedValue(r[n],i-n,a.cCheckSumTotal);for(t=o%a.checkSumMod,o=a.weightedValue(t,1,a.kCheckSumTotal),n=i-1;n>=0;n--)o+=a.weightedValue(r[n],i-n+1,a.kCheckSumTotal);return e=o%a.checkSumMod,[t,e]},_findCharacterByValue:function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},weightedValue:function(t,e,n){return(e%n||n)*t},addPattern:function(t){var e,n;for(n=0;n<t.length;n++)e=parseInt(t.charAt(n),10),this.pattern.push(e)},characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}}),_.code93extended=_.code93.extend(l({},P,{name:"Code 93 extended",pushCheckSum:function(){var t,e,n=this,a=n._getCheckValues();for(n.checksum=a.join(""),e=0;e<a.length;e++)t=a[e],n.shiftValuesAsciiCodes[t]?n.addExtended(n.shiftValuesAsciiCodes[t]):n.addPattern(n.characterMap[n._findCharacterByValue(t)].pattern)}})),a=h.Class.extend({init:function(t){this.encoding=t},addStart:function(){},is:function(){},move:function(){},pushState:function(){}}),r=a.extend({FNC4:"FNC4",init:function(t,e){var n=this;n.encoding=t,n.states=e,n._initMoves(e)},addStart:function(){this.encoding.addPattern(this.START)},is:function(t,e){var n=t.charCodeAt(e);return this.isCode(n)},move:function(t){for(var e=this,n=0;!e._moves[n].call(e,t)&&n<e._moves.length;)n++},pushState:function(t){var e,n,a=this,r=a.states,i=t.value,o=i.length;for(p("C",r)>=0&&(n=i.substr(t.index).match(/\d{4,}/g),n&&(o=i.indexOf(n[0],t.index)));(e=t.value.charCodeAt(t.index))>=0&&a.isCode(e)&&t.index<o;)a.encoding.addPattern(a.getValue(e)),t.index++},_initMoves:function(t){var e=this;e._moves=[],p(e.FNC4,t)>=0&&e._moves.push(e._moveFNC),p(e.shiftKey,t)>=0&&e._moves.push(e._shiftState),e._moves.push(e._moveState)},_moveFNC:function(t){if(t.fnc)return t.fnc=!1,t.previousState==this.key},_shiftState:function(t){var e=this;if(t.previousState==e.shiftKey&&(t.index+1>=t.value.length||e.encoding[e.shiftKey].is(t.value,t.index+1)))return e.encoding.addPattern(e.SHIFT),t.shifted=!0,!0},_moveState:function(){return this.encoding.addPattern(this.MOVE),!0},SHIFT:98}),i={},i.A=r.extend({key:"A",shiftKey:"B",isCode:function(t){return 0<=t&&t<96},getValue:function(t){return t<32?t+64:t-32},MOVE:101,START:103}),i.B=r.extend({key:"B",shiftKey:"A",isCode:function(t){return 32<=t&&t<128},getValue:function(t){return t-32},MOVE:100,START:104}),i.C=a.extend({key:"C",addStart:function(){this.encoding.addPattern(this.START)},is:function(t,e){var a=n(t,e,4);return(e+4<=t.length||2==t.length)&&A.test(a)},move:function(){this.encoding.addPattern(this.MOVE)},pushState:function(t){for(var e;(e=n(t.value,t.index,2))&&A.test(e)&&2==e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},getValue:function(t){return t},MOVE:99,START:105}),i.FNC4=a.extend({key:"FNC4",dependentStates:["A","B"],init:function(t,e){this.encoding=t,this._initSubStates(e)},addStart:function(t){var e=t.value.charCodeAt(0)-128,n=this._getSubState(e);this.encoding[n].addStart()},is:function(t,e){var n=t.charCodeAt(e);return this.isCode(n)},isCode:function(t){return 128<=t&&t<256},pushState:function(t){var e,n=this,a=n._initSubState(t),r=n.encoding,i=a.value.length;if(t.index+=i,i<3)for(;a.index<i;a.index++)e=a.value.charCodeAt(a.index),a.state=n._getSubState(e),a.previousState!=a.state&&(a.previousState=a.state,r[a.state].move(a)),r.addPattern(r[a.state].MOVE),r.addPattern(r[a.state].getValue(e));else a.state!=a.previousState&&r[a.state].move(a),n._pushStart(a),r.pushData(a,n.subStates),t.index<t.value.length&&n._pushStart(a);t.fnc=!0,t.state=a.state},_pushStart:function(t){var e=this;e.encoding.addPattern(e.encoding[t.state].MOVE),e.encoding.addPattern(e.encoding[t.state].MOVE)},_initSubState:function(t){var e=this,n={value:e._getAll(t.value,t.index),index:0};return n.state=e._getSubState(n.value.charCodeAt(0)),n.previousState=t.previousState==e.key?n.state:t.previousState,n},_initSubStates:function(t){var e,n=this;for(n.subStates=[],e=0;e<t.length;e++)p(t[e],n.dependentStates)>=0&&n.subStates.push(t[e])},_getSubState:function(t){var e,n=this;for(e=0;e<n.subStates.length;e++)if(n.encoding[n.subStates[e]].isCode(t))return n.subStates[e]},_getAll:function(t,e){for(var n,a="";(n=t.charCodeAt(e++))&&this.isCode(n);)a+=String.fromCharCode(n-128);return a}}),i.FNC1=a.extend({key:"FNC1",startState:"C",dependentStates:["C","B"],startAI:"(",endAI:")",init:function(t,e){this.encoding=t,this.states=e},addStart:function(){this.encoding[this.startState].addStart()},is:function(){return p(this.key,this.states)>=0},pushState:function(t){var e,n,a,r=this,i=r.encoding,o=t.value.replace(/\s/g,""),u=RegExp("["+r.startAI+r.endAI+"]","g"),s=t.index,h={state:r.startState};for(i.addPattern(r.START);;){if(h.index=0,a=o.charAt(s)===r.startAI?2:0,e=a>0?r.getBySeparator(o,s):r.getByLength(o,s),e.ai.length)n=s+a+e.id.length+e.ai.length;else if(n=o.indexOf(r.startAI,s+1),n<0){if(s+e.ai.max+e.id.length+a<o.length)throw Error("Separators are required after variable length identifiers");n=o.length}if(h.value=o.substring(s,n).replace(u,""),r.validate(e,h.value),i.pushData(h,r.dependentStates),n>=o.length)break;s=n,h.state!=r.startState&&(i[r.startState].move(h),h.state=r.startState),e.ai.length||i.addPattern(r.START)}t.index=t.value.length},validate:function(t,e){var n=e.substr(t.id.length),a=t.ai;if(!a.type&&!A.test(n))throw Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"==a.type&&!B.test(n))throw Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(a.length&&a.length!==n.length)throw Error("Application identifier "+t.id+" must be "+a.length+" characters long.");if(a.min&&a.min>n.length)throw Error("Application identifier "+t.id+" must be at least "+a.min+" characters long.");if(a.max&&a.max<n.length)throw Error("Application identifier "+t.id+" must be at most "+a.max+" characters long.")},getByLength:function(t,e){var a,r,i,o=this;for(i=2;i<=4;i++)if(a=n(t,e,i),r=o.getAI(a)||o.getAI(a.substring(0,a.length-1)))return{id:a,ai:r};o.unsupportedAIError(a)},unsupportedAIError:function(t){throw Error(h.format("'{0}' is not a supported Application Identifier"),t)},getBySeparator:function(t,e){var n=this,a=t.indexOf(n.startAI,e),r=t.indexOf(n.endAI,a),i=t.substring(a+1,r),o=n.getAI(i)||n.getAI(i.substr(i.length-1));return o||n.unsupportedAIError(i),{ai:o,id:i}},getAI:function(t){var e,n,a,r=this.applicationIdentifiers,i=r.multiKey;if(r[t])return r[t];for(e=0;e<i.length;e++){if(i[e].ids&&p(t,i[e].ids)>=0)return i[e].type;if(i[e].ranges)for(n=i[e].ranges,a=0;a<n.length;a++)if(n[a][0]<=t&&t<=n[a][1])return i[e].type}},applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102}),o=T.extend({init:function(t){T.fn.init.call(this,t),this._initStates()},_initStates:function(){var t,e=this;for(t=0;t<e.states.length;t++)e[e.states[t]]=new i[e.states[t]](e,e.states)},initValue:function(t,e,n){var a=this;a.pattern=[],a.value=t,a.width=e,a.height=n,a.checkSum=0,a.totalUnits=0,a.index=0,a.position=1},addData:function(){var t=this,e={value:t.value,index:0,state:""};0!==t.value.length&&(e.state=e.previousState=t.getNextState(e,t.states),t.addStart(e),t.pushData(e,t.states),t.addCheckSum(),t.addStop(),t.setBaseUnit())},pushData:function(t,e){for(var n,a=this;;){if(a[t.state].pushState(t),t.index>=t.value.length)break;t.shifted?(n=t.state,t.state=t.previousState,t.previousState=n,t.shifted=!1):(t.previousState=t.state,t.state=a.getNextState(t,e),a[t.state].move(t))}},addStart:function(t){this[t.state].addStart(t),this.position=1},addCheckSum:function(){var t=this;t.checksum=t.checkSum%103,t.addPattern(t.checksum)},addStop:function(){this.addPattern(this.STOP)},setBaseUnit:function(){var t=this;t.baseUnit=t.width/(t.totalUnits+t.quietZoneLength)},addPattern:function(t){var e,n,a=this,r=""+a.characterMap[t];for(n=0;n<r.length;n++)e=parseInt(r.charAt(n),10),a.pattern.push(e),a.totalUnits+=e;a.checkSum+=t*a.position++},getNextState:function(t,e){for(var n=0;n<e.length;n++)if(this[e[n]].is(t.value,t.index))return e[n];this.invalidCharacterError(t.value.charAt(t.index))},characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106}),_.code128a=o.extend({name:"Code 128 A",states:["A"]}),_.code128b=o.extend({name:"Code 128 B",states:["B"]}),_.code128c=o.extend({name:"Code 128 C",states:["C"]}),_.code128=o.extend({name:"Code 128",states:["C","B","A","FNC4"]}),_["gs1-128"]=o.extend({name:"Code GS1-128",states:["FNC1","C","B"]}),u=T.extend({initValue:function(t,e){var n=this;n.pattern=[],n.value=t,n.checkSumLength=0,n.width=e},setBaseUnit:function(){var t=this,e=7;t.baseUnit=t.width/(12*(t.value.length+t.checkSumLength)+t.quietZoneLength+e)},addData:function(){var t,e=this,n=e.value;for(e.addPattern(e.START),t=0;t<n.length;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.addCheckSum(),e.addPattern(e.STOP),e.setBaseUnit()},addCharacter:function(t){var e=this,n=e.characterMap[t];n||e.invalidCharacterError(t),e.addPattern(n)},addPattern:function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},addCheckSum:function(){var t,e=this,n=e.checkSums[e.checkSumType],a=n.call(e.checkSums,e.value);for(e.checksum=a.join(""),t=0;t<a.length;t++)e.checkSumLength++,e.addPattern(e.characterMap[a[t]])},checkSums:{Modulo10:function(t){var e,n,a,r=[0,""],i=t.length%2;for(e=0;e<t.length;e++)r[(e+i)%2]+=parseInt(t.charAt(e),10);for(a=r[0],n=""+2*r[1],e=0;e<n.length;e++)a+=parseInt(n.charAt(e),10);return[(10-a%10)%10]},Modulo11:function(t){var e,n,a,r=0,i=11,o=t.length;for(a=0;a<o;a++)e=((o-a)%6||6)+1,r+=e*t.charAt(a);return n=(i-r%i)%i,10!=n?[n]:[1,0]},Modulo11Modulo10:function(t){var e,n=this.Modulo11(t);return e=t+n[0],n.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,n=this.Modulo10(t);return e=t+n[0],n.concat(this.Modulo10(e))}},characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:""}),_.msimod10=u.extend({name:"MSI Modulo10",checkSumType:"Modulo10"}),_.msimod11=u.extend({name:"MSI Modulo11",checkSumType:"Modulo11"}),_.msimod1110=u.extend({name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"}),_.msimod1010=u.extend({name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"}),_.code11=T.extend({name:"Code 11",cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221",initValue:function(t,e){var n=this;n.pattern=[],n.value=t,n.width=e,n.totalUnits=0},addData:function(){var t,e=this,n=e.value;for(e.addPattern(e.START),t=0;t<n.length;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.addCheckSum(),e.addPattern(e.STOP),e.setBaseUnit()},setBaseUnit:function(){var t=this;t.baseUnit=t.width/(t.totalUnits+t.quietZoneLength)},addCheckSum:function(){var t,e=this,n=e.value,a=n.length,r=e.getWeightedSum(n,a,e.cCheckSumTotal)%e.checkSumMod;e.checksum=r+"",e.addPattern(e.characterMap[r]),a++,a>=e.kCheckSumMinLength&&(t=(r+e.getWeightedSum(n,a,e.kCheckSumTotal))%e.checkSumMod,e.checksum+=t,e.addPattern(e.characterMap[t]))},getWeightedSum:function(t,e,n){var a,r=0;for(a=0;a<t.length;a++)r+=this.weightedValue(this.getValue(t.charAt(a)),e,a,n);return r},weightedValue:function(t,e,n,a){var r=(e-n)%a||a;return r*t},getValue:function(t){var e=this;return isNaN(t)?(t!==e.DASH&&e.invalidCharacterError(t),e.DASH_VALUE):parseInt(t,10)},addCharacter:function(t){var e=this,n=e.getValue(t),a=e.characterMap[n];e.addPattern(a)},addPattern:function(t){var e,n;for(n=0;n<t.length;n++)e=parseInt(t.charAt(n),10),this.pattern.push(e),this.totalUnits+=e},characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],options:{addCheckSum:!0}}),_.postnet=T.extend({name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",initValue:function(t,e,n){var a=this;a.height=n,a.width=e,a.baseHeight=n/2,a.value=t.replace(RegExp(a.DIGIT_SEPARATOR,"g"),""),a.pattern=[],a.validate(a.value),a.checkSum=0,a.setBaseUnit()},addData:function(){var t,e=this,n=e.value;for(e.addPattern(e.START),t=0;t<n.length;t++)e.addCharacter(n.charAt(t));e.options.addCheckSum&&e.addCheckSum(),e.addPattern(e.START),e.pattern.pop()},addCharacter:function(t){var e=this,n=e.characterMap[t];e.checkSum+=parseInt(t,10),e.addPattern(n)},addCheckSum:function(){var t=this;t.checksum=(10-t.checkSum%10)%10,t.addCharacter(t.checksum)},setBaseUnit:function(){var t=this,e=3;t.baseUnit=t.width/(10*(t.value.length+1)+e+t.quietZoneLength)},validate:function(t){var e=this;if(A.test(t)||e.invalidCharacterError(t.match(/[^0-9]/)[0]),p(t.length,e.VALID_CODE_LENGTHS)<0)throw Error("Invalid value length. Valid lengths for the Postnet symbology are "+e.VALID_CODE_LENGTHS.join(","))},addPattern:function(t){var e,n,a=this;for(n=0;n<t.length;n++)e=a.height-a.baseHeight*t.charAt(n),a.pattern.push({width:1,y1:e,y2:a.height}),a.pattern.push(1)},characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]}),_.ean13=T.extend({initValue:function(t,e,n){if(t+="",12!=t.length||/\D/.test(t))throw Error('The value of the "EAN13" encoding should be 12 symbols');var a=this;a.pattern=[],a.options.height=n,a.baseUnit=e/(95+a.quietZoneLength),a.value=t,a.checksum=a.calculateChecksum(),a.leftKey=t[0],a.leftPart=t.substr(1,6),a.rightPart=t.substr(7)+a.checksum},addData:function(){var t=this;t.addPieces(t.characterMap.start),t.addSide(t.leftPart,t.leftKey),t.addPieces(t.characterMap.middle),t.addSide(t.rightPart),t.addPieces(t.characterMap.start)},addSide:function(t,e){var n,a=this;for(n=0;n<t.length;n++)e&&parseInt(a.keyTable[e].charAt(n),10)?a.addPieces(Array.prototype.slice.call(a.characterMap.digits[t.charAt(n)]).reverse(),!0):a.addPieces(a.characterMap.digits[t.charAt(n)],!0);
},addPieces:function(t,e){var n,a=this;for(n=0;n<t.length;n++)a.pattern.push(e?{y1:0,y2:.95*a.options.height,width:t[n]}:t[n])},calculateChecksum:function(){var t,e,n=0,a=0,r=this.value.split("").reverse().join("");for(t=0;t<r.length;t++)t%2?a+=parseInt(r.charAt(t),10):n+=parseInt(r.charAt(t),10);return e=(10-(3*n+a)%10)%10},keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}}),_.ean8=_.ean13.extend({initValue:function(t,e,n){var a=this;if(7!=t.length||/\D/.test(t))throw Error("Invalid value provided");a.value=t,a.options.height=n,a.checksum=a.calculateChecksum(a.value),a.leftPart=a.value.substr(0,4),a.rightPart=a.value.substr(4)+a.checksum,a.pattern=[],a.baseUnit=e/(67+a.quietZoneLength)}}),s=d.extend({init:function(e,n){var a=this;d.fn.init.call(a,e,n),a.element=t(e),a.wrapper=a.element,a.element.addClass("k-barcode").css("display","block"),a.surfaceWrap=t("<div />").css("position","relative").appendTo(this.element),a.surface=v.Surface.create(a.surfaceWrap,{type:a.options.renderAs}),a.setOptions(n)},setOptions:function(t){var e=this;if(e.type=(t.type||e.options.type).toLowerCase(),"upca"==e.type&&(e.type="ean13",t.value="0"+t.value),"upce"==e.type&&(e.type="ean8",t.value="0"+t.value),!_[e.type])throw Error("Encoding "+e.type+"is not supported.");e.encoding=new _[e.type],e.options=c(!0,e.options,t),b(t.value)&&e.redraw()},redraw:function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return h.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},_render:function(){var t,e,n,a=this,r=a.options,i=r.value,o=r.text,u=w.getSpacing(o.margin),s=a._getSize(),h=r.border||{},d=a.encoding,c=S(0,0,s.width,s.height).unpad(h.width).unpad(r.padding),l=c.height(),p=new v.Group;return a.contentBox=c,p.append(a._getBackground(s)),o.visible&&(n=v.util.measureText(i,{font:o.font}).height,l-=n+u.top+u.bottom),t=d.encode(i,c.width(),l),o.visible&&(e=i,r.checksum&&b(d.checksum)&&(e+=" "+d.checksum),p.append(a._getText(e))),a.barHeight=l,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),p.append(this._bandsGroup),p},exportVisual:function(){return this._render()},_getSize:function(){var t=this,e=t.element,n=new g.Size(x,k);return e.width()>0&&(n.width=e.width()),e.height()>0&&(n.height=e.height()),t.options.width&&(n.width=t.options.width),t.options.height&&(n.height=t.options.height),n},value:function(t){var n=this;return b(t)?(n.options.value=t+"",n.redraw(),e):n.options.value},_getBands:function(t,e){var n,a,r,i,o,u=this,s=u.contentBox,h=s.x1,d=new v.Group;for(r=0;r<t.length;r++)a=f(t[r])?t[r]:{width:t[r],y1:0,y2:u.barHeight},n=a.width*e,r%2&&(i=g.Rect.fromPoints(new g.Point(h,a.y1+s.y1),new g.Point(h+n,a.y2+s.y1)),o=v.Path.fromRect(i,{fill:{color:u.options.color},stroke:null}),d.append(o)),h+=n;return d},_getBackground:function(t){var e=this,n=e.options,a=n.border||{},r=S(0,0,t.width,t.height).unpad(a.width/2),i=v.Path.fromRect(r.toRect(),{fill:{color:n.background},stroke:{color:a.width?a.color:"",width:a.width,dashType:a.dashType}});return i},_getText:function(t){var e=this,n=e.options.text,a=e._textbox=new C(t,{font:n.font,color:n.color,align:"center",vAlign:"bottom",margin:n.margin});return a.reflow(e.contentBox),a.renderVisual(),a.visual},options:{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}}}),w.ExportMixin.extend(s.fn),w.ui.plugin(s),h.deepExtend(w,{encodings:_,Encoding:T})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,n){(n||e)()});
//# sourceMappingURL=kendo.dataviz.barcode.min.js.map
