EOS/Scripts/kendo/2015.3.1111/kendo.dataviz.qrcode.min.js
Nidhi Bhargava f0c1ab20e1 code push
2025-09-04 16:25:07 +05:30

9 lines
25 KiB
JavaScript

/*
* Kendo UI v2015.3.1111 (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(e,define){define(["./kendo.dataviz.core.min","./kendo.drawing.min"],e)}(function(){return function(e,t){function n(e){return parseInt(e,2)}function i(e,t){var n=(+e).toString(2);return t>n.length&&(n=Array(t-n.length+1).join(0)+n),n}function o(e,t){for(var n=[],i=0;e.length>i;)n.push(e.substring(i,i+t)),i+=t;return n}function r(e,t,n,i){for(var o=0;e.length>o;o++)e[o][n][i]=t}function s(e,t,n,i){for(var o=0;ve.length>o;o++)e[o][n][i]=ve[o](n,i)?1^t:parseInt(t,10)}function a(){var e,t;for(t=1;255>t;t++)e=2*re[t-1],e>255&&(e=285^e),re[t]=e,oe[e]=t;e=2*re[t-1]^285,re[t]=e,re[-1]=0}function l(){var e,t,n,i=68;for(e=2;i>=e;e++)t=se[e-1],n=[e,0],se[e]=y(t,n)}function c(e,n){var i=[],o=e.length-1;do i[o]=re[(e[o]+n)%255],o--;while(e[o]!==t);return i}function h(e,t){return parseInt(e.charAt(t),10)}function u(e,t,n,i,o){t[e][i]=(t[e][i]<<1^o)%128,t[e][i]==me&&(n[e]+=40)}function d(e,t,n,i,o,r){n[e][r]==i?o[e][r]++:(n[e][r]=i,o[e][r]>=5&&(t[e]+=3+o[e][r]-5),o[e][r]=1)}function f(e,t){var n=Math.floor(e/t*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,A,D,M,P,E,I,R,B,L,z,F,O,N,V,H,U,j,W,G,q,$,Y=window.kendo,Q=e.extend,X=Y.drawing,K=Y.dataviz,Z=Y.ui.Widget,J=K.Box2D,ee="0000",te="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],ue={L:"01",M:"00",Q:"11",H:"10"},de="101010000010010",fe="10100110111",pe="1111100100101",ge=["11101100","00010001"],me=93,ve=[function(e,t){return(e+t)%2===0},function(e){return e%2===0},function(e,t){return t%3===0},function(e,t){return(e+t)%3===0},function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2===0},function(e,t){return e*t%2+e*t%3===0},function(e,t){return(e*t%2+e*t%3)%2===0},function(e,t){return((e+t)%2+e*t%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,Ae=17,De=9,Me=16,Pe=Math.round,Ee=Y.Class.extend({getVersionIndex:function(e){return 10>e?0:e>26?2:1},getBitsCharacterCount:function(e){var t=this;return t.bitsInCharacterCount[t.getVersionIndex(e||40)]},getModeCountString:function(e,t){var n=this;return n.modeIndicator+i(e,n.getBitsCharacterCount(t))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Ie={};Ie[te]=Ee.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(e){return parseInt(e,10)},encode:function(e,t){var n,r=this,s=o(e,3),a=r.getModeCountString(e.length,t);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(e,t){var n=e%3;return 4+this.getBitsCharacterCount(t)+10*Math.floor(e/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(e){return this.characters[e]},encode:function(e,t){var n,r,s=this,a=o(e,2),l=s.getModeCountString(e.length,t);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(e,t){return 4+this.getBitsCharacterCount(t)+11*Math.floor(e/2)+6*(e%2)}}),Ie[ie]=Ee.extend({bitsInCharacterCount:[8,16,16],modeIndicator:"0100",getValue:function(e){var t=e.charCodeAt(0);if(127>=t||t>=160&&255>=t)return t;throw Error("Unsupported character: "+e)},encode:function(e,t){var n,o=this,r=o.getModeCountString(e.length,t);for(n=0;e.length>n;n++)r+=i(o.getValue(e.charAt(n)),8);return r},getStringBitsLength:function(e,t){return 4+this.getBitsCharacterCount(t)+8*e}}),p={};for(g in Ie)p[g]=new Ie[g];m=function(e){var n=this,i=e.length-1,o=e.length-1,r=o,s=-1,a=0;n.move=function(){i+=s*a,a^=1,o=r-a},n.getNextCell=function(){for(;e[i][o]!==t;)n.move(),(0>i||i>=e.length)&&(s=-s,r-=8!=r?2:3,o=r,i=0>s?e.length-1:0);return{row:i,column:o}},n.getNextRemainderCell=function(){return n.move(),e[i][o]===t?{row:i,column:o}:t}},v=function(e,t){var n,i,o,r,a,l,c=new m(e[0]);for(r=0;t.length>r;r++)for(n=t[r],i=0;n.length>0;){for(a=0;n.length>a;a++)for(l=0;8>l;l++)o=c.getNextCell(),s(e,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(e,0,o.row,o.column)},_=function(e,t){for(var n=8*t,i=0,o=0;n>e.length&&ee.length>i;)e+=ee.charAt(i++);for(e.length%8!==0&&(e+=Array(9-e.length%8).join("0"));n>e.length;)e+=ge[o],o^=1;return e},w=function(e,t){var n,i=[],o=e.length-2;for(n=o;n>=0;n--)i[n]=e[n]^t[n];return i},y=function(e,n){var i,o,r=[];for(i=0;e.length>i;i++)for(o=0;n.length>o;o++)r[i+o]=r[i+o]===t?(e[i]+(n[o]>=0?n[o]:0))%255:oe[re[r[i+o]]^re[(e[i]+n[o])%255]];return r},a(),l(),b=function(e,t){var n,o,r=se[t-1],s=Array(t).concat(e),a=Array(s.length-r.length).concat(r),l=e.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[t-1-o]=i(s[o],8);return h},x=function(e,t){var i,o,r,s,a,l,c,h,u=0,d=[],f=[],p=t.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=e.substring(u,u+8),i.push(a),s[o-h]=n(a),u+=8;d.push(i),f.push(b(s,t.errorCodewordsPerBlock))}return[d,f]},k=function(e,t,n,i,o){var r,s,a=_e.exec(e),l=a?a[0]:"",c=be.exec(e),h=c?c[0]:"",u=xe.exec(e),d=u?u[0]:"";return l&&(l.length>=t||e.length==l.length||l.length>=n&&!xe.test(e.charAt(l.length)))?(r=te,s=l):d&&(e.length==d.length||d.length>=i||o==ne)?(r=ne,s=l||h):(r=ie,s=d?d+ke.exec(e.substring(d.length))[0]:ke.exec(e)[0]),{mode:r,modeString:s}},C=function(e){var t,n,i=[],o=0;for(i.push(k(e,Ce,Se,Te,t)),t=i[0].mode,e=e.substr(i[0].modeString.length);e.length>0;)n=k(e,Ae,De,Me,t),n.mode!=t?(t=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,e=e.substr(n.modeString.length);return i},S=function(e){var t,n,i=0;for(n=0;e.length>n;n++)t=p[e[n].mode],i+=t.getStringBitsLength(e[n].modeString.length);return Math.ceil(i/8)},T=function(e,t){var n=0,i=le.length-1,o=Math.floor(le.length/2);do le[o][t].totalDataCodewords>e?i=o:n=o,o=n+Math.floor((i-n)/2);while(i-n>1);return le[n][t].totalDataCodewords>=e?o+1:i+1},A=function(e,t){var n,i,o="";for(i=0;e.length>i;i++)n=p[e[i].mode],o+=n.encode(e[i].modeString,t);return o},D=function(e){var t,i,o=n(e),r="";if(0===o)return"101010000010010";for(t=M(n(e),fe,15),i=0;t.length>i;i++)r+=t.charAt(i)^de.charAt(i);return r},M=function(e,t,o){var r=n(t),s=t.length-1,a=e<<s,l=o-s,c=i(e,l),h=P(a,r);return h=c+i(h,s)},P=function(e,t){var n=t.toString(2).length,i=e.toString(2).length;do e^=t<<i-n,i=e.toString(2).length;while(i>=n);return e},E=function(e){var t,n,i=[],o=17+4*e;for(t=0;ve.length>t;t++)for(i[t]=Array(o),n=0;o>n;n++)i[t][n]=Array(o);return i},I=function(e,t){var n,i,o=e[0],s=0,a=t.length;for(n=0,i=8;8>=n;n++)6!==n&&r(e,h(t,a-1-s++),n,i);for(n=8,i=7;i>=0;i--)6!==i&&r(e,h(t,a-1-s++),n,i);for(s=0,i=o.length-1,n=8;i>=o.length-8;i--)r(e,h(t,a-1-s++),n,i);for(r(e,1,o.length-8,8),n=o.length-7,i=8;o.length>n;n++)r(e,h(t,a-1-s++),n,i)},R=function(e){return M(e,pe,18)},B=function(e,t){var n,i,o,s,a=e[0],l=a.length,c=0,u=l-11,d=l-11,f=0;for(s=0;t.length>s;s++)n=Math.floor(s/3),i=s%3,o=h(t,t.length-s-1),r(e,o,c+n,u+i),r(e,o,d+i,f+n)},L=function(e,t,n,i){var o,s,a,l=t.length+2,c=t.length+1;for(s=0;t.length>s;s++)for(a=s;l-s>a;a++)o=t[s],r(e,o,n+a,i+s),r(e,o,n+s,i+a),r(e,o,n+c-a,i+c-s),r(e,o,n+c-s,i+c-a)},z=function(e,t,n,i){var o=n,s=i,a=e[0];do r(e,0,o,i),r(e,0,n,s),o+=t[0],s+=t[1];while(o>=0&&a.length>o)},F=function(e){var t=e[0].length;L(e,ce,0,0),z(e,[-1,-1],7,7),L(e,ce,t-7,0),z(e,[1,-1],t-8,7),L(e,ce,0,t-7),z(e,[-1,1],7,t-8)},O=function(e,n){var i,o,r,s,a,l,c,h,u;if(!(2>n)){for(i=e[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(u=0;s.length>u;u++)i[s[h]][s[u]]===t&&L(e,he,s[h]-2,s[u]-2)}},N=function(e){var t,n=6,i=6,o=1,s=e[0].length;for(t=8;s-8>t;t++)r(e,o,n,t),r(e,o,t,i),o^=1},V=function(e){var t,n,i,o,r,s,a,l=[],c=[],h=[],p=[],g=[],m=0,v=1,_=e[0].length;for(n=0;e.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;e.length>o;o++)t=e[o],h[o]+=parseInt(t[n][i],10),c[o][m]===t[n][i]&&_>n+1&&i-1>=0&&t[n+1][i]==c[o][m]&&t[n+1][i-1]==c[o][m]&&(l[o]+=3),u(o,p,l,m,t[n][i]),u(o,p,l,v,t[i][n]),d(o,l,c,t[n][i],g,m),d(o,l,c,t[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(e,t){this.dataString=e,this.version=t},U=function(){this.getEncodingResult=function(e,t){var n=C(e),i=S(n),o=T(i,t),r=A(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(e,t){var n=this,i=n.encode(e),o=n.getDataCodewordsCount(i),r=T(o,t),s=n.mode.getModeCountString(i.length/8,r)+i;return new H(s,r)},getDataCodewordsCount:function(e){var t=this,n=e.length,i=Math.ceil((t.initialModeCountStringLength+n)/8);return i},encode:function(e){var t,n=this,i=n.utfBOM;for(t=0;e.length>t;t++)i+=n.encodeCharacter(e.charCodeAt(t));return i},encodeCharacter:function(e){var t,n,o=this.getBytesCount(e),r=o-1,s="";if(1==o)s=i(e,8);else{for(t=8-o,n=0;r>n;n++)s=i(e>>6*n&63|128,8)+s;s=(e>>6*r|255>>t<<t).toString(2)+s}return s},getBytesCount:function(e){var t,n=this.ranges;for(t=0;n.length>t;t++)if(n[t]>e)return t+1},ranges:[128,2048,65536,2097152,67108864]},W=function(e){return e&&e.toLowerCase().indexOf("utf_8")>=0?new j:new U},G=function(e,t,n){var o,r,s,a=new W(n),l=a.getEncodingResult(e,t),c=l.version,h=le[c-1][t],u=_(l.dataString,h.totalDataCodewords),d=x(u,h),f=E(c);return F(f),O(f,c),N(f),c>=7&&B(f,i(0,18)),I(f,i(0,15)),v(f,d),o=V(f),r=f[o],c>=7&&B([r],R(c)),s=ue[t]+i(o,3),I([r],D(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(t,n){var i=this;Z.fn.init.call(i,t,n),i.element=e(t),i.wrapper=i.element,i.element.addClass("k-qrcode"),i.surfaceWrap=e("<div />").css("position","relative").appendTo(this.element),i.surface=X.Surface.create(i.surfaceWrap,{type:i.options.renderAs}),i.setOptions(n)},redraw:function(){var e=this._getSize();this.surfaceWrap.css({width:e,height:e}),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 e,t,n,i,o,r,s,a=this,l=a._value,c=a.options.border||{},h=a.options.padding||0,u=c.width||0;return c.width=u,s=new X.Group,l&&(n=G(l,a.options.errorCorrection,a.options.encoding),i=a._getSize(),r=i-2*(u+h),e=a._calculateBaseUnit(r,n.length),o=n.length*e,t=u+h+(r-o)/2,s.append(a._renderBackground(i,c)),s.append(a._renderMatrix(n,e,t))),s},_getSize:function(){var e,t,n,i=this;return i.options.size?e=parseInt(i.options.size,10):(t=i.element,n=Math.min(t.width(),t.height()),e=n>0?n:q.DEFAULT_SIZE),e},_calculateBaseUnit:function(e,t){var n=Math.floor(e/t);if(q.MIN_BASE_UNIT_SIZE>n)throw Error("Insufficient size.");return n*t>=e&&n-1>=q.MIN_BASE_UNIT_SIZE&&n--,n},_renderMatrix:function(e,t,n){var i,o,r,s,a,l,c,h,u=new X.MultiPath({fill:{color:this.options.color},stroke:null});for(i=0;e.length>i;i++)for(o=n+i*t,r=0;e.length>r;){for(;0===e[i][r]&&e.length>r;)r++;if(e.length>r){for(s=r;1==e[i][r];)r++;a=Pe(n+s*t),l=Pe(o),c=Pe(n+r*t),h=Pe(o+t),u.moveTo(a,l).lineTo(a,h).lineTo(c,h).lineTo(c,l).close()}}return u},_renderBackground:function(e,t){var n=J(0,0,e,e).unpad(t.width/2);return X.Path.fromRect(n.toRect(),{fill:{color:this.options.background},stroke:{color:t.color,width:t.width}})},setOptions:function(e){var n=this;e=e||{},n.options=Q(n.options,e),e.value!==t&&(n._value=n.options.value+""),n.redraw()},value:function(e){var n=this;return e===t?n._value:(n._value=e+"",n.redraw(),t)},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:A,encodeFormatInformation:D,encodeBCH:M,dividePolynomials:P,initMatrices:E,addFormatInformation:I,encodeVersionInformation:R,addVersionInformation:B,addCentricPattern:L,addFinderSeparator:z,addFinderPatterns:F,addAlignmentPatterns:O,addTimingFunctions:N,scoreMaskMatrixes:V,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(e,t){t()});