text: /*
  * Kendo UI v2015.2.805 (http://www.telerik.com/kendo-ui)
  * Copyright 2015 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(["./kendo.dataviz.core.min","./kendo.drawing.min"],t)}(function(){return function(t,e){function n(t){return parseInt(t,2)}function i(t,e){var n=(+t).toString(2);return e>n.length&&(n=Array(e-n.length+1).join(0)+n),n}function o(t,e){for(var n=[],i=0;t.length>i;)n.push(t.substring(i,i+e)),i+=e;return n}function r(t,e,n,i){for(var o=0;t.length>o;o++)t[o][n][i]=e}function s(t,e,n,i){for(var o=0;ve.length>o;o++)t[o][n][i]=ve[o](n,i)?1^e:parseInt(e,10)}function a(){var t,e;for(e=1;255>e;e++)t=2*re[e-1],t>255&&(t=285^t),re[e]=t,oe[t]=e;t=2*re[e-1]^285,re[e]=t,re[-1]=0}function l(){var t,e,n,i=68;for(t=2;i>=t;t++)e=se[t-1],n=[t,0],se[t]=y(e,n)}function c(t,n){var i=[],o=t.length-1;do i[o]=re[(t[o]+n)%255],o--;while(t[o]!==e);return i}function h(t,e){return parseInt(t.charAt(e),10)}function d(t,e,n,i,o){e[t][i]=(e[t][i]<<1^o)%128,e[t][i]==me&&(n[t]+=40)}function u(t,e,n,i,o,r){n[t][r]==i?o[t][r]++:(n[t][r]=i,o[t][r]>=5&&(e[t]+=3+o[t][r]-5),o[t][r]=1)}function f(t,e){var n=Math.floor(t/e*100),i=n%5,o=Math.abs(n-i-50),r=Math.abs(n+5-i-50),s=10*Math.min(o/5,r/5);return s}var p,g,m,v,_,w,y,b,x,k,C,S,T,D,A,P,M,E,I,B,L,z,R,F,O,V,N,H,U,j,W,G,q,$,Y=window.kendo,Q=t.extend,X=Y.drawing,K=Y.dataviz,Z=Y.ui.Widget,J=K.Box2D,te="0000",ee="numeric",ne="alphanumeric",ie="byte",oe={1:0},re={0:1},se=[[1,0],[1,25,0]],ae={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},le=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],ce=[1,0,1,1,1],he=[1,0,1],de={L:"01",M:"00",Q:"11",H:"10"},ue="101010000010010",fe="10100110111",pe="1111100100101",ge=["11101100","00010001"],me=93,ve=[function(t,e){return(t+e)%2===0},function(t){return t%2===0},function(t,e){return e%3===0},function(t,e){return(t+e)%3===0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2===0},function(t,e){return t*e%2+t*e%3===0},function(t,e){return(t*e%2+t*e%3)%2===0},function(t,e){return((t+e)%2+t*e%3)%2===0}],_e=/^\d+/,we="A-Z0-9 $%*+./:-",ye="A-Z $%*+./:-",be=RegExp("^["+ye+"]+"),xe=RegExp("^["+we+"]+"),ke=RegExp("^[^"+we+"]+"),Ce=8,Se=5,Te=8,De=17,Ae=9,Pe=16,Me=Math.round,Ee=Y.Class.extend({getVersionIndex:function(t){return 10>t?0:t>26?2:1},getBitsCharacterCount:function(t){var e=this;return e.bitsInCharacterCount[e.getVersionIndex(t||40)]},getModeCountString:function(t,e){var n=this;return n.modeIndicator+i(t,n.getBitsCharacterCount(e))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Ie={};Ie[ee]=Ee.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(t){return parseInt(t,10)},encode:function(t,e){var n,r=this,s=o(t,3),a=r.getModeCountString(t.length,e);for(n=0;s.length-1>n;n++)a+=i(s[n],10);return a+i(s[n],1+3*s[n].length)},getStringBitsLength:function(t,e){var n=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*n+(0===n?0:1)}}),Ie[ne]=Ee.extend({characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010",getValue:function(t){return this.characters[t]},encode:function(t,e){var n,r,s=this,a=o(t,2),l=s.getModeCountString(t.length,e);for(r=0;a.length-1>r;r++)n=45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)),l+=i(n,11);return n=2==a[r].length?45*s.getValue(a[r].charAt(0))+s.getValue(a[r].charAt(1)):s.getValue(a[r].charAt(0)),l+i(n,1+5*a[r].length)},getStringBitsLength:function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+6*(t%2)}}),Ie[ie]=Ee.extend({bitsInCharacterCount:[8,16,16],modeIndicator:"0100",getValue:function(t){var e=t.charCodeAt(0);if(127>=e||e>=160&&255>=e)return e;throw Error("Unsupported character: "+t)},encode:function(t,e){var n,o=this,r=o.getModeCountString(t.length,e);for(n=0;t.length>n;n++)r+=i(o.getValue(t.charAt(n)),8);return r},getStringBitsLength:function(t,e){return 4+this.getBitsCharacterCount(e)+8*t}}),p={};for(g in Ie)p[g]=new Ie[g];m=function(t){var n=this,i=t.length-1,o=t.length-1,r=o,s=-1,a=0;n.move=function(){i+=s*a,a^=1,o=r-a},n.getNextCell=function(){for(;t[i][o]!==e;)n.move(),(0>i||i>=t.length)&&(s=-s,r-=8!=r?2:3,o=r,i=0>s?t.length-1:0);return{row:i,column:o}},n.getNextRemainderCell=function(){return n.move(),t[i][o]===e?{row:i,column:o}:e}},v=function(t,e){var n,i,o,r,a,l,c=new m(t[0]);for(r=0;e.length>r;r++)for(n=e[r],i=0;n.length>0;){for(a=0;n.length>a;a++)for(l=0;8>l;l++)o=c.getNextCell(),s(t,n[a][i].charAt(l),o.row,o.column);for(i++;n[0]&&i==n[0].length;)n.splice(0,1)}for(;o=c.getNextRemainderCell();)s(t,0,o.row,o.column)},_=function(t,e){for(var n=8*e,i=0,o=0;n>t.length&&te.length>i;)t+=te.charAt(i++);for(t.length%8!==0&&(t+=Array(9-t.length%8).join("0"));n>t.length;)t+=ge[o],o^=1;return t},w=function(t,e){var n,i=[],o=t.length-2;for(n=o;n>=0;n--)i[n]=t[n]^e[n];return i},y=function(t,n){var i,o,r=[];for(i=0;t.length>i;i++)for(o=0;n.length>o;o++)r[i+o]=r[i+o]===e?(t[i]+(n[o]>=0?n[o]:0))%255:oe[re[r[i+o]]^re[(t[i]+n[o])%255]];return r},a(),l(),b=function(t,e){var n,o,r=se[e-1],s=Array(e).concat(t),a=Array(s.length-r.length).concat(r),l=t.length,h=[];for(o=0;l>o;o++)n=c(a,oe[s[s.length-1]]),a.splice(0,1),s=w(n,s);for(o=s.length-1;o>=0;o--)h[e-1-o]=i(s[o],8);return h},x=function(t,e){var i,o,r,s,a,l,c,h,d=0,u=[],f=[],p=e.groups;for(l=0;p.length>l;l++)for(r=p[l][0],c=0;r>c;c++){for(o=p[l][1],i=[],s=[],h=1;o>=h;h++)a=t.substring(d,d+8),i.push(a),s[o-h]=n(a),d+=8;u.push(i),f.push(b(s,e.errorCodewordsPerBlock))}return[u,f]},k=function(t,e,n,i,o){var r,s,a=_e.exec(t),l=a?a[0]:"",c=be.exec(t),h=c?c[0]:"",d=xe.exec(t),u=d?d[0]:"";return l&&(l.length>=e||t.length==l.length||l.length>=n&&!xe.test(t.charAt(l.length)))?(r=ee,s=l):u&&(t.length==u.length||u.length>=i||o==ne)?(r=ne,s=l||h):(r=ie,s=u?u+ke.exec(t.substring(u.length))[0]:ke.exec(t)[0]),{mode:r,modeString:s}},C=function(t){var e,n,i=[],o=0;for(i.push(k(t,Ce,Se,Te,e)),e=i[0].mode,t=t.substr(i[0].modeString.length);t.length>0;)n=k(t,De,Ae,Pe,e),n.mode!=e?(e=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,t=t.substr(n.modeString.length);return i},S=function(t){var e,n,i=0;for(n=0;t.length>n;n++)e=p[t[n].mode],i+=e.getStringBitsLength(t[n].modeString.length);return Math.ceil(i/8)},T=function(t,e){var n=0,i=le.length-1,o=Math.floor(le.length/2);do le[o][e].totalDataCodewords>t?i=o:n=o,o=n+Math.floor((i-n)/2);while(i-n>1);return le[n][e].totalDataCodewords>=t?o+1:i+1},D=function(t,e){var n,i,o="";for(i=0;t.length>i;i++)n=p[t[i].mode],o+=n.encode(t[i].modeString,e);return o},A=function(t){var e,i,o=n(t),r="";if(0===o)return"101010000010010";for(e=P(n(t),fe,15),i=0;e.length>i;i++)r+=e.charAt(i)^ue.charAt(i);return r},P=function(t,e,o){var r=n(e),s=e.length-1,a=t<<s,l=o-s,c=i(t,l),h=M(a,r);return h=c+i(h,s)},M=function(t,e){var n=e.toString(2).length,i=t.toString(2).length;do t^=e<<i-n,i=t.toString(2).length;while(i>=n);return t},E=function(t){var e,n,i=[],o=17+4*t;for(e=0;ve.length>e;e++)for(i[e]=Array(o),n=0;o>n;n++)i[e][n]=Array(o);return i},I=function(t,e){var n,i,o=t[0],s=0,a=e.length;for(n=0,i=8;8>=n;n++)6!==n&&r(t,h(e,a-1-s++),n,i);for(n=8,i=7;i>=0;i--)6!==i&&r(t,h(e,a-1-s++),n,i);for(s=0,i=o.length-1,n=8;i>=o.length-8;i--)r(t,h(e,a-1-s++),n,i);for(r(t,1,o.length-8,8),n=o.length-7,i=8;o.length>n;n++)r(t,h(e,a-1-s++),n,i)},B=function(t){return P(t,pe,18)},L=function(t,e){var n,i,o,s,a=t[0],l=a.length,c=0,d=l-11,u=l-11,f=0;for(s=0;e.length>s;s++)n=Math.floor(s/3),i=s%3,o=h(e,e.length-s-1),r(t,o,c+n,d+i),r(t,o,u+i,f+n)},z=function(t,e,n,i){var o,s,a,l=e.length+2,c=e.length+1;for(s=0;e.length>s;s++)for(a=s;l-s>a;a++)o=e[s],r(t,o,n+a,i+s),r(t,o,n+s,i+a),r(t,o,n+c-a,i+c-s),r(t,o,n+c-s,i+c-a)},R=function(t,e,n,i){var o=n,s=i,a=t[0];do r(t,0,o,i),r(t,0,n,s),o+=e[0],s+=e[1];while(o>=0&&a.length>o)},F=function(t){var e=t[0].length;z(t,ce,0,0),R(t,[-1,-1],7,7),z(t,ce,e-7,0),R(t,[1,-1],e-8,7),z(t,ce,0,e-7),R(t,[-1,1],7,e-8)},O=function(t,n){var i,o,r,s,a,l,c,h,d;if(!(2>n)){for(i=t[0],o=i.length,r=Math.floor(n/7),s=[6],c=0,(a=ae[n])?l=(o-13-a)/r:a=l=(o-13)/(r+1),s.push(s[c++]+a);o>s[c]+l;)s.push(s[c++]+l);for(h=0;s.length>h;h++)for(d=0;s.length>d;d++)i[s[h]][s[d]]===e&&z(t,he,s[h]-2,s[d]-2)}},V=function(t){var e,n=6,i=6,o=1,s=t[0].length;for(e=8;s-8>e;e++)r(t,o,n,e),r(t,o,e,i),o^=1},N=function(t){var e,n,i,o,r,s,a,l=[],c=[],h=[],p=[],g=[],m=0,v=1,_=t[0].length;for(n=0;t.length>n;n++)l[n]=0,h[n]=0,g[n]=[0,0],p[n]=[0,0],c[n]=[];for(n=0;_>n;n++)for(i=0;_>i;i++)for(o=0;t.length>o;o++)e=t[o],h[o]+=parseInt(e[n][i],10),c[o][m]===e[n][i]&&_>n+1&&i-1>=0&&e[n+1][i]==c[o][m]&&e[n+1][i-1]==c[o][m]&&(l[o]+=3),d(o,p,l,m,e[n][i]),d(o,p,l,v,e[i][n]),u(o,l,c,e[n][i],g,m),u(o,l,c,e[i][n],g,v);for(r=_*_,a=Number.MAX_VALUE,n=0;l.length>n;n++)l[n]+=f(h[n],r),a>l[n]&&(a=l[n],s=n);return s},H=function(t,e){this.dataString=t,this.version=e},U=function(){this.getEncodingResult=function(t,e){var n=C(t),i=S(n),o=T(i,e),r=D(n,o);return new H(r,o)}},j=function(){this.mode=p[this.encodingMode]},j.fn=j.prototype={encodingMode:ie,utfBOM:"111011111011101110111111",initialModeCountStringLength:20,getEncodingResult:function(t,e){var n=this,i=n.encode(t),o=n.getDataCodewordsCount(i),r=T(o,e),s=n.mode.getModeCountString(i.length/8,r)+i;return new H(s,r)},getDataCodewordsCount:function(t){var e=this,n=t.length,i=Math.ceil((e.initialModeCountStringLength+n)/8);return i},encode:function(t){var e,n=this,i=n.utfBOM;for(e=0;t.length>e;e++)i+=n.encodeCharacter(t.charCodeAt(e));return i},encodeCharacter:function(t){var e,n,o=this.getBytesCount(t),r=o-1,s="";if(1==o)s=i(t,8);else{for(e=8-o,n=0;r>n;n++)s=i(t>>6*n&63|128,8)+s;s=(t>>6*r|255>>e<<e).toString(2)+s}return s},getBytesCount:function(t){var e,n=this.ranges;for(e=0;n.length>e;e++)if(n[e]>t)return e+1},ranges:[128,2048,65536,2097152,67108864]},W=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new j:new U},G=function(t,e,n){var o,r,s,a=new W(n),l=a.getEncodingResult(t,e),c=l.version,h=le[c-1][e],d=_(l.dataString,h.totalDataCodewords),u=x(d,h),f=E(c);return F(f),O(f,c),V(f),c>=7&&L(f,i(0,18)),I(f,i(0,15)),v(f,u),o=N(f),r=f[o],c>=7&&L([r],B(c)),s=de[e]+i(o,3),I([r],A(s)),r},q={DEFAULT_SIZE:200,QUIET_ZONE_LENGTH:4,DEFAULT_ERROR_CORRECTION_LEVEL:"L",DEFAULT_BACKGROUND:"#fff",DEFAULT_DARK_MODULE_COLOR:"#000",MIN_BASE_UNIT_SIZE:1},$=Z.extend({init:function(e,n){var i=this;Z.fn.init.call(i,e,n),i.element=t(e),i.wrapper=i.element,i.element.addClass("k-qrcode"),i.surfaceWrap=t("<div />").css("position","relative").appendTo(this.element),i.surface=X.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},redraw:function(){var t=this._getSize();this.surfaceWrap.css({width:t,height:t}),this.surface.clear(),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return Y.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},exportVisual:function(){return this._render()},_render:function(){var t,e,n,i,o,r,s,a=this,l=a._value,c=a.options.border||{},h=a.options.padding||0,d=c.width||0;return c.width=d,s=new X.Group,l&&(n=G(l,a.options.errorCorrection,a.options.encoding),i=a._getSize(),r=i-2*(d+h),t=a._calculateBaseUnit(r,n.length),o=n.length*t,e=d+h+(r-o)/2,s.append(a._renderBackground(i,c)),s.append(a._renderMatrix(n,t,e))),s},_getSize:function(){var t,e,n,i=this;return i.options.size?t=parseInt(i.options.size,10):(e=i.element,n=Math.min(e.width(),e.height()),t=n>0?n:q.DEFAULT_SIZE),t},_calculateBaseUnit:function(t,e){var n=Math.floor(t/e);if(q.MIN_BASE_UNIT_SIZE>n)throw Error("Insufficient size.");return n*e>=t&&n-1>=q.MIN_BASE_UNIT_SIZE&&n--,n},_renderMatrix:function(t,e,n){var i,o,r,s,a,l,c,h,d=new X.MultiPath({fill:{color:this.options.color},stroke:null});for(i=0;t.length>i;i++)for(o=n+i*e,r=0;t.length>r;){for(;0===t[i][r]&&t.length>r;)r++;if(t.length>r){for(s=r;1==t[i][r];)r++;a=Me(n+s*e),l=Me(o),c=Me(n+r*e),h=Me(o+e),d.moveTo(a,l).lineTo(a,h).lineTo(c,h).lineTo(c,l).close()}}return d},_renderBackground:function(t,e){var n=J(0,0,t,t).unpad(e.width/2);return X.Path.fromRect(n.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},setOptions:function(t){var n=this;t=t||{},n.options=Q(n.options,t),t.value!==e&&(n._value=n.options.value+""),n.redraw()},value:function(t){var n=this;return t===e?n._value:(n._value=t+"",n.redraw(),e)},options:{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:q.DEFAULT_ERROR_CORRECTION_LEVEL,background:q.DEFAULT_BACKGROUND,color:q.DEFAULT_DARK_MODULE_COLOR,size:"",padding:0,border:{color:"",width:0}}}),K.ExportMixin.extend($.fn),K.ui.plugin($),Y.deepExtend(K,{QRCode:$,QRCodeDefaults:q,QRCodeFunctions:{FreeCellVisitor:m,fillData:v,padDataString:_,generateErrorCodewords:b,xorPolynomials:w,getBlocks:x,multiplyPolynomials:y,chooseMode:k,getModes:C,getDataCodewordsCount:S,getVersion:T,getDataString:D,encodeFormatInformation:A,encodeBCH:P,dividePolynomials:M,initMatrices:E,addFormatInformation:I,encodeVersionInformation:B,addVersionInformation:L,addCentricPattern:z,addFinderSeparator:R,addFinderPatterns:F,addAlignmentPatterns:O,addTimingFunctions:V,scoreMaskMatrixes:N,encodeData:G,UTF8Encoder:j},QRCodeFields:{modes:p,powersOfTwo:oe,powersOfTwoResult:re,generatorPolynomials:se}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e){e()});