vue-data-ui 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,13 +97,13 @@
97
97
  * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
98
98
  * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
99
99
  * http://www.fpdf.org/en/script/script37.php
100
- */var fv={print:4,modify:8,copy:16,"annot-forms":32};function ss(t,e,r,n){this.v=1,this.r=2;var a=192;t.forEach(function(s){if(fv.perm!==void 0)throw new Error("Invalid permission: "+s);a+=fv[s]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var A=(e+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(A,o),this.P=-(1+(255^a)),this.encryptionKey=jd(A+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Wd(this.encryptionKey,this.padding)}function ls(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,n=0;n<r;n++){var a=t.charCodeAt(n);a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?e+="#"+("0"+a.toString(16)).slice(-2):e+=t[n]}return e}function dv(t){if(Xt(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(r,n,a){if(a=a||!1,typeof r!="string"||typeof n!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(r)||(e[r]={});var A=Math.random().toString(35);return e[r][A]=[n,!!a],A},this.unsubscribe=function(r){for(var n in e)if(e[n][r])return delete e[n][r],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(r){if(e.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),a=[];for(var A in e[r]){var o=e[r][A];try{o[0].apply(t,n)}catch(s){wt.console&&hr.error("jsPDF PubSub Error",s.message,s)}o[1]&&a.push(A)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function oh(t){if(!(this instanceof oh))return new oh(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function gv(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function fo(t,e,r,n,a){if(!(this instanceof fo))return new fo(t,e,r,n,a);this.type=t==="axial"?2:3,this.coords=e,this.colors=r,gv.call(this,n,a)}function cs(t,e,r,n,a){if(!(this instanceof cs))return new cs(t,e,r,n,a);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,gv.call(this,n,a)}function Bt(t){var e,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],a=arguments[2],A=arguments[3],o=[],s=1,l=16,c="S",u=null;Xt(t=t||{})==="object"&&(r=t.orientation,n=t.unit||n,a=t.format||a,A=t.compress||t.compressPdf||A,(u=t.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),s=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(e=t.precision),t.floatPrecision!==void 0&&(l=t.floatPrecision),c=t.defaultPathOperation||"S"),o=t.filters||(A===!0?["FlateEncode"]:o),n=n||"mm",r=(""+(r||"P")).toLowerCase();var p=t.putOnlyUsedFonts||!1,h={},d={internal:{},__private__:{}};d.__private__.PubSub=dv;var w="1.3",g=d.__private__.getPdfVersion=function(){return w};d.__private__.setPdfVersion=function(C){w=C};var y={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return y};var m=d.__private__.getPageFormat=function(C){return y[C]};a=a||"a4";var F={COMPAT:"compat",ADVANCED:"advanced"},N=F.COMPAT;function Q(){this.saveGraphicsState(),te(new gt(tt,0,0,-tt,0,Wi()*tt).toString()+" cm"),this.setFontSize(this.getFontSize()/tt),c="n",N=F.ADVANCED}function z(){this.restoreGraphicsState(),c="S",N=F.COMPAT}var R=d.__private__.combineFontStyleAndFontWeight=function(C,M){if(C=="bold"&&M=="normal"||C=="bold"&&M==400||C=="normal"&&M=="italic"||C=="bold"&&M=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return M&&(C=M==400||M==="normal"?C==="italic"?"italic":"normal":M!=700&&M!=="bold"||C!=="normal"?(M==700?"bold":M)+""+C:"bold"),C};d.advancedAPI=function(C){var M=N===F.COMPAT;return M&&Q.call(this),typeof C!="function"||(C(this),M&&z.call(this)),this},d.compatAPI=function(C){var M=N===F.ADVANCED;return M&&z.call(this),typeof C!="function"||(C(this),M&&Q.call(this)),this},d.isAdvancedAPI=function(){return N===F.ADVANCED};var I,U=function(C){if(N!==F.ADVANCED)throw new Error(C+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},O=d.roundToPrecision=d.__private__.roundToPrecision=function(C,M){var ce=e||M;if(isNaN(C)||isNaN(ce))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return C.toFixed(ce).replace(/0+$/,"")};I=d.hpf=d.__private__.hpf=typeof l=="number"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return O(C,l)}:l==="smart"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return O(C,C>-1&&C<1?16:5)}:function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return O(C,16)};var q=d.f2=d.__private__.f2=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f2");return O(C,2)},T=d.__private__.f3=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f3");return O(C,3)},L=d.scale=d.__private__.scale=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.scale");return N===F.COMPAT?C*tt:N===F.ADVANCED?C:void 0},G=function(C){return N===F.COMPAT?Wi()-C:N===F.ADVANCED?C:void 0},Y=function(C){return L(G(C))};d.__private__.setPrecision=d.setPrecision=function(C){typeof parseInt(C,10)=="number"&&(e=parseInt(C,10))};var se,he="00000000000000000000000000000000",ge=d.__private__.getFileId=function(){return he},re=d.__private__.setFileId=function(C){return he=C!==void 0&&/^[a-fA-F0-9]{32}$/.test(C)?C.toUpperCase():he.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(Rn=new ss(u.userPermissions,u.userPassword,u.ownerPassword,he)),he};d.setFileId=function(C){return re(C),this},d.getFileId=function(){return ge()};var le=d.__private__.convertDateToPDFDate=function(C){var M=C.getTimezoneOffset(),ce=M<0?"+":"-",me=Math.floor(Math.abs(M/60)),_e=Math.abs(M%60),Qe=[ce,B(me),"'",B(_e),"'"].join("");return["D:",C.getFullYear(),B(C.getMonth()+1),B(C.getDate()),B(C.getHours()),B(C.getMinutes()),B(C.getSeconds()),Qe].join("")},fe=d.__private__.convertPDFDateToDate=function(C){var M=parseInt(C.substr(2,4),10),ce=parseInt(C.substr(6,2),10)-1,me=parseInt(C.substr(8,2),10),_e=parseInt(C.substr(10,2),10),Qe=parseInt(C.substr(12,2),10),Xe=parseInt(C.substr(14,2),10);return new Date(M,ce,me,_e,Qe,Xe,0)},Ue=d.__private__.setCreationDate=function(C){var M;if(C===void 0&&(C=new Date),C instanceof Date)M=le(C);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(C))throw new Error("Invalid argument passed to jsPDF.setCreationDate");M=C}return se=M},b=d.__private__.getCreationDate=function(C){var M=se;return C==="jsDate"&&(M=fe(se)),M};d.setCreationDate=function(C){return Ue(C),this},d.getCreationDate=function(C){return b(C)};var _,B=d.__private__.padd2=function(C){return("0"+parseInt(C)).slice(-2)},x=d.__private__.padd2Hex=function(C){return("00"+(C=C.toString())).substr(C.length)},S=0,D=[],W=[],ue=0,Ce=[],de=[],ke=!1,ne=W,Ee=function(){S=0,ue=0,W=[],D=[],Ce=[],Z=br(),ee=br()};d.__private__.setCustomOutputDestination=function(C){ke=!0,ne=C};var xe=function(C){ke||(ne=C)};d.__private__.resetCustomOutputDestination=function(){ke=!1,ne=W};var te=d.__private__.out=function(C){return C=C.toString(),ue+=C.length+1,ne.push(C),ne},Pe=d.__private__.write=function(C){return te(arguments.length===1?C.toString():Array.prototype.join.call(arguments," "))},rt=d.__private__.getArrayBuffer=function(C){for(var M=C.length,ce=new ArrayBuffer(M),me=new Uint8Array(ce);M--;)me[M]=C.charCodeAt(M);return ce},Ve=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return Ve};var We=t.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(C){return We=N===F.ADVANCED?C/tt:C,this};var Ye,Je=d.__private__.getFontSize=d.getFontSize=function(){return N===F.COMPAT?We:We*tt},ot=t.R2L||!1;d.__private__.setR2L=d.setR2L=function(C){return ot=C,this},d.__private__.getR2L=d.getR2L=function(){return ot};var at,ft=d.__private__.setZoomMode=function(C){var M=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(C))Ye=C;else if(isNaN(C)){if(M.indexOf(C)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+C+'" is not recognized.');Ye=C}else Ye=parseInt(C,10)};d.__private__.getZoomMode=function(){return Ye};var yt,kt=d.__private__.setPageMode=function(C){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(C)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+C+'" is not recognized.');at=C};d.__private__.getPageMode=function(){return at};var Nt=d.__private__.setLayoutMode=function(C){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(C)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+C+'" is not recognized.');yt=C};d.__private__.getLayoutMode=function(){return yt},d.__private__.setDisplayMode=d.setDisplayMode=function(C,M,ce){return ft(C),Nt(M),kt(ce),this};var dt={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(C){if(Object.keys(dt).indexOf(C)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return dt[C]},d.__private__.getDocumentProperties=function(){return dt},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(C){for(var M in dt)dt.hasOwnProperty(M)&&C[M]&&(dt[M]=C[M]);return this},d.__private__.setDocumentProperty=function(C,M){if(Object.keys(dt).indexOf(C)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return dt[C]=M};var xt,tt,ir,Lt,fr,Qt={},Kt={},Jr=[],Rt={},_r={},Yt={},on={},Et=null,Gt=0,bt=[],$t=new dv(d),xa=t.hotfixes||[],Ir={},Yn={},oa=[],gt=function C(M,ce,me,_e,Qe,Xe){if(!(this instanceof C))return new C(M,ce,me,_e,Qe,Xe);isNaN(M)&&(M=1),isNaN(ce)&&(ce=0),isNaN(me)&&(me=0),isNaN(_e)&&(_e=1),isNaN(Qe)&&(Qe=0),isNaN(Xe)&&(Xe=0),this._matrix=[M,ce,me,_e,Qe,Xe]};Object.defineProperty(gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(C){this._matrix[0]=C}}),Object.defineProperty(gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(C){this._matrix[1]=C}}),Object.defineProperty(gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(C){this._matrix[2]=C}}),Object.defineProperty(gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(C){this._matrix[3]=C}}),Object.defineProperty(gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(C){this._matrix[4]=C}}),Object.defineProperty(gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(C){this._matrix[5]=C}}),Object.defineProperty(gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(C){this._matrix[0]=C}}),Object.defineProperty(gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(C){this._matrix[1]=C}}),Object.defineProperty(gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(C){this._matrix[2]=C}}),Object.defineProperty(gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(C){this._matrix[3]=C}}),Object.defineProperty(gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(C){this._matrix[4]=C}}),Object.defineProperty(gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(C){this._matrix[5]=C}}),Object.defineProperty(gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),gt.prototype.join=function(C){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(I).join(C)},gt.prototype.multiply=function(C){var M=C.sx*this.sx+C.shy*this.shx,ce=C.sx*this.shy+C.shy*this.sy,me=C.shx*this.sx+C.sy*this.shx,_e=C.shx*this.shy+C.sy*this.sy,Qe=C.tx*this.sx+C.ty*this.shx+this.tx,Xe=C.tx*this.shy+C.ty*this.sy+this.ty;return new gt(M,ce,me,_e,Qe,Xe)},gt.prototype.decompose=function(){var C=this.sx,M=this.shy,ce=this.shx,me=this.sy,_e=this.tx,Qe=this.ty,Xe=Math.sqrt(C*C+M*M),st=(C/=Xe)*ce+(M/=Xe)*me;ce-=C*st,me-=M*st;var mt=Math.sqrt(ce*ce+me*me);return st/=mt,C*(me/=mt)<M*(ce/=mt)&&(C=-C,M=-M,st=-st,Xe=-Xe),{scale:new gt(Xe,0,0,mt,0,0),translate:new gt(1,0,0,1,_e,Qe),rotate:new gt(C,M,-M,C,0,0),skew:new gt(1,0,st,1,0,0)}},gt.prototype.toString=function(C){return this.join(" ")},gt.prototype.inversed=function(){var C=this.sx,M=this.shy,ce=this.shx,me=this.sy,_e=this.tx,Qe=this.ty,Xe=1/(C*me-M*ce),st=me*Xe,mt=-M*Xe,Ut=-ce*Xe,Mt=C*Xe;return new gt(st,mt,Ut,Mt,-st*_e-Ut*Qe,-mt*_e-Mt*Qe)},gt.prototype.applyToPoint=function(C){var M=C.x*this.sx+C.y*this.shx+this.tx,ce=C.x*this.shy+C.y*this.sy+this.ty;return new rl(M,ce)},gt.prototype.applyToRectangle=function(C){var M=this.applyToPoint(C),ce=this.applyToPoint(new rl(C.x+C.w,C.y+C.h));return new zc(M.x,M.y,ce.x-M.x,ce.y-M.y)},gt.prototype.clone=function(){var C=this.sx,M=this.shy,ce=this.shx,me=this.sy,_e=this.tx,Qe=this.ty;return new gt(C,M,ce,me,_e,Qe)},d.Matrix=gt;var Fn=d.matrixMult=function(C,M){return M.multiply(C)},Mn=new gt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=Mn;var mr=function(C,M){if(!_r[C]){var ce=(M instanceof fo?"Sh":"P")+(Object.keys(Rt).length+1).toString(10);M.id=ce,_r[C]=ce,Rt[ce]=M,$t.publish("addPattern",M)}};d.ShadingPattern=fo,d.TilingPattern=cs,d.addShadingPattern=function(C,M){return U("addShadingPattern()"),mr(C,M),this},d.beginTilingPattern=function(C){U("beginTilingPattern()"),f0(C.boundingBox[0],C.boundingBox[1],C.boundingBox[2]-C.boundingBox[0],C.boundingBox[3]-C.boundingBox[1],C.matrix)},d.endTilingPattern=function(C,M){U("endTilingPattern()"),M.stream=de[_].join(`
100
+ */var fv={print:4,modify:8,copy:16,"annot-forms":32};function ss(t,e,r,n){this.v=1,this.r=2;var a=192;t.forEach(function(s){if(fv.perm!==void 0)throw new Error("Invalid permission: "+s);a+=fv[s]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var A=(e+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(A,o),this.P=-(1+(255^a)),this.encryptionKey=jd(A+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Wd(this.encryptionKey,this.padding)}function ls(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,n=0;n<r;n++){var a=t.charCodeAt(n);a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?e+="#"+("0"+a.toString(16)).slice(-2):e+=t[n]}return e}function dv(t){if(Xt(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(r,n,a){if(a=a||!1,typeof r!="string"||typeof n!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(r)||(e[r]={});var A=Math.random().toString(35);return e[r][A]=[n,!!a],A},this.unsubscribe=function(r){for(var n in e)if(e[n][r])return delete e[n][r],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(r){if(e.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),a=[];for(var A in e[r]){var o=e[r][A];try{o[0].apply(t,n)}catch(s){wt.console&&hr.error("jsPDF PubSub Error",s.message,s)}o[1]&&a.push(A)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function oh(t){if(!(this instanceof oh))return new oh(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function gv(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function fo(t,e,r,n,a){if(!(this instanceof fo))return new fo(t,e,r,n,a);this.type=t==="axial"?2:3,this.coords=e,this.colors=r,gv.call(this,n,a)}function cs(t,e,r,n,a){if(!(this instanceof cs))return new cs(t,e,r,n,a);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,gv.call(this,n,a)}function Bt(t){var e,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],a=arguments[2],A=arguments[3],o=[],s=1,l=16,c="S",u=null;Xt(t=t||{})==="object"&&(r=t.orientation,n=t.unit||n,a=t.format||a,A=t.compress||t.compressPdf||A,(u=t.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),s=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(e=t.precision),t.floatPrecision!==void 0&&(l=t.floatPrecision),c=t.defaultPathOperation||"S"),o=t.filters||(A===!0?["FlateEncode"]:o),n=n||"mm",r=(""+(r||"P")).toLowerCase();var p=t.putOnlyUsedFonts||!1,h={},d={internal:{},__private__:{}};d.__private__.PubSub=dv;var w="1.3",g=d.__private__.getPdfVersion=function(){return w};d.__private__.setPdfVersion=function(C){w=C};var y={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return y};var m=d.__private__.getPageFormat=function(C){return y[C]};a=a||"a4";var F={COMPAT:"compat",ADVANCED:"advanced"},N=F.COMPAT;function Q(){this.saveGraphicsState(),te(new gt(tt,0,0,-tt,0,Wi()*tt).toString()+" cm"),this.setFontSize(this.getFontSize()/tt),c="n",N=F.ADVANCED}function z(){this.restoreGraphicsState(),c="S",N=F.COMPAT}var R=d.__private__.combineFontStyleAndFontWeight=function(C,M){if(C=="bold"&&M=="normal"||C=="bold"&&M==400||C=="normal"&&M=="italic"||C=="bold"&&M=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return M&&(C=M==400||M==="normal"?C==="italic"?"italic":"normal":M!=700&&M!=="bold"||C!=="normal"?(M==700?"bold":M)+""+C:"bold"),C};d.advancedAPI=function(C){var M=N===F.COMPAT;return M&&Q.call(this),typeof C!="function"||(C(this),M&&z.call(this)),this},d.compatAPI=function(C){var M=N===F.ADVANCED;return M&&z.call(this),typeof C!="function"||(C(this),M&&Q.call(this)),this},d.isAdvancedAPI=function(){return N===F.ADVANCED};var I,U=function(C){if(N!==F.ADVANCED)throw new Error(C+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},O=d.roundToPrecision=d.__private__.roundToPrecision=function(C,M){var ce=e||M;if(isNaN(C)||isNaN(ce))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return C.toFixed(ce).replace(/0+$/,"")};I=d.hpf=d.__private__.hpf=typeof l=="number"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return O(C,l)}:l==="smart"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return O(C,C>-1&&C<1?16:5)}:function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return O(C,16)};var q=d.f2=d.__private__.f2=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f2");return O(C,2)},T=d.__private__.f3=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f3");return O(C,3)},L=d.scale=d.__private__.scale=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.scale");return N===F.COMPAT?C*tt:N===F.ADVANCED?C:void 0},G=function(C){return N===F.COMPAT?Wi()-C:N===F.ADVANCED?C:void 0},Y=function(C){return L(G(C))};d.__private__.setPrecision=d.setPrecision=function(C){typeof parseInt(C,10)=="number"&&(e=parseInt(C,10))};var se,he="00000000000000000000000000000000",ge=d.__private__.getFileId=function(){return he},re=d.__private__.setFileId=function(C){return he=C!==void 0&&/^[a-fA-F0-9]{32}$/.test(C)?C.toUpperCase():he.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(Rn=new ss(u.userPermissions,u.userPassword,u.ownerPassword,he)),he};d.setFileId=function(C){return re(C),this},d.getFileId=function(){return ge()};var le=d.__private__.convertDateToPDFDate=function(C){var M=C.getTimezoneOffset(),ce=M<0?"+":"-",me=Math.floor(Math.abs(M/60)),_e=Math.abs(M%60),Qe=[ce,B(me),"'",B(_e),"'"].join("");return["D:",C.getFullYear(),B(C.getMonth()+1),B(C.getDate()),B(C.getHours()),B(C.getMinutes()),B(C.getSeconds()),Qe].join("")},fe=d.__private__.convertPDFDateToDate=function(C){var M=parseInt(C.substr(2,4),10),ce=parseInt(C.substr(6,2),10)-1,me=parseInt(C.substr(8,2),10),_e=parseInt(C.substr(10,2),10),Qe=parseInt(C.substr(12,2),10),Xe=parseInt(C.substr(14,2),10);return new Date(M,ce,me,_e,Qe,Xe,0)},Ue=d.__private__.setCreationDate=function(C){var M;if(C===void 0&&(C=new Date),C instanceof Date)M=le(C);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(C))throw new Error("Invalid argument passed to jsPDF.setCreationDate");M=C}return se=M},b=d.__private__.getCreationDate=function(C){var M=se;return C==="jsDate"&&(M=fe(se)),M};d.setCreationDate=function(C){return Ue(C),this},d.getCreationDate=function(C){return b(C)};var _,B=d.__private__.padd2=function(C){return("0"+parseInt(C)).slice(-2)},x=d.__private__.padd2Hex=function(C){return("00"+(C=C.toString())).substr(C.length)},S=0,D=[],W=[],ue=0,Ce=[],de=[],ke=!1,ne=W,Ee=function(){S=0,ue=0,W=[],D=[],Ce=[],Z=br(),ee=br()};d.__private__.setCustomOutputDestination=function(C){ke=!0,ne=C};var xe=function(C){ke||(ne=C)};d.__private__.resetCustomOutputDestination=function(){ke=!1,ne=W};var te=d.__private__.out=function(C){return C=C.toString(),ue+=C.length+1,ne.push(C),ne},Pe=d.__private__.write=function(C){return te(arguments.length===1?C.toString():Array.prototype.join.call(arguments," "))},rt=d.__private__.getArrayBuffer=function(C){for(var M=C.length,ce=new ArrayBuffer(M),me=new Uint8Array(ce);M--;)me[M]=C.charCodeAt(M);return ce},Ve=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return Ve};var We=t.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(C){return We=N===F.ADVANCED?C/tt:C,this};var Ye,Je=d.__private__.getFontSize=d.getFontSize=function(){return N===F.COMPAT?We:We*tt},ot=t.R2L||!1;d.__private__.setR2L=d.setR2L=function(C){return ot=C,this},d.__private__.getR2L=d.getR2L=function(){return ot};var at,ft=d.__private__.setZoomMode=function(C){var M=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(C))Ye=C;else if(isNaN(C)){if(M.indexOf(C)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+C+'" is not recognized.');Ye=C}else Ye=parseInt(C,10)};d.__private__.getZoomMode=function(){return Ye};var yt,kt=d.__private__.setPageMode=function(C){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(C)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+C+'" is not recognized.');at=C};d.__private__.getPageMode=function(){return at};var Nt=d.__private__.setLayoutMode=function(C){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(C)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+C+'" is not recognized.');yt=C};d.__private__.getLayoutMode=function(){return yt},d.__private__.setDisplayMode=d.setDisplayMode=function(C,M,ce){return ft(C),Nt(M),kt(ce),this};var dt={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(C){if(Object.keys(dt).indexOf(C)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return dt[C]},d.__private__.getDocumentProperties=function(){return dt},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(C){for(var M in dt)dt.hasOwnProperty(M)&&C[M]&&(dt[M]=C[M]);return this},d.__private__.setDocumentProperty=function(C,M){if(Object.keys(dt).indexOf(C)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return dt[C]=M};var xt,tt,ir,Lt,fr,Qt={},Kt={},Jr=[],Rt={},_r={},Yt={},on={},_t=null,Gt=0,bt=[],$t=new dv(d),xa=t.hotfixes||[],Ir={},Yn={},oa=[],gt=function C(M,ce,me,_e,Qe,Xe){if(!(this instanceof C))return new C(M,ce,me,_e,Qe,Xe);isNaN(M)&&(M=1),isNaN(ce)&&(ce=0),isNaN(me)&&(me=0),isNaN(_e)&&(_e=1),isNaN(Qe)&&(Qe=0),isNaN(Xe)&&(Xe=0),this._matrix=[M,ce,me,_e,Qe,Xe]};Object.defineProperty(gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(C){this._matrix[0]=C}}),Object.defineProperty(gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(C){this._matrix[1]=C}}),Object.defineProperty(gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(C){this._matrix[2]=C}}),Object.defineProperty(gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(C){this._matrix[3]=C}}),Object.defineProperty(gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(C){this._matrix[4]=C}}),Object.defineProperty(gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(C){this._matrix[5]=C}}),Object.defineProperty(gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(C){this._matrix[0]=C}}),Object.defineProperty(gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(C){this._matrix[1]=C}}),Object.defineProperty(gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(C){this._matrix[2]=C}}),Object.defineProperty(gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(C){this._matrix[3]=C}}),Object.defineProperty(gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(C){this._matrix[4]=C}}),Object.defineProperty(gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(C){this._matrix[5]=C}}),Object.defineProperty(gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),gt.prototype.join=function(C){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(I).join(C)},gt.prototype.multiply=function(C){var M=C.sx*this.sx+C.shy*this.shx,ce=C.sx*this.shy+C.shy*this.sy,me=C.shx*this.sx+C.sy*this.shx,_e=C.shx*this.shy+C.sy*this.sy,Qe=C.tx*this.sx+C.ty*this.shx+this.tx,Xe=C.tx*this.shy+C.ty*this.sy+this.ty;return new gt(M,ce,me,_e,Qe,Xe)},gt.prototype.decompose=function(){var C=this.sx,M=this.shy,ce=this.shx,me=this.sy,_e=this.tx,Qe=this.ty,Xe=Math.sqrt(C*C+M*M),st=(C/=Xe)*ce+(M/=Xe)*me;ce-=C*st,me-=M*st;var mt=Math.sqrt(ce*ce+me*me);return st/=mt,C*(me/=mt)<M*(ce/=mt)&&(C=-C,M=-M,st=-st,Xe=-Xe),{scale:new gt(Xe,0,0,mt,0,0),translate:new gt(1,0,0,1,_e,Qe),rotate:new gt(C,M,-M,C,0,0),skew:new gt(1,0,st,1,0,0)}},gt.prototype.toString=function(C){return this.join(" ")},gt.prototype.inversed=function(){var C=this.sx,M=this.shy,ce=this.shx,me=this.sy,_e=this.tx,Qe=this.ty,Xe=1/(C*me-M*ce),st=me*Xe,mt=-M*Xe,Ut=-ce*Xe,Mt=C*Xe;return new gt(st,mt,Ut,Mt,-st*_e-Ut*Qe,-mt*_e-Mt*Qe)},gt.prototype.applyToPoint=function(C){var M=C.x*this.sx+C.y*this.shx+this.tx,ce=C.x*this.shy+C.y*this.sy+this.ty;return new rl(M,ce)},gt.prototype.applyToRectangle=function(C){var M=this.applyToPoint(C),ce=this.applyToPoint(new rl(C.x+C.w,C.y+C.h));return new zc(M.x,M.y,ce.x-M.x,ce.y-M.y)},gt.prototype.clone=function(){var C=this.sx,M=this.shy,ce=this.shx,me=this.sy,_e=this.tx,Qe=this.ty;return new gt(C,M,ce,me,_e,Qe)},d.Matrix=gt;var Fn=d.matrixMult=function(C,M){return M.multiply(C)},Mn=new gt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=Mn;var mr=function(C,M){if(!_r[C]){var ce=(M instanceof fo?"Sh":"P")+(Object.keys(Rt).length+1).toString(10);M.id=ce,_r[C]=ce,Rt[ce]=M,$t.publish("addPattern",M)}};d.ShadingPattern=fo,d.TilingPattern=cs,d.addShadingPattern=function(C,M){return U("addShadingPattern()"),mr(C,M),this},d.beginTilingPattern=function(C){U("beginTilingPattern()"),f0(C.boundingBox[0],C.boundingBox[1],C.boundingBox[2]-C.boundingBox[0],C.boundingBox[3]-C.boundingBox[1],C.matrix)},d.endTilingPattern=function(C,M){U("endTilingPattern()"),M.stream=de[_].join(`
101
101
  `),mr(C,M),$t.publish("endTilingPattern",M),oa.pop().restore()};var xr=d.__private__.newObject=function(){var C=br();return H(C,!0),C},br=d.__private__.newObjectDeferred=function(){return S++,D[S]=function(){return ue},S},H=function(C,M){return M=typeof M=="boolean"&&M,D[C]=ue,M&&te(C+" 0 obj"),C},ie=d.__private__.newAdditionalObject=function(){var C={objId:br(),content:""};return Ce.push(C),C},Z=br(),ee=br(),Ae=d.__private__.decodeColorString=function(C){var M=C.split(" ");if(M.length!==2||M[1]!=="g"&&M[1]!=="G")M.length===5&&(M[4]==="k"||M[4]==="K")&&(M=[(1-M[0])*(1-M[3]),(1-M[1])*(1-M[3]),(1-M[2])*(1-M[3]),"r"]);else{var ce=parseFloat(M[0]);M=[ce,ce,ce,"r"]}for(var me="#",_e=0;_e<3;_e++)me+=("0"+Math.floor(255*parseFloat(M[_e])).toString(16)).slice(-2);return me},oe=d.__private__.encodeColorString=function(C){var M;typeof C=="string"&&(C={ch1:C});var ce=C.ch1,me=C.ch2,_e=C.ch3,Qe=C.ch4,Xe=C.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof ce=="string"&&ce.charAt(0)!=="#"){var st=new cv(ce);if(st.ok)ce=st.toHex();else if(!/^\d*\.?\d*$/.test(ce))throw new Error('Invalid color "'+ce+'" passed to jsPDF.encodeColorString.')}if(typeof ce=="string"&&/^#[0-9A-Fa-f]{3}$/.test(ce)&&(ce="#"+ce[1]+ce[1]+ce[2]+ce[2]+ce[3]+ce[3]),typeof ce=="string"&&/^#[0-9A-Fa-f]{6}$/.test(ce)){var mt=parseInt(ce.substr(1),16);ce=mt>>16&255,me=mt>>8&255,_e=255&mt}if(me===void 0||Qe===void 0&&ce===me&&me===_e)if(typeof ce=="string")M=ce+" "+Xe[0];else switch(C.precision){case 2:M=q(ce/255)+" "+Xe[0];break;case 3:default:M=T(ce/255)+" "+Xe[0]}else if(Qe===void 0||Xt(Qe)==="object"){if(Qe&&!isNaN(Qe.a)&&Qe.a===0)return M=["1.","1.","1.",Xe[1]].join(" ");if(typeof ce=="string")M=[ce,me,_e,Xe[1]].join(" ");else switch(C.precision){case 2:M=[q(ce/255),q(me/255),q(_e/255),Xe[1]].join(" ");break;default:case 3:M=[T(ce/255),T(me/255),T(_e/255),Xe[1]].join(" ")}}else if(typeof ce=="string")M=[ce,me,_e,Qe,Xe[2]].join(" ");else switch(C.precision){case 2:M=[q(ce),q(me),q(_e),q(Qe),Xe[2]].join(" ");break;case 3:default:M=[T(ce),T(me),T(_e),T(Qe),Xe[2]].join(" ")}return M},Se=d.__private__.getFilters=function(){return o},Ie=d.__private__.putStream=function(C){var M=(C=C||{}).data||"",ce=C.filters||Se(),me=C.alreadyAppliedFilters||[],_e=C.addLength1||!1,Qe=M.length,Xe=C.objectId,st=function(Hn){return Hn};if(u!==null&&Xe===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(st=Rn.encryptor(Xe,0));var mt={};ce===!0&&(ce=["FlateEncode"]);var Ut=C.additionalKeyValues||[],Mt=(mt=Bt.API.processDataByFilters!==void 0?Bt.API.processDataByFilters(M,ce):{data:M,reverseChain:[]}).reverseChain+(Array.isArray(me)?me.join(" "):me.toString());if(mt.data.length!==0&&(Ut.push({key:"Length",value:mt.data.length}),_e===!0&&Ut.push({key:"Length1",value:Qe})),Mt.length!=0)if(Mt.split("/").length-1==1)Ut.push({key:"Filter",value:Mt});else{Ut.push({key:"Filter",value:"["+Mt+"]"});for(var jt=0;jt<Ut.length;jt+=1)if(Ut[jt].key==="DecodeParms"){for(var Fr=[],Dr=0;Dr<mt.reverseChain.split("/").length-1;Dr+=1)Fr.push("null");Fr.push(Ut[jt].value),Ut[jt].value="["+Fr.join(" ")+"]"}}te("<<");for(var Zr=0;Zr<Ut.length;Zr++)te("/"+Ut[Zr].key+" "+Ut[Zr].value);te(">>"),mt.data.length!==0&&(te("stream"),te(st(mt.data)),te("endstream"))},Fe=d.__private__.putPage=function(C){var M=C.number,ce=C.data,me=C.objId,_e=C.contentsObjId;H(me,!0),te("<</Type /Page"),te("/Parent "+C.rootDictionaryObjId+" 0 R"),te("/Resources "+C.resourceDictionaryObjId+" 0 R"),te("/MediaBox ["+parseFloat(I(C.mediaBox.bottomLeftX))+" "+parseFloat(I(C.mediaBox.bottomLeftY))+" "+I(C.mediaBox.topRightX)+" "+I(C.mediaBox.topRightY)+"]"),C.cropBox!==null&&te("/CropBox ["+I(C.cropBox.bottomLeftX)+" "+I(C.cropBox.bottomLeftY)+" "+I(C.cropBox.topRightX)+" "+I(C.cropBox.topRightY)+"]"),C.bleedBox!==null&&te("/BleedBox ["+I(C.bleedBox.bottomLeftX)+" "+I(C.bleedBox.bottomLeftY)+" "+I(C.bleedBox.topRightX)+" "+I(C.bleedBox.topRightY)+"]"),C.trimBox!==null&&te("/TrimBox ["+I(C.trimBox.bottomLeftX)+" "+I(C.trimBox.bottomLeftY)+" "+I(C.trimBox.topRightX)+" "+I(C.trimBox.topRightY)+"]"),C.artBox!==null&&te("/ArtBox ["+I(C.artBox.bottomLeftX)+" "+I(C.artBox.bottomLeftY)+" "+I(C.artBox.topRightX)+" "+I(C.artBox.topRightY)+"]"),typeof C.userUnit=="number"&&C.userUnit!==1&&te("/UserUnit "+C.userUnit),$t.publish("putPage",{objId:me,pageContext:bt[M],pageNumber:M,page:ce}),te("/Contents "+_e+" 0 R"),te(">>"),te("endobj");var Qe=ce.join(`
102
102
  `);return N===F.ADVANCED&&(Qe+=`
103
103
  Q`),H(_e,!0),Ie({data:Qe,filters:Se(),objectId:_e}),te("endobj"),me},pe=d.__private__.putPages=function(){var C,M,ce=[];for(C=1;C<=Gt;C++)bt[C].objId=br(),bt[C].contentsObjId=br();for(C=1;C<=Gt;C++)ce.push(Fe({number:C,data:de[C],objId:bt[C].objId,contentsObjId:bt[C].contentsObjId,mediaBox:bt[C].mediaBox,cropBox:bt[C].cropBox,bleedBox:bt[C].bleedBox,trimBox:bt[C].trimBox,artBox:bt[C].artBox,userUnit:bt[C].userUnit,rootDictionaryObjId:Z,resourceDictionaryObjId:ee}));H(Z,!0),te("<</Type /Pages");var me="/Kids [";for(M=0;M<Gt;M++)me+=ce[M]+" 0 R ";te(me+"]"),te("/Count "+Gt),te(">>"),te("endobj"),$t.publish("postPutPages")},X=function(C){$t.publish("putFont",{font:C,out:te,newObject:xr,putStream:Ie}),C.isAlreadyPutted!==!0&&(C.objectNumber=xr(),te("<<"),te("/Type /Font"),te("/BaseFont /"+ls(C.postScriptName)),te("/Subtype /Type1"),typeof C.encoding=="string"&&te("/Encoding /"+C.encoding),te("/FirstChar 32"),te("/LastChar 255"),te(">>"),te("endobj"))},we=function(){for(var C in Qt)Qt.hasOwnProperty(C)&&(p===!1||p===!0&&h.hasOwnProperty(C))&&X(Qt[C])},Le=function(C){C.objectNumber=xr();var M=[];M.push({key:"Type",value:"/XObject"}),M.push({key:"Subtype",value:"/Form"}),M.push({key:"BBox",value:"["+[I(C.x),I(C.y),I(C.x+C.width),I(C.y+C.height)].join(" ")+"]"}),M.push({key:"Matrix",value:"["+C.matrix.toString()+"]"});var ce=C.pages[1].join(`
104
104
  `);Ie({data:ce,additionalKeyValues:M,objectId:C.objectNumber}),te("endobj")},Ke=function(){for(var C in Ir)Ir.hasOwnProperty(C)&&Le(Ir[C])},ze=function(C,M){var ce,me=[],_e=1/(M-1);for(ce=0;ce<1;ce+=_e)me.push(ce);if(me.push(1),C[0].offset!=0){var Qe={offset:0,color:C[0].color};C.unshift(Qe)}if(C[C.length-1].offset!=1){var Xe={offset:1,color:C[C.length-1].color};C.push(Xe)}for(var st="",mt=0,Ut=0;Ut<me.length;Ut++){for(ce=me[Ut];ce>C[mt+1].offset;)mt++;var Mt=C[mt].offset,jt=(ce-Mt)/(C[mt+1].offset-Mt),Fr=C[mt].color,Dr=C[mt+1].color;st+=x(Math.round((1-jt)*Fr[0]+jt*Dr[0]).toString(16))+x(Math.round((1-jt)*Fr[1]+jt*Dr[1]).toString(16))+x(Math.round((1-jt)*Fr[2]+jt*Dr[2]).toString(16))}return st.trim()},qe=function(C,M){M||(M=21);var ce=xr(),me=ze(C.colors,M),_e=[];_e.push({key:"FunctionType",value:"0"}),_e.push({key:"Domain",value:"[0.0 1.0]"}),_e.push({key:"Size",value:"["+M+"]"}),_e.push({key:"BitsPerSample",value:"8"}),_e.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),_e.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ie({data:me,additionalKeyValues:_e,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:ce}),te("endobj"),C.objectNumber=xr(),te("<< /ShadingType "+C.type),te("/ColorSpace /DeviceRGB");var Qe="/Coords ["+I(parseFloat(C.coords[0]))+" "+I(parseFloat(C.coords[1]))+" ";C.type===2?Qe+=I(parseFloat(C.coords[2]))+" "+I(parseFloat(C.coords[3])):Qe+=I(parseFloat(C.coords[2]))+" "+I(parseFloat(C.coords[3]))+" "+I(parseFloat(C.coords[4]))+" "+I(parseFloat(C.coords[5])),te(Qe+="]"),C.matrix&&te("/Matrix ["+C.matrix.toString()+"]"),te("/Function "+ce+" 0 R"),te("/Extend [true true]"),te(">>"),te("endobj")},ut=function(C,M){var ce=br(),me=xr();M.push({resourcesOid:ce,objectOid:me}),C.objectNumber=me;var _e=[];_e.push({key:"Type",value:"/Pattern"}),_e.push({key:"PatternType",value:"1"}),_e.push({key:"PaintType",value:"1"}),_e.push({key:"TilingType",value:"1"}),_e.push({key:"BBox",value:"["+C.boundingBox.map(I).join(" ")+"]"}),_e.push({key:"XStep",value:I(C.xStep)}),_e.push({key:"YStep",value:I(C.yStep)}),_e.push({key:"Resources",value:ce+" 0 R"}),C.matrix&&_e.push({key:"Matrix",value:"["+C.matrix.toString()+"]"}),Ie({data:C.stream,additionalKeyValues:_e,objectId:C.objectNumber}),te("endobj")},zt=function(C){var M;for(M in Rt)Rt.hasOwnProperty(M)&&(Rt[M]instanceof fo?qe(Rt[M]):Rt[M]instanceof cs&&ut(Rt[M],C))},Ct=function(C){for(var M in C.objectNumber=xr(),te("<<"),C)switch(M){case"opacity":te("/ca "+q(C[M]));break;case"stroke-opacity":te("/CA "+q(C[M]))}te(">>"),te("endobj")},Er=function(){var C;for(C in Yt)Yt.hasOwnProperty(C)&&Ct(Yt[C])},sa=function(){for(var C in te("/XObject <<"),Ir)Ir.hasOwnProperty(C)&&Ir[C].objectNumber>=0&&te("/"+C+" "+Ir[C].objectNumber+" 0 R");$t.publish("putXobjectDict"),te(">>")},IA=function(){Rn.oid=xr(),te("<<"),te("/Filter /Standard"),te("/V "+Rn.v),te("/R "+Rn.r),te("/U <"+Rn.toHexString(Rn.U)+">"),te("/O <"+Rn.toHexString(Rn.O)+">"),te("/P "+Rn.P),te(">>"),te("endobj")},DA=function(){for(var C in te("/Font <<"),Qt)Qt.hasOwnProperty(C)&&(p===!1||p===!0&&h.hasOwnProperty(C))&&te("/"+C+" "+Qt[C].objectNumber+" 0 R");te(">>")},lA=function(){if(Object.keys(Rt).length>0){for(var C in te("/Shading <<"),Rt)Rt.hasOwnProperty(C)&&Rt[C]instanceof fo&&Rt[C].objectNumber>=0&&te("/"+C+" "+Rt[C].objectNumber+" 0 R");$t.publish("putShadingPatternDict"),te(">>")}},QA=function(C){if(Object.keys(Rt).length>0){for(var M in te("/Pattern <<"),Rt)Rt.hasOwnProperty(M)&&Rt[M]instanceof d.TilingPattern&&Rt[M].objectNumber>=0&&Rt[M].objectNumber<C&&te("/"+M+" "+Rt[M].objectNumber+" 0 R");$t.publish("putTilingPatternDict"),te(">>")}},ba=function(){if(Object.keys(Yt).length>0){var C;for(C in te("/ExtGState <<"),Yt)Yt.hasOwnProperty(C)&&Yt[C].objectNumber>=0&&te("/"+C+" "+Yt[C].objectNumber+" 0 R");$t.publish("putGStateDict"),te(">>")}},zr=function(C){H(C.resourcesOid,!0),te("<<"),te("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),DA(),lA(),QA(C.objectOid),ba(),sa(),te(">>"),te("endobj")},Jf=function(){var C=[];we(),Er(),Ke(),zt(C),$t.publish("putResources"),C.forEach(zr),zr({resourcesOid:ee,objectOid:Number.MAX_SAFE_INTEGER}),$t.publish("postPutResources")},Zf=function(){$t.publish("putAdditionalObjects");for(var C=0;C<Ce.length;C++){var M=Ce[C];H(M.objId,!0),te(M.content),te("endobj")}$t.publish("postPutAdditionalObjects")},e0=function(C){Kt[C.fontName]=Kt[C.fontName]||{},Kt[C.fontName][C.fontStyle]=C.id},Dc=function(C,M,ce,me,_e){var Qe={id:"F"+(Object.keys(Qt).length+1).toString(10),postScriptName:C,fontName:M,fontStyle:ce,encoding:me,isStandardFont:_e||!1,metadata:{}};return $t.publish("addFont",{font:Qe,instance:this}),Qt[Qe.id]=Qe,e0(Qe),Qe.id},gm=function(C){for(var M=0,ce=Ve.length;M<ce;M++){var me=Dc.call(this,C[M][0],C[M][1],C[M][2],Ve[M][3],!0);p===!1&&(h[me]=!0);var _e=C[M][0].split("-");e0({id:me,fontName:_e[0],fontStyle:_e[1]||""})}$t.publish("addFonts",{fonts:Qt,dictionary:Kt})},cA=function(C){return C.foo=function(){try{return C.apply(this,arguments)}catch(me){var M=me.stack||"";~M.indexOf(" at ")&&(M=M.split(" at ")[1]);var ce="Error in function "+M.split(`
105
105
  `)[0].split("<")[0]+": "+me.message;if(!wt.console)throw new Error(ce);wt.console.error(ce,me),wt.alert&&alert(ce)}},C.foo.bar=C,C.foo},qs=function(C,M){var ce,me,_e,Qe,Xe,st,mt,Ut,Mt;if(_e=(M=M||{}).sourceEncoding||"Unicode",Xe=M.outputEncoding,(M.autoencode||Xe)&&Qt[xt].metadata&&Qt[xt].metadata[_e]&&Qt[xt].metadata[_e].encoding&&(Qe=Qt[xt].metadata[_e].encoding,!Xe&&Qt[xt].encoding&&(Xe=Qt[xt].encoding),!Xe&&Qe.codePages&&(Xe=Qe.codePages[0]),typeof Xe=="string"&&(Xe=Qe[Xe]),Xe)){for(mt=!1,st=[],ce=0,me=C.length;ce<me;ce++)(Ut=Xe[C.charCodeAt(ce)])?st.push(String.fromCharCode(Ut)):st.push(C[ce]),st[ce].charCodeAt(0)>>8&&(mt=!0);C=st.join("")}for(ce=C.length;mt===void 0&&ce!==0;)C.charCodeAt(ce-1)>>8&&(mt=!0),ce--;if(!mt)return C;for(st=M.noBOM?[]:[254,255],ce=0,me=C.length;ce<me;ce++){if((Mt=(Ut=C.charCodeAt(ce))>>8)>>8)throw new Error("Character at position "+ce+" of string '"+C+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");st.push(Mt),st.push(Ut-(Mt<<8))}return String.fromCharCode.apply(void 0,st)},la=d.__private__.pdfEscape=d.pdfEscape=function(C,M){return qs(C,M).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qc=d.__private__.beginPage=function(C){de[++Gt]=[],bt[Gt]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(C[0]),topRightY:Number(C[1])}},r0(Gt),xe(de[_])},t0=function(C,M){var ce,me,_e;switch(r=M||r,typeof C=="string"&&(ce=m(C.toLowerCase()),Array.isArray(ce)&&(me=ce[0],_e=ce[1])),Array.isArray(C)&&(me=C[0]*tt,_e=C[1]*tt),isNaN(me)&&(me=a[0],_e=a[1]),(me>14400||_e>14400)&&(hr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),me=Math.min(14400,me),_e=Math.min(14400,_e)),a=[me,_e],r.substr(0,1)){case"l":_e>me&&(a=[_e,me]);break;case"p":me>_e&&(a=[_e,me])}Qc(a),s0(Rc),te(uA),Vc!==0&&te(Vc+" J"),$c!==0&&te($c+" j"),$t.publish("addPage",{pageNumber:Gt})},pm=function(C){C>0&&C<=Gt&&(de.splice(C,1),bt.splice(C,1),Gt--,_>Gt&&(_=Gt),this.setPage(_))},r0=function(C){C>0&&C<=Gt&&(_=C)},mm=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return de.length-1},n0=function(C,M,ce){var me,_e=void 0;return ce=ce||{},C=C!==void 0?C:Qt[xt].fontName,M=M!==void 0?M:Qt[xt].fontStyle,me=C.toLowerCase(),Kt[me]!==void 0&&Kt[me][M]!==void 0?_e=Kt[me][M]:Kt[C]!==void 0&&Kt[C][M]!==void 0?_e=Kt[C][M]:ce.disableWarning===!1&&hr.warn("Unable to look up font label for font '"+C+"', '"+M+"'. Refer to getFontList() for available fonts."),_e||ce.noFallback||(_e=Kt.times[M])==null&&(_e=Kt.times.normal),_e},ym=d.__private__.putInfo=function(){var C=xr(),M=function(me){return me};for(var ce in u!==null&&(M=Rn.encryptor(C,0)),te("<<"),te("/Producer ("+la(M("jsPDF "+Bt.version))+")"),dt)dt.hasOwnProperty(ce)&&dt[ce]&&te("/"+ce.substr(0,1).toUpperCase()+ce.substr(1)+" ("+la(M(dt[ce]))+")");te("/CreationDate ("+la(M(se))+")"),te(">>"),te("endobj")},Oc=d.__private__.putCatalog=function(C){var M=(C=C||{}).rootDictionaryObjId||Z;switch(xr(),te("<<"),te("/Type /Catalog"),te("/Pages "+M+" 0 R"),Ye||(Ye="fullwidth"),Ye){case"fullwidth":te("/OpenAction [3 0 R /FitH null]");break;case"fullheight":te("/OpenAction [3 0 R /FitV null]");break;case"fullpage":te("/OpenAction [3 0 R /Fit]");break;case"original":te("/OpenAction [3 0 R /XYZ null null 1]");break;default:var ce=""+Ye;ce.substr(ce.length-1)==="%"&&(Ye=parseInt(Ye)/100),typeof Ye=="number"&&te("/OpenAction [3 0 R /XYZ null null "+q(Ye)+"]")}switch(yt||(yt="continuous"),yt){case"continuous":te("/PageLayout /OneColumn");break;case"single":te("/PageLayout /SinglePage");break;case"two":case"twoleft":te("/PageLayout /TwoColumnLeft");break;case"tworight":te("/PageLayout /TwoColumnRight")}at&&te("/PageMode /"+at),$t.publish("putCatalog"),te(">>"),te("endobj")},vm=d.__private__.putTrailer=function(){te("trailer"),te("<<"),te("/Size "+(S+1)),te("/Root "+S+" 0 R"),te("/Info "+(S-1)+" 0 R"),u!==null&&te("/Encrypt "+Rn.oid+" 0 R"),te("/ID [ <"+he+"> <"+he+"> ]"),te(">>")},wm=d.__private__.putHeader=function(){te("%PDF-"+w),te("%ºß¬à")},Bm=d.__private__.putXRef=function(){var C="0000000000";te("xref"),te("0 "+(S+1)),te("0000000000 65535 f ");for(var M=1;M<=S;M++)typeof D[M]=="function"?te((C+D[M]()).slice(-10)+" 00000 n "):D[M]!==void 0?te((C+D[M]).slice(-10)+" 00000 n "):te("0000000000 00000 n ")},li=d.__private__.buildDocument=function(){Ee(),xe(W),$t.publish("buildDocument"),wm(),pe(),Zf(),Jf(),u!==null&&IA(),ym(),Oc();var C=ue;return Bm(),vm(),te("startxref"),te(""+C),te("%%EOF"),xe(de[_]),W.join(`
106
- `)},Ys=d.__private__.getBlob=function(C){return new Blob([rt(C)],{type:"application/pdf"})},Js=d.output=d.__private__.output=cA(function(C,M){switch(typeof(M=M||{})=="string"?M={filename:M}:M.filename=M.filename||"generated.pdf",C){case void 0:return li();case"save":d.save(M.filename);break;case"arraybuffer":return rt(li());case"blob":return Ys(li());case"bloburi":case"bloburl":if(wt.URL!==void 0&&typeof wt.URL.createObjectURL=="function")return wt.URL&&wt.URL.createObjectURL(Ys(li()))||void 0;hr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var ce="",me=li();try{ce=Kd(me)}catch{ce=Kd(unescape(encodeURIComponent(me)))}return"data:application/pdf;filename="+M.filename+";base64,"+ce;case"pdfobjectnewwindow":if(Object.prototype.toString.call(wt)==="[object Window]"){var _e="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Qe=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';M.pdfObjectUrl&&(_e=M.pdfObjectUrl,Qe="");var Xe='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+_e+'"'+Qe+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(M)+");<\/script></body></html>",st=wt.open();return st!==null&&st.document.write(Xe),st}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(wt)==="[object Window]"){var mt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(M.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+M.filename+'" width="500px" height="400px" /></body></html>',Ut=wt.open();if(Ut!==null){Ut.document.write(mt);var Mt=this;Ut.document.documentElement.querySelector("#pdfViewer").onload=function(){Ut.document.title=M.filename,Ut.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Mt.output("bloburl"))}}return Ut}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(wt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var jt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",M)+'"></iframe></body></html>',Fr=wt.open();if(Fr!==null&&(Fr.document.write(jt),Fr.document.title=M.filename),Fr||typeof safari>"u")return Fr;break;case"datauri":case"dataurl":return wt.document.location.href=this.output("datauristring",M);default:return null}}),a0=function(C){return Array.isArray(xa)===!0&&xa.indexOf(C)>-1};switch(n){case"pt":tt=1;break;case"mm":tt=72/25.4;break;case"cm":tt=72/2.54;break;case"in":tt=72;break;case"px":tt=a0("px_scaling")==1?.75:96/72;break;case"pc":case"em":tt=12;break;case"ex":tt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);tt=n}var Rn=null;Ue(),re();var xm=function(C){return u!==null?Rn.encryptor(C,0):function(M){return M}},A0=d.__private__.getPageInfo=d.getPageInfo=function(C){if(isNaN(C)||C%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:bt[C].objId,pageNumber:C,pageContext:bt[C]}},_t=d.__private__.getPageInfoByObjId=function(C){if(isNaN(C)||C%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var M in bt)if(bt[M].objId===C)break;return A0(M)},bm=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:bt[_].objId,pageNumber:_,pageContext:bt[_]}};d.addPage=function(){return t0.apply(this,arguments),this},d.setPage=function(){return r0.apply(this,arguments),xe.call(this,de[_]),this},d.insertPage=function(C){return this.addPage(),this.movePage(_,C),this},d.movePage=function(C,M){var ce,me;if(C>M){ce=de[C],me=bt[C];for(var _e=C;_e>M;_e--)de[_e]=de[_e-1],bt[_e]=bt[_e-1];de[M]=ce,bt[M]=me,this.setPage(M)}else if(C<M){ce=de[C],me=bt[C];for(var Qe=C;Qe<M;Qe++)de[Qe]=de[Qe+1],bt[Qe]=bt[Qe+1];de[M]=ce,bt[M]=me,this.setPage(M)}return this},d.deletePage=function(){return pm.apply(this,arguments),this},d.__private__.text=d.text=function(C,M,ce,me,_e){var Qe,Xe,st,mt,Ut,Mt,jt,Fr,Dr,Zr=(me=me||{}).scope||this;if(typeof C=="number"&&typeof M=="number"&&(typeof ce=="string"||Array.isArray(ce))){var Hn=ce;ce=M,M=C,C=Hn}if(arguments[3]instanceof gt?(U("The transform parameter of text() with a Matrix value"),Dr=_e):(st=arguments[4],mt=arguments[5],Xt(jt=arguments[3])==="object"&&jt!==null||(typeof st=="string"&&(mt=st,st=null),typeof jt=="string"&&(mt=jt,jt=null),typeof jt=="number"&&(st=jt,jt=null),me={flags:jt,angle:st,align:mt})),isNaN(M)||isNaN(ce)||C==null)throw new Error("Invalid arguments passed to jsPDF.text");if(C.length===0)return Zr;var gn="",hA=!1,Ca=typeof me.lineHeightFactor=="number"?me.lineHeightFactor:zo,ui=Zr.internal.scaleFactor;function d0(yr){return yr=yr.split(" ").join(Array(me.TabLen||9).join(" ")),la(yr,jt)}function Wc(yr){for(var vr,Kr=yr.concat(),sn=[],gi=Kr.length;gi--;)typeof(vr=Kr.shift())=="string"?sn.push(vr):Array.isArray(yr)&&(vr.length===1||vr[1]===void 0&&vr[2]===void 0)?sn.push(vr[0]):sn.push([vr[0],vr[1],vr[2]]);return sn}function Xc(yr,vr){var Kr;if(typeof yr=="string")Kr=vr(yr)[0];else if(Array.isArray(yr)){for(var sn,gi,Zi=yr.concat(),hl=[],p0=Zi.length;p0--;)typeof(sn=Zi.shift())=="string"?hl.push(vr(sn)[0]):Array.isArray(sn)&&typeof sn[0]=="string"&&(gi=vr(sn[0],sn[1],sn[2]),hl.push([gi[0],gi[1],gi[2]]));Kr=hl}return Kr}var al=!1,qc=!0;if(typeof C=="string")al=!0;else if(Array.isArray(C)){var Yc=C.concat();Xe=[];for(var Al,ca=Yc.length;ca--;)(typeof(Al=Yc.shift())!="string"||Array.isArray(Al)&&typeof Al[0]!="string")&&(qc=!1);al=qc}if(al===!1)throw new Error('Type of text must be string or Array. "'+C+'" is not recognized.');typeof C=="string"&&(C=C.match(/[\r?\n]/)?C.split(/\r\n|\r|\n/g):[C]);var il=We/Zr.internal.scaleFactor,ol=il*(Ca-1);switch(me.baseline){case"bottom":ce-=ol;break;case"top":ce+=il-ol;break;case"hanging":ce+=il-2*ol;break;case"middle":ce+=il/2-ol}if((Mt=me.maxWidth||0)>0&&(typeof C=="string"?C=Zr.splitTextToSize(C,Mt):Object.prototype.toString.call(C)==="[object Array]"&&(C=C.reduce(function(yr,vr){return yr.concat(Zr.splitTextToSize(vr,Mt))},[]))),Qe={text:C,x:M,y:ce,options:me,mutex:{pdfEscape:la,activeFontKey:xt,fonts:Qt,activeFontSize:We}},$t.publish("preProcessText",Qe),C=Qe.text,st=(me=Qe.options).angle,!(Dr instanceof gt)&&st&&typeof st=="number"){st*=Math.PI/180,me.rotationDirection===0&&(st=-st),N===F.ADVANCED&&(st=-st);var sl=Math.cos(st),Jc=Math.sin(st);Dr=new gt(sl,Jc,-Jc,sl,0,0)}else st&&st instanceof gt&&(Dr=st);N!==F.ADVANCED||Dr||(Dr=Mn),(Ut=me.charSpace||tl)!==void 0&&(gn+=I(L(Ut))+` Tc
106
+ `)},Ys=d.__private__.getBlob=function(C){return new Blob([rt(C)],{type:"application/pdf"})},Js=d.output=d.__private__.output=cA(function(C,M){switch(typeof(M=M||{})=="string"?M={filename:M}:M.filename=M.filename||"generated.pdf",C){case void 0:return li();case"save":d.save(M.filename);break;case"arraybuffer":return rt(li());case"blob":return Ys(li());case"bloburi":case"bloburl":if(wt.URL!==void 0&&typeof wt.URL.createObjectURL=="function")return wt.URL&&wt.URL.createObjectURL(Ys(li()))||void 0;hr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var ce="",me=li();try{ce=Kd(me)}catch{ce=Kd(unescape(encodeURIComponent(me)))}return"data:application/pdf;filename="+M.filename+";base64,"+ce;case"pdfobjectnewwindow":if(Object.prototype.toString.call(wt)==="[object Window]"){var _e="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Qe=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';M.pdfObjectUrl&&(_e=M.pdfObjectUrl,Qe="");var Xe='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+_e+'"'+Qe+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(M)+");<\/script></body></html>",st=wt.open();return st!==null&&st.document.write(Xe),st}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(wt)==="[object Window]"){var mt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(M.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+M.filename+'" width="500px" height="400px" /></body></html>',Ut=wt.open();if(Ut!==null){Ut.document.write(mt);var Mt=this;Ut.document.documentElement.querySelector("#pdfViewer").onload=function(){Ut.document.title=M.filename,Ut.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Mt.output("bloburl"))}}return Ut}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(wt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var jt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",M)+'"></iframe></body></html>',Fr=wt.open();if(Fr!==null&&(Fr.document.write(jt),Fr.document.title=M.filename),Fr||typeof safari>"u")return Fr;break;case"datauri":case"dataurl":return wt.document.location.href=this.output("datauristring",M);default:return null}}),a0=function(C){return Array.isArray(xa)===!0&&xa.indexOf(C)>-1};switch(n){case"pt":tt=1;break;case"mm":tt=72/25.4;break;case"cm":tt=72/2.54;break;case"in":tt=72;break;case"px":tt=a0("px_scaling")==1?.75:96/72;break;case"pc":case"em":tt=12;break;case"ex":tt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);tt=n}var Rn=null;Ue(),re();var xm=function(C){return u!==null?Rn.encryptor(C,0):function(M){return M}},A0=d.__private__.getPageInfo=d.getPageInfo=function(C){if(isNaN(C)||C%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:bt[C].objId,pageNumber:C,pageContext:bt[C]}},Ft=d.__private__.getPageInfoByObjId=function(C){if(isNaN(C)||C%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var M in bt)if(bt[M].objId===C)break;return A0(M)},bm=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:bt[_].objId,pageNumber:_,pageContext:bt[_]}};d.addPage=function(){return t0.apply(this,arguments),this},d.setPage=function(){return r0.apply(this,arguments),xe.call(this,de[_]),this},d.insertPage=function(C){return this.addPage(),this.movePage(_,C),this},d.movePage=function(C,M){var ce,me;if(C>M){ce=de[C],me=bt[C];for(var _e=C;_e>M;_e--)de[_e]=de[_e-1],bt[_e]=bt[_e-1];de[M]=ce,bt[M]=me,this.setPage(M)}else if(C<M){ce=de[C],me=bt[C];for(var Qe=C;Qe<M;Qe++)de[Qe]=de[Qe+1],bt[Qe]=bt[Qe+1];de[M]=ce,bt[M]=me,this.setPage(M)}return this},d.deletePage=function(){return pm.apply(this,arguments),this},d.__private__.text=d.text=function(C,M,ce,me,_e){var Qe,Xe,st,mt,Ut,Mt,jt,Fr,Dr,Zr=(me=me||{}).scope||this;if(typeof C=="number"&&typeof M=="number"&&(typeof ce=="string"||Array.isArray(ce))){var Hn=ce;ce=M,M=C,C=Hn}if(arguments[3]instanceof gt?(U("The transform parameter of text() with a Matrix value"),Dr=_e):(st=arguments[4],mt=arguments[5],Xt(jt=arguments[3])==="object"&&jt!==null||(typeof st=="string"&&(mt=st,st=null),typeof jt=="string"&&(mt=jt,jt=null),typeof jt=="number"&&(st=jt,jt=null),me={flags:jt,angle:st,align:mt})),isNaN(M)||isNaN(ce)||C==null)throw new Error("Invalid arguments passed to jsPDF.text");if(C.length===0)return Zr;var gn="",hA=!1,Ca=typeof me.lineHeightFactor=="number"?me.lineHeightFactor:zo,ui=Zr.internal.scaleFactor;function d0(yr){return yr=yr.split(" ").join(Array(me.TabLen||9).join(" ")),la(yr,jt)}function Wc(yr){for(var vr,Kr=yr.concat(),sn=[],gi=Kr.length;gi--;)typeof(vr=Kr.shift())=="string"?sn.push(vr):Array.isArray(yr)&&(vr.length===1||vr[1]===void 0&&vr[2]===void 0)?sn.push(vr[0]):sn.push([vr[0],vr[1],vr[2]]);return sn}function Xc(yr,vr){var Kr;if(typeof yr=="string")Kr=vr(yr)[0];else if(Array.isArray(yr)){for(var sn,gi,Zi=yr.concat(),hl=[],p0=Zi.length;p0--;)typeof(sn=Zi.shift())=="string"?hl.push(vr(sn)[0]):Array.isArray(sn)&&typeof sn[0]=="string"&&(gi=vr(sn[0],sn[1],sn[2]),hl.push([gi[0],gi[1],gi[2]]));Kr=hl}return Kr}var al=!1,qc=!0;if(typeof C=="string")al=!0;else if(Array.isArray(C)){var Yc=C.concat();Xe=[];for(var Al,ca=Yc.length;ca--;)(typeof(Al=Yc.shift())!="string"||Array.isArray(Al)&&typeof Al[0]!="string")&&(qc=!1);al=qc}if(al===!1)throw new Error('Type of text must be string or Array. "'+C+'" is not recognized.');typeof C=="string"&&(C=C.match(/[\r?\n]/)?C.split(/\r\n|\r|\n/g):[C]);var il=We/Zr.internal.scaleFactor,ol=il*(Ca-1);switch(me.baseline){case"bottom":ce-=ol;break;case"top":ce+=il-ol;break;case"hanging":ce+=il-2*ol;break;case"middle":ce+=il/2-ol}if((Mt=me.maxWidth||0)>0&&(typeof C=="string"?C=Zr.splitTextToSize(C,Mt):Object.prototype.toString.call(C)==="[object Array]"&&(C=C.reduce(function(yr,vr){return yr.concat(Zr.splitTextToSize(vr,Mt))},[]))),Qe={text:C,x:M,y:ce,options:me,mutex:{pdfEscape:la,activeFontKey:xt,fonts:Qt,activeFontSize:We}},$t.publish("preProcessText",Qe),C=Qe.text,st=(me=Qe.options).angle,!(Dr instanceof gt)&&st&&typeof st=="number"){st*=Math.PI/180,me.rotationDirection===0&&(st=-st),N===F.ADVANCED&&(st=-st);var sl=Math.cos(st),Jc=Math.sin(st);Dr=new gt(sl,Jc,-Jc,sl,0,0)}else st&&st instanceof gt&&(Dr=st);N!==F.ADVANCED||Dr||(Dr=Mn),(Ut=me.charSpace||tl)!==void 0&&(gn+=I(L(Ut))+` Tc
107
107
  `,this.setCharSpace(this.getCharSpace()||0)),(Fr=me.horizontalScale)!==void 0&&(gn+=I(100*Fr)+` Tz
108
108
  `),me.lang;var ua=-1,Um=me.renderingMode!==void 0?me.renderingMode:me.stroke,Zc=Zr.internal.getCurrentPageInfo().pageContext;switch(Um){case 0:case!1:case"fill":ua=0;break;case 1:case!0:case"stroke":ua=1;break;case 2:case"fillThenStroke":ua=2;break;case 3:case"invisible":ua=3;break;case 4:case"fillAndAddForClipping":ua=4;break;case 5:case"strokeAndAddPathForClipping":ua=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":ua=6;break;case 7:case"addToPathForClipping":ua=7}var g0=Zc.usedRenderingMode!==void 0?Zc.usedRenderingMode:-1;ua!==-1?gn+=ua+` Tr
109
109
  `:g0!==-1&&(gn+=`0 Tr
@@ -117,25 +117,25 @@ T* `):C.join(` Tj
117
117
  /`;return di+=xt+" "+We+` Tf
118
118
  `,di+=I(We*Ca)+` TL
119
119
  `,di+=Ko+`
120
- `,di+=gn,di+=C,te(di+="ET"),h[xt]=!0,Zr};var Cm=d.__private__.clip=d.clip=function(C){return te(C==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return Cm("evenodd")},d.__private__.discardPath=d.discardPath=function(){return te("n"),this};var OA=d.__private__.isValidStyle=function(C){var M=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(C)!==-1&&(M=!0),M};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(C){return OA(C)&&(c=C),this};var i0=d.__private__.getStyle=d.getStyle=function(C){var M=c;switch(C){case"D":case"S":M="S";break;case"F":M="f";break;case"FD":case"DF":M="B";break;case"f":case"f*":case"B":case"B*":M=C}return M},o0=d.close=function(){return te("h"),this};d.stroke=function(){return te("S"),this},d.fill=function(C){return Zs("f",C),this},d.fillEvenOdd=function(C){return Zs("f*",C),this},d.fillStroke=function(C){return Zs("B",C),this},d.fillStrokeEvenOdd=function(C){return Zs("B*",C),this};var Zs=function(C,M){Xt(M)==="object"?_m(M,C):te(C)},Pc=function(C){C===null||N===F.ADVANCED&&C===void 0||(C=i0(C),te(C))};function Em(C,M,ce,me,_e){var Qe=new cs(M||this.boundingBox,ce||this.xStep,me||this.yStep,this.gState,_e||this.matrix);Qe.stream=this.stream;var Xe=C+"$$"+this.cloneIndex+++"$$";return mr(Xe,Qe),Qe}var _m=function(C,M){var ce=_r[C.key],me=Rt[ce];if(me instanceof fo)te("q"),te(Fm(M)),me.gState&&d.setGState(me.gState),te(C.matrix.toString()+" cm"),te("/"+ce+" sh"),te("Q");else if(me instanceof cs){var _e=new gt(1,0,0,-1,0,Wi());C.matrix&&(_e=_e.multiply(C.matrix||Mn),ce=Em.call(me,C.key,C.boundingBox,C.xStep,C.yStep,_e).id),te("q"),te("/Pattern cs"),te("/"+ce+" scn"),me.gState&&d.setGState(me.gState),te(M),te("Q")}},Fm=function(C){switch(C){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Mc=d.moveTo=function(C,M){return te(I(L(C))+" "+I(Y(M))+" m"),this},$o=d.lineTo=function(C,M){return te(I(L(C))+" "+I(Y(M))+" l"),this},Ki=d.curveTo=function(C,M,ce,me,_e,Qe){return te([I(L(C)),I(Y(M)),I(L(ce)),I(Y(me)),I(L(_e)),I(Y(Qe)),"c"].join(" ")),this};d.__private__.line=d.line=function(C,M,ce,me,_e){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||!OA(_e))throw new Error("Invalid arguments passed to jsPDF.line");return N===F.COMPAT?this.lines([[ce-C,me-M]],C,M,[1,1],_e||"S"):this.lines([[ce-C,me-M]],C,M,[1,1]).stroke()},d.__private__.lines=d.lines=function(C,M,ce,me,_e,Qe){var Xe,st,mt,Ut,Mt,jt,Fr,Dr,Zr,Hn,gn,hA;if(typeof C=="number"&&(hA=ce,ce=M,M=C,C=hA),me=me||[1,1],Qe=Qe||!1,isNaN(M)||isNaN(ce)||!Array.isArray(C)||!Array.isArray(me)||!OA(_e)||typeof Qe!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Mc(M,ce),Xe=me[0],st=me[1],Ut=C.length,Hn=M,gn=ce,mt=0;mt<Ut;mt++)(Mt=C[mt]).length===2?(Hn=Mt[0]*Xe+Hn,gn=Mt[1]*st+gn,$o(Hn,gn)):(jt=Mt[0]*Xe+Hn,Fr=Mt[1]*st+gn,Dr=Mt[2]*Xe+Hn,Zr=Mt[3]*st+gn,Hn=Mt[4]*Xe+Hn,gn=Mt[5]*st+gn,Ki(jt,Fr,Dr,Zr,Hn,gn));return Qe&&o0(),Pc(_e),this},d.path=function(C){for(var M=0;M<C.length;M++){var ce=C[M],me=ce.c;switch(ce.op){case"m":Mc(me[0],me[1]);break;case"l":$o(me[0],me[1]);break;case"c":Ki.apply(this,me);break;case"h":o0()}}return this},d.__private__.rect=d.rect=function(C,M,ce,me,_e){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||!OA(_e))throw new Error("Invalid arguments passed to jsPDF.rect");return N===F.COMPAT&&(me=-me),te([I(L(C)),I(Y(M)),I(L(ce)),I(L(me)),"re"].join(" ")),Pc(_e),this},d.__private__.triangle=d.triangle=function(C,M,ce,me,_e,Qe,Xe){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||isNaN(_e)||isNaN(Qe)||!OA(Xe))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[ce-C,me-M],[_e-ce,Qe-me],[C-_e,M-Qe]],C,M,[1,1],Xe,!0),this},d.__private__.roundedRect=d.roundedRect=function(C,M,ce,me,_e,Qe,Xe){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||isNaN(_e)||isNaN(Qe)||!OA(Xe))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var st=4/3*(Math.SQRT2-1);return _e=Math.min(_e,.5*ce),Qe=Math.min(Qe,.5*me),this.lines([[ce-2*_e,0],[_e*st,0,_e,Qe-Qe*st,_e,Qe],[0,me-2*Qe],[0,Qe*st,-_e*st,Qe,-_e,Qe],[2*_e-ce,0],[-_e*st,0,-_e,-Qe*st,-_e,-Qe],[0,2*Qe-me],[0,-Qe*st,_e*st,-Qe,_e,-Qe]],C+_e,M,[1,1],Xe,!0),this},d.__private__.ellipse=d.ellipse=function(C,M,ce,me,_e){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||!OA(_e))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Qe=4/3*(Math.SQRT2-1)*ce,Xe=4/3*(Math.SQRT2-1)*me;return Mc(C+ce,M),Ki(C+ce,M-Xe,C+Qe,M-me,C,M-me),Ki(C-Qe,M-me,C-ce,M-Xe,C-ce,M),Ki(C-ce,M+Xe,C-Qe,M+me,C,M+me),Ki(C+Qe,M+me,C+ce,M+Xe,C+ce,M),Pc(_e),this},d.__private__.circle=d.circle=function(C,M,ce,me){if(isNaN(C)||isNaN(M)||isNaN(ce)||!OA(me))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(C,M,ce,ce,me)},d.setFont=function(C,M,ce){return ce&&(M=R(M,ce)),xt=n0(C,M,{disableWarning:!1}),this};var Sm=d.__private__.getFont=d.getFont=function(){return Qt[n0.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var C,M,ce={};for(C in Kt)if(Kt.hasOwnProperty(C))for(M in ce[C]=[],Kt[C])Kt[C].hasOwnProperty(M)&&ce[C].push(M);return ce},d.addFont=function(C,M,ce,me,_e){var Qe=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Qe.indexOf(arguments[3])!==-1?_e=arguments[3]:arguments[3]&&Qe.indexOf(arguments[3])==-1&&(ce=R(ce,me)),_e=_e||"Identity-H",Dc.call(this,C,M,ce,_e)};var zo,Rc=t.lineWidth||.200025,el=d.__private__.getLineWidth=d.getLineWidth=function(){return Rc},s0=d.__private__.setLineWidth=d.setLineWidth=function(C){return Rc=C,te(I(L(C))+" w"),this};d.__private__.setLineDash=Bt.API.setLineDash=Bt.API.setLineDashPattern=function(C,M){if(C=C||[],M=M||0,isNaN(M)||!Array.isArray(C))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return C=C.map(function(ce){return I(L(ce))}).join(" "),M=I(L(M)),te("["+C+"] "+M+" d"),this};var l0=d.__private__.getLineHeight=d.getLineHeight=function(){return We*zo};d.__private__.getLineHeight=d.getLineHeight=function(){return We*zo};var c0=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(C){return typeof(C=C||1.15)=="number"&&(zo=C),this},u0=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return zo};c0(t.lineHeight);var ci=d.__private__.getHorizontalCoordinate=function(C){return L(C)},Gi=d.__private__.getVerticalCoordinate=function(C){return N===F.ADVANCED?C:bt[_].mediaBox.topRightY-bt[_].mediaBox.bottomLeftY-L(C)},km=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(C){return I(ci(C))},ji=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(C){return I(Gi(C))},uA=t.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Ae(uA)},d.__private__.setStrokeColor=d.setDrawColor=function(C,M,ce,me){return uA=oe({ch1:C,ch2:M,ch3:ce,ch4:me,pdfColorType:"draw",precision:2}),te(uA),this};var Hc=t.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Ae(Hc)},d.__private__.setFillColor=d.setFillColor=function(C,M,ce,me){return Hc=oe({ch1:C,ch2:M,ch3:ce,ch4:me,pdfColorType:"fill",precision:2}),te(Hc),this};var Ko=t.textColor||"0 g",Tm=d.__private__.getTextColor=d.getTextColor=function(){return Ae(Ko)};d.__private__.setTextColor=d.setTextColor=function(C,M,ce,me){return Ko=oe({ch1:C,ch2:M,ch3:ce,ch4:me,pdfColorType:"text",precision:3}),this};var tl=t.charSpace,Nm=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(tl||0)};d.__private__.setCharSpace=d.setCharSpace=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return tl=C,this};var Vc=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(C){var M=d.CapJoinStyles[C];if(M===void 0)throw new Error("Line cap style of '"+C+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Vc=M,te(M+" J"),this};var $c=0;d.__private__.setLineJoin=d.setLineJoin=function(C){var M=d.CapJoinStyles[C];if(M===void 0)throw new Error("Line join style of '"+C+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return $c=M,te(M+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(C){if(C=C||0,isNaN(C))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return te(I(L(C))+" M"),this},d.GState=oh,d.setGState=function(C){(C=typeof C=="string"?Yt[on[C]]:h0(null,C)).equals(Et)||(te("/"+C.id+" gs"),Et=C)};var h0=function(C,M){if(!C||!on[C]){var ce=!1;for(var me in Yt)if(Yt.hasOwnProperty(me)&&Yt[me].equals(M)){ce=!0;break}if(ce)M=Yt[me];else{var _e="GS"+(Object.keys(Yt).length+1).toString(10);Yt[_e]=M,M.id=_e}return C&&(on[C]=M.id),$t.publish("addGState",M),M}};d.addGState=function(C,M){return h0(C,M),this},d.saveGraphicsState=function(){return te("q"),Jr.push({key:xt,size:We,color:Ko}),this},d.restoreGraphicsState=function(){te("Q");var C=Jr.pop();return xt=C.key,We=C.size,Ko=C.color,Et=null,this},d.setCurrentTransformationMatrix=function(C){return te(C.toString()+" cm"),this},d.comment=function(C){return te("#"+C),this};var rl=function(C,M){var ce=C||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return ce},set:function(Qe){isNaN(Qe)||(ce=parseFloat(Qe))}});var me=M||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return me},set:function(Qe){isNaN(Qe)||(me=parseFloat(Qe))}});var _e="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return _e},set:function(Qe){_e=Qe.toString()}}),this},zc=function(C,M,ce,me){rl.call(this,C,M),this.type="rect";var _e=ce||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return _e},set:function(Xe){isNaN(Xe)||(_e=parseFloat(Xe))}});var Qe=me||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Qe},set:function(Xe){isNaN(Xe)||(Qe=parseFloat(Xe))}}),this},Kc=function(){this.page=Gt,this.currentPage=_,this.pages=de.slice(0),this.pagesContext=bt.slice(0),this.x=ir,this.y=Lt,this.matrix=fr,this.width=Go(_),this.height=Wi(_),this.outputDestination=ne,this.id="",this.objectNumber=-1};Kc.prototype.restore=function(){Gt=this.page,_=this.currentPage,bt=this.pagesContext,de=this.pages,ir=this.x,Lt=this.y,fr=this.matrix,Gc(_,this.width),jc(_,this.height),ne=this.outputDestination};var f0=function(C,M,ce,me,_e){oa.push(new Kc),Gt=_=0,de=[],ir=C,Lt=M,fr=_e,Qc([ce,me])},Lm=function(C){if(Yn[C])oa.pop().restore();else{var M=new Kc,ce="Xo"+(Object.keys(Ir).length+1).toString(10);M.id=ce,Yn[C]=ce,Ir[ce]=M,$t.publish("addFormObject",M),oa.pop().restore()}};for(var nl in d.beginFormObject=function(C,M,ce,me,_e){return f0(C,M,ce,me,_e),this},d.endFormObject=function(C){return Lm(C),this},d.doFormObject=function(C,M){var ce=Ir[Yn[C]];return te("q"),te(M.toString()+" cm"),te("/"+ce.id+" Do"),te("Q"),this},d.getFormObject=function(C){var M=Ir[Yn[C]];return{x:M.x,y:M.y,width:M.width,height:M.height,matrix:M.matrix}},d.save=function(C,M){return C=C||"generated.pdf",(M=M||{}).returnPromise=M.returnPromise||!1,M.returnPromise===!1?(ho(Ys(li()),C),typeof ho.unload=="function"&&wt.setTimeout&&setTimeout(ho.unload,911),this):new Promise(function(ce,me){try{var _e=ho(Ys(li()),C);typeof ho.unload=="function"&&wt.setTimeout&&setTimeout(ho.unload,911),ce(_e)}catch(Qe){me(Qe.message)}})},Bt.API)Bt.API.hasOwnProperty(nl)&&(nl==="events"&&Bt.API.events.length?function(C,M){var ce,me,_e;for(_e=M.length-1;_e!==-1;_e--)ce=M[_e][0],me=M[_e][1],C.subscribe.apply(C,[ce].concat(typeof me=="function"?[me]:me))}($t,Bt.API.events):d[nl]=Bt.API[nl]);var Go=d.getPageWidth=function(C){return(bt[C=C||_].mediaBox.topRightX-bt[C].mediaBox.bottomLeftX)/tt},Gc=d.setPageWidth=function(C,M){bt[C].mediaBox.topRightX=M*tt+bt[C].mediaBox.bottomLeftX},Wi=d.getPageHeight=function(C){return(bt[C=C||_].mediaBox.topRightY-bt[C].mediaBox.bottomLeftY)/tt},jc=d.setPageHeight=function(C,M){bt[C].mediaBox.topRightY=M*tt+bt[C].mediaBox.bottomLeftY};return d.internal={pdfEscape:la,getStyle:i0,getFont:Sm,getFontSize:Je,getCharSpace:Nm,getTextColor:Tm,getLineHeight:l0,getLineHeightFactor:u0,getLineWidth:el,write:Pe,getHorizontalCoordinate:ci,getVerticalCoordinate:Gi,getCoordinateString:km,getVerticalCoordinateString:ji,collections:{},newObject:xr,newAdditionalObject:ie,newObjectDeferred:br,newObjectDeferredBegin:H,getFilters:Se,putStream:Ie,events:$t,scaleFactor:tt,pageSize:{getWidth:function(){return Go(_)},setWidth:function(C){Gc(_,C)},getHeight:function(){return Wi(_)},setHeight:function(C){jc(_,C)}},encryptionOptions:u,encryption:Rn,getEncryptor:xm,output:Js,getNumberOfPages:mm,pages:de,out:te,f2:q,f3:T,getPageInfo:A0,getPageInfoByObjId:_t,getCurrentPageInfo:bm,getPDFVersion:g,Point:rl,Rectangle:zc,Matrix:gt,hasHotfix:a0},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return Go(_)},set:function(C){Gc(_,C)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return Wi(_)},set:function(C){jc(_,C)},enumerable:!0,configurable:!0}),gm.call(d,Ve),xt="F1",t0(a,r),$t.publish("initialized"),d}ss.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},ss.prototype.toHexString=function(t){return t.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ss.prototype.hexToBytes=function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(String.fromCharCode(parseInt(t.substr(r,2),16)));return e.join("")},ss.prototype.processOwnerPassword=function(t,e){return Wd(jd(e).substr(0,5),t)},ss.prototype.encryptor=function(t,e){var r=jd(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return Wd(r,n)}},oh.prototype.equals=function(t){var e,r="id,objectNumber,equals";if(!t||Xt(t)!==Xt(this))return!1;var n=0;for(e in this)if(!(r.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e)||this[e]!==t[e])return!1;n++}for(e in t)t.hasOwnProperty(e)&&r.indexOf(e)<0&&n--;return n===0},Bt.API={events:[]},Bt.version="2.5.1";var Sr=Bt.API,Xd=1,go=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},us=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ft=function(t){return t.toFixed(2)},Ni=function(t){return t.toFixed(5)};Sr.__acroform__={};var ea=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},pv=function(t){return t*Xd},bA=function(t){var e=new yv,r=ht.internal.getHeight(t)||0,n=ht.internal.getWidth(t)||0;return e.BBox=[0,0,Number(Ft(n)),Number(Ft(r))],e},xT=Sr.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|=1<<e},bT=Sr.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&=~(1<<e)},CT=Sr.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},Mr=Sr.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return CT(t,e-1)},Rr=Sr.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return xT(t,e-1)},Hr=Sr.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return bT(t,e-1)},ET=Sr.__acroform__.calculateCoordinates=function(t,e){var r=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,a=t[0],A=t[1],o=t[2],s=t[3],l={};return l.lowerLeft_X=r(a)||0,l.lowerLeft_Y=n(A+s)||0,l.upperRight_X=r(a+o)||0,l.upperRight_Y=n(A)||0,[Number(Ft(l.lowerLeft_X)),Number(Ft(l.lowerLeft_Y)),Number(Ft(l.upperRight_X)),Number(Ft(l.upperRight_Y))]},_T=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=qd(t,r),a=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+a+" "+Ft(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var A=bA(t);return A.scope=t.scope,A.stream=e.join(`
120
+ `,di+=gn,di+=C,te(di+="ET"),h[xt]=!0,Zr};var Cm=d.__private__.clip=d.clip=function(C){return te(C==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return Cm("evenodd")},d.__private__.discardPath=d.discardPath=function(){return te("n"),this};var OA=d.__private__.isValidStyle=function(C){var M=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(C)!==-1&&(M=!0),M};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(C){return OA(C)&&(c=C),this};var i0=d.__private__.getStyle=d.getStyle=function(C){var M=c;switch(C){case"D":case"S":M="S";break;case"F":M="f";break;case"FD":case"DF":M="B";break;case"f":case"f*":case"B":case"B*":M=C}return M},o0=d.close=function(){return te("h"),this};d.stroke=function(){return te("S"),this},d.fill=function(C){return Zs("f",C),this},d.fillEvenOdd=function(C){return Zs("f*",C),this},d.fillStroke=function(C){return Zs("B",C),this},d.fillStrokeEvenOdd=function(C){return Zs("B*",C),this};var Zs=function(C,M){Xt(M)==="object"?_m(M,C):te(C)},Pc=function(C){C===null||N===F.ADVANCED&&C===void 0||(C=i0(C),te(C))};function Em(C,M,ce,me,_e){var Qe=new cs(M||this.boundingBox,ce||this.xStep,me||this.yStep,this.gState,_e||this.matrix);Qe.stream=this.stream;var Xe=C+"$$"+this.cloneIndex+++"$$";return mr(Xe,Qe),Qe}var _m=function(C,M){var ce=_r[C.key],me=Rt[ce];if(me instanceof fo)te("q"),te(Fm(M)),me.gState&&d.setGState(me.gState),te(C.matrix.toString()+" cm"),te("/"+ce+" sh"),te("Q");else if(me instanceof cs){var _e=new gt(1,0,0,-1,0,Wi());C.matrix&&(_e=_e.multiply(C.matrix||Mn),ce=Em.call(me,C.key,C.boundingBox,C.xStep,C.yStep,_e).id),te("q"),te("/Pattern cs"),te("/"+ce+" scn"),me.gState&&d.setGState(me.gState),te(M),te("Q")}},Fm=function(C){switch(C){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Mc=d.moveTo=function(C,M){return te(I(L(C))+" "+I(Y(M))+" m"),this},$o=d.lineTo=function(C,M){return te(I(L(C))+" "+I(Y(M))+" l"),this},Ki=d.curveTo=function(C,M,ce,me,_e,Qe){return te([I(L(C)),I(Y(M)),I(L(ce)),I(Y(me)),I(L(_e)),I(Y(Qe)),"c"].join(" ")),this};d.__private__.line=d.line=function(C,M,ce,me,_e){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||!OA(_e))throw new Error("Invalid arguments passed to jsPDF.line");return N===F.COMPAT?this.lines([[ce-C,me-M]],C,M,[1,1],_e||"S"):this.lines([[ce-C,me-M]],C,M,[1,1]).stroke()},d.__private__.lines=d.lines=function(C,M,ce,me,_e,Qe){var Xe,st,mt,Ut,Mt,jt,Fr,Dr,Zr,Hn,gn,hA;if(typeof C=="number"&&(hA=ce,ce=M,M=C,C=hA),me=me||[1,1],Qe=Qe||!1,isNaN(M)||isNaN(ce)||!Array.isArray(C)||!Array.isArray(me)||!OA(_e)||typeof Qe!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Mc(M,ce),Xe=me[0],st=me[1],Ut=C.length,Hn=M,gn=ce,mt=0;mt<Ut;mt++)(Mt=C[mt]).length===2?(Hn=Mt[0]*Xe+Hn,gn=Mt[1]*st+gn,$o(Hn,gn)):(jt=Mt[0]*Xe+Hn,Fr=Mt[1]*st+gn,Dr=Mt[2]*Xe+Hn,Zr=Mt[3]*st+gn,Hn=Mt[4]*Xe+Hn,gn=Mt[5]*st+gn,Ki(jt,Fr,Dr,Zr,Hn,gn));return Qe&&o0(),Pc(_e),this},d.path=function(C){for(var M=0;M<C.length;M++){var ce=C[M],me=ce.c;switch(ce.op){case"m":Mc(me[0],me[1]);break;case"l":$o(me[0],me[1]);break;case"c":Ki.apply(this,me);break;case"h":o0()}}return this},d.__private__.rect=d.rect=function(C,M,ce,me,_e){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||!OA(_e))throw new Error("Invalid arguments passed to jsPDF.rect");return N===F.COMPAT&&(me=-me),te([I(L(C)),I(Y(M)),I(L(ce)),I(L(me)),"re"].join(" ")),Pc(_e),this},d.__private__.triangle=d.triangle=function(C,M,ce,me,_e,Qe,Xe){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||isNaN(_e)||isNaN(Qe)||!OA(Xe))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[ce-C,me-M],[_e-ce,Qe-me],[C-_e,M-Qe]],C,M,[1,1],Xe,!0),this},d.__private__.roundedRect=d.roundedRect=function(C,M,ce,me,_e,Qe,Xe){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||isNaN(_e)||isNaN(Qe)||!OA(Xe))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var st=4/3*(Math.SQRT2-1);return _e=Math.min(_e,.5*ce),Qe=Math.min(Qe,.5*me),this.lines([[ce-2*_e,0],[_e*st,0,_e,Qe-Qe*st,_e,Qe],[0,me-2*Qe],[0,Qe*st,-_e*st,Qe,-_e,Qe],[2*_e-ce,0],[-_e*st,0,-_e,-Qe*st,-_e,-Qe],[0,2*Qe-me],[0,-Qe*st,_e*st,-Qe,_e,-Qe]],C+_e,M,[1,1],Xe,!0),this},d.__private__.ellipse=d.ellipse=function(C,M,ce,me,_e){if(isNaN(C)||isNaN(M)||isNaN(ce)||isNaN(me)||!OA(_e))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Qe=4/3*(Math.SQRT2-1)*ce,Xe=4/3*(Math.SQRT2-1)*me;return Mc(C+ce,M),Ki(C+ce,M-Xe,C+Qe,M-me,C,M-me),Ki(C-Qe,M-me,C-ce,M-Xe,C-ce,M),Ki(C-ce,M+Xe,C-Qe,M+me,C,M+me),Ki(C+Qe,M+me,C+ce,M+Xe,C+ce,M),Pc(_e),this},d.__private__.circle=d.circle=function(C,M,ce,me){if(isNaN(C)||isNaN(M)||isNaN(ce)||!OA(me))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(C,M,ce,ce,me)},d.setFont=function(C,M,ce){return ce&&(M=R(M,ce)),xt=n0(C,M,{disableWarning:!1}),this};var Sm=d.__private__.getFont=d.getFont=function(){return Qt[n0.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var C,M,ce={};for(C in Kt)if(Kt.hasOwnProperty(C))for(M in ce[C]=[],Kt[C])Kt[C].hasOwnProperty(M)&&ce[C].push(M);return ce},d.addFont=function(C,M,ce,me,_e){var Qe=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Qe.indexOf(arguments[3])!==-1?_e=arguments[3]:arguments[3]&&Qe.indexOf(arguments[3])==-1&&(ce=R(ce,me)),_e=_e||"Identity-H",Dc.call(this,C,M,ce,_e)};var zo,Rc=t.lineWidth||.200025,el=d.__private__.getLineWidth=d.getLineWidth=function(){return Rc},s0=d.__private__.setLineWidth=d.setLineWidth=function(C){return Rc=C,te(I(L(C))+" w"),this};d.__private__.setLineDash=Bt.API.setLineDash=Bt.API.setLineDashPattern=function(C,M){if(C=C||[],M=M||0,isNaN(M)||!Array.isArray(C))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return C=C.map(function(ce){return I(L(ce))}).join(" "),M=I(L(M)),te("["+C+"] "+M+" d"),this};var l0=d.__private__.getLineHeight=d.getLineHeight=function(){return We*zo};d.__private__.getLineHeight=d.getLineHeight=function(){return We*zo};var c0=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(C){return typeof(C=C||1.15)=="number"&&(zo=C),this},u0=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return zo};c0(t.lineHeight);var ci=d.__private__.getHorizontalCoordinate=function(C){return L(C)},Gi=d.__private__.getVerticalCoordinate=function(C){return N===F.ADVANCED?C:bt[_].mediaBox.topRightY-bt[_].mediaBox.bottomLeftY-L(C)},km=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(C){return I(ci(C))},ji=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(C){return I(Gi(C))},uA=t.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Ae(uA)},d.__private__.setStrokeColor=d.setDrawColor=function(C,M,ce,me){return uA=oe({ch1:C,ch2:M,ch3:ce,ch4:me,pdfColorType:"draw",precision:2}),te(uA),this};var Hc=t.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Ae(Hc)},d.__private__.setFillColor=d.setFillColor=function(C,M,ce,me){return Hc=oe({ch1:C,ch2:M,ch3:ce,ch4:me,pdfColorType:"fill",precision:2}),te(Hc),this};var Ko=t.textColor||"0 g",Tm=d.__private__.getTextColor=d.getTextColor=function(){return Ae(Ko)};d.__private__.setTextColor=d.setTextColor=function(C,M,ce,me){return Ko=oe({ch1:C,ch2:M,ch3:ce,ch4:me,pdfColorType:"text",precision:3}),this};var tl=t.charSpace,Nm=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(tl||0)};d.__private__.setCharSpace=d.setCharSpace=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return tl=C,this};var Vc=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(C){var M=d.CapJoinStyles[C];if(M===void 0)throw new Error("Line cap style of '"+C+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Vc=M,te(M+" J"),this};var $c=0;d.__private__.setLineJoin=d.setLineJoin=function(C){var M=d.CapJoinStyles[C];if(M===void 0)throw new Error("Line join style of '"+C+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return $c=M,te(M+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(C){if(C=C||0,isNaN(C))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return te(I(L(C))+" M"),this},d.GState=oh,d.setGState=function(C){(C=typeof C=="string"?Yt[on[C]]:h0(null,C)).equals(_t)||(te("/"+C.id+" gs"),_t=C)};var h0=function(C,M){if(!C||!on[C]){var ce=!1;for(var me in Yt)if(Yt.hasOwnProperty(me)&&Yt[me].equals(M)){ce=!0;break}if(ce)M=Yt[me];else{var _e="GS"+(Object.keys(Yt).length+1).toString(10);Yt[_e]=M,M.id=_e}return C&&(on[C]=M.id),$t.publish("addGState",M),M}};d.addGState=function(C,M){return h0(C,M),this},d.saveGraphicsState=function(){return te("q"),Jr.push({key:xt,size:We,color:Ko}),this},d.restoreGraphicsState=function(){te("Q");var C=Jr.pop();return xt=C.key,We=C.size,Ko=C.color,_t=null,this},d.setCurrentTransformationMatrix=function(C){return te(C.toString()+" cm"),this},d.comment=function(C){return te("#"+C),this};var rl=function(C,M){var ce=C||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return ce},set:function(Qe){isNaN(Qe)||(ce=parseFloat(Qe))}});var me=M||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return me},set:function(Qe){isNaN(Qe)||(me=parseFloat(Qe))}});var _e="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return _e},set:function(Qe){_e=Qe.toString()}}),this},zc=function(C,M,ce,me){rl.call(this,C,M),this.type="rect";var _e=ce||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return _e},set:function(Xe){isNaN(Xe)||(_e=parseFloat(Xe))}});var Qe=me||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Qe},set:function(Xe){isNaN(Xe)||(Qe=parseFloat(Xe))}}),this},Kc=function(){this.page=Gt,this.currentPage=_,this.pages=de.slice(0),this.pagesContext=bt.slice(0),this.x=ir,this.y=Lt,this.matrix=fr,this.width=Go(_),this.height=Wi(_),this.outputDestination=ne,this.id="",this.objectNumber=-1};Kc.prototype.restore=function(){Gt=this.page,_=this.currentPage,bt=this.pagesContext,de=this.pages,ir=this.x,Lt=this.y,fr=this.matrix,Gc(_,this.width),jc(_,this.height),ne=this.outputDestination};var f0=function(C,M,ce,me,_e){oa.push(new Kc),Gt=_=0,de=[],ir=C,Lt=M,fr=_e,Qc([ce,me])},Lm=function(C){if(Yn[C])oa.pop().restore();else{var M=new Kc,ce="Xo"+(Object.keys(Ir).length+1).toString(10);M.id=ce,Yn[C]=ce,Ir[ce]=M,$t.publish("addFormObject",M),oa.pop().restore()}};for(var nl in d.beginFormObject=function(C,M,ce,me,_e){return f0(C,M,ce,me,_e),this},d.endFormObject=function(C){return Lm(C),this},d.doFormObject=function(C,M){var ce=Ir[Yn[C]];return te("q"),te(M.toString()+" cm"),te("/"+ce.id+" Do"),te("Q"),this},d.getFormObject=function(C){var M=Ir[Yn[C]];return{x:M.x,y:M.y,width:M.width,height:M.height,matrix:M.matrix}},d.save=function(C,M){return C=C||"generated.pdf",(M=M||{}).returnPromise=M.returnPromise||!1,M.returnPromise===!1?(ho(Ys(li()),C),typeof ho.unload=="function"&&wt.setTimeout&&setTimeout(ho.unload,911),this):new Promise(function(ce,me){try{var _e=ho(Ys(li()),C);typeof ho.unload=="function"&&wt.setTimeout&&setTimeout(ho.unload,911),ce(_e)}catch(Qe){me(Qe.message)}})},Bt.API)Bt.API.hasOwnProperty(nl)&&(nl==="events"&&Bt.API.events.length?function(C,M){var ce,me,_e;for(_e=M.length-1;_e!==-1;_e--)ce=M[_e][0],me=M[_e][1],C.subscribe.apply(C,[ce].concat(typeof me=="function"?[me]:me))}($t,Bt.API.events):d[nl]=Bt.API[nl]);var Go=d.getPageWidth=function(C){return(bt[C=C||_].mediaBox.topRightX-bt[C].mediaBox.bottomLeftX)/tt},Gc=d.setPageWidth=function(C,M){bt[C].mediaBox.topRightX=M*tt+bt[C].mediaBox.bottomLeftX},Wi=d.getPageHeight=function(C){return(bt[C=C||_].mediaBox.topRightY-bt[C].mediaBox.bottomLeftY)/tt},jc=d.setPageHeight=function(C,M){bt[C].mediaBox.topRightY=M*tt+bt[C].mediaBox.bottomLeftY};return d.internal={pdfEscape:la,getStyle:i0,getFont:Sm,getFontSize:Je,getCharSpace:Nm,getTextColor:Tm,getLineHeight:l0,getLineHeightFactor:u0,getLineWidth:el,write:Pe,getHorizontalCoordinate:ci,getVerticalCoordinate:Gi,getCoordinateString:km,getVerticalCoordinateString:ji,collections:{},newObject:xr,newAdditionalObject:ie,newObjectDeferred:br,newObjectDeferredBegin:H,getFilters:Se,putStream:Ie,events:$t,scaleFactor:tt,pageSize:{getWidth:function(){return Go(_)},setWidth:function(C){Gc(_,C)},getHeight:function(){return Wi(_)},setHeight:function(C){jc(_,C)}},encryptionOptions:u,encryption:Rn,getEncryptor:xm,output:Js,getNumberOfPages:mm,pages:de,out:te,f2:q,f3:T,getPageInfo:A0,getPageInfoByObjId:Ft,getCurrentPageInfo:bm,getPDFVersion:g,Point:rl,Rectangle:zc,Matrix:gt,hasHotfix:a0},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return Go(_)},set:function(C){Gc(_,C)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return Wi(_)},set:function(C){jc(_,C)},enumerable:!0,configurable:!0}),gm.call(d,Ve),xt="F1",t0(a,r),$t.publish("initialized"),d}ss.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},ss.prototype.toHexString=function(t){return t.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ss.prototype.hexToBytes=function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(String.fromCharCode(parseInt(t.substr(r,2),16)));return e.join("")},ss.prototype.processOwnerPassword=function(t,e){return Wd(jd(e).substr(0,5),t)},ss.prototype.encryptor=function(t,e){var r=jd(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return Wd(r,n)}},oh.prototype.equals=function(t){var e,r="id,objectNumber,equals";if(!t||Xt(t)!==Xt(this))return!1;var n=0;for(e in this)if(!(r.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e)||this[e]!==t[e])return!1;n++}for(e in t)t.hasOwnProperty(e)&&r.indexOf(e)<0&&n--;return n===0},Bt.API={events:[]},Bt.version="2.5.1";var Sr=Bt.API,Xd=1,go=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},us=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},St=function(t){return t.toFixed(2)},Ni=function(t){return t.toFixed(5)};Sr.__acroform__={};var ea=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},pv=function(t){return t*Xd},bA=function(t){var e=new yv,r=ht.internal.getHeight(t)||0,n=ht.internal.getWidth(t)||0;return e.BBox=[0,0,Number(St(n)),Number(St(r))],e},xT=Sr.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|=1<<e},bT=Sr.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&=~(1<<e)},CT=Sr.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},Mr=Sr.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return CT(t,e-1)},Rr=Sr.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return xT(t,e-1)},Hr=Sr.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return bT(t,e-1)},ET=Sr.__acroform__.calculateCoordinates=function(t,e){var r=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,a=t[0],A=t[1],o=t[2],s=t[3],l={};return l.lowerLeft_X=r(a)||0,l.lowerLeft_Y=n(A+s)||0,l.upperRight_X=r(a+o)||0,l.upperRight_Y=n(A)||0,[Number(St(l.lowerLeft_X)),Number(St(l.lowerLeft_Y)),Number(St(l.upperRight_X)),Number(St(l.upperRight_Y))]},_T=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=qd(t,r),a=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+a+" "+St(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var A=bA(t);return A.scope=t.scope,A.stream=e.join(`
121
121
  `),A}},qd=function(t,e){var r=t.fontSize===0?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},a=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");a=t.multiline?a.map(function(T){return T.split(`
122
122
  `)}):a.map(function(T){return[T]});var A=r,o=ht.internal.getHeight(t)||0;o=o<0?-o:o;var s=ht.internal.getWidth(t)||0;s=s<0?-s:s;var l=function(T,L,G){if(T+1<a.length){var Y=L+" "+a[T+1][0];return sh(Y,t,G).width<=s-4}return!1};A++;e:for(;A>0;){e="",A--;var c,u,p=sh("3",t,A).height,h=t.multiline?o-A:(o-p)/2,d=h+=2,w=0,g=0,y=0;if(A<=0){e=`(...) Tj
123
123
  `,e+="% Width of Text: "+sh(e,t,A=12).width+", FieldWidth:"+s+`
124
- `;break}for(var m="",F=0,N=0;N<a.length;N++)if(a.hasOwnProperty(N)){var Q=!1;if(a[N].length!==1&&y!==a[N].length-1){if((p+2)*(F+2)+2>o)continue e;m+=a[N][y],Q=!0,g=N,N--}else{m=(m+=a[N][y]+" ").substr(m.length-1)==" "?m.substr(0,m.length-1):m;var z=parseInt(N),R=l(z,m,A),I=N>=a.length-1;if(R&&!I){m+=" ",y=0;continue}if(R||I){if(I)g=z;else if(t.multiline&&(p+2)*(F+2)+2>o)continue e}else{if(!t.multiline||(p+2)*(F+2)+2>o)continue e;g=z}}for(var U="",O=w;O<=g;O++){var q=a[O];if(t.multiline){if(O===g){U+=q[y]+" ",y=(y+1)%q.length;continue}if(O===w){U+=q[q.length-1]+" ";continue}}U+=q[0]+" "}switch(U=U.substr(U.length-1)==" "?U.substr(0,U.length-1):U,u=sh(U,t,A).width,t.textAlign){case"right":c=s-u-2;break;case"center":c=(s-u)/2;break;case"left":default:c=2}e+=Ft(c)+" "+Ft(d)+` Td
124
+ `;break}for(var m="",F=0,N=0;N<a.length;N++)if(a.hasOwnProperty(N)){var Q=!1;if(a[N].length!==1&&y!==a[N].length-1){if((p+2)*(F+2)+2>o)continue e;m+=a[N][y],Q=!0,g=N,N--}else{m=(m+=a[N][y]+" ").substr(m.length-1)==" "?m.substr(0,m.length-1):m;var z=parseInt(N),R=l(z,m,A),I=N>=a.length-1;if(R&&!I){m+=" ",y=0;continue}if(R||I){if(I)g=z;else if(t.multiline&&(p+2)*(F+2)+2>o)continue e}else{if(!t.multiline||(p+2)*(F+2)+2>o)continue e;g=z}}for(var U="",O=w;O<=g;O++){var q=a[O];if(t.multiline){if(O===g){U+=q[y]+" ",y=(y+1)%q.length;continue}if(O===w){U+=q[q.length-1]+" ";continue}}U+=q[0]+" "}switch(U=U.substr(U.length-1)==" "?U.substr(0,U.length-1):U,u=sh(U,t,A).width,t.textAlign){case"right":c=s-u-2;break;case"center":c=(s-u)/2;break;case"left":default:c=2}e+=St(c)+" "+St(d)+` Td
125
125
  `,e+="("+go(U)+`) Tj
126
- `,e+=-Ft(c)+` 0 Td
126
+ `,e+=-St(c)+` 0 Td
127
127
  `,d=-(A+2),u=0,w=Q?g:g+1,F++,m=""}break}return n.text=e,n.fontSize=A,n},sh=function(t,e,r){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),a=e.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:a}},FT={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},ST=function(t,e){var r={type:"reference",object:t};e.internal.getPageInfo(t.page).pageContext.annotations.find(function(n){return n.type===r.type&&n.object===r.object})===void 0&&e.internal.getPageInfo(t.page).pageContext.annotations.push(r)},kT=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){var n=r,a=t[r];e.internal.newObjectDeferredBegin(a.objId,!0),Xt(a)==="object"&&typeof a.putStream=="function"&&a.putStream(),delete t[n]}},TT=function(t,e){if(e.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(Ga.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(FT)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Xd=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new vv,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in n)if(n.hasOwnProperty(a)){var A=n[a];A.objId=void 0,A.hasAnnotation&&ST(A,r)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(r){(function(n,a){var A=!n;for(var o in n||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(o)){var s=n[o],l=[],c=s.Rect;if(s.Rect&&(s.Rect=ET(s.Rect,a)),a.internal.newObjectDeferredBegin(s.objId,!0),s.DA=ht.createDefaultAppearanceStream(s),Xt(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(l=s.getKeyValueListForStream()),s.Rect=c,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=_T(s);l.push({key:"AP",value:"<</N "+u+">>"}),a.internal.acroformPlugin.xForms.push(u)}if(s.appearanceStreamContent){var p="";for(var h in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(h)){var d=s.appearanceStreamContent[h];if(p+="/"+h+" ",p+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var o in d)if(d.hasOwnProperty(o)){var w=d[o];typeof w=="function"&&(w=w.call(a,s)),p+="/"+o+" "+w+" ",a.internal.acroformPlugin.xForms.indexOf(w)>=0||a.internal.acroformPlugin.xForms.push(w)}}else typeof(w=d)=="function"&&(w=w.call(a,s)),p+="/"+o+" "+w,a.internal.acroformPlugin.xForms.indexOf(w)>=0||a.internal.acroformPlugin.xForms.push(w);p+=">>"}l.push({key:"AP",value:`<<
128
128
  `+p+">>"})}a.internal.putStream({additionalKeyValues:l,objectId:s.objId}),a.internal.out("endobj")}A&&kT(a.internal.acroformPlugin.xForms,a)})(r,t)}),t.internal.acroformPlugin.isInitialized=!0}},mv=Sr.__acroform__.arrayToPdfArray=function(t,e,r){var n=function(o){return o};if(Array.isArray(t)){for(var a="[",A=0;A<t.length;A++)switch(A!==0&&(a+=" "),Xt(t[A])){case"boolean":case"number":case"object":a+=t[A].toString();break;case"string":t[A].substr(0,1)!=="/"?(e!==void 0&&r&&(n=r.internal.getEncryptor(e)),a+="("+go(n(t[A].toString()))+")"):a+=t[A].toString()}return a+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Yd=function(t,e,r){var n=function(a){return a};return e!==void 0&&r&&(n=r.internal.getEncryptor(e)),(t=t||"").toString(),t="("+go(n(t))+")"},CA=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};CA.prototype.toString=function(){return this.objId+" 0 R"},CA.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},CA.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter(function(A){return A!="content"&&A!="appearanceStreamContent"&&A!="scope"&&A!="objId"&&A.substring(0,1)!="_"});for(var r in e)if(Object.getOwnPropertyDescriptor(this,e[r]).configurable===!1){var n=e[r],a=this[n];a&&(Array.isArray(a)?t.push({key:n,value:mv(a,this.objId,this.scope)}):a instanceof CA?(a.scope=this.scope,t.push({key:n,value:a.objId+" 0 R"})):typeof a!="function"&&t.push({key:n,value:a}))}return t};var yv=function(){CA.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){t=r.trim()},get:function(){return t||null}})};ea(yv,CA);var vv=function(){CA.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var r=function(n){return n};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+go(r(t))+")"}},set:function(r){t=r}})};ea(vv,CA);var Ga=function t(){CA.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute F supplied.');e=m}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Mr(e,3)},set:function(m){m?this.F=Rr(e,3):this.F=Hr(e,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute Ff supplied.');r=m}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(m){n=m!==void 0?m:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(m){n[0]=m}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(m){n[1]=m}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(m){n[2]=m}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(m){n[3]=m}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(m){switch(m){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=m;break;default:throw new Error('Invalid value "'+m+'" for attribute FT supplied.')}}});var A=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!A||A.length<1){if(this instanceof uh)return;A="FieldObject"+t.FieldNum++}var m=function(F){return F};return this.scope&&(m=this.scope.internal.getEncryptor(this.objId)),"("+go(m(A))+")"},set:function(m){A=m.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return A},set:function(m){A=m}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(m){o=m}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(m){s=m}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(m){l=m}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return c===void 0?50/Xd:c},set:function(m){c=m}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(m){u=m}});var p="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!p||this instanceof uh||this instanceof po))return Yd(p,this.objId,this.scope)},set:function(m){m=m.toString(),p=m}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof cn?h:Yd(h,this.objId,this.scope)},set:function(m){m=m.toString(),h=this instanceof cn?m:m.substr(0,1)==="("?us(m.substr(1,m.length-2)):us(m)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof cn?us(h.substr(1,h.length-1)):h},set:function(m){m=m.toString(),h=this instanceof cn?"/"+m:m}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(m){this.V=m}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof cn?d:Yd(d,this.objId,this.scope)},set:function(m){m=m.toString(),d=this instanceof cn?m:m.substr(0,1)==="("?us(m.substr(1,m.length-2)):us(m)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof cn?us(d.substr(1,d.length-1)):d},set:function(m){m=m.toString(),d=this instanceof cn?"/"+m:m}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var w,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(m){m=!!m,g=m}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(w)return w},set:function(m){w=m}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,1)},set:function(m){m?this.Ff=Rr(this.Ff,1):this.Ff=Hr(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,2)},set:function(m){m?this.Ff=Rr(this.Ff,2):this.Ff=Hr(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,3)},set:function(m){m?this.Ff=Rr(this.Ff,3):this.Ff=Hr(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(m){if([0,1,2].indexOf(m)===-1)throw new Error('Invalid value "'+m+'" for attribute Q supplied.');y=m}}),Object.defineProperty(this,"textAlign",{get:function(){var m;switch(y){case 0:default:m="left";break;case 1:m="center";break;case 2:m="right"}return m},configurable:!0,enumerable:!0,set:function(m){switch(m){case"right":case 2:y=2;break;case"center":case 1:y=1;break;case"left":case 0:default:y=0}}})};ea(Ga,CA);var hs=function(){Ga.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(r){t=r}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return mv(e,this.objId,this.scope)},set:function(r){var n,a;a=[],typeof(n=r)=="string"&&(a=function(A,o,s){s||(s=1);for(var l,c=[];l=o.exec(A);)c.push(l[s]);return c}(n,/\((.*?)\)/g)),e=a}}),this.getOptions=function(){return e},this.setOptions=function(r){e=r,this.sort&&e.sort()},this.addOption=function(r){r=(r=r||"").toString(),e.push(r),this.sort&&e.sort()},this.removeOption=function(r,n){for(n=n||!1,r=(r=r||"").toString();e.indexOf(r)!==-1&&(e.splice(e.indexOf(r),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,18)},set:function(r){r?this.Ff=Rr(this.Ff,18):this.Ff=Hr(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=Rr(this.Ff,19):this.Ff=Hr(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,20)},set:function(r){r?(this.Ff=Rr(this.Ff,20),e.sort()):this.Ff=Hr(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,22)},set:function(r){r?this.Ff=Rr(this.Ff,22):this.Ff=Hr(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,23)},set:function(r){r?this.Ff=Rr(this.Ff,23):this.Ff=Hr(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,27)},set:function(r){r?this.Ff=Rr(this.Ff,27):this.Ff=Hr(this.Ff,27)}}),this.hasAppearanceStream=!1};ea(hs,Ga);var fs=function(){hs.call(this),this.fontName="helvetica",this.combo=!1};ea(fs,hs);var ds=function(){fs.call(this),this.combo=!0};ea(ds,fs);var lh=function(){ds.call(this),this.edit=!0};ea(lh,ds);var cn=function(){Ga.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,15)},set:function(r){r?this.Ff=Rr(this.Ff,15):this.Ff=Hr(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,16)},set:function(r){r?this.Ff=Rr(this.Ff,16):this.Ff=Hr(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,17)},set:function(r){r?this.Ff=Rr(this.Ff,17):this.Ff=Hr(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,26)},set:function(r){r?this.Ff=Rr(this.Ff,26):this.Ff=Hr(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(A){return A};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var n,a=[];for(n in a.push("<<"),e)a.push("/"+n+" ("+go(r(e[n]))+")");return a.push(">>"),a.join(`
129
129
  `)}},set:function(r){Xt(r)==="object"&&(e=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(r){typeof r=="string"&&(e.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(r){t="/"+r}})};ea(cn,Ga);var ch=function(){cn.call(this),this.pushButton=!0};ea(ch,cn);var gs=function(){cn.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e!==void 0?e:[]}})};ea(gs,cn);var uh=function(){var t,e;Ga.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(a){t=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(a){e=a}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(s){return s};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var A,o=[];for(A in o.push("<<"),n)o.push("/"+A+" ("+go(a(n[A]))+")");return o.push(">>"),o.join(`
130
- `)},set:function(a){Xt(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(a){r=a}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(a){r="/"+a}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=ht.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ea(uh,Ga),gs.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},gs.prototype.createOption=function(t){var e=new uh;return e.Parent=this,e.optionName=t,this.Kids.push(e),NT.call(this.scope,e),e};var hh=function(){cn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ht.CheckBox.createAppearanceStream()};ea(hh,cn);var po=function(){Ga.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,13)},set:function(e){e?this.Ff=Rr(this.Ff,13):this.Ff=Hr(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,21)},set:function(e){e?this.Ff=Rr(this.Ff,21):this.Ff=Hr(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,23)},set:function(e){e?this.Ff=Rr(this.Ff,23):this.Ff=Hr(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,24)},set:function(e){e?this.Ff=Rr(this.Ff,24):this.Ff=Hr(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,25)},set:function(e){e?this.Ff=Rr(this.Ff,25):this.Ff=Hr(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,26)},set:function(e){e?this.Ff=Rr(this.Ff,26):this.Ff=Hr(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};ea(po,Ga);var fh=function(){po.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,14)},set:function(t){t?this.Ff=Rr(this.Ff,14):this.Ff=Hr(this.Ff,14)}}),this.password=!0};ea(fh,po);var ht={CheckBox:{createAppearanceStream:function(){return{N:{On:ht.CheckBox.YesNormal},D:{On:ht.CheckBox.YesPushDown,Off:ht.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,a=t.scope.__private__.encodeColorString(t.color),A=qd(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+Ft(ht.internal.getWidth(t))+" "+Ft(ht.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+Ft(A.fontSize)+" Tf "+a),r.push("BT"),r.push(A.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join(`
131
- `),e},YesNormal:function(t){var e=bA(t);e.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),a=[],A=ht.internal.getHeight(t),o=ht.internal.getWidth(t),s=qd(t,t.caption);return a.push("1 g"),a.push("0 0 "+Ft(o)+" "+Ft(A)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+Ft(o-1)+" "+Ft(A-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+r+" "+Ft(s.fontSize)+" Tf "+n),a.push(s.text),a.push("ET"),a.push("Q"),e.stream=a.join(`
132
- `),e},OffPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Ft(ht.internal.getWidth(t))+" "+Ft(ht.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
130
+ `)},set:function(a){Xt(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(a){r=a}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(a){r="/"+a}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=ht.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ea(uh,Ga),gs.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},gs.prototype.createOption=function(t){var e=new uh;return e.Parent=this,e.optionName=t,this.Kids.push(e),NT.call(this.scope,e),e};var hh=function(){cn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ht.CheckBox.createAppearanceStream()};ea(hh,cn);var po=function(){Ga.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,13)},set:function(e){e?this.Ff=Rr(this.Ff,13):this.Ff=Hr(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,21)},set:function(e){e?this.Ff=Rr(this.Ff,21):this.Ff=Hr(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,23)},set:function(e){e?this.Ff=Rr(this.Ff,23):this.Ff=Hr(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,24)},set:function(e){e?this.Ff=Rr(this.Ff,24):this.Ff=Hr(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,25)},set:function(e){e?this.Ff=Rr(this.Ff,25):this.Ff=Hr(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,26)},set:function(e){e?this.Ff=Rr(this.Ff,26):this.Ff=Hr(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};ea(po,Ga);var fh=function(){po.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Mr(this.Ff,14)},set:function(t){t?this.Ff=Rr(this.Ff,14):this.Ff=Hr(this.Ff,14)}}),this.password=!0};ea(fh,po);var ht={CheckBox:{createAppearanceStream:function(){return{N:{On:ht.CheckBox.YesNormal},D:{On:ht.CheckBox.YesPushDown,Off:ht.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,a=t.scope.__private__.encodeColorString(t.color),A=qd(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+St(ht.internal.getWidth(t))+" "+St(ht.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+St(A.fontSize)+" Tf "+a),r.push("BT"),r.push(A.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join(`
131
+ `),e},YesNormal:function(t){var e=bA(t);e.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),a=[],A=ht.internal.getHeight(t),o=ht.internal.getWidth(t),s=qd(t,t.caption);return a.push("1 g"),a.push("0 0 "+St(o)+" "+St(A)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+St(o-1)+" "+St(A-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+r+" "+St(s.fontSize)+" Tf "+n),a.push(s.text),a.push("ET"),a.push("Q"),e.stream=a.join(`
132
+ `),e},OffPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+St(ht.internal.getWidth(t))+" "+St(ht.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
133
133
  `),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:ht.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=ht.RadioButton.Circle.YesNormal,e.D[t]=ht.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=ht.internal.getWidth(t)<=ht.internal.getHeight(t)?ht.internal.getWidth(t)/4:ht.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var a=ht.internal.Bezier_C,A=Number((n*a).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+Ni(ht.internal.getWidth(t)/2)+" "+Ni(ht.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+A+" "+A+" "+n+" 0 "+n+" c"),r.push("-"+A+" "+n+" -"+n+" "+A+" -"+n+" 0 c"),r.push("-"+n+" -"+A+" -"+A+" -"+n+" 0 -"+n+" c"),r.push(A+" -"+n+" "+n+" -"+A+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join(`
134
134
  `),e},YesPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=ht.internal.getWidth(t)<=ht.internal.getHeight(t)?ht.internal.getWidth(t)/4:ht.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),A=Number((a*ht.internal.Bezier_C).toFixed(5)),o=Number((n*ht.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Ni(ht.internal.getWidth(t)/2)+" "+Ni(ht.internal.getHeight(t)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+A+" "+A+" "+a+" 0 "+a+" c"),r.push("-"+A+" "+a+" -"+a+" "+A+" -"+a+" 0 c"),r.push("-"+a+" -"+A+" -"+A+" -"+a+" 0 -"+a+" c"),r.push(A+" -"+a+" "+a+" -"+A+" "+a+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+Ni(ht.internal.getWidth(t)/2)+" "+Ni(ht.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join(`
135
135
  `),e},OffPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=ht.internal.getWidth(t)<=ht.internal.getHeight(t)?ht.internal.getWidth(t)/4:ht.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),A=Number((a*ht.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Ni(ht.internal.getWidth(t)/2)+" "+Ni(ht.internal.getHeight(t)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+A+" "+A+" "+a+" 0 "+a+" c"),r.push("-"+A+" "+a+" -"+a+" "+A+" -"+a+" 0 c"),r.push("-"+a+" -"+A+" -"+A+" -"+a+" 0 -"+a+" c"),r.push(A+" -"+a+" "+a+" -"+A+" "+a+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join(`
136
- `),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:ht.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=ht.RadioButton.Cross.YesNormal,e.D[t]=ht.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=ht.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+Ft(ht.internal.getWidth(t)-2)+" "+Ft(ht.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(Ft(n.x1.x)+" "+Ft(n.x1.y)+" m"),r.push(Ft(n.x2.x)+" "+Ft(n.x2.y)+" l"),r.push(Ft(n.x4.x)+" "+Ft(n.x4.y)+" m"),r.push(Ft(n.x3.x)+" "+Ft(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
137
- `),e},YesPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=ht.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+Ft(ht.internal.getWidth(t))+" "+Ft(ht.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Ft(ht.internal.getWidth(t)-2)+" "+Ft(ht.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(Ft(r.x1.x)+" "+Ft(r.x1.y)+" m"),n.push(Ft(r.x2.x)+" "+Ft(r.x2.y)+" l"),n.push(Ft(r.x4.x)+" "+Ft(r.x4.y)+" m"),n.push(Ft(r.x3.x)+" "+Ft(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
138
- `),e},OffPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Ft(ht.internal.getWidth(t))+" "+Ft(ht.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
136
+ `),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:ht.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=ht.RadioButton.Cross.YesNormal,e.D[t]=ht.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=bA(t);e.scope=t.scope;var r=[],n=ht.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+St(ht.internal.getWidth(t)-2)+" "+St(ht.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(St(n.x1.x)+" "+St(n.x1.y)+" m"),r.push(St(n.x2.x)+" "+St(n.x2.y)+" l"),r.push(St(n.x4.x)+" "+St(n.x4.y)+" m"),r.push(St(n.x3.x)+" "+St(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
137
+ `),e},YesPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=ht.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+St(ht.internal.getWidth(t))+" "+St(ht.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+St(ht.internal.getWidth(t)-2)+" "+St(ht.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(St(r.x1.x)+" "+St(r.x1.y)+" m"),n.push(St(r.x2.x)+" "+St(r.x2.y)+" l"),n.push(St(r.x4.x)+" "+St(r.x4.y)+" m"),n.push(St(r.x3.x)+" "+St(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
138
+ `),e},OffPushDown:function(t){var e=bA(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+St(ht.internal.getWidth(t))+" "+St(ht.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
139
139
  `),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};ht.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=ht.internal.getWidth(t),r=ht.internal.getHeight(t),n=Math.min(e,r);return{x1:{x:(e-n)/2,y:(r-n)/2+n},x2:{x:(e-n)/2+n,y:(r-n)/2},x3:{x:(e-n)/2,y:(r-n)/2},x4:{x:(e-n)/2+n,y:(r-n)/2+n}}}},ht.internal.getWidth=function(t){var e=0;return Xt(t)==="object"&&(e=pv(t.Rect[2])),e},ht.internal.getHeight=function(t){var e=0;return Xt(t)==="object"&&(e=pv(t.Rect[3])),e};var NT=Sr.addField=function(t){if(TT(this,t),!(t instanceof Ga))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};Sr.AcroFormChoiceField=hs,Sr.AcroFormListBox=fs,Sr.AcroFormComboBox=ds,Sr.AcroFormEditBox=lh,Sr.AcroFormButton=cn,Sr.AcroFormPushButton=ch,Sr.AcroFormRadioButton=gs,Sr.AcroFormCheckBox=hh,Sr.AcroFormTextField=po,Sr.AcroFormPasswordField=fh,Sr.AcroFormAppearance=ht,Sr.AcroForm={ChoiceField:hs,ListBox:fs,ComboBox:ds,EditBox:lh,Button:cn,PushButton:ch,RadioButton:gs,CheckBox:hh,TextField:po,PasswordField:fh,Appearance:ht},Bt.AcroForm={ChoiceField:hs,ListBox:fs,ComboBox:ds,EditBox:lh,Button:cn,PushButton:ch,RadioButton:gs,CheckBox:hh,TextField:po,PasswordField:fh,Appearance:ht};function wv(t){return t.reduce(function(e,r,n){return e[r]=n,e},{})}(function(t){t.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=t.__addimage__.getImageFileTypeByImageData=function(T,L){var G,Y,se,he,ge,re=e;if((L=L||e)==="RGBA"||T.data!==void 0&&T.data instanceof Uint8ClampedArray&&"height"in T&&"width"in T)return"RGBA";if(R(T))for(ge in r)for(se=r[ge],G=0;G<se.length;G+=1){for(he=!0,Y=0;Y<se[G].length;Y+=1)if(se[G][Y]!==void 0&&se[G][Y]!==T[Y]){he=!1;break}if(he===!0){re=ge;break}}else for(ge in r)for(se=r[ge],G=0;G<se.length;G+=1){for(he=!0,Y=0;Y<se[G].length;Y+=1)if(se[G][Y]!==void 0&&se[G][Y]!==T.charCodeAt(Y)){he=!1;break}if(he===!0){re=ge;break}}return re===e&&L!==e&&(re=L),re},a=function T(L){for(var G=this.internal.write,Y=this.internal.putStream,se=(0,this.internal.getFilters)();se.indexOf("FlateEncode")!==-1;)se.splice(se.indexOf("FlateEncode"),1);L.objectId=this.internal.newObject();var he=[];if(he.push({key:"Type",value:"/XObject"}),he.push({key:"Subtype",value:"/Image"}),he.push({key:"Width",value:L.width}),he.push({key:"Height",value:L.height}),L.colorSpace===y.INDEXED?he.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(L.palette.length/3-1)+" "+("sMask"in L&&L.sMask!==void 0?L.objectId+2:L.objectId+1)+" 0 R]"}):(he.push({key:"ColorSpace",value:"/"+L.colorSpace}),L.colorSpace===y.DEVICE_CMYK&&he.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),he.push({key:"BitsPerComponent",value:L.bitsPerComponent}),"decodeParameters"in L&&L.decodeParameters!==void 0&&he.push({key:"DecodeParms",value:"<<"+L.decodeParameters+">>"}),"transparency"in L&&Array.isArray(L.transparency)){for(var ge="",re=0,le=L.transparency.length;re<le;re++)ge+=L.transparency[re]+" "+L.transparency[re]+" ";he.push({key:"Mask",value:"["+ge+"]"})}L.sMask!==void 0&&he.push({key:"SMask",value:L.objectId+1+" 0 R"});var fe=L.filter!==void 0?["/"+L.filter]:void 0;if(Y({data:L.data,additionalKeyValues:he,alreadyAppliedFilters:fe,objectId:L.objectId}),G("endobj"),"sMask"in L&&L.sMask!==void 0){var Ue="/Predictor "+L.predictor+" /Colors 1 /BitsPerComponent "+L.bitsPerComponent+" /Columns "+L.width,b={width:L.width,height:L.height,colorSpace:"DeviceGray",bitsPerComponent:L.bitsPerComponent,decodeParameters:Ue,data:L.sMask};"filter"in L&&(b.filter=L.filter),T.call(this,b)}if(L.colorSpace===y.INDEXED){var _=this.internal.newObject();Y({data:U(new Uint8Array(L.palette)),objectId:_}),G("endobj")}},A=function(){var T=this.internal.collections.addImage_images;for(var L in T)a.call(this,T[L])},o=function(){var T,L=this.internal.collections.addImage_images,G=this.internal.write;for(var Y in L)G("/I"+(T=L[Y]).index,T.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",A),this.internal.events.subscribe("putXobjectDict",o))},l=function(){var T=this.internal.collections.addImage_images;return s.call(this),T},c=function(){return Object.keys(this.internal.collections.addImage_images).length},u=function(T){return typeof t["process"+T.toUpperCase()]=="function"},p=function(T){return Xt(T)==="object"&&T.nodeType===1},h=function(T,L){if(T.nodeName==="IMG"&&T.hasAttribute("src")){var G=""+T.getAttribute("src");if(G.indexOf("data:image/")===0)return Vl(unescape(G).split("base64,").pop());var Y=t.loadFile(G,!0);if(Y!==void 0)return Y}if(T.nodeName==="CANVAS"){if(T.width===0||T.height===0)throw new Error("Given canvas must have data. Canvas width: "+T.width+", height: "+T.height);var se;switch(L){case"PNG":se="image/png";break;case"WEBP":se="image/webp";break;case"JPEG":case"JPG":default:se="image/jpeg"}return Vl(T.toDataURL(se,1).split("base64,").pop())}},d=function(T){var L=this.internal.collections.addImage_images;if(L){for(var G in L)if(T===L[G].alias)return L[G]}},w=function(T,L,G){return T||L||(T=-96,L=-96),T<0&&(T=-1*G.width*72/T/this.internal.scaleFactor),L<0&&(L=-1*G.height*72/L/this.internal.scaleFactor),T===0&&(T=L*G.width/G.height),L===0&&(L=T*G.height/G.width),[T,L]},g=function(T,L,G,Y,se,he){var ge=w.call(this,G,Y,se),re=this.internal.getCoordinateString,le=this.internal.getVerticalCoordinateString,fe=l.call(this);if(G=ge[0],Y=ge[1],fe[se.index]=se,he){he*=Math.PI/180;var Ue=Math.cos(he),b=Math.sin(he),_=function(x){return x.toFixed(4)},B=[_(Ue),_(b),_(-1*b),_(Ue),0,0,"cm"]}this.internal.write("q"),he?(this.internal.write([1,"0","0",1,re(T),le(L+Y),"cm"].join(" ")),this.internal.write(B.join(" ")),this.internal.write([re(G),"0","0",re(Y),"0","0","cm"].join(" "))):this.internal.write([re(G),"0","0",re(Y),re(T),le(L+Y),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+se.index+" Do"),this.internal.write("Q")},y=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var m=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},F=t.__addimage__.sHashCode=function(T){var L,G,Y=0;if(typeof T=="string")for(G=T.length,L=0;L<G;L++)Y=(Y<<5)-Y+T.charCodeAt(L),Y|=0;else if(R(T))for(G=T.byteLength/2,L=0;L<G;L++)Y=(Y<<5)-Y+T[L],Y|=0;return Y},N=t.__addimage__.validateStringAsBase64=function(T){(T=T||"").toString().trim();var L=!0;return T.length===0&&(L=!1),T.length%4!=0&&(L=!1),/^[A-Za-z0-9+/]+$/.test(T.substr(0,T.length-2))===!1&&(L=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(T.substr(-2))===!1&&(L=!1),L},Q=t.__addimage__.extractImageFromDataUrl=function(T){var L=(T=T||"").split("base64,"),G=null;if(L.length===2){var Y=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(L[0]);Array.isArray(Y)&&(G={mimeType:Y[1],charset:Y[2],data:L[1]})}return G},z=t.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};t.__addimage__.isArrayBuffer=function(T){return z()&&T instanceof ArrayBuffer};var R=t.__addimage__.isArrayBufferView=function(T){return z()&&typeof Uint32Array<"u"&&(T instanceof Int8Array||T instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&T instanceof Uint8ClampedArray||T instanceof Int16Array||T instanceof Uint16Array||T instanceof Int32Array||T instanceof Uint32Array||T instanceof Float32Array||T instanceof Float64Array)},I=t.__addimage__.binaryStringToUint8Array=function(T){for(var L=T.length,G=new Uint8Array(L),Y=0;Y<L;Y++)G[Y]=T.charCodeAt(Y);return G},U=t.__addimage__.arrayBufferToBinaryString=function(T){for(var L="",G=R(T)?T:new Uint8Array(T),Y=0;Y<G.length;Y+=8192)L+=String.fromCharCode.apply(null,G.subarray(Y,Y+8192));return L};t.addImage=function(){var T,L,G,Y,se,he,ge,re,le;if(typeof arguments[1]=="number"?(L=e,G=arguments[1],Y=arguments[2],se=arguments[3],he=arguments[4],ge=arguments[5],re=arguments[6],le=arguments[7]):(L=arguments[1],G=arguments[2],Y=arguments[3],se=arguments[4],he=arguments[5],ge=arguments[6],re=arguments[7],le=arguments[8]),Xt(T=arguments[0])==="object"&&!p(T)&&"imageData"in T){var fe=T;T=fe.imageData,L=fe.format||L||e,G=fe.x||G||0,Y=fe.y||Y||0,se=fe.w||fe.width||se,he=fe.h||fe.height||he,ge=fe.alias||ge,re=fe.compression||re,le=fe.rotation||fe.angle||le}var Ue=this.internal.getFilters();if(re===void 0&&Ue.indexOf("FlateEncode")!==-1&&(re="SLOW"),isNaN(G)||isNaN(Y))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var b=O.call(this,T,L,ge,re);return g.call(this,G,Y,se,he,b,le),this};var O=function(T,L,G,Y){var se,he,ge;if(typeof T=="string"&&n(T)===e){T=unescape(T);var re=q(T,!1);(re!==""||(re=t.loadFile(T,!0))!==void 0)&&(T=re)}if(p(T)&&(T=h(T,L)),L=n(T,L),!u(L))throw new Error("addImage does not support files of type '"+L+"', please ensure that a plugin for '"+L+"' support is added.");if(((ge=G)==null||ge.length===0)&&(G=function(le){return typeof le=="string"||R(le)?F(le):R(le.data)?F(le.data):null}(T)),(se=d.call(this,G))||(z()&&(T instanceof Uint8Array||L==="RGBA"||(he=T,T=I(T))),se=this["process"+L.toUpperCase()](T,c.call(this),G,function(le){return le&&typeof le=="string"&&(le=le.toUpperCase()),le in t.image_compression?le:m.NONE}(Y),he)),!se)throw new Error("An unknown error occurred whilst processing the image.");return se},q=t.__addimage__.convertBase64ToBinaryString=function(T,L){var G;L=typeof L!="boolean"||L;var Y,se="";if(typeof T=="string"){Y=(G=Q(T))!==null?G.data:T;try{se=Vl(Y)}catch(he){if(L)throw N(Y)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+he.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return se};t.getImageProperties=function(T){var L,G,Y="";if(p(T)&&(T=h(T)),typeof T=="string"&&n(T)===e&&((Y=q(T,!1))===""&&(Y=t.loadFile(T)||""),T=Y),G=n(T),!u(G))throw new Error("addImage does not support files of type '"+G+"', please ensure that a plugin for '"+G+"' support is added.");if(!z()||T instanceof Uint8Array||(T=I(T)),!(L=this["process"+G.toUpperCase()](T)))throw new Error("An unknown error occurred whilst processing the image");return L.fileType=G,L}})(Bt.API),function(t){var e=function(r){if(r!==void 0&&r!="")return!0};Bt.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(r){for(var n,a,A,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(r.objId),c=r.pageContext.annotations,u=!1,p=0;p<c.length&&!u;p++)switch((n=c[p]).type){case"link":(e(n.options.url)||e(n.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(u!=0){this.internal.write("/Annots [");for(var h=0;h<c.length;h++){n=c[h];var d=this.internal.pdfEscape,w=this.internal.getEncryptor(r.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var g=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(g.objId),F=n.title||"Note";A="<</Type /Annot /Subtype /Text "+(a="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y)+"] ")+"/Contents ("+d(m(n.contents))+")",A+=" /Popup "+y.objId+" 0 R",A+=" /P "+l.objId+" 0 R",A+=" /T ("+d(m(F))+") >>",g.content=A;var N=g.objId+" 0 R";A="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+o(n.bounds.x+30)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w+30)+" "+s(n.bounds.y)+"] ")+" /Parent "+N,n.open&&(A+=" /Open true"),A+=" >>",y.content=A,this.internal.write(g.objId,"0 R",y.objId,"0 R");break;case"freetext":a="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y+n.bounds.h)+"] ";var Q=n.color||"#000000";A="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+d(w(n.contents))+")",A+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+Q+")",A+=" /Border [0 0 0]",A+=" >>",this.internal.write(A);break;case"link":if(n.options.name){var z=this.annotations._nameMap[n.options.name];n.options.pageNumber=z.page,n.options.top=z.y}else n.options.top||(n.options.top=0);if(a="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",A="",n.options.url)A="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+d(w(n.options.url))+") >>";else if(n.options.pageNumber)switch(A="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":A+=" /Fit]";break;case"FitH":A+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,A+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var R=s(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),A+=" /XYZ "+n.options.left+" "+R+" "+n.options.zoom+"]"}A!=""&&(A+=" >>",this.internal.write(A))}}this.internal.write("]")}}]),t.createAnnotation=function(r){var n=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":n.pageContext.annotations.push(r)}},t.link=function(r,n,a,A,o){var s=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:l(r),y:c(n),w:l(r+a),h:c(n+A)},options:o,type:"link"})},t.textWithLink=function(r,n,a,A){var o,s,l=this.getTextWidth(r),c=this.internal.getLineHeight()/this.internal.scaleFactor;if(A.maxWidth!==void 0){s=A.maxWidth;var u=this.splitTextToSize(r,s).length;o=Math.ceil(c*u)}else s=l,o=c;return this.text(r,n,a,A),a+=.2*c,A.align==="center"&&(n-=l/2),A.align==="right"&&(n-=l),this.link(n,a-c,s,o,A),l},t.getTextWidth=function(r){var n=this.internal.getFontSize();return this.getStringUnitWidth(r)*n/this.internal.scaleFactor}}(Bt.API),function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];t.__arabicParser__={};var A=t.__arabicParser__.isInArabicSubstitutionA=function(g){return e[g.charCodeAt(0)]!==void 0},o=t.__arabicParser__.isArabicLetter=function(g){return typeof g=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(g)},s=t.__arabicParser__.isArabicEndLetter=function(g){return o(g)&&A(g)&&e[g.charCodeAt(0)].length<=2},l=t.__arabicParser__.isArabicAlfLetter=function(g){return o(g)&&a.indexOf(g.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(g){return o(g)&&A(g)&&e[g.charCodeAt(0)].length>=1};var c=t.__arabicParser__.arabicLetterHasFinalForm=function(g){return o(g)&&A(g)&&e[g.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(g){return o(g)&&A(g)&&e[g.charCodeAt(0)].length>=3};var u=t.__arabicParser__.arabicLetterHasMedialForm=function(g){return o(g)&&A(g)&&e[g.charCodeAt(0)].length==4},p=t.__arabicParser__.resolveLigatures=function(g){var y=0,m=r,F="",N=0;for(y=0;y<g.length;y+=1)m[g.charCodeAt(y)]!==void 0?(N++,typeof(m=m[g.charCodeAt(y)])=="number"&&(F+=String.fromCharCode(m),m=r,N=0),y===g.length-1&&(m=r,F+=g.charAt(y-(N-1)),y-=N-1,N=0)):(m=r,F+=g.charAt(y-N),y-=N,N=0);return F};t.__arabicParser__.isArabicDiacritic=function(g){return g!==void 0&&n[g.charCodeAt(0)]!==void 0};var h=t.__arabicParser__.getCorrectForm=function(g,y,m){return o(g)?A(g)===!1?-1:!c(g)||!o(y)&&!o(m)||!o(m)&&s(y)||s(g)&&!o(y)||s(g)&&l(y)||s(g)&&s(y)?0:u(g)&&o(y)&&!s(y)&&o(m)&&c(m)?3:s(g)||!o(m)?1:2:-1},d=function(g){var y=0,m=0,F=0,N="",Q="",z="",R=(g=g||"").split("\\s+"),I=[];for(y=0;y<R.length;y+=1){for(I.push(""),m=0;m<R[y].length;m+=1)N=R[y][m],Q=R[y][m-1],z=R[y][m+1],o(N)?(F=h(N,Q,z),I[y]+=F!==-1?String.fromCharCode(e[N.charCodeAt(0)][F]):N):I[y]+=N;I[y]=p(I[y])}return I.join(" ")},w=t.__arabicParser__.processArabic=t.processArabic=function(){var g,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,m=[];if(Array.isArray(y)){var F=0;for(m=[],F=0;F<y.length;F+=1)Array.isArray(y[F])?m.push([d(y[F][0]),y[F][1],y[F][2]]):m.push([d(y[F])]);g=m}else g=d(y);return typeof arguments[0]=="string"?g:(arguments[0].text=g,arguments[0])};t.events.push(["preProcessText",w])}(Bt.API),Bt.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},function(t){var e=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(s){r=s}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(s){a=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var A=[];Object.defineProperty(this,"childNodes",{get:function(){return A},set:function(s){A=s}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(s){o=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(r,n){var a;if((r=r||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(Bt.API),function(t){var e={left:0,top:0,bottom:0,right:0},r=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new A,this.internal.__cell__.pages=1},A=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(g){l=g}});var c=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return c},set:function(g){c=g}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(g){u=g}});var p=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return p},set:function(g){p=g}});var h=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return h},set:function(g){h=g}});var d=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return d},set:function(g){d=g}});var w=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return w},set:function(g){w=g}}),this};A.prototype.clone=function(){return new A(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},A.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(l){return n.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},t.getTextDimensions=function(l,c){n.call(this);var u=(c=c||{}).fontSize||this.getFontSize(),p=c.font||this.getFont(),h=c.scaleFactor||this.internal.scaleFactor,d=0,w=0,g=0,y=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var m=c.maxWidth;m>0?typeof l=="string"?l=this.splitTextToSize(l,m):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(N,Q){return N.concat(y.splitTextToSize(Q,m))},[])):l=Array.isArray(l)?l:[l];for(var F=0;F<l.length;F++)d<(g=this.getStringUnitWidth(l[F],{font:p})*u)&&(d=g);return d!==0&&(w=l.length),{w:d/=h,h:Math.max((w*u*this.getLineHeightFactor()-u*(this.getLineHeightFactor()-1))/h,0)}},t.cellAddPage=function(){n.call(this),this.addPage();var l=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new A(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=t.cell=function(){var l;l=arguments[0]instanceof A?arguments[0]:new A(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var c=this.internal.__cell__.lastCell,u=this.internal.__cell__.padding,p=this.internal.__cell__.margins||e,h=this.internal.__cell__.tableHeaderRow,d=this.internal.__cell__.printHeaders;return c.lineNumber!==void 0&&(c.lineNumber===l.lineNumber?(l.x=(c.x||0)+(c.width||0),l.y=c.y||0):c.y+c.height+l.height+p.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=p.top,d&&h&&(this.printHeaderRow(l.lineNumber,!0),l.y+=h[0].height)):l.y=c.y+c.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,r===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-u,l.y+u,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+u,{align:"center",baseline:"top",maxWidth:l.width-u-u}):this.text(l.text,l.x+u,l.y+u,{align:"left",baseline:"top",maxWidth:l.width-u-u})),this.internal.__cell__.lastCell=l,this};t.table=function(l,c,u,p,h){if(n.call(this),!u)throw new Error("No data for PDF table.");var d,w,g,y,m=[],F=[],N=[],Q={},z={},R=[],I=[],U=(h=h||{}).autoSize||!1,O=h.printHeaders!==!1,q=h.css&&h.css["font-size"]!==void 0?16*h.css["font-size"]:h.fontSize||12,T=h.margins||Object.assign({width:this.getPageWidth()},e),L=typeof h.padding=="number"?h.padding:3,G=h.headerBackgroundColor||"#c8c8c8",Y=h.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=O,this.internal.__cell__.margins=T,this.internal.__cell__.table_font_size=q,this.internal.__cell__.padding=L,this.internal.__cell__.headerBackgroundColor=G,this.internal.__cell__.headerTextColor=Y,this.setFontSize(q),p==null)F=m=Object.keys(u[0]),N=m.map(function(){return"left"});else if(Array.isArray(p)&&Xt(p[0])==="object")for(m=p.map(function(fe){return fe.name}),F=p.map(function(fe){return fe.prompt||fe.name||""}),N=p.map(function(fe){return fe.align||"left"}),d=0;d<p.length;d+=1)z[p[d].name]=p[d].width*(19.049976/25.4);else Array.isArray(p)&&typeof p[0]=="string"&&(F=m=p,N=m.map(function(){return"left"}));if(U||Array.isArray(p)&&typeof p[0]=="string")for(d=0;d<m.length;d+=1){for(Q[y=m[d]]=u.map(function(fe){return fe[y]}),this.setFont(void 0,"bold"),R.push(this.getTextDimensions(F[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),w=Q[y],this.setFont(void 0,"normal"),g=0;g<w.length;g+=1)R.push(this.getTextDimensions(w[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);z[y]=Math.max.apply(null,R)+L+L,R=[]}if(O){var se={};for(d=0;d<m.length;d+=1)se[m[d]]={},se[m[d]].text=F[d],se[m[d]].align=N[d];var he=s.call(this,se,z);I=m.map(function(fe){return new A(l,c,z[fe],he,se[fe].text,void 0,se[fe].align)}),this.setTableHeaderRow(I),this.printHeaderRow(1,!1)}var ge=p.reduce(function(fe,Ue){return fe[Ue.name]=Ue.align,fe},{});for(d=0;d<u.length;d+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:d,data:u[d]},this);var re=s.call(this,u[d],z);for(g=0;g<m.length;g+=1){var le=u[d][m[g]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:d,col:g,data:le},this),o.call(this,new A(l,c,z[m[g]],re,le,d+2,ge[m[g]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=c,this};var s=function(l,c){var u=this.internal.__cell__.padding,p=this.internal.__cell__.table_font_size,h=this.internal.scaleFactor;return Object.keys(l).map(function(d){var w=l[d];return this.splitTextToSize(w.hasOwnProperty("text")?w.text:w,c[d]-u-u)},this).map(function(d){return this.getLineHeightFactor()*d.length*p/h+u+u},this).reduce(function(d,w){return Math.max(d,w)},0)};t.setTableHeaderRow=function(l){n.call(this),this.internal.__cell__.tableHeaderRow=l},t.printHeaderRow=function(l,c){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var u;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var p=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new A(p[0],p[1],p[2],p[3],void 0,-1)}this.setFont(void 0,"bold");for(var h=[],d=0;d<this.internal.__cell__.tableHeaderRow.length;d+=1){u=this.internal.__cell__.tableHeaderRow[d].clone(),c&&(u.y=this.internal.__cell__.margins.top||0,h.push(u)),u.lineNumber=l;var w=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,u),this.setTextColor(w)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),r=!1}}(Bt.API);var Bv={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},xv=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Jd=wv(xv),bv=[100,200,300,400,500,600,700,800,900],LT=wv(bv);function Zd(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(A){return Bv[A=A||"normal"]?A:"normal"}(t.style),n=function(A){if(!A)return 400;if(typeof A=="number")return A>=100&&A<=900&&A%100==0?A:400;if(/^\d00$/.test(A))return parseInt(A);switch(A){case"bold":return 700;case"normal":default:return 400}}(t.weight),a=function(A){return typeof Jd[A=A||"normal"]=="number"?A:"normal"}(t.stretch);return{family:e,style:r,weight:n,stretch:a,src:t.src||[],ref:t.ref||{name:e,style:[a,r,n].join(" ")}}}function Cv(t,e,r,n){var a;for(a=r;a>=0&&a<e.length;a+=n)if(t[e[a]])return t[e[a]];for(a=r;a>=0&&a<e.length;a-=n)if(t[e[a]])return t[e[a]]}var UT={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Ev={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function _v(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function IT(t,e,r){for(var n=(r=r||{}).defaultFontFamily||"times",a=Object.assign({},UT,r.genericFontFamilies||{}),A=null,o=null,s=0;s<e.length;++s)if(a[(A=Zd(e[s])).family]&&(A.family=a[A.family]),t.hasOwnProperty(A.family)){o=t[A.family];break}if(!(o=o||t[n]))throw new Error("Could not find a font-family for the rule '"+_v(A)+"' and default family '"+n+"'.");if(o=function(l,c){if(c[l])return c[l];var u=Jd[l],p=u<=Jd.normal?-1:1,h=Cv(c,xv,u,p);if(!h)throw new Error("Could not find a matching font-stretch value for "+l);return h}(A.stretch,o),o=function(l,c){if(c[l])return c[l];for(var u=Bv[l],p=0;p<u.length;++p)if(c[u[p]])return c[u[p]];throw new Error("Could not find a matching font-style for "+l)}(A.style,o),!(o=function(l,c){if(c[l])return c[l];if(l===400&&c[500])return c[500];if(l===500&&c[400])return c[400];var u=LT[l],p=Cv(c,bv,u,l<400?-1:1);if(!p)throw new Error("Could not find a matching font-weight for value "+l);return p}(A.weight,o)))throw new Error("Failed to resolve a font for the rule '"+_v(A)+"'.");return o}function Fv(t){return t.trimLeft()}function DT(t,e){for(var r=0;r<t.length;){if(t.charAt(r)===e)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function QT(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],t.substring(e[0].length)]}var dh,Sv,kv,eg=["times"];(function(t){var e,r,n,a,A,o,s,l,c,u=function(b){return b=b||{},this.isStrokeTransparent=b.isStrokeTransparent||!1,this.strokeOpacity=b.strokeOpacity||1,this.strokeStyle=b.strokeStyle||"#000000",this.fillStyle=b.fillStyle||"#000000",this.isFillTransparent=b.isFillTransparent||!1,this.fillOpacity=b.fillOpacity||1,this.font=b.font||"10px sans-serif",this.textBaseline=b.textBaseline||"alphabetic",this.textAlign=b.textAlign||"left",this.lineWidth=b.lineWidth||1,this.lineJoin=b.lineJoin||"miter",this.lineCap=b.lineCap||"butt",this.path=b.path||[],this.transform=b.transform!==void 0?b.transform.clone():new l,this.globalCompositeOperation=b.globalCompositeOperation||"normal",this.globalAlpha=b.globalAlpha||1,this.clip_path=b.clip_path||[],this.currentPoint=b.currentPoint||new o,this.miterLimit=b.miterLimit||10,this.lastPoint=b.lastPoint||new o,this.lineDashOffset=b.lineDashOffset||0,this.lineDash=b.lineDash||[],this.margin=b.margin||[0,0,0,0],this.prevPageLastElemOffset=b.prevPageLastElemOffset||0,this.ignoreClearRect=typeof b.ignoreClearRect!="boolean"||b.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new p(this),e=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,A=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,l=this.internal.Matrix,c=new u}]);var p=function(b){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var _=b;Object.defineProperty(this,"pdf",{get:function(){return _}});var B=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return B},set:function(xe){B=!!xe}});var x=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return x},set:function(xe){x=!!xe}});var S=0;Object.defineProperty(this,"posX",{get:function(){return S},set:function(xe){isNaN(xe)||(S=xe)}});var D=0;Object.defineProperty(this,"posY",{get:function(){return D},set:function(xe){isNaN(xe)||(D=xe)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(xe){var te;typeof xe=="number"?te=[xe,xe,xe,xe]:((te=new Array(4))[0]=xe[0],te[1]=xe.length>=2?xe[1]:te[0],te[2]=xe.length>=3?xe[2]:te[0],te[3]=xe.length>=4?xe[3]:te[1]),c.margin=te}});var W=!1;Object.defineProperty(this,"autoPaging",{get:function(){return W},set:function(xe){W=xe}});var ue=0;Object.defineProperty(this,"lastBreak",{get:function(){return ue},set:function(xe){ue=xe}});var Ce=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Ce},set:function(xe){Ce=xe}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(xe){xe instanceof u&&(c=xe)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(xe){c.path=xe}});var de=[];Object.defineProperty(this,"ctxStack",{get:function(){return de},set:function(xe){de=xe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(xe){var te;te=h(xe),this.ctx.fillStyle=te.style,this.ctx.isFillTransparent=te.a===0,this.ctx.fillOpacity=te.a,this.pdf.setFillColor(te.r,te.g,te.b,{a:te.a}),this.pdf.setTextColor(te.r,te.g,te.b,{a:te.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(xe){var te=h(xe);this.ctx.strokeStyle=te.style,this.ctx.isStrokeTransparent=te.a===0,this.ctx.strokeOpacity=te.a,te.a===0?this.pdf.setDrawColor(255,255,255):(te.a,this.pdf.setDrawColor(te.r,te.g,te.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(xe){["butt","round","square"].indexOf(xe)!==-1&&(this.ctx.lineCap=xe,this.pdf.setLineCap(xe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(xe){isNaN(xe)||(this.ctx.lineWidth=xe,this.pdf.setLineWidth(xe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(xe){["bevel","round","miter"].indexOf(xe)!==-1&&(this.ctx.lineJoin=xe,this.pdf.setLineJoin(xe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(xe){isNaN(xe)||(this.ctx.miterLimit=xe,this.pdf.setMiterLimit(xe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(xe){this.ctx.textBaseline=xe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(xe){["right","end","center","left","start"].indexOf(xe)!==-1&&(this.ctx.textAlign=xe)}});var ke=null;function ne(xe,te){if(ke===null){var Pe=function(rt){var Ve=[];return Object.keys(rt).forEach(function(We){rt[We].forEach(function(Ye){var Je=null;switch(Ye){case"bold":Je={family:We,weight:"bold"};break;case"italic":Je={family:We,style:"italic"};break;case"bolditalic":Je={family:We,weight:"bold",style:"italic"};break;case"":case"normal":Je={family:We}}Je!==null&&(Je.ref={name:We,style:Ye},Ve.push(Je))})}),Ve}(xe.getFontList());ke=function(rt){for(var Ve={},We=0;We<rt.length;++We){var Ye=Zd(rt[We]),Je=Ye.family,ot=Ye.stretch,at=Ye.style,ft=Ye.weight;Ve[Je]=Ve[Je]||{},Ve[Je][ot]=Ve[Je][ot]||{},Ve[Je][ot][at]=Ve[Je][ot][at]||{},Ve[Je][ot][at][ft]=Ye}return Ve}(Pe.concat(te))}return ke}var Ee=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ee},set:function(xe){ke=null,Ee=xe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(xe){var te;if(this.ctx.font=xe,(te=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(xe))!==null){var Pe=te[1],rt=(te[2],te[3]),Ve=te[4],We=(te[5],te[6]),Ye=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ve)[2];Ve=Math.floor(Ye==="px"?parseFloat(Ve)*this.pdf.internal.scaleFactor:Ye==="em"?parseFloat(Ve)*this.pdf.getFontSize():parseFloat(Ve)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ve);var Je=function(dt){var xt,tt,ir=[],Lt=dt.trim();if(Lt==="")return eg;if(Lt in Ev)return[Ev[Lt]];for(;Lt!=="";){switch(tt=null,xt=(Lt=Fv(Lt)).charAt(0)){case'"':case"'":tt=DT(Lt.substring(1),xt);break;default:tt=QT(Lt)}if(tt===null||(ir.push(tt[0]),(Lt=Fv(tt[1]))!==""&&Lt.charAt(0)!==","))return eg;Lt=Lt.replace(/^,/,"")}return ir}(We);if(this.fontFaces){var ot=IT(ne(this.pdf,this.fontFaces),Je.map(function(dt){return{family:dt,stretch:"normal",weight:rt,style:Pe}}));this.pdf.setFont(ot.ref.name,ot.ref.style)}else{var at="";(rt==="bold"||parseInt(rt,10)>=700||Pe==="bold")&&(at="bold"),Pe==="italic"&&(at+="italic"),at.length===0&&(at="normal");for(var ft="",yt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},kt=0;kt<Je.length;kt++){if(this.pdf.internal.getFont(Je[kt],at,{noFallback:!0,disableWarning:!0})!==void 0){ft=Je[kt];break}if(at==="bolditalic"&&this.pdf.internal.getFont(Je[kt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ft=Je[kt],at="bold";else if(this.pdf.internal.getFont(Je[kt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ft=Je[kt],at="normal";break}}if(ft===""){for(var Nt=0;Nt<Je.length;Nt++)if(yt[Je[Nt]]){ft=yt[Je[Nt]];break}}ft=ft===""?"Times":ft,this.pdf.setFont(ft,at)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(xe){this.ctx.globalCompositeOperation=xe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(xe){this.ctx.globalAlpha=xe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(xe){this.ctx.lineDashOffset=xe,Ue.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(xe){this.ctx.lineDash=xe,Ue.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(xe){this.ctx.ignoreClearRect=!!xe}})};p.prototype.setLineDash=function(b){this.lineDash=b},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){Q.call(this,"fill",!1)},p.prototype.stroke=function(){Q.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(b,_){if(isNaN(b)||isNaN(_))throw hr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var B=this.ctx.transform.applyToPoint(new o(b,_));this.path.push({type:"mt",x:B.x,y:B.y}),this.ctx.lastPoint=new o(b,_)},p.prototype.closePath=function(){var b=new o(0,0),_=0;for(_=this.path.length-1;_!==-1;_--)if(this.path[_].type==="begin"&&Xt(this.path[_+1])==="object"&&typeof this.path[_+1].x=="number"){b=new o(this.path[_+1].x,this.path[_+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(b.x,b.y)},p.prototype.lineTo=function(b,_){if(isNaN(b)||isNaN(_))throw hr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var B=this.ctx.transform.applyToPoint(new o(b,_));this.path.push({type:"lt",x:B.x,y:B.y}),this.ctx.lastPoint=new o(B.x,B.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),Q.call(this,null,!0)},p.prototype.quadraticCurveTo=function(b,_,B,x){if(isNaN(B)||isNaN(x)||isNaN(b)||isNaN(_))throw hr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var S=this.ctx.transform.applyToPoint(new o(B,x)),D=this.ctx.transform.applyToPoint(new o(b,_));this.path.push({type:"qct",x1:D.x,y1:D.y,x:S.x,y:S.y}),this.ctx.lastPoint=new o(S.x,S.y)},p.prototype.bezierCurveTo=function(b,_,B,x,S,D){if(isNaN(S)||isNaN(D)||isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x))throw hr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var W=this.ctx.transform.applyToPoint(new o(S,D)),ue=this.ctx.transform.applyToPoint(new o(b,_)),Ce=this.ctx.transform.applyToPoint(new o(B,x));this.path.push({type:"bct",x1:ue.x,y1:ue.y,x2:Ce.x,y2:Ce.y,x:W.x,y:W.y}),this.ctx.lastPoint=new o(W.x,W.y)},p.prototype.arc=function(b,_,B,x,S,D){if(isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x)||isNaN(S))throw hr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(D=!!D,!this.ctx.transform.isIdentity){var W=this.ctx.transform.applyToPoint(new o(b,_));b=W.x,_=W.y;var ue=this.ctx.transform.applyToPoint(new o(0,B)),Ce=this.ctx.transform.applyToPoint(new o(0,0));B=Math.sqrt(Math.pow(ue.x-Ce.x,2)+Math.pow(ue.y-Ce.y,2))}Math.abs(S-x)>=2*Math.PI&&(x=0,S=2*Math.PI),this.path.push({type:"arc",x:b,y:_,radius:B,startAngle:x,endAngle:S,counterclockwise:D})},p.prototype.arcTo=function(b,_,B,x,S){throw new Error("arcTo not implemented.")},p.prototype.rect=function(b,_,B,x){if(isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x))throw hr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(b,_),this.lineTo(b+B,_),this.lineTo(b+B,_+x),this.lineTo(b,_+x),this.lineTo(b,_),this.lineTo(b+B,_),this.lineTo(b,_)},p.prototype.fillRect=function(b,_,B,x){if(isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x))throw hr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!d.call(this)){var S={};this.lineCap!=="butt"&&(S.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(S.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(b,_,B,x),this.fill(),S.hasOwnProperty("lineCap")&&(this.lineCap=S.lineCap),S.hasOwnProperty("lineJoin")&&(this.lineJoin=S.lineJoin)}},p.prototype.strokeRect=function(b,_,B,x){if(isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x))throw hr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");w.call(this)||(this.beginPath(),this.rect(b,_,B,x),this.stroke())},p.prototype.clearRect=function(b,_,B,x){if(isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x))throw hr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(b,_,B,x))},p.prototype.save=function(b){b=typeof b!="boolean"||b;for(var _=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("q");if(this.pdf.setPage(_),b){this.ctx.fontSize=this.pdf.internal.getFontSize();var x=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=x}},p.prototype.restore=function(b){b=typeof b!="boolean"||b;for(var _=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("Q");this.pdf.setPage(_),b&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var h=function(b){var _,B,x,S;if(b.isCanvasGradient===!0&&(b=b.getColor()),!b)return{r:0,g:0,b:0,a:0,style:b};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(b))_=0,B=0,x=0,S=0;else{var D=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(b);if(D!==null)_=parseInt(D[1]),B=parseInt(D[2]),x=parseInt(D[3]),S=1;else if((D=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(b))!==null)_=parseInt(D[1]),B=parseInt(D[2]),x=parseInt(D[3]),S=parseFloat(D[4]);else{if(S=1,typeof b=="string"&&b.charAt(0)!=="#"){var W=new cv(b);b=W.ok?W.toHex():"#000000"}b.length===4?(_=b.substring(1,2),_+=_,B=b.substring(2,3),B+=B,x=b.substring(3,4),x+=x):(_=b.substring(1,3),B=b.substring(3,5),x=b.substring(5,7)),_=parseInt(_,16),B=parseInt(B,16),x=parseInt(x,16)}}return{r:_,g:B,b:x,a:S,style:b}},d=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},w=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};p.prototype.fillText=function(b,_,B,x){if(isNaN(_)||isNaN(B)||typeof b!="string")throw hr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(x=isNaN(x)?void 0:x,!d.call(this)){var S=re(this.ctx.transform.rotation),D=this.ctx.transform.scaleX;L.call(this,{text:b,x:_,y:B,scale:D,angle:S,align:this.textAlign,maxWidth:x})}},p.prototype.strokeText=function(b,_,B,x){if(isNaN(_)||isNaN(B)||typeof b!="string")throw hr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!w.call(this)){x=isNaN(x)?void 0:x;var S=re(this.ctx.transform.rotation),D=this.ctx.transform.scaleX;L.call(this,{text:b,x:_,y:B,scale:D,renderingMode:"stroke",angle:S,align:this.textAlign,maxWidth:x})}},p.prototype.measureText=function(b){if(typeof b!="string")throw hr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var _=this.pdf,B=this.pdf.internal.scaleFactor,x=_.internal.getFontSize(),S=_.getStringUnitWidth(b)*x/_.internal.scaleFactor,D=function(W){var ue=(W=W||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ue}}),this};return new D({width:S*=Math.round(96*B/72*1e4)/1e4})},p.prototype.scale=function(b,_){if(isNaN(b)||isNaN(_))throw hr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var B=new l(b,0,0,_,0,0);this.ctx.transform=this.ctx.transform.multiply(B)},p.prototype.rotate=function(b){if(isNaN(b))throw hr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var _=new l(Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0);this.ctx.transform=this.ctx.transform.multiply(_)},p.prototype.translate=function(b,_){if(isNaN(b)||isNaN(_))throw hr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var B=new l(1,0,0,1,b,_);this.ctx.transform=this.ctx.transform.multiply(B)},p.prototype.transform=function(b,_,B,x,S,D){if(isNaN(b)||isNaN(_)||isNaN(B)||isNaN(x)||isNaN(S)||isNaN(D))throw hr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var W=new l(b,_,B,x,S,D);this.ctx.transform=this.ctx.transform.multiply(W)},p.prototype.setTransform=function(b,_,B,x,S,D){b=isNaN(b)?1:b,_=isNaN(_)?0:_,B=isNaN(B)?0:B,x=isNaN(x)?1:x,S=isNaN(S)?0:S,D=isNaN(D)?0:D,this.ctx.transform=new l(b,_,B,x,S,D)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.prototype.drawImage=function(b,_,B,x,S,D,W,ue,Ce){var de=this.pdf.getImageProperties(b),ke=1,ne=1,Ee=1,xe=1;x!==void 0&&ue!==void 0&&(Ee=ue/x,xe=Ce/S,ke=de.width/x*ue/x,ne=de.height/S*Ce/S),D===void 0&&(D=_,W=B,_=0,B=0),x!==void 0&&ue===void 0&&(ue=x,Ce=S),x===void 0&&ue===void 0&&(ue=de.width,Ce=de.height);for(var te,Pe=this.ctx.transform.decompose(),rt=re(Pe.rotate.shx),Ve=new l,We=(Ve=(Ve=(Ve=Ve.multiply(Pe.translate)).multiply(Pe.skew)).multiply(Pe.scale)).applyToRectangle(new s(D-_*Ee,W-B*xe,x*ke,S*ne)),Ye=y.call(this,We),Je=[],ot=0;ot<Ye.length;ot+=1)Je.indexOf(Ye[ot])===-1&&Je.push(Ye[ot]);if(N(Je),this.autoPaging)for(var at=Je[0],ft=Je[Je.length-1],yt=at;yt<ft+1;yt++){this.pdf.setPage(yt);var kt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Nt=yt===1?this.posY+this.margin[0]:this.margin[0],dt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],xt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],tt=yt===1?0:dt+(yt-2)*xt;if(this.ctx.clip_path.length!==0){var ir=this.path;te=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=F(te,this.posX+this.margin[3],-tt+Nt+this.ctx.prevPageLastElemOffset),z.call(this,"fill",!0),this.path=ir}var Lt=JSON.parse(JSON.stringify(We));Lt=F([Lt],this.posX+this.margin[3],-tt+Nt+this.ctx.prevPageLastElemOffset)[0];var fr=(yt>at||yt<ft)&&g.call(this);fr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],kt,xt,null).clip().discardPath()),this.pdf.addImage(b,"JPEG",Lt.x,Lt.y,Lt.w,Lt.h,null,null,rt),fr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(b,"JPEG",We.x,We.y,We.w,We.h,null,null,rt)};var y=function(b,_,B){var x=[];_=_||this.pdf.internal.pageSize.width,B=B||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var S=this.posY+this.ctx.prevPageLastElemOffset;switch(b.type){default:case"mt":case"lt":x.push(Math.floor((b.y+S)/B)+1);break;case"arc":x.push(Math.floor((b.y+S-b.radius)/B)+1),x.push(Math.floor((b.y+S+b.radius)/B)+1);break;case"qct":var D=le(this.ctx.lastPoint.x,this.ctx.lastPoint.y,b.x1,b.y1,b.x,b.y);x.push(Math.floor((D.y+S)/B)+1),x.push(Math.floor((D.y+D.h+S)/B)+1);break;case"bct":var W=fe(this.ctx.lastPoint.x,this.ctx.lastPoint.y,b.x1,b.y1,b.x2,b.y2,b.x,b.y);x.push(Math.floor((W.y+S)/B)+1),x.push(Math.floor((W.y+W.h+S)/B)+1);break;case"rect":x.push(Math.floor((b.y+S)/B)+1),x.push(Math.floor((b.y+b.h+S)/B)+1)}for(var ue=0;ue<x.length;ue+=1)for(;this.pdf.internal.getNumberOfPages()<x[ue];)m.call(this);return x},m=function(){var b=this.fillStyle,_=this.strokeStyle,B=this.font,x=this.lineCap,S=this.lineWidth,D=this.lineJoin;this.pdf.addPage(),this.fillStyle=b,this.strokeStyle=_,this.font=B,this.lineCap=x,this.lineWidth=S,this.lineJoin=D},F=function(b,_,B){for(var x=0;x<b.length;x++)switch(b[x].type){case"bct":b[x].x2+=_,b[x].y2+=B;case"qct":b[x].x1+=_,b[x].y1+=B;case"mt":case"lt":case"arc":default:b[x].x+=_,b[x].y+=B}return b},N=function(b){return b.sort(function(_,B){return _-B})},Q=function(b,_){for(var B,x,S=this.fillStyle,D=this.strokeStyle,W=this.lineCap,ue=this.lineWidth,Ce=Math.abs(ue*this.ctx.transform.scaleX),de=this.lineJoin,ke=JSON.parse(JSON.stringify(this.path)),ne=JSON.parse(JSON.stringify(this.path)),Ee=[],xe=0;xe<ne.length;xe++)if(ne[xe].x!==void 0)for(var te=y.call(this,ne[xe]),Pe=0;Pe<te.length;Pe+=1)Ee.indexOf(te[Pe])===-1&&Ee.push(te[Pe]);for(var rt=0;rt<Ee.length;rt++)for(;this.pdf.internal.getNumberOfPages()<Ee[rt];)m.call(this);if(N(Ee),this.autoPaging)for(var Ve=Ee[0],We=Ee[Ee.length-1],Ye=Ve;Ye<We+1;Ye++){this.pdf.setPage(Ye),this.fillStyle=S,this.strokeStyle=D,this.lineCap=W,this.lineWidth=Ce,this.lineJoin=de;var Je=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ot=Ye===1?this.posY+this.margin[0]:this.margin[0],at=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ft=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],yt=Ye===1?0:at+(Ye-2)*ft;if(this.ctx.clip_path.length!==0){var kt=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=F(B,this.posX+this.margin[3],-yt+ot+this.ctx.prevPageLastElemOffset),z.call(this,b,!0),this.path=kt}if(x=JSON.parse(JSON.stringify(ke)),this.path=F(x,this.posX+this.margin[3],-yt+ot+this.ctx.prevPageLastElemOffset),_===!1||Ye===0){var Nt=(Ye>Ve||Ye<We)&&g.call(this);Nt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Je,ft,null).clip().discardPath()),z.call(this,b,_),Nt&&this.pdf.restoreGraphicsState()}this.lineWidth=ue}else this.lineWidth=Ce,z.call(this,b,_),this.lineWidth=ue;this.path=ke},z=function(b,_){if((b!=="stroke"||_||!w.call(this))&&(b==="stroke"||_||!d.call(this))){for(var B,x,S=[],D=this.path,W=0;W<D.length;W++){var ue=D[W];switch(ue.type){case"begin":S.push({begin:!0});break;case"close":S.push({close:!0});break;case"mt":S.push({start:ue,deltas:[],abs:[]});break;case"lt":var Ce=S.length;if(D[W-1]&&!isNaN(D[W-1].x)&&(B=[ue.x-D[W-1].x,ue.y-D[W-1].y],Ce>0)){for(;Ce>=0;Ce--)if(S[Ce-1].close!==!0&&S[Ce-1].begin!==!0){S[Ce-1].deltas.push(B),S[Ce-1].abs.push(ue);break}}break;case"bct":B=[ue.x1-D[W-1].x,ue.y1-D[W-1].y,ue.x2-D[W-1].x,ue.y2-D[W-1].y,ue.x-D[W-1].x,ue.y-D[W-1].y],S[S.length-1].deltas.push(B);break;case"qct":var de=D[W-1].x+2/3*(ue.x1-D[W-1].x),ke=D[W-1].y+2/3*(ue.y1-D[W-1].y),ne=ue.x+2/3*(ue.x1-ue.x),Ee=ue.y+2/3*(ue.y1-ue.y),xe=ue.x,te=ue.y;B=[de-D[W-1].x,ke-D[W-1].y,ne-D[W-1].x,Ee-D[W-1].y,xe-D[W-1].x,te-D[W-1].y],S[S.length-1].deltas.push(B);break;case"arc":S.push({deltas:[],abs:[],arc:!0}),Array.isArray(S[S.length-1].abs)&&S[S.length-1].abs.push(ue)}}x=_?null:b==="stroke"?"stroke":"fill";for(var Pe=!1,rt=0;rt<S.length;rt++)if(S[rt].arc)for(var Ve=S[rt].abs,We=0;We<Ve.length;We++){var Ye=Ve[We];Ye.type==="arc"?U.call(this,Ye.x,Ye.y,Ye.radius,Ye.startAngle,Ye.endAngle,Ye.counterclockwise,void 0,_,!Pe):G.call(this,Ye.x,Ye.y),Pe=!0}else if(S[rt].close===!0)this.pdf.internal.out("h"),Pe=!1;else if(S[rt].begin!==!0){var Je=S[rt].start.x,ot=S[rt].start.y;Y.call(this,S[rt].deltas,Je,ot),Pe=!0}x&&O.call(this,x),_&&q.call(this)}},R=function(b){var _=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,B=_*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return b-B;case"top":return b+_-B;case"hanging":return b+_-2*B;case"middle":return b+_/2-B;case"ideographic":return b;case"alphabetic":default:return b}},I=function(b){return b+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.prototype.createLinearGradient=function(){var b=function(){};return b.colorStops=[],b.addColorStop=function(_,B){this.colorStops.push([_,B])},b.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},b.isCanvasGradient=!0,b},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var U=function(b,_,B,x,S,D,W,ue,Ce){for(var de=he.call(this,B,x,S,D),ke=0;ke<de.length;ke++){var ne=de[ke];ke===0&&(Ce?T.call(this,ne.x1+b,ne.y1+_):G.call(this,ne.x1+b,ne.y1+_)),se.call(this,b,_,ne.x2,ne.y2,ne.x3,ne.y3,ne.x4,ne.y4)}ue?q.call(this):O.call(this,W)},O=function(b){switch(b){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},q=function(){this.pdf.clip(),this.pdf.discardPath()},T=function(b,_){this.pdf.internal.out(r(b)+" "+n(_)+" m")},L=function(b){var _;switch(b.align){case"right":case"end":_="right";break;case"center":_="center";break;case"left":case"start":default:_="left"}var B=this.pdf.getTextDimensions(b.text),x=R.call(this,b.y),S=I.call(this,x)-B.h,D=this.ctx.transform.applyToPoint(new o(b.x,x)),W=this.ctx.transform.decompose(),ue=new l;ue=(ue=(ue=ue.multiply(W.translate)).multiply(W.skew)).multiply(W.scale);for(var Ce,de,ke,ne=this.ctx.transform.applyToRectangle(new s(b.x,x,B.w,B.h)),Ee=ue.applyToRectangle(new s(b.x,S,B.w,B.h)),xe=y.call(this,Ee),te=[],Pe=0;Pe<xe.length;Pe+=1)te.indexOf(xe[Pe])===-1&&te.push(xe[Pe]);if(N(te),this.autoPaging)for(var rt=te[0],Ve=te[te.length-1],We=rt;We<Ve+1;We++){this.pdf.setPage(We);var Ye=We===1?this.posY+this.margin[0]:this.margin[0],Je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ot=this.pdf.internal.pageSize.height-this.margin[2],at=ot-this.margin[0],ft=this.pdf.internal.pageSize.width-this.margin[1],yt=ft-this.margin[3],kt=We===1?0:Je+(We-2)*at;if(this.ctx.clip_path.length!==0){var Nt=this.path;Ce=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=F(Ce,this.posX+this.margin[3],-1*kt+Ye),z.call(this,"fill",!0),this.path=Nt}var dt=F([JSON.parse(JSON.stringify(Ee))],this.posX+this.margin[3],-kt+Ye+this.ctx.prevPageLastElemOffset)[0];b.scale>=.01&&(de=this.pdf.internal.getFontSize(),this.pdf.setFontSize(de*b.scale),ke=this.lineWidth,this.lineWidth=ke*b.scale);var xt=this.autoPaging!=="text";if(xt||dt.y+dt.h<=ot){if(xt||dt.y>=Ye&&dt.x<=ft){var tt=xt?b.text:this.pdf.splitTextToSize(b.text,b.maxWidth||ft-dt.x)[0],ir=F([JSON.parse(JSON.stringify(ne))],this.posX+this.margin[3],-kt+Ye+this.ctx.prevPageLastElemOffset)[0],Lt=xt&&(We>rt||We<Ve)&&g.call(this);Lt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],yt,at,null).clip().discardPath()),this.pdf.text(tt,ir.x,ir.y,{angle:b.angle,align:_,renderingMode:b.renderingMode}),Lt&&this.pdf.restoreGraphicsState()}}else dt.y<ot&&(this.ctx.prevPageLastElemOffset+=ot-dt.y);b.scale>=.01&&(this.pdf.setFontSize(de),this.lineWidth=ke)}else b.scale>=.01&&(de=this.pdf.internal.getFontSize(),this.pdf.setFontSize(de*b.scale),ke=this.lineWidth,this.lineWidth=ke*b.scale),this.pdf.text(b.text,D.x+this.posX,D.y+this.posY,{angle:b.angle,align:_,renderingMode:b.renderingMode,maxWidth:b.maxWidth}),b.scale>=.01&&(this.pdf.setFontSize(de),this.lineWidth=ke)},G=function(b,_,B,x){B=B||0,x=x||0,this.pdf.internal.out(r(b+B)+" "+n(_+x)+" l")},Y=function(b,_,B){return this.pdf.lines(b,_,B,null,null)},se=function(b,_,B,x,S,D,W,ue){this.pdf.internal.out([e(a(B+b)),e(A(x+_)),e(a(S+b)),e(A(D+_)),e(a(W+b)),e(A(ue+_)),"c"].join(" "))},he=function(b,_,B,x){for(var S=2*Math.PI,D=Math.PI/2;_>B;)_-=S;var W=Math.abs(B-_);W<S&&x&&(W=S-W);for(var ue=[],Ce=x?-1:1,de=_;W>1e-5;){var ke=de+Ce*Math.min(W,D);ue.push(ge.call(this,b,de,ke)),W-=Math.abs(ke-de),de=ke}return ue},ge=function(b,_,B){var x=(B-_)/2,S=b*Math.cos(x),D=b*Math.sin(x),W=S,ue=-D,Ce=W*W+ue*ue,de=Ce+W*S+ue*D,ke=4/3*(Math.sqrt(2*Ce*de)-de)/(W*D-ue*S),ne=W-ke*ue,Ee=ue+ke*W,xe=ne,te=-Ee,Pe=x+_,rt=Math.cos(Pe),Ve=Math.sin(Pe);return{x1:b*Math.cos(_),y1:b*Math.sin(_),x2:ne*rt-Ee*Ve,y2:ne*Ve+Ee*rt,x3:xe*rt-te*Ve,y3:xe*Ve+te*rt,x4:b*Math.cos(B),y4:b*Math.sin(B)}},re=function(b){return 180*b/Math.PI},le=function(b,_,B,x,S,D){var W=b+.5*(B-b),ue=_+.5*(x-_),Ce=S+.5*(B-S),de=D+.5*(x-D),ke=Math.min(b,S,W,Ce),ne=Math.max(b,S,W,Ce),Ee=Math.min(_,D,ue,de),xe=Math.max(_,D,ue,de);return new s(ke,Ee,ne-ke,xe-Ee)},fe=function(b,_,B,x,S,D,W,ue){var Ce,de,ke,ne,Ee,xe,te,Pe,rt,Ve,We,Ye,Je,ot,at=B-b,ft=x-_,yt=S-B,kt=D-x,Nt=W-S,dt=ue-D;for(de=0;de<41;de++)rt=(te=(ke=b+(Ce=de/40)*at)+Ce*((Ee=B+Ce*yt)-ke))+Ce*(Ee+Ce*(S+Ce*Nt-Ee)-te),Ve=(Pe=(ne=_+Ce*ft)+Ce*((xe=x+Ce*kt)-ne))+Ce*(xe+Ce*(D+Ce*dt-xe)-Pe),de==0?(We=rt,Ye=Ve,Je=rt,ot=Ve):(We=Math.min(We,rt),Ye=Math.min(Ye,Ve),Je=Math.max(Je,rt),ot=Math.max(ot,Ve));return new s(Math.round(We),Math.round(Ye),Math.round(Je-We),Math.round(ot-Ye))},Ue=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var b,_,B=(b=this.ctx.lineDash,_=this.ctx.lineDashOffset,JSON.stringify({lineDash:b,lineDashOffset:_}));this.prevLineDash!==B&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=B)}}})(Bt.API),function(t){var e=function(A){var o,s,l,c,u,p,h,d,w,g;for(s=[],l=0,c=(A+=o="\0\0\0\0".slice(A.length%4||4)).length;c>l;l+=4)(u=(A.charCodeAt(l)<<24)+(A.charCodeAt(l+1)<<16)+(A.charCodeAt(l+2)<<8)+A.charCodeAt(l+3))!==0?(p=(u=((u=((u=((u=(u-(g=u%85))/85)-(w=u%85))/85)-(d=u%85))/85)-(h=u%85))/85)%85,s.push(p+33,h+33,d+33,w+33,g+33)):s.push(122);return function(y,m){for(var F=m;F>0;F--)y.pop()}(s,o.length),String.fromCharCode.apply(String,s)+"~>"},r=function(A){var o,s,l,c,u,p=String,h="length",d=255,w="charCodeAt",g="slice",y="replace";for(A[g](-2),A=A[g](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),l=[],c=0,u=(A+=o="uuuuu"[g](A[h]%5||5))[h];u>c;c+=5)s=52200625*(A[w](c)-33)+614125*(A[w](c+1)-33)+7225*(A[w](c+2)-33)+85*(A[w](c+3)-33)+(A[w](c+4)-33),l.push(d&s>>24,d&s>>16,d&s>>8,d&s);return function(m,F){for(var N=F;N>0;N--)m.pop()}(l,o[h]),p.fromCharCode.apply(p,l)},n=function(A){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((A=A.replace(/\s/g,"")).indexOf(">")!==-1&&(A=A.substr(0,A.indexOf(">"))),A.length%2&&(A+="0"),o.test(A)===!1)return"";for(var s="",l=0;l<A.length;l+=2)s+=String.fromCharCode("0x"+(A[l]+A[l+1]));return s},a=function(A){for(var o=new Uint8Array(A.length),s=A.length;s--;)o[s]=A.charCodeAt(s);return A=(o=Vd(o)).reduce(function(l,c){return l+String.fromCharCode(c)},"")};t.processDataByFilters=function(A,o){var s=0,l=A||"",c=[];for(typeof(o=o||[])=="string"&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case"ASCII85Decode":case"/ASCII85Decode":l=r(l),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=e(l),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=n(l),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=l.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">",c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=a(l),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[s]+'" is not implemented')}return{data:l,reverseChain:c.reverse().join(" ")}}}(Bt.API),function(t){t.loadFile=function(e,r,n){return function(a,A,o){A=A!==!1,o=typeof o=="function"?o:function(){};var s=void 0;try{s=function(l,c,u){var p=new XMLHttpRequest,h=0,d=function(w){var g=w.length,y=[],m=String.fromCharCode;for(h=0;h<g;h+=1)y.push(m(255&w.charCodeAt(h)));return y.join("")};if(p.open("GET",l,!c),p.overrideMimeType("text/plain; charset=x-user-defined"),c===!1&&(p.onload=function(){p.status===200?u(d(this.responseText)):u(void 0)}),p.send(null),c&&p.status===200)return d(p.responseText)}(a,A,o)}catch{}return s}(e,r,n)},t.loadImageFile=t.loadFile}(Bt.API),function(t){function e(){return(wt.html2canvas?Promise.resolve(wt.html2canvas):Promise.resolve().then(()=>rT)).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function r(){return(wt.DOMPurify?Promise.resolve(wt.DOMPurify):Promise.resolve().then(()=>AW)).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var s=Xt(o);return s==="undefined"?"undefined":s==="string"||o instanceof String?"string":s==="number"||o instanceof Number?"number":s==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":s==="object"?"object":"unknown"},a=function(o,s){var l=document.createElement(o);for(var c in s.className&&(l.className=s.className),s.innerHTML&&s.dompurify&&(l.innerHTML=s.dompurify.sanitize(s.innerHTML)),s.style)l.style[c]=s.style[c];return l},A=function o(s){var l=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),c=o.convert(Promise.resolve(),l);return c=(c=c.setProgress(1,o,1,[o])).set(s)};(A.prototype=Object.create(Promise.prototype)).constructor=A,A.convert=function(o,s){return o.__proto__=s||A.prototype,o},A.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},A.prototype.from=function(o,s){return this.then(function(){switch(s=s||function(l){switch(n(l)){case"string":return"string";case"element":return l.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o)){case"string":return this.then(r).then(function(l){return this.set({src:a("div",{innerHTML:o,dompurify:l})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},A.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},A.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},s=function l(c,u){for(var p=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),h=c.firstChild;h;h=h.nextSibling)u!==!0&&h.nodeType===1&&h.nodeName==="SCRIPT"||p.appendChild(l(h,u));return c.nodeType===1&&(c.nodeName==="CANVAS"?(p.width=c.width,p.height=c.height,p.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(p.value=c.value),p.addEventListener("load",function(){p.scrollTop=c.scrollTop,p.scrollLeft=c.scrollLeft},!0)),p}(this.prop.src,this.opt.html2canvas.javascriptEnabled);s.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(s),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},A.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(s){var l=Object.assign({},this.opt.html2canvas);return delete l.onrendered,s(this.prop.container,l)}).then(function(s){(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},A.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(s){var l=this.opt.jsPDF,c=this.opt.fontFaces,u=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,p=Object.assign({async:!0,allowTaint:!0,scale:u,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete p.onrendered,l.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,l.context2d.posX=this.opt.x,l.context2d.posY=this.opt.y,l.context2d.margin=this.opt.margin,l.context2d.fontFaces=c,c)for(var h=0;h<c.length;++h){var d=c[h],w=d.src.find(function(g){return g.format==="truetype"});w&&l.addFont(w.url,d.ref.name,d.ref.style)}return p.windowHeight=p.windowHeight||0,p.windowHeight=p.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):p.windowHeight,l.context2d.save(!0),s(this.prop.container,p)}).then(function(s){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},A.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},A.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},A.prototype.output=function(o,s,l){return(l=l||"pdf").toLowerCase()==="img"||l.toLowerCase()==="image"?this.outputImg(o,s):this.outputPdf(o,s)},A.prototype.outputPdf=function(o,s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,s)})},A.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},A.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},A.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},A.prototype.set=function(o){if(n(o)!=="object")return this;var s=Object.keys(o||{}).map(function(l){if(l in A.template.prop)return function(){this.prop[l]=o[l]};switch(l){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[l]=o[l]}}},this);return this.then(function(){return this.thenList(s)})},A.prototype.get=function(o,s){return this.then(function(){var l=o in A.template.prop?this.prop[o]:this.opt[o];return s?s(l):l})},A.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},A.prototype.setPageSize=function(o){function s(l,c){return Math.floor(l*c/72*96)}return this.then(function(){(o=o||Bt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:s(o.inner.width,o.k),height:s(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},A.prototype.setProgress=function(o,s,l,c){return o!=null&&(this.progress.val=o),s!=null&&(this.progress.state=s),l!=null&&(this.progress.n=l),c!=null&&(this.progress.stack=c),this.progress.ratio=this.progress.val/this.progress.state,this},A.prototype.updateProgress=function(o,s,l,c){return this.setProgress(o?this.progress.val+o:null,s||null,l?this.progress.n+l:null,c?this.progress.stack.concat(c):null)},A.prototype.then=function(o,s){var l=this;return this.thenCore(o,s,function(c,u){return l.updateProgress(null,null,1,[c]),Promise.prototype.then.call(this,function(p){return l.updateProgress(null,c),p}).then(c,u).then(function(p){return l.updateProgress(1),p})})},A.prototype.thenCore=function(o,s,l){l=l||Promise.prototype.then,o&&(o=o.bind(this)),s&&(s=s.bind(this));var c=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:A.convert(Object.assign({},this),Promise.prototype),u=l.call(c,o,s);return A.convert(u,this.__proto__)},A.prototype.thenExternal=function(o,s){return Promise.prototype.then.call(this,o,s)},A.prototype.thenList=function(o){var s=this;return o.forEach(function(l){s=s.thenCore(l)}),s},A.prototype.catch=function(o){o&&(o=o.bind(this));var s=Promise.prototype.catch.call(this,o);return A.convert(s,this)},A.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},A.prototype.error=function(o){return this.then(function(){throw new Error(o)})},A.prototype.using=A.prototype.set,A.prototype.saveAs=A.prototype.save,A.prototype.export=A.prototype.output,A.prototype.run=A.prototype.then,Bt.getPageSize=function(o,s,l){if(Xt(o)==="object"){var c=o;o=c.orientation,s=c.unit||s,l=c.format||l}s=s||"mm",l=l||"a4",o=(""+(o||"P")).toLowerCase();var u,p=(""+l).toLowerCase(),h={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(s){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+s}var d,w=0,g=0;if(h.hasOwnProperty(p))w=h[p][1]/u,g=h[p][0]/u;else try{w=l[1],g=l[0]}catch{throw new Error("Invalid format: "+l)}if(o==="p"||o==="portrait")o="p",g>w&&(d=g,g=w,w=d);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",w>g&&(d=g,g=w,w=d)}return{width:g,height:w,unit:s,k:u,orientation:o}},t.html=function(o,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(Zd):null;var l=new A(s);return s.worker?l:l.from(o).doCallback()}}(Bt.API),Bt.API.addJS=function(t){return kv=t,this.internal.events.subscribe("postPutResources",function(){dh=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(dh+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Sv=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+kv+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){dh!==void 0&&Sv!==void 0&&this.internal.out("/Names <</JavaScript "+dh+" 0 R>>")}),this},function(t){var e;t.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=r.outline.render().split(/\r\n/),A=0;A<a.length;A++){var o=a[A],s=n.exec(o);if(s!=null){var l=s[1];r.internal.newObjectDeferredBegin(l,!1)}r.internal.write(o)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,u=[];for(A=0;A<c;A++){var p=r.internal.newObject();u.push(p);var h=r.internal.getPageInfo(A+1);r.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj")}var d=r.internal.newObject();for(r.internal.write("<< /Names [ "),A=0;A<u.length;A++)r.internal.write("(page_"+(A+1)+")"+u[A]+" 0 R");r.internal.write(" ] >>","endobj"),e=r.internal.newObject(),r.internal.write("<< /Dests "+d+" 0 R"),r.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,a,A){var o={title:a,options:A,children:[]};return n==null&&(n=this.root),n.children.push(o),o},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var a=0;a<n.children.length;a++)this.genIds_r(n.children[a])},r.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,A=0;A<n.children.length;A++){var o=n.children[A];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(n)),A>0&&this.line("/Prev "+this.makeRef(n.children[A-1])),A<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[A+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var s=this.count=this.count_r({count:0},o);if(s>0&&this.line("/Count "+s),o.options&&o.options.pageNumber){var l=r.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var c=0;c<n.children.length;c++)this.renderItems(n.children[c])},r.outline.line=function(n){this.ctx.val+=n+`\r
140
140
  `},r.outline.makeRef=function(n){return n.id+" 0 R"},r.outline.makeString=function(n){return"("+r.internal.pdfEscape(n)+")"},r.outline.objStart=function(n){this.ctx.val+=`\r
141
141
  `+n.id+` 0 obj\r
@@ -224,13 +224,13 @@ endobj\r
224
224
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
225
225
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
226
226
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
227
- */function tg(t){var e,r,n,a,A,o=Math.floor,s=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),p=new Array(65535),h=new Array(65535),d=new Array(64),w=new Array(64),g=[],y=0,m=7,F=new Array(64),N=new Array(64),Q=new Array(64),z=new Array(256),R=new Array(2048),I=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],U=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],O=[0,1,2,3,4,5,6,7,8,9,10,11],q=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],L=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],G=[0,1,2,3,4,5,6,7,8,9,10,11],Y=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],se=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function he(b,_){for(var B=0,x=0,S=new Array,D=1;D<=16;D++){for(var W=1;W<=b[D];W++)S[_[x]]=[],S[_[x]][0]=B,S[_[x]][1]=D,x++,B++;B*=2}return S}function ge(b){for(var _=b[0],B=b[1]-1;B>=0;)_&1<<B&&(y|=1<<m),B--,--m<0&&(y==255?(re(255),re(0)):re(y),m=7,y=0)}function re(b){g.push(b)}function le(b){re(b>>8&255),re(255&b)}function fe(b,_,B,x,S){for(var D,W=S[0],ue=S[240],Ce=function(Ve,We){var Ye,Je,ot,at,ft,yt,kt,Nt,dt,xt,tt=0;for(dt=0;dt<8;++dt){Ye=Ve[tt],Je=Ve[tt+1],ot=Ve[tt+2],at=Ve[tt+3],ft=Ve[tt+4],yt=Ve[tt+5],kt=Ve[tt+6];var ir=Ye+(Nt=Ve[tt+7]),Lt=Ye-Nt,fr=Je+kt,Qt=Je-kt,Kt=ot+yt,Jr=ot-yt,Rt=at+ft,_r=at-ft,Yt=ir+Rt,on=ir-Rt,Et=fr+Kt,Gt=fr-Kt;Ve[tt]=Yt+Et,Ve[tt+4]=Yt-Et;var bt=.707106781*(Gt+on);Ve[tt+2]=on+bt,Ve[tt+6]=on-bt;var $t=.382683433*((Yt=_r+Jr)-(Gt=Qt+Lt)),xa=.5411961*Yt+$t,Ir=1.306562965*Gt+$t,Yn=.707106781*(Et=Jr+Qt),oa=Lt+Yn,gt=Lt-Yn;Ve[tt+5]=gt+xa,Ve[tt+3]=gt-xa,Ve[tt+1]=oa+Ir,Ve[tt+7]=oa-Ir,tt+=8}for(tt=0,dt=0;dt<8;++dt){Ye=Ve[tt],Je=Ve[tt+8],ot=Ve[tt+16],at=Ve[tt+24],ft=Ve[tt+32],yt=Ve[tt+40],kt=Ve[tt+48];var Fn=Ye+(Nt=Ve[tt+56]),Mn=Ye-Nt,mr=Je+kt,xr=Je-kt,br=ot+yt,H=ot-yt,ie=at+ft,Z=at-ft,ee=Fn+ie,Ae=Fn-ie,oe=mr+br,Se=mr-br;Ve[tt]=ee+oe,Ve[tt+32]=ee-oe;var Ie=.707106781*(Se+Ae);Ve[tt+16]=Ae+Ie,Ve[tt+48]=Ae-Ie;var Fe=.382683433*((ee=Z+H)-(Se=xr+Mn)),pe=.5411961*ee+Fe,X=1.306562965*Se+Fe,we=.707106781*(oe=H+xr),Le=Mn+we,Ke=Mn-we;Ve[tt+40]=Ke+pe,Ve[tt+24]=Ke-pe,Ve[tt+8]=Le+X,Ve[tt+56]=Le-X,tt++}for(dt=0;dt<64;++dt)xt=Ve[dt]*We[dt],d[dt]=xt>0?xt+.5|0:xt-.5|0;return d}(b,_),de=0;de<64;++de)w[I[de]]=Ce[de];var ke=w[0]-B;B=w[0],ke==0?ge(x[0]):(ge(x[h[D=32767+ke]]),ge(p[D]));for(var ne=63;ne>0&&w[ne]==0;)ne--;if(ne==0)return ge(W),B;for(var Ee,xe=1;xe<=ne;){for(var te=xe;w[xe]==0&&xe<=ne;)++xe;var Pe=xe-te;if(Pe>=16){Ee=Pe>>4;for(var rt=1;rt<=Ee;++rt)ge(ue);Pe&=15}D=32767+w[xe],ge(S[(Pe<<4)+h[D]]),ge(p[D]),xe++}return ne!=63&&ge(W),B}function Ue(b){b=Math.min(Math.max(b,1),100),A!=b&&(function(_){for(var B=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],x=0;x<64;x++){var S=o((B[x]*_+50)/100);S=Math.min(Math.max(S,1),255),s[I[x]]=S}for(var D=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],W=0;W<64;W++){var ue=o((D[W]*_+50)/100);ue=Math.min(Math.max(ue,1),255),l[I[W]]=ue}for(var Ce=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],de=0,ke=0;ke<8;ke++)for(var ne=0;ne<8;ne++)c[de]=1/(s[I[de]]*Ce[ke]*Ce[ne]*8),u[de]=1/(l[I[de]]*Ce[ke]*Ce[ne]*8),de++}(b<50?Math.floor(5e3/b):Math.floor(200-2*b)),A=b)}this.encode=function(b,_){_&&Ue(_),g=new Array,y=0,m=7,le(65496),le(65504),le(16),re(74),re(70),re(73),re(70),re(0),re(1),re(1),re(0),le(1),le(1),re(0),re(0),function(){le(65499),le(132),re(0);for(var Je=0;Je<64;Je++)re(s[Je]);re(1);for(var ot=0;ot<64;ot++)re(l[ot])}(),function(Je,ot){le(65472),le(17),re(8),le(ot),le(Je),re(3),re(1),re(17),re(0),re(2),re(17),re(1),re(3),re(17),re(1)}(b.width,b.height),function(){le(65476),le(418),re(0);for(var Je=0;Je<16;Je++)re(U[Je+1]);for(var ot=0;ot<=11;ot++)re(O[ot]);re(16);for(var at=0;at<16;at++)re(q[at+1]);for(var ft=0;ft<=161;ft++)re(T[ft]);re(1);for(var yt=0;yt<16;yt++)re(L[yt+1]);for(var kt=0;kt<=11;kt++)re(G[kt]);re(17);for(var Nt=0;Nt<16;Nt++)re(Y[Nt+1]);for(var dt=0;dt<=161;dt++)re(se[dt])}(),le(65498),le(12),re(3),re(1),re(0),re(2),re(17),re(3),re(17),re(0),re(63),re(0);var B=0,x=0,S=0;y=0,m=7,this.encode.displayName="_encode_";for(var D,W,ue,Ce,de,ke,ne,Ee,xe,te=b.data,Pe=b.width,rt=b.height,Ve=4*Pe,We=0;We<rt;){for(D=0;D<Ve;){for(de=Ve*We+D,ne=-1,Ee=0,xe=0;xe<64;xe++)ke=de+(Ee=xe>>3)*Ve+(ne=4*(7&xe)),We+Ee>=rt&&(ke-=Ve*(We+1+Ee-rt)),D+ne>=Ve&&(ke-=D+ne-Ve+4),W=te[ke++],ue=te[ke++],Ce=te[ke++],F[xe]=(R[W]+R[ue+256>>0]+R[Ce+512>>0]>>16)-128,N[xe]=(R[W+768>>0]+R[ue+1024>>0]+R[Ce+1280>>0]>>16)-128,Q[xe]=(R[W+1280>>0]+R[ue+1536>>0]+R[Ce+1792>>0]>>16)-128;B=fe(F,c,B,e,n),x=fe(N,u,x,r,a),S=fe(Q,u,S,r,a),D+=32}We+=8}if(m>=0){var Ye=[];Ye[1]=m+1,Ye[0]=(1<<m+1)-1,ge(Ye)}return le(65497),new Uint8Array(g)},t=t||50,function(){for(var b=String.fromCharCode,_=0;_<256;_++)z[_]=b(_)}(),e=he(U,O),r=he(L,G),n=he(q,T),a=he(Y,se),function(){for(var b=1,_=2,B=1;B<=15;B++){for(var x=b;x<_;x++)h[32767+x]=B,p[32767+x]=[],p[32767+x][1]=B,p[32767+x][0]=x;for(var S=-(_-1);S<=-b;S++)h[32767+S]=B,p[32767+S]=[],p[32767+S][1]=B,p[32767+S][0]=_-1+S;b<<=1,_<<=1}}(),function(){for(var b=0;b<256;b++)R[b]=19595*b,R[b+256>>0]=38470*b,R[b+512>>0]=7471*b+32768,R[b+768>>0]=-11059*b,R[b+1024>>0]=-21709*b,R[b+1280>>0]=32768*b+8421375,R[b+1536>>0]=-27439*b,R[b+1792>>0]=-5329*b}(),Ue(t)}/**
227
+ */function tg(t){var e,r,n,a,A,o=Math.floor,s=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),p=new Array(65535),h=new Array(65535),d=new Array(64),w=new Array(64),g=[],y=0,m=7,F=new Array(64),N=new Array(64),Q=new Array(64),z=new Array(256),R=new Array(2048),I=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],U=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],O=[0,1,2,3,4,5,6,7,8,9,10,11],q=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],L=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],G=[0,1,2,3,4,5,6,7,8,9,10,11],Y=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],se=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function he(b,_){for(var B=0,x=0,S=new Array,D=1;D<=16;D++){for(var W=1;W<=b[D];W++)S[_[x]]=[],S[_[x]][0]=B,S[_[x]][1]=D,x++,B++;B*=2}return S}function ge(b){for(var _=b[0],B=b[1]-1;B>=0;)_&1<<B&&(y|=1<<m),B--,--m<0&&(y==255?(re(255),re(0)):re(y),m=7,y=0)}function re(b){g.push(b)}function le(b){re(b>>8&255),re(255&b)}function fe(b,_,B,x,S){for(var D,W=S[0],ue=S[240],Ce=function(Ve,We){var Ye,Je,ot,at,ft,yt,kt,Nt,dt,xt,tt=0;for(dt=0;dt<8;++dt){Ye=Ve[tt],Je=Ve[tt+1],ot=Ve[tt+2],at=Ve[tt+3],ft=Ve[tt+4],yt=Ve[tt+5],kt=Ve[tt+6];var ir=Ye+(Nt=Ve[tt+7]),Lt=Ye-Nt,fr=Je+kt,Qt=Je-kt,Kt=ot+yt,Jr=ot-yt,Rt=at+ft,_r=at-ft,Yt=ir+Rt,on=ir-Rt,_t=fr+Kt,Gt=fr-Kt;Ve[tt]=Yt+_t,Ve[tt+4]=Yt-_t;var bt=.707106781*(Gt+on);Ve[tt+2]=on+bt,Ve[tt+6]=on-bt;var $t=.382683433*((Yt=_r+Jr)-(Gt=Qt+Lt)),xa=.5411961*Yt+$t,Ir=1.306562965*Gt+$t,Yn=.707106781*(_t=Jr+Qt),oa=Lt+Yn,gt=Lt-Yn;Ve[tt+5]=gt+xa,Ve[tt+3]=gt-xa,Ve[tt+1]=oa+Ir,Ve[tt+7]=oa-Ir,tt+=8}for(tt=0,dt=0;dt<8;++dt){Ye=Ve[tt],Je=Ve[tt+8],ot=Ve[tt+16],at=Ve[tt+24],ft=Ve[tt+32],yt=Ve[tt+40],kt=Ve[tt+48];var Fn=Ye+(Nt=Ve[tt+56]),Mn=Ye-Nt,mr=Je+kt,xr=Je-kt,br=ot+yt,H=ot-yt,ie=at+ft,Z=at-ft,ee=Fn+ie,Ae=Fn-ie,oe=mr+br,Se=mr-br;Ve[tt]=ee+oe,Ve[tt+32]=ee-oe;var Ie=.707106781*(Se+Ae);Ve[tt+16]=Ae+Ie,Ve[tt+48]=Ae-Ie;var Fe=.382683433*((ee=Z+H)-(Se=xr+Mn)),pe=.5411961*ee+Fe,X=1.306562965*Se+Fe,we=.707106781*(oe=H+xr),Le=Mn+we,Ke=Mn-we;Ve[tt+40]=Ke+pe,Ve[tt+24]=Ke-pe,Ve[tt+8]=Le+X,Ve[tt+56]=Le-X,tt++}for(dt=0;dt<64;++dt)xt=Ve[dt]*We[dt],d[dt]=xt>0?xt+.5|0:xt-.5|0;return d}(b,_),de=0;de<64;++de)w[I[de]]=Ce[de];var ke=w[0]-B;B=w[0],ke==0?ge(x[0]):(ge(x[h[D=32767+ke]]),ge(p[D]));for(var ne=63;ne>0&&w[ne]==0;)ne--;if(ne==0)return ge(W),B;for(var Ee,xe=1;xe<=ne;){for(var te=xe;w[xe]==0&&xe<=ne;)++xe;var Pe=xe-te;if(Pe>=16){Ee=Pe>>4;for(var rt=1;rt<=Ee;++rt)ge(ue);Pe&=15}D=32767+w[xe],ge(S[(Pe<<4)+h[D]]),ge(p[D]),xe++}return ne!=63&&ge(W),B}function Ue(b){b=Math.min(Math.max(b,1),100),A!=b&&(function(_){for(var B=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],x=0;x<64;x++){var S=o((B[x]*_+50)/100);S=Math.min(Math.max(S,1),255),s[I[x]]=S}for(var D=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],W=0;W<64;W++){var ue=o((D[W]*_+50)/100);ue=Math.min(Math.max(ue,1),255),l[I[W]]=ue}for(var Ce=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],de=0,ke=0;ke<8;ke++)for(var ne=0;ne<8;ne++)c[de]=1/(s[I[de]]*Ce[ke]*Ce[ne]*8),u[de]=1/(l[I[de]]*Ce[ke]*Ce[ne]*8),de++}(b<50?Math.floor(5e3/b):Math.floor(200-2*b)),A=b)}this.encode=function(b,_){_&&Ue(_),g=new Array,y=0,m=7,le(65496),le(65504),le(16),re(74),re(70),re(73),re(70),re(0),re(1),re(1),re(0),le(1),le(1),re(0),re(0),function(){le(65499),le(132),re(0);for(var Je=0;Je<64;Je++)re(s[Je]);re(1);for(var ot=0;ot<64;ot++)re(l[ot])}(),function(Je,ot){le(65472),le(17),re(8),le(ot),le(Je),re(3),re(1),re(17),re(0),re(2),re(17),re(1),re(3),re(17),re(1)}(b.width,b.height),function(){le(65476),le(418),re(0);for(var Je=0;Je<16;Je++)re(U[Je+1]);for(var ot=0;ot<=11;ot++)re(O[ot]);re(16);for(var at=0;at<16;at++)re(q[at+1]);for(var ft=0;ft<=161;ft++)re(T[ft]);re(1);for(var yt=0;yt<16;yt++)re(L[yt+1]);for(var kt=0;kt<=11;kt++)re(G[kt]);re(17);for(var Nt=0;Nt<16;Nt++)re(Y[Nt+1]);for(var dt=0;dt<=161;dt++)re(se[dt])}(),le(65498),le(12),re(3),re(1),re(0),re(2),re(17),re(3),re(17),re(0),re(63),re(0);var B=0,x=0,S=0;y=0,m=7,this.encode.displayName="_encode_";for(var D,W,ue,Ce,de,ke,ne,Ee,xe,te=b.data,Pe=b.width,rt=b.height,Ve=4*Pe,We=0;We<rt;){for(D=0;D<Ve;){for(de=Ve*We+D,ne=-1,Ee=0,xe=0;xe<64;xe++)ke=de+(Ee=xe>>3)*Ve+(ne=4*(7&xe)),We+Ee>=rt&&(ke-=Ve*(We+1+Ee-rt)),D+ne>=Ve&&(ke-=D+ne-Ve+4),W=te[ke++],ue=te[ke++],Ce=te[ke++],F[xe]=(R[W]+R[ue+256>>0]+R[Ce+512>>0]>>16)-128,N[xe]=(R[W+768>>0]+R[ue+1024>>0]+R[Ce+1280>>0]>>16)-128,Q[xe]=(R[W+1280>>0]+R[ue+1536>>0]+R[Ce+1792>>0]>>16)-128;B=fe(F,c,B,e,n),x=fe(N,u,x,r,a),S=fe(Q,u,S,r,a),D+=32}We+=8}if(m>=0){var Ye=[];Ye[1]=m+1,Ye[0]=(1<<m+1)-1,ge(Ye)}return le(65497),new Uint8Array(g)},t=t||50,function(){for(var b=String.fromCharCode,_=0;_<256;_++)z[_]=b(_)}(),e=he(U,O),r=he(L,G),n=he(q,T),a=he(Y,se),function(){for(var b=1,_=2,B=1;B<=15;B++){for(var x=b;x<_;x++)h[32767+x]=B,p[32767+x]=[],p[32767+x][1]=B,p[32767+x][0]=x;for(var S=-(_-1);S<=-b;S++)h[32767+S]=B,p[32767+S]=[],p[32767+S][1]=B,p[32767+S][0]=_-1+S;b<<=1,_<<=1}}(),function(){for(var b=0;b<256;b++)R[b]=19595*b,R[b+256>>0]=38470*b,R[b+512>>0]=7471*b+32768,R[b+768>>0]=-11059*b,R[b+1024>>0]=-21709*b,R[b+1280>>0]=32768*b+8421375,R[b+1536>>0]=-27439*b,R[b+1792>>0]=-5329*b}(),Ue(t)}/**
228
228
  * @license
229
229
  * Copyright (c) 2017 Aras Abbasi
230
230
  *
231
231
  * Licensed under the MIT License.
232
232
  * http://opensource.org/licenses/mit-license
233
- */function ja(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Iv(t){function e(U){if(!U)throw Error("assert :P")}function r(U,O,q){for(var T=0;4>T;T++)if(U[O+T]!=q.charCodeAt(T))return!0;return!1}function n(U,O,q,T,L){for(var G=0;G<L;G++)U[O+G]=q[T+G]}function a(U,O,q,T){for(var L=0;L<T;L++)U[O+L]=q}function A(U){return new Int32Array(U)}function o(U,O){for(var q=[],T=0;T<U;T++)q.push(new O);return q}function s(U,O){var q=[];return function T(L,G,Y){for(var se=Y[G],he=0;he<se&&(L.push(Y.length>G+1?[]:new O),!(Y.length<G+1));he++)T(L[he],G+1,Y)}(q,0,U),q}var l=function(){var U=this;function O(f,v){for(var E=1<<v-1>>>0;f&E;)E>>>=1;return E?(f&E-1)+E:f}function q(f,v,E,k,P){e(!(k%E));do f[v+(k-=E)]=P;while(0<k)}function T(f,v,E,k,P){if(e(2328>=P),512>=P)var V=A(512);else if((V=A(P))==null)return 0;return function(K,j,J,ae,ye,Te){var Ne,be,He=j,De=1<<J,ve=A(16),Be=A(16);for(e(ye!=0),e(ae!=null),e(K!=null),e(0<J),be=0;be<ye;++be){if(15<ae[be])return 0;++ve[ae[be]]}if(ve[0]==ye)return 0;for(Be[1]=0,Ne=1;15>Ne;++Ne){if(ve[Ne]>1<<Ne)return 0;Be[Ne+1]=Be[Ne]+ve[Ne]}for(be=0;be<ye;++be)Ne=ae[be],0<ae[be]&&(Te[Be[Ne]++]=be);if(Be[15]==1)return(ae=new L).g=0,ae.value=Te[0],q(K,He,1,De,ae),De;var Me,Ge=-1,Re=De-1,lt=0,nt=1,vt=1,At=1<<J;for(be=0,Ne=1,ye=2;Ne<=J;++Ne,ye<<=1){if(nt+=vt<<=1,0>(vt-=ve[Ne]))return 0;for(;0<ve[Ne];--ve[Ne])(ae=new L).g=Ne,ae.value=Te[be++],q(K,He+lt,ye,At,ae),lt=O(lt,Ne)}for(Ne=J+1,ye=2;15>=Ne;++Ne,ye<<=1){if(nt+=vt<<=1,0>(vt-=ve[Ne]))return 0;for(;0<ve[Ne];--ve[Ne]){if(ae=new L,(lt&Re)!=Ge){for(He+=At,Me=1<<(Ge=Ne)-J;15>Ge&&!(0>=(Me-=ve[Ge]));)++Ge,Me<<=1;De+=At=1<<(Me=Ge-J),K[j+(Ge=lt&Re)].g=Me+J,K[j+Ge].value=He-j-Ge}ae.g=Ne-J,ae.value=Te[be++],q(K,He+(lt>>J),ye,At,ae),lt=O(lt,Ne)}}return nt!=2*Be[15]-1?0:De}(f,v,E,k,P,V)}function L(){this.value=this.g=0}function G(){this.value=this.g=0}function Y(){this.G=o(5,L),this.H=A(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(ca,G)}function se(f,v,E,k){e(f!=null),e(v!=null),e(2147483648>k),f.Ca=254,f.I=0,f.b=-8,f.Ka=0,f.oa=v,f.pa=E,f.Jd=v,f.Yc=E+k,f.Zc=4<=k?E+k-4+1:E,D(f)}function he(f,v){for(var E=0;0<v--;)E|=ue(f,128)<<v;return E}function ge(f,v){var E=he(f,v);return W(f)?-E:E}function re(f,v,E,k){var P,V=0;for(e(f!=null),e(v!=null),e(4294967288>k),f.Sb=k,f.Ra=0,f.u=0,f.h=0,4<k&&(k=4),P=0;P<k;++P)V+=v[E+P]<<8*P;f.Ra=V,f.bb=k,f.oa=v,f.pa=E}function le(f){for(;8<=f.u&&f.bb<f.Sb;)f.Ra>>>=8,f.Ra+=f.oa[f.pa+f.bb]<<sl-8>>>0,++f.bb,f.u-=8;B(f)&&(f.h=1,f.u=0)}function fe(f,v){if(e(0<=v),!f.h&&v<=ol){var E=_(f)&il[v];return f.u+=v,le(f),E}return f.h=1,f.u=0}function Ue(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function b(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function _(f){return f.Ra>>>(f.u&sl-1)>>>0}function B(f){return e(f.bb<=f.Sb),f.h||f.bb==f.Sb&&f.u>sl}function x(f,v){f.u=v,f.h=B(f)}function S(f){f.u>=Jc&&(e(f.u>=Jc),le(f))}function D(f){e(f!=null&&f.oa!=null),f.pa<f.Zc?(f.I=(f.oa[f.pa++]|f.I<<8)>>>0,f.b+=8):(e(f!=null&&f.oa!=null),f.pa<f.Yc?(f.b+=8,f.I=f.oa[f.pa++]|f.I<<8):f.Ka?f.b=0:(f.I<<=8,f.b+=8,f.Ka=1))}function W(f){return he(f,1)}function ue(f,v){var E=f.Ca;0>f.b&&D(f);var k=f.b,P=E*v>>>8,V=(f.I>>>k>P)+0;for(V?(E-=P,f.I-=P+1<<k>>>0):E=P+1,k=E,P=0;256<=k;)P+=8,k>>=8;return k=7^P+ua[k],f.b-=k,f.Ca=(E<<k)-1,V}function Ce(f,v,E){f[v+0]=E>>24&255,f[v+1]=E>>16&255,f[v+2]=E>>8&255,f[v+3]=E>>0&255}function de(f,v){return f[v+0]<<0|f[v+1]<<8}function ke(f,v){return de(f,v)|f[v+2]<<16}function ne(f,v){return de(f,v)|de(f,v+2)<<16}function Ee(f,v){var E=1<<v;return e(f!=null),e(0<v),f.X=A(E),f.X==null?0:(f.Mb=32-v,f.Xa=v,1)}function xe(f,v){e(f!=null),e(v!=null),e(f.Xa==v.Xa),n(v.X,0,f.X,0,1<<v.Xa)}function te(){this.X=[],this.Xa=this.Mb=0}function Pe(f,v,E,k){e(E!=null),e(k!=null);var P=E[0],V=k[0];return P==0&&(P=(f*V+v/2)/v),V==0&&(V=(v*P+f/2)/f),0>=P||0>=V?0:(E[0]=P,k[0]=V,1)}function rt(f,v){return f+(1<<v)-1>>>v}function Ve(f,v){return((4278255360&f)+(4278255360&v)>>>0&4278255360)+((16711935&f)+(16711935&v)>>>0&16711935)>>>0}function We(f,v){U[v]=function(E,k,P,V,K,j,J){var ae;for(ae=0;ae<K;++ae){var ye=U[f](j[J+ae-1],P,V+ae);j[J+ae]=Ve(E[k+ae],ye)}}}function Ye(){this.ud=this.hd=this.jd=0}function Je(f,v){return((4278124286&(f^v))>>>1)+(f&v)>>>0}function ot(f){return 0<=f&&256>f?f:0>f?0:255<f?255:void 0}function at(f,v){return ot(f+(f-v+.5>>1))}function ft(f,v,E){return Math.abs(v-E)-Math.abs(f-E)}function yt(f,v,E,k,P,V,K){for(k=V[K-1],E=0;E<P;++E)V[K+E]=k=Ve(f[v+E],k)}function kt(f,v,E,k,P){var V;for(V=0;V<E;++V){var K=f[v+V],j=K>>8&255,J=16711935&(J=(J=16711935&K)+((j<<16)+j));k[P+V]=(4278255360&K)+J>>>0}}function Nt(f,v){v.jd=f>>0&255,v.hd=f>>8&255,v.ud=f>>16&255}function dt(f,v,E,k,P,V){var K;for(K=0;K<k;++K){var j=v[E+K],J=j>>>8,ae=j,ye=255&(ye=(ye=j>>>16)+((f.jd<<24>>24)*(J<<24>>24)>>>5));ae=255&(ae=(ae=ae+((f.hd<<24>>24)*(J<<24>>24)>>>5))+((f.ud<<24>>24)*(ye<<24>>24)>>>5)),P[V+K]=(4278255360&j)+(ye<<16)+ae}}function xt(f,v,E,k,P){U[v]=function(V,K,j,J,ae,ye,Te,Ne,be){for(J=Te;J<Ne;++J)for(Te=0;Te<be;++Te)ae[ye++]=P(j[k(V[K++])])},U[f]=function(V,K,j,J,ae,ye,Te){var Ne=8>>V.b,be=V.Ea,He=V.K[0],De=V.w;if(8>Ne)for(V=(1<<V.b)-1,De=(1<<Ne)-1;K<j;++K){var ve,Be=0;for(ve=0;ve<be;++ve)ve&V||(Be=k(J[ae++])),ye[Te++]=P(He[Be&De]),Be>>=Ne}else U["VP8LMapColor"+E](J,ae,He,De,ye,Te,K,j,be)}}function tt(f,v,E,k,P){for(E=v+E;v<E;){var V=f[v++];k[P++]=V>>16&255,k[P++]=V>>8&255,k[P++]=V>>0&255}}function ir(f,v,E,k,P){for(E=v+E;v<E;){var V=f[v++];k[P++]=V>>16&255,k[P++]=V>>8&255,k[P++]=V>>0&255,k[P++]=V>>24&255}}function Lt(f,v,E,k,P){for(E=v+E;v<E;){var V=(K=f[v++])>>16&240|K>>12&15,K=K>>0&240|K>>28&15;k[P++]=V,k[P++]=K}}function fr(f,v,E,k,P){for(E=v+E;v<E;){var V=(K=f[v++])>>16&248|K>>13&7,K=K>>5&224|K>>3&31;k[P++]=V,k[P++]=K}}function Qt(f,v,E,k,P){for(E=v+E;v<E;){var V=f[v++];k[P++]=V>>0&255,k[P++]=V>>8&255,k[P++]=V>>16&255}}function Kt(f,v,E,k,P,V){if(V==0)for(E=v+E;v<E;)Ce(k,((V=f[v++])[0]>>24|V[1]>>8&65280|V[2]<<8&16711680|V[3]<<24)>>>0),P+=32;else n(k,P,f,v,E)}function Jr(f,v){U[v][0]=U[f+"0"],U[v][1]=U[f+"1"],U[v][2]=U[f+"2"],U[v][3]=U[f+"3"],U[v][4]=U[f+"4"],U[v][5]=U[f+"5"],U[v][6]=U[f+"6"],U[v][7]=U[f+"7"],U[v][8]=U[f+"8"],U[v][9]=U[f+"9"],U[v][10]=U[f+"10"],U[v][11]=U[f+"11"],U[v][12]=U[f+"12"],U[v][13]=U[f+"13"],U[v][14]=U[f+"0"],U[v][15]=U[f+"0"]}function Rt(f){return f==Pm||f==Mm||f==x0||f==Rm}function _r(){this.eb=[],this.size=this.A=this.fb=0}function Yt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function on(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new _r,this.f.kb=new Yt,this.sd=null}function Et(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Gt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function bt(f){return alert("todo:WebPSamplerProcessPlane"),f.T}function $t(f,v){var E=f.T,k=v.ba.f.RGBA,P=k.eb,V=k.fb+f.ka*k.A,K=Ha[v.ba.S],j=f.y,J=f.O,ae=f.f,ye=f.N,Te=f.ea,Ne=f.W,be=v.cc,He=v.dc,De=v.Mc,ve=v.Nc,Be=f.ka,Me=f.ka+f.T,Ge=f.U,Re=Ge+1>>1;for(Be==0?K(j,J,null,null,ae,ye,Te,Ne,ae,ye,Te,Ne,P,V,null,null,Ge):(K(v.ec,v.fc,j,J,be,He,De,ve,ae,ye,Te,Ne,P,V-k.A,P,V,Ge),++E);Be+2<Me;Be+=2)be=ae,He=ye,De=Te,ve=Ne,ye+=f.Rc,Ne+=f.Rc,V+=2*k.A,K(j,(J+=2*f.fa)-f.fa,j,J,be,He,De,ve,ae,ye,Te,Ne,P,V-k.A,P,V,Ge);return J+=f.fa,f.j+Me<f.o?(n(v.ec,v.fc,j,J,Ge),n(v.cc,v.dc,ae,ye,Re),n(v.Mc,v.Nc,Te,Ne,Re),E--):1&Me||K(j,J,null,null,ae,ye,Te,Ne,ae,ye,Te,Ne,P,V+k.A,null,null,Ge),E}function xa(f,v,E){var k=f.F,P=[f.J];if(k!=null){var V=f.U,K=v.ba.S,j=K==B0||K==x0;v=v.ba.f.RGBA;var J=[0],ae=f.ka;J[0]=f.T,f.Kb&&(ae==0?--J[0]:(--ae,P[0]-=f.width),f.j+f.ka+f.T==f.o&&(J[0]=f.o-f.j-ae));var ye=v.eb;ae=v.fb+ae*v.A,f=p0(k,P[0],f.width,V,J,ye,ae+(j?0:3),v.A),e(E==J),f&&Rt(K)&&Zi(ye,ae,j,V,J,v.A)}return 0}function Ir(f){var v=f.ma,E=v.ba.S,k=11>E,P=E==v0||E==w0||E==B0||E==Om||E==12||Rt(E);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!qc(v.Oa,f,P?11:12))return 0;if(P&&Rt(E)&&Xe(),f.da)alert("todo:use_scaling");else{if(k){if(v.Ib=bt,f.Kb){if(E=f.U+1>>1,v.memory=A(f.U+2*E),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+f.U,v.Mc=v.cc,v.Nc=v.dc+E,v.Ib=$t,Xe()}}else alert("todo:EmitYUV");P&&(v.Jb=xa,k&&_e())}if(k&&!dE){for(f=0;256>f;++f)bie[f]=89858*(f-128)+C0>>b0,_ie[f]=-22014*(f-128)+C0,Eie[f]=-45773*(f-128),Cie[f]=113618*(f-128)+C0>>b0;for(f=au;f<$m;++f)v=76283*(f-16)+C0>>b0,Fie[f-au]=Ca(v,255),Sie[f-au]=Ca(v+8>>4,15);dE=1}return 1}function Yn(f){var v=f.ma,E=f.U,k=f.T;return e(!(1&f.ka)),0>=E||0>=k?0:(E=v.Ib(f,v),v.Jb!=null&&v.Jb(f,v,E),v.Dc+=E,1)}function oa(f){f.ma.memory=null}function gt(f,v,E,k){return fe(f,8)!=47?0:(v[0]=fe(f,14)+1,E[0]=fe(f,14)+1,k[0]=fe(f,1),fe(f,3)!=0?0:!f.h)}function Fn(f,v){if(4>f)return f+1;var E=f-2>>1;return(2+(1&f)<<E)+fe(v,E)+1}function Mn(f,v){return 120<v?v-120:1<=(E=((E=lie[v-1])>>4)*f+(8-(15&E)))?E:1;var E}function mr(f,v,E){var k=_(E),P=f[v+=255&k].g-8;return 0<P&&(x(E,E.u+8),k=_(E),v+=f[v].value,v+=k&(1<<P)-1),x(E,E.u+f[v].g),f[v].value}function xr(f,v,E){return E.g+=f.g,E.value+=f.value<<v>>>0,e(8>=E.g),f.g}function br(f,v,E){var k=f.xc;return e((v=k==0?0:f.vc[f.md*(E>>k)+(v>>k)])<f.Wb),f.Ya[v]}function H(f,v,E,k){var P=f.ab,V=f.c*v,K=f.C;v=K+v;var j=E,J=k;for(k=f.Ta,E=f.Ua;0<P--;){var ae=f.gc[P],ye=K,Te=v,Ne=j,be=J,He=(J=k,j=E,ae.Ea);switch(e(ye<Te),e(Te<=ae.nc),ae.hc){case 2:g0(Ne,be,(Te-ye)*He,J,j);break;case 0:var De=ye,ve=Te,Be=J,Me=j,Ge=(At=ae).Ea;De==0&&(Um(Ne,be,null,null,1,Be,Me),yt(Ne,be+1,0,0,Ge-1,Be,Me+1),be+=Ge,Me+=Ge,++De);for(var Re=1<<At.b,lt=Re-1,nt=rt(Ge,At.b),vt=At.K,At=At.w+(De>>At.b)*nt;De<ve;){var Zt=vt,or=At,Wt=1;for(Zc(Ne,be,Be,Me-Ge,1,Be,Me);Wt<Ge;){var Vt=(Wt&~lt)+Re;Vt>Ge&&(Vt=Ge),(0,Xi[Zt[or++]>>8&15])(Ne,be+ +Wt,Be,Me+Wt-Ge,Vt-Wt,Be,Me+Wt),Wt=Vt}be+=Ge,Me+=Ge,++De&lt||(At+=nt)}Te!=ae.nc&&n(J,j-He,J,j+(Te-ye-1)*He,He);break;case 1:for(He=Ne,ve=be,Ge=(Ne=ae.Ea)-(Me=Ne&~(Be=(be=1<<ae.b)-1)),De=rt(Ne,ae.b),Re=ae.K,ae=ae.w+(ye>>ae.b)*De;ye<Te;){for(lt=Re,nt=ae,vt=new Ye,At=ve+Me,Zt=ve+Ne;ve<At;)Nt(lt[nt++],vt),Pa(vt,He,ve,be,J,j),ve+=be,j+=be;ve<Zt&&(Nt(lt[nt++],vt),Pa(vt,He,ve,Ge,J,j),ve+=Ge,j+=Ge),++ye&Be||(ae+=De)}break;case 3:if(Ne==J&&be==j&&0<ae.b){for(ve=J,Ne=He=j+(Te-ye)*He-(Me=(Te-ye)*rt(ae.Ea,ae.b)),be=J,Be=j,De=[],Me=(Ge=Me)-1;0<=Me;--Me)De[Me]=be[Be+Me];for(Me=Ge-1;0<=Me;--Me)ve[Ne+Me]=De[Me];fA(ae,ye,Te,J,He,J,j)}else fA(ae,ye,Te,Ne,be,J,j)}j=k,J=E}J!=E&&n(k,E,j,J,V)}function ie(f,v){var E=f.V,k=f.Ba+f.c*f.C,P=v-f.C;if(e(v<=f.l.o),e(16>=P),0<P){var V=f.l,K=f.Ta,j=f.Ua,J=V.width;if(H(f,P,E,k),P=j=[j],e((E=f.C)<(k=v)),e(V.v<V.va),k>V.o&&(k=V.o),E<V.j){var ae=V.j-E;E=V.j,P[0]+=ae*J}if(E>=k?E=0:(P[0]+=4*V.v,V.ka=E-V.j,V.U=V.va-V.v,V.T=k-E,E=1),E){if(j=j[0],11>(E=f.ca).S){var ye=E.f.RGBA,Te=(k=E.S,P=V.U,V=V.T,ae=ye.eb,ye.A),Ne=V;for(ye=ye.fb+f.Ma*ye.A;0<Ne--;){var be=K,He=j,De=P,ve=ae,Be=ye;switch(k){case y0:dA(be,He,De,ve,Be);break;case v0:qi(be,He,De,ve,Be);break;case Pm:qi(be,He,De,ve,Be),Zi(ve,Be,0,De,1,0);break;case aE:ll(be,He,De,ve,Be);break;case w0:Kt(be,He,De,ve,Be,1);break;case Mm:Kt(be,He,De,ve,Be,1),Zi(ve,Be,0,De,1,0);break;case B0:Kt(be,He,De,ve,Be,0);break;case x0:Kt(be,He,De,ve,Be,0),Zi(ve,Be,1,De,1,0);break;case Om:PA(be,He,De,ve,Be);break;case Rm:PA(be,He,De,ve,Be),hl(ve,Be,De,1,0);break;case AE:hi(be,He,De,ve,Be);break;default:e(0)}j+=J,ye+=Te}f.Ma+=V}else alert("todo:EmitRescaledRowsYUVA");e(f.Ma<=E.height)}}f.C=v,e(f.C<=f.i)}function Z(f){var v;if(0<f.ua)return 0;for(v=0;v<f.Wb;++v){var E=f.Ya[v].G,k=f.Ya[v].H;if(0<E[1][k[1]+0].g||0<E[2][k[2]+0].g||0<E[3][k[3]+0].g)return 0}return 1}function ee(f,v,E,k,P,V){if(f.Z!=0){var K=f.qd,j=f.rd;for(e(to[f.Z]!=null);v<E;++v)to[f.Z](K,j,k,P,k,P,V),K=k,j=P,P+=V;f.qd=K,f.rd=j}}function Ae(f,v){var E=f.l.ma,k=E.Z==0||E.Z==1?f.l.j:f.C;if(k=f.C<k?k:f.C,e(v<=f.l.o),v>k){var P=f.l.width,V=E.ca,K=E.tb+P*k,j=f.V,J=f.Ba+f.c*k,ae=f.gc;e(f.ab==1),e(ae[0].hc==3),Im(ae[0],k,v,j,J,V,K),ee(E,k,v,V,K,P)}f.C=f.Ma=v}function oe(f,v,E,k,P,V,K){var j=f.$/k,J=f.$%k,ae=f.m,ye=f.s,Te=E+f.$,Ne=Te;P=E+k*P;var be=E+k*V,He=280+ye.ua,De=f.Pb?j:16777216,ve=0<ye.ua?ye.Wa:null,Be=ye.wc,Me=Te<be?br(ye,J,j):null;e(f.C<V),e(be<=P);var Ge=!1;e:for(;;){for(;Ge||Te<be;){var Re=0;if(j>=De){var lt=Te-E;e((De=f).Pb),De.wd=De.m,De.xd=lt,0<De.s.ua&&xe(De.s.Wa,De.s.vb),De=j+uie}if(J&Be||(Me=br(ye,J,j)),e(Me!=null),Me.Qb&&(v[Te]=Me.qb,Ge=!0),!Ge)if(S(ae),Me.jc){Re=ae,lt=v;var nt=Te,vt=Me.pd[_(Re)&ca-1];e(Me.jc),256>vt.g?(x(Re,Re.u+vt.g),lt[nt]=vt.value,Re=0):(x(Re,Re.u+vt.g-256),e(256<=vt.value),Re=vt.value),Re==0&&(Ge=!0)}else Re=mr(Me.G[0],Me.H[0],ae);if(ae.h)break;if(Ge||256>Re){if(!Ge)if(Me.nd)v[Te]=(Me.qb|Re<<8)>>>0;else{if(S(ae),Ge=mr(Me.G[1],Me.H[1],ae),S(ae),lt=mr(Me.G[2],Me.H[2],ae),nt=mr(Me.G[3],Me.H[3],ae),ae.h)break;v[Te]=(nt<<24|Ge<<16|Re<<8|lt)>>>0}if(Ge=!1,++Te,++J>=k&&(J=0,++j,K!=null&&j<=V&&!(j%16)&&K(f,j),ve!=null))for(;Ne<Te;)Re=v[Ne++],ve.X[(506832829*Re&4294967295)>>>ve.Mb]=Re}else if(280>Re){if(Re=Fn(Re-256,ae),lt=mr(Me.G[4],Me.H[4],ae),S(ae),lt=Mn(k,lt=Fn(lt,ae)),ae.h)break;if(Te-E<lt||P-Te<Re)break e;for(nt=0;nt<Re;++nt)v[Te+nt]=v[Te+nt-lt];for(Te+=Re,J+=Re;J>=k;)J-=k,++j,K!=null&&j<=V&&!(j%16)&&K(f,j);if(e(Te<=P),J&Be&&(Me=br(ye,J,j)),ve!=null)for(;Ne<Te;)Re=v[Ne++],ve.X[(506832829*Re&4294967295)>>>ve.Mb]=Re}else{if(!(Re<He))break e;for(Ge=Re-280,e(ve!=null);Ne<Te;)Re=v[Ne++],ve.X[(506832829*Re&4294967295)>>>ve.Mb]=Re;Re=Te,e(!(Ge>>>(lt=ve).Xa)),v[Re]=lt.X[Ge],Ge=!0}Ge||e(ae.h==B(ae))}if(f.Pb&&ae.h&&Te<P)e(f.m.h),f.a=5,f.m=f.wd,f.$=f.xd,0<f.s.ua&&xe(f.s.vb,f.s.Wa);else{if(ae.h)break e;K!=null&&K(f,j>V?V:j),f.a=0,f.$=Te-E}return 1}return f.a=3,0}function Se(f){e(f!=null),f.vc=null,f.yc=null,f.Ya=null;var v=f.Wa;v!=null&&(v.X=null),f.vb=null,e(f!=null)}function Ie(){var f=new Lm;return f==null?null:(f.a=0,f.xb=sE,Jr("Predictor","VP8LPredictors"),Jr("Predictor","VP8LPredictors_C"),Jr("PredictorAdd","VP8LPredictorsAdd"),Jr("PredictorAdd","VP8LPredictorsAdd_C"),g0=kt,Pa=dt,dA=tt,qi=ir,PA=Lt,hi=fr,ll=Qt,U.VP8LMapColor32b=eu,U.VP8LMapColor8b=Dm,f)}function Fe(f,v,E,k,P){var V=1,K=[f],j=[v],J=k.m,ae=k.s,ye=null,Te=0;e:for(;;){if(E)for(;V&&fe(J,1);){var Ne=K,be=j,He=k,De=1,ve=He.m,Be=He.gc[He.ab],Me=fe(ve,2);if(He.Oc&1<<Me)V=0;else{switch(He.Oc|=1<<Me,Be.hc=Me,Be.Ea=Ne[0],Be.nc=be[0],Be.K=[null],++He.ab,e(4>=He.ab),Me){case 0:case 1:Be.b=fe(ve,3)+2,De=Fe(rt(Be.Ea,Be.b),rt(Be.nc,Be.b),0,He,Be.K),Be.K=Be.K[0];break;case 3:var Ge,Re=fe(ve,8)+1,lt=16<Re?0:4<Re?1:2<Re?2:3;if(Ne[0]=rt(Be.Ea,lt),Be.b=lt,Ge=De=Fe(Re,1,0,He,Be.K)){var nt,vt=Re,At=Be,Zt=1<<(8>>At.b),or=A(Zt);if(or==null)Ge=0;else{var Wt=At.K[0],Vt=At.w;for(or[0]=At.K[0][0],nt=1;nt<1*vt;++nt)or[nt]=Ve(Wt[Vt+nt],or[nt-1]);for(;nt<4*Zt;++nt)or[nt]=0;At.K[0]=null,At.K[0]=or,Ge=1}}De=Ge;break;case 2:break;default:e(0)}V=De}}if(K=K[0],j=j[0],V&&fe(J,1)&&!(V=1<=(Te=fe(J,4))&&11>=Te)){k.a=3;break e}var dr;if(dr=V)t:{var ur,Dt,en,ha=k,tn=K,fa=j,sr=Te,_a=E,Fa=ha.m,pn=ha.s,Sn=[null],Jn=1,Va=0,MA=cie[sr];r:for(;;){if(_a&&fe(Fa,1)){var mn=fe(Fa,3)+2,mi=rt(tn,mn),Xo=rt(fa,mn),fl=mi*Xo;if(!Fe(mi,Xo,0,ha,Sn))break r;for(Sn=Sn[0],pn.xc=mn,ur=0;ur<fl;++ur){var ro=Sn[ur]>>8&65535;Sn[ur]=ro,ro>=Jn&&(Jn=ro+1)}}if(Fa.h)break r;for(Dt=0;5>Dt;++Dt){var Qr=iE[Dt];!Dt&&0<sr&&(Qr+=1<<sr),Va<Qr&&(Va=Qr)}var zm=o(Jn*MA,L),mE=Jn,yE=o(mE,Y);if(yE==null)var _0=null;else e(65536>=mE),_0=yE;var Au=A(Va);if(_0==null||Au==null||zm==null){ha.a=1;break r}var F0=zm;for(ur=en=0;ur<Jn;++ur){var yA=_0[ur],dl=yA.G,gl=yA.H,vE=0,S0=1,wE=0;for(Dt=0;5>Dt;++Dt){Qr=iE[Dt],dl[Dt]=F0,gl[Dt]=en,!Dt&&0<sr&&(Qr+=1<<sr);a:{var k0,Km=Qr,T0=ha,iu=Au,Nie=F0,Lie=en,Gm=0,no=T0.m,Uie=fe(no,1);if(a(iu,0,0,Km),Uie){var Iie=fe(no,1)+1,Die=fe(no,1),BE=fe(no,Die==0?1:8);iu[BE]=1,Iie==2&&(iu[BE=fe(no,8)]=1);var N0=1}else{var xE=A(19),bE=fe(no,4)+4;if(19<bE){T0.a=3;var L0=0;break a}for(k0=0;k0<bE;++k0)xE[sie[k0]]=fe(no,3);var jm=void 0,ou=void 0,CE=T0,Qie=xE,U0=Km,EE=iu,Wm=0,ao=CE.m,_E=8,FE=o(128,L);n:for(;T(FE,0,7,Qie,19);){if(fe(ao,1)){var Oie=2+2*fe(ao,3);if((jm=2+fe(ao,Oie))>U0)break n}else jm=U0;for(ou=0;ou<U0&&jm--;){S(ao);var SE=FE[0+(127&_(ao))];x(ao,ao.u+SE.g);var pl=SE.value;if(16>pl)EE[ou++]=pl,pl!=0&&(_E=pl);else{var Pie=pl==16,kE=pl-16,Mie=iie[kE],TE=fe(ao,Aie[kE])+Mie;if(ou+TE>U0)break n;for(var Rie=Pie?_E:0;0<TE--;)EE[ou++]=Rie}}Wm=1;break n}Wm||(CE.a=3),N0=Wm}(N0=N0&&!no.h)&&(Gm=T(Nie,Lie,8,iu,Km)),N0&&Gm!=0?L0=Gm:(T0.a=3,L0=0)}if(L0==0)break r;if(S0&&oie[Dt]==1&&(S0=F0[en].g==0),vE+=F0[en].g,en+=L0,3>=Dt){var su,Xm=Au[0];for(su=1;su<Qr;++su)Au[su]>Xm&&(Xm=Au[su]);wE+=Xm}}if(yA.nd=S0,yA.Qb=0,S0&&(yA.qb=(dl[3][gl[3]+0].value<<24|dl[1][gl[1]+0].value<<16|dl[2][gl[2]+0].value)>>>0,vE==0&&256>dl[0][gl[0]+0].value&&(yA.Qb=1,yA.qb+=dl[0][gl[0]+0].value<<8)),yA.jc=!yA.Qb&&6>wE,yA.jc){var I0,yi=yA;for(I0=0;I0<ca;++I0){var Ao=I0,io=yi.pd[Ao],D0=yi.G[0][yi.H[0]+Ao];256<=D0.value?(io.g=D0.g+256,io.value=D0.value):(io.g=0,io.value=0,Ao>>=xr(D0,8,io),Ao>>=xr(yi.G[1][yi.H[1]+Ao],16,io),Ao>>=xr(yi.G[2][yi.H[2]+Ao],0,io),xr(yi.G[3][yi.H[3]+Ao],24,io))}}}pn.vc=Sn,pn.Wb=Jn,pn.Ya=_0,pn.yc=zm,dr=1;break t}dr=0}if(!(V=dr)){k.a=3;break e}if(0<Te){if(ae.ua=1<<Te,!Ee(ae.Wa,Te)){k.a=1,V=0;break e}}else ae.ua=0;var qm=k,NE=K,Hie=j,Ym=qm.s,Jm=Ym.xc;if(qm.c=NE,qm.i=Hie,Ym.md=rt(NE,Jm),Ym.wc=Jm==0?-1:(1<<Jm)-1,E){k.xb=yie;break e}if((ye=A(K*j))==null){k.a=1,V=0;break e}V=(V=oe(k,ye,0,K,j,j,null))&&!J.h;break e}return V?(P!=null?P[0]=ye:(e(ye==null),e(E)),k.$=0,E||Se(ae)):Se(ae),V}function pe(f,v){var E=f.c*f.i,k=E+v+16*v;return e(f.c<=v),f.V=A(k),f.V==null?(f.Ta=null,f.Ua=0,f.a=1,0):(f.Ta=f.V,f.Ua=f.Ba+E+v,1)}function X(f,v){var E=f.C,k=v-E,P=f.V,V=f.Ba+f.c*E;for(e(v<=f.l.o);0<k;){var K=16<k?16:k,j=f.l.ma,J=f.l.width,ae=J*K,ye=j.ca,Te=j.tb+J*E,Ne=f.Ta,be=f.Ua;H(f,K,P,V),J4(Ne,be,ye,Te,ae),ee(j,E,E+K,ye,Te,J),k-=K,P+=K*f.c,E+=K}e(E==v),f.C=f.Ma=v}function we(){this.ub=this.yd=this.td=this.Rb=0}function Le(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ke(){this.Fb=this.Bb=this.Cb=0,this.Zb=A(4),this.Lb=A(4)}function ze(){this.Yb=function(){var f=[];return function v(E,k,P){for(var V=P[k],K=0;K<V&&(E.push(P.length>k+1?[]:0),!(P.length<k+1));K++)v(E[K],k+1,P)}(f,0,[3,11]),f}()}function qe(){this.jb=A(3),this.Wc=s([4,8],ze),this.Xc=s([4,17],ze)}function ut(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new A(4),this.od=new A(4)}function zt(){this.ld=this.La=this.dd=this.tc=0}function Ct(){this.Na=this.la=0}function Er(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function sa(){this.ad=A(384),this.Za=0,this.Ob=A(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function IA(){this.uc=this.M=this.Nb=0,this.wa=Array(new zt),this.Y=0,this.ya=Array(new sa),this.aa=0,this.l=new QA}function DA(){this.y=A(16),this.f=A(8),this.ea=A(8)}function lA(){this.cb=this.a=0,this.sc="",this.m=new Ue,this.Od=new we,this.Kc=new Le,this.ed=new ut,this.Qa=new Ke,this.Ic=this.$c=this.Aa=0,this.D=new IA,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,Ue),this.ia=0,this.pb=o(4,Er),this.Pa=new qe,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new DA),this.Hd=0,this.rb=Array(new Ct),this.sb=0,this.wa=Array(new zt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new sa),this.L=this.aa=0,this.gd=s([4,2],zt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function QA(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function ba(){var f=new lA;return f!=null&&(f.a=0,f.sc="OK",f.cb=0,f.Xb=0,nu||(nu=e0)),f}function zr(f,v,E){return f.a==0&&(f.a=v,f.sc=E,f.cb=0),0}function Jf(f,v,E){return 3<=E&&f[v+0]==157&&f[v+1]==1&&f[v+2]==42}function Zf(f,v){if(f==null)return 0;if(f.a=0,f.sc="OK",v==null)return zr(f,2,"null VP8Io passed to VP8GetHeaders()");var E=v.data,k=v.w,P=v.ha;if(4>P)return zr(f,7,"Truncated header.");var V=E[k+0]|E[k+1]<<8|E[k+2]<<16,K=f.Od;if(K.Rb=!(1&V),K.td=V>>1&7,K.yd=V>>4&1,K.ub=V>>5,3<K.td)return zr(f,3,"Incorrect keyframe parameters.");if(!K.yd)return zr(f,4,"Frame not displayable.");k+=3,P-=3;var j=f.Kc;if(K.Rb){if(7>P)return zr(f,7,"cannot parse picture header");if(!Jf(E,k,P))return zr(f,3,"Bad code word");j.c=16383&(E[k+4]<<8|E[k+3]),j.Td=E[k+4]>>6,j.i=16383&(E[k+6]<<8|E[k+5]),j.Ud=E[k+6]>>6,k+=7,P-=7,f.za=j.c+15>>4,f.Ub=j.i+15>>4,v.width=j.c,v.height=j.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,a((V=f.Pa).jb,0,255,V.jb.length),e((V=f.Qa)!=null),V.Cb=0,V.Bb=0,V.Fb=1,a(V.Zb,0,0,V.Zb.length),a(V.Lb,0,0,V.Lb)}if(K.ub>P)return zr(f,7,"bad partition length");se(V=f.m,E,k,K.ub),k+=K.ub,P-=K.ub,K.Rb&&(j.Ld=W(V),j.Kd=W(V)),j=f.Qa;var J,ae=f.Pa;if(e(V!=null),e(j!=null),j.Cb=W(V),j.Cb){if(j.Bb=W(V),W(V)){for(j.Fb=W(V),J=0;4>J;++J)j.Zb[J]=W(V)?ge(V,7):0;for(J=0;4>J;++J)j.Lb[J]=W(V)?ge(V,6):0}if(j.Bb)for(J=0;3>J;++J)ae.jb[J]=W(V)?he(V,8):255}else j.Bb=0;if(V.Ka)return zr(f,3,"cannot parse segment header");if((j=f.ed).zd=W(V),j.Tb=he(V,6),j.wb=he(V,3),j.Pc=W(V),j.Pc&&W(V)){for(ae=0;4>ae;++ae)W(V)&&(j.vd[ae]=ge(V,6));for(ae=0;4>ae;++ae)W(V)&&(j.od[ae]=ge(V,6))}if(f.L=j.Tb==0?0:j.zd?1:2,V.Ka)return zr(f,3,"cannot parse filter header");var ye=P;if(P=J=k,k=J+ye,j=ye,f.Xb=(1<<he(f.m,2))-1,ye<3*(ae=f.Xb))E=7;else{for(J+=3*ae,j-=3*ae,ye=0;ye<ae;++ye){var Te=E[P+0]|E[P+1]<<8|E[P+2]<<16;Te>j&&(Te=j),se(f.Jc[+ye],E,J,Te),J+=Te,j-=Te,P+=3}se(f.Jc[+ae],E,J,j),E=J<k?0:5}if(E!=0)return zr(f,E,"cannot parse partitions");for(E=he(J=f.m,7),P=W(J)?ge(J,4):0,k=W(J)?ge(J,4):0,j=W(J)?ge(J,4):0,ae=W(J)?ge(J,4):0,J=W(J)?ge(J,4):0,ye=f.Qa,Te=0;4>Te;++Te){if(ye.Cb){var Ne=ye.Zb[Te];ye.Fb||(Ne+=E)}else{if(0<Te){f.pb[Te]=f.pb[0];continue}Ne=E}var be=f.pb[Te];be.Sc[0]=Hm[Ca(Ne+P,127)],be.Sc[1]=Vm[Ca(Ne+0,127)],be.Eb[0]=2*Hm[Ca(Ne+k,127)],be.Eb[1]=101581*Vm[Ca(Ne+j,127)]>>16,8>be.Eb[1]&&(be.Eb[1]=8),be.Qc[0]=Hm[Ca(Ne+ae,117)],be.Qc[1]=Vm[Ca(Ne+J,127)],be.lc=Ne+J}if(!K.Rb)return zr(f,4,"Not a key frame.");for(W(V),K=f.Pa,E=0;4>E;++E){for(P=0;8>P;++P)for(k=0;3>k;++k)for(j=0;11>j;++j)ae=ue(V,pie[E][P][k][j])?he(V,8):die[E][P][k][j],K.Wc[E][P].Yb[k][j]=ae;for(P=0;17>P;++P)K.Xc[E][P]=K.Wc[E][mie[P]]}return f.kc=W(V),f.kc&&(f.Bd=he(V,8)),f.cb=1}function e0(f,v,E,k,P,V,K){var j=v[P].Yb[E];for(E=0;16>P;++P){if(!ue(f,j[E+0]))return P;for(;!ue(f,j[E+1]);)if(j=v[++P].Yb[0],E=0,P==16)return 16;var J=v[P+1].Yb;if(ue(f,j[E+2])){var ae=f,ye=0;if(ue(ae,(Ne=j)[(Te=E)+3]))if(ue(ae,Ne[Te+6])){for(j=0,Te=2*(ye=ue(ae,Ne[Te+8]))+(Ne=ue(ae,Ne[Te+9+ye])),ye=0,Ne=hie[Te];Ne[j];++j)ye+=ye+ue(ae,Ne[j]);ye+=3+(8<<Te)}else ue(ae,Ne[Te+7])?(ye=7+2*ue(ae,165),ye+=ue(ae,145)):ye=5+ue(ae,159);else ye=ue(ae,Ne[Te+4])?3+ue(ae,Ne[Te+5]):2;j=J[2]}else ye=1,j=J[1];J=K+fie[P],0>(ae=f).b&&D(ae);var Te,Ne=ae.b,be=(Te=ae.Ca>>1)-(ae.I>>Ne)>>31;--ae.b,ae.Ca+=be,ae.Ca|=1,ae.I-=(Te+1&be)<<Ne,V[J]=((ye^be)-be)*k[(0<P)+0]}return 16}function Dc(f){var v=f.rb[f.sb-1];v.la=0,v.Na=0,a(f.zc,0,0,f.zc.length),f.ja=0}function gm(f,v){if(f==null)return 0;if(v==null)return zr(f,2,"NULL VP8Io parameter in VP8Decode().");if(!f.cb&&!Zf(f,v))return 0;if(e(f.cb),v.ac==null||v.ac(v)){v.ob&&(f.L=0);var E=E0[f.L];if(f.L==2?(f.yb=0,f.zb=0):(f.yb=v.v-E>>4,f.zb=v.j-E>>4,0>f.yb&&(f.yb=0),0>f.zb&&(f.zb=0)),f.Va=v.o+15+E>>4,f.Hb=v.va+15+E>>4,f.Hb>f.za&&(f.Hb=f.za),f.Va>f.Ub&&(f.Va=f.Ub),0<f.L){var k=f.ed;for(E=0;4>E;++E){var P;if(f.Qa.Cb){var V=f.Qa.Lb[E];f.Qa.Fb||(V+=k.Tb)}else V=k.Tb;for(P=0;1>=P;++P){var K=f.gd[E][P],j=V;if(k.Pc&&(j+=k.vd[0],P&&(j+=k.od[0])),0<(j=0>j?0:63<j?63:j)){var J=j;0<k.wb&&(J=4<k.wb?J>>2:J>>1)>9-k.wb&&(J=9-k.wb),1>J&&(J=1),K.dd=J,K.tc=2*j+J,K.ld=40<=j?2:15<=j?1:0}else K.tc=0;K.La=P}}}E=0}else zr(f,6,"Frame setup failed"),E=f.a;if(E=E==0){if(E){f.$c=0,0<f.Aa||(f.Ic=Tie);e:{E=f.Ic,k=4*(J=f.za);var ae=32*J,ye=J+1,Te=0<f.L?J*(0<f.Aa?2:1):0,Ne=(f.Aa==2?2:1)*J;if((K=k+832+(P=3*(16*E+E0[f.L])/2*ae)+(V=f.Fa!=null&&0<f.Fa.length?f.Kc.c*f.Kc.i:0))!=K)E=0;else{if(K>f.Vb){if(f.Vb=0,f.Ec=A(K),f.Fc=0,f.Ec==null){E=zr(f,1,"no memory during frame initialization.");break e}f.Vb=K}K=f.Ec,j=f.Fc,f.Ac=K,f.Bc=j,j+=k,f.Gd=o(ae,DA),f.Hd=0,f.rb=o(ye+1,Ct),f.sb=1,f.wa=Te?o(Te,zt):null,f.Y=0,f.D.Nb=0,f.D.wa=f.wa,f.D.Y=f.Y,0<f.Aa&&(f.D.Y+=J),e(!0),f.oc=K,f.pc=j,j+=832,f.ya=o(Ne,sa),f.aa=0,f.D.ya=f.ya,f.D.aa=f.aa,f.Aa==2&&(f.D.aa+=J),f.R=16*J,f.B=8*J,J=(ae=E0[f.L])*f.R,ae=ae/2*f.B,f.sa=K,f.ta=j+J,f.qa=f.sa,f.ra=f.ta+16*E*f.R+ae,f.Ha=f.qa,f.Ia=f.ra+8*E*f.B+ae,f.$c=0,j+=P,f.mb=V?K:null,f.nb=V?j:null,e(j+V<=f.Fc+f.Vb),Dc(f),a(f.Ac,f.Bc,0,k),E=1}}if(E){if(v.ka=0,v.y=f.sa,v.O=f.ta,v.f=f.qa,v.N=f.ra,v.ea=f.Ha,v.Vd=f.Ia,v.fa=f.R,v.Rc=f.B,v.F=null,v.J=0,!nE){for(E=-255;255>=E;++E)Z4[255+E]=0>E?-E:E;for(E=-1020;1020>=E;++E)eE[1020+E]=-128>E?-128:127<E?127:E;for(E=-112;112>=E;++E)tE[112+E]=-16>E?-16:15<E?15:E;for(E=-255;510>=E;++E)rE[255+E]=0>E?0:255<E?255:E;nE=1}gA=ym,cl=pm,Yi=r0,pA=mm,fi=n0,tu=t0,jo=Hc,ul=Ko,Wo=Nm,Ji=Vc,ru=Tm,Ma=tl,di=$c,yr=h0,vr=u0,Kr=ci,sn=Gi,gi=km,mA[0]=OA,mA[1]=vm,mA[2]=bm,mA[3]=Cm,mA[4]=i0,mA[5]=Zs,mA[6]=o0,mA[7]=Pc,mA[8]=_m,mA[9]=Em,eo[0]=a0,eo[1]=Bm,eo[2]=li,eo[3]=Ys,eo[4]=Rn,eo[5]=xm,eo[6]=A0,pi[0]=Ki,pi[1]=wm,pi[2]=Fm,pi[3]=Mc,pi[4]=zo,pi[5]=Sm,pi[6]=Rc,E=1}else E=0}E&&(E=function(be,He){for(be.M=0;be.M<be.Va;++be.M){var De,ve=be.Jc[be.M&be.Xb],Be=be.m,Me=be;for(De=0;De<Me.za;++De){var Ge=Be,Re=Me,lt=Re.Ac,nt=Re.Bc+4*De,vt=Re.zc,At=Re.ya[Re.aa+De];if(Re.Qa.Bb?At.$b=ue(Ge,Re.Pa.jb[0])?2+ue(Ge,Re.Pa.jb[2]):ue(Ge,Re.Pa.jb[1]):At.$b=0,Re.kc&&(At.Ad=ue(Ge,Re.Bd)),At.Za=!ue(Ge,145)+0,At.Za){var Zt=At.Ob,or=0;for(Re=0;4>Re;++Re){var Wt,Vt=vt[0+Re];for(Wt=0;4>Wt;++Wt){Vt=gie[lt[nt+Wt]][Vt];for(var dr=oE[ue(Ge,Vt[0])];0<dr;)dr=oE[2*dr+ue(Ge,Vt[dr])];Vt=-dr,lt[nt+Wt]=Vt}n(Zt,or,lt,nt,4),or+=4,vt[0+Re]=Vt}}else Vt=ue(Ge,156)?ue(Ge,128)?1:3:ue(Ge,163)?2:0,At.Ob[0]=Vt,a(lt,nt,Vt,4),a(vt,0,Vt,4);At.Dd=ue(Ge,142)?ue(Ge,114)?ue(Ge,183)?1:3:2:0}if(Me.m.Ka)return zr(be,7,"Premature end-of-partition0 encountered.");for(;be.ja<be.za;++be.ja){if(Me=ve,Ge=(Be=be).rb[Be.sb-1],lt=Be.rb[Be.sb+Be.ja],De=Be.ya[Be.aa+Be.ja],nt=Be.kc?De.Ad:0)Ge.la=lt.la=0,De.Za||(Ge.Na=lt.Na=0),De.Hc=0,De.Gc=0,De.ia=0;else{var ur,Dt;if(Ge=lt,lt=Me,nt=Be.Pa.Xc,vt=Be.ya[Be.aa+Be.ja],At=Be.pb[vt.$b],Re=vt.ad,Zt=0,or=Be.rb[Be.sb-1],Vt=Wt=0,a(Re,Zt,0,384),vt.Za)var en=0,ha=nt[3];else{dr=A(16);var tn=Ge.Na+or.Na;if(tn=nu(lt,nt[1],tn,At.Eb,0,dr,0),Ge.Na=or.Na=(0<tn)+0,1<tn)gA(dr,0,Re,Zt);else{var fa=dr[0]+3>>3;for(dr=0;256>dr;dr+=16)Re[Zt+dr]=fa}en=1,ha=nt[0]}var sr=15&Ge.la,_a=15&or.la;for(dr=0;4>dr;++dr){var Fa=1&_a;for(fa=Dt=0;4>fa;++fa)sr=sr>>1|(Fa=(tn=nu(lt,ha,tn=Fa+(1&sr),At.Sc,en,Re,Zt))>en)<<7,Dt=Dt<<2|(3<tn?3:1<tn?2:Re[Zt+0]!=0),Zt+=16;sr>>=4,_a=_a>>1|Fa<<7,Wt=(Wt<<8|Dt)>>>0}for(ha=sr,en=_a>>4,ur=0;4>ur;ur+=2){for(Dt=0,sr=Ge.la>>4+ur,_a=or.la>>4+ur,dr=0;2>dr;++dr){for(Fa=1&_a,fa=0;2>fa;++fa)tn=Fa+(1&sr),sr=sr>>1|(Fa=0<(tn=nu(lt,nt[2],tn,At.Qc,0,Re,Zt)))<<3,Dt=Dt<<2|(3<tn?3:1<tn?2:Re[Zt+0]!=0),Zt+=16;sr>>=2,_a=_a>>1|Fa<<5}Vt|=Dt<<4*ur,ha|=sr<<4<<ur,en|=(240&_a)<<ur}Ge.la=ha,or.la=en,vt.Hc=Wt,vt.Gc=Vt,vt.ia=43690&Vt?0:At.ia,nt=!(Wt|Vt)}if(0<Be.L&&(Be.wa[Be.Y+Be.ja]=Be.gd[De.$b][De.Za],Be.wa[Be.Y+Be.ja].La|=!nt),Me.Ka)return zr(be,7,"Premature end-of-file encountered.")}if(Dc(be),Be=He,Me=1,De=(ve=be).D,Ge=0<ve.L&&ve.M>=ve.zb&&ve.M<=ve.Va,ve.Aa==0)e:{if(De.M=ve.M,De.uc=Ge,Xc(ve,De),Me=1,De=(Dt=ve.D).Nb,Ge=(Vt=E0[ve.L])*ve.R,lt=Vt/2*ve.B,dr=16*De*ve.R,fa=8*De*ve.B,nt=ve.sa,vt=ve.ta-Ge+dr,At=ve.qa,Re=ve.ra-lt+fa,Zt=ve.Ha,or=ve.Ia-lt+fa,_a=(sr=Dt.M)==0,Wt=sr>=ve.Va-1,ve.Aa==2&&Xc(ve,Dt),Dt.uc)for(Fa=(tn=ve).D.M,e(tn.D.uc),Dt=tn.yb;Dt<tn.Hb;++Dt){en=Dt,ha=Fa;var pn=(Sn=(Qr=tn).D).Nb;ur=Qr.R;var Sn=Sn.wa[Sn.Y+en],Jn=Qr.sa,Va=Qr.ta+16*pn*ur+16*en,MA=Sn.dd,mn=Sn.tc;if(mn!=0)if(e(3<=mn),Qr.L==1)0<en&&Kr(Jn,Va,ur,mn+4),Sn.La&&gi(Jn,Va,ur,mn),0<ha&&vr(Jn,Va,ur,mn+4),Sn.La&&sn(Jn,Va,ur,mn);else{var mi=Qr.B,Xo=Qr.qa,fl=Qr.ra+8*pn*mi+8*en,ro=Qr.Ha,Qr=Qr.Ia+8*pn*mi+8*en;pn=Sn.ld,0<en&&(ul(Jn,Va,ur,mn+4,MA,pn),Ji(Xo,fl,ro,Qr,mi,mn+4,MA,pn)),Sn.La&&(Ma(Jn,Va,ur,mn,MA,pn),yr(Xo,fl,ro,Qr,mi,mn,MA,pn)),0<ha&&(jo(Jn,Va,ur,mn+4,MA,pn),Wo(Xo,fl,ro,Qr,mi,mn+4,MA,pn)),Sn.La&&(ru(Jn,Va,ur,mn,MA,pn),di(Xo,fl,ro,Qr,mi,mn,MA,pn))}}if(ve.ia&&alert("todo:DitherRow"),Be.put!=null){if(Dt=16*sr,sr=16*(sr+1),_a?(Be.y=ve.sa,Be.O=ve.ta+dr,Be.f=ve.qa,Be.N=ve.ra+fa,Be.ea=ve.Ha,Be.W=ve.Ia+fa):(Dt-=Vt,Be.y=nt,Be.O=vt,Be.f=At,Be.N=Re,Be.ea=Zt,Be.W=or),Wt||(sr-=Vt),sr>Be.o&&(sr=Be.o),Be.F=null,Be.J=null,ve.Fa!=null&&0<ve.Fa.length&&Dt<sr&&(Be.J=jc(ve,Be,Dt,sr-Dt),Be.F=ve.mb,Be.F==null&&Be.F.length==0)){Me=zr(ve,3,"Could not decode alpha data.");break e}Dt<Be.j&&(Vt=Be.j-Dt,Dt=Be.j,e(!(1&Vt)),Be.O+=ve.R*Vt,Be.N+=ve.B*(Vt>>1),Be.W+=ve.B*(Vt>>1),Be.F!=null&&(Be.J+=Be.width*Vt)),Dt<sr&&(Be.O+=Be.v,Be.N+=Be.v>>1,Be.W+=Be.v>>1,Be.F!=null&&(Be.J+=Be.v),Be.ka=Dt-Be.j,Be.U=Be.va-Be.v,Be.T=sr-Dt,Me=Be.put(Be))}De+1!=ve.Ic||Wt||(n(ve.sa,ve.ta-Ge,nt,vt+16*ve.R,Ge),n(ve.qa,ve.ra-lt,At,Re+8*ve.B,lt),n(ve.Ha,ve.Ia-lt,Zt,or+8*ve.B,lt))}if(!Me)return zr(be,6,"Output aborted.")}return 1}(f,v)),v.bc!=null&&v.bc(v),E&=1}return E?(f.cb=0,E):0}function cA(f,v,E,k,P){P=f[v+E+32*k]+(P>>3),f[v+E+32*k]=-256&P?0>P?0:255:P}function qs(f,v,E,k,P,V){cA(f,v,0,E,k+P),cA(f,v,1,E,k+V),cA(f,v,2,E,k-V),cA(f,v,3,E,k-P)}function la(f){return(20091*f>>16)+f}function Qc(f,v,E,k){var P,V=0,K=A(16);for(P=0;4>P;++P){var j=f[v+0]+f[v+8],J=f[v+0]-f[v+8],ae=(35468*f[v+4]>>16)-la(f[v+12]),ye=la(f[v+4])+(35468*f[v+12]>>16);K[V+0]=j+ye,K[V+1]=J+ae,K[V+2]=J-ae,K[V+3]=j-ye,V+=4,v++}for(P=V=0;4>P;++P)j=(f=K[V+0]+4)+K[V+8],J=f-K[V+8],ae=(35468*K[V+4]>>16)-la(K[V+12]),cA(E,k,0,0,j+(ye=la(K[V+4])+(35468*K[V+12]>>16))),cA(E,k,1,0,J+ae),cA(E,k,2,0,J-ae),cA(E,k,3,0,j-ye),V++,k+=32}function t0(f,v,E,k){var P=f[v+0]+4,V=35468*f[v+4]>>16,K=la(f[v+4]),j=35468*f[v+1]>>16;qs(E,k,0,P+K,f=la(f[v+1]),j),qs(E,k,1,P+V,f,j),qs(E,k,2,P-V,f,j),qs(E,k,3,P-K,f,j)}function pm(f,v,E,k,P){Qc(f,v,E,k),P&&Qc(f,v+16,E,k+4)}function r0(f,v,E,k){cl(f,v+0,E,k,1),cl(f,v+32,E,k+128,1)}function mm(f,v,E,k){var P;for(f=f[v+0]+4,P=0;4>P;++P)for(v=0;4>v;++v)cA(E,k,v,P,f)}function n0(f,v,E,k){f[v+0]&&pA(f,v+0,E,k),f[v+16]&&pA(f,v+16,E,k+4),f[v+32]&&pA(f,v+32,E,k+128),f[v+48]&&pA(f,v+48,E,k+128+4)}function ym(f,v,E,k){var P,V=A(16);for(P=0;4>P;++P){var K=f[v+0+P]+f[v+12+P],j=f[v+4+P]+f[v+8+P],J=f[v+4+P]-f[v+8+P],ae=f[v+0+P]-f[v+12+P];V[0+P]=K+j,V[8+P]=K-j,V[4+P]=ae+J,V[12+P]=ae-J}for(P=0;4>P;++P)K=(f=V[0+4*P]+3)+V[3+4*P],j=V[1+4*P]+V[2+4*P],J=V[1+4*P]-V[2+4*P],ae=f-V[3+4*P],E[k+0]=K+j>>3,E[k+16]=ae+J>>3,E[k+32]=K-j>>3,E[k+48]=ae-J>>3,k+=64}function Oc(f,v,E){var k,P=v-32,V=Ea,K=255-f[P-1];for(k=0;k<E;++k){var j,J=V,ae=K+f[v-1];for(j=0;j<E;++j)f[v+j]=J[ae+f[P+j]];v+=32}}function vm(f,v){Oc(f,v,4)}function wm(f,v){Oc(f,v,8)}function Bm(f,v){Oc(f,v,16)}function li(f,v){var E;for(E=0;16>E;++E)n(f,v+32*E,f,v-32,16)}function Ys(f,v){var E;for(E=16;0<E;--E)a(f,v,f[v-1],16),v+=32}function Js(f,v,E){var k;for(k=0;16>k;++k)a(v,E+32*k,f,16)}function a0(f,v){var E,k=16;for(E=0;16>E;++E)k+=f[v-1+32*E]+f[v+E-32];Js(k>>5,f,v)}function Rn(f,v){var E,k=8;for(E=0;16>E;++E)k+=f[v-1+32*E];Js(k>>4,f,v)}function xm(f,v){var E,k=8;for(E=0;16>E;++E)k+=f[v+E-32];Js(k>>4,f,v)}function A0(f,v){Js(128,f,v)}function _t(f,v,E){return f+2*v+E+2>>2}function bm(f,v){var E,k=v-32;for(k=new Uint8Array([_t(f[k-1],f[k+0],f[k+1]),_t(f[k+0],f[k+1],f[k+2]),_t(f[k+1],f[k+2],f[k+3]),_t(f[k+2],f[k+3],f[k+4])]),E=0;4>E;++E)n(f,v+32*E,k,0,k.length)}function Cm(f,v){var E=f[v-1],k=f[v-1+32],P=f[v-1+64],V=f[v-1+96];Ce(f,v+0,16843009*_t(f[v-1-32],E,k)),Ce(f,v+32,16843009*_t(E,k,P)),Ce(f,v+64,16843009*_t(k,P,V)),Ce(f,v+96,16843009*_t(P,V,V))}function OA(f,v){var E,k=4;for(E=0;4>E;++E)k+=f[v+E-32]+f[v-1+32*E];for(k>>=3,E=0;4>E;++E)a(f,v+32*E,k,4)}function i0(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1-32],K=f[v+0-32],j=f[v+1-32],J=f[v+2-32],ae=f[v+3-32];f[v+0+96]=_t(k,P,f[v-1+96]),f[v+1+96]=f[v+0+64]=_t(E,k,P),f[v+2+96]=f[v+1+64]=f[v+0+32]=_t(V,E,k),f[v+3+96]=f[v+2+64]=f[v+1+32]=f[v+0+0]=_t(K,V,E),f[v+3+64]=f[v+2+32]=f[v+1+0]=_t(j,K,V),f[v+3+32]=f[v+2+0]=_t(J,j,K),f[v+3+0]=_t(ae,J,j)}function o0(f,v){var E=f[v+1-32],k=f[v+2-32],P=f[v+3-32],V=f[v+4-32],K=f[v+5-32],j=f[v+6-32],J=f[v+7-32];f[v+0+0]=_t(f[v+0-32],E,k),f[v+1+0]=f[v+0+32]=_t(E,k,P),f[v+2+0]=f[v+1+32]=f[v+0+64]=_t(k,P,V),f[v+3+0]=f[v+2+32]=f[v+1+64]=f[v+0+96]=_t(P,V,K),f[v+3+32]=f[v+2+64]=f[v+1+96]=_t(V,K,j),f[v+3+64]=f[v+2+96]=_t(K,j,J),f[v+3+96]=_t(j,J,J)}function Zs(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1-32],K=f[v+0-32],j=f[v+1-32],J=f[v+2-32],ae=f[v+3-32];f[v+0+0]=f[v+1+64]=V+K+1>>1,f[v+1+0]=f[v+2+64]=K+j+1>>1,f[v+2+0]=f[v+3+64]=j+J+1>>1,f[v+3+0]=J+ae+1>>1,f[v+0+96]=_t(P,k,E),f[v+0+64]=_t(k,E,V),f[v+0+32]=f[v+1+96]=_t(E,V,K),f[v+1+32]=f[v+2+96]=_t(V,K,j),f[v+2+32]=f[v+3+96]=_t(K,j,J),f[v+3+32]=_t(j,J,ae)}function Pc(f,v){var E=f[v+0-32],k=f[v+1-32],P=f[v+2-32],V=f[v+3-32],K=f[v+4-32],j=f[v+5-32],J=f[v+6-32],ae=f[v+7-32];f[v+0+0]=E+k+1>>1,f[v+1+0]=f[v+0+64]=k+P+1>>1,f[v+2+0]=f[v+1+64]=P+V+1>>1,f[v+3+0]=f[v+2+64]=V+K+1>>1,f[v+0+32]=_t(E,k,P),f[v+1+32]=f[v+0+96]=_t(k,P,V),f[v+2+32]=f[v+1+96]=_t(P,V,K),f[v+3+32]=f[v+2+96]=_t(V,K,j),f[v+3+64]=_t(K,j,J),f[v+3+96]=_t(j,J,ae)}function Em(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1+96];f[v+0+0]=E+k+1>>1,f[v+2+0]=f[v+0+32]=k+P+1>>1,f[v+2+32]=f[v+0+64]=P+V+1>>1,f[v+1+0]=_t(E,k,P),f[v+3+0]=f[v+1+32]=_t(k,P,V),f[v+3+32]=f[v+1+64]=_t(P,V,V),f[v+3+64]=f[v+2+64]=f[v+0+96]=f[v+1+96]=f[v+2+96]=f[v+3+96]=V}function _m(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1+96],K=f[v-1-32],j=f[v+0-32],J=f[v+1-32],ae=f[v+2-32];f[v+0+0]=f[v+2+32]=E+K+1>>1,f[v+0+32]=f[v+2+64]=k+E+1>>1,f[v+0+64]=f[v+2+96]=P+k+1>>1,f[v+0+96]=V+P+1>>1,f[v+3+0]=_t(j,J,ae),f[v+2+0]=_t(K,j,J),f[v+1+0]=f[v+3+32]=_t(E,K,j),f[v+1+32]=f[v+3+64]=_t(k,E,K),f[v+1+64]=f[v+3+96]=_t(P,k,E),f[v+1+96]=_t(V,P,k)}function Fm(f,v){var E;for(E=0;8>E;++E)n(f,v+32*E,f,v-32,8)}function Mc(f,v){var E;for(E=0;8>E;++E)a(f,v,f[v-1],8),v+=32}function $o(f,v,E){var k;for(k=0;8>k;++k)a(v,E+32*k,f,8)}function Ki(f,v){var E,k=8;for(E=0;8>E;++E)k+=f[v+E-32]+f[v-1+32*E];$o(k>>4,f,v)}function Sm(f,v){var E,k=4;for(E=0;8>E;++E)k+=f[v+E-32];$o(k>>3,f,v)}function zo(f,v){var E,k=4;for(E=0;8>E;++E)k+=f[v-1+32*E];$o(k>>3,f,v)}function Rc(f,v){$o(128,f,v)}function el(f,v,E){var k=f[v-E],P=f[v+0],V=3*(P-k)+Qm[1020+f[v-2*E]-f[v+E]],K=m0[112+(V+4>>3)];f[v-E]=Ea[255+k+m0[112+(V+3>>3)]],f[v+0]=Ea[255+P-K]}function s0(f,v,E,k){var P=f[v+0],V=f[v+E];return Ra[255+f[v-2*E]-f[v-E]]>k||Ra[255+V-P]>k}function l0(f,v,E,k){return 4*Ra[255+f[v-E]-f[v+0]]+Ra[255+f[v-2*E]-f[v+E]]<=k}function c0(f,v,E,k,P){var V=f[v-3*E],K=f[v-2*E],j=f[v-E],J=f[v+0],ae=f[v+E],ye=f[v+2*E],Te=f[v+3*E];return 4*Ra[255+j-J]+Ra[255+K-ae]>k?0:Ra[255+f[v-4*E]-V]<=P&&Ra[255+V-K]<=P&&Ra[255+K-j]<=P&&Ra[255+Te-ye]<=P&&Ra[255+ye-ae]<=P&&Ra[255+ae-J]<=P}function u0(f,v,E,k){var P=2*k+1;for(k=0;16>k;++k)l0(f,v+k,E,P)&&el(f,v+k,E)}function ci(f,v,E,k){var P=2*k+1;for(k=0;16>k;++k)l0(f,v+k*E,1,P)&&el(f,v+k*E,1)}function Gi(f,v,E,k){var P;for(P=3;0<P;--P)u0(f,v+=4*E,E,k)}function km(f,v,E,k){var P;for(P=3;0<P;--P)ci(f,v+=4,E,k)}function ji(f,v,E,k,P,V,K,j){for(V=2*V+1;0<P--;){if(c0(f,v,E,V,K))if(s0(f,v,E,j))el(f,v,E);else{var J=f,ae=v,ye=E,Te=J[ae-2*ye],Ne=J[ae-ye],be=J[ae+0],He=J[ae+ye],De=J[ae+2*ye],ve=27*(Me=Qm[1020+3*(be-Ne)+Qm[1020+Te-He]])+63>>7,Be=18*Me+63>>7,Me=9*Me+63>>7;J[ae-3*ye]=Ea[255+J[ae-3*ye]+Me],J[ae-2*ye]=Ea[255+Te+Be],J[ae-ye]=Ea[255+Ne+ve],J[ae+0]=Ea[255+be-ve],J[ae+ye]=Ea[255+He-Be],J[ae+2*ye]=Ea[255+De-Me]}v+=k}}function uA(f,v,E,k,P,V,K,j){for(V=2*V+1;0<P--;){if(c0(f,v,E,V,K))if(s0(f,v,E,j))el(f,v,E);else{var J=f,ae=v,ye=E,Te=J[ae-ye],Ne=J[ae+0],be=J[ae+ye],He=m0[112+((De=3*(Ne-Te))+4>>3)],De=m0[112+(De+3>>3)],ve=He+1>>1;J[ae-2*ye]=Ea[255+J[ae-2*ye]+ve],J[ae-ye]=Ea[255+Te+De],J[ae+0]=Ea[255+Ne-He],J[ae+ye]=Ea[255+be-ve]}v+=k}}function Hc(f,v,E,k,P,V){ji(f,v,E,1,16,k,P,V)}function Ko(f,v,E,k,P,V){ji(f,v,1,E,16,k,P,V)}function Tm(f,v,E,k,P,V){var K;for(K=3;0<K;--K)uA(f,v+=4*E,E,1,16,k,P,V)}function tl(f,v,E,k,P,V){var K;for(K=3;0<K;--K)uA(f,v+=4,1,E,16,k,P,V)}function Nm(f,v,E,k,P,V,K,j){ji(f,v,P,1,8,V,K,j),ji(E,k,P,1,8,V,K,j)}function Vc(f,v,E,k,P,V,K,j){ji(f,v,1,P,8,V,K,j),ji(E,k,1,P,8,V,K,j)}function $c(f,v,E,k,P,V,K,j){uA(f,v+4*P,P,1,8,V,K,j),uA(E,k+4*P,P,1,8,V,K,j)}function h0(f,v,E,k,P,V,K,j){uA(f,v+4,1,P,8,V,K,j),uA(E,k+4,1,P,8,V,K,j)}function rl(){this.ba=new on,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Gt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function zc(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Kc(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function f0(){this.ua=0,this.Wa=new te,this.vb=new te,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Y,this.yc=new L}function Lm(){this.xb=this.a=0,this.l=new QA,this.ca=new on,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new b,this.Pb=0,this.wd=new b,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new f0,this.ab=0,this.gc=o(4,Kc),this.Oc=0}function nl(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new QA,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Go(f,v,E,k,P,V,K){for(f=f==null?0:f[v+0],v=0;v<K;++v)P[V+v]=f+E[k+v]&255,f=P[V+v]}function Gc(f,v,E,k,P,V,K){var j;if(f==null)Go(null,null,E,k,P,V,K);else for(j=0;j<K;++j)P[V+j]=f[v+j]+E[k+j]&255}function Wi(f,v,E,k,P,V,K){if(f==null)Go(null,null,E,k,P,V,K);else{var j,J=f[v+0],ae=J,ye=J;for(j=0;j<K;++j)ae=ye+(J=f[v+j])-ae,ye=E[k+j]+(-256&ae?0>ae?0:255:ae)&255,ae=J,P[V+j]=ye}}function jc(f,v,E,k){var P=v.width,V=v.o;if(e(f!=null&&v!=null),0>E||0>=k||E+k>V)return null;if(!f.Cc){if(f.ga==null){var K;if(f.ga=new nl,(K=f.ga==null)||(K=v.width*v.o,e(f.Gb.length==0),f.Gb=A(K),f.Uc=0,f.Gb==null?K=0:(f.mb=f.Gb,f.nb=f.Uc,f.rc=null,K=1),K=!K),!K){K=f.ga;var j=f.Fa,J=f.P,ae=f.qc,ye=f.mb,Te=f.nb,Ne=J+1,be=ae-1,He=K.l;if(e(j!=null&&ye!=null&&v!=null),to[0]=null,to[1]=Go,to[2]=Gc,to[3]=Wi,K.ca=ye,K.tb=Te,K.c=v.width,K.i=v.height,e(0<K.c&&0<K.i),1>=ae)v=0;else if(K.$a=j[J+0]>>0&3,K.Z=j[J+0]>>2&3,K.Lc=j[J+0]>>4&3,J=j[J+0]>>6&3,0>K.$a||1<K.$a||4<=K.Z||1<K.Lc||J)v=0;else if(He.put=Yn,He.ac=Ir,He.bc=oa,He.ma=K,He.width=v.width,He.height=v.height,He.Da=v.Da,He.v=v.v,He.va=v.va,He.j=v.j,He.o=v.o,K.$a)e:{e(K.$a==1),v=Ie();t:for(;;){if(v==null){v=0;break e}if(e(K!=null),K.mc=v,v.c=K.c,v.i=K.i,v.l=K.l,v.l.ma=K,v.l.width=K.c,v.l.height=K.i,v.a=0,re(v.m,j,Ne,be),!Fe(K.c,K.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&Z(v.s)?(K.ic=1,j=v.c*v.i,v.Ta=null,v.Ua=0,v.V=A(j),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(K.ic=0,v=pe(v,K.c)),!v))break t;v=1;break e}K.mc=null,v=0}else v=be>=K.c*K.i;K=!v}if(K)return null;f.ga.Lc!=1?f.Ga=0:k=V-E}e(f.ga!=null),e(E+k<=V);e:{if(v=(j=f.ga).c,V=j.l.o,j.$a==0){if(Ne=f.rc,be=f.Vc,He=f.Fa,J=f.P+1+E*v,ae=f.mb,ye=f.nb+E*v,e(J<=f.P+f.qc),j.Z!=0)for(e(to[j.Z]!=null),K=0;K<k;++K)to[j.Z](Ne,be,He,J,ae,ye,v),Ne=ae,be=ye,ye+=v,J+=v;else for(K=0;K<k;++K)n(ae,ye,He,J,v),Ne=ae,be=ye,ye+=v,J+=v;f.rc=Ne,f.Vc=be}else{if(e(j.mc!=null),v=E+k,e((K=j.mc)!=null),e(v<=K.i),K.C>=v)v=1;else if(j.ic||_e(),j.ic){j=K.V,Ne=K.Ba,be=K.c;var De=K.i,ve=(He=1,J=K.$/be,ae=K.$%be,ye=K.m,Te=K.s,K.$),Be=be*De,Me=be*v,Ge=Te.wc,Re=ve<Me?br(Te,ae,J):null;e(ve<=Be),e(v<=De),e(Z(Te));t:for(;;){for(;!ye.h&&ve<Me;){if(ae&Ge||(Re=br(Te,ae,J)),e(Re!=null),S(ye),256>(De=mr(Re.G[0],Re.H[0],ye)))j[Ne+ve]=De,++ve,++ae>=be&&(ae=0,++J<=v&&!(J%16)&&Ae(K,J));else{if(!(280>De)){He=0;break t}De=Fn(De-256,ye);var lt,nt=mr(Re.G[4],Re.H[4],ye);if(S(ye),!(ve>=(nt=Mn(be,nt=Fn(nt,ye)))&&Be-ve>=De)){He=0;break t}for(lt=0;lt<De;++lt)j[Ne+ve+lt]=j[Ne+ve+lt-nt];for(ve+=De,ae+=De;ae>=be;)ae-=be,++J<=v&&!(J%16)&&Ae(K,J);ve<Me&&ae&Ge&&(Re=br(Te,ae,J))}e(ye.h==B(ye))}Ae(K,J>v?v:J);break t}!He||ye.h&&ve<Be?(He=0,K.a=ye.h?5:3):K.$=ve,v=He}else v=oe(K,K.V,K.Ba,K.c,K.i,v,X);if(!v){k=0;break e}}E+k>=V&&(f.Cc=1),k=1}if(!k)return null;if(f.Cc&&((k=f.ga)!=null&&(k.mc=null),f.ga=null,0<f.Ga))return alert("todo:WebPDequantizeLevels"),null}return f.nb+E*P}function C(f,v,E,k,P,V){for(;0<P--;){var K,j=f,J=v+(E?1:0),ae=f,ye=v+(E?0:3);for(K=0;K<k;++K){var Te=ae[ye+4*K];Te!=255&&(Te*=32897,j[J+4*K+0]=j[J+4*K+0]*Te>>23,j[J+4*K+1]=j[J+4*K+1]*Te>>23,j[J+4*K+2]=j[J+4*K+2]*Te>>23)}v+=V}}function M(f,v,E,k,P){for(;0<k--;){var V;for(V=0;V<E;++V){var K=f[v+2*V+0],j=15&(ae=f[v+2*V+1]),J=4369*j,ae=(240&ae|ae>>4)*J>>16;f[v+2*V+0]=(240&K|K>>4)*J>>16&240|(15&K|K<<4)*J>>16>>4&15,f[v+2*V+1]=240&ae|j}v+=P}}function ce(f,v,E,k,P,V,K,j){var J,ae,ye=255;for(ae=0;ae<P;++ae){for(J=0;J<k;++J){var Te=f[v+J];V[K+4*J]=Te,ye&=Te}v+=E,K+=j}return ye!=255}function me(f,v,E,k,P){var V;for(V=0;V<P;++V)E[k+V]=f[v+V]>>8}function _e(){Zi=C,hl=M,p0=ce,J4=me}function Qe(f,v,E){U[f]=function(k,P,V,K,j,J,ae,ye,Te,Ne,be,He,De,ve,Be,Me,Ge){var Re,lt=Ge-1>>1,nt=j[J+0]|ae[ye+0]<<16,vt=Te[Ne+0]|be[He+0]<<16;e(k!=null);var At=3*nt+vt+131074>>2;for(v(k[P+0],255&At,At>>16,De,ve),V!=null&&(At=3*vt+nt+131074>>2,v(V[K+0],255&At,At>>16,Be,Me)),Re=1;Re<=lt;++Re){var Zt=j[J+Re]|ae[ye+Re]<<16,or=Te[Ne+Re]|be[He+Re]<<16,Wt=nt+Zt+vt+or+524296,Vt=Wt+2*(Zt+vt)>>3;At=Vt+nt>>1,nt=(Wt=Wt+2*(nt+or)>>3)+Zt>>1,v(k[P+2*Re-1],255&At,At>>16,De,ve+(2*Re-1)*E),v(k[P+2*Re-0],255&nt,nt>>16,De,ve+(2*Re-0)*E),V!=null&&(At=Wt+vt>>1,nt=Vt+or>>1,v(V[K+2*Re-1],255&At,At>>16,Be,Me+(2*Re-1)*E),v(V[K+2*Re+0],255&nt,nt>>16,Be,Me+(2*Re+0)*E)),nt=Zt,vt=or}1&Ge||(At=3*nt+vt+131074>>2,v(k[P+Ge-1],255&At,At>>16,De,ve+(Ge-1)*E),V!=null&&(At=3*vt+nt+131074>>2,v(V[K+Ge-1],255&At,At>>16,Be,Me+(Ge-1)*E)))}}function Xe(){Ha[y0]=vie,Ha[v0]=lE,Ha[aE]=wie,Ha[w0]=cE,Ha[B0]=uE,Ha[Om]=hE,Ha[AE]=Bie,Ha[Pm]=lE,Ha[Mm]=cE,Ha[x0]=uE,Ha[Rm]=hE}function st(f){return f&~xie?0>f?0:255:f>>fE}function mt(f,v){return st((19077*f>>8)+(26149*v>>8)-14234)}function Ut(f,v,E){return st((19077*f>>8)-(6419*v>>8)-(13320*E>>8)+8708)}function Mt(f,v){return st((19077*f>>8)+(33050*v>>8)-17685)}function jt(f,v,E,k,P){k[P+0]=mt(f,E),k[P+1]=Ut(f,v,E),k[P+2]=Mt(f,v)}function Fr(f,v,E,k,P){k[P+0]=Mt(f,v),k[P+1]=Ut(f,v,E),k[P+2]=mt(f,E)}function Dr(f,v,E,k,P){var V=Ut(f,v,E);v=V<<3&224|Mt(f,v)>>3,k[P+0]=248&mt(f,E)|V>>5,k[P+1]=v}function Zr(f,v,E,k,P){var V=240&Mt(f,v)|15;k[P+0]=240&mt(f,E)|Ut(f,v,E)>>4,k[P+1]=V}function Hn(f,v,E,k,P){k[P+0]=255,jt(f,v,E,k,P+1)}function gn(f,v,E,k,P){Fr(f,v,E,k,P),k[P+3]=255}function hA(f,v,E,k,P){jt(f,v,E,k,P),k[P+3]=255}function Ca(f,v){return 0>f?0:f>v?v:f}function ui(f,v,E){U[f]=function(k,P,V,K,j,J,ae,ye,Te){for(var Ne=ye+(-2&Te)*E;ye!=Ne;)v(k[P+0],V[K+0],j[J+0],ae,ye),v(k[P+1],V[K+0],j[J+0],ae,ye+E),P+=2,++K,++J,ye+=2*E;1&Te&&v(k[P+0],V[K+0],j[J+0],ae,ye)}}function d0(f,v,E){return E==0?f==0?v==0?6:5:v==0?4:0:E}function Wc(f,v,E,k,P){switch(f>>>30){case 3:cl(v,E,k,P,0);break;case 2:tu(v,E,k,P);break;case 1:pA(v,E,k,P)}}function Xc(f,v){var E,k,P=v.M,V=v.Nb,K=f.oc,j=f.pc+40,J=f.oc,ae=f.pc+584,ye=f.oc,Te=f.pc+600;for(E=0;16>E;++E)K[j+32*E-1]=129;for(E=0;8>E;++E)J[ae+32*E-1]=129,ye[Te+32*E-1]=129;for(0<P?K[j-1-32]=J[ae-1-32]=ye[Te-1-32]=129:(a(K,j-32-1,127,21),a(J,ae-32-1,127,9),a(ye,Te-32-1,127,9)),k=0;k<f.za;++k){var Ne=v.ya[v.aa+k];if(0<k){for(E=-1;16>E;++E)n(K,j+32*E-4,K,j+32*E+12,4);for(E=-1;8>E;++E)n(J,ae+32*E-4,J,ae+32*E+4,4),n(ye,Te+32*E-4,ye,Te+32*E+4,4)}var be=f.Gd,He=f.Hd+k,De=Ne.ad,ve=Ne.Hc;if(0<P&&(n(K,j-32,be[He].y,0,16),n(J,ae-32,be[He].f,0,8),n(ye,Te-32,be[He].ea,0,8)),Ne.Za){var Be=K,Me=j-32+16;for(0<P&&(k>=f.za-1?a(Be,Me,be[He].y[15],4):n(Be,Me,be[He+1].y,0,4)),E=0;4>E;E++)Be[Me+128+E]=Be[Me+256+E]=Be[Me+384+E]=Be[Me+0+E];for(E=0;16>E;++E,ve<<=2)Be=K,Me=j+gE[E],mA[Ne.Ob[E]](Be,Me),Wc(ve,De,16*+E,Be,Me)}else if(Be=d0(k,P,Ne.Ob[0]),eo[Be](K,j),ve!=0)for(E=0;16>E;++E,ve<<=2)Wc(ve,De,16*+E,K,j+gE[E]);for(E=Ne.Gc,Be=d0(k,P,Ne.Dd),pi[Be](J,ae),pi[Be](ye,Te),ve=De,Be=J,Me=ae,255&(Ne=E>>0)&&(170&Ne?Yi(ve,256,Be,Me):fi(ve,256,Be,Me)),Ne=ye,ve=Te,255&(E>>=8)&&(170&E?Yi(De,320,Ne,ve):fi(De,320,Ne,ve)),P<f.Ub-1&&(n(be[He].y,0,K,j+480,16),n(be[He].f,0,J,ae+224,8),n(be[He].ea,0,ye,Te+224,8)),E=8*V*f.B,be=f.sa,He=f.ta+16*k+16*V*f.R,De=f.qa,Ne=f.ra+8*k+E,ve=f.Ha,Be=f.Ia+8*k+E,E=0;16>E;++E)n(be,He+E*f.R,K,j+32*E,16);for(E=0;8>E;++E)n(De,Ne+E*f.B,J,ae+32*E,8),n(ve,Be+E*f.B,ye,Te+32*E,8)}}function al(f,v,E,k,P,V,K,j,J){var ae=[0],ye=[0],Te=0,Ne=J!=null?J.kd:0,be=J??new zc;if(f==null||12>E)return 7;be.data=f,be.w=v,be.ha=E,v=[v],E=[E],be.gb=[be.gb];e:{var He=v,De=E,ve=be.gb;if(e(f!=null),e(De!=null),e(ve!=null),ve[0]=0,12<=De[0]&&!r(f,He[0],"RIFF")){if(r(f,He[0]+8,"WEBP")){ve=3;break e}var Be=ne(f,He[0]+4);if(12>Be||4294967286<Be){ve=3;break e}if(Ne&&Be>De[0]-8){ve=7;break e}ve[0]=Be,He[0]+=12,De[0]-=12}ve=0}if(ve!=0)return ve;for(Be=0<be.gb[0],E=E[0];;){e:{var Me=f;De=v,ve=E;var Ge=ae,Re=ye,lt=He=[0];if((At=Te=[Te])[0]=0,8>ve[0])ve=7;else{if(!r(Me,De[0],"VP8X")){if(ne(Me,De[0]+4)!=10){ve=3;break e}if(18>ve[0]){ve=7;break e}var nt=ne(Me,De[0]+8),vt=1+ke(Me,De[0]+12);if(2147483648<=vt*(Me=1+ke(Me,De[0]+15))){ve=3;break e}lt!=null&&(lt[0]=nt),Ge!=null&&(Ge[0]=vt),Re!=null&&(Re[0]=Me),De[0]+=18,ve[0]-=18,At[0]=1}ve=0}}if(Te=Te[0],He=He[0],ve!=0)return ve;if(De=!!(2&He),!Be&&Te)return 3;if(V!=null&&(V[0]=!!(16&He)),K!=null&&(K[0]=De),j!=null&&(j[0]=0),K=ae[0],He=ye[0],Te&&De&&J==null){ve=0;break}if(4>E){ve=7;break}if(Be&&Te||!Be&&!Te&&!r(f,v[0],"ALPH")){E=[E],be.na=[be.na],be.P=[be.P],be.Sa=[be.Sa];e:{nt=f,ve=v,Be=E;var At=be.gb;Ge=be.na,Re=be.P,lt=be.Sa,vt=22,e(nt!=null),e(Be!=null),Me=ve[0];var Zt=Be[0];for(e(Ge!=null),e(lt!=null),Ge[0]=null,Re[0]=null,lt[0]=0;;){if(ve[0]=Me,Be[0]=Zt,8>Zt){ve=7;break e}var or=ne(nt,Me+4);if(4294967286<or){ve=3;break e}var Wt=8+or+1&-2;if(vt+=Wt,0<At&&vt>At){ve=3;break e}if(!r(nt,Me,"VP8 ")||!r(nt,Me,"VP8L")){ve=0;break e}if(Zt[0]<Wt){ve=7;break e}r(nt,Me,"ALPH")||(Ge[0]=nt,Re[0]=Me+8,lt[0]=or),Me+=Wt,Zt-=Wt}}if(E=E[0],be.na=be.na[0],be.P=be.P[0],be.Sa=be.Sa[0],ve!=0)break}E=[E],be.Ja=[be.Ja],be.xa=[be.xa];e:if(At=f,ve=v,Be=E,Ge=be.gb[0],Re=be.Ja,lt=be.xa,nt=ve[0],Me=!r(At,nt,"VP8 "),vt=!r(At,nt,"VP8L"),e(At!=null),e(Be!=null),e(Re!=null),e(lt!=null),8>Be[0])ve=7;else{if(Me||vt){if(At=ne(At,nt+4),12<=Ge&&At>Ge-12){ve=3;break e}if(Ne&&At>Be[0]-8){ve=7;break e}Re[0]=At,ve[0]+=8,Be[0]-=8,lt[0]=vt}else lt[0]=5<=Be[0]&&At[nt+0]==47&&!(At[nt+4]>>5),Re[0]=Be[0];ve=0}if(E=E[0],be.Ja=be.Ja[0],be.xa=be.xa[0],v=v[0],ve!=0)break;if(4294967286<be.Ja)return 3;if(j==null||De||(j[0]=be.xa?2:1),K=[K],He=[He],be.xa){if(5>E){ve=7;break}j=K,Ne=He,De=V,f==null||5>E?f=0:5<=E&&f[v+0]==47&&!(f[v+4]>>5)?(Be=[0],At=[0],Ge=[0],re(Re=new b,f,v,E),gt(Re,Be,At,Ge)?(j!=null&&(j[0]=Be[0]),Ne!=null&&(Ne[0]=At[0]),De!=null&&(De[0]=Ge[0]),f=1):f=0):f=0}else{if(10>E){ve=7;break}j=He,f==null||10>E||!Jf(f,v+3,E-3)?f=0:(Ne=f[v+0]|f[v+1]<<8|f[v+2]<<16,De=16383&(f[v+7]<<8|f[v+6]),f=16383&(f[v+9]<<8|f[v+8]),1&Ne||3<(Ne>>1&7)||!(Ne>>4&1)||Ne>>5>=be.Ja||!De||!f?f=0:(K&&(K[0]=De),j&&(j[0]=f),f=1))}if(!f||(K=K[0],He=He[0],Te&&(ae[0]!=K||ye[0]!=He)))return 3;J!=null&&(J[0]=be,J.offset=v-J.w,e(4294967286>v-J.w),e(J.offset==J.ha-E));break}return ve==0||ve==7&&Te&&J==null?(V!=null&&(V[0]|=be.na!=null&&0<be.na.length),k!=null&&(k[0]=K),P!=null&&(P[0]=He),0):ve}function qc(f,v,E){var k=v.width,P=v.height,V=0,K=0,j=k,J=P;if(v.Da=f!=null&&0<f.Da,v.Da&&(j=f.cd,J=f.bd,V=f.v,K=f.j,11>E||(V&=-2,K&=-2),0>V||0>K||0>=j||0>=J||V+j>k||K+J>P))return 0;if(v.v=V,v.j=K,v.va=V+j,v.o=K+J,v.U=j,v.T=J,v.da=f!=null&&0<f.da,v.da){if(!Pe(j,J,E=[f.ib],V=[f.hb]))return 0;v.ib=E[0],v.hb=V[0]}return v.ob=f!=null&&f.ob,v.Kb=f==null||!f.Sd,v.da&&(v.ob=v.ib<3*k/4&&v.hb<3*P/4,v.Kb=0),1}function Yc(f){if(f==null)return 2;if(11>f.S){var v=f.f.RGBA;v.fb+=(f.height-1)*v.A,v.A=-v.A}else v=f.f.kb,f=f.height,v.O+=(f-1)*v.fa,v.fa=-v.fa,v.N+=(f-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(f-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(f-1)*v.lb,v.lb=-v.lb);return 0}function Al(f,v,E,k){if(k==null||0>=f||0>=v)return 2;if(E!=null){if(E.Da){var P=E.cd,V=E.bd,K=-2&E.v,j=-2&E.j;if(0>K||0>j||0>=P||0>=V||K+P>f||j+V>v)return 2;f=P,v=V}if(E.da){if(!Pe(f,v,P=[E.ib],V=[E.hb]))return 2;f=P[0],v=V[0]}}k.width=f,k.height=v;e:{var J=k.width,ae=k.height;if(f=k.S,0>=J||0>=ae||!(f>=y0&&13>f))f=2;else{if(0>=k.Rd&&k.sd==null){K=V=P=v=0;var ye=(j=J*pE[f])*ae;if(11>f||(V=(ae+1)/2*(v=(J+1)/2),f==12&&(K=(P=J)*ae)),(ae=A(ye+2*V+K))==null){f=1;break e}k.sd=ae,11>f?((J=k.f.RGBA).eb=ae,J.fb=0,J.A=j,J.size=ye):((J=k.f.kb).y=ae,J.O=0,J.fa=j,J.Fd=ye,J.f=ae,J.N=0+ye,J.Ab=v,J.Cd=V,J.ea=ae,J.W=0+ye+V,J.Db=v,J.Ed=V,f==12&&(J.F=ae,J.J=0+ye+2*V),J.Tc=K,J.lb=P)}if(v=1,P=k.S,V=k.width,K=k.height,P>=y0&&13>P)if(11>P)f=k.f.RGBA,v&=(j=Math.abs(f.A))*(K-1)+V<=f.size,v&=j>=V*pE[P],v&=f.eb!=null;else{f=k.f.kb,j=(V+1)/2,ye=(K+1)/2,J=Math.abs(f.fa),ae=Math.abs(f.Ab);var Te=Math.abs(f.Db),Ne=Math.abs(f.lb),be=Ne*(K-1)+V;v&=J*(K-1)+V<=f.Fd,v&=ae*(ye-1)+j<=f.Cd,v=(v&=Te*(ye-1)+j<=f.Ed)&J>=V&ae>=j&Te>=j,v&=f.y!=null,v&=f.f!=null,v&=f.ea!=null,P==12&&(v&=Ne>=V,v&=be<=f.Tc,v&=f.F!=null)}else v=0;f=v?0:2}}return f!=0||E!=null&&E.fd&&(f=Yc(k)),f}var ca=64,il=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],ol=24,sl=32,Jc=8,ua=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];We("Predictor0","PredictorAdd0"),U.Predictor0=function(){return 4278190080},U.Predictor1=function(f){return f},U.Predictor2=function(f,v,E){return v[E+0]},U.Predictor3=function(f,v,E){return v[E+1]},U.Predictor4=function(f,v,E){return v[E-1]},U.Predictor5=function(f,v,E){return Je(Je(f,v[E+1]),v[E+0])},U.Predictor6=function(f,v,E){return Je(f,v[E-1])},U.Predictor7=function(f,v,E){return Je(f,v[E+0])},U.Predictor8=function(f,v,E){return Je(v[E-1],v[E+0])},U.Predictor9=function(f,v,E){return Je(v[E+0],v[E+1])},U.Predictor10=function(f,v,E){return Je(Je(f,v[E-1]),Je(v[E+0],v[E+1]))},U.Predictor11=function(f,v,E){var k=v[E+0];return 0>=ft(k>>24&255,f>>24&255,(v=v[E-1])>>24&255)+ft(k>>16&255,f>>16&255,v>>16&255)+ft(k>>8&255,f>>8&255,v>>8&255)+ft(255&k,255&f,255&v)?k:f},U.Predictor12=function(f,v,E){var k=v[E+0];return(ot((f>>24&255)+(k>>24&255)-((v=v[E-1])>>24&255))<<24|ot((f>>16&255)+(k>>16&255)-(v>>16&255))<<16|ot((f>>8&255)+(k>>8&255)-(v>>8&255))<<8|ot((255&f)+(255&k)-(255&v)))>>>0},U.Predictor13=function(f,v,E){var k=v[E-1];return(at((f=Je(f,v[E+0]))>>24&255,k>>24&255)<<24|at(f>>16&255,k>>16&255)<<16|at(f>>8&255,k>>8&255)<<8|at(f>>0&255,k>>0&255))>>>0};var Um=U.PredictorAdd0;U.PredictorAdd1=yt,We("Predictor2","PredictorAdd2"),We("Predictor3","PredictorAdd3"),We("Predictor4","PredictorAdd4"),We("Predictor5","PredictorAdd5"),We("Predictor6","PredictorAdd6"),We("Predictor7","PredictorAdd7"),We("Predictor8","PredictorAdd8"),We("Predictor9","PredictorAdd9"),We("Predictor10","PredictorAdd10"),We("Predictor11","PredictorAdd11"),We("Predictor12","PredictorAdd12"),We("Predictor13","PredictorAdd13");var Zc=U.PredictorAdd2;xt("ColorIndexInverseTransform","MapARGB","32b",function(f){return f>>8&255},function(f){return f}),xt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(f){return f},function(f){return f>>8&255});var g0,fA=U.ColorIndexInverseTransform,eu=U.MapARGB,Im=U.VP8LColorIndexInverseTransformAlpha,Dm=U.MapAlpha,Xi=U.VP8LPredictorsAdd=[];Xi.length=16,(U.VP8LPredictors=[]).length=16,(U.VP8LPredictorsAdd_C=[]).length=16,(U.VP8LPredictors_C=[]).length=16;var Pa,dA,qi,PA,hi,ll,gA,cl,tu,Yi,pA,fi,jo,ul,Wo,Ji,ru,Ma,di,yr,vr,Kr,sn,gi,Zi,hl,p0,J4,Z4=A(511),eE=A(2041),tE=A(225),rE=A(767),nE=0,Qm=eE,m0=tE,Ea=rE,Ra=Z4,y0=0,v0=1,aE=2,w0=3,B0=4,Om=5,AE=6,Pm=7,Mm=8,x0=9,Rm=10,Aie=[2,3,7],iie=[3,3,11],iE=[280,256,256,256,40],oie=[0,1,1,1,0],sie=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],lie=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],cie=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],uie=8,Hm=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Vm=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],nu=null,hie=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],fie=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],oE=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],die=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],gie=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],pie=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],mie=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],eo=[],mA=[],pi=[],yie=1,sE=2,to=[],Ha=[];Qe("UpsampleRgbLinePair",jt,3),Qe("UpsampleBgrLinePair",Fr,3),Qe("UpsampleRgbaLinePair",hA,4),Qe("UpsampleBgraLinePair",gn,4),Qe("UpsampleArgbLinePair",Hn,4),Qe("UpsampleRgba4444LinePair",Zr,2),Qe("UpsampleRgb565LinePair",Dr,2);var vie=U.UpsampleRgbLinePair,wie=U.UpsampleBgrLinePair,lE=U.UpsampleRgbaLinePair,cE=U.UpsampleBgraLinePair,uE=U.UpsampleArgbLinePair,hE=U.UpsampleRgba4444LinePair,Bie=U.UpsampleRgb565LinePair,b0=16,C0=1<<b0-1,au=-227,$m=482,fE=6,xie=(256<<fE)-1,dE=0,bie=A(256),Cie=A(256),Eie=A(256),_ie=A(256),Fie=A($m-au),Sie=A($m-au);ui("YuvToRgbRow",jt,3),ui("YuvToBgrRow",Fr,3),ui("YuvToRgbaRow",hA,4),ui("YuvToBgraRow",gn,4),ui("YuvToArgbRow",Hn,4),ui("YuvToRgba4444Row",Zr,2),ui("YuvToRgb565Row",Dr,2);var gE=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],E0=[0,2,8],kie=[8,7,6,4,4,2,2,2,1,1,1,1],Tie=1;this.WebPDecodeRGBA=function(f,v,E,k,P){var V=v0,K=new rl,j=new on;K.ba=j,j.S=V,j.width=[j.width],j.height=[j.height];var J=j.width,ae=j.height,ye=new Et;if(ye==null||f==null)var Te=2;else e(ye!=null),Te=al(f,v,E,ye.width,ye.height,ye.Pd,ye.Qd,ye.format,null);if(Te!=0?J=0:(J!=null&&(J[0]=ye.width[0]),ae!=null&&(ae[0]=ye.height[0]),J=1),J){j.width=j.width[0],j.height=j.height[0],k!=null&&(k[0]=j.width),P!=null&&(P[0]=j.height);e:{if(k=new QA,(P=new zc).data=f,P.w=v,P.ha=E,P.kd=1,v=[0],e(P!=null),((f=al(P.data,P.w,P.ha,null,null,null,v,null,P))==0||f==7)&&v[0]&&(f=4),(v=f)==0){if(e(K!=null),k.data=P.data,k.w=P.w+P.offset,k.ha=P.ha-P.offset,k.put=Yn,k.ac=Ir,k.bc=oa,k.ma=K,P.xa){if((f=Ie())==null){K=1;break e}if(function(Ne,be){var He=[0],De=[0],ve=[0];t:for(;;){if(Ne==null)return 0;if(be==null)return Ne.a=2,0;if(Ne.l=be,Ne.a=0,re(Ne.m,be.data,be.w,be.ha),!gt(Ne.m,He,De,ve)){Ne.a=3;break t}if(Ne.xb=sE,be.width=He[0],be.height=De[0],!Fe(He[0],De[0],1,Ne,null))break t;return 1}return e(Ne.a!=0),0}(f,k)){if(k=(v=Al(k.width,k.height,K.Oa,K.ba))==0){t:{k=f;r:for(;;){if(k==null){k=0;break t}if(e(k.s.yc!=null),e(k.s.Ya!=null),e(0<k.s.Wb),e((E=k.l)!=null),e((P=E.ma)!=null),k.xb!=0){if(k.ca=P.ba,k.tb=P.tb,e(k.ca!=null),!qc(P.Oa,E,w0)){k.a=2;break r}if(!pe(k,E.width)||E.da)break r;if((E.da||Rt(k.ca.S))&&_e(),11>k.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),k.ca.f.kb.F!=null&&_e()),k.Pb&&0<k.s.ua&&k.s.vb.X==null&&!Ee(k.s.vb,k.s.Wa.Xa)){k.a=1;break r}k.xb=0}if(!oe(k,k.V,k.Ba,k.c,k.i,E.o,ie))break r;P.Dc=k.Ma,k=1;break t}e(k.a!=0),k=0}k=!k}k&&(v=f.a)}else v=f.a}else{if((f=new ba)==null){K=1;break e}if(f.Fa=P.na,f.P=P.P,f.qc=P.Sa,Zf(f,k)){if((v=Al(k.width,k.height,K.Oa,K.ba))==0){if(f.Aa=0,E=K.Oa,e((P=f)!=null),E!=null){if(0<(J=0>(J=E.Md)?0:100<J?255:255*J/100)){for(ae=ye=0;4>ae;++ae)12>(Te=P.pb[ae]).lc&&(Te.ia=J*kie[0>Te.lc?0:Te.lc]>>3),ye|=Te.ia;ye&&(alert("todo:VP8InitRandom"),P.ia=1)}P.Ga=E.Id,100<P.Ga?P.Ga=100:0>P.Ga&&(P.Ga=0)}gm(f,k)||(v=f.a)}}else v=f.a}v==0&&K.Oa!=null&&K.Oa.fd&&(v=Yc(K.ba))}K=v}V=K!=0?null:11>V?j.f.RGBA.eb:j.f.kb.y}else V=null;return V};var pE=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(U,O){for(var q="",T=0;T<4;T++)q+=String.fromCharCode(U[O++]);return q}function u(U,O){return(U[O+0]<<0|U[O+1]<<8|U[O+2]<<16)>>>0}function p(U,O){return(U[O+0]<<0|U[O+1]<<8|U[O+2]<<16|U[O+3]<<24)>>>0}new l;var h=[0],d=[0],w=[],g=new l,y=t,m=function(U,O){var q={},T=0,L=!1,G=0,Y=0;if(q.frames=[],!function(_,B,x,S){for(var D=0;D<S;D++)if(_[B+D]!=x.charCodeAt(D))return!0;return!1}(U,O,"RIFF",4)){var se,he;for(p(U,O+=4),O+=8;O<U.length;){var ge=c(U,O),re=p(U,O+=4);O+=4;var le=re+(1&re);switch(ge){case"VP8 ":case"VP8L":q.frames[T]===void 0&&(q.frames[T]={}),(b=q.frames[T]).src_off=L?Y:O-8,b.src_size=G+re+8,T++,L&&(L=!1,G=0,Y=0);break;case"VP8X":(b=q.header={}).feature_flags=U[O];var fe=O+4;b.canvas_width=1+u(U,fe),fe+=3,b.canvas_height=1+u(U,fe),fe+=3;break;case"ALPH":L=!0,G=le+8,Y=O-8;break;case"ANIM":(b=q.header).bgcolor=p(U,O),fe=O+4,b.loop_count=(se=U)[(he=fe)+0]<<0|se[he+1]<<8,fe+=2;break;case"ANMF":var Ue,b;(b=q.frames[T]={}).offset_x=2*u(U,O),O+=3,b.offset_y=2*u(U,O),O+=3,b.width=1+u(U,O),O+=3,b.height=1+u(U,O),O+=3,b.duration=u(U,O),O+=3,Ue=U[O++],b.dispose=1&Ue,b.blend=Ue>>1&1}ge!="ANMF"&&(O+=le)}return q}}(y,0);m.response=y,m.rgbaoutput=!0,m.dataurl=!1;var F=m.header?m.header:null,N=m.frames?m.frames:null;if(F){F.loop_counter=F.loop_count,h=[F.canvas_height],d=[F.canvas_width];for(var Q=0;Q<N.length&&N[Q].blend!=0;Q++);}var z=N[0],R=g.WebPDecodeRGBA(y,z.src_off,z.src_size,d,h);z.rgba=R,z.imgwidth=d[0],z.imgheight=h[0];for(var I=0;I<d[0]*h[0]*4;I++)w[I]=R[I];return this.width=d,this.height=h,this.data=w,this}(function(t){var e=function(){return typeof Vd=="function"},r=function(h,d,w,g){var y=4,m=o;switch(g){case t.image_compression.FAST:y=1,m=A;break;case t.image_compression.MEDIUM:y=6,m=s;break;case t.image_compression.SLOW:y=9,m=l}h=n(h,d,w,m);var F=Vd(h,{level:y});return t.__addimage__.arrayBufferToBinaryString(F)},n=function(h,d,w,g){for(var y,m,F,N=h.length/d,Q=new Uint8Array(h.length+N),z=u(),R=0;R<N;R+=1){if(F=R*d,y=h.subarray(F,F+d),g)Q.set(g(y,w,m),F+R);else{for(var I,U=z.length,O=[];I<U;I+=1)O[I]=z[I](y,w,m);var q=p(O.concat());Q.set(O[q],F+R)}m=y}return Q},a=function(h){var d=Array.apply([],h);return d.unshift(0),d},A=function(h,d){var w,g=[],y=h.length;g[0]=1;for(var m=0;m<y;m+=1)w=h[m-d]||0,g[m+1]=h[m]-w+256&255;return g},o=function(h,d,w){var g,y=[],m=h.length;y[0]=2;for(var F=0;F<m;F+=1)g=w&&w[F]||0,y[F+1]=h[F]-g+256&255;return y},s=function(h,d,w){var g,y,m=[],F=h.length;m[0]=3;for(var N=0;N<F;N+=1)g=h[N-d]||0,y=w&&w[N]||0,m[N+1]=h[N]+256-(g+y>>>1)&255;return m},l=function(h,d,w){var g,y,m,F,N=[],Q=h.length;N[0]=4;for(var z=0;z<Q;z+=1)g=h[z-d]||0,y=w&&w[z]||0,m=w&&w[z-d]||0,F=c(g,y,m),N[z+1]=h[z]-F+256&255;return N},c=function(h,d,w){if(h===d&&d===w)return h;var g=Math.abs(d-w),y=Math.abs(h-w),m=Math.abs(h+d-w-w);return g<=y&&g<=m?h:y<=m?d:w},u=function(){return[a,A,o,s,l]},p=function(h){var d=h.map(function(w){return w.reduce(function(g,y){return g+Math.abs(y)},0)});return d.indexOf(Math.min.apply(null,d))};t.processPNG=function(h,d,w,g){var y,m,F,N,Q,z,R,I,U,O,q,T,L,G,Y,se=this.decode.FLATE_DECODE,he="";if(this.__addimage__.isArrayBuffer(h)&&(h=new Uint8Array(h)),this.__addimage__.isArrayBufferView(h)){if(h=(F=new OT(h)).imgData,m=F.bits,y=F.colorSpace,Q=F.colors,[4,6].indexOf(F.colorType)!==-1){if(F.bits===8){U=(I=F.pixelBitlength==32?new Uint32Array(F.decodePixels().buffer):F.pixelBitlength==16?new Uint16Array(F.decodePixels().buffer):new Uint8Array(F.decodePixels().buffer)).length,q=new Uint8Array(U*F.colors),O=new Uint8Array(U);var ge,re=F.pixelBitlength-F.bits;for(G=0,Y=0;G<U;G++){for(L=I[G],ge=0;ge<re;)q[Y++]=L>>>ge&255,ge+=F.bits;O[G]=L>>>ge&255}}if(F.bits===16){U=(I=new Uint32Array(F.decodePixels().buffer)).length,q=new Uint8Array(U*(32/F.pixelBitlength)*F.colors),O=new Uint8Array(U*(32/F.pixelBitlength)),T=F.colors>1,G=0,Y=0;for(var le=0;G<U;)L=I[G++],q[Y++]=L>>>0&255,T&&(q[Y++]=L>>>16&255,L=I[G++],q[Y++]=L>>>0&255),O[le++]=L>>>16&255;m=8}g!==t.image_compression.NONE&&e()?(h=r(q,F.width*F.colors,F.colors,g),R=r(O,F.width,1,g)):(h=q,R=O,se=void 0)}if(F.colorType===3&&(y=this.color_spaces.INDEXED,z=F.palette,F.transparency.indexed)){var fe=F.transparency.indexed,Ue=0;for(G=0,U=fe.length;G<U;++G)Ue+=fe[G];if((Ue/=255)===U-1&&fe.indexOf(0)!==-1)N=[fe.indexOf(0)];else if(Ue!==U){for(I=F.decodePixels(),O=new Uint8Array(I.length),G=0,U=I.length;G<U;G++)O[G]=fe[I[G]];R=r(O,F.width,1)}}var b=function(_){var B;switch(_){case t.image_compression.FAST:B=11;break;case t.image_compression.MEDIUM:B=13;break;case t.image_compression.SLOW:B=14;break;default:B=12}return B}(g);return se===this.decode.FLATE_DECODE&&(he="/Predictor "+b+" "),he+="/Colors "+Q+" /BitsPerComponent "+m+" /Columns "+F.width,(this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),(R&&this.__addimage__.isArrayBuffer(R)||this.__addimage__.isArrayBufferView(R))&&(R=this.__addimage__.arrayBufferToBinaryString(R)),{alias:w,data:h,index:d,filter:se,decodeParameters:he,transparency:N,palette:z,sMask:R,predictor:b,width:F.width,height:F.height,bitsPerComponent:m,colorSpace:y}}}})(Bt.API),function(t){t.processGIF89A=function(e,r,n,a){var A=new PT(e),o=A.width,s=A.height,l=[];A.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},u=new tg(100).encode(c,100);return t.processJPEG.call(this,u,r,n,a)},t.processGIF87A=t.processGIF89A}(Bt.API),ja.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:a,green:n,blue:r,quad:A}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},ja.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(r){hr.log("bit decode error:"+r)}},ja.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<e;a++)for(var A=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*a*4,s=0;s<8&&8*a+s<this.width;s++){var l=this.palette[A>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}r!==0&&(this.pos+=4-r)}},ja.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<t;a++){var A=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*a*4,s=A>>4,l=15&A,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*a+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},ja.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+4*n;if(a<this.palette.length){var o=this.palette[a];this.data[A]=o.red,this.data[A+1]=o.green,this.data[A+2]=o.blue,this.data[A+3]=255}else this.data[A]=255,this.data[A+1]=255,this.data[A+2]=255,this.data[A+3]=255}t!==0&&(this.pos+=4-t)}},ja.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var A=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(A&e)/e*255|0,s=(A>>5&e)/e*255|0,l=(A>>10&e)/e*255|0,c=A>>15?255:0,u=n*this.width*4+4*a;this.data[u]=l,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=c}this.pos+=t}},ja.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,A=0;A<this.width;A++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,l=(o>>5&r)/r*255|0,c=(o>>11)/e*255|0,u=a*this.width*4+4*A;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=s,this.data[u+3]=255}this.pos+=t}},ja.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*r;this.data[o]=A,this.data[o+1]=a,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},ja.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=A,this.data[s+1]=a,this.data[s+2]=n,this.data[s+3]=o}},ja.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,r,n,a){var A=new ja(e,!1),o=A.width,s=A.height,l={data:A.getData(),width:o,height:s},c=new tg(100).encode(l,100);return t.processJPEG.call(this,c,r,n,a)}}(Bt.API),Iv.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,r,n,a){var A=new Iv(e),o=A.width,s=A.height,l={data:A.getData(),width:o,height:s},c=new tg(100).encode(l,100);return t.processJPEG.call(this,c,r,n,a)}}(Bt.API),Bt.API.processRGBA=function(t,e,r){for(var n=t.data,a=n.length,A=new Uint8Array(a/4*3),o=new Uint8Array(a/4),s=0,l=0,c=0;c<a;c+=4){var u=n[c],p=n[c+1],h=n[c+2],d=n[c+3];A[s++]=u,A[s++]=p,A[s++]=h,o[l++]=d}var w=this.__addimage__.arrayBufferToBinaryString(A);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:w,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},Bt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},ps=Bt.API,gh=ps.getCharWidthsArray=function(t,e){var r,n,a=(e=e||{}).font||this.internal.getFont(),A=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:a.metadata.Unicode.widths,l=s.fof?s.fof:1,c=e.kerning?e.kerning:a.metadata.Unicode.kerning,u=c.fof?c.fof:1,p=e.doKerning!==!1,h=0,d=t.length,w=0,g=s[0]||l,y=[];for(r=0;r<d;r++)n=t.charCodeAt(r),typeof a.metadata.widthOfString=="function"?y.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(n))+o*(1e3/A)||0)/1e3):(h=p&&Xt(c[n])==="object"&&!isNaN(parseInt(c[n][w],10))?c[n][w]/u:0,y.push((s[n]||g)/l+h)),w=n;return y},Tv=ps.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),a=e.charSpace||this.internal.getCharSpace();return ps.processArabic&&(t=ps.processArabic(t)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(t,r,a)/r:gh.apply(this,arguments).reduce(function(A,o){return A+o},0)},Nv=function(t,e,r,n){for(var a=[],A=0,o=t.length,s=0;A!==o&&s+e[A]<r;)s+=e[A],A++;a.push(t.slice(0,A));var l=A;for(s=0;A!==o;)s+e[A]>n&&(a.push(t.slice(l,A)),s=0,l=A),s+=e[A],A++;return l!==A&&a.push(t.slice(l,A)),a},Lv=function(t,e,r){r||(r={});var n,a,A,o,s,l,c,u=[],p=[u],h=r.textIndent||0,d=0,w=0,g=t.split(" "),y=gh.apply(this,[" ",r])[0];if(l=r.lineIndent===-1?g[0].length+2:r.lineIndent||0){var m=Array(l).join(" "),F=[];g.map(function(Q){(Q=Q.split(/\s*\n/)).length>1?F=F.concat(Q.map(function(z,R){return(R&&z.length?`
233
+ */function ja(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Iv(t){function e(U){if(!U)throw Error("assert :P")}function r(U,O,q){for(var T=0;4>T;T++)if(U[O+T]!=q.charCodeAt(T))return!0;return!1}function n(U,O,q,T,L){for(var G=0;G<L;G++)U[O+G]=q[T+G]}function a(U,O,q,T){for(var L=0;L<T;L++)U[O+L]=q}function A(U){return new Int32Array(U)}function o(U,O){for(var q=[],T=0;T<U;T++)q.push(new O);return q}function s(U,O){var q=[];return function T(L,G,Y){for(var se=Y[G],he=0;he<se&&(L.push(Y.length>G+1?[]:new O),!(Y.length<G+1));he++)T(L[he],G+1,Y)}(q,0,U),q}var l=function(){var U=this;function O(f,v){for(var E=1<<v-1>>>0;f&E;)E>>>=1;return E?(f&E-1)+E:f}function q(f,v,E,k,P){e(!(k%E));do f[v+(k-=E)]=P;while(0<k)}function T(f,v,E,k,P){if(e(2328>=P),512>=P)var V=A(512);else if((V=A(P))==null)return 0;return function(K,j,J,ae,ye,Te){var Ne,be,He=j,De=1<<J,ve=A(16),Be=A(16);for(e(ye!=0),e(ae!=null),e(K!=null),e(0<J),be=0;be<ye;++be){if(15<ae[be])return 0;++ve[ae[be]]}if(ve[0]==ye)return 0;for(Be[1]=0,Ne=1;15>Ne;++Ne){if(ve[Ne]>1<<Ne)return 0;Be[Ne+1]=Be[Ne]+ve[Ne]}for(be=0;be<ye;++be)Ne=ae[be],0<ae[be]&&(Te[Be[Ne]++]=be);if(Be[15]==1)return(ae=new L).g=0,ae.value=Te[0],q(K,He,1,De,ae),De;var Me,Ge=-1,Re=De-1,lt=0,nt=1,vt=1,At=1<<J;for(be=0,Ne=1,ye=2;Ne<=J;++Ne,ye<<=1){if(nt+=vt<<=1,0>(vt-=ve[Ne]))return 0;for(;0<ve[Ne];--ve[Ne])(ae=new L).g=Ne,ae.value=Te[be++],q(K,He+lt,ye,At,ae),lt=O(lt,Ne)}for(Ne=J+1,ye=2;15>=Ne;++Ne,ye<<=1){if(nt+=vt<<=1,0>(vt-=ve[Ne]))return 0;for(;0<ve[Ne];--ve[Ne]){if(ae=new L,(lt&Re)!=Ge){for(He+=At,Me=1<<(Ge=Ne)-J;15>Ge&&!(0>=(Me-=ve[Ge]));)++Ge,Me<<=1;De+=At=1<<(Me=Ge-J),K[j+(Ge=lt&Re)].g=Me+J,K[j+Ge].value=He-j-Ge}ae.g=Ne-J,ae.value=Te[be++],q(K,He+(lt>>J),ye,At,ae),lt=O(lt,Ne)}}return nt!=2*Be[15]-1?0:De}(f,v,E,k,P,V)}function L(){this.value=this.g=0}function G(){this.value=this.g=0}function Y(){this.G=o(5,L),this.H=A(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(ca,G)}function se(f,v,E,k){e(f!=null),e(v!=null),e(2147483648>k),f.Ca=254,f.I=0,f.b=-8,f.Ka=0,f.oa=v,f.pa=E,f.Jd=v,f.Yc=E+k,f.Zc=4<=k?E+k-4+1:E,D(f)}function he(f,v){for(var E=0;0<v--;)E|=ue(f,128)<<v;return E}function ge(f,v){var E=he(f,v);return W(f)?-E:E}function re(f,v,E,k){var P,V=0;for(e(f!=null),e(v!=null),e(4294967288>k),f.Sb=k,f.Ra=0,f.u=0,f.h=0,4<k&&(k=4),P=0;P<k;++P)V+=v[E+P]<<8*P;f.Ra=V,f.bb=k,f.oa=v,f.pa=E}function le(f){for(;8<=f.u&&f.bb<f.Sb;)f.Ra>>>=8,f.Ra+=f.oa[f.pa+f.bb]<<sl-8>>>0,++f.bb,f.u-=8;B(f)&&(f.h=1,f.u=0)}function fe(f,v){if(e(0<=v),!f.h&&v<=ol){var E=_(f)&il[v];return f.u+=v,le(f),E}return f.h=1,f.u=0}function Ue(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function b(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function _(f){return f.Ra>>>(f.u&sl-1)>>>0}function B(f){return e(f.bb<=f.Sb),f.h||f.bb==f.Sb&&f.u>sl}function x(f,v){f.u=v,f.h=B(f)}function S(f){f.u>=Jc&&(e(f.u>=Jc),le(f))}function D(f){e(f!=null&&f.oa!=null),f.pa<f.Zc?(f.I=(f.oa[f.pa++]|f.I<<8)>>>0,f.b+=8):(e(f!=null&&f.oa!=null),f.pa<f.Yc?(f.b+=8,f.I=f.oa[f.pa++]|f.I<<8):f.Ka?f.b=0:(f.I<<=8,f.b+=8,f.Ka=1))}function W(f){return he(f,1)}function ue(f,v){var E=f.Ca;0>f.b&&D(f);var k=f.b,P=E*v>>>8,V=(f.I>>>k>P)+0;for(V?(E-=P,f.I-=P+1<<k>>>0):E=P+1,k=E,P=0;256<=k;)P+=8,k>>=8;return k=7^P+ua[k],f.b-=k,f.Ca=(E<<k)-1,V}function Ce(f,v,E){f[v+0]=E>>24&255,f[v+1]=E>>16&255,f[v+2]=E>>8&255,f[v+3]=E>>0&255}function de(f,v){return f[v+0]<<0|f[v+1]<<8}function ke(f,v){return de(f,v)|f[v+2]<<16}function ne(f,v){return de(f,v)|de(f,v+2)<<16}function Ee(f,v){var E=1<<v;return e(f!=null),e(0<v),f.X=A(E),f.X==null?0:(f.Mb=32-v,f.Xa=v,1)}function xe(f,v){e(f!=null),e(v!=null),e(f.Xa==v.Xa),n(v.X,0,f.X,0,1<<v.Xa)}function te(){this.X=[],this.Xa=this.Mb=0}function Pe(f,v,E,k){e(E!=null),e(k!=null);var P=E[0],V=k[0];return P==0&&(P=(f*V+v/2)/v),V==0&&(V=(v*P+f/2)/f),0>=P||0>=V?0:(E[0]=P,k[0]=V,1)}function rt(f,v){return f+(1<<v)-1>>>v}function Ve(f,v){return((4278255360&f)+(4278255360&v)>>>0&4278255360)+((16711935&f)+(16711935&v)>>>0&16711935)>>>0}function We(f,v){U[v]=function(E,k,P,V,K,j,J){var ae;for(ae=0;ae<K;++ae){var ye=U[f](j[J+ae-1],P,V+ae);j[J+ae]=Ve(E[k+ae],ye)}}}function Ye(){this.ud=this.hd=this.jd=0}function Je(f,v){return((4278124286&(f^v))>>>1)+(f&v)>>>0}function ot(f){return 0<=f&&256>f?f:0>f?0:255<f?255:void 0}function at(f,v){return ot(f+(f-v+.5>>1))}function ft(f,v,E){return Math.abs(v-E)-Math.abs(f-E)}function yt(f,v,E,k,P,V,K){for(k=V[K-1],E=0;E<P;++E)V[K+E]=k=Ve(f[v+E],k)}function kt(f,v,E,k,P){var V;for(V=0;V<E;++V){var K=f[v+V],j=K>>8&255,J=16711935&(J=(J=16711935&K)+((j<<16)+j));k[P+V]=(4278255360&K)+J>>>0}}function Nt(f,v){v.jd=f>>0&255,v.hd=f>>8&255,v.ud=f>>16&255}function dt(f,v,E,k,P,V){var K;for(K=0;K<k;++K){var j=v[E+K],J=j>>>8,ae=j,ye=255&(ye=(ye=j>>>16)+((f.jd<<24>>24)*(J<<24>>24)>>>5));ae=255&(ae=(ae=ae+((f.hd<<24>>24)*(J<<24>>24)>>>5))+((f.ud<<24>>24)*(ye<<24>>24)>>>5)),P[V+K]=(4278255360&j)+(ye<<16)+ae}}function xt(f,v,E,k,P){U[v]=function(V,K,j,J,ae,ye,Te,Ne,be){for(J=Te;J<Ne;++J)for(Te=0;Te<be;++Te)ae[ye++]=P(j[k(V[K++])])},U[f]=function(V,K,j,J,ae,ye,Te){var Ne=8>>V.b,be=V.Ea,He=V.K[0],De=V.w;if(8>Ne)for(V=(1<<V.b)-1,De=(1<<Ne)-1;K<j;++K){var ve,Be=0;for(ve=0;ve<be;++ve)ve&V||(Be=k(J[ae++])),ye[Te++]=P(He[Be&De]),Be>>=Ne}else U["VP8LMapColor"+E](J,ae,He,De,ye,Te,K,j,be)}}function tt(f,v,E,k,P){for(E=v+E;v<E;){var V=f[v++];k[P++]=V>>16&255,k[P++]=V>>8&255,k[P++]=V>>0&255}}function ir(f,v,E,k,P){for(E=v+E;v<E;){var V=f[v++];k[P++]=V>>16&255,k[P++]=V>>8&255,k[P++]=V>>0&255,k[P++]=V>>24&255}}function Lt(f,v,E,k,P){for(E=v+E;v<E;){var V=(K=f[v++])>>16&240|K>>12&15,K=K>>0&240|K>>28&15;k[P++]=V,k[P++]=K}}function fr(f,v,E,k,P){for(E=v+E;v<E;){var V=(K=f[v++])>>16&248|K>>13&7,K=K>>5&224|K>>3&31;k[P++]=V,k[P++]=K}}function Qt(f,v,E,k,P){for(E=v+E;v<E;){var V=f[v++];k[P++]=V>>0&255,k[P++]=V>>8&255,k[P++]=V>>16&255}}function Kt(f,v,E,k,P,V){if(V==0)for(E=v+E;v<E;)Ce(k,((V=f[v++])[0]>>24|V[1]>>8&65280|V[2]<<8&16711680|V[3]<<24)>>>0),P+=32;else n(k,P,f,v,E)}function Jr(f,v){U[v][0]=U[f+"0"],U[v][1]=U[f+"1"],U[v][2]=U[f+"2"],U[v][3]=U[f+"3"],U[v][4]=U[f+"4"],U[v][5]=U[f+"5"],U[v][6]=U[f+"6"],U[v][7]=U[f+"7"],U[v][8]=U[f+"8"],U[v][9]=U[f+"9"],U[v][10]=U[f+"10"],U[v][11]=U[f+"11"],U[v][12]=U[f+"12"],U[v][13]=U[f+"13"],U[v][14]=U[f+"0"],U[v][15]=U[f+"0"]}function Rt(f){return f==Pm||f==Mm||f==x0||f==Rm}function _r(){this.eb=[],this.size=this.A=this.fb=0}function Yt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function on(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new _r,this.f.kb=new Yt,this.sd=null}function _t(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Gt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function bt(f){return alert("todo:WebPSamplerProcessPlane"),f.T}function $t(f,v){var E=f.T,k=v.ba.f.RGBA,P=k.eb,V=k.fb+f.ka*k.A,K=Ha[v.ba.S],j=f.y,J=f.O,ae=f.f,ye=f.N,Te=f.ea,Ne=f.W,be=v.cc,He=v.dc,De=v.Mc,ve=v.Nc,Be=f.ka,Me=f.ka+f.T,Ge=f.U,Re=Ge+1>>1;for(Be==0?K(j,J,null,null,ae,ye,Te,Ne,ae,ye,Te,Ne,P,V,null,null,Ge):(K(v.ec,v.fc,j,J,be,He,De,ve,ae,ye,Te,Ne,P,V-k.A,P,V,Ge),++E);Be+2<Me;Be+=2)be=ae,He=ye,De=Te,ve=Ne,ye+=f.Rc,Ne+=f.Rc,V+=2*k.A,K(j,(J+=2*f.fa)-f.fa,j,J,be,He,De,ve,ae,ye,Te,Ne,P,V-k.A,P,V,Ge);return J+=f.fa,f.j+Me<f.o?(n(v.ec,v.fc,j,J,Ge),n(v.cc,v.dc,ae,ye,Re),n(v.Mc,v.Nc,Te,Ne,Re),E--):1&Me||K(j,J,null,null,ae,ye,Te,Ne,ae,ye,Te,Ne,P,V+k.A,null,null,Ge),E}function xa(f,v,E){var k=f.F,P=[f.J];if(k!=null){var V=f.U,K=v.ba.S,j=K==B0||K==x0;v=v.ba.f.RGBA;var J=[0],ae=f.ka;J[0]=f.T,f.Kb&&(ae==0?--J[0]:(--ae,P[0]-=f.width),f.j+f.ka+f.T==f.o&&(J[0]=f.o-f.j-ae));var ye=v.eb;ae=v.fb+ae*v.A,f=p0(k,P[0],f.width,V,J,ye,ae+(j?0:3),v.A),e(E==J),f&&Rt(K)&&Zi(ye,ae,j,V,J,v.A)}return 0}function Ir(f){var v=f.ma,E=v.ba.S,k=11>E,P=E==v0||E==w0||E==B0||E==Om||E==12||Rt(E);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!qc(v.Oa,f,P?11:12))return 0;if(P&&Rt(E)&&Xe(),f.da)alert("todo:use_scaling");else{if(k){if(v.Ib=bt,f.Kb){if(E=f.U+1>>1,v.memory=A(f.U+2*E),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+f.U,v.Mc=v.cc,v.Nc=v.dc+E,v.Ib=$t,Xe()}}else alert("todo:EmitYUV");P&&(v.Jb=xa,k&&_e())}if(k&&!dE){for(f=0;256>f;++f)bie[f]=89858*(f-128)+C0>>b0,_ie[f]=-22014*(f-128)+C0,Eie[f]=-45773*(f-128),Cie[f]=113618*(f-128)+C0>>b0;for(f=au;f<$m;++f)v=76283*(f-16)+C0>>b0,Fie[f-au]=Ca(v,255),Sie[f-au]=Ca(v+8>>4,15);dE=1}return 1}function Yn(f){var v=f.ma,E=f.U,k=f.T;return e(!(1&f.ka)),0>=E||0>=k?0:(E=v.Ib(f,v),v.Jb!=null&&v.Jb(f,v,E),v.Dc+=E,1)}function oa(f){f.ma.memory=null}function gt(f,v,E,k){return fe(f,8)!=47?0:(v[0]=fe(f,14)+1,E[0]=fe(f,14)+1,k[0]=fe(f,1),fe(f,3)!=0?0:!f.h)}function Fn(f,v){if(4>f)return f+1;var E=f-2>>1;return(2+(1&f)<<E)+fe(v,E)+1}function Mn(f,v){return 120<v?v-120:1<=(E=((E=lie[v-1])>>4)*f+(8-(15&E)))?E:1;var E}function mr(f,v,E){var k=_(E),P=f[v+=255&k].g-8;return 0<P&&(x(E,E.u+8),k=_(E),v+=f[v].value,v+=k&(1<<P)-1),x(E,E.u+f[v].g),f[v].value}function xr(f,v,E){return E.g+=f.g,E.value+=f.value<<v>>>0,e(8>=E.g),f.g}function br(f,v,E){var k=f.xc;return e((v=k==0?0:f.vc[f.md*(E>>k)+(v>>k)])<f.Wb),f.Ya[v]}function H(f,v,E,k){var P=f.ab,V=f.c*v,K=f.C;v=K+v;var j=E,J=k;for(k=f.Ta,E=f.Ua;0<P--;){var ae=f.gc[P],ye=K,Te=v,Ne=j,be=J,He=(J=k,j=E,ae.Ea);switch(e(ye<Te),e(Te<=ae.nc),ae.hc){case 2:g0(Ne,be,(Te-ye)*He,J,j);break;case 0:var De=ye,ve=Te,Be=J,Me=j,Ge=(At=ae).Ea;De==0&&(Um(Ne,be,null,null,1,Be,Me),yt(Ne,be+1,0,0,Ge-1,Be,Me+1),be+=Ge,Me+=Ge,++De);for(var Re=1<<At.b,lt=Re-1,nt=rt(Ge,At.b),vt=At.K,At=At.w+(De>>At.b)*nt;De<ve;){var Zt=vt,or=At,Wt=1;for(Zc(Ne,be,Be,Me-Ge,1,Be,Me);Wt<Ge;){var Vt=(Wt&~lt)+Re;Vt>Ge&&(Vt=Ge),(0,Xi[Zt[or++]>>8&15])(Ne,be+ +Wt,Be,Me+Wt-Ge,Vt-Wt,Be,Me+Wt),Wt=Vt}be+=Ge,Me+=Ge,++De&lt||(At+=nt)}Te!=ae.nc&&n(J,j-He,J,j+(Te-ye-1)*He,He);break;case 1:for(He=Ne,ve=be,Ge=(Ne=ae.Ea)-(Me=Ne&~(Be=(be=1<<ae.b)-1)),De=rt(Ne,ae.b),Re=ae.K,ae=ae.w+(ye>>ae.b)*De;ye<Te;){for(lt=Re,nt=ae,vt=new Ye,At=ve+Me,Zt=ve+Ne;ve<At;)Nt(lt[nt++],vt),Pa(vt,He,ve,be,J,j),ve+=be,j+=be;ve<Zt&&(Nt(lt[nt++],vt),Pa(vt,He,ve,Ge,J,j),ve+=Ge,j+=Ge),++ye&Be||(ae+=De)}break;case 3:if(Ne==J&&be==j&&0<ae.b){for(ve=J,Ne=He=j+(Te-ye)*He-(Me=(Te-ye)*rt(ae.Ea,ae.b)),be=J,Be=j,De=[],Me=(Ge=Me)-1;0<=Me;--Me)De[Me]=be[Be+Me];for(Me=Ge-1;0<=Me;--Me)ve[Ne+Me]=De[Me];fA(ae,ye,Te,J,He,J,j)}else fA(ae,ye,Te,Ne,be,J,j)}j=k,J=E}J!=E&&n(k,E,j,J,V)}function ie(f,v){var E=f.V,k=f.Ba+f.c*f.C,P=v-f.C;if(e(v<=f.l.o),e(16>=P),0<P){var V=f.l,K=f.Ta,j=f.Ua,J=V.width;if(H(f,P,E,k),P=j=[j],e((E=f.C)<(k=v)),e(V.v<V.va),k>V.o&&(k=V.o),E<V.j){var ae=V.j-E;E=V.j,P[0]+=ae*J}if(E>=k?E=0:(P[0]+=4*V.v,V.ka=E-V.j,V.U=V.va-V.v,V.T=k-E,E=1),E){if(j=j[0],11>(E=f.ca).S){var ye=E.f.RGBA,Te=(k=E.S,P=V.U,V=V.T,ae=ye.eb,ye.A),Ne=V;for(ye=ye.fb+f.Ma*ye.A;0<Ne--;){var be=K,He=j,De=P,ve=ae,Be=ye;switch(k){case y0:dA(be,He,De,ve,Be);break;case v0:qi(be,He,De,ve,Be);break;case Pm:qi(be,He,De,ve,Be),Zi(ve,Be,0,De,1,0);break;case aE:ll(be,He,De,ve,Be);break;case w0:Kt(be,He,De,ve,Be,1);break;case Mm:Kt(be,He,De,ve,Be,1),Zi(ve,Be,0,De,1,0);break;case B0:Kt(be,He,De,ve,Be,0);break;case x0:Kt(be,He,De,ve,Be,0),Zi(ve,Be,1,De,1,0);break;case Om:PA(be,He,De,ve,Be);break;case Rm:PA(be,He,De,ve,Be),hl(ve,Be,De,1,0);break;case AE:hi(be,He,De,ve,Be);break;default:e(0)}j+=J,ye+=Te}f.Ma+=V}else alert("todo:EmitRescaledRowsYUVA");e(f.Ma<=E.height)}}f.C=v,e(f.C<=f.i)}function Z(f){var v;if(0<f.ua)return 0;for(v=0;v<f.Wb;++v){var E=f.Ya[v].G,k=f.Ya[v].H;if(0<E[1][k[1]+0].g||0<E[2][k[2]+0].g||0<E[3][k[3]+0].g)return 0}return 1}function ee(f,v,E,k,P,V){if(f.Z!=0){var K=f.qd,j=f.rd;for(e(to[f.Z]!=null);v<E;++v)to[f.Z](K,j,k,P,k,P,V),K=k,j=P,P+=V;f.qd=K,f.rd=j}}function Ae(f,v){var E=f.l.ma,k=E.Z==0||E.Z==1?f.l.j:f.C;if(k=f.C<k?k:f.C,e(v<=f.l.o),v>k){var P=f.l.width,V=E.ca,K=E.tb+P*k,j=f.V,J=f.Ba+f.c*k,ae=f.gc;e(f.ab==1),e(ae[0].hc==3),Im(ae[0],k,v,j,J,V,K),ee(E,k,v,V,K,P)}f.C=f.Ma=v}function oe(f,v,E,k,P,V,K){var j=f.$/k,J=f.$%k,ae=f.m,ye=f.s,Te=E+f.$,Ne=Te;P=E+k*P;var be=E+k*V,He=280+ye.ua,De=f.Pb?j:16777216,ve=0<ye.ua?ye.Wa:null,Be=ye.wc,Me=Te<be?br(ye,J,j):null;e(f.C<V),e(be<=P);var Ge=!1;e:for(;;){for(;Ge||Te<be;){var Re=0;if(j>=De){var lt=Te-E;e((De=f).Pb),De.wd=De.m,De.xd=lt,0<De.s.ua&&xe(De.s.Wa,De.s.vb),De=j+uie}if(J&Be||(Me=br(ye,J,j)),e(Me!=null),Me.Qb&&(v[Te]=Me.qb,Ge=!0),!Ge)if(S(ae),Me.jc){Re=ae,lt=v;var nt=Te,vt=Me.pd[_(Re)&ca-1];e(Me.jc),256>vt.g?(x(Re,Re.u+vt.g),lt[nt]=vt.value,Re=0):(x(Re,Re.u+vt.g-256),e(256<=vt.value),Re=vt.value),Re==0&&(Ge=!0)}else Re=mr(Me.G[0],Me.H[0],ae);if(ae.h)break;if(Ge||256>Re){if(!Ge)if(Me.nd)v[Te]=(Me.qb|Re<<8)>>>0;else{if(S(ae),Ge=mr(Me.G[1],Me.H[1],ae),S(ae),lt=mr(Me.G[2],Me.H[2],ae),nt=mr(Me.G[3],Me.H[3],ae),ae.h)break;v[Te]=(nt<<24|Ge<<16|Re<<8|lt)>>>0}if(Ge=!1,++Te,++J>=k&&(J=0,++j,K!=null&&j<=V&&!(j%16)&&K(f,j),ve!=null))for(;Ne<Te;)Re=v[Ne++],ve.X[(506832829*Re&4294967295)>>>ve.Mb]=Re}else if(280>Re){if(Re=Fn(Re-256,ae),lt=mr(Me.G[4],Me.H[4],ae),S(ae),lt=Mn(k,lt=Fn(lt,ae)),ae.h)break;if(Te-E<lt||P-Te<Re)break e;for(nt=0;nt<Re;++nt)v[Te+nt]=v[Te+nt-lt];for(Te+=Re,J+=Re;J>=k;)J-=k,++j,K!=null&&j<=V&&!(j%16)&&K(f,j);if(e(Te<=P),J&Be&&(Me=br(ye,J,j)),ve!=null)for(;Ne<Te;)Re=v[Ne++],ve.X[(506832829*Re&4294967295)>>>ve.Mb]=Re}else{if(!(Re<He))break e;for(Ge=Re-280,e(ve!=null);Ne<Te;)Re=v[Ne++],ve.X[(506832829*Re&4294967295)>>>ve.Mb]=Re;Re=Te,e(!(Ge>>>(lt=ve).Xa)),v[Re]=lt.X[Ge],Ge=!0}Ge||e(ae.h==B(ae))}if(f.Pb&&ae.h&&Te<P)e(f.m.h),f.a=5,f.m=f.wd,f.$=f.xd,0<f.s.ua&&xe(f.s.vb,f.s.Wa);else{if(ae.h)break e;K!=null&&K(f,j>V?V:j),f.a=0,f.$=Te-E}return 1}return f.a=3,0}function Se(f){e(f!=null),f.vc=null,f.yc=null,f.Ya=null;var v=f.Wa;v!=null&&(v.X=null),f.vb=null,e(f!=null)}function Ie(){var f=new Lm;return f==null?null:(f.a=0,f.xb=sE,Jr("Predictor","VP8LPredictors"),Jr("Predictor","VP8LPredictors_C"),Jr("PredictorAdd","VP8LPredictorsAdd"),Jr("PredictorAdd","VP8LPredictorsAdd_C"),g0=kt,Pa=dt,dA=tt,qi=ir,PA=Lt,hi=fr,ll=Qt,U.VP8LMapColor32b=eu,U.VP8LMapColor8b=Dm,f)}function Fe(f,v,E,k,P){var V=1,K=[f],j=[v],J=k.m,ae=k.s,ye=null,Te=0;e:for(;;){if(E)for(;V&&fe(J,1);){var Ne=K,be=j,He=k,De=1,ve=He.m,Be=He.gc[He.ab],Me=fe(ve,2);if(He.Oc&1<<Me)V=0;else{switch(He.Oc|=1<<Me,Be.hc=Me,Be.Ea=Ne[0],Be.nc=be[0],Be.K=[null],++He.ab,e(4>=He.ab),Me){case 0:case 1:Be.b=fe(ve,3)+2,De=Fe(rt(Be.Ea,Be.b),rt(Be.nc,Be.b),0,He,Be.K),Be.K=Be.K[0];break;case 3:var Ge,Re=fe(ve,8)+1,lt=16<Re?0:4<Re?1:2<Re?2:3;if(Ne[0]=rt(Be.Ea,lt),Be.b=lt,Ge=De=Fe(Re,1,0,He,Be.K)){var nt,vt=Re,At=Be,Zt=1<<(8>>At.b),or=A(Zt);if(or==null)Ge=0;else{var Wt=At.K[0],Vt=At.w;for(or[0]=At.K[0][0],nt=1;nt<1*vt;++nt)or[nt]=Ve(Wt[Vt+nt],or[nt-1]);for(;nt<4*Zt;++nt)or[nt]=0;At.K[0]=null,At.K[0]=or,Ge=1}}De=Ge;break;case 2:break;default:e(0)}V=De}}if(K=K[0],j=j[0],V&&fe(J,1)&&!(V=1<=(Te=fe(J,4))&&11>=Te)){k.a=3;break e}var dr;if(dr=V)t:{var ur,Dt,en,ha=k,tn=K,fa=j,sr=Te,_a=E,Fa=ha.m,pn=ha.s,Sn=[null],Jn=1,Va=0,MA=cie[sr];r:for(;;){if(_a&&fe(Fa,1)){var mn=fe(Fa,3)+2,mi=rt(tn,mn),Xo=rt(fa,mn),fl=mi*Xo;if(!Fe(mi,Xo,0,ha,Sn))break r;for(Sn=Sn[0],pn.xc=mn,ur=0;ur<fl;++ur){var ro=Sn[ur]>>8&65535;Sn[ur]=ro,ro>=Jn&&(Jn=ro+1)}}if(Fa.h)break r;for(Dt=0;5>Dt;++Dt){var Qr=iE[Dt];!Dt&&0<sr&&(Qr+=1<<sr),Va<Qr&&(Va=Qr)}var zm=o(Jn*MA,L),mE=Jn,yE=o(mE,Y);if(yE==null)var _0=null;else e(65536>=mE),_0=yE;var Au=A(Va);if(_0==null||Au==null||zm==null){ha.a=1;break r}var F0=zm;for(ur=en=0;ur<Jn;++ur){var yA=_0[ur],dl=yA.G,gl=yA.H,vE=0,S0=1,wE=0;for(Dt=0;5>Dt;++Dt){Qr=iE[Dt],dl[Dt]=F0,gl[Dt]=en,!Dt&&0<sr&&(Qr+=1<<sr);a:{var k0,Km=Qr,T0=ha,iu=Au,Nie=F0,Lie=en,Gm=0,no=T0.m,Uie=fe(no,1);if(a(iu,0,0,Km),Uie){var Iie=fe(no,1)+1,Die=fe(no,1),BE=fe(no,Die==0?1:8);iu[BE]=1,Iie==2&&(iu[BE=fe(no,8)]=1);var N0=1}else{var xE=A(19),bE=fe(no,4)+4;if(19<bE){T0.a=3;var L0=0;break a}for(k0=0;k0<bE;++k0)xE[sie[k0]]=fe(no,3);var jm=void 0,ou=void 0,CE=T0,Qie=xE,U0=Km,EE=iu,Wm=0,ao=CE.m,_E=8,FE=o(128,L);n:for(;T(FE,0,7,Qie,19);){if(fe(ao,1)){var Oie=2+2*fe(ao,3);if((jm=2+fe(ao,Oie))>U0)break n}else jm=U0;for(ou=0;ou<U0&&jm--;){S(ao);var SE=FE[0+(127&_(ao))];x(ao,ao.u+SE.g);var pl=SE.value;if(16>pl)EE[ou++]=pl,pl!=0&&(_E=pl);else{var Pie=pl==16,kE=pl-16,Mie=iie[kE],TE=fe(ao,Aie[kE])+Mie;if(ou+TE>U0)break n;for(var Rie=Pie?_E:0;0<TE--;)EE[ou++]=Rie}}Wm=1;break n}Wm||(CE.a=3),N0=Wm}(N0=N0&&!no.h)&&(Gm=T(Nie,Lie,8,iu,Km)),N0&&Gm!=0?L0=Gm:(T0.a=3,L0=0)}if(L0==0)break r;if(S0&&oie[Dt]==1&&(S0=F0[en].g==0),vE+=F0[en].g,en+=L0,3>=Dt){var su,Xm=Au[0];for(su=1;su<Qr;++su)Au[su]>Xm&&(Xm=Au[su]);wE+=Xm}}if(yA.nd=S0,yA.Qb=0,S0&&(yA.qb=(dl[3][gl[3]+0].value<<24|dl[1][gl[1]+0].value<<16|dl[2][gl[2]+0].value)>>>0,vE==0&&256>dl[0][gl[0]+0].value&&(yA.Qb=1,yA.qb+=dl[0][gl[0]+0].value<<8)),yA.jc=!yA.Qb&&6>wE,yA.jc){var I0,yi=yA;for(I0=0;I0<ca;++I0){var Ao=I0,io=yi.pd[Ao],D0=yi.G[0][yi.H[0]+Ao];256<=D0.value?(io.g=D0.g+256,io.value=D0.value):(io.g=0,io.value=0,Ao>>=xr(D0,8,io),Ao>>=xr(yi.G[1][yi.H[1]+Ao],16,io),Ao>>=xr(yi.G[2][yi.H[2]+Ao],0,io),xr(yi.G[3][yi.H[3]+Ao],24,io))}}}pn.vc=Sn,pn.Wb=Jn,pn.Ya=_0,pn.yc=zm,dr=1;break t}dr=0}if(!(V=dr)){k.a=3;break e}if(0<Te){if(ae.ua=1<<Te,!Ee(ae.Wa,Te)){k.a=1,V=0;break e}}else ae.ua=0;var qm=k,NE=K,Hie=j,Ym=qm.s,Jm=Ym.xc;if(qm.c=NE,qm.i=Hie,Ym.md=rt(NE,Jm),Ym.wc=Jm==0?-1:(1<<Jm)-1,E){k.xb=yie;break e}if((ye=A(K*j))==null){k.a=1,V=0;break e}V=(V=oe(k,ye,0,K,j,j,null))&&!J.h;break e}return V?(P!=null?P[0]=ye:(e(ye==null),e(E)),k.$=0,E||Se(ae)):Se(ae),V}function pe(f,v){var E=f.c*f.i,k=E+v+16*v;return e(f.c<=v),f.V=A(k),f.V==null?(f.Ta=null,f.Ua=0,f.a=1,0):(f.Ta=f.V,f.Ua=f.Ba+E+v,1)}function X(f,v){var E=f.C,k=v-E,P=f.V,V=f.Ba+f.c*E;for(e(v<=f.l.o);0<k;){var K=16<k?16:k,j=f.l.ma,J=f.l.width,ae=J*K,ye=j.ca,Te=j.tb+J*E,Ne=f.Ta,be=f.Ua;H(f,K,P,V),J4(Ne,be,ye,Te,ae),ee(j,E,E+K,ye,Te,J),k-=K,P+=K*f.c,E+=K}e(E==v),f.C=f.Ma=v}function we(){this.ub=this.yd=this.td=this.Rb=0}function Le(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ke(){this.Fb=this.Bb=this.Cb=0,this.Zb=A(4),this.Lb=A(4)}function ze(){this.Yb=function(){var f=[];return function v(E,k,P){for(var V=P[k],K=0;K<V&&(E.push(P.length>k+1?[]:0),!(P.length<k+1));K++)v(E[K],k+1,P)}(f,0,[3,11]),f}()}function qe(){this.jb=A(3),this.Wc=s([4,8],ze),this.Xc=s([4,17],ze)}function ut(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new A(4),this.od=new A(4)}function zt(){this.ld=this.La=this.dd=this.tc=0}function Ct(){this.Na=this.la=0}function Er(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function sa(){this.ad=A(384),this.Za=0,this.Ob=A(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function IA(){this.uc=this.M=this.Nb=0,this.wa=Array(new zt),this.Y=0,this.ya=Array(new sa),this.aa=0,this.l=new QA}function DA(){this.y=A(16),this.f=A(8),this.ea=A(8)}function lA(){this.cb=this.a=0,this.sc="",this.m=new Ue,this.Od=new we,this.Kc=new Le,this.ed=new ut,this.Qa=new Ke,this.Ic=this.$c=this.Aa=0,this.D=new IA,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,Ue),this.ia=0,this.pb=o(4,Er),this.Pa=new qe,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new DA),this.Hd=0,this.rb=Array(new Ct),this.sb=0,this.wa=Array(new zt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new sa),this.L=this.aa=0,this.gd=s([4,2],zt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function QA(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function ba(){var f=new lA;return f!=null&&(f.a=0,f.sc="OK",f.cb=0,f.Xb=0,nu||(nu=e0)),f}function zr(f,v,E){return f.a==0&&(f.a=v,f.sc=E,f.cb=0),0}function Jf(f,v,E){return 3<=E&&f[v+0]==157&&f[v+1]==1&&f[v+2]==42}function Zf(f,v){if(f==null)return 0;if(f.a=0,f.sc="OK",v==null)return zr(f,2,"null VP8Io passed to VP8GetHeaders()");var E=v.data,k=v.w,P=v.ha;if(4>P)return zr(f,7,"Truncated header.");var V=E[k+0]|E[k+1]<<8|E[k+2]<<16,K=f.Od;if(K.Rb=!(1&V),K.td=V>>1&7,K.yd=V>>4&1,K.ub=V>>5,3<K.td)return zr(f,3,"Incorrect keyframe parameters.");if(!K.yd)return zr(f,4,"Frame not displayable.");k+=3,P-=3;var j=f.Kc;if(K.Rb){if(7>P)return zr(f,7,"cannot parse picture header");if(!Jf(E,k,P))return zr(f,3,"Bad code word");j.c=16383&(E[k+4]<<8|E[k+3]),j.Td=E[k+4]>>6,j.i=16383&(E[k+6]<<8|E[k+5]),j.Ud=E[k+6]>>6,k+=7,P-=7,f.za=j.c+15>>4,f.Ub=j.i+15>>4,v.width=j.c,v.height=j.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,a((V=f.Pa).jb,0,255,V.jb.length),e((V=f.Qa)!=null),V.Cb=0,V.Bb=0,V.Fb=1,a(V.Zb,0,0,V.Zb.length),a(V.Lb,0,0,V.Lb)}if(K.ub>P)return zr(f,7,"bad partition length");se(V=f.m,E,k,K.ub),k+=K.ub,P-=K.ub,K.Rb&&(j.Ld=W(V),j.Kd=W(V)),j=f.Qa;var J,ae=f.Pa;if(e(V!=null),e(j!=null),j.Cb=W(V),j.Cb){if(j.Bb=W(V),W(V)){for(j.Fb=W(V),J=0;4>J;++J)j.Zb[J]=W(V)?ge(V,7):0;for(J=0;4>J;++J)j.Lb[J]=W(V)?ge(V,6):0}if(j.Bb)for(J=0;3>J;++J)ae.jb[J]=W(V)?he(V,8):255}else j.Bb=0;if(V.Ka)return zr(f,3,"cannot parse segment header");if((j=f.ed).zd=W(V),j.Tb=he(V,6),j.wb=he(V,3),j.Pc=W(V),j.Pc&&W(V)){for(ae=0;4>ae;++ae)W(V)&&(j.vd[ae]=ge(V,6));for(ae=0;4>ae;++ae)W(V)&&(j.od[ae]=ge(V,6))}if(f.L=j.Tb==0?0:j.zd?1:2,V.Ka)return zr(f,3,"cannot parse filter header");var ye=P;if(P=J=k,k=J+ye,j=ye,f.Xb=(1<<he(f.m,2))-1,ye<3*(ae=f.Xb))E=7;else{for(J+=3*ae,j-=3*ae,ye=0;ye<ae;++ye){var Te=E[P+0]|E[P+1]<<8|E[P+2]<<16;Te>j&&(Te=j),se(f.Jc[+ye],E,J,Te),J+=Te,j-=Te,P+=3}se(f.Jc[+ae],E,J,j),E=J<k?0:5}if(E!=0)return zr(f,E,"cannot parse partitions");for(E=he(J=f.m,7),P=W(J)?ge(J,4):0,k=W(J)?ge(J,4):0,j=W(J)?ge(J,4):0,ae=W(J)?ge(J,4):0,J=W(J)?ge(J,4):0,ye=f.Qa,Te=0;4>Te;++Te){if(ye.Cb){var Ne=ye.Zb[Te];ye.Fb||(Ne+=E)}else{if(0<Te){f.pb[Te]=f.pb[0];continue}Ne=E}var be=f.pb[Te];be.Sc[0]=Hm[Ca(Ne+P,127)],be.Sc[1]=Vm[Ca(Ne+0,127)],be.Eb[0]=2*Hm[Ca(Ne+k,127)],be.Eb[1]=101581*Vm[Ca(Ne+j,127)]>>16,8>be.Eb[1]&&(be.Eb[1]=8),be.Qc[0]=Hm[Ca(Ne+ae,117)],be.Qc[1]=Vm[Ca(Ne+J,127)],be.lc=Ne+J}if(!K.Rb)return zr(f,4,"Not a key frame.");for(W(V),K=f.Pa,E=0;4>E;++E){for(P=0;8>P;++P)for(k=0;3>k;++k)for(j=0;11>j;++j)ae=ue(V,pie[E][P][k][j])?he(V,8):die[E][P][k][j],K.Wc[E][P].Yb[k][j]=ae;for(P=0;17>P;++P)K.Xc[E][P]=K.Wc[E][mie[P]]}return f.kc=W(V),f.kc&&(f.Bd=he(V,8)),f.cb=1}function e0(f,v,E,k,P,V,K){var j=v[P].Yb[E];for(E=0;16>P;++P){if(!ue(f,j[E+0]))return P;for(;!ue(f,j[E+1]);)if(j=v[++P].Yb[0],E=0,P==16)return 16;var J=v[P+1].Yb;if(ue(f,j[E+2])){var ae=f,ye=0;if(ue(ae,(Ne=j)[(Te=E)+3]))if(ue(ae,Ne[Te+6])){for(j=0,Te=2*(ye=ue(ae,Ne[Te+8]))+(Ne=ue(ae,Ne[Te+9+ye])),ye=0,Ne=hie[Te];Ne[j];++j)ye+=ye+ue(ae,Ne[j]);ye+=3+(8<<Te)}else ue(ae,Ne[Te+7])?(ye=7+2*ue(ae,165),ye+=ue(ae,145)):ye=5+ue(ae,159);else ye=ue(ae,Ne[Te+4])?3+ue(ae,Ne[Te+5]):2;j=J[2]}else ye=1,j=J[1];J=K+fie[P],0>(ae=f).b&&D(ae);var Te,Ne=ae.b,be=(Te=ae.Ca>>1)-(ae.I>>Ne)>>31;--ae.b,ae.Ca+=be,ae.Ca|=1,ae.I-=(Te+1&be)<<Ne,V[J]=((ye^be)-be)*k[(0<P)+0]}return 16}function Dc(f){var v=f.rb[f.sb-1];v.la=0,v.Na=0,a(f.zc,0,0,f.zc.length),f.ja=0}function gm(f,v){if(f==null)return 0;if(v==null)return zr(f,2,"NULL VP8Io parameter in VP8Decode().");if(!f.cb&&!Zf(f,v))return 0;if(e(f.cb),v.ac==null||v.ac(v)){v.ob&&(f.L=0);var E=E0[f.L];if(f.L==2?(f.yb=0,f.zb=0):(f.yb=v.v-E>>4,f.zb=v.j-E>>4,0>f.yb&&(f.yb=0),0>f.zb&&(f.zb=0)),f.Va=v.o+15+E>>4,f.Hb=v.va+15+E>>4,f.Hb>f.za&&(f.Hb=f.za),f.Va>f.Ub&&(f.Va=f.Ub),0<f.L){var k=f.ed;for(E=0;4>E;++E){var P;if(f.Qa.Cb){var V=f.Qa.Lb[E];f.Qa.Fb||(V+=k.Tb)}else V=k.Tb;for(P=0;1>=P;++P){var K=f.gd[E][P],j=V;if(k.Pc&&(j+=k.vd[0],P&&(j+=k.od[0])),0<(j=0>j?0:63<j?63:j)){var J=j;0<k.wb&&(J=4<k.wb?J>>2:J>>1)>9-k.wb&&(J=9-k.wb),1>J&&(J=1),K.dd=J,K.tc=2*j+J,K.ld=40<=j?2:15<=j?1:0}else K.tc=0;K.La=P}}}E=0}else zr(f,6,"Frame setup failed"),E=f.a;if(E=E==0){if(E){f.$c=0,0<f.Aa||(f.Ic=Tie);e:{E=f.Ic,k=4*(J=f.za);var ae=32*J,ye=J+1,Te=0<f.L?J*(0<f.Aa?2:1):0,Ne=(f.Aa==2?2:1)*J;if((K=k+832+(P=3*(16*E+E0[f.L])/2*ae)+(V=f.Fa!=null&&0<f.Fa.length?f.Kc.c*f.Kc.i:0))!=K)E=0;else{if(K>f.Vb){if(f.Vb=0,f.Ec=A(K),f.Fc=0,f.Ec==null){E=zr(f,1,"no memory during frame initialization.");break e}f.Vb=K}K=f.Ec,j=f.Fc,f.Ac=K,f.Bc=j,j+=k,f.Gd=o(ae,DA),f.Hd=0,f.rb=o(ye+1,Ct),f.sb=1,f.wa=Te?o(Te,zt):null,f.Y=0,f.D.Nb=0,f.D.wa=f.wa,f.D.Y=f.Y,0<f.Aa&&(f.D.Y+=J),e(!0),f.oc=K,f.pc=j,j+=832,f.ya=o(Ne,sa),f.aa=0,f.D.ya=f.ya,f.D.aa=f.aa,f.Aa==2&&(f.D.aa+=J),f.R=16*J,f.B=8*J,J=(ae=E0[f.L])*f.R,ae=ae/2*f.B,f.sa=K,f.ta=j+J,f.qa=f.sa,f.ra=f.ta+16*E*f.R+ae,f.Ha=f.qa,f.Ia=f.ra+8*E*f.B+ae,f.$c=0,j+=P,f.mb=V?K:null,f.nb=V?j:null,e(j+V<=f.Fc+f.Vb),Dc(f),a(f.Ac,f.Bc,0,k),E=1}}if(E){if(v.ka=0,v.y=f.sa,v.O=f.ta,v.f=f.qa,v.N=f.ra,v.ea=f.Ha,v.Vd=f.Ia,v.fa=f.R,v.Rc=f.B,v.F=null,v.J=0,!nE){for(E=-255;255>=E;++E)Z4[255+E]=0>E?-E:E;for(E=-1020;1020>=E;++E)eE[1020+E]=-128>E?-128:127<E?127:E;for(E=-112;112>=E;++E)tE[112+E]=-16>E?-16:15<E?15:E;for(E=-255;510>=E;++E)rE[255+E]=0>E?0:255<E?255:E;nE=1}gA=ym,cl=pm,Yi=r0,pA=mm,fi=n0,tu=t0,jo=Hc,ul=Ko,Wo=Nm,Ji=Vc,ru=Tm,Ma=tl,di=$c,yr=h0,vr=u0,Kr=ci,sn=Gi,gi=km,mA[0]=OA,mA[1]=vm,mA[2]=bm,mA[3]=Cm,mA[4]=i0,mA[5]=Zs,mA[6]=o0,mA[7]=Pc,mA[8]=_m,mA[9]=Em,eo[0]=a0,eo[1]=Bm,eo[2]=li,eo[3]=Ys,eo[4]=Rn,eo[5]=xm,eo[6]=A0,pi[0]=Ki,pi[1]=wm,pi[2]=Fm,pi[3]=Mc,pi[4]=zo,pi[5]=Sm,pi[6]=Rc,E=1}else E=0}E&&(E=function(be,He){for(be.M=0;be.M<be.Va;++be.M){var De,ve=be.Jc[be.M&be.Xb],Be=be.m,Me=be;for(De=0;De<Me.za;++De){var Ge=Be,Re=Me,lt=Re.Ac,nt=Re.Bc+4*De,vt=Re.zc,At=Re.ya[Re.aa+De];if(Re.Qa.Bb?At.$b=ue(Ge,Re.Pa.jb[0])?2+ue(Ge,Re.Pa.jb[2]):ue(Ge,Re.Pa.jb[1]):At.$b=0,Re.kc&&(At.Ad=ue(Ge,Re.Bd)),At.Za=!ue(Ge,145)+0,At.Za){var Zt=At.Ob,or=0;for(Re=0;4>Re;++Re){var Wt,Vt=vt[0+Re];for(Wt=0;4>Wt;++Wt){Vt=gie[lt[nt+Wt]][Vt];for(var dr=oE[ue(Ge,Vt[0])];0<dr;)dr=oE[2*dr+ue(Ge,Vt[dr])];Vt=-dr,lt[nt+Wt]=Vt}n(Zt,or,lt,nt,4),or+=4,vt[0+Re]=Vt}}else Vt=ue(Ge,156)?ue(Ge,128)?1:3:ue(Ge,163)?2:0,At.Ob[0]=Vt,a(lt,nt,Vt,4),a(vt,0,Vt,4);At.Dd=ue(Ge,142)?ue(Ge,114)?ue(Ge,183)?1:3:2:0}if(Me.m.Ka)return zr(be,7,"Premature end-of-partition0 encountered.");for(;be.ja<be.za;++be.ja){if(Me=ve,Ge=(Be=be).rb[Be.sb-1],lt=Be.rb[Be.sb+Be.ja],De=Be.ya[Be.aa+Be.ja],nt=Be.kc?De.Ad:0)Ge.la=lt.la=0,De.Za||(Ge.Na=lt.Na=0),De.Hc=0,De.Gc=0,De.ia=0;else{var ur,Dt;if(Ge=lt,lt=Me,nt=Be.Pa.Xc,vt=Be.ya[Be.aa+Be.ja],At=Be.pb[vt.$b],Re=vt.ad,Zt=0,or=Be.rb[Be.sb-1],Vt=Wt=0,a(Re,Zt,0,384),vt.Za)var en=0,ha=nt[3];else{dr=A(16);var tn=Ge.Na+or.Na;if(tn=nu(lt,nt[1],tn,At.Eb,0,dr,0),Ge.Na=or.Na=(0<tn)+0,1<tn)gA(dr,0,Re,Zt);else{var fa=dr[0]+3>>3;for(dr=0;256>dr;dr+=16)Re[Zt+dr]=fa}en=1,ha=nt[0]}var sr=15&Ge.la,_a=15&or.la;for(dr=0;4>dr;++dr){var Fa=1&_a;for(fa=Dt=0;4>fa;++fa)sr=sr>>1|(Fa=(tn=nu(lt,ha,tn=Fa+(1&sr),At.Sc,en,Re,Zt))>en)<<7,Dt=Dt<<2|(3<tn?3:1<tn?2:Re[Zt+0]!=0),Zt+=16;sr>>=4,_a=_a>>1|Fa<<7,Wt=(Wt<<8|Dt)>>>0}for(ha=sr,en=_a>>4,ur=0;4>ur;ur+=2){for(Dt=0,sr=Ge.la>>4+ur,_a=or.la>>4+ur,dr=0;2>dr;++dr){for(Fa=1&_a,fa=0;2>fa;++fa)tn=Fa+(1&sr),sr=sr>>1|(Fa=0<(tn=nu(lt,nt[2],tn,At.Qc,0,Re,Zt)))<<3,Dt=Dt<<2|(3<tn?3:1<tn?2:Re[Zt+0]!=0),Zt+=16;sr>>=2,_a=_a>>1|Fa<<5}Vt|=Dt<<4*ur,ha|=sr<<4<<ur,en|=(240&_a)<<ur}Ge.la=ha,or.la=en,vt.Hc=Wt,vt.Gc=Vt,vt.ia=43690&Vt?0:At.ia,nt=!(Wt|Vt)}if(0<Be.L&&(Be.wa[Be.Y+Be.ja]=Be.gd[De.$b][De.Za],Be.wa[Be.Y+Be.ja].La|=!nt),Me.Ka)return zr(be,7,"Premature end-of-file encountered.")}if(Dc(be),Be=He,Me=1,De=(ve=be).D,Ge=0<ve.L&&ve.M>=ve.zb&&ve.M<=ve.Va,ve.Aa==0)e:{if(De.M=ve.M,De.uc=Ge,Xc(ve,De),Me=1,De=(Dt=ve.D).Nb,Ge=(Vt=E0[ve.L])*ve.R,lt=Vt/2*ve.B,dr=16*De*ve.R,fa=8*De*ve.B,nt=ve.sa,vt=ve.ta-Ge+dr,At=ve.qa,Re=ve.ra-lt+fa,Zt=ve.Ha,or=ve.Ia-lt+fa,_a=(sr=Dt.M)==0,Wt=sr>=ve.Va-1,ve.Aa==2&&Xc(ve,Dt),Dt.uc)for(Fa=(tn=ve).D.M,e(tn.D.uc),Dt=tn.yb;Dt<tn.Hb;++Dt){en=Dt,ha=Fa;var pn=(Sn=(Qr=tn).D).Nb;ur=Qr.R;var Sn=Sn.wa[Sn.Y+en],Jn=Qr.sa,Va=Qr.ta+16*pn*ur+16*en,MA=Sn.dd,mn=Sn.tc;if(mn!=0)if(e(3<=mn),Qr.L==1)0<en&&Kr(Jn,Va,ur,mn+4),Sn.La&&gi(Jn,Va,ur,mn),0<ha&&vr(Jn,Va,ur,mn+4),Sn.La&&sn(Jn,Va,ur,mn);else{var mi=Qr.B,Xo=Qr.qa,fl=Qr.ra+8*pn*mi+8*en,ro=Qr.Ha,Qr=Qr.Ia+8*pn*mi+8*en;pn=Sn.ld,0<en&&(ul(Jn,Va,ur,mn+4,MA,pn),Ji(Xo,fl,ro,Qr,mi,mn+4,MA,pn)),Sn.La&&(Ma(Jn,Va,ur,mn,MA,pn),yr(Xo,fl,ro,Qr,mi,mn,MA,pn)),0<ha&&(jo(Jn,Va,ur,mn+4,MA,pn),Wo(Xo,fl,ro,Qr,mi,mn+4,MA,pn)),Sn.La&&(ru(Jn,Va,ur,mn,MA,pn),di(Xo,fl,ro,Qr,mi,mn,MA,pn))}}if(ve.ia&&alert("todo:DitherRow"),Be.put!=null){if(Dt=16*sr,sr=16*(sr+1),_a?(Be.y=ve.sa,Be.O=ve.ta+dr,Be.f=ve.qa,Be.N=ve.ra+fa,Be.ea=ve.Ha,Be.W=ve.Ia+fa):(Dt-=Vt,Be.y=nt,Be.O=vt,Be.f=At,Be.N=Re,Be.ea=Zt,Be.W=or),Wt||(sr-=Vt),sr>Be.o&&(sr=Be.o),Be.F=null,Be.J=null,ve.Fa!=null&&0<ve.Fa.length&&Dt<sr&&(Be.J=jc(ve,Be,Dt,sr-Dt),Be.F=ve.mb,Be.F==null&&Be.F.length==0)){Me=zr(ve,3,"Could not decode alpha data.");break e}Dt<Be.j&&(Vt=Be.j-Dt,Dt=Be.j,e(!(1&Vt)),Be.O+=ve.R*Vt,Be.N+=ve.B*(Vt>>1),Be.W+=ve.B*(Vt>>1),Be.F!=null&&(Be.J+=Be.width*Vt)),Dt<sr&&(Be.O+=Be.v,Be.N+=Be.v>>1,Be.W+=Be.v>>1,Be.F!=null&&(Be.J+=Be.v),Be.ka=Dt-Be.j,Be.U=Be.va-Be.v,Be.T=sr-Dt,Me=Be.put(Be))}De+1!=ve.Ic||Wt||(n(ve.sa,ve.ta-Ge,nt,vt+16*ve.R,Ge),n(ve.qa,ve.ra-lt,At,Re+8*ve.B,lt),n(ve.Ha,ve.Ia-lt,Zt,or+8*ve.B,lt))}if(!Me)return zr(be,6,"Output aborted.")}return 1}(f,v)),v.bc!=null&&v.bc(v),E&=1}return E?(f.cb=0,E):0}function cA(f,v,E,k,P){P=f[v+E+32*k]+(P>>3),f[v+E+32*k]=-256&P?0>P?0:255:P}function qs(f,v,E,k,P,V){cA(f,v,0,E,k+P),cA(f,v,1,E,k+V),cA(f,v,2,E,k-V),cA(f,v,3,E,k-P)}function la(f){return(20091*f>>16)+f}function Qc(f,v,E,k){var P,V=0,K=A(16);for(P=0;4>P;++P){var j=f[v+0]+f[v+8],J=f[v+0]-f[v+8],ae=(35468*f[v+4]>>16)-la(f[v+12]),ye=la(f[v+4])+(35468*f[v+12]>>16);K[V+0]=j+ye,K[V+1]=J+ae,K[V+2]=J-ae,K[V+3]=j-ye,V+=4,v++}for(P=V=0;4>P;++P)j=(f=K[V+0]+4)+K[V+8],J=f-K[V+8],ae=(35468*K[V+4]>>16)-la(K[V+12]),cA(E,k,0,0,j+(ye=la(K[V+4])+(35468*K[V+12]>>16))),cA(E,k,1,0,J+ae),cA(E,k,2,0,J-ae),cA(E,k,3,0,j-ye),V++,k+=32}function t0(f,v,E,k){var P=f[v+0]+4,V=35468*f[v+4]>>16,K=la(f[v+4]),j=35468*f[v+1]>>16;qs(E,k,0,P+K,f=la(f[v+1]),j),qs(E,k,1,P+V,f,j),qs(E,k,2,P-V,f,j),qs(E,k,3,P-K,f,j)}function pm(f,v,E,k,P){Qc(f,v,E,k),P&&Qc(f,v+16,E,k+4)}function r0(f,v,E,k){cl(f,v+0,E,k,1),cl(f,v+32,E,k+128,1)}function mm(f,v,E,k){var P;for(f=f[v+0]+4,P=0;4>P;++P)for(v=0;4>v;++v)cA(E,k,v,P,f)}function n0(f,v,E,k){f[v+0]&&pA(f,v+0,E,k),f[v+16]&&pA(f,v+16,E,k+4),f[v+32]&&pA(f,v+32,E,k+128),f[v+48]&&pA(f,v+48,E,k+128+4)}function ym(f,v,E,k){var P,V=A(16);for(P=0;4>P;++P){var K=f[v+0+P]+f[v+12+P],j=f[v+4+P]+f[v+8+P],J=f[v+4+P]-f[v+8+P],ae=f[v+0+P]-f[v+12+P];V[0+P]=K+j,V[8+P]=K-j,V[4+P]=ae+J,V[12+P]=ae-J}for(P=0;4>P;++P)K=(f=V[0+4*P]+3)+V[3+4*P],j=V[1+4*P]+V[2+4*P],J=V[1+4*P]-V[2+4*P],ae=f-V[3+4*P],E[k+0]=K+j>>3,E[k+16]=ae+J>>3,E[k+32]=K-j>>3,E[k+48]=ae-J>>3,k+=64}function Oc(f,v,E){var k,P=v-32,V=Ea,K=255-f[P-1];for(k=0;k<E;++k){var j,J=V,ae=K+f[v-1];for(j=0;j<E;++j)f[v+j]=J[ae+f[P+j]];v+=32}}function vm(f,v){Oc(f,v,4)}function wm(f,v){Oc(f,v,8)}function Bm(f,v){Oc(f,v,16)}function li(f,v){var E;for(E=0;16>E;++E)n(f,v+32*E,f,v-32,16)}function Ys(f,v){var E;for(E=16;0<E;--E)a(f,v,f[v-1],16),v+=32}function Js(f,v,E){var k;for(k=0;16>k;++k)a(v,E+32*k,f,16)}function a0(f,v){var E,k=16;for(E=0;16>E;++E)k+=f[v-1+32*E]+f[v+E-32];Js(k>>5,f,v)}function Rn(f,v){var E,k=8;for(E=0;16>E;++E)k+=f[v-1+32*E];Js(k>>4,f,v)}function xm(f,v){var E,k=8;for(E=0;16>E;++E)k+=f[v+E-32];Js(k>>4,f,v)}function A0(f,v){Js(128,f,v)}function Ft(f,v,E){return f+2*v+E+2>>2}function bm(f,v){var E,k=v-32;for(k=new Uint8Array([Ft(f[k-1],f[k+0],f[k+1]),Ft(f[k+0],f[k+1],f[k+2]),Ft(f[k+1],f[k+2],f[k+3]),Ft(f[k+2],f[k+3],f[k+4])]),E=0;4>E;++E)n(f,v+32*E,k,0,k.length)}function Cm(f,v){var E=f[v-1],k=f[v-1+32],P=f[v-1+64],V=f[v-1+96];Ce(f,v+0,16843009*Ft(f[v-1-32],E,k)),Ce(f,v+32,16843009*Ft(E,k,P)),Ce(f,v+64,16843009*Ft(k,P,V)),Ce(f,v+96,16843009*Ft(P,V,V))}function OA(f,v){var E,k=4;for(E=0;4>E;++E)k+=f[v+E-32]+f[v-1+32*E];for(k>>=3,E=0;4>E;++E)a(f,v+32*E,k,4)}function i0(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1-32],K=f[v+0-32],j=f[v+1-32],J=f[v+2-32],ae=f[v+3-32];f[v+0+96]=Ft(k,P,f[v-1+96]),f[v+1+96]=f[v+0+64]=Ft(E,k,P),f[v+2+96]=f[v+1+64]=f[v+0+32]=Ft(V,E,k),f[v+3+96]=f[v+2+64]=f[v+1+32]=f[v+0+0]=Ft(K,V,E),f[v+3+64]=f[v+2+32]=f[v+1+0]=Ft(j,K,V),f[v+3+32]=f[v+2+0]=Ft(J,j,K),f[v+3+0]=Ft(ae,J,j)}function o0(f,v){var E=f[v+1-32],k=f[v+2-32],P=f[v+3-32],V=f[v+4-32],K=f[v+5-32],j=f[v+6-32],J=f[v+7-32];f[v+0+0]=Ft(f[v+0-32],E,k),f[v+1+0]=f[v+0+32]=Ft(E,k,P),f[v+2+0]=f[v+1+32]=f[v+0+64]=Ft(k,P,V),f[v+3+0]=f[v+2+32]=f[v+1+64]=f[v+0+96]=Ft(P,V,K),f[v+3+32]=f[v+2+64]=f[v+1+96]=Ft(V,K,j),f[v+3+64]=f[v+2+96]=Ft(K,j,J),f[v+3+96]=Ft(j,J,J)}function Zs(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1-32],K=f[v+0-32],j=f[v+1-32],J=f[v+2-32],ae=f[v+3-32];f[v+0+0]=f[v+1+64]=V+K+1>>1,f[v+1+0]=f[v+2+64]=K+j+1>>1,f[v+2+0]=f[v+3+64]=j+J+1>>1,f[v+3+0]=J+ae+1>>1,f[v+0+96]=Ft(P,k,E),f[v+0+64]=Ft(k,E,V),f[v+0+32]=f[v+1+96]=Ft(E,V,K),f[v+1+32]=f[v+2+96]=Ft(V,K,j),f[v+2+32]=f[v+3+96]=Ft(K,j,J),f[v+3+32]=Ft(j,J,ae)}function Pc(f,v){var E=f[v+0-32],k=f[v+1-32],P=f[v+2-32],V=f[v+3-32],K=f[v+4-32],j=f[v+5-32],J=f[v+6-32],ae=f[v+7-32];f[v+0+0]=E+k+1>>1,f[v+1+0]=f[v+0+64]=k+P+1>>1,f[v+2+0]=f[v+1+64]=P+V+1>>1,f[v+3+0]=f[v+2+64]=V+K+1>>1,f[v+0+32]=Ft(E,k,P),f[v+1+32]=f[v+0+96]=Ft(k,P,V),f[v+2+32]=f[v+1+96]=Ft(P,V,K),f[v+3+32]=f[v+2+96]=Ft(V,K,j),f[v+3+64]=Ft(K,j,J),f[v+3+96]=Ft(j,J,ae)}function Em(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1+96];f[v+0+0]=E+k+1>>1,f[v+2+0]=f[v+0+32]=k+P+1>>1,f[v+2+32]=f[v+0+64]=P+V+1>>1,f[v+1+0]=Ft(E,k,P),f[v+3+0]=f[v+1+32]=Ft(k,P,V),f[v+3+32]=f[v+1+64]=Ft(P,V,V),f[v+3+64]=f[v+2+64]=f[v+0+96]=f[v+1+96]=f[v+2+96]=f[v+3+96]=V}function _m(f,v){var E=f[v-1+0],k=f[v-1+32],P=f[v-1+64],V=f[v-1+96],K=f[v-1-32],j=f[v+0-32],J=f[v+1-32],ae=f[v+2-32];f[v+0+0]=f[v+2+32]=E+K+1>>1,f[v+0+32]=f[v+2+64]=k+E+1>>1,f[v+0+64]=f[v+2+96]=P+k+1>>1,f[v+0+96]=V+P+1>>1,f[v+3+0]=Ft(j,J,ae),f[v+2+0]=Ft(K,j,J),f[v+1+0]=f[v+3+32]=Ft(E,K,j),f[v+1+32]=f[v+3+64]=Ft(k,E,K),f[v+1+64]=f[v+3+96]=Ft(P,k,E),f[v+1+96]=Ft(V,P,k)}function Fm(f,v){var E;for(E=0;8>E;++E)n(f,v+32*E,f,v-32,8)}function Mc(f,v){var E;for(E=0;8>E;++E)a(f,v,f[v-1],8),v+=32}function $o(f,v,E){var k;for(k=0;8>k;++k)a(v,E+32*k,f,8)}function Ki(f,v){var E,k=8;for(E=0;8>E;++E)k+=f[v+E-32]+f[v-1+32*E];$o(k>>4,f,v)}function Sm(f,v){var E,k=4;for(E=0;8>E;++E)k+=f[v+E-32];$o(k>>3,f,v)}function zo(f,v){var E,k=4;for(E=0;8>E;++E)k+=f[v-1+32*E];$o(k>>3,f,v)}function Rc(f,v){$o(128,f,v)}function el(f,v,E){var k=f[v-E],P=f[v+0],V=3*(P-k)+Qm[1020+f[v-2*E]-f[v+E]],K=m0[112+(V+4>>3)];f[v-E]=Ea[255+k+m0[112+(V+3>>3)]],f[v+0]=Ea[255+P-K]}function s0(f,v,E,k){var P=f[v+0],V=f[v+E];return Ra[255+f[v-2*E]-f[v-E]]>k||Ra[255+V-P]>k}function l0(f,v,E,k){return 4*Ra[255+f[v-E]-f[v+0]]+Ra[255+f[v-2*E]-f[v+E]]<=k}function c0(f,v,E,k,P){var V=f[v-3*E],K=f[v-2*E],j=f[v-E],J=f[v+0],ae=f[v+E],ye=f[v+2*E],Te=f[v+3*E];return 4*Ra[255+j-J]+Ra[255+K-ae]>k?0:Ra[255+f[v-4*E]-V]<=P&&Ra[255+V-K]<=P&&Ra[255+K-j]<=P&&Ra[255+Te-ye]<=P&&Ra[255+ye-ae]<=P&&Ra[255+ae-J]<=P}function u0(f,v,E,k){var P=2*k+1;for(k=0;16>k;++k)l0(f,v+k,E,P)&&el(f,v+k,E)}function ci(f,v,E,k){var P=2*k+1;for(k=0;16>k;++k)l0(f,v+k*E,1,P)&&el(f,v+k*E,1)}function Gi(f,v,E,k){var P;for(P=3;0<P;--P)u0(f,v+=4*E,E,k)}function km(f,v,E,k){var P;for(P=3;0<P;--P)ci(f,v+=4,E,k)}function ji(f,v,E,k,P,V,K,j){for(V=2*V+1;0<P--;){if(c0(f,v,E,V,K))if(s0(f,v,E,j))el(f,v,E);else{var J=f,ae=v,ye=E,Te=J[ae-2*ye],Ne=J[ae-ye],be=J[ae+0],He=J[ae+ye],De=J[ae+2*ye],ve=27*(Me=Qm[1020+3*(be-Ne)+Qm[1020+Te-He]])+63>>7,Be=18*Me+63>>7,Me=9*Me+63>>7;J[ae-3*ye]=Ea[255+J[ae-3*ye]+Me],J[ae-2*ye]=Ea[255+Te+Be],J[ae-ye]=Ea[255+Ne+ve],J[ae+0]=Ea[255+be-ve],J[ae+ye]=Ea[255+He-Be],J[ae+2*ye]=Ea[255+De-Me]}v+=k}}function uA(f,v,E,k,P,V,K,j){for(V=2*V+1;0<P--;){if(c0(f,v,E,V,K))if(s0(f,v,E,j))el(f,v,E);else{var J=f,ae=v,ye=E,Te=J[ae-ye],Ne=J[ae+0],be=J[ae+ye],He=m0[112+((De=3*(Ne-Te))+4>>3)],De=m0[112+(De+3>>3)],ve=He+1>>1;J[ae-2*ye]=Ea[255+J[ae-2*ye]+ve],J[ae-ye]=Ea[255+Te+De],J[ae+0]=Ea[255+Ne-He],J[ae+ye]=Ea[255+be-ve]}v+=k}}function Hc(f,v,E,k,P,V){ji(f,v,E,1,16,k,P,V)}function Ko(f,v,E,k,P,V){ji(f,v,1,E,16,k,P,V)}function Tm(f,v,E,k,P,V){var K;for(K=3;0<K;--K)uA(f,v+=4*E,E,1,16,k,P,V)}function tl(f,v,E,k,P,V){var K;for(K=3;0<K;--K)uA(f,v+=4,1,E,16,k,P,V)}function Nm(f,v,E,k,P,V,K,j){ji(f,v,P,1,8,V,K,j),ji(E,k,P,1,8,V,K,j)}function Vc(f,v,E,k,P,V,K,j){ji(f,v,1,P,8,V,K,j),ji(E,k,1,P,8,V,K,j)}function $c(f,v,E,k,P,V,K,j){uA(f,v+4*P,P,1,8,V,K,j),uA(E,k+4*P,P,1,8,V,K,j)}function h0(f,v,E,k,P,V,K,j){uA(f,v+4,1,P,8,V,K,j),uA(E,k+4,1,P,8,V,K,j)}function rl(){this.ba=new on,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Gt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function zc(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Kc(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function f0(){this.ua=0,this.Wa=new te,this.vb=new te,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Y,this.yc=new L}function Lm(){this.xb=this.a=0,this.l=new QA,this.ca=new on,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new b,this.Pb=0,this.wd=new b,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new f0,this.ab=0,this.gc=o(4,Kc),this.Oc=0}function nl(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new QA,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Go(f,v,E,k,P,V,K){for(f=f==null?0:f[v+0],v=0;v<K;++v)P[V+v]=f+E[k+v]&255,f=P[V+v]}function Gc(f,v,E,k,P,V,K){var j;if(f==null)Go(null,null,E,k,P,V,K);else for(j=0;j<K;++j)P[V+j]=f[v+j]+E[k+j]&255}function Wi(f,v,E,k,P,V,K){if(f==null)Go(null,null,E,k,P,V,K);else{var j,J=f[v+0],ae=J,ye=J;for(j=0;j<K;++j)ae=ye+(J=f[v+j])-ae,ye=E[k+j]+(-256&ae?0>ae?0:255:ae)&255,ae=J,P[V+j]=ye}}function jc(f,v,E,k){var P=v.width,V=v.o;if(e(f!=null&&v!=null),0>E||0>=k||E+k>V)return null;if(!f.Cc){if(f.ga==null){var K;if(f.ga=new nl,(K=f.ga==null)||(K=v.width*v.o,e(f.Gb.length==0),f.Gb=A(K),f.Uc=0,f.Gb==null?K=0:(f.mb=f.Gb,f.nb=f.Uc,f.rc=null,K=1),K=!K),!K){K=f.ga;var j=f.Fa,J=f.P,ae=f.qc,ye=f.mb,Te=f.nb,Ne=J+1,be=ae-1,He=K.l;if(e(j!=null&&ye!=null&&v!=null),to[0]=null,to[1]=Go,to[2]=Gc,to[3]=Wi,K.ca=ye,K.tb=Te,K.c=v.width,K.i=v.height,e(0<K.c&&0<K.i),1>=ae)v=0;else if(K.$a=j[J+0]>>0&3,K.Z=j[J+0]>>2&3,K.Lc=j[J+0]>>4&3,J=j[J+0]>>6&3,0>K.$a||1<K.$a||4<=K.Z||1<K.Lc||J)v=0;else if(He.put=Yn,He.ac=Ir,He.bc=oa,He.ma=K,He.width=v.width,He.height=v.height,He.Da=v.Da,He.v=v.v,He.va=v.va,He.j=v.j,He.o=v.o,K.$a)e:{e(K.$a==1),v=Ie();t:for(;;){if(v==null){v=0;break e}if(e(K!=null),K.mc=v,v.c=K.c,v.i=K.i,v.l=K.l,v.l.ma=K,v.l.width=K.c,v.l.height=K.i,v.a=0,re(v.m,j,Ne,be),!Fe(K.c,K.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&Z(v.s)?(K.ic=1,j=v.c*v.i,v.Ta=null,v.Ua=0,v.V=A(j),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(K.ic=0,v=pe(v,K.c)),!v))break t;v=1;break e}K.mc=null,v=0}else v=be>=K.c*K.i;K=!v}if(K)return null;f.ga.Lc!=1?f.Ga=0:k=V-E}e(f.ga!=null),e(E+k<=V);e:{if(v=(j=f.ga).c,V=j.l.o,j.$a==0){if(Ne=f.rc,be=f.Vc,He=f.Fa,J=f.P+1+E*v,ae=f.mb,ye=f.nb+E*v,e(J<=f.P+f.qc),j.Z!=0)for(e(to[j.Z]!=null),K=0;K<k;++K)to[j.Z](Ne,be,He,J,ae,ye,v),Ne=ae,be=ye,ye+=v,J+=v;else for(K=0;K<k;++K)n(ae,ye,He,J,v),Ne=ae,be=ye,ye+=v,J+=v;f.rc=Ne,f.Vc=be}else{if(e(j.mc!=null),v=E+k,e((K=j.mc)!=null),e(v<=K.i),K.C>=v)v=1;else if(j.ic||_e(),j.ic){j=K.V,Ne=K.Ba,be=K.c;var De=K.i,ve=(He=1,J=K.$/be,ae=K.$%be,ye=K.m,Te=K.s,K.$),Be=be*De,Me=be*v,Ge=Te.wc,Re=ve<Me?br(Te,ae,J):null;e(ve<=Be),e(v<=De),e(Z(Te));t:for(;;){for(;!ye.h&&ve<Me;){if(ae&Ge||(Re=br(Te,ae,J)),e(Re!=null),S(ye),256>(De=mr(Re.G[0],Re.H[0],ye)))j[Ne+ve]=De,++ve,++ae>=be&&(ae=0,++J<=v&&!(J%16)&&Ae(K,J));else{if(!(280>De)){He=0;break t}De=Fn(De-256,ye);var lt,nt=mr(Re.G[4],Re.H[4],ye);if(S(ye),!(ve>=(nt=Mn(be,nt=Fn(nt,ye)))&&Be-ve>=De)){He=0;break t}for(lt=0;lt<De;++lt)j[Ne+ve+lt]=j[Ne+ve+lt-nt];for(ve+=De,ae+=De;ae>=be;)ae-=be,++J<=v&&!(J%16)&&Ae(K,J);ve<Me&&ae&Ge&&(Re=br(Te,ae,J))}e(ye.h==B(ye))}Ae(K,J>v?v:J);break t}!He||ye.h&&ve<Be?(He=0,K.a=ye.h?5:3):K.$=ve,v=He}else v=oe(K,K.V,K.Ba,K.c,K.i,v,X);if(!v){k=0;break e}}E+k>=V&&(f.Cc=1),k=1}if(!k)return null;if(f.Cc&&((k=f.ga)!=null&&(k.mc=null),f.ga=null,0<f.Ga))return alert("todo:WebPDequantizeLevels"),null}return f.nb+E*P}function C(f,v,E,k,P,V){for(;0<P--;){var K,j=f,J=v+(E?1:0),ae=f,ye=v+(E?0:3);for(K=0;K<k;++K){var Te=ae[ye+4*K];Te!=255&&(Te*=32897,j[J+4*K+0]=j[J+4*K+0]*Te>>23,j[J+4*K+1]=j[J+4*K+1]*Te>>23,j[J+4*K+2]=j[J+4*K+2]*Te>>23)}v+=V}}function M(f,v,E,k,P){for(;0<k--;){var V;for(V=0;V<E;++V){var K=f[v+2*V+0],j=15&(ae=f[v+2*V+1]),J=4369*j,ae=(240&ae|ae>>4)*J>>16;f[v+2*V+0]=(240&K|K>>4)*J>>16&240|(15&K|K<<4)*J>>16>>4&15,f[v+2*V+1]=240&ae|j}v+=P}}function ce(f,v,E,k,P,V,K,j){var J,ae,ye=255;for(ae=0;ae<P;++ae){for(J=0;J<k;++J){var Te=f[v+J];V[K+4*J]=Te,ye&=Te}v+=E,K+=j}return ye!=255}function me(f,v,E,k,P){var V;for(V=0;V<P;++V)E[k+V]=f[v+V]>>8}function _e(){Zi=C,hl=M,p0=ce,J4=me}function Qe(f,v,E){U[f]=function(k,P,V,K,j,J,ae,ye,Te,Ne,be,He,De,ve,Be,Me,Ge){var Re,lt=Ge-1>>1,nt=j[J+0]|ae[ye+0]<<16,vt=Te[Ne+0]|be[He+0]<<16;e(k!=null);var At=3*nt+vt+131074>>2;for(v(k[P+0],255&At,At>>16,De,ve),V!=null&&(At=3*vt+nt+131074>>2,v(V[K+0],255&At,At>>16,Be,Me)),Re=1;Re<=lt;++Re){var Zt=j[J+Re]|ae[ye+Re]<<16,or=Te[Ne+Re]|be[He+Re]<<16,Wt=nt+Zt+vt+or+524296,Vt=Wt+2*(Zt+vt)>>3;At=Vt+nt>>1,nt=(Wt=Wt+2*(nt+or)>>3)+Zt>>1,v(k[P+2*Re-1],255&At,At>>16,De,ve+(2*Re-1)*E),v(k[P+2*Re-0],255&nt,nt>>16,De,ve+(2*Re-0)*E),V!=null&&(At=Wt+vt>>1,nt=Vt+or>>1,v(V[K+2*Re-1],255&At,At>>16,Be,Me+(2*Re-1)*E),v(V[K+2*Re+0],255&nt,nt>>16,Be,Me+(2*Re+0)*E)),nt=Zt,vt=or}1&Ge||(At=3*nt+vt+131074>>2,v(k[P+Ge-1],255&At,At>>16,De,ve+(Ge-1)*E),V!=null&&(At=3*vt+nt+131074>>2,v(V[K+Ge-1],255&At,At>>16,Be,Me+(Ge-1)*E)))}}function Xe(){Ha[y0]=vie,Ha[v0]=lE,Ha[aE]=wie,Ha[w0]=cE,Ha[B0]=uE,Ha[Om]=hE,Ha[AE]=Bie,Ha[Pm]=lE,Ha[Mm]=cE,Ha[x0]=uE,Ha[Rm]=hE}function st(f){return f&~xie?0>f?0:255:f>>fE}function mt(f,v){return st((19077*f>>8)+(26149*v>>8)-14234)}function Ut(f,v,E){return st((19077*f>>8)-(6419*v>>8)-(13320*E>>8)+8708)}function Mt(f,v){return st((19077*f>>8)+(33050*v>>8)-17685)}function jt(f,v,E,k,P){k[P+0]=mt(f,E),k[P+1]=Ut(f,v,E),k[P+2]=Mt(f,v)}function Fr(f,v,E,k,P){k[P+0]=Mt(f,v),k[P+1]=Ut(f,v,E),k[P+2]=mt(f,E)}function Dr(f,v,E,k,P){var V=Ut(f,v,E);v=V<<3&224|Mt(f,v)>>3,k[P+0]=248&mt(f,E)|V>>5,k[P+1]=v}function Zr(f,v,E,k,P){var V=240&Mt(f,v)|15;k[P+0]=240&mt(f,E)|Ut(f,v,E)>>4,k[P+1]=V}function Hn(f,v,E,k,P){k[P+0]=255,jt(f,v,E,k,P+1)}function gn(f,v,E,k,P){Fr(f,v,E,k,P),k[P+3]=255}function hA(f,v,E,k,P){jt(f,v,E,k,P),k[P+3]=255}function Ca(f,v){return 0>f?0:f>v?v:f}function ui(f,v,E){U[f]=function(k,P,V,K,j,J,ae,ye,Te){for(var Ne=ye+(-2&Te)*E;ye!=Ne;)v(k[P+0],V[K+0],j[J+0],ae,ye),v(k[P+1],V[K+0],j[J+0],ae,ye+E),P+=2,++K,++J,ye+=2*E;1&Te&&v(k[P+0],V[K+0],j[J+0],ae,ye)}}function d0(f,v,E){return E==0?f==0?v==0?6:5:v==0?4:0:E}function Wc(f,v,E,k,P){switch(f>>>30){case 3:cl(v,E,k,P,0);break;case 2:tu(v,E,k,P);break;case 1:pA(v,E,k,P)}}function Xc(f,v){var E,k,P=v.M,V=v.Nb,K=f.oc,j=f.pc+40,J=f.oc,ae=f.pc+584,ye=f.oc,Te=f.pc+600;for(E=0;16>E;++E)K[j+32*E-1]=129;for(E=0;8>E;++E)J[ae+32*E-1]=129,ye[Te+32*E-1]=129;for(0<P?K[j-1-32]=J[ae-1-32]=ye[Te-1-32]=129:(a(K,j-32-1,127,21),a(J,ae-32-1,127,9),a(ye,Te-32-1,127,9)),k=0;k<f.za;++k){var Ne=v.ya[v.aa+k];if(0<k){for(E=-1;16>E;++E)n(K,j+32*E-4,K,j+32*E+12,4);for(E=-1;8>E;++E)n(J,ae+32*E-4,J,ae+32*E+4,4),n(ye,Te+32*E-4,ye,Te+32*E+4,4)}var be=f.Gd,He=f.Hd+k,De=Ne.ad,ve=Ne.Hc;if(0<P&&(n(K,j-32,be[He].y,0,16),n(J,ae-32,be[He].f,0,8),n(ye,Te-32,be[He].ea,0,8)),Ne.Za){var Be=K,Me=j-32+16;for(0<P&&(k>=f.za-1?a(Be,Me,be[He].y[15],4):n(Be,Me,be[He+1].y,0,4)),E=0;4>E;E++)Be[Me+128+E]=Be[Me+256+E]=Be[Me+384+E]=Be[Me+0+E];for(E=0;16>E;++E,ve<<=2)Be=K,Me=j+gE[E],mA[Ne.Ob[E]](Be,Me),Wc(ve,De,16*+E,Be,Me)}else if(Be=d0(k,P,Ne.Ob[0]),eo[Be](K,j),ve!=0)for(E=0;16>E;++E,ve<<=2)Wc(ve,De,16*+E,K,j+gE[E]);for(E=Ne.Gc,Be=d0(k,P,Ne.Dd),pi[Be](J,ae),pi[Be](ye,Te),ve=De,Be=J,Me=ae,255&(Ne=E>>0)&&(170&Ne?Yi(ve,256,Be,Me):fi(ve,256,Be,Me)),Ne=ye,ve=Te,255&(E>>=8)&&(170&E?Yi(De,320,Ne,ve):fi(De,320,Ne,ve)),P<f.Ub-1&&(n(be[He].y,0,K,j+480,16),n(be[He].f,0,J,ae+224,8),n(be[He].ea,0,ye,Te+224,8)),E=8*V*f.B,be=f.sa,He=f.ta+16*k+16*V*f.R,De=f.qa,Ne=f.ra+8*k+E,ve=f.Ha,Be=f.Ia+8*k+E,E=0;16>E;++E)n(be,He+E*f.R,K,j+32*E,16);for(E=0;8>E;++E)n(De,Ne+E*f.B,J,ae+32*E,8),n(ve,Be+E*f.B,ye,Te+32*E,8)}}function al(f,v,E,k,P,V,K,j,J){var ae=[0],ye=[0],Te=0,Ne=J!=null?J.kd:0,be=J??new zc;if(f==null||12>E)return 7;be.data=f,be.w=v,be.ha=E,v=[v],E=[E],be.gb=[be.gb];e:{var He=v,De=E,ve=be.gb;if(e(f!=null),e(De!=null),e(ve!=null),ve[0]=0,12<=De[0]&&!r(f,He[0],"RIFF")){if(r(f,He[0]+8,"WEBP")){ve=3;break e}var Be=ne(f,He[0]+4);if(12>Be||4294967286<Be){ve=3;break e}if(Ne&&Be>De[0]-8){ve=7;break e}ve[0]=Be,He[0]+=12,De[0]-=12}ve=0}if(ve!=0)return ve;for(Be=0<be.gb[0],E=E[0];;){e:{var Me=f;De=v,ve=E;var Ge=ae,Re=ye,lt=He=[0];if((At=Te=[Te])[0]=0,8>ve[0])ve=7;else{if(!r(Me,De[0],"VP8X")){if(ne(Me,De[0]+4)!=10){ve=3;break e}if(18>ve[0]){ve=7;break e}var nt=ne(Me,De[0]+8),vt=1+ke(Me,De[0]+12);if(2147483648<=vt*(Me=1+ke(Me,De[0]+15))){ve=3;break e}lt!=null&&(lt[0]=nt),Ge!=null&&(Ge[0]=vt),Re!=null&&(Re[0]=Me),De[0]+=18,ve[0]-=18,At[0]=1}ve=0}}if(Te=Te[0],He=He[0],ve!=0)return ve;if(De=!!(2&He),!Be&&Te)return 3;if(V!=null&&(V[0]=!!(16&He)),K!=null&&(K[0]=De),j!=null&&(j[0]=0),K=ae[0],He=ye[0],Te&&De&&J==null){ve=0;break}if(4>E){ve=7;break}if(Be&&Te||!Be&&!Te&&!r(f,v[0],"ALPH")){E=[E],be.na=[be.na],be.P=[be.P],be.Sa=[be.Sa];e:{nt=f,ve=v,Be=E;var At=be.gb;Ge=be.na,Re=be.P,lt=be.Sa,vt=22,e(nt!=null),e(Be!=null),Me=ve[0];var Zt=Be[0];for(e(Ge!=null),e(lt!=null),Ge[0]=null,Re[0]=null,lt[0]=0;;){if(ve[0]=Me,Be[0]=Zt,8>Zt){ve=7;break e}var or=ne(nt,Me+4);if(4294967286<or){ve=3;break e}var Wt=8+or+1&-2;if(vt+=Wt,0<At&&vt>At){ve=3;break e}if(!r(nt,Me,"VP8 ")||!r(nt,Me,"VP8L")){ve=0;break e}if(Zt[0]<Wt){ve=7;break e}r(nt,Me,"ALPH")||(Ge[0]=nt,Re[0]=Me+8,lt[0]=or),Me+=Wt,Zt-=Wt}}if(E=E[0],be.na=be.na[0],be.P=be.P[0],be.Sa=be.Sa[0],ve!=0)break}E=[E],be.Ja=[be.Ja],be.xa=[be.xa];e:if(At=f,ve=v,Be=E,Ge=be.gb[0],Re=be.Ja,lt=be.xa,nt=ve[0],Me=!r(At,nt,"VP8 "),vt=!r(At,nt,"VP8L"),e(At!=null),e(Be!=null),e(Re!=null),e(lt!=null),8>Be[0])ve=7;else{if(Me||vt){if(At=ne(At,nt+4),12<=Ge&&At>Ge-12){ve=3;break e}if(Ne&&At>Be[0]-8){ve=7;break e}Re[0]=At,ve[0]+=8,Be[0]-=8,lt[0]=vt}else lt[0]=5<=Be[0]&&At[nt+0]==47&&!(At[nt+4]>>5),Re[0]=Be[0];ve=0}if(E=E[0],be.Ja=be.Ja[0],be.xa=be.xa[0],v=v[0],ve!=0)break;if(4294967286<be.Ja)return 3;if(j==null||De||(j[0]=be.xa?2:1),K=[K],He=[He],be.xa){if(5>E){ve=7;break}j=K,Ne=He,De=V,f==null||5>E?f=0:5<=E&&f[v+0]==47&&!(f[v+4]>>5)?(Be=[0],At=[0],Ge=[0],re(Re=new b,f,v,E),gt(Re,Be,At,Ge)?(j!=null&&(j[0]=Be[0]),Ne!=null&&(Ne[0]=At[0]),De!=null&&(De[0]=Ge[0]),f=1):f=0):f=0}else{if(10>E){ve=7;break}j=He,f==null||10>E||!Jf(f,v+3,E-3)?f=0:(Ne=f[v+0]|f[v+1]<<8|f[v+2]<<16,De=16383&(f[v+7]<<8|f[v+6]),f=16383&(f[v+9]<<8|f[v+8]),1&Ne||3<(Ne>>1&7)||!(Ne>>4&1)||Ne>>5>=be.Ja||!De||!f?f=0:(K&&(K[0]=De),j&&(j[0]=f),f=1))}if(!f||(K=K[0],He=He[0],Te&&(ae[0]!=K||ye[0]!=He)))return 3;J!=null&&(J[0]=be,J.offset=v-J.w,e(4294967286>v-J.w),e(J.offset==J.ha-E));break}return ve==0||ve==7&&Te&&J==null?(V!=null&&(V[0]|=be.na!=null&&0<be.na.length),k!=null&&(k[0]=K),P!=null&&(P[0]=He),0):ve}function qc(f,v,E){var k=v.width,P=v.height,V=0,K=0,j=k,J=P;if(v.Da=f!=null&&0<f.Da,v.Da&&(j=f.cd,J=f.bd,V=f.v,K=f.j,11>E||(V&=-2,K&=-2),0>V||0>K||0>=j||0>=J||V+j>k||K+J>P))return 0;if(v.v=V,v.j=K,v.va=V+j,v.o=K+J,v.U=j,v.T=J,v.da=f!=null&&0<f.da,v.da){if(!Pe(j,J,E=[f.ib],V=[f.hb]))return 0;v.ib=E[0],v.hb=V[0]}return v.ob=f!=null&&f.ob,v.Kb=f==null||!f.Sd,v.da&&(v.ob=v.ib<3*k/4&&v.hb<3*P/4,v.Kb=0),1}function Yc(f){if(f==null)return 2;if(11>f.S){var v=f.f.RGBA;v.fb+=(f.height-1)*v.A,v.A=-v.A}else v=f.f.kb,f=f.height,v.O+=(f-1)*v.fa,v.fa=-v.fa,v.N+=(f-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(f-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(f-1)*v.lb,v.lb=-v.lb);return 0}function Al(f,v,E,k){if(k==null||0>=f||0>=v)return 2;if(E!=null){if(E.Da){var P=E.cd,V=E.bd,K=-2&E.v,j=-2&E.j;if(0>K||0>j||0>=P||0>=V||K+P>f||j+V>v)return 2;f=P,v=V}if(E.da){if(!Pe(f,v,P=[E.ib],V=[E.hb]))return 2;f=P[0],v=V[0]}}k.width=f,k.height=v;e:{var J=k.width,ae=k.height;if(f=k.S,0>=J||0>=ae||!(f>=y0&&13>f))f=2;else{if(0>=k.Rd&&k.sd==null){K=V=P=v=0;var ye=(j=J*pE[f])*ae;if(11>f||(V=(ae+1)/2*(v=(J+1)/2),f==12&&(K=(P=J)*ae)),(ae=A(ye+2*V+K))==null){f=1;break e}k.sd=ae,11>f?((J=k.f.RGBA).eb=ae,J.fb=0,J.A=j,J.size=ye):((J=k.f.kb).y=ae,J.O=0,J.fa=j,J.Fd=ye,J.f=ae,J.N=0+ye,J.Ab=v,J.Cd=V,J.ea=ae,J.W=0+ye+V,J.Db=v,J.Ed=V,f==12&&(J.F=ae,J.J=0+ye+2*V),J.Tc=K,J.lb=P)}if(v=1,P=k.S,V=k.width,K=k.height,P>=y0&&13>P)if(11>P)f=k.f.RGBA,v&=(j=Math.abs(f.A))*(K-1)+V<=f.size,v&=j>=V*pE[P],v&=f.eb!=null;else{f=k.f.kb,j=(V+1)/2,ye=(K+1)/2,J=Math.abs(f.fa),ae=Math.abs(f.Ab);var Te=Math.abs(f.Db),Ne=Math.abs(f.lb),be=Ne*(K-1)+V;v&=J*(K-1)+V<=f.Fd,v&=ae*(ye-1)+j<=f.Cd,v=(v&=Te*(ye-1)+j<=f.Ed)&J>=V&ae>=j&Te>=j,v&=f.y!=null,v&=f.f!=null,v&=f.ea!=null,P==12&&(v&=Ne>=V,v&=be<=f.Tc,v&=f.F!=null)}else v=0;f=v?0:2}}return f!=0||E!=null&&E.fd&&(f=Yc(k)),f}var ca=64,il=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],ol=24,sl=32,Jc=8,ua=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];We("Predictor0","PredictorAdd0"),U.Predictor0=function(){return 4278190080},U.Predictor1=function(f){return f},U.Predictor2=function(f,v,E){return v[E+0]},U.Predictor3=function(f,v,E){return v[E+1]},U.Predictor4=function(f,v,E){return v[E-1]},U.Predictor5=function(f,v,E){return Je(Je(f,v[E+1]),v[E+0])},U.Predictor6=function(f,v,E){return Je(f,v[E-1])},U.Predictor7=function(f,v,E){return Je(f,v[E+0])},U.Predictor8=function(f,v,E){return Je(v[E-1],v[E+0])},U.Predictor9=function(f,v,E){return Je(v[E+0],v[E+1])},U.Predictor10=function(f,v,E){return Je(Je(f,v[E-1]),Je(v[E+0],v[E+1]))},U.Predictor11=function(f,v,E){var k=v[E+0];return 0>=ft(k>>24&255,f>>24&255,(v=v[E-1])>>24&255)+ft(k>>16&255,f>>16&255,v>>16&255)+ft(k>>8&255,f>>8&255,v>>8&255)+ft(255&k,255&f,255&v)?k:f},U.Predictor12=function(f,v,E){var k=v[E+0];return(ot((f>>24&255)+(k>>24&255)-((v=v[E-1])>>24&255))<<24|ot((f>>16&255)+(k>>16&255)-(v>>16&255))<<16|ot((f>>8&255)+(k>>8&255)-(v>>8&255))<<8|ot((255&f)+(255&k)-(255&v)))>>>0},U.Predictor13=function(f,v,E){var k=v[E-1];return(at((f=Je(f,v[E+0]))>>24&255,k>>24&255)<<24|at(f>>16&255,k>>16&255)<<16|at(f>>8&255,k>>8&255)<<8|at(f>>0&255,k>>0&255))>>>0};var Um=U.PredictorAdd0;U.PredictorAdd1=yt,We("Predictor2","PredictorAdd2"),We("Predictor3","PredictorAdd3"),We("Predictor4","PredictorAdd4"),We("Predictor5","PredictorAdd5"),We("Predictor6","PredictorAdd6"),We("Predictor7","PredictorAdd7"),We("Predictor8","PredictorAdd8"),We("Predictor9","PredictorAdd9"),We("Predictor10","PredictorAdd10"),We("Predictor11","PredictorAdd11"),We("Predictor12","PredictorAdd12"),We("Predictor13","PredictorAdd13");var Zc=U.PredictorAdd2;xt("ColorIndexInverseTransform","MapARGB","32b",function(f){return f>>8&255},function(f){return f}),xt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(f){return f},function(f){return f>>8&255});var g0,fA=U.ColorIndexInverseTransform,eu=U.MapARGB,Im=U.VP8LColorIndexInverseTransformAlpha,Dm=U.MapAlpha,Xi=U.VP8LPredictorsAdd=[];Xi.length=16,(U.VP8LPredictors=[]).length=16,(U.VP8LPredictorsAdd_C=[]).length=16,(U.VP8LPredictors_C=[]).length=16;var Pa,dA,qi,PA,hi,ll,gA,cl,tu,Yi,pA,fi,jo,ul,Wo,Ji,ru,Ma,di,yr,vr,Kr,sn,gi,Zi,hl,p0,J4,Z4=A(511),eE=A(2041),tE=A(225),rE=A(767),nE=0,Qm=eE,m0=tE,Ea=rE,Ra=Z4,y0=0,v0=1,aE=2,w0=3,B0=4,Om=5,AE=6,Pm=7,Mm=8,x0=9,Rm=10,Aie=[2,3,7],iie=[3,3,11],iE=[280,256,256,256,40],oie=[0,1,1,1,0],sie=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],lie=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],cie=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],uie=8,Hm=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Vm=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],nu=null,hie=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],fie=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],oE=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],die=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],gie=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],pie=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],mie=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],eo=[],mA=[],pi=[],yie=1,sE=2,to=[],Ha=[];Qe("UpsampleRgbLinePair",jt,3),Qe("UpsampleBgrLinePair",Fr,3),Qe("UpsampleRgbaLinePair",hA,4),Qe("UpsampleBgraLinePair",gn,4),Qe("UpsampleArgbLinePair",Hn,4),Qe("UpsampleRgba4444LinePair",Zr,2),Qe("UpsampleRgb565LinePair",Dr,2);var vie=U.UpsampleRgbLinePair,wie=U.UpsampleBgrLinePair,lE=U.UpsampleRgbaLinePair,cE=U.UpsampleBgraLinePair,uE=U.UpsampleArgbLinePair,hE=U.UpsampleRgba4444LinePair,Bie=U.UpsampleRgb565LinePair,b0=16,C0=1<<b0-1,au=-227,$m=482,fE=6,xie=(256<<fE)-1,dE=0,bie=A(256),Cie=A(256),Eie=A(256),_ie=A(256),Fie=A($m-au),Sie=A($m-au);ui("YuvToRgbRow",jt,3),ui("YuvToBgrRow",Fr,3),ui("YuvToRgbaRow",hA,4),ui("YuvToBgraRow",gn,4),ui("YuvToArgbRow",Hn,4),ui("YuvToRgba4444Row",Zr,2),ui("YuvToRgb565Row",Dr,2);var gE=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],E0=[0,2,8],kie=[8,7,6,4,4,2,2,2,1,1,1,1],Tie=1;this.WebPDecodeRGBA=function(f,v,E,k,P){var V=v0,K=new rl,j=new on;K.ba=j,j.S=V,j.width=[j.width],j.height=[j.height];var J=j.width,ae=j.height,ye=new _t;if(ye==null||f==null)var Te=2;else e(ye!=null),Te=al(f,v,E,ye.width,ye.height,ye.Pd,ye.Qd,ye.format,null);if(Te!=0?J=0:(J!=null&&(J[0]=ye.width[0]),ae!=null&&(ae[0]=ye.height[0]),J=1),J){j.width=j.width[0],j.height=j.height[0],k!=null&&(k[0]=j.width),P!=null&&(P[0]=j.height);e:{if(k=new QA,(P=new zc).data=f,P.w=v,P.ha=E,P.kd=1,v=[0],e(P!=null),((f=al(P.data,P.w,P.ha,null,null,null,v,null,P))==0||f==7)&&v[0]&&(f=4),(v=f)==0){if(e(K!=null),k.data=P.data,k.w=P.w+P.offset,k.ha=P.ha-P.offset,k.put=Yn,k.ac=Ir,k.bc=oa,k.ma=K,P.xa){if((f=Ie())==null){K=1;break e}if(function(Ne,be){var He=[0],De=[0],ve=[0];t:for(;;){if(Ne==null)return 0;if(be==null)return Ne.a=2,0;if(Ne.l=be,Ne.a=0,re(Ne.m,be.data,be.w,be.ha),!gt(Ne.m,He,De,ve)){Ne.a=3;break t}if(Ne.xb=sE,be.width=He[0],be.height=De[0],!Fe(He[0],De[0],1,Ne,null))break t;return 1}return e(Ne.a!=0),0}(f,k)){if(k=(v=Al(k.width,k.height,K.Oa,K.ba))==0){t:{k=f;r:for(;;){if(k==null){k=0;break t}if(e(k.s.yc!=null),e(k.s.Ya!=null),e(0<k.s.Wb),e((E=k.l)!=null),e((P=E.ma)!=null),k.xb!=0){if(k.ca=P.ba,k.tb=P.tb,e(k.ca!=null),!qc(P.Oa,E,w0)){k.a=2;break r}if(!pe(k,E.width)||E.da)break r;if((E.da||Rt(k.ca.S))&&_e(),11>k.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),k.ca.f.kb.F!=null&&_e()),k.Pb&&0<k.s.ua&&k.s.vb.X==null&&!Ee(k.s.vb,k.s.Wa.Xa)){k.a=1;break r}k.xb=0}if(!oe(k,k.V,k.Ba,k.c,k.i,E.o,ie))break r;P.Dc=k.Ma,k=1;break t}e(k.a!=0),k=0}k=!k}k&&(v=f.a)}else v=f.a}else{if((f=new ba)==null){K=1;break e}if(f.Fa=P.na,f.P=P.P,f.qc=P.Sa,Zf(f,k)){if((v=Al(k.width,k.height,K.Oa,K.ba))==0){if(f.Aa=0,E=K.Oa,e((P=f)!=null),E!=null){if(0<(J=0>(J=E.Md)?0:100<J?255:255*J/100)){for(ae=ye=0;4>ae;++ae)12>(Te=P.pb[ae]).lc&&(Te.ia=J*kie[0>Te.lc?0:Te.lc]>>3),ye|=Te.ia;ye&&(alert("todo:VP8InitRandom"),P.ia=1)}P.Ga=E.Id,100<P.Ga?P.Ga=100:0>P.Ga&&(P.Ga=0)}gm(f,k)||(v=f.a)}}else v=f.a}v==0&&K.Oa!=null&&K.Oa.fd&&(v=Yc(K.ba))}K=v}V=K!=0?null:11>V?j.f.RGBA.eb:j.f.kb.y}else V=null;return V};var pE=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(U,O){for(var q="",T=0;T<4;T++)q+=String.fromCharCode(U[O++]);return q}function u(U,O){return(U[O+0]<<0|U[O+1]<<8|U[O+2]<<16)>>>0}function p(U,O){return(U[O+0]<<0|U[O+1]<<8|U[O+2]<<16|U[O+3]<<24)>>>0}new l;var h=[0],d=[0],w=[],g=new l,y=t,m=function(U,O){var q={},T=0,L=!1,G=0,Y=0;if(q.frames=[],!function(_,B,x,S){for(var D=0;D<S;D++)if(_[B+D]!=x.charCodeAt(D))return!0;return!1}(U,O,"RIFF",4)){var se,he;for(p(U,O+=4),O+=8;O<U.length;){var ge=c(U,O),re=p(U,O+=4);O+=4;var le=re+(1&re);switch(ge){case"VP8 ":case"VP8L":q.frames[T]===void 0&&(q.frames[T]={}),(b=q.frames[T]).src_off=L?Y:O-8,b.src_size=G+re+8,T++,L&&(L=!1,G=0,Y=0);break;case"VP8X":(b=q.header={}).feature_flags=U[O];var fe=O+4;b.canvas_width=1+u(U,fe),fe+=3,b.canvas_height=1+u(U,fe),fe+=3;break;case"ALPH":L=!0,G=le+8,Y=O-8;break;case"ANIM":(b=q.header).bgcolor=p(U,O),fe=O+4,b.loop_count=(se=U)[(he=fe)+0]<<0|se[he+1]<<8,fe+=2;break;case"ANMF":var Ue,b;(b=q.frames[T]={}).offset_x=2*u(U,O),O+=3,b.offset_y=2*u(U,O),O+=3,b.width=1+u(U,O),O+=3,b.height=1+u(U,O),O+=3,b.duration=u(U,O),O+=3,Ue=U[O++],b.dispose=1&Ue,b.blend=Ue>>1&1}ge!="ANMF"&&(O+=le)}return q}}(y,0);m.response=y,m.rgbaoutput=!0,m.dataurl=!1;var F=m.header?m.header:null,N=m.frames?m.frames:null;if(F){F.loop_counter=F.loop_count,h=[F.canvas_height],d=[F.canvas_width];for(var Q=0;Q<N.length&&N[Q].blend!=0;Q++);}var z=N[0],R=g.WebPDecodeRGBA(y,z.src_off,z.src_size,d,h);z.rgba=R,z.imgwidth=d[0],z.imgheight=h[0];for(var I=0;I<d[0]*h[0]*4;I++)w[I]=R[I];return this.width=d,this.height=h,this.data=w,this}(function(t){var e=function(){return typeof Vd=="function"},r=function(h,d,w,g){var y=4,m=o;switch(g){case t.image_compression.FAST:y=1,m=A;break;case t.image_compression.MEDIUM:y=6,m=s;break;case t.image_compression.SLOW:y=9,m=l}h=n(h,d,w,m);var F=Vd(h,{level:y});return t.__addimage__.arrayBufferToBinaryString(F)},n=function(h,d,w,g){for(var y,m,F,N=h.length/d,Q=new Uint8Array(h.length+N),z=u(),R=0;R<N;R+=1){if(F=R*d,y=h.subarray(F,F+d),g)Q.set(g(y,w,m),F+R);else{for(var I,U=z.length,O=[];I<U;I+=1)O[I]=z[I](y,w,m);var q=p(O.concat());Q.set(O[q],F+R)}m=y}return Q},a=function(h){var d=Array.apply([],h);return d.unshift(0),d},A=function(h,d){var w,g=[],y=h.length;g[0]=1;for(var m=0;m<y;m+=1)w=h[m-d]||0,g[m+1]=h[m]-w+256&255;return g},o=function(h,d,w){var g,y=[],m=h.length;y[0]=2;for(var F=0;F<m;F+=1)g=w&&w[F]||0,y[F+1]=h[F]-g+256&255;return y},s=function(h,d,w){var g,y,m=[],F=h.length;m[0]=3;for(var N=0;N<F;N+=1)g=h[N-d]||0,y=w&&w[N]||0,m[N+1]=h[N]+256-(g+y>>>1)&255;return m},l=function(h,d,w){var g,y,m,F,N=[],Q=h.length;N[0]=4;for(var z=0;z<Q;z+=1)g=h[z-d]||0,y=w&&w[z]||0,m=w&&w[z-d]||0,F=c(g,y,m),N[z+1]=h[z]-F+256&255;return N},c=function(h,d,w){if(h===d&&d===w)return h;var g=Math.abs(d-w),y=Math.abs(h-w),m=Math.abs(h+d-w-w);return g<=y&&g<=m?h:y<=m?d:w},u=function(){return[a,A,o,s,l]},p=function(h){var d=h.map(function(w){return w.reduce(function(g,y){return g+Math.abs(y)},0)});return d.indexOf(Math.min.apply(null,d))};t.processPNG=function(h,d,w,g){var y,m,F,N,Q,z,R,I,U,O,q,T,L,G,Y,se=this.decode.FLATE_DECODE,he="";if(this.__addimage__.isArrayBuffer(h)&&(h=new Uint8Array(h)),this.__addimage__.isArrayBufferView(h)){if(h=(F=new OT(h)).imgData,m=F.bits,y=F.colorSpace,Q=F.colors,[4,6].indexOf(F.colorType)!==-1){if(F.bits===8){U=(I=F.pixelBitlength==32?new Uint32Array(F.decodePixels().buffer):F.pixelBitlength==16?new Uint16Array(F.decodePixels().buffer):new Uint8Array(F.decodePixels().buffer)).length,q=new Uint8Array(U*F.colors),O=new Uint8Array(U);var ge,re=F.pixelBitlength-F.bits;for(G=0,Y=0;G<U;G++){for(L=I[G],ge=0;ge<re;)q[Y++]=L>>>ge&255,ge+=F.bits;O[G]=L>>>ge&255}}if(F.bits===16){U=(I=new Uint32Array(F.decodePixels().buffer)).length,q=new Uint8Array(U*(32/F.pixelBitlength)*F.colors),O=new Uint8Array(U*(32/F.pixelBitlength)),T=F.colors>1,G=0,Y=0;for(var le=0;G<U;)L=I[G++],q[Y++]=L>>>0&255,T&&(q[Y++]=L>>>16&255,L=I[G++],q[Y++]=L>>>0&255),O[le++]=L>>>16&255;m=8}g!==t.image_compression.NONE&&e()?(h=r(q,F.width*F.colors,F.colors,g),R=r(O,F.width,1,g)):(h=q,R=O,se=void 0)}if(F.colorType===3&&(y=this.color_spaces.INDEXED,z=F.palette,F.transparency.indexed)){var fe=F.transparency.indexed,Ue=0;for(G=0,U=fe.length;G<U;++G)Ue+=fe[G];if((Ue/=255)===U-1&&fe.indexOf(0)!==-1)N=[fe.indexOf(0)];else if(Ue!==U){for(I=F.decodePixels(),O=new Uint8Array(I.length),G=0,U=I.length;G<U;G++)O[G]=fe[I[G]];R=r(O,F.width,1)}}var b=function(_){var B;switch(_){case t.image_compression.FAST:B=11;break;case t.image_compression.MEDIUM:B=13;break;case t.image_compression.SLOW:B=14;break;default:B=12}return B}(g);return se===this.decode.FLATE_DECODE&&(he="/Predictor "+b+" "),he+="/Colors "+Q+" /BitsPerComponent "+m+" /Columns "+F.width,(this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),(R&&this.__addimage__.isArrayBuffer(R)||this.__addimage__.isArrayBufferView(R))&&(R=this.__addimage__.arrayBufferToBinaryString(R)),{alias:w,data:h,index:d,filter:se,decodeParameters:he,transparency:N,palette:z,sMask:R,predictor:b,width:F.width,height:F.height,bitsPerComponent:m,colorSpace:y}}}})(Bt.API),function(t){t.processGIF89A=function(e,r,n,a){var A=new PT(e),o=A.width,s=A.height,l=[];A.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},u=new tg(100).encode(c,100);return t.processJPEG.call(this,u,r,n,a)},t.processGIF87A=t.processGIF89A}(Bt.API),ja.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:a,green:n,blue:r,quad:A}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},ja.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(r){hr.log("bit decode error:"+r)}},ja.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<e;a++)for(var A=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*a*4,s=0;s<8&&8*a+s<this.width;s++){var l=this.palette[A>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}r!==0&&(this.pos+=4-r)}},ja.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<t;a++){var A=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*a*4,s=A>>4,l=15&A,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*a+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},ja.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+4*n;if(a<this.palette.length){var o=this.palette[a];this.data[A]=o.red,this.data[A+1]=o.green,this.data[A+2]=o.blue,this.data[A+3]=255}else this.data[A]=255,this.data[A+1]=255,this.data[A+2]=255,this.data[A+3]=255}t!==0&&(this.pos+=4-t)}},ja.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var A=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(A&e)/e*255|0,s=(A>>5&e)/e*255|0,l=(A>>10&e)/e*255|0,c=A>>15?255:0,u=n*this.width*4+4*a;this.data[u]=l,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=c}this.pos+=t}},ja.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,A=0;A<this.width;A++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,l=(o>>5&r)/r*255|0,c=(o>>11)/e*255|0,u=a*this.width*4+4*A;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=s,this.data[u+3]=255}this.pos+=t}},ja.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*r;this.data[o]=A,this.data[o+1]=a,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},ja.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=A,this.data[s+1]=a,this.data[s+2]=n,this.data[s+3]=o}},ja.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,r,n,a){var A=new ja(e,!1),o=A.width,s=A.height,l={data:A.getData(),width:o,height:s},c=new tg(100).encode(l,100);return t.processJPEG.call(this,c,r,n,a)}}(Bt.API),Iv.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,r,n,a){var A=new Iv(e),o=A.width,s=A.height,l={data:A.getData(),width:o,height:s},c=new tg(100).encode(l,100);return t.processJPEG.call(this,c,r,n,a)}}(Bt.API),Bt.API.processRGBA=function(t,e,r){for(var n=t.data,a=n.length,A=new Uint8Array(a/4*3),o=new Uint8Array(a/4),s=0,l=0,c=0;c<a;c+=4){var u=n[c],p=n[c+1],h=n[c+2],d=n[c+3];A[s++]=u,A[s++]=p,A[s++]=h,o[l++]=d}var w=this.__addimage__.arrayBufferToBinaryString(A);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:w,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},Bt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},ps=Bt.API,gh=ps.getCharWidthsArray=function(t,e){var r,n,a=(e=e||{}).font||this.internal.getFont(),A=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:a.metadata.Unicode.widths,l=s.fof?s.fof:1,c=e.kerning?e.kerning:a.metadata.Unicode.kerning,u=c.fof?c.fof:1,p=e.doKerning!==!1,h=0,d=t.length,w=0,g=s[0]||l,y=[];for(r=0;r<d;r++)n=t.charCodeAt(r),typeof a.metadata.widthOfString=="function"?y.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(n))+o*(1e3/A)||0)/1e3):(h=p&&Xt(c[n])==="object"&&!isNaN(parseInt(c[n][w],10))?c[n][w]/u:0,y.push((s[n]||g)/l+h)),w=n;return y},Tv=ps.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),a=e.charSpace||this.internal.getCharSpace();return ps.processArabic&&(t=ps.processArabic(t)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(t,r,a)/r:gh.apply(this,arguments).reduce(function(A,o){return A+o},0)},Nv=function(t,e,r,n){for(var a=[],A=0,o=t.length,s=0;A!==o&&s+e[A]<r;)s+=e[A],A++;a.push(t.slice(0,A));var l=A;for(s=0;A!==o;)s+e[A]>n&&(a.push(t.slice(l,A)),s=0,l=A),s+=e[A],A++;return l!==A&&a.push(t.slice(l,A)),a},Lv=function(t,e,r){r||(r={});var n,a,A,o,s,l,c,u=[],p=[u],h=r.textIndent||0,d=0,w=0,g=t.split(" "),y=gh.apply(this,[" ",r])[0];if(l=r.lineIndent===-1?g[0].length+2:r.lineIndent||0){var m=Array(l).join(" "),F=[];g.map(function(Q){(Q=Q.split(/\s*\n/)).length>1?F=F.concat(Q.map(function(z,R){return(R&&z.length?`
234
234
  `:"")+z})):F.push(Q[0])}),g=F,l=Tv.apply(this,[m,r])}for(A=0,o=g.length;A<o;A++){var N=0;if(n=g[A],l&&n[0]==`
235
235
  `&&(n=n.substr(1),N=1),h+d+(w=(a=gh.apply(this,[n,r])).reduce(function(Q,z){return Q+z},0))>e||N){if(w>e){for(s=Nv.apply(this,[n,a,e-(h+d),e]),u.push(s.shift()),u=[s.pop()];s.length;)p.push([s.shift()]);w=a.slice(n.length-(u[0]?u[0].length:0)).reduce(function(Q,z){return Q+z},0)}else u=[n];p.push(u),h=w+l,d=y}else u.push(n),h+=d+w,d=y}return c=l?function(Q,z){return(z?m:"")+Q.join(" ")}:function(Q){return Q.join(" ")},p.map(c)},ps.splitTextToSize=function(t,e,r){var n,a=(r=r||{}).fontSize||this.internal.getFontSize(),A=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var p=this.internal.getFont(u.fontName,u.fontStyle);return p.metadata.Unicode?{widths:p.metadata.Unicode.widths||{0:1},kerning:p.metadata.Unicode.kerning||{}}:{font:p.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/a;A.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/a:0,A.lineIndent=r.lineIndent;var s,l,c=[];for(s=0,l=n.length;s<l;s++)c=c.concat(Lv.apply(this,[n[s],o,A]));return c},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",r={},n={},a=0;a<e.length;a++)r[e[a]]="0123456789abcdef"[a],n["0123456789abcdef"[a]]=e[a];var A=function(p){return"0x"+parseInt(p,10).toString(16)},o=t.__fontmetrics__.compress=function(p){var h,d,w,g,y=["{"];for(var m in p){if(h=p[m],isNaN(parseInt(m,10))?d="'"+m+"'":(m=parseInt(m,10),d=(d=A(m).slice(2)).slice(0,-1)+n[d.slice(-1)]),typeof h=="number")h<0?(w=A(h).slice(3),g="-"):(w=A(h).slice(2),g=""),w=g+w.slice(0,-1)+n[w.slice(-1)];else{if(Xt(h)!=="object")throw new Error("Don't know what to do with value type "+Xt(h)+".");w=o(h)}y.push(d+w)}return y.push("}"),y.join("")},s=t.__fontmetrics__.uncompress=function(p){if(typeof p!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,d,w,g,y={},m=1,F=y,N=[],Q="",z="",R=p.length-1,I=1;I<R;I+=1)(g=p[I])=="'"?h?(w=h.join(""),h=void 0):h=[]:h?h.push(g):g=="{"?(N.push([F,w]),F={},w=void 0):g=="}"?((d=N.pop())[0][d[1]]=F,w=void 0,F=d[0]):g=="-"?m=-1:w===void 0?r.hasOwnProperty(g)?(Q+=r[g],w=parseInt(Q,16)*m,m=1,Q=""):Q+=g:r.hasOwnProperty(g)?(z+=r[g],F[w]=parseInt(z,16)*m,m=1,w=void 0,z=""):z+=g;return y},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(p){var h=p.font,d=u.Unicode[h.postScriptName];d&&(h.metadata.Unicode={},h.metadata.Unicode.widths=d.widths,h.metadata.Unicode.kerning=d.kerning);var w=c.Unicode[h.postScriptName];w&&(h.metadata.Unicode.encoding=w,h.encoding=w.codePages[0])}])}(Bt.API),function(t){var e=function(r){for(var n=r.length,a=new Uint8Array(n),A=0;A<n;A++)a[A]=r.charCodeAt(A);return a};t.API.events.push(["addFont",function(r){var n=void 0,a=r.font,A=r.instance;if(!a.isStandardFont){if(A===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(n=A.existsFileInVFS(a.postScriptName)===!1?A.loadFile(a.postScriptName):A.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(Vl(s)),o.metadata=t.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(a,n)}}])}(Bt),function(t){function e(){return(wt.canvg?Promise.resolve(wt.canvg):Promise.resolve().then(()=>aie)).catch(function(r){return Promise.reject(new Error("Could not load canvg: "+r))}).then(function(r){return r.default?r.default:r})}Bt.API.addSvgAsImage=function(r,n,a,A,o,s,l,c){if(isNaN(n)||isNaN(a))throw hr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(A)||isNaN(o))throw hr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=A,u.height=o;var p=u.getContext("2d");p.fillStyle="#fff",p.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then(function(w){return w.fromString(p,r,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(w){return w.render(h)}).then(function(){d.addImage(u.toDataURL("image/jpeg",1),n,a,A,o,l,c)})}}(),Bt.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a<this.internal.pages[n].length;a++)this.internal.pages[n][a]=this.internal.pages[n][a].replace(e,r);return this},Bt.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var n,a,A,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,u=0,p=0;function h(w,g){var y,m=!1;for(y=0;y<w.length;y+=1)w[y]===g&&(m=!0);return m}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var d=s.length;for(p=0;p<d;p+=1)r[s[p]].value=r[s[p]].defaultValue,r[s[p]].explicitSet=!1}if(Xt(t)==="object"){for(a in t)if(A=t[a],h(s,a)&&A!==void 0){if(r[a].type==="boolean"&&typeof A=="boolean")r[a].value=A;else if(r[a].type==="name"&&h(r[a].valueSet,A))r[a].value=A;else if(r[a].type==="integer"&&Number.isInteger(A))r[a].value=A;else if(r[a].type==="array"){for(c=0;c<A.length;c+=1)if(n=!0,A[c].length===1&&typeof A[c][0]=="number")l.push(String(A[c]-1));else if(A[c].length>1){for(u=0;u<A[c].length;u+=1)typeof A[c][u]!="number"&&(n=!1);n===!0&&l.push([A[c][0]-1,A[c][1]-1].join(" "))}r[a].value="["+l.join(" ")+"]"}else r[a].value=r[a].defaultValue;r[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var w,g=[];for(w in r)r[w].explicitSet===!0&&(r[w].type==="name"?g.push("/"+w+" /"+r[w].value):g.push("/"+w+" "+r[w].value));g.length!==0&&this.internal.write(`/ViewerPreferences
236
236
  <<
@@ -261,7 +261,7 @@ endbfchar
261
261
  CMapName currentdict /CMap defineresource pop
262
262
  end
263
263
  end`};e.events.push(["putFont",function(A){(function(o){var s=o.font,l=o.out,c=o.newObject,u=o.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="Identity-H"){for(var p=s.metadata.Unicode.widths,h=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),d="",w=0;w<h.length;w++)d+=String.fromCharCode(h[w]);var g=c();u({data:d,addLength1:!0,objectId:g}),l("endobj");var y=c();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:y}),l("endobj");var m=c();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+ls(s.fontName)),l("/FontFile2 "+g+" 0 R"),l("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),l("/Flags "+s.metadata.flags),l("/StemV "+s.metadata.stemV),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l(">>"),l("endobj");var F=c();l("<<"),l("/Type /Font"),l("/BaseFont /"+ls(s.fontName)),l("/FontDescriptor "+m+" 0 R"),l("/W "+t.API.PDFObject.convert(p)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+s.encoding+")"),l(">>"),l(">>"),l("endobj"),s.objectNumber=c(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+y+" 0 R"),l("/BaseFont /"+ls(s.fontName)),l("/Encoding /"+s.encoding),l("/DescendantFonts ["+F+" 0 R]"),l(">>"),l("endobj"),s.isAlreadyPutted=!0}})(A)}]),e.events.push(["putFont",function(A){(function(o){var s=o.font,l=o.out,c=o.newObject,u=o.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var p=s.metadata.rawData,h="",d=0;d<p.length;d++)h+=String.fromCharCode(p[d]);var w=c();u({data:h,addLength1:!0,objectId:w}),l("endobj");var g=c();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:g}),l("endobj");var y=c();l("<<"),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l("/StemV "+s.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+w+" 0 R"),l("/Flags 96"),l("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),l("/FontName /"+ls(s.fontName)),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l(">>"),l("endobj"),s.objectNumber=c();for(var m=0;m<s.metadata.hmtx.widths.length;m++)s.metadata.hmtx.widths[m]=parseInt(s.metadata.hmtx.widths[m]*(1e3/s.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+g+" 0 R/BaseFont/"+ls(s.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),l("endobj"),s.isAlreadyPutted=!0}})(A)}]);var a=function(A){var o,s=A.text||"",l=A.x,c=A.y,u=A.options||{},p=A.mutex||{},h=p.pdfEscape,d=p.activeFontKey,w=p.fonts,g=d,y="",m=0,F="",N=w[g].encoding;if(w[g].encoding!=="Identity-H")return{text:s,x:l,y:c,options:u,mutex:p};for(F=s,g=d,Array.isArray(s)&&(F=s[0]),m=0;m<F.length;m+=1)w[g].metadata.hasOwnProperty("cmap")&&(o=w[g].metadata.cmap.unicode.codeMap[F[m].charCodeAt(0)]),o||F[m].charCodeAt(0)<256&&w[g].metadata.hasOwnProperty("Unicode")?y+=F[m]:y+="";var Q="";return parseInt(g.slice(1))<14||N==="WinAnsiEncoding"?Q=h(y,g).split("").map(function(z){return z.charCodeAt(0).toString(16)}).join(""):N==="Identity-H"&&(Q=r(y,w[g])),p.isHex=!0,{text:Q,x:l,y:c,options:u,mutex:p}};e.events.push(["postProcessText",function(A){var o=A.text||"",s=[],l={text:o,x:A.x,y:A.y,options:A.options,mutex:A.mutex};if(Array.isArray(o)){var c=0;for(c=0;c<o.length;c+=1)Array.isArray(o[c])&&o[c].length===3?s.push([a(Object.assign({},l,{text:o[c][0]})).text,o[c][1],o[c][2]]):s.push(a(Object.assign({},l,{text:o[c]})).text);A.text=s}else A.text=a(Object.assign({},l,{text:o})).text}])}(Bt),function(t){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(r){return e.call(this),this.internal.vFS[r]!==void 0},t.addFileToVFS=function(r,n){return e.call(this),this.internal.vFS[r]=n,this},t.getFileFromVFS=function(r){return e.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}}(Bt.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(n){var a,A,o,s,l,c,u,p=e,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],w={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},g={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),F=!1,N=0;this.__bidiEngine__={};var Q=function(T){var L=T.charCodeAt(),G=L>>8,Y=g[G];return Y!==void 0?p[256*Y+(255&L)]:G===252||G===253?"AL":m.test(G)?"L":G===8?"R":"N"},z=function(T){for(var L,G=0;G<T.length;G++){if((L=Q(T.charAt(G)))==="L")return!1;if(L==="R")return!0}return!1},R=function(T,L,G,Y){var se,he,ge,re,le=L[Y];switch(le){case"L":case"R":F=!1;break;case"N":case"AN":break;case"EN":F&&(le="AN");break;case"AL":F=!0,le="R";break;case"WS":le="N";break;case"CS":Y<1||Y+1>=L.length||(se=G[Y-1])!=="EN"&&se!=="AN"||(he=L[Y+1])!=="EN"&&he!=="AN"?le="N":F&&(he="AN"),le=he===se?he:"N";break;case"ES":le=(se=Y>0?G[Y-1]:"B")==="EN"&&Y+1<L.length&&L[Y+1]==="EN"?"EN":"N";break;case"ET":if(Y>0&&G[Y-1]==="EN"){le="EN";break}if(F){le="N";break}for(ge=Y+1,re=L.length;ge<re&&L[ge]==="ET";)ge++;le=ge<re&&L[ge]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(re=L.length,ge=Y+1;ge<re&&L[ge]==="NSM";)ge++;if(ge<re){var fe=T[Y],Ue=fe>=1425&&fe<=2303||fe===64286;if(se=L[ge],Ue&&(se==="R"||se==="AL")){le="R";break}}}le=Y<1||(se=L[Y-1])==="B"?"N":G[Y-1];break;case"B":F=!1,a=!0,le=N;break;case"S":A=!0,le="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":F=!1;break;case"BN":le="N"}return le},I=function(T,L,G){var Y=T.split("");return G&&U(Y,G,{hiLevel:N}),Y.reverse(),L&&L.reverse(),Y.join("")},U=function(T,L,G){var Y,se,he,ge,re,le=-1,fe=T.length,Ue=0,b=[],_=N?d:h,B=[];for(F=!1,a=!1,A=!1,se=0;se<fe;se++)B[se]=Q(T[se]);for(he=0;he<fe;he++){if(re=Ue,b[he]=R(T,B,b,he),Y=240&(Ue=_[re][w[b[he]]]),Ue&=15,L[he]=ge=_[Ue][5],Y>0)if(Y===16){for(se=le;se<he;se++)L[se]=1;le=-1}else le=-1;if(_[Ue][6])le===-1&&(le=he);else if(le>-1){for(se=le;se<he;se++)L[se]=ge;le=-1}B[he]==="B"&&(L[he]=0),G.hiLevel|=ge}A&&function(x,S,D){for(var W=0;W<D;W++)if(x[W]==="S"){S[W]=N;for(var ue=W-1;ue>=0&&x[ue]==="WS";ue--)S[ue]=N}}(B,L,fe)},O=function(T,L,G,Y,se){if(!(se.hiLevel<T)){if(T===1&&N===1&&!a)return L.reverse(),void(G&&G.reverse());for(var he,ge,re,le,fe=L.length,Ue=0;Ue<fe;){if(Y[Ue]>=T){for(re=Ue+1;re<fe&&Y[re]>=T;)re++;for(le=Ue,ge=re-1;le<ge;le++,ge--)he=L[le],L[le]=L[ge],L[ge]=he,G&&(he=G[le],G[le]=G[ge],G[ge]=he);Ue=re}Ue++}}},q=function(T,L,G){var Y=T.split(""),se={hiLevel:N};return G||(G=[]),U(Y,G,se),function(he,ge,re){if(re.hiLevel!==0&&u)for(var le,fe=0;fe<he.length;fe++)ge[fe]===1&&(le=y.indexOf(he[fe]))>=0&&(he[fe]=y[le+1])}(Y,G,se),O(2,Y,L,G,se),O(1,Y,L,G,se),Y.join("")};return this.__bidiEngine__.doBidiReorder=function(T,L,G){if(function(se,he){if(he)for(var ge=0;ge<se.length;ge++)he[ge]=ge;s===void 0&&(s=z(se)),c===void 0&&(c=z(se))}(T,L),o||!l||c)if(o&&l&&s^c)N=s?1:0,T=I(T,L,G);else if(!o&&l&&c)N=s?1:0,T=q(T,L,G),T=I(T,L);else if(!o||s||l||c){if(o&&!l&&s^c)T=I(T,L),s?(N=0,T=q(T,L,G)):(N=1,T=q(T,L,G),T=I(T,L));else if(o&&s&&!l&&c)N=1,T=q(T,L,G),T=I(T,L);else if(!o&&!l&&s^c){var Y=u;s?(N=1,T=q(T,L,G),N=0,u=!1,T=q(T,L,G),u=Y):(N=0,T=q(T,L,G),T=I(T,L),N=1,u=!1,T=q(T,L,G),u=Y,T=I(T,L))}}else N=0,T=q(T,L,G);else N=s?1:0,T=q(T,L,G);return T},this.__bidiEngine__.setOptions=function(T){T&&(o=T.isInputVisual,l=T.isOutputVisual,s=T.isInputRtl,c=T.isOutputRtl,u=T.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(n){var a=n.text,A=(n.x,n.y,n.options||{}),o=(n.mutex,A.lang,[]);if(A.isInputVisual=typeof A.isInputVisual!="boolean"||A.isInputVisual,r.setOptions(A),Object.prototype.toString.call(a)==="[object Array]"){var s=0;for(o=[],s=0;s<a.length;s+=1)Object.prototype.toString.call(a[s])==="[object Array]"?o.push([r.doBidiReorder(a[s][0]),a[s][1],a[s][2]]):o.push([r.doBidiReorder(a[s])]);n.text=o}else n.text=r.doBidiReorder(a);r.setOptions({isInputVisual:!0})}])}(Bt),Bt.API.TTFFont=function(){function t(e){var r;if(this.rawData=e,r=this.contents=new Li(e),this.contents.pos=4,r.readString(4)==="ttcf")throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new ZT(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new MT(this.contents),this.head=new HT(this),this.name=new GT(this),this.cmap=new Qv(this),this.toUnicode={},this.hhea=new VT(this),this.maxp=new jT(this),this.hmtx=new WT(this),this.post=new zT(this),this.os2=new $T(this),this.loca=new JT(this),this.glyf=new XT(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var e,r,n,a,A;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,s,l,c;for(c=[],o=0,s=(l=this.bbox).length;o<s;o++)e=l[o],c.push(Math.round(e*this.scaleFactor));return c}).call(this),this.stemV=0,this.post.exists?(n=255&(a=this.post.italic_angle),32768&(r=a>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(A=this.familyClass)===1||A===2||A===3||A===4||A===5||A===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(e){var r;return((r=this.cmap.unicode)!=null?r.codeMap[e]:void 0)||0},t.prototype.widthOfGlyph=function(e){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*r},t.prototype.widthOfString=function(e,r,n){var a,A,o,s;for(o=0,A=0,s=(e=""+e).length;0<=s?A<s:A>s;A=0<=s?++A:--A)a=e.charCodeAt(A),o+=this.widthOfGlyph(this.characterToGlyph(a))+n*(1e3/r)||0;return o*(r/1e3)},t.prototype.lineHeight=function(e,r){var n;return r==null&&(r=!1),n=r?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},t}();var Wa,Li=function(){function t(e){this.data=e??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(e){return this.data[this.pos++]=e},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},t.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},t.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},t.prototype.readString=function(e){var r,n;for(n=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)n[r]=String.fromCharCode(this.readByte());return n.join("")},t.prototype.writeString=function(e){var r,n,a;for(a=[],r=0,n=e.length;0<=n?r<n:r>n;r=0<=n?++r:--r)a.push(this.writeByte(e.charCodeAt(r)));return a},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(e){return this.writeInt16(e)},t.prototype.readLongLong=function(){var e,r,n,a,A,o,s,l;return e=this.readByte(),r=this.readByte(),n=this.readByte(),a=this.readByte(),A=this.readByte(),o=this.readByte(),s=this.readByte(),l=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^r)+1099511627776*(255^n)+4294967296*(255^a)+16777216*(255^A)+65536*(255^o)+256*(255^s)+(255^l)+1):72057594037927940*e+281474976710656*r+1099511627776*n+4294967296*a+16777216*A+65536*o+256*s+l},t.prototype.writeLongLong=function(e){var r,n;return r=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(e){return this.writeInt32(e)},t.prototype.read=function(e){var r,n;for(r=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)r.push(this.readByte());return r},t.prototype.write=function(e){var r,n,a,A;for(A=[],n=0,a=e.length;n<a;n++)r=e[n],A.push(this.writeByte(r));return A},t}(),MT=function(){var t;function e(r){var n,a,A;for(this.scalarType=r.readInt(),this.tableCount=r.readShort(),this.searchRange=r.readShort(),this.entrySelector=r.readShort(),this.rangeShift=r.readShort(),this.tables={},a=0,A=this.tableCount;0<=A?a<A:a>A;a=0<=A?++a:--a)n={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[n.tag]=n}return e.prototype.encode=function(r){var n,a,A,o,s,l,c,u,p,h,d,w,g;for(g in d=Object.keys(r).length,l=Math.log(2),p=16*Math.floor(Math.log(d)/l),o=Math.floor(p/l),u=16*d-p,(a=new Li).writeInt(this.scalarType),a.writeShort(d),a.writeShort(p),a.writeShort(o),a.writeShort(u),A=16*d,c=a.pos+A,s=null,w=[],r)for(h=r[g],a.writeString(g),a.writeInt(t(h)),a.writeInt(c),a.writeInt(h.length),w=w.concat(h),g==="head"&&(s=c),c+=h.length;c%4;)w.push(0),c++;return a.write(w),n=2981146554-t(a.data),a.pos=s+8,a.writeUInt32(n),a.data},t=function(r){var n,a,A,o;for(r=Ov.call(r);r.length%4;)r.push(0);for(A=new Li(r),a=0,n=0,o=r.length;n<o;n=n+=4)a+=A.readUInt32();return 4294967295&a},e}(),RT={}.hasOwnProperty,EA=function(t,e){for(var r in e)RT.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};Wa=function(){function t(e){var r;this.file=e,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var HT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="head",e.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.revision=r.readInt(),this.checkSumAdjustment=r.readInt(),this.magicNumber=r.readInt(),this.flags=r.readShort(),this.unitsPerEm=r.readShort(),this.created=r.readLongLong(),this.modified=r.readLongLong(),this.xMin=r.readShort(),this.yMin=r.readShort(),this.xMax=r.readShort(),this.yMax=r.readShort(),this.macStyle=r.readShort(),this.lowestRecPPEM=r.readShort(),this.fontDirectionHint=r.readShort(),this.indexToLocFormat=r.readShort(),this.glyphDataFormat=r.readShort()},e.prototype.encode=function(r){var n;return(n=new Li).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(r),n.writeShort(this.glyphDataFormat),n.data},e}(),Dv=function(){function t(e,r){var n,a,A,o,s,l,c,u,p,h,d,w,g,y,m,F,N;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=r+e.readInt(),p=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=e.readByte();break;case 4:for(d=e.readUInt16(),h=d/2,e.pos+=6,A=function(){var Q,z;for(z=[],l=Q=0;0<=h?Q<h:Q>h;l=0<=h?++Q:--Q)z.push(e.readUInt16());return z}(),e.pos+=2,g=function(){var Q,z;for(z=[],l=Q=0;0<=h?Q<h:Q>h;l=0<=h?++Q:--Q)z.push(e.readUInt16());return z}(),c=function(){var Q,z;for(z=[],l=Q=0;0<=h?Q<h:Q>h;l=0<=h?++Q:--Q)z.push(e.readUInt16());return z}(),u=function(){var Q,z;for(z=[],l=Q=0;0<=h?Q<h:Q>h;l=0<=h?++Q:--Q)z.push(e.readUInt16());return z}(),a=(this.length-e.pos+this.offset)/2,s=function(){var Q,z;for(z=[],l=Q=0;0<=a?Q<a:Q>a;l=0<=a?++Q:--Q)z.push(e.readUInt16());return z}(),l=m=0,N=A.length;m<N;l=++m)for(y=A[l],n=F=w=g[l];w<=y?F<=y:F>=y;n=w<=y?++F:--F)u[l]===0?o=n+c[l]:(o=s[u[l]/2+(n-w)-(h-l)]||0)!==0&&(o+=c[l]),this.codeMap[n]=65535&o}e.pos=p}return t.encode=function(e,r){var n,a,A,o,s,l,c,u,p,h,d,w,g,y,m,F,N,Q,z,R,I,U,O,q,T,L,G,Y,se,he,ge,re,le,fe,Ue,b,_,B,x,S,D,W,ue,Ce,de,ke;switch(Y=new Li,o=Object.keys(e).sort(function(ne,Ee){return ne-Ee}),r){case"macroman":for(g=0,y=function(){var ne=[];for(w=0;w<256;++w)ne.push(0);return ne}(),F={0:0},A={},se=0,le=o.length;se<le;se++)F[ue=e[a=o[se]]]==null&&(F[ue]=++g),A[a]={old:e[a],new:F[e[a]]},y[a]=F[e[a]];return Y.writeUInt16(1),Y.writeUInt16(0),Y.writeUInt32(12),Y.writeUInt16(0),Y.writeUInt16(262),Y.writeUInt16(0),Y.write(y),{charMap:A,subtable:Y.data,maxGlyphID:g+1};case"unicode":for(L=[],p=[],N=0,F={},n={},m=c=null,he=0,fe=o.length;he<fe;he++)F[z=e[a=o[he]]]==null&&(F[z]=++N),n[a]={old:z,new:F[z]},s=F[z]-a,m!=null&&s===c||(m&&p.push(m),L.push(a),c=s),m=a;for(m&&p.push(m),p.push(65535),L.push(65535),q=2*(O=L.length),U=2*Math.pow(Math.log(O)/Math.LN2,2),h=Math.log(U/2)/Math.LN2,I=2*O-U,l=[],R=[],d=[],w=ge=0,Ue=L.length;ge<Ue;w=++ge){if(T=L[w],u=p[w],T===65535){l.push(0),R.push(0);break}if(T-(G=n[T].new)>=32768)for(l.push(0),R.push(2*(d.length+O-w)),a=re=T;T<=u?re<=u:re>=u;a=T<=u?++re:--re)d.push(n[a].new);else l.push(G-T),R.push(0)}for(Y.writeUInt16(3),Y.writeUInt16(1),Y.writeUInt32(12),Y.writeUInt16(4),Y.writeUInt16(16+8*O+2*d.length),Y.writeUInt16(0),Y.writeUInt16(q),Y.writeUInt16(U),Y.writeUInt16(h),Y.writeUInt16(I),D=0,b=p.length;D<b;D++)a=p[D],Y.writeUInt16(a);for(Y.writeUInt16(0),W=0,_=L.length;W<_;W++)a=L[W],Y.writeUInt16(a);for(Ce=0,B=l.length;Ce<B;Ce++)s=l[Ce],Y.writeUInt16(s);for(de=0,x=R.length;de<x;de++)Q=R[de],Y.writeUInt16(Q);for(ke=0,S=d.length;ke<S;ke++)g=d[ke],Y.writeUInt16(g);return{charMap:n,subtable:Y.data,maxGlyphID:N+1}}},t}(),Qv=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="cmap",e.prototype.parse=function(r){var n,a,A;for(r.pos=this.offset,this.version=r.readUInt16(),A=r.readUInt16(),this.tables=[],this.unicode=null,a=0;0<=A?a<A:a>A;a=0<=A?++a:--a)n=new Dv(r,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(r,n){var a,A;return n==null&&(n="macroman"),a=Dv.encode(r,n),(A=new Li).writeUInt16(0),A.writeUInt16(1),a.table=A.data.concat(a.subtable),a},e}(),VT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="hhea",e.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.ascender=r.readShort(),this.decender=r.readShort(),this.lineGap=r.readShort(),this.advanceWidthMax=r.readShort(),this.minLeftSideBearing=r.readShort(),this.minRightSideBearing=r.readShort(),this.xMaxExtent=r.readShort(),this.caretSlopeRise=r.readShort(),this.caretSlopeRun=r.readShort(),this.caretOffset=r.readShort(),r.pos+=8,this.metricDataFormat=r.readShort(),this.numberOfMetrics=r.readUInt16()},e}(),$T=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="OS/2",e.prototype.parse=function(r){if(r.pos=this.offset,this.version=r.readUInt16(),this.averageCharWidth=r.readShort(),this.weightClass=r.readUInt16(),this.widthClass=r.readUInt16(),this.type=r.readShort(),this.ySubscriptXSize=r.readShort(),this.ySubscriptYSize=r.readShort(),this.ySubscriptXOffset=r.readShort(),this.ySubscriptYOffset=r.readShort(),this.ySuperscriptXSize=r.readShort(),this.ySuperscriptYSize=r.readShort(),this.ySuperscriptXOffset=r.readShort(),this.ySuperscriptYOffset=r.readShort(),this.yStrikeoutSize=r.readShort(),this.yStrikeoutPosition=r.readShort(),this.familyClass=r.readShort(),this.panose=function(){var n,a;for(a=[],n=0;n<10;++n)a.push(r.readByte());return a}(),this.charRange=function(){var n,a;for(a=[],n=0;n<4;++n)a.push(r.readInt());return a}(),this.vendorID=r.readString(4),this.selection=r.readShort(),this.firstCharIndex=r.readShort(),this.lastCharIndex=r.readShort(),this.version>0&&(this.ascent=r.readShort(),this.descent=r.readShort(),this.lineGap=r.readShort(),this.winAscent=r.readShort(),this.winDescent=r.readShort(),this.codePageRange=function(){var n,a;for(a=[],n=0;n<2;n=++n)a.push(r.readInt());return a}(),this.version>1))return this.xHeight=r.readShort(),this.capHeight=r.readShort(),this.defaultChar=r.readShort(),this.breakChar=r.readShort(),this.maxContext=r.readShort()},e}(),zT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="post",e.prototype.parse=function(r){var n,a,A;switch(r.pos=this.offset,this.format=r.readInt(),this.italicAngle=r.readInt(),this.underlinePosition=r.readShort(),this.underlineThickness=r.readShort(),this.isFixedPitch=r.readInt(),this.minMemType42=r.readInt(),this.maxMemType42=r.readInt(),this.minMemType1=r.readInt(),this.maxMemType1=r.readInt(),this.format){case 65536:break;case 131072:var o;for(a=r.readUInt16(),this.glyphNameIndex=[],o=0;0<=a?o<a:o>a;o=0<=a?++o:--o)this.glyphNameIndex.push(r.readUInt16());for(this.names=[],A=[];r.pos<this.offset+this.length;)n=r.readByte(),A.push(this.names.push(r.readString(n)));return A;case 151552:return a=r.readUInt16(),this.offsets=r.read(a);case 196608:break;case 262144:return this.map=(function(){var s,l,c;for(c=[],o=s=0,l=this.file.maxp.numGlyphs;0<=l?s<l:s>l;o=0<=l?++s:--s)c.push(r.readUInt32());return c}).call(this)}},e}(),KT=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},GT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="name",e.prototype.parse=function(r){var n,a,A,o,s,l,c,u,p,h,d;for(r.pos=this.offset,r.readShort(),n=r.readShort(),l=r.readShort(),a=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)a.push({platformID:r.readShort(),encodingID:r.readShort(),languageID:r.readShort(),nameID:r.readShort(),length:r.readShort(),offset:this.offset+l+r.readShort()});for(c={},o=p=0,h=a.length;p<h;o=++p)A=a[o],r.pos=A.offset,u=r.readString(A.length),s=new KT(u,A),c[d=A.nameID]==null&&(c[d]=[]),c[A.nameID].push(s);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfamily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},e}(),jT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="maxp",e.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.numGlyphs=r.readUInt16(),this.maxPoints=r.readUInt16(),this.maxContours=r.readUInt16(),this.maxCompositePoints=r.readUInt16(),this.maxComponentContours=r.readUInt16(),this.maxZones=r.readUInt16(),this.maxTwilightPoints=r.readUInt16(),this.maxStorage=r.readUInt16(),this.maxFunctionDefs=r.readUInt16(),this.maxInstructionDefs=r.readUInt16(),this.maxStackElements=r.readUInt16(),this.maxSizeOfInstructions=r.readUInt16(),this.maxComponentElements=r.readUInt16(),this.maxComponentDepth=r.readUInt16()},e}(),WT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="hmtx",e.prototype.parse=function(r){var n,a,A,o,s,l,c;for(r.pos=this.offset,this.metrics=[],n=0,l=this.file.hhea.numberOfMetrics;0<=l?n<l:n>l;n=0<=l?++n:--n)this.metrics.push({advance:r.readUInt16(),lsb:r.readInt16()});for(A=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,p;for(p=[],n=u=0;0<=A?u<A:u>A;n=0<=A?++u:--u)p.push(r.readInt16());return p}(),this.widths=(function(){var u,p,h,d;for(d=[],u=0,p=(h=this.metrics).length;u<p;u++)o=h[u],d.push(o.advance);return d}).call(this),a=this.widths[this.widths.length-1],c=[],n=s=0;0<=A?s<A:s>A;n=0<=A?++s:--s)c.push(this.widths.push(a));return c},e.prototype.forGlyph=function(r){return r in this.metrics?this.metrics[r]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[r-this.metrics.length]}},e}(),Ov=[].slice,XT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(r){var n,a,A,o,s,l,c,u,p,h;return r in this.cache?this.cache[r]:(o=this.file.loca,n=this.file.contents,a=o.indexOf(r),(A=o.lengthOf(r))===0?this.cache[r]=null:(n.pos=this.offset+a,s=(l=new Li(n.read(A))).readShort(),u=l.readShort(),h=l.readShort(),c=l.readShort(),p=l.readShort(),this.cache[r]=s===-1?new YT(l,u,h,c,p):new qT(l,s,u,h,c,p),this.cache[r]))},e.prototype.encode=function(r,n,a){var A,o,s,l,c;for(s=[],o=[],l=0,c=n.length;l<c;l++)A=r[n[l]],o.push(s.length),A&&(s=s.concat(A.encode(a)));return o.push(s.length),{table:s,offsets:o}},e}(),qT=function(){function t(e,r,n,a,A,o){this.raw=e,this.numberOfContours=r,this.xMin=n,this.yMin=a,this.xMax=A,this.yMax=o,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),YT=function(){function t(e,r,n,a,A){var o,s;for(this.raw=e,this.xMin=r,this.yMin=n,this.xMax=a,this.yMax=A,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return t.prototype.encode=function(){var e,r,n;for(r=new Li(Ov.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)r.pos=this.glyphOffsets[e];return r.data},t}(),JT=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return EA(e,Wa),e.prototype.tag="loca",e.prototype.parse=function(r){var n,a;return r.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var A,o;for(o=[],a=0,A=this.length;a<A;a+=2)o.push(2*r.readUInt16());return o}).call(this):(function(){var A,o;for(o=[],a=0,A=this.length;a<A;a+=4)o.push(r.readUInt32());return o}).call(this)},e.prototype.indexOf=function(r){return this.offsets[r]},e.prototype.lengthOf=function(r){return this.offsets[r+1]-this.offsets[r]},e.prototype.encode=function(r,n){for(var a=new Uint32Array(this.offsets.length),A=0,o=0,s=0;s<a.length;++s)if(a[s]=A,o<n.length&&n[o]==s){++o,a[s]=A;var l=this.offsets[s],c=this.offsets[s+1]-l;c>0&&(A+=c)}for(var u=new Array(4*a.length),p=0;p<a.length;++p)u[4*p+3]=255&a[p],u[4*p+2]=(65280&a[p])>>8,u[4*p+1]=(16711680&a[p])>>16,u[4*p]=(4278190080&a[p])>>24;return u},e}(),ZT=function(){function t(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var e,r,n,a,A;for(r in a=this.font.cmap.tables[0].codeMap,e={},A=this.subset)n=A[r],e[r]=a[n];return e},t.prototype.glyphsFor=function(e){var r,n,a,A,o,s,l;for(a={},o=0,s=e.length;o<s;o++)a[A=e[o]]=this.font.glyf.glyphFor(A);for(A in r=[],a)(n=a[A])!=null&&n.compound&&r.push.apply(r,n.glyphIDs);if(r.length>0)for(A in l=this.glyphsFor(r))n=l[A],a[A]=n;return a},t.prototype.encode=function(e,r){var n,a,A,o,s,l,c,u,p,h,d,w,g,y,m;for(a in n=Qv.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),d={0:0},m=n.charMap)d[(l=m[a]).old]=l.new;for(w in h=n.maxGlyphID,o)w in d||(d[w]=h++);return u=function(F){var N,Q;for(N in Q={},F)Q[F[N]]=N;return Q}(d),p=Object.keys(u).sort(function(F,N){return F-N}),g=function(){var F,N,Q;for(Q=[],F=0,N=p.length;F<N;F++)s=p[F],Q.push(u[s]);return Q}(),A=this.font.glyf.encode(o,g,d),c=this.font.loca.encode(A.offsets,g),y={cmap:this.font.cmap.raw(),glyf:A.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},t}();Bt.API.PDFObject=function(){var t;function e(){}return t=function(r,n){return(Array(n+1).join("0")+r).slice(-n)},e.convert=function(r){var n,a,A,o;if(Array.isArray(r))return"["+function(){var s,l,c;for(c=[],s=0,l=r.length;s<l;s++)n=r[s],c.push(e.convert(n));return c}().join(" ")+"]";if(typeof r=="string")return"/"+r;if(r!=null&&r.isString)return"("+r+")";if(r instanceof Date)return"(D:"+t(r.getUTCFullYear(),4)+t(r.getUTCMonth(),2)+t(r.getUTCDate(),2)+t(r.getUTCHours(),2)+t(r.getUTCMinutes(),2)+t(r.getUTCSeconds(),2)+"Z)";if({}.toString.call(r)==="[object Object]"){for(a in A=["<<"],r)o=r[a],A.push("/"+a+" "+e.convert(o));return A.push(">>"),A.join(`
264
- `)}return""+r},e}();function KA({domElement:t,fileName:e}){if(t){const r={height:851.89,width:595.28},n=new Bt("","pt","a4");let a,A,o,s,l;return Ud(t).then(c=>{a=c.width,A=c.height;let u=A;const p=a/r.width*r.height;let h=0;if(o=r.width,s=582.28/a*A,l=c.toDataURL("image/png",1),u<p)n.addImage(l,"PNG",33,24,o*.9,s*.9,"","FAST");else for(;u>0;)n.addImage(l,"PNG",33,h,o*.9,s*.9,"","FAST"),u-=p,h-=r.height-24,u>0&&n.addPage();n.save(`${e}.pdf`)})}}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var ph={};ph.version="0.18.5";var Pv=1252,eN=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Mv=function(t){eN.indexOf(t)!=-1&&(Pv=t)};function tN(){Mv(1252)}var $l=function(t){Mv(t)};function rN(){$l(1200),tN()}function nN(t){for(var e=[],r=0;r<t.length>>1;++r)e[r]=String.fromCharCode(t.charCodeAt(2*r+1)+(t.charCodeAt(2*r)<<8));return e.join("")}var mh=function(e){return String.fromCharCode(e)},Rv=function(e){return String.fromCharCode(e)},mo,Ui="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function zl(t){for(var e="",r=0,n=0,a=0,A=0,o=0,s=0,l=0,c=0;c<t.length;)r=t.charCodeAt(c++),A=r>>2,n=t.charCodeAt(c++),o=(r&3)<<4|n>>4,a=t.charCodeAt(c++),s=(n&15)<<2|a>>6,l=a&63,isNaN(n)?s=l=64:isNaN(a)&&(l=64),e+=Ui.charAt(A)+Ui.charAt(o)+Ui.charAt(s)+Ui.charAt(l);return e}function GA(t){var e="",r=0,n=0,a=0,A=0,o=0,s=0,l=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<t.length;)A=Ui.indexOf(t.charAt(c++)),o=Ui.indexOf(t.charAt(c++)),r=A<<2|o>>4,e+=String.fromCharCode(r),s=Ui.indexOf(t.charAt(c++)),n=(o&15)<<4|s>>2,s!==64&&(e+=String.fromCharCode(n)),l=Ui.indexOf(t.charAt(c++)),a=(s&3)<<6|l,l!==64&&(e+=String.fromCharCode(a));return e}var Jt=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),jA=function(){if(typeof Buffer<"u"){var t=!Buffer.from;if(!t)try{Buffer.from("foo","utf8")}catch{t=!0}return t?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function yo(t){return Jt?Buffer.alloc?Buffer.alloc(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}function Hv(t){return Jt?Buffer.allocUnsafe?Buffer.allocUnsafe(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}var Xa=function(e){return Jt?jA(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)&255})};function yh(t){if(typeof ArrayBuffer>"u")return Xa(t);for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!=t.length;++n)r[n]=t.charCodeAt(n)&255;return e}function Kl(t){if(Array.isArray(t))return t.map(function(n){return String.fromCharCode(n)}).join("");for(var e=[],r=0;r<t.length;++r)e[r]=String.fromCharCode(t[r]);return e.join("")}function aN(t){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(t)}var wn=Jt?function(t){return Buffer.concat(t.map(function(e){return Buffer.isBuffer(e)?e:jA(e)}))}:function(t){if(typeof Uint8Array<"u"){var e=0,r=0;for(e=0;e<t.length;++e)r+=t[e].length;var n=new Uint8Array(r),a=0;for(e=0,r=0;e<t.length;r+=a,++e)if(a=t[e].length,t[e]instanceof Uint8Array)n.set(t[e],r);else{if(typeof t[e]=="string")throw"wtf";n.set(new Uint8Array(t[e]),r)}return n}return[].concat.apply([],t.map(function(A){return Array.isArray(A)?A:[].slice.call(A)}))};function AN(t){for(var e=[],r=0,n=t.length+250,a=yo(t.length+255),A=0;A<t.length;++A){var o=t.charCodeAt(A);if(o<128)a[r++]=o;else if(o<2048)a[r++]=192|o>>6&31,a[r++]=128|o&63;else if(o>=55296&&o<57344){o=(o&1023)+64;var s=t.charCodeAt(++A)&1023;a[r++]=240|o>>8&7,a[r++]=128|o>>2&63,a[r++]=128|s>>6&15|(o&3)<<4,a[r++]=128|s&63}else a[r++]=224|o>>12&15,a[r++]=128|o>>6&63,a[r++]=128|o&63;r>n&&(e.push(a.slice(0,r)),r=0,a=yo(65535),n=65530)}return e.push(a.slice(0,r)),wn(e)}var Gl=/\u0000/g,vh=/[\u0001-\u0006]/g;function ms(t){for(var e="",r=t.length-1;r>=0;)e+=t.charAt(r--);return e}function qa(t,e){var r=""+t;return r.length>=e?r:Tr("0",e-r.length)+r}function rg(t,e){var r=""+t;return r.length>=e?r:Tr(" ",e-r.length)+r}function wh(t,e){var r=""+t;return r.length>=e?r:r+Tr(" ",e-r.length)}function iN(t,e){var r=""+Math.round(t);return r.length>=e?r:Tr("0",e-r.length)+r}function oN(t,e){var r=""+t;return r.length>=e?r:Tr("0",e-r.length)+r}var Vv=Math.pow(2,32);function ys(t,e){if(t>Vv||t<-Vv)return iN(t,e);var r=Math.round(t);return oN(r,e)}function Bh(t,e){return e=e||0,t.length>=7+e&&(t.charCodeAt(e)|32)===103&&(t.charCodeAt(e+1)|32)===101&&(t.charCodeAt(e+2)|32)===110&&(t.charCodeAt(e+3)|32)===101&&(t.charCodeAt(e+4)|32)===114&&(t.charCodeAt(e+5)|32)===97&&(t.charCodeAt(e+6)|32)===108}var $v=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ng=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function sN(t){return t||(t={}),t[0]="General",t[1]="0",t[2]="0.00",t[3]="#,##0",t[4]="#,##0.00",t[9]="0%",t[10]="0.00%",t[11]="0.00E+00",t[12]="# ?/?",t[13]="# ??/??",t[14]="m/d/yy",t[15]="d-mmm-yy",t[16]="d-mmm",t[17]="mmm-yy",t[18]="h:mm AM/PM",t[19]="h:mm:ss AM/PM",t[20]="h:mm",t[21]="h:mm:ss",t[22]="m/d/yy h:mm",t[37]="#,##0 ;(#,##0)",t[38]="#,##0 ;[Red](#,##0)",t[39]="#,##0.00;(#,##0.00)",t[40]="#,##0.00;[Red](#,##0.00)",t[45]="mm:ss",t[46]="[h]:mm:ss",t[47]="mmss.0",t[48]="##0.0E+0",t[49]="@",t[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',t}var kr={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},zv={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},lN={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function xh(t,e,r){for(var n=t<0?-1:1,a=t*n,A=0,o=1,s=0,l=1,c=0,u=0,p=Math.floor(a);c<e&&(p=Math.floor(a),s=p*o+A,u=p*c+l,!(a-p<5e-8));)a=1/(a-p),A=o,o=s,l=c,c=u;if(u>e&&(c>e?(u=l,s=A):(u=c,s=o)),!r)return[0,n*s,u];var h=Math.floor(n*s/u);return[h,n*s-h*u,u]}function bh(t,e,r){if(t>2958465||t<0)return null;var n=t|0,a=Math.floor(86400*(t-n)),A=0,o=[],s={D:n,T:a,u:86400*(t-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),e&&e.date1904&&(n+=1462),s.u>.9999&&(s.u=0,++a==86400&&(s.T=a=0,++n,++s.D)),n===60)o=r?[1317,10,29]:[1900,2,29],A=3;else if(n===0)o=r?[1317,8,29]:[1900,1,0],A=6;else{n>60&&--n;var l=new Date(1900,0,1);l.setDate(l.getDate()+n-1),o=[l.getFullYear(),l.getMonth()+1,l.getDate()],A=l.getDay(),n<60&&(A=(A+6)%7),r&&(A=pN(l,o))}return s.y=o[0],s.m=o[1],s.d=o[2],s.S=a%60,a=Math.floor(a/60),s.M=a%60,a=Math.floor(a/60),s.H=a,s.q=A,s}var Kv=new Date(1899,11,31,0,0,0),cN=Kv.getTime(),uN=new Date(1900,2,1,0,0,0);function Gv(t,e){var r=t.getTime();return e?r-=1461*24*60*60*1e3:t>=uN&&(r+=24*60*60*1e3),(r-(cN+(t.getTimezoneOffset()-Kv.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function ag(t){return t.indexOf(".")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function hN(t){return t.indexOf("E")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function fN(t){var e=t<0?12:11,r=ag(t.toFixed(12));return r.length<=e||(r=t.toPrecision(10),r.length<=e)?r:t.toExponential(5)}function dN(t){var e=ag(t.toFixed(11));return e.length>(t<0?12:11)||e==="0"||e==="-0"?t.toPrecision(6):e}function gN(t){var e=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),r;return e>=-4&&e<=-1?r=t.toPrecision(10+e):Math.abs(e)<=9?r=fN(t):e===10?r=t.toFixed(10).substr(0,12):r=dN(t),ag(hN(r.toUpperCase()))}function Ag(t,e){switch(typeof t){case"string":return t;case"boolean":return t?"TRUE":"FALSE";case"number":return(t|0)===t?t.toString(10):gN(t);case"undefined":return"";case"object":if(t==null)return"";if(t instanceof Date)return Di(14,Gv(t,e&&e.date1904),e)}throw new Error("unsupported value in General format: "+t)}function pN(t,e){e[0]-=581;var r=t.getDay();return t<60&&(r=(r+6)%7),r}function mN(t,e,r,n){var a="",A=0,o=0,s=r.y,l,c=0;switch(t){case 98:s=r.y+543;case 121:switch(e.length){case 1:case 2:l=s%100,c=2;break;default:l=s%1e4,c=4;break}break;case 109:switch(e.length){case 1:case 2:l=r.m,c=e.length;break;case 3:return ng[r.m-1][1];case 5:return ng[r.m-1][0];default:return ng[r.m-1][2]}break;case 100:switch(e.length){case 1:case 2:l=r.d,c=e.length;break;case 3:return $v[r.q][0];default:return $v[r.q][1]}break;case 104:switch(e.length){case 1:case 2:l=1+(r.H+11)%12,c=e.length;break;default:throw"bad hour format: "+e}break;case 72:switch(e.length){case 1:case 2:l=r.H,c=e.length;break;default:throw"bad hour format: "+e}break;case 77:switch(e.length){case 1:case 2:l=r.M,c=e.length;break;default:throw"bad minute format: "+e}break;case 115:if(e!="s"&&e!="ss"&&e!=".0"&&e!=".00"&&e!=".000")throw"bad second format: "+e;return r.u===0&&(e=="s"||e=="ss")?qa(r.S,e.length):(n>=2?o=n===3?1e3:100:o=n===1?10:1,A=Math.round(o*(r.S+r.u)),A>=60*o&&(A=0),e==="s"?A===0?"0":""+A/o:(a=qa(A,2+n),e==="ss"?a.substr(0,2):"."+a.substr(2,e.length-1)));case 90:switch(e){case"[h]":case"[hh]":l=r.D*24+r.H;break;case"[m]":case"[mm]":l=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":l=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+e}c=e.length===3?1:2;break;case 101:l=s,c=1;break}var u=c>0?qa(l,c):"";return u}function Ii(t){var e=3;if(t.length<=e)return t;for(var r=t.length%e,n=t.substr(0,r);r!=t.length;r+=e)n+=(n.length>0?",":"")+t.substr(r,e);return n}var jv=/%/g;function yN(t,e,r){var n=e.replace(jv,""),a=e.length-n.length;return WA(t,n,r*Math.pow(10,2*a))+Tr("%",a)}function vN(t,e,r){for(var n=e.length-1;e.charCodeAt(n-1)===44;)--n;return WA(t,e.substr(0,n),r/Math.pow(10,3*(e.length-n)))}function Wv(t,e){var r,n=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(e==0)return"0.0E+0";if(e<0)return"-"+Wv(t,-e);var a=t.indexOf(".");a===-1&&(a=t.indexOf("E"));var A=Math.floor(Math.log(e)*Math.LOG10E)%a;if(A<0&&(A+=a),r=(e/Math.pow(10,A)).toPrecision(n+1+(a+A)%a),r.indexOf("e")===-1){var o=Math.floor(Math.log(e)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+A):r+="E+"+(o-A);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,c,u){return l+c+u.substr(0,(a+A)%a)+"."+u.substr(A)+"E"})}else r=e.toExponential(n);return t.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),t.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var Xv=/# (\?+)( ?)\/( ?)(\d+)/;function wN(t,e,r){var n=parseInt(t[4],10),a=Math.round(e*n),A=Math.floor(a/n),o=a-A*n,s=n;return r+(A===0?"":""+A)+" "+(o===0?Tr(" ",t[1].length+1+t[4].length):rg(o,t[1].length)+t[2]+"/"+t[3]+qa(s,t[4].length))}function BN(t,e,r){return r+(e===0?"":""+e)+Tr(" ",t[1].length+2+t[4].length)}var qv=/^#*0*\.([0#]+)/,Yv=/\).*[0#]/,Jv=/\(###\) ###\\?-####/;function Kn(t){for(var e="",r,n=0;n!=t.length;++n)switch(r=t.charCodeAt(n)){case 35:break;case 63:e+=" ";break;case 48:e+="0";break;default:e+=String.fromCharCode(r)}return e}function Zv(t,e){var r=Math.pow(10,e);return""+Math.round(t*r)/r}function ew(t,e){var r=t-Math.floor(t),n=Math.pow(10,e);return e<(""+Math.round(r*n)).length?0:Math.round(r*n)}function xN(t,e){return e<(""+Math.round((t-Math.floor(t))*Math.pow(10,e))).length?1:0}function bN(t){return t<2147483647&&t>-2147483648?""+(t>=0?t|0:t-1|0):""+Math.floor(t)}function La(t,e,r){if(t.charCodeAt(0)===40&&!e.match(Yv)){var n=e.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?La("n",n,r):"("+La("n",n,-r)+")"}if(e.charCodeAt(e.length-1)===44)return vN(t,e,r);if(e.indexOf("%")!==-1)return yN(t,e,r);if(e.indexOf("E")!==-1)return Wv(e,r);if(e.charCodeAt(0)===36)return"$"+La(t,e.substr(e.charAt(1)==" "?2:1),r);var a,A,o,s,l=Math.abs(r),c=r<0?"-":"";if(e.match(/^00+$/))return c+ys(l,e.length);if(e.match(/^[#?]+$/))return a=ys(r,0),a==="0"&&(a=""),a.length>e.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(Xv))return wN(A,l,c);if(e.match(/^#+0+$/))return c+ys(l,e.length-e.indexOf("0"));if(A=e.match(qv))return a=Zv(r,A[1].length).replace(/^([^\.]+)$/,"$1."+Kn(A[1])).replace(/\.$/,"."+Kn(A[1])).replace(/\.(\d*)$/,function(w,g){return"."+g+Tr("0",Kn(A[1]).length-g.length)}),e.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(e=e.replace(/^#+([0.])/,"$1"),A=e.match(/^(0*)\.(#*)$/))return c+Zv(l,A[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,A[1].length?"0.":".");if(A=e.match(/^#{1,3},##0(\.?)$/))return c+Ii(ys(l,0));if(A=e.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+La(t,e,-r):Ii(""+(Math.floor(r)+xN(r,A[1].length)))+"."+qa(ew(r,A[1].length),A[1].length);if(A=e.match(/^#,#*,#0/))return La(t,e.replace(/^#,#*,/,""),r);if(A=e.match(/^([0#]+)(\\?-([0#]+))+$/))return a=ms(La(t,e.replace(/[\\-]/g,""),r)),o=0,ms(ms(e.replace(/\\/g,"")).replace(/[0#]/g,function(w){return o<a.length?a.charAt(o++):w==="0"?"0":""}));if(e.match(Jv))return a=La(t,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var u="";if(A=e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(A[4].length,7),s=xh(l,Math.pow(10,o)-1,!1),a=""+c,u=WA("n",A[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),a+=u+A[2]+"/"+A[3],u=wh(s[2],o),u.length<A[4].length&&(u=Kn(A[4].substr(A[4].length-u.length))+u),a+=u,a;if(A=e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(A[1].length,A[4].length),7),s=xh(l,Math.pow(10,o)-1,!0),c+(s[0]||(s[1]?"":"0"))+" "+(s[1]?rg(s[1],o)+A[2]+"/"+A[3]+wh(s[2],o):Tr(" ",2*o+1+A[2].length+A[3].length));if(A=e.match(/^[#0?]+$/))return a=ys(r,0),e.length<=a.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(/^([#0?]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(A[2].length,10)).replace(/([^0])0+$/,"$1"),o=a.indexOf(".");var p=e.indexOf(".")-o,h=e.length-a.length-p;return Kn(e.substr(0,p)+a+e.substr(e.length-h))}if(A=e.match(/^00,000\.([#0]*0)$/))return o=ew(r,A[1].length),r<0?"-"+La(t,e,-r):Ii(bN(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(w){return"00,"+(w.length<3?qa(0,3-w.length):"")+w})+"."+qa(o,A[1].length);switch(e){case"###,##0.00":return La(t,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var d=Ii(ys(l,0));return d!=="0"?c+d:"";case"###,###.00":return La(t,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return La(t,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+e+"|")}function CN(t,e,r){for(var n=e.length-1;e.charCodeAt(n-1)===44;)--n;return WA(t,e.substr(0,n),r/Math.pow(10,3*(e.length-n)))}function EN(t,e,r){var n=e.replace(jv,""),a=e.length-n.length;return WA(t,n,r*Math.pow(10,2*a))+Tr("%",a)}function tw(t,e){var r,n=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(e==0)return"0.0E+0";if(e<0)return"-"+tw(t,-e);var a=t.indexOf(".");a===-1&&(a=t.indexOf("E"));var A=Math.floor(Math.log(e)*Math.LOG10E)%a;if(A<0&&(A+=a),r=(e/Math.pow(10,A)).toPrecision(n+1+(a+A)%a),!r.match(/[Ee]/)){var o=Math.floor(Math.log(e)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+A):r+="E+"+(o-A),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,c,u){return l+c+u.substr(0,(a+A)%a)+"."+u.substr(A)+"E"})}else r=e.toExponential(n);return t.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),t.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function _A(t,e,r){if(t.charCodeAt(0)===40&&!e.match(Yv)){var n=e.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?_A("n",n,r):"("+_A("n",n,-r)+")"}if(e.charCodeAt(e.length-1)===44)return CN(t,e,r);if(e.indexOf("%")!==-1)return EN(t,e,r);if(e.indexOf("E")!==-1)return tw(e,r);if(e.charCodeAt(0)===36)return"$"+_A(t,e.substr(e.charAt(1)==" "?2:1),r);var a,A,o,s,l=Math.abs(r),c=r<0?"-":"";if(e.match(/^00+$/))return c+qa(l,e.length);if(e.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>e.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(Xv))return BN(A,l,c);if(e.match(/^#+0+$/))return c+qa(l,e.length-e.indexOf("0"));if(A=e.match(qv))return a=(""+r).replace(/^([^\.]+)$/,"$1."+Kn(A[1])).replace(/\.$/,"."+Kn(A[1])),a=a.replace(/\.(\d*)$/,function(w,g){return"."+g+Tr("0",Kn(A[1]).length-g.length)}),e.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(e=e.replace(/^#+([0.])/,"$1"),A=e.match(/^(0*)\.(#*)$/))return c+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,A[1].length?"0.":".");if(A=e.match(/^#{1,3},##0(\.?)$/))return c+Ii(""+l);if(A=e.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+_A(t,e,-r):Ii(""+r)+"."+Tr("0",A[1].length);if(A=e.match(/^#,#*,#0/))return _A(t,e.replace(/^#,#*,/,""),r);if(A=e.match(/^([0#]+)(\\?-([0#]+))+$/))return a=ms(_A(t,e.replace(/[\\-]/g,""),r)),o=0,ms(ms(e.replace(/\\/g,"")).replace(/[0#]/g,function(w){return o<a.length?a.charAt(o++):w==="0"?"0":""}));if(e.match(Jv))return a=_A(t,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var u="";if(A=e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(A[4].length,7),s=xh(l,Math.pow(10,o)-1,!1),a=""+c,u=WA("n",A[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),a+=u+A[2]+"/"+A[3],u=wh(s[2],o),u.length<A[4].length&&(u=Kn(A[4].substr(A[4].length-u.length))+u),a+=u,a;if(A=e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(A[1].length,A[4].length),7),s=xh(l,Math.pow(10,o)-1,!0),c+(s[0]||(s[1]?"":"0"))+" "+(s[1]?rg(s[1],o)+A[2]+"/"+A[3]+wh(s[2],o):Tr(" ",2*o+1+A[2].length+A[3].length));if(A=e.match(/^[#0?]+$/))return a=""+r,e.length<=a.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(/^([#0]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(A[2].length,10)).replace(/([^0])0+$/,"$1"),o=a.indexOf(".");var p=e.indexOf(".")-o,h=e.length-a.length-p;return Kn(e.substr(0,p)+a+e.substr(e.length-h))}if(A=e.match(/^00,000\.([#0]*0)$/))return r<0?"-"+_A(t,e,-r):Ii(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(w){return"00,"+(w.length<3?qa(0,3-w.length):"")+w})+"."+qa(0,A[1].length);switch(e){case"###,###":case"##,###":case"#,###":var d=Ii(""+l);return d!=="0"?c+d:"";default:if(e.match(/\.[0#?]*$/))return _A(t,e.slice(0,e.lastIndexOf(".")),r)+Kn(e.slice(e.lastIndexOf(".")))}throw new Error("unsupported format |"+e+"|")}function WA(t,e,r){return(r|0)===r?_A(t,e,r):La(t,e,r)}function _N(t){for(var e=[],r=!1,n=0,a=0;n<t.length;++n)switch(t.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:e[e.length]=t.substr(a,n-a),a=n+1}if(e[e.length]=t.substr(a),r===!0)throw new Error("Format |"+t+"| unterminated string ");return e}var rw=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function nw(t){for(var e=0,r="",n="";e<t.length;)switch(r=t.charAt(e)){case"G":Bh(t,e)&&(e+=6),e++;break;case'"':for(;t.charCodeAt(++e)!==34&&e<t.length;);++e;break;case"\\":e+=2;break;case"_":e+=2;break;case"@":++e;break;case"B":case"b":if(t.charAt(e+1)==="1"||t.charAt(e+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(t.substr(e,3).toUpperCase()==="A/P"||t.substr(e,5).toUpperCase()==="AM/PM"||t.substr(e,5).toUpperCase()==="上午/下午")return!0;++e;break;case"[":for(n=r;t.charAt(e++)!=="]"&&e<t.length;)n+=t.charAt(e);if(n.match(rw))return!0;break;case".":case"0":case"#":for(;e<t.length&&("0#?.,E+-%".indexOf(r=t.charAt(++e))>-1||r=="\\"&&t.charAt(e+1)=="-"&&"0#".indexOf(t.charAt(e+2))>-1););break;case"?":for(;t.charAt(++e)===r;);break;case"*":++e,(t.charAt(e)==" "||t.charAt(e)=="*")&&++e;break;case"(":case")":++e;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;e<t.length&&"0123456789".indexOf(t.charAt(++e))>-1;);break;case" ":++e;break;default:++e;break}return!1}function FN(t,e,r,n){for(var a=[],A="",o=0,s="",l="t",c,u,p,h="H";o<t.length;)switch(s=t.charAt(o)){case"G":if(!Bh(t,o))throw new Error("unrecognized character "+s+" in "+t);a[a.length]={t:"G",v:"General"},o+=7;break;case'"':for(A="";(p=t.charCodeAt(++o))!==34&&o<t.length;)A+=String.fromCharCode(p);a[a.length]={t:"t",v:A},++o;break;case"\\":var d=t.charAt(++o),w=d==="("||d===")"?d:"t";a[a.length]={t:w,v:d},++o;break;case"_":a[a.length]={t:"t",v:" "},o+=2;break;case"@":a[a.length]={t:"T",v:e},++o;break;case"B":case"b":if(t.charAt(o+1)==="1"||t.charAt(o+1)==="2"){if(c==null&&(c=bh(e,r,t.charAt(o+1)==="2"),c==null))return"";a[a.length]={t:"X",v:t.substr(o,2)},l=s,o+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(e<0||c==null&&(c=bh(e,r),c==null))return"";for(A=s;++o<t.length&&t.charAt(o).toLowerCase()===s;)A+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),a[a.length]={t:s,v:A},l=s;break;case"A":case"a":case"上":var g={t:s,v:s};if(c==null&&(c=bh(e,r)),t.substr(o,3).toUpperCase()==="A/P"?(c!=null&&(g.v=c.H>=12?"P":"A"),g.t="T",h="h",o+=3):t.substr(o,5).toUpperCase()==="AM/PM"?(c!=null&&(g.v=c.H>=12?"PM":"AM"),g.t="T",o+=5,h="h"):t.substr(o,5).toUpperCase()==="上午/下午"?(c!=null&&(g.v=c.H>=12?"下午":"上午"),g.t="T",o+=5,h="h"):(g.t="t",++o),c==null&&g.t==="T")return"";a[a.length]=g,l=s;break;case"[":for(A=s;t.charAt(o++)!=="]"&&o<t.length;)A+=t.charAt(o);if(A.slice(-1)!=="]")throw'unterminated "[" block: |'+A+"|";if(A.match(rw)){if(c==null&&(c=bh(e,r),c==null))return"";a[a.length]={t:"Z",v:A.toLowerCase()},l=A.charAt(1)}else A.indexOf("$")>-1&&(A=(A.match(/\$([^-\[\]]*)/)||[])[1]||"$",nw(t)||(a[a.length]={t:"t",v:A}));break;case".":if(c!=null){for(A=s;++o<t.length&&(s=t.charAt(o))==="0";)A+=s;a[a.length]={t:"s",v:A};break}case"0":case"#":for(A=s;++o<t.length&&"0#?.,E+-%".indexOf(s=t.charAt(o))>-1;)A+=s;a[a.length]={t:"n",v:A};break;case"?":for(A=s;t.charAt(++o)===s;)A+=s;a[a.length]={t:s,v:A},l=s;break;case"*":++o,(t.charAt(o)==" "||t.charAt(o)=="*")&&++o;break;case"(":case")":a[a.length]={t:n===1?"t":s,v:s},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(A=s;o<t.length&&"0123456789".indexOf(t.charAt(++o))>-1;)A+=t.charAt(o);a[a.length]={t:"D",v:A};break;case" ":a[a.length]={t:s,v:s},++o;break;case"$":a[a.length]={t:"t",v:"$"},++o;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+t);a[a.length]={t:"t",v:s},++o;break}var y=0,m=0,F;for(o=a.length-1,l="t";o>=0;--o)switch(a[o].t){case"h":case"H":a[o].t=h,l="h",y<1&&(y=1);break;case"s":(F=a[o].v.match(/\.0+$/))&&(m=Math.max(m,F[0].length-1)),y<3&&(y=3);case"d":case"y":case"M":case"e":l=a[o].t;break;case"m":l==="s"&&(a[o].t="M",y<2&&(y=2));break;case"X":break;case"Z":y<1&&a[o].v.match(/[Hh]/)&&(y=1),y<2&&a[o].v.match(/[Mm]/)&&(y=2),y<3&&a[o].v.match(/[Ss]/)&&(y=3)}switch(y){case 0:break;case 1:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M),c.M>=60&&(c.M=0,++c.H);break;case 2:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M);break}var N="",Q;for(o=0;o<a.length;++o)switch(a[o].t){case"t":case"T":case" ":case"D":break;case"X":a[o].v="",a[o].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":a[o].v=mN(a[o].t.charCodeAt(0),a[o].v,c,m),a[o].t="t";break;case"n":case"?":for(Q=o+1;a[Q]!=null&&((s=a[Q].t)==="?"||s==="D"||(s===" "||s==="t")&&a[Q+1]!=null&&(a[Q+1].t==="?"||a[Q+1].t==="t"&&a[Q+1].v==="/")||a[o].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(a[Q].v==="/"||a[Q].v===" "&&a[Q+1]!=null&&a[Q+1].t=="?"));)a[o].v+=a[Q].v,a[Q]={v:"",t:";"},++Q;N+=a[o].v,o=Q-1;break;case"G":a[o].t="t",a[o].v=Ag(e,r);break}var z="",R,I;if(N.length>0){N.charCodeAt(0)==40?(R=e<0&&N.charCodeAt(0)===45?-e:e,I=WA("n",N,R)):(R=e<0&&n>1?-e:e,I=WA("n",N,R),R<0&&a[0]&&a[0].t=="t"&&(I=I.substr(1),a[0].v="-"+a[0].v)),Q=I.length-1;var U=a.length;for(o=0;o<a.length;++o)if(a[o]!=null&&a[o].t!="t"&&a[o].v.indexOf(".")>-1){U=o;break}var O=a.length;if(U===a.length&&I.indexOf("E")===-1){for(o=a.length-1;o>=0;--o)a[o]==null||"n?".indexOf(a[o].t)===-1||(Q>=a[o].v.length-1?(Q-=a[o].v.length,a[o].v=I.substr(Q+1,a[o].v.length)):Q<0?a[o].v="":(a[o].v=I.substr(0,Q+1),Q=-1),a[o].t="t",O=o);Q>=0&&O<a.length&&(a[O].v=I.substr(0,Q+1)+a[O].v)}else if(U!==a.length&&I.indexOf("E")===-1){for(Q=I.indexOf(".")-1,o=U;o>=0;--o)if(!(a[o]==null||"n?".indexOf(a[o].t)===-1)){for(u=a[o].v.indexOf(".")>-1&&o===U?a[o].v.indexOf(".")-1:a[o].v.length-1,z=a[o].v.substr(u+1);u>=0;--u)Q>=0&&(a[o].v.charAt(u)==="0"||a[o].v.charAt(u)==="#")&&(z=I.charAt(Q--)+z);a[o].v=z,a[o].t="t",O=o}for(Q>=0&&O<a.length&&(a[O].v=I.substr(0,Q+1)+a[O].v),Q=I.indexOf(".")+1,o=U;o<a.length;++o)if(!(a[o]==null||"n?(".indexOf(a[o].t)===-1&&o!==U)){for(u=a[o].v.indexOf(".")>-1&&o===U?a[o].v.indexOf(".")+1:0,z=a[o].v.substr(0,u);u<a[o].v.length;++u)Q<I.length&&(z+=I.charAt(Q++));a[o].v=z,a[o].t="t",O=o}}}for(o=0;o<a.length;++o)a[o]!=null&&"n?".indexOf(a[o].t)>-1&&(R=n>1&&e<0&&o>0&&a[o-1].v==="-"?-e:e,a[o].v=WA(a[o].t,a[o].v,R),a[o].t="t");var q="";for(o=0;o!==a.length;++o)a[o]!=null&&(q+=a[o].v);return q}var aw=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Aw(t,e){if(e==null)return!1;var r=parseFloat(e[2]);switch(e[1]){case"=":if(t==r)return!0;break;case">":if(t>r)return!0;break;case"<":if(t<r)return!0;break;case"<>":if(t!=r)return!0;break;case">=":if(t>=r)return!0;break;case"<=":if(t<=r)return!0;break}return!1}function SN(t,e){var r=_N(t),n=r.length,a=r[n-1].indexOf("@");if(n<4&&a>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof e!="number")return[4,r.length===4||a>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=a>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=a>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=a>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var A=e>0?r[0]:e<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,A];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var o=r[0].match(aw),s=r[1].match(aw);return Aw(e,o)?[n,r[0]]:Aw(e,s)?[n,r[1]]:[n,r[o!=null&&s!=null?2:1]]}return[n,A]}function Di(t,e,r){r==null&&(r={});var n="";switch(typeof t){case"string":t=="m/d/yy"&&r.dateNF?n=r.dateNF:n=t;break;case"number":t==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:kr)[t],n==null&&(n=r.table&&r.table[zv[t]]||kr[zv[t]]),n==null&&(n=lN[t]||"General");break}if(Bh(n,0))return Ag(e,r);e instanceof Date&&(e=Gv(e,r.date1904));var a=SN(n,e);if(Bh(a[1]))return Ag(e,r);if(e===!0)e="TRUE";else if(e===!1)e="FALSE";else if(e===""||e==null)return"";return FN(a[1],e,r,a[0])}function iw(t,e){if(typeof e!="number"){e=+e||-1;for(var r=0;r<392;++r){if(kr[r]==null){e<0&&(e=r);continue}if(kr[r]==t){e=r;break}}e<0&&(e=391)}return kr[e]=t,e}function Ch(t){for(var e=0;e!=392;++e)t[e]!==void 0&&iw(t[e],e)}function Eh(){kr=sN()}var ow=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function kN(t){var e=typeof t=="number"?kr[t]:t;return e=e.replace(ow,"(\\d+)"),new RegExp("^"+e+"$")}function TN(t,e,r){var n=-1,a=-1,A=-1,o=-1,s=-1,l=-1;(e.match(ow)||[]).forEach(function(p,h){var d=parseInt(r[h+1],10);switch(p.toLowerCase().charAt(0)){case"y":n=d;break;case"d":A=d;break;case"h":o=d;break;case"s":l=d;break;case"m":o>=0?s=d:a=d;break}}),l>=0&&s==-1&&a>=0&&(s=a,a=-1);var c=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(A>=1?A:1)).slice(-2);c.length==7&&(c="0"+c),c.length==8&&(c="20"+c);var u=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return o==-1&&s==-1&&l==-1?c:n==-1&&a==-1&&A==-1?u:c+"T"+u}var NN=function(){var t={};t.version="1.2.0";function e(){for(var I=0,U=new Array(256),O=0;O!=256;++O)I=O,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,U[O]=I;return typeof Int32Array<"u"?new Int32Array(U):U}var r=e();function n(I){var U=0,O=0,q=0,T=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(q=0;q!=256;++q)T[q]=I[q];for(q=0;q!=256;++q)for(O=I[q],U=256+q;U<4096;U+=256)O=T[U]=O>>>8^I[O&255];var L=[];for(q=1;q!=16;++q)L[q-1]=typeof Int32Array<"u"?T.subarray(q*256,q*256+256):T.slice(q*256,q*256+256);return L}var a=n(r),A=a[0],o=a[1],s=a[2],l=a[3],c=a[4],u=a[5],p=a[6],h=a[7],d=a[8],w=a[9],g=a[10],y=a[11],m=a[12],F=a[13],N=a[14];function Q(I,U){for(var O=U^-1,q=0,T=I.length;q<T;)O=O>>>8^r[(O^I.charCodeAt(q++))&255];return~O}function z(I,U){for(var O=U^-1,q=I.length-15,T=0;T<q;)O=N[I[T++]^O&255]^F[I[T++]^O>>8&255]^m[I[T++]^O>>16&255]^y[I[T++]^O>>>24]^g[I[T++]]^w[I[T++]]^d[I[T++]]^h[I[T++]]^p[I[T++]]^u[I[T++]]^c[I[T++]]^l[I[T++]]^s[I[T++]]^o[I[T++]]^A[I[T++]]^r[I[T++]];for(q+=15;T<q;)O=O>>>8^r[(O^I[T++])&255];return~O}function R(I,U){for(var O=U^-1,q=0,T=I.length,L=0,G=0;q<T;)L=I.charCodeAt(q++),L<128?O=O>>>8^r[(O^L)&255]:L<2048?(O=O>>>8^r[(O^(192|L>>6&31))&255],O=O>>>8^r[(O^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,G=I.charCodeAt(q++)&1023,O=O>>>8^r[(O^(240|L>>8&7))&255],O=O>>>8^r[(O^(128|L>>2&63))&255],O=O>>>8^r[(O^(128|G>>6&15|(L&3)<<4))&255],O=O>>>8^r[(O^(128|G&63))&255]):(O=O>>>8^r[(O^(224|L>>12&15))&255],O=O>>>8^r[(O^(128|L>>6&63))&255],O=O>>>8^r[(O^(128|L&63))&255]);return~O}return t.table=r,t.bstr=Q,t.buf=z,t.str=R,t}(),cr=function(){var e={};e.version="1.2.1";function r(H,ie){for(var Z=H.split("/"),ee=ie.split("/"),Ae=0,oe=0,Se=Math.min(Z.length,ee.length);Ae<Se;++Ae){if(oe=Z[Ae].length-ee[Ae].length)return oe;if(Z[Ae]!=ee[Ae])return Z[Ae]<ee[Ae]?-1:1}return Z.length-ee.length}function n(H){if(H.charAt(H.length-1)=="/")return H.slice(0,-1).indexOf("/")===-1?H:n(H.slice(0,-1));var ie=H.lastIndexOf("/");return ie===-1?H:H.slice(0,ie+1)}function a(H){if(H.charAt(H.length-1)=="/")return a(H.slice(0,-1));var ie=H.lastIndexOf("/");return ie===-1?H:H.slice(ie+1)}function A(H,ie){typeof ie=="string"&&(ie=new Date(ie));var Z=ie.getHours();Z=Z<<6|ie.getMinutes(),Z=Z<<5|ie.getSeconds()>>>1,H.write_shift(2,Z);var ee=ie.getFullYear()-1980;ee=ee<<4|ie.getMonth()+1,ee=ee<<5|ie.getDate(),H.write_shift(2,ee)}function o(H){var ie=H.read_shift(2)&65535,Z=H.read_shift(2)&65535,ee=new Date,Ae=Z&31;Z>>>=5;var oe=Z&15;Z>>>=4,ee.setMilliseconds(0),ee.setFullYear(Z+1980),ee.setMonth(oe-1),ee.setDate(Ae);var Se=ie&31;ie>>>=5;var Ie=ie&63;return ie>>>=6,ee.setHours(ie),ee.setMinutes(Ie),ee.setSeconds(Se<<1),ee}function s(H){ma(H,0);for(var ie={},Z=0;H.l<=H.length-4;){var ee=H.read_shift(2),Ae=H.read_shift(2),oe=H.l+Ae,Se={};switch(ee){case 21589:Z=H.read_shift(1),Z&1&&(Se.mtime=H.read_shift(4)),Ae>5&&(Z&2&&(Se.atime=H.read_shift(4)),Z&4&&(Se.ctime=H.read_shift(4))),Se.mtime&&(Se.mt=new Date(Se.mtime*1e3));break}H.l=oe,ie[ee]=Se}return ie}var l;function c(){return l||(l={})}function u(H,ie){if(H[0]==80&&H[1]==75)return Yt(H,ie);if((H[0]|32)==109&&(H[1]|32)==105)return oa(H,ie);if(H.length<512)throw new Error("CFB file size "+H.length+" < 512");var Z=3,ee=512,Ae=0,oe=0,Se=0,Ie=0,Fe=0,pe=[],X=H.slice(0,512);ma(X,0);var we=p(X);switch(Z=we[0],Z){case 3:ee=512;break;case 4:ee=4096;break;case 0:if(we[1]==0)return Yt(H,ie);default:throw new Error("Major Version: Expected 3 or 4 saw "+Z)}ee!==512&&(X=H.slice(0,ee),ma(X,28));var Le=H.slice(0,ee);h(X,Z);var Ke=X.read_shift(4,"i");if(Z===3&&Ke!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ke);X.l+=4,Se=X.read_shift(4,"i"),X.l+=4,X.chk("00100000","Mini Stream Cutoff Size: "),Ie=X.read_shift(4,"i"),Ae=X.read_shift(4,"i"),Fe=X.read_shift(4,"i"),oe=X.read_shift(4,"i");for(var ze=-1,qe=0;qe<109&&(ze=X.read_shift(4,"i"),!(ze<0));++qe)pe[qe]=ze;var ut=d(H,ee);y(Fe,oe,ut,ee,pe);var zt=F(ut,Se,pe,ee);zt[Se].name="!Directory",Ae>0&&Ie!==G&&(zt[Ie].name="!MiniFAT"),zt[pe[0]].name="!FAT",zt.fat_addrs=pe,zt.ssz=ee;var Ct={},Er=[],sa=[],IA=[];N(Se,zt,ut,Er,Ae,Ct,sa,Ie),w(sa,IA,Er),Er.shift();var DA={FileIndex:sa,FullPaths:IA};return ie&&ie.raw&&(DA.raw={header:Le,sectors:ut}),DA}function p(H){if(H[H.l]==80&&H[H.l+1]==75)return[0,0];H.chk(Y,"Header Signature: "),H.l+=16;var ie=H.read_shift(2,"u");return[H.read_shift(2,"u"),ie]}function h(H,ie){var Z=9;switch(H.l+=2,Z=H.read_shift(2)){case 9:if(ie!=3)throw new Error("Sector Shift: Expected 9 saw "+Z);break;case 12:if(ie!=4)throw new Error("Sector Shift: Expected 12 saw "+Z);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Z)}H.chk("0600","Mini Sector Shift: "),H.chk("000000000000","Reserved: ")}function d(H,ie){for(var Z=Math.ceil(H.length/ie)-1,ee=[],Ae=1;Ae<Z;++Ae)ee[Ae-1]=H.slice(Ae*ie,(Ae+1)*ie);return ee[Z-1]=H.slice(Z*ie),ee}function w(H,ie,Z){for(var ee=0,Ae=0,oe=0,Se=0,Ie=0,Fe=Z.length,pe=[],X=[];ee<Fe;++ee)pe[ee]=X[ee]=ee,ie[ee]=Z[ee];for(;Ie<X.length;++Ie)ee=X[Ie],Ae=H[ee].L,oe=H[ee].R,Se=H[ee].C,pe[ee]===ee&&(Ae!==-1&&pe[Ae]!==Ae&&(pe[ee]=pe[Ae]),oe!==-1&&pe[oe]!==oe&&(pe[ee]=pe[oe])),Se!==-1&&(pe[Se]=ee),Ae!==-1&&ee!=pe[ee]&&(pe[Ae]=pe[ee],X.lastIndexOf(Ae)<Ie&&X.push(Ae)),oe!==-1&&ee!=pe[ee]&&(pe[oe]=pe[ee],X.lastIndexOf(oe)<Ie&&X.push(oe));for(ee=1;ee<Fe;++ee)pe[ee]===ee&&(oe!==-1&&pe[oe]!==oe?pe[ee]=pe[oe]:Ae!==-1&&pe[Ae]!==Ae&&(pe[ee]=pe[Ae]));for(ee=1;ee<Fe;++ee)if(H[ee].type!==0){if(Ie=ee,Ie!=pe[Ie])do Ie=pe[Ie],ie[ee]=ie[Ie]+"/"+ie[ee];while(Ie!==0&&pe[Ie]!==-1&&Ie!=pe[Ie]);pe[ee]=-1}for(ie[0]+="/",ee=1;ee<Fe;++ee)H[ee].type!==2&&(ie[ee]+="/")}function g(H,ie,Z){for(var ee=H.start,Ae=H.size,oe=[],Se=ee;Z&&Ae>0&&Se>=0;)oe.push(ie.slice(Se*L,Se*L+L)),Ae-=L,Se=vo(Z,Se*4);return oe.length===0?Oe(0):wn(oe).slice(0,H.size)}function y(H,ie,Z,ee,Ae){var oe=G;if(H===G){if(ie!==0)throw new Error("DIFAT chain shorter than expected")}else if(H!==-1){var Se=Z[H],Ie=(ee>>>2)-1;if(!Se)return;for(var Fe=0;Fe<Ie&&(oe=vo(Se,Fe*4))!==G;++Fe)Ae.push(oe);y(vo(Se,ee-4),ie-1,Z,ee,Ae)}}function m(H,ie,Z,ee,Ae){var oe=[],Se=[];Ae||(Ae=[]);var Ie=ee-1,Fe=0,pe=0;for(Fe=ie;Fe>=0;){Ae[Fe]=!0,oe[oe.length]=Fe,Se.push(H[Fe]);var X=Z[Math.floor(Fe*4/ee)];if(pe=Fe*4&Ie,ee<4+pe)throw new Error("FAT boundary crossed: "+Fe+" 4 "+ee);if(!H[X])break;Fe=vo(H[X],pe)}return{nodes:oe,data:ww([Se])}}function F(H,ie,Z,ee){var Ae=H.length,oe=[],Se=[],Ie=[],Fe=[],pe=ee-1,X=0,we=0,Le=0,Ke=0;for(X=0;X<Ae;++X)if(Ie=[],Le=X+ie,Le>=Ae&&(Le-=Ae),!Se[Le]){Fe=[];var ze=[];for(we=Le;we>=0;){ze[we]=!0,Se[we]=!0,Ie[Ie.length]=we,Fe.push(H[we]);var qe=Z[Math.floor(we*4/ee)];if(Ke=we*4&pe,ee<4+Ke)throw new Error("FAT boundary crossed: "+we+" 4 "+ee);if(!H[qe]||(we=vo(H[qe],Ke),ze[we]))break}oe[Le]={nodes:Ie,data:ww([Fe])}}return oe}function N(H,ie,Z,ee,Ae,oe,Se,Ie){for(var Fe=0,pe=ee.length?2:0,X=ie[H].data,we=0,Le=0,Ke;we<X.length;we+=128){var ze=X.slice(we,we+128);ma(ze,64),Le=ze.read_shift(2),Ke=hg(ze,0,Le-pe),ee.push(Ke);var qe={name:Ke,type:ze.read_shift(1),color:ze.read_shift(1),L:ze.read_shift(4,"i"),R:ze.read_shift(4,"i"),C:ze.read_shift(4,"i"),clsid:ze.read_shift(16),state:ze.read_shift(4,"i"),start:0,size:0},ut=ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2);ut!==0&&(qe.ct=Q(ze,ze.l-8));var zt=ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2);zt!==0&&(qe.mt=Q(ze,ze.l-8)),qe.start=ze.read_shift(4,"i"),qe.size=ze.read_shift(4,"i"),qe.size<0&&qe.start<0&&(qe.size=qe.type=0,qe.start=G,qe.name=""),qe.type===5?(Fe=qe.start,Ae>0&&Fe!==G&&(ie[Fe].name="!StreamData")):qe.size>=4096?(qe.storage="fat",ie[qe.start]===void 0&&(ie[qe.start]=m(Z,qe.start,ie.fat_addrs,ie.ssz)),ie[qe.start].name=qe.name,qe.content=ie[qe.start].data.slice(0,qe.size)):(qe.storage="minifat",qe.size<0?qe.size=0:Fe!==G&&qe.start!==G&&ie[Fe]&&(qe.content=g(qe,ie[Fe].data,(ie[Ie]||{}).data))),qe.content&&ma(qe.content,0),oe[Ke]=qe,Se.push(qe)}}function Q(H,ie){return new Date((pa(H,ie+4)/1e7*Math.pow(2,32)+pa(H,ie)/1e7-11644473600)*1e3)}function z(H,ie){return c(),u(l.readFileSync(H),ie)}function R(H,ie){var Z=ie&&ie.type;switch(Z||Jt&&Buffer.isBuffer(H)&&(Z="buffer"),Z||"base64"){case"file":return z(H,ie);case"base64":return u(Xa(GA(H)),ie);case"binary":return u(Xa(H),ie)}return u(H,ie)}function I(H,ie){var Z=ie||{},ee=Z.root||"Root Entry";if(H.FullPaths||(H.FullPaths=[]),H.FileIndex||(H.FileIndex=[]),H.FullPaths.length!==H.FileIndex.length)throw new Error("inconsistent CFB structure");H.FullPaths.length===0&&(H.FullPaths[0]=ee+"/",H.FileIndex[0]={name:ee,type:5}),Z.CLSID&&(H.FileIndex[0].clsid=Z.CLSID),U(H)}function U(H){var ie="Sh33tJ5";if(!cr.find(H,"/"+ie)){var Z=Oe(4);Z[0]=55,Z[1]=Z[3]=50,Z[2]=54,H.FileIndex.push({name:ie,type:2,content:Z,size:4,L:69,R:69,C:69}),H.FullPaths.push(H.FullPaths[0]+ie),O(H)}}function O(H,ie){I(H);for(var Z=!1,ee=!1,Ae=H.FullPaths.length-1;Ae>=0;--Ae){var oe=H.FileIndex[Ae];switch(oe.type){case 0:ee?Z=!0:(H.FileIndex.pop(),H.FullPaths.pop());break;case 1:case 2:case 5:ee=!0,isNaN(oe.R*oe.L*oe.C)&&(Z=!0),oe.R>-1&&oe.L>-1&&oe.R==oe.L&&(Z=!0);break;default:Z=!0;break}}if(!(!Z&&!ie)){var Se=new Date(1987,1,19),Ie=0,Fe=Object.create?Object.create(null):{},pe=[];for(Ae=0;Ae<H.FullPaths.length;++Ae)Fe[H.FullPaths[Ae]]=!0,H.FileIndex[Ae].type!==0&&pe.push([H.FullPaths[Ae],H.FileIndex[Ae]]);for(Ae=0;Ae<pe.length;++Ae){var X=n(pe[Ae][0]);ee=Fe[X],ee||(pe.push([X,{name:a(X).replace("/",""),type:1,clsid:he,ct:Se,mt:Se,content:null}]),Fe[X]=!0)}for(pe.sort(function(Ke,ze){return r(Ke[0],ze[0])}),H.FullPaths=[],H.FileIndex=[],Ae=0;Ae<pe.length;++Ae)H.FullPaths[Ae]=pe[Ae][0],H.FileIndex[Ae]=pe[Ae][1];for(Ae=0;Ae<pe.length;++Ae){var we=H.FileIndex[Ae],Le=H.FullPaths[Ae];if(we.name=a(Le).replace("/",""),we.L=we.R=we.C=-(we.color=1),we.size=we.content?we.content.length:0,we.start=0,we.clsid=we.clsid||he,Ae===0)we.C=pe.length>1?1:-1,we.size=0,we.type=5;else if(Le.slice(-1)=="/"){for(Ie=Ae+1;Ie<pe.length&&n(H.FullPaths[Ie])!=Le;++Ie);for(we.C=Ie>=pe.length?-1:Ie,Ie=Ae+1;Ie<pe.length&&n(H.FullPaths[Ie])!=n(Le);++Ie);we.R=Ie>=pe.length?-1:Ie,we.type=1}else n(H.FullPaths[Ae+1]||"")==n(Le)&&(we.R=Ae+1),we.type=2}}}function q(H,ie){var Z=ie||{};if(Z.fileType=="mad")return gt(H,Z);switch(O(H),Z.fileType){case"zip":return Et(H,Z)}var ee=function(Ke){for(var ze=0,qe=0,ut=0;ut<Ke.FileIndex.length;++ut){var zt=Ke.FileIndex[ut];if(zt.content){var Ct=zt.content.length;Ct>0&&(Ct<4096?ze+=Ct+63>>6:qe+=Ct+511>>9)}}for(var Er=Ke.FullPaths.length+3>>2,sa=ze+7>>3,IA=ze+127>>7,DA=sa+qe+Er+IA,lA=DA+127>>7,QA=lA<=109?0:Math.ceil((lA-109)/127);DA+lA+QA+127>>7>lA;)QA=++lA<=109?0:Math.ceil((lA-109)/127);var ba=[1,QA,lA,IA,Er,qe,ze,0];return Ke.FileIndex[0].size=ze<<6,ba[7]=(Ke.FileIndex[0].start=ba[0]+ba[1]+ba[2]+ba[3]+ba[4]+ba[5])+(ba[6]+7>>3),ba}(H),Ae=Oe(ee[7]<<9),oe=0,Se=0;{for(oe=0;oe<8;++oe)Ae.write_shift(1,se[oe]);for(oe=0;oe<8;++oe)Ae.write_shift(2,0);for(Ae.write_shift(2,62),Ae.write_shift(2,3),Ae.write_shift(2,65534),Ae.write_shift(2,9),Ae.write_shift(2,6),oe=0;oe<3;++oe)Ae.write_shift(2,0);for(Ae.write_shift(4,0),Ae.write_shift(4,ee[2]),Ae.write_shift(4,ee[0]+ee[1]+ee[2]+ee[3]-1),Ae.write_shift(4,0),Ae.write_shift(4,4096),Ae.write_shift(4,ee[3]?ee[0]+ee[1]+ee[2]-1:G),Ae.write_shift(4,ee[3]),Ae.write_shift(-4,ee[1]?ee[0]-1:G),Ae.write_shift(4,ee[1]),oe=0;oe<109;++oe)Ae.write_shift(-4,oe<ee[2]?ee[1]+oe:-1)}if(ee[1])for(Se=0;Se<ee[1];++Se){for(;oe<236+Se*127;++oe)Ae.write_shift(-4,oe<ee[2]?ee[1]+oe:-1);Ae.write_shift(-4,Se===ee[1]-1?G:Se+1)}var Ie=function(Ke){for(Se+=Ke;oe<Se-1;++oe)Ae.write_shift(-4,oe+1);Ke&&(++oe,Ae.write_shift(-4,G))};for(Se=oe=0,Se+=ee[1];oe<Se;++oe)Ae.write_shift(-4,ge.DIFSECT);for(Se+=ee[2];oe<Se;++oe)Ae.write_shift(-4,ge.FATSECT);Ie(ee[3]),Ie(ee[4]);for(var Fe=0,pe=0,X=H.FileIndex[0];Fe<H.FileIndex.length;++Fe)X=H.FileIndex[Fe],X.content&&(pe=X.content.length,!(pe<4096)&&(X.start=Se,Ie(pe+511>>9)));for(Ie(ee[6]+7>>3);Ae.l&511;)Ae.write_shift(-4,ge.ENDOFCHAIN);for(Se=oe=0,Fe=0;Fe<H.FileIndex.length;++Fe)X=H.FileIndex[Fe],X.content&&(pe=X.content.length,!(!pe||pe>=4096)&&(X.start=Se,Ie(pe+63>>6)));for(;Ae.l&511;)Ae.write_shift(-4,ge.ENDOFCHAIN);for(oe=0;oe<ee[4]<<2;++oe){var we=H.FullPaths[oe];if(!we||we.length===0){for(Fe=0;Fe<17;++Fe)Ae.write_shift(4,0);for(Fe=0;Fe<3;++Fe)Ae.write_shift(4,-1);for(Fe=0;Fe<12;++Fe)Ae.write_shift(4,0);continue}X=H.FileIndex[oe],oe===0&&(X.start=X.size?X.start-1:G);var Le=oe===0&&Z.root||X.name;if(pe=2*(Le.length+1),Ae.write_shift(64,Le,"utf16le"),Ae.write_shift(2,pe),Ae.write_shift(1,X.type),Ae.write_shift(1,X.color),Ae.write_shift(-4,X.L),Ae.write_shift(-4,X.R),Ae.write_shift(-4,X.C),X.clsid)Ae.write_shift(16,X.clsid,"hex");else for(Fe=0;Fe<4;++Fe)Ae.write_shift(4,0);Ae.write_shift(4,X.state||0),Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(4,X.start),Ae.write_shift(4,X.size),Ae.write_shift(4,0)}for(oe=1;oe<H.FileIndex.length;++oe)if(X=H.FileIndex[oe],X.size>=4096)if(Ae.l=X.start+1<<9,Jt&&Buffer.isBuffer(X.content))X.content.copy(Ae,Ae.l,0,X.size),Ae.l+=X.size+511&-512;else{for(Fe=0;Fe<X.size;++Fe)Ae.write_shift(1,X.content[Fe]);for(;Fe&511;++Fe)Ae.write_shift(1,0)}for(oe=1;oe<H.FileIndex.length;++oe)if(X=H.FileIndex[oe],X.size>0&&X.size<4096)if(Jt&&Buffer.isBuffer(X.content))X.content.copy(Ae,Ae.l,0,X.size),Ae.l+=X.size+63&-64;else{for(Fe=0;Fe<X.size;++Fe)Ae.write_shift(1,X.content[Fe]);for(;Fe&63;++Fe)Ae.write_shift(1,0)}if(Jt)Ae.l=Ae.length;else for(;Ae.l<Ae.length;)Ae.write_shift(1,0);return Ae}function T(H,ie){var Z=H.FullPaths.map(function(Fe){return Fe.toUpperCase()}),ee=Z.map(function(Fe){var pe=Fe.split("/");return pe[pe.length-(Fe.slice(-1)=="/"?2:1)]}),Ae=!1;ie.charCodeAt(0)===47?(Ae=!0,ie=Z[0].slice(0,-1)+ie):Ae=ie.indexOf("/")!==-1;var oe=ie.toUpperCase(),Se=Ae===!0?Z.indexOf(oe):ee.indexOf(oe);if(Se!==-1)return H.FileIndex[Se];var Ie=!oe.match(vh);for(oe=oe.replace(Gl,""),Ie&&(oe=oe.replace(vh,"!")),Se=0;Se<Z.length;++Se)if((Ie?Z[Se].replace(vh,"!"):Z[Se]).replace(Gl,"")==oe||(Ie?ee[Se].replace(vh,"!"):ee[Se]).replace(Gl,"")==oe)return H.FileIndex[Se];return null}var L=64,G=-2,Y="d0cf11e0a1b11ae1",se=[208,207,17,224,161,177,26,225],he="00000000000000000000000000000000",ge={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:G,FREESECT:-1,HEADER_SIGNATURE:Y,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:he,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function re(H,ie,Z){c();var ee=q(H,Z);l.writeFileSync(ie,ee)}function le(H){for(var ie=new Array(H.length),Z=0;Z<H.length;++Z)ie[Z]=String.fromCharCode(H[Z]);return ie.join("")}function fe(H,ie){var Z=q(H,ie);switch(ie&&ie.type||"buffer"){case"file":return c(),l.writeFileSync(ie.filename,Z),Z;case"binary":return typeof Z=="string"?Z:le(Z);case"base64":return zl(typeof Z=="string"?Z:le(Z));case"buffer":if(Jt)return Buffer.isBuffer(Z)?Z:jA(Z);case"array":return typeof Z=="string"?Xa(Z):Z}return Z}var Ue;function b(H){try{var ie=H.InflateRaw,Z=new ie;if(Z._processChunk(new Uint8Array([3,0]),Z._finishFlushFlag),Z.bytesRead)Ue=H;else throw new Error("zlib does not expose bytesRead")}catch(ee){console.error("cannot use native zlib: "+(ee.message||ee))}}function _(H,ie){if(!Ue)return Rt(H,ie);var Z=Ue.InflateRaw,ee=new Z,Ae=ee._processChunk(H.slice(H.l),ee._finishFlushFlag);return H.l+=ee.bytesRead,Ae}function B(H){return Ue?Ue.deflateRawSync(H):xt(H)}var x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],D=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function W(H){var ie=(H<<1|H<<11)&139536|(H<<5|H<<15)&558144;return(ie>>16|ie>>8|ie)&255}for(var ue=typeof Uint8Array<"u",Ce=ue?new Uint8Array(256):[],de=0;de<256;++de)Ce[de]=W(de);function ke(H,ie){var Z=Ce[H&255];return ie<=8?Z>>>8-ie:(Z=Z<<8|Ce[H>>8&255],ie<=16?Z>>>16-ie:(Z=Z<<8|Ce[H>>16&255],Z>>>24-ie))}function ne(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=6?0:H[ee+1]<<8))>>>Z&3}function Ee(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=5?0:H[ee+1]<<8))>>>Z&7}function xe(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=4?0:H[ee+1]<<8))>>>Z&15}function te(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=3?0:H[ee+1]<<8))>>>Z&31}function Pe(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=1?0:H[ee+1]<<8))>>>Z&127}function rt(H,ie,Z){var ee=ie&7,Ae=ie>>>3,oe=(1<<Z)-1,Se=H[Ae]>>>ee;return Z<8-ee||(Se|=H[Ae+1]<<8-ee,Z<16-ee)||(Se|=H[Ae+2]<<16-ee,Z<24-ee)||(Se|=H[Ae+3]<<24-ee),Se&oe}function Ve(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return ee<=5?H[Ae]|=(Z&7)<<ee:(H[Ae]|=Z<<ee&255,H[Ae+1]=(Z&7)>>8-ee),ie+3}function We(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return Z=(Z&1)<<ee,H[Ae]|=Z,ie+1}function Ye(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return Z<<=ee,H[Ae]|=Z&255,Z>>>=8,H[Ae+1]=Z,ie+8}function Je(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return Z<<=ee,H[Ae]|=Z&255,Z>>>=8,H[Ae+1]=Z&255,H[Ae+2]=Z>>>8,ie+16}function ot(H,ie){var Z=H.length,ee=2*Z>ie?2*Z:ie+5,Ae=0;if(Z>=ie)return H;if(Jt){var oe=Hv(ee);if(H.copy)H.copy(oe);else for(;Ae<H.length;++Ae)oe[Ae]=H[Ae];return oe}else if(ue){var Se=new Uint8Array(ee);if(Se.set)Se.set(H);else for(;Ae<Z;++Ae)Se[Ae]=H[Ae];return Se}return H.length=ee,H}function at(H){for(var ie=new Array(H),Z=0;Z<H;++Z)ie[Z]=0;return ie}function ft(H,ie,Z){var ee=1,Ae=0,oe=0,Se=0,Ie=0,Fe=H.length,pe=ue?new Uint16Array(32):at(32);for(oe=0;oe<32;++oe)pe[oe]=0;for(oe=Fe;oe<Z;++oe)H[oe]=0;Fe=H.length;var X=ue?new Uint16Array(Fe):at(Fe);for(oe=0;oe<Fe;++oe)pe[Ae=H[oe]]++,ee<Ae&&(ee=Ae),X[oe]=0;for(pe[0]=0,oe=1;oe<=ee;++oe)pe[oe+16]=Ie=Ie+pe[oe-1]<<1;for(oe=0;oe<Fe;++oe)Ie=H[oe],Ie!=0&&(X[oe]=pe[Ie+16]++);var we=0;for(oe=0;oe<Fe;++oe)if(we=H[oe],we!=0)for(Ie=ke(X[oe],ee)>>ee-we,Se=(1<<ee+4-we)-1;Se>=0;--Se)ie[Ie|Se<<we]=we&15|oe<<4;return ee}var yt=ue?new Uint16Array(512):at(512),kt=ue?new Uint16Array(32):at(32);if(!ue){for(var Nt=0;Nt<512;++Nt)yt[Nt]=0;for(Nt=0;Nt<32;++Nt)kt[Nt]=0}(function(){for(var H=[],ie=0;ie<32;ie++)H.push(5);ft(H,kt,32);var Z=[];for(ie=0;ie<=143;ie++)Z.push(8);for(;ie<=255;ie++)Z.push(9);for(;ie<=279;ie++)Z.push(7);for(;ie<=287;ie++)Z.push(8);ft(Z,yt,288)})();var dt=function(){for(var ie=ue?new Uint8Array(32768):[],Z=0,ee=0;Z<D.length-1;++Z)for(;ee<D[Z+1];++ee)ie[ee]=Z;for(;ee<32768;++ee)ie[ee]=29;var Ae=ue?new Uint8Array(259):[];for(Z=0,ee=0;Z<S.length-1;++Z)for(;ee<S[Z+1];++ee)Ae[ee]=Z;function oe(Ie,Fe){for(var pe=0;pe<Ie.length;){var X=Math.min(65535,Ie.length-pe),we=pe+X==Ie.length;for(Fe.write_shift(1,+we),Fe.write_shift(2,X),Fe.write_shift(2,~X&65535);X-- >0;)Fe[Fe.l++]=Ie[pe++]}return Fe.l}function Se(Ie,Fe){for(var pe=0,X=0,we=ue?new Uint16Array(32768):[];X<Ie.length;){var Le=Math.min(65535,Ie.length-X);if(Le<10){for(pe=Ve(Fe,pe,+(X+Le==Ie.length)),pe&7&&(pe+=8-(pe&7)),Fe.l=pe/8|0,Fe.write_shift(2,Le),Fe.write_shift(2,~Le&65535);Le-- >0;)Fe[Fe.l++]=Ie[X++];pe=Fe.l*8;continue}pe=Ve(Fe,pe,+(X+Le==Ie.length)+2);for(var Ke=0;Le-- >0;){var ze=Ie[X];Ke=(Ke<<5^ze)&32767;var qe=-1,ut=0;if((qe=we[Ke])&&(qe|=X&-32768,qe>X&&(qe-=32768),qe<X))for(;Ie[qe+ut]==Ie[X+ut]&&ut<250;)++ut;if(ut>2){ze=Ae[ut],ze<=22?pe=Ye(Fe,pe,Ce[ze+1]>>1)-1:(Ye(Fe,pe,3),pe+=5,Ye(Fe,pe,Ce[ze-23]>>5),pe+=3);var zt=ze<8?0:ze-4>>2;zt>0&&(Je(Fe,pe,ut-S[ze]),pe+=zt),ze=ie[X-qe],pe=Ye(Fe,pe,Ce[ze]>>3),pe-=3;var Ct=ze<4?0:ze-2>>1;Ct>0&&(Je(Fe,pe,X-qe-D[ze]),pe+=Ct);for(var Er=0;Er<ut;++Er)we[Ke]=X&32767,Ke=(Ke<<5^Ie[X])&32767,++X;Le-=ut-1}else ze<=143?ze=ze+48:pe=We(Fe,pe,1),pe=Ye(Fe,pe,Ce[ze]),we[Ke]=X&32767,++X}pe=Ye(Fe,pe,0)-1}return Fe.l=(pe+7)/8|0,Fe.l}return function(Fe,pe){return Fe.length<8?oe(Fe,pe):Se(Fe,pe)}}();function xt(H){var ie=Oe(50+Math.floor(H.length*1.1)),Z=dt(H,ie);return ie.slice(0,Z)}var tt=ue?new Uint16Array(32768):at(32768),ir=ue?new Uint16Array(32768):at(32768),Lt=ue?new Uint16Array(128):at(128),fr=1,Qt=1;function Kt(H,ie){var Z=te(H,ie)+257;ie+=5;var ee=te(H,ie)+1;ie+=5;var Ae=xe(H,ie)+4;ie+=4;for(var oe=0,Se=ue?new Uint8Array(19):at(19),Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Fe=1,pe=ue?new Uint8Array(8):at(8),X=ue?new Uint8Array(8):at(8),we=Se.length,Le=0;Le<Ae;++Le)Se[x[Le]]=oe=Ee(H,ie),Fe<oe&&(Fe=oe),pe[oe]++,ie+=3;var Ke=0;for(pe[0]=0,Le=1;Le<=Fe;++Le)X[Le]=Ke=Ke+pe[Le-1]<<1;for(Le=0;Le<we;++Le)(Ke=Se[Le])!=0&&(Ie[Le]=X[Ke]++);var ze=0;for(Le=0;Le<we;++Le)if(ze=Se[Le],ze!=0){Ke=Ce[Ie[Le]]>>8-ze;for(var qe=(1<<7-ze)-1;qe>=0;--qe)Lt[Ke|qe<<ze]=ze&7|Le<<3}var ut=[];for(Fe=1;ut.length<Z+ee;)switch(Ke=Lt[Pe(H,ie)],ie+=Ke&7,Ke>>>=3){case 16:for(oe=3+ne(H,ie),ie+=2,Ke=ut[ut.length-1];oe-- >0;)ut.push(Ke);break;case 17:for(oe=3+Ee(H,ie),ie+=3;oe-- >0;)ut.push(0);break;case 18:for(oe=11+Pe(H,ie),ie+=7;oe-- >0;)ut.push(0);break;default:ut.push(Ke),Fe<Ke&&(Fe=Ke);break}var zt=ut.slice(0,Z),Ct=ut.slice(Z);for(Le=Z;Le<286;++Le)zt[Le]=0;for(Le=ee;Le<30;++Le)Ct[Le]=0;return fr=ft(zt,tt,286),Qt=ft(Ct,ir,30),ie}function Jr(H,ie){if(H[0]==3&&!(H[1]&3))return[yo(ie),2];for(var Z=0,ee=0,Ae=Hv(ie||1<<18),oe=0,Se=Ae.length>>>0,Ie=0,Fe=0;!(ee&1);){if(ee=Ee(H,Z),Z+=3,ee>>>1)ee>>1==1?(Ie=9,Fe=5):(Z=Kt(H,Z),Ie=fr,Fe=Qt);else{Z&7&&(Z+=8-(Z&7));var pe=H[Z>>>3]|H[(Z>>>3)+1]<<8;if(Z+=32,pe>0)for(!ie&&Se<oe+pe&&(Ae=ot(Ae,oe+pe),Se=Ae.length);pe-- >0;)Ae[oe++]=H[Z>>>3],Z+=8;continue}for(;;){!ie&&Se<oe+32767&&(Ae=ot(Ae,oe+32767),Se=Ae.length);var X=rt(H,Z,Ie),we=ee>>>1==1?yt[X]:tt[X];if(Z+=we&15,we>>>=4,!(we>>>8&255))Ae[oe++]=we;else{if(we==256)break;we-=257;var Le=we<8?0:we-4>>2;Le>5&&(Le=0);var Ke=oe+S[we];Le>0&&(Ke+=rt(H,Z,Le),Z+=Le),X=rt(H,Z,Fe),we=ee>>>1==1?kt[X]:ir[X],Z+=we&15,we>>>=4;var ze=we<4?0:we-2>>1,qe=D[we];for(ze>0&&(qe+=rt(H,Z,ze),Z+=ze),!ie&&Se<Ke&&(Ae=ot(Ae,Ke+100),Se=Ae.length);oe<Ke;)Ae[oe]=Ae[oe-qe],++oe}}}return ie?[Ae,Z+7>>>3]:[Ae.slice(0,oe),Z+7>>>3]}function Rt(H,ie){var Z=H.slice(H.l||0),ee=Jr(Z,ie);return H.l+=ee[1],ee[0]}function _r(H,ie){if(H)typeof console<"u"&&console.error(ie);else throw new Error(ie)}function Yt(H,ie){var Z=H;ma(Z,0);var ee=[],Ae=[],oe={FileIndex:ee,FullPaths:Ae};I(oe,{root:ie.root});for(var Se=Z.length-4;(Z[Se]!=80||Z[Se+1]!=75||Z[Se+2]!=5||Z[Se+3]!=6)&&Se>=0;)--Se;Z.l=Se+4,Z.l+=4;var Ie=Z.read_shift(2);Z.l+=6;var Fe=Z.read_shift(4);for(Z.l=Fe,Se=0;Se<Ie;++Se){Z.l+=20;var pe=Z.read_shift(4),X=Z.read_shift(4),we=Z.read_shift(2),Le=Z.read_shift(2),Ke=Z.read_shift(2);Z.l+=8;var ze=Z.read_shift(4),qe=s(Z.slice(Z.l+we,Z.l+we+Le));Z.l+=we+Le+Ke;var ut=Z.l;Z.l=ze+4,on(Z,pe,X,oe,qe),Z.l=ut}return oe}function on(H,ie,Z,ee,Ae){H.l+=2;var oe=H.read_shift(2),Se=H.read_shift(2),Ie=o(H);if(oe&8257)throw new Error("Unsupported ZIP encryption");for(var Fe=H.read_shift(4),pe=H.read_shift(4),X=H.read_shift(4),we=H.read_shift(2),Le=H.read_shift(2),Ke="",ze=0;ze<we;++ze)Ke+=String.fromCharCode(H[H.l++]);if(Le){var qe=s(H.slice(H.l,H.l+Le));(qe[21589]||{}).mt&&(Ie=qe[21589].mt),((Ae||{})[21589]||{}).mt&&(Ie=Ae[21589].mt)}H.l+=Le;var ut=H.slice(H.l,H.l+pe);switch(Se){case 8:ut=_(H,X);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+Se)}var zt=!1;oe&8&&(Fe=H.read_shift(4),Fe==134695760&&(Fe=H.read_shift(4),zt=!0),pe=H.read_shift(4),X=H.read_shift(4)),pe!=ie&&_r(zt,"Bad compressed size: "+ie+" != "+pe),X!=Z&&_r(zt,"Bad uncompressed size: "+Z+" != "+X),Mn(ee,Ke,ut,{unsafe:!0,mt:Ie})}function Et(H,ie){var Z=ie||{},ee=[],Ae=[],oe=Oe(1),Se=Z.compression?8:0,Ie=0,Fe=0,pe=0,X=0,we=0,Le=H.FullPaths[0],Ke=Le,ze=H.FileIndex[0],qe=[],ut=0;for(Fe=1;Fe<H.FullPaths.length;++Fe)if(Ke=H.FullPaths[Fe].slice(Le.length),ze=H.FileIndex[Fe],!(!ze.size||!ze.content||Ke=="Sh33tJ5")){var zt=X,Ct=Oe(Ke.length);for(pe=0;pe<Ke.length;++pe)Ct.write_shift(1,Ke.charCodeAt(pe)&127);Ct=Ct.slice(0,Ct.l),qe[we]=NN.buf(ze.content,0);var Er=ze.content;Se==8&&(Er=B(Er)),oe=Oe(30),oe.write_shift(4,67324752),oe.write_shift(2,20),oe.write_shift(2,Ie),oe.write_shift(2,Se),ze.mt?A(oe,ze.mt):oe.write_shift(4,0),oe.write_shift(-4,qe[we]),oe.write_shift(4,Er.length),oe.write_shift(4,ze.content.length),oe.write_shift(2,Ct.length),oe.write_shift(2,0),X+=oe.length,ee.push(oe),X+=Ct.length,ee.push(Ct),X+=Er.length,ee.push(Er),oe=Oe(46),oe.write_shift(4,33639248),oe.write_shift(2,0),oe.write_shift(2,20),oe.write_shift(2,Ie),oe.write_shift(2,Se),oe.write_shift(4,0),oe.write_shift(-4,qe[we]),oe.write_shift(4,Er.length),oe.write_shift(4,ze.content.length),oe.write_shift(2,Ct.length),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(4,0),oe.write_shift(4,zt),ut+=oe.l,Ae.push(oe),ut+=Ct.length,Ae.push(Ct),++we}return oe=Oe(22),oe.write_shift(4,101010256),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(2,we),oe.write_shift(2,we),oe.write_shift(4,ut),oe.write_shift(4,X),oe.write_shift(2,0),wn([wn(ee),wn(Ae),oe])}var Gt={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function bt(H,ie){if(H.ctype)return H.ctype;var Z=H.name||"",ee=Z.match(/\.([^\.]+)$/);return ee&&Gt[ee[1]]||ie&&(ee=(Z=ie).match(/[\.\\]([^\.\\])+$/),ee&&Gt[ee[1]])?Gt[ee[1]]:"application/octet-stream"}function $t(H){for(var ie=zl(H),Z=[],ee=0;ee<ie.length;ee+=76)Z.push(ie.slice(ee,ee+76));return Z.join(`\r
264
+ `)}return""+r},e}();function KA({domElement:t,fileName:e}){if(t){const r={height:851.89,width:595.28},n=new Bt("","pt","a4");let a,A,o,s,l;return Ud(t).then(c=>{a=c.width,A=c.height;let u=A;const p=a/r.width*r.height;let h=0;if(o=r.width,s=582.28/a*A,l=c.toDataURL("image/png",1),u<p)n.addImage(l,"PNG",33,24,o*.9,s*.9,"","FAST");else for(;u>0;)n.addImage(l,"PNG",33,h,o*.9,s*.9,"","FAST"),u-=p,h-=r.height-24,u>0&&n.addPage();n.save(`${e}.pdf`)})}}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var ph={};ph.version="0.18.5";var Pv=1252,eN=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Mv=function(t){eN.indexOf(t)!=-1&&(Pv=t)};function tN(){Mv(1252)}var $l=function(t){Mv(t)};function rN(){$l(1200),tN()}function nN(t){for(var e=[],r=0;r<t.length>>1;++r)e[r]=String.fromCharCode(t.charCodeAt(2*r+1)+(t.charCodeAt(2*r)<<8));return e.join("")}var mh=function(e){return String.fromCharCode(e)},Rv=function(e){return String.fromCharCode(e)},mo,Ui="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function zl(t){for(var e="",r=0,n=0,a=0,A=0,o=0,s=0,l=0,c=0;c<t.length;)r=t.charCodeAt(c++),A=r>>2,n=t.charCodeAt(c++),o=(r&3)<<4|n>>4,a=t.charCodeAt(c++),s=(n&15)<<2|a>>6,l=a&63,isNaN(n)?s=l=64:isNaN(a)&&(l=64),e+=Ui.charAt(A)+Ui.charAt(o)+Ui.charAt(s)+Ui.charAt(l);return e}function GA(t){var e="",r=0,n=0,a=0,A=0,o=0,s=0,l=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<t.length;)A=Ui.indexOf(t.charAt(c++)),o=Ui.indexOf(t.charAt(c++)),r=A<<2|o>>4,e+=String.fromCharCode(r),s=Ui.indexOf(t.charAt(c++)),n=(o&15)<<4|s>>2,s!==64&&(e+=String.fromCharCode(n)),l=Ui.indexOf(t.charAt(c++)),a=(s&3)<<6|l,l!==64&&(e+=String.fromCharCode(a));return e}var Jt=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),jA=function(){if(typeof Buffer<"u"){var t=!Buffer.from;if(!t)try{Buffer.from("foo","utf8")}catch{t=!0}return t?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function yo(t){return Jt?Buffer.alloc?Buffer.alloc(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}function Hv(t){return Jt?Buffer.allocUnsafe?Buffer.allocUnsafe(t):new Buffer(t):typeof Uint8Array<"u"?new Uint8Array(t):new Array(t)}var Xa=function(e){return Jt?jA(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)&255})};function yh(t){if(typeof ArrayBuffer>"u")return Xa(t);for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!=t.length;++n)r[n]=t.charCodeAt(n)&255;return e}function Kl(t){if(Array.isArray(t))return t.map(function(n){return String.fromCharCode(n)}).join("");for(var e=[],r=0;r<t.length;++r)e[r]=String.fromCharCode(t[r]);return e.join("")}function aN(t){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(t)}var wn=Jt?function(t){return Buffer.concat(t.map(function(e){return Buffer.isBuffer(e)?e:jA(e)}))}:function(t){if(typeof Uint8Array<"u"){var e=0,r=0;for(e=0;e<t.length;++e)r+=t[e].length;var n=new Uint8Array(r),a=0;for(e=0,r=0;e<t.length;r+=a,++e)if(a=t[e].length,t[e]instanceof Uint8Array)n.set(t[e],r);else{if(typeof t[e]=="string")throw"wtf";n.set(new Uint8Array(t[e]),r)}return n}return[].concat.apply([],t.map(function(A){return Array.isArray(A)?A:[].slice.call(A)}))};function AN(t){for(var e=[],r=0,n=t.length+250,a=yo(t.length+255),A=0;A<t.length;++A){var o=t.charCodeAt(A);if(o<128)a[r++]=o;else if(o<2048)a[r++]=192|o>>6&31,a[r++]=128|o&63;else if(o>=55296&&o<57344){o=(o&1023)+64;var s=t.charCodeAt(++A)&1023;a[r++]=240|o>>8&7,a[r++]=128|o>>2&63,a[r++]=128|s>>6&15|(o&3)<<4,a[r++]=128|s&63}else a[r++]=224|o>>12&15,a[r++]=128|o>>6&63,a[r++]=128|o&63;r>n&&(e.push(a.slice(0,r)),r=0,a=yo(65535),n=65530)}return e.push(a.slice(0,r)),wn(e)}var Gl=/\u0000/g,vh=/[\u0001-\u0006]/g;function ms(t){for(var e="",r=t.length-1;r>=0;)e+=t.charAt(r--);return e}function qa(t,e){var r=""+t;return r.length>=e?r:Tr("0",e-r.length)+r}function rg(t,e){var r=""+t;return r.length>=e?r:Tr(" ",e-r.length)+r}function wh(t,e){var r=""+t;return r.length>=e?r:r+Tr(" ",e-r.length)}function iN(t,e){var r=""+Math.round(t);return r.length>=e?r:Tr("0",e-r.length)+r}function oN(t,e){var r=""+t;return r.length>=e?r:Tr("0",e-r.length)+r}var Vv=Math.pow(2,32);function ys(t,e){if(t>Vv||t<-Vv)return iN(t,e);var r=Math.round(t);return oN(r,e)}function Bh(t,e){return e=e||0,t.length>=7+e&&(t.charCodeAt(e)|32)===103&&(t.charCodeAt(e+1)|32)===101&&(t.charCodeAt(e+2)|32)===110&&(t.charCodeAt(e+3)|32)===101&&(t.charCodeAt(e+4)|32)===114&&(t.charCodeAt(e+5)|32)===97&&(t.charCodeAt(e+6)|32)===108}var $v=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ng=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function sN(t){return t||(t={}),t[0]="General",t[1]="0",t[2]="0.00",t[3]="#,##0",t[4]="#,##0.00",t[9]="0%",t[10]="0.00%",t[11]="0.00E+00",t[12]="# ?/?",t[13]="# ??/??",t[14]="m/d/yy",t[15]="d-mmm-yy",t[16]="d-mmm",t[17]="mmm-yy",t[18]="h:mm AM/PM",t[19]="h:mm:ss AM/PM",t[20]="h:mm",t[21]="h:mm:ss",t[22]="m/d/yy h:mm",t[37]="#,##0 ;(#,##0)",t[38]="#,##0 ;[Red](#,##0)",t[39]="#,##0.00;(#,##0.00)",t[40]="#,##0.00;[Red](#,##0.00)",t[45]="mm:ss",t[46]="[h]:mm:ss",t[47]="mmss.0",t[48]="##0.0E+0",t[49]="@",t[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',t}var kr={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},zv={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},lN={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function xh(t,e,r){for(var n=t<0?-1:1,a=t*n,A=0,o=1,s=0,l=1,c=0,u=0,p=Math.floor(a);c<e&&(p=Math.floor(a),s=p*o+A,u=p*c+l,!(a-p<5e-8));)a=1/(a-p),A=o,o=s,l=c,c=u;if(u>e&&(c>e?(u=l,s=A):(u=c,s=o)),!r)return[0,n*s,u];var h=Math.floor(n*s/u);return[h,n*s-h*u,u]}function bh(t,e,r){if(t>2958465||t<0)return null;var n=t|0,a=Math.floor(86400*(t-n)),A=0,o=[],s={D:n,T:a,u:86400*(t-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),e&&e.date1904&&(n+=1462),s.u>.9999&&(s.u=0,++a==86400&&(s.T=a=0,++n,++s.D)),n===60)o=r?[1317,10,29]:[1900,2,29],A=3;else if(n===0)o=r?[1317,8,29]:[1900,1,0],A=6;else{n>60&&--n;var l=new Date(1900,0,1);l.setDate(l.getDate()+n-1),o=[l.getFullYear(),l.getMonth()+1,l.getDate()],A=l.getDay(),n<60&&(A=(A+6)%7),r&&(A=pN(l,o))}return s.y=o[0],s.m=o[1],s.d=o[2],s.S=a%60,a=Math.floor(a/60),s.M=a%60,a=Math.floor(a/60),s.H=a,s.q=A,s}var Kv=new Date(1899,11,31,0,0,0),cN=Kv.getTime(),uN=new Date(1900,2,1,0,0,0);function Gv(t,e){var r=t.getTime();return e?r-=1461*24*60*60*1e3:t>=uN&&(r+=24*60*60*1e3),(r-(cN+(t.getTimezoneOffset()-Kv.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function ag(t){return t.indexOf(".")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function hN(t){return t.indexOf("E")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function fN(t){var e=t<0?12:11,r=ag(t.toFixed(12));return r.length<=e||(r=t.toPrecision(10),r.length<=e)?r:t.toExponential(5)}function dN(t){var e=ag(t.toFixed(11));return e.length>(t<0?12:11)||e==="0"||e==="-0"?t.toPrecision(6):e}function gN(t){var e=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),r;return e>=-4&&e<=-1?r=t.toPrecision(10+e):Math.abs(e)<=9?r=fN(t):e===10?r=t.toFixed(10).substr(0,12):r=dN(t),ag(hN(r.toUpperCase()))}function Ag(t,e){switch(typeof t){case"string":return t;case"boolean":return t?"TRUE":"FALSE";case"number":return(t|0)===t?t.toString(10):gN(t);case"undefined":return"";case"object":if(t==null)return"";if(t instanceof Date)return Di(14,Gv(t,e&&e.date1904),e)}throw new Error("unsupported value in General format: "+t)}function pN(t,e){e[0]-=581;var r=t.getDay();return t<60&&(r=(r+6)%7),r}function mN(t,e,r,n){var a="",A=0,o=0,s=r.y,l,c=0;switch(t){case 98:s=r.y+543;case 121:switch(e.length){case 1:case 2:l=s%100,c=2;break;default:l=s%1e4,c=4;break}break;case 109:switch(e.length){case 1:case 2:l=r.m,c=e.length;break;case 3:return ng[r.m-1][1];case 5:return ng[r.m-1][0];default:return ng[r.m-1][2]}break;case 100:switch(e.length){case 1:case 2:l=r.d,c=e.length;break;case 3:return $v[r.q][0];default:return $v[r.q][1]}break;case 104:switch(e.length){case 1:case 2:l=1+(r.H+11)%12,c=e.length;break;default:throw"bad hour format: "+e}break;case 72:switch(e.length){case 1:case 2:l=r.H,c=e.length;break;default:throw"bad hour format: "+e}break;case 77:switch(e.length){case 1:case 2:l=r.M,c=e.length;break;default:throw"bad minute format: "+e}break;case 115:if(e!="s"&&e!="ss"&&e!=".0"&&e!=".00"&&e!=".000")throw"bad second format: "+e;return r.u===0&&(e=="s"||e=="ss")?qa(r.S,e.length):(n>=2?o=n===3?1e3:100:o=n===1?10:1,A=Math.round(o*(r.S+r.u)),A>=60*o&&(A=0),e==="s"?A===0?"0":""+A/o:(a=qa(A,2+n),e==="ss"?a.substr(0,2):"."+a.substr(2,e.length-1)));case 90:switch(e){case"[h]":case"[hh]":l=r.D*24+r.H;break;case"[m]":case"[mm]":l=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":l=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+e}c=e.length===3?1:2;break;case 101:l=s,c=1;break}var u=c>0?qa(l,c):"";return u}function Ii(t){var e=3;if(t.length<=e)return t;for(var r=t.length%e,n=t.substr(0,r);r!=t.length;r+=e)n+=(n.length>0?",":"")+t.substr(r,e);return n}var jv=/%/g;function yN(t,e,r){var n=e.replace(jv,""),a=e.length-n.length;return WA(t,n,r*Math.pow(10,2*a))+Tr("%",a)}function vN(t,e,r){for(var n=e.length-1;e.charCodeAt(n-1)===44;)--n;return WA(t,e.substr(0,n),r/Math.pow(10,3*(e.length-n)))}function Wv(t,e){var r,n=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(e==0)return"0.0E+0";if(e<0)return"-"+Wv(t,-e);var a=t.indexOf(".");a===-1&&(a=t.indexOf("E"));var A=Math.floor(Math.log(e)*Math.LOG10E)%a;if(A<0&&(A+=a),r=(e/Math.pow(10,A)).toPrecision(n+1+(a+A)%a),r.indexOf("e")===-1){var o=Math.floor(Math.log(e)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+A):r+="E+"+(o-A);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,c,u){return l+c+u.substr(0,(a+A)%a)+"."+u.substr(A)+"E"})}else r=e.toExponential(n);return t.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),t.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var Xv=/# (\?+)( ?)\/( ?)(\d+)/;function wN(t,e,r){var n=parseInt(t[4],10),a=Math.round(e*n),A=Math.floor(a/n),o=a-A*n,s=n;return r+(A===0?"":""+A)+" "+(o===0?Tr(" ",t[1].length+1+t[4].length):rg(o,t[1].length)+t[2]+"/"+t[3]+qa(s,t[4].length))}function BN(t,e,r){return r+(e===0?"":""+e)+Tr(" ",t[1].length+2+t[4].length)}var qv=/^#*0*\.([0#]+)/,Yv=/\).*[0#]/,Jv=/\(###\) ###\\?-####/;function Kn(t){for(var e="",r,n=0;n!=t.length;++n)switch(r=t.charCodeAt(n)){case 35:break;case 63:e+=" ";break;case 48:e+="0";break;default:e+=String.fromCharCode(r)}return e}function Zv(t,e){var r=Math.pow(10,e);return""+Math.round(t*r)/r}function ew(t,e){var r=t-Math.floor(t),n=Math.pow(10,e);return e<(""+Math.round(r*n)).length?0:Math.round(r*n)}function xN(t,e){return e<(""+Math.round((t-Math.floor(t))*Math.pow(10,e))).length?1:0}function bN(t){return t<2147483647&&t>-2147483648?""+(t>=0?t|0:t-1|0):""+Math.floor(t)}function La(t,e,r){if(t.charCodeAt(0)===40&&!e.match(Yv)){var n=e.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?La("n",n,r):"("+La("n",n,-r)+")"}if(e.charCodeAt(e.length-1)===44)return vN(t,e,r);if(e.indexOf("%")!==-1)return yN(t,e,r);if(e.indexOf("E")!==-1)return Wv(e,r);if(e.charCodeAt(0)===36)return"$"+La(t,e.substr(e.charAt(1)==" "?2:1),r);var a,A,o,s,l=Math.abs(r),c=r<0?"-":"";if(e.match(/^00+$/))return c+ys(l,e.length);if(e.match(/^[#?]+$/))return a=ys(r,0),a==="0"&&(a=""),a.length>e.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(Xv))return wN(A,l,c);if(e.match(/^#+0+$/))return c+ys(l,e.length-e.indexOf("0"));if(A=e.match(qv))return a=Zv(r,A[1].length).replace(/^([^\.]+)$/,"$1."+Kn(A[1])).replace(/\.$/,"."+Kn(A[1])).replace(/\.(\d*)$/,function(w,g){return"."+g+Tr("0",Kn(A[1]).length-g.length)}),e.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(e=e.replace(/^#+([0.])/,"$1"),A=e.match(/^(0*)\.(#*)$/))return c+Zv(l,A[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,A[1].length?"0.":".");if(A=e.match(/^#{1,3},##0(\.?)$/))return c+Ii(ys(l,0));if(A=e.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+La(t,e,-r):Ii(""+(Math.floor(r)+xN(r,A[1].length)))+"."+qa(ew(r,A[1].length),A[1].length);if(A=e.match(/^#,#*,#0/))return La(t,e.replace(/^#,#*,/,""),r);if(A=e.match(/^([0#]+)(\\?-([0#]+))+$/))return a=ms(La(t,e.replace(/[\\-]/g,""),r)),o=0,ms(ms(e.replace(/\\/g,"")).replace(/[0#]/g,function(w){return o<a.length?a.charAt(o++):w==="0"?"0":""}));if(e.match(Jv))return a=La(t,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var u="";if(A=e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(A[4].length,7),s=xh(l,Math.pow(10,o)-1,!1),a=""+c,u=WA("n",A[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),a+=u+A[2]+"/"+A[3],u=wh(s[2],o),u.length<A[4].length&&(u=Kn(A[4].substr(A[4].length-u.length))+u),a+=u,a;if(A=e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(A[1].length,A[4].length),7),s=xh(l,Math.pow(10,o)-1,!0),c+(s[0]||(s[1]?"":"0"))+" "+(s[1]?rg(s[1],o)+A[2]+"/"+A[3]+wh(s[2],o):Tr(" ",2*o+1+A[2].length+A[3].length));if(A=e.match(/^[#0?]+$/))return a=ys(r,0),e.length<=a.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(/^([#0?]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(A[2].length,10)).replace(/([^0])0+$/,"$1"),o=a.indexOf(".");var p=e.indexOf(".")-o,h=e.length-a.length-p;return Kn(e.substr(0,p)+a+e.substr(e.length-h))}if(A=e.match(/^00,000\.([#0]*0)$/))return o=ew(r,A[1].length),r<0?"-"+La(t,e,-r):Ii(bN(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(w){return"00,"+(w.length<3?qa(0,3-w.length):"")+w})+"."+qa(o,A[1].length);switch(e){case"###,##0.00":return La(t,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var d=Ii(ys(l,0));return d!=="0"?c+d:"";case"###,###.00":return La(t,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return La(t,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+e+"|")}function CN(t,e,r){for(var n=e.length-1;e.charCodeAt(n-1)===44;)--n;return WA(t,e.substr(0,n),r/Math.pow(10,3*(e.length-n)))}function EN(t,e,r){var n=e.replace(jv,""),a=e.length-n.length;return WA(t,n,r*Math.pow(10,2*a))+Tr("%",a)}function tw(t,e){var r,n=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(e==0)return"0.0E+0";if(e<0)return"-"+tw(t,-e);var a=t.indexOf(".");a===-1&&(a=t.indexOf("E"));var A=Math.floor(Math.log(e)*Math.LOG10E)%a;if(A<0&&(A+=a),r=(e/Math.pow(10,A)).toPrecision(n+1+(a+A)%a),!r.match(/[Ee]/)){var o=Math.floor(Math.log(e)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+A):r+="E+"+(o-A),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,c,u){return l+c+u.substr(0,(a+A)%a)+"."+u.substr(A)+"E"})}else r=e.toExponential(n);return t.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),t.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function _A(t,e,r){if(t.charCodeAt(0)===40&&!e.match(Yv)){var n=e.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?_A("n",n,r):"("+_A("n",n,-r)+")"}if(e.charCodeAt(e.length-1)===44)return CN(t,e,r);if(e.indexOf("%")!==-1)return EN(t,e,r);if(e.indexOf("E")!==-1)return tw(e,r);if(e.charCodeAt(0)===36)return"$"+_A(t,e.substr(e.charAt(1)==" "?2:1),r);var a,A,o,s,l=Math.abs(r),c=r<0?"-":"";if(e.match(/^00+$/))return c+qa(l,e.length);if(e.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>e.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(Xv))return BN(A,l,c);if(e.match(/^#+0+$/))return c+qa(l,e.length-e.indexOf("0"));if(A=e.match(qv))return a=(""+r).replace(/^([^\.]+)$/,"$1."+Kn(A[1])).replace(/\.$/,"."+Kn(A[1])),a=a.replace(/\.(\d*)$/,function(w,g){return"."+g+Tr("0",Kn(A[1]).length-g.length)}),e.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(e=e.replace(/^#+([0.])/,"$1"),A=e.match(/^(0*)\.(#*)$/))return c+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,A[1].length?"0.":".");if(A=e.match(/^#{1,3},##0(\.?)$/))return c+Ii(""+l);if(A=e.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+_A(t,e,-r):Ii(""+r)+"."+Tr("0",A[1].length);if(A=e.match(/^#,#*,#0/))return _A(t,e.replace(/^#,#*,/,""),r);if(A=e.match(/^([0#]+)(\\?-([0#]+))+$/))return a=ms(_A(t,e.replace(/[\\-]/g,""),r)),o=0,ms(ms(e.replace(/\\/g,"")).replace(/[0#]/g,function(w){return o<a.length?a.charAt(o++):w==="0"?"0":""}));if(e.match(Jv))return a=_A(t,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var u="";if(A=e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(A[4].length,7),s=xh(l,Math.pow(10,o)-1,!1),a=""+c,u=WA("n",A[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),a+=u+A[2]+"/"+A[3],u=wh(s[2],o),u.length<A[4].length&&(u=Kn(A[4].substr(A[4].length-u.length))+u),a+=u,a;if(A=e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(A[1].length,A[4].length),7),s=xh(l,Math.pow(10,o)-1,!0),c+(s[0]||(s[1]?"":"0"))+" "+(s[1]?rg(s[1],o)+A[2]+"/"+A[3]+wh(s[2],o):Tr(" ",2*o+1+A[2].length+A[3].length));if(A=e.match(/^[#0?]+$/))return a=""+r,e.length<=a.length?a:Kn(e.substr(0,e.length-a.length))+a;if(A=e.match(/^([#0]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(A[2].length,10)).replace(/([^0])0+$/,"$1"),o=a.indexOf(".");var p=e.indexOf(".")-o,h=e.length-a.length-p;return Kn(e.substr(0,p)+a+e.substr(e.length-h))}if(A=e.match(/^00,000\.([#0]*0)$/))return r<0?"-"+_A(t,e,-r):Ii(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(w){return"00,"+(w.length<3?qa(0,3-w.length):"")+w})+"."+qa(0,A[1].length);switch(e){case"###,###":case"##,###":case"#,###":var d=Ii(""+l);return d!=="0"?c+d:"";default:if(e.match(/\.[0#?]*$/))return _A(t,e.slice(0,e.lastIndexOf(".")),r)+Kn(e.slice(e.lastIndexOf(".")))}throw new Error("unsupported format |"+e+"|")}function WA(t,e,r){return(r|0)===r?_A(t,e,r):La(t,e,r)}function _N(t){for(var e=[],r=!1,n=0,a=0;n<t.length;++n)switch(t.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:e[e.length]=t.substr(a,n-a),a=n+1}if(e[e.length]=t.substr(a),r===!0)throw new Error("Format |"+t+"| unterminated string ");return e}var rw=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function nw(t){for(var e=0,r="",n="";e<t.length;)switch(r=t.charAt(e)){case"G":Bh(t,e)&&(e+=6),e++;break;case'"':for(;t.charCodeAt(++e)!==34&&e<t.length;);++e;break;case"\\":e+=2;break;case"_":e+=2;break;case"@":++e;break;case"B":case"b":if(t.charAt(e+1)==="1"||t.charAt(e+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(t.substr(e,3).toUpperCase()==="A/P"||t.substr(e,5).toUpperCase()==="AM/PM"||t.substr(e,5).toUpperCase()==="上午/下午")return!0;++e;break;case"[":for(n=r;t.charAt(e++)!=="]"&&e<t.length;)n+=t.charAt(e);if(n.match(rw))return!0;break;case".":case"0":case"#":for(;e<t.length&&("0#?.,E+-%".indexOf(r=t.charAt(++e))>-1||r=="\\"&&t.charAt(e+1)=="-"&&"0#".indexOf(t.charAt(e+2))>-1););break;case"?":for(;t.charAt(++e)===r;);break;case"*":++e,(t.charAt(e)==" "||t.charAt(e)=="*")&&++e;break;case"(":case")":++e;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;e<t.length&&"0123456789".indexOf(t.charAt(++e))>-1;);break;case" ":++e;break;default:++e;break}return!1}function FN(t,e,r,n){for(var a=[],A="",o=0,s="",l="t",c,u,p,h="H";o<t.length;)switch(s=t.charAt(o)){case"G":if(!Bh(t,o))throw new Error("unrecognized character "+s+" in "+t);a[a.length]={t:"G",v:"General"},o+=7;break;case'"':for(A="";(p=t.charCodeAt(++o))!==34&&o<t.length;)A+=String.fromCharCode(p);a[a.length]={t:"t",v:A},++o;break;case"\\":var d=t.charAt(++o),w=d==="("||d===")"?d:"t";a[a.length]={t:w,v:d},++o;break;case"_":a[a.length]={t:"t",v:" "},o+=2;break;case"@":a[a.length]={t:"T",v:e},++o;break;case"B":case"b":if(t.charAt(o+1)==="1"||t.charAt(o+1)==="2"){if(c==null&&(c=bh(e,r,t.charAt(o+1)==="2"),c==null))return"";a[a.length]={t:"X",v:t.substr(o,2)},l=s,o+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(e<0||c==null&&(c=bh(e,r),c==null))return"";for(A=s;++o<t.length&&t.charAt(o).toLowerCase()===s;)A+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),a[a.length]={t:s,v:A},l=s;break;case"A":case"a":case"上":var g={t:s,v:s};if(c==null&&(c=bh(e,r)),t.substr(o,3).toUpperCase()==="A/P"?(c!=null&&(g.v=c.H>=12?"P":"A"),g.t="T",h="h",o+=3):t.substr(o,5).toUpperCase()==="AM/PM"?(c!=null&&(g.v=c.H>=12?"PM":"AM"),g.t="T",o+=5,h="h"):t.substr(o,5).toUpperCase()==="上午/下午"?(c!=null&&(g.v=c.H>=12?"下午":"上午"),g.t="T",o+=5,h="h"):(g.t="t",++o),c==null&&g.t==="T")return"";a[a.length]=g,l=s;break;case"[":for(A=s;t.charAt(o++)!=="]"&&o<t.length;)A+=t.charAt(o);if(A.slice(-1)!=="]")throw'unterminated "[" block: |'+A+"|";if(A.match(rw)){if(c==null&&(c=bh(e,r),c==null))return"";a[a.length]={t:"Z",v:A.toLowerCase()},l=A.charAt(1)}else A.indexOf("$")>-1&&(A=(A.match(/\$([^-\[\]]*)/)||[])[1]||"$",nw(t)||(a[a.length]={t:"t",v:A}));break;case".":if(c!=null){for(A=s;++o<t.length&&(s=t.charAt(o))==="0";)A+=s;a[a.length]={t:"s",v:A};break}case"0":case"#":for(A=s;++o<t.length&&"0#?.,E+-%".indexOf(s=t.charAt(o))>-1;)A+=s;a[a.length]={t:"n",v:A};break;case"?":for(A=s;t.charAt(++o)===s;)A+=s;a[a.length]={t:s,v:A},l=s;break;case"*":++o,(t.charAt(o)==" "||t.charAt(o)=="*")&&++o;break;case"(":case")":a[a.length]={t:n===1?"t":s,v:s},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(A=s;o<t.length&&"0123456789".indexOf(t.charAt(++o))>-1;)A+=t.charAt(o);a[a.length]={t:"D",v:A};break;case" ":a[a.length]={t:s,v:s},++o;break;case"$":a[a.length]={t:"t",v:"$"},++o;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+t);a[a.length]={t:"t",v:s},++o;break}var y=0,m=0,F;for(o=a.length-1,l="t";o>=0;--o)switch(a[o].t){case"h":case"H":a[o].t=h,l="h",y<1&&(y=1);break;case"s":(F=a[o].v.match(/\.0+$/))&&(m=Math.max(m,F[0].length-1)),y<3&&(y=3);case"d":case"y":case"M":case"e":l=a[o].t;break;case"m":l==="s"&&(a[o].t="M",y<2&&(y=2));break;case"X":break;case"Z":y<1&&a[o].v.match(/[Hh]/)&&(y=1),y<2&&a[o].v.match(/[Mm]/)&&(y=2),y<3&&a[o].v.match(/[Ss]/)&&(y=3)}switch(y){case 0:break;case 1:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M),c.M>=60&&(c.M=0,++c.H);break;case 2:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M);break}var N="",Q;for(o=0;o<a.length;++o)switch(a[o].t){case"t":case"T":case" ":case"D":break;case"X":a[o].v="",a[o].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":a[o].v=mN(a[o].t.charCodeAt(0),a[o].v,c,m),a[o].t="t";break;case"n":case"?":for(Q=o+1;a[Q]!=null&&((s=a[Q].t)==="?"||s==="D"||(s===" "||s==="t")&&a[Q+1]!=null&&(a[Q+1].t==="?"||a[Q+1].t==="t"&&a[Q+1].v==="/")||a[o].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(a[Q].v==="/"||a[Q].v===" "&&a[Q+1]!=null&&a[Q+1].t=="?"));)a[o].v+=a[Q].v,a[Q]={v:"",t:";"},++Q;N+=a[o].v,o=Q-1;break;case"G":a[o].t="t",a[o].v=Ag(e,r);break}var z="",R,I;if(N.length>0){N.charCodeAt(0)==40?(R=e<0&&N.charCodeAt(0)===45?-e:e,I=WA("n",N,R)):(R=e<0&&n>1?-e:e,I=WA("n",N,R),R<0&&a[0]&&a[0].t=="t"&&(I=I.substr(1),a[0].v="-"+a[0].v)),Q=I.length-1;var U=a.length;for(o=0;o<a.length;++o)if(a[o]!=null&&a[o].t!="t"&&a[o].v.indexOf(".")>-1){U=o;break}var O=a.length;if(U===a.length&&I.indexOf("E")===-1){for(o=a.length-1;o>=0;--o)a[o]==null||"n?".indexOf(a[o].t)===-1||(Q>=a[o].v.length-1?(Q-=a[o].v.length,a[o].v=I.substr(Q+1,a[o].v.length)):Q<0?a[o].v="":(a[o].v=I.substr(0,Q+1),Q=-1),a[o].t="t",O=o);Q>=0&&O<a.length&&(a[O].v=I.substr(0,Q+1)+a[O].v)}else if(U!==a.length&&I.indexOf("E")===-1){for(Q=I.indexOf(".")-1,o=U;o>=0;--o)if(!(a[o]==null||"n?".indexOf(a[o].t)===-1)){for(u=a[o].v.indexOf(".")>-1&&o===U?a[o].v.indexOf(".")-1:a[o].v.length-1,z=a[o].v.substr(u+1);u>=0;--u)Q>=0&&(a[o].v.charAt(u)==="0"||a[o].v.charAt(u)==="#")&&(z=I.charAt(Q--)+z);a[o].v=z,a[o].t="t",O=o}for(Q>=0&&O<a.length&&(a[O].v=I.substr(0,Q+1)+a[O].v),Q=I.indexOf(".")+1,o=U;o<a.length;++o)if(!(a[o]==null||"n?(".indexOf(a[o].t)===-1&&o!==U)){for(u=a[o].v.indexOf(".")>-1&&o===U?a[o].v.indexOf(".")+1:0,z=a[o].v.substr(0,u);u<a[o].v.length;++u)Q<I.length&&(z+=I.charAt(Q++));a[o].v=z,a[o].t="t",O=o}}}for(o=0;o<a.length;++o)a[o]!=null&&"n?".indexOf(a[o].t)>-1&&(R=n>1&&e<0&&o>0&&a[o-1].v==="-"?-e:e,a[o].v=WA(a[o].t,a[o].v,R),a[o].t="t");var q="";for(o=0;o!==a.length;++o)a[o]!=null&&(q+=a[o].v);return q}var aw=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Aw(t,e){if(e==null)return!1;var r=parseFloat(e[2]);switch(e[1]){case"=":if(t==r)return!0;break;case">":if(t>r)return!0;break;case"<":if(t<r)return!0;break;case"<>":if(t!=r)return!0;break;case">=":if(t>=r)return!0;break;case"<=":if(t<=r)return!0;break}return!1}function SN(t,e){var r=_N(t),n=r.length,a=r[n-1].indexOf("@");if(n<4&&a>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof e!="number")return[4,r.length===4||a>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=a>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=a>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=a>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var A=e>0?r[0]:e<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,A];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var o=r[0].match(aw),s=r[1].match(aw);return Aw(e,o)?[n,r[0]]:Aw(e,s)?[n,r[1]]:[n,r[o!=null&&s!=null?2:1]]}return[n,A]}function Di(t,e,r){r==null&&(r={});var n="";switch(typeof t){case"string":t=="m/d/yy"&&r.dateNF?n=r.dateNF:n=t;break;case"number":t==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:kr)[t],n==null&&(n=r.table&&r.table[zv[t]]||kr[zv[t]]),n==null&&(n=lN[t]||"General");break}if(Bh(n,0))return Ag(e,r);e instanceof Date&&(e=Gv(e,r.date1904));var a=SN(n,e);if(Bh(a[1]))return Ag(e,r);if(e===!0)e="TRUE";else if(e===!1)e="FALSE";else if(e===""||e==null)return"";return FN(a[1],e,r,a[0])}function iw(t,e){if(typeof e!="number"){e=+e||-1;for(var r=0;r<392;++r){if(kr[r]==null){e<0&&(e=r);continue}if(kr[r]==t){e=r;break}}e<0&&(e=391)}return kr[e]=t,e}function Ch(t){for(var e=0;e!=392;++e)t[e]!==void 0&&iw(t[e],e)}function Eh(){kr=sN()}var ow=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function kN(t){var e=typeof t=="number"?kr[t]:t;return e=e.replace(ow,"(\\d+)"),new RegExp("^"+e+"$")}function TN(t,e,r){var n=-1,a=-1,A=-1,o=-1,s=-1,l=-1;(e.match(ow)||[]).forEach(function(p,h){var d=parseInt(r[h+1],10);switch(p.toLowerCase().charAt(0)){case"y":n=d;break;case"d":A=d;break;case"h":o=d;break;case"s":l=d;break;case"m":o>=0?s=d:a=d;break}}),l>=0&&s==-1&&a>=0&&(s=a,a=-1);var c=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(A>=1?A:1)).slice(-2);c.length==7&&(c="0"+c),c.length==8&&(c="20"+c);var u=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return o==-1&&s==-1&&l==-1?c:n==-1&&a==-1&&A==-1?u:c+"T"+u}var NN=function(){var t={};t.version="1.2.0";function e(){for(var I=0,U=new Array(256),O=0;O!=256;++O)I=O,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,I=I&1?-306674912^I>>>1:I>>>1,U[O]=I;return typeof Int32Array<"u"?new Int32Array(U):U}var r=e();function n(I){var U=0,O=0,q=0,T=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(q=0;q!=256;++q)T[q]=I[q];for(q=0;q!=256;++q)for(O=I[q],U=256+q;U<4096;U+=256)O=T[U]=O>>>8^I[O&255];var L=[];for(q=1;q!=16;++q)L[q-1]=typeof Int32Array<"u"?T.subarray(q*256,q*256+256):T.slice(q*256,q*256+256);return L}var a=n(r),A=a[0],o=a[1],s=a[2],l=a[3],c=a[4],u=a[5],p=a[6],h=a[7],d=a[8],w=a[9],g=a[10],y=a[11],m=a[12],F=a[13],N=a[14];function Q(I,U){for(var O=U^-1,q=0,T=I.length;q<T;)O=O>>>8^r[(O^I.charCodeAt(q++))&255];return~O}function z(I,U){for(var O=U^-1,q=I.length-15,T=0;T<q;)O=N[I[T++]^O&255]^F[I[T++]^O>>8&255]^m[I[T++]^O>>16&255]^y[I[T++]^O>>>24]^g[I[T++]]^w[I[T++]]^d[I[T++]]^h[I[T++]]^p[I[T++]]^u[I[T++]]^c[I[T++]]^l[I[T++]]^s[I[T++]]^o[I[T++]]^A[I[T++]]^r[I[T++]];for(q+=15;T<q;)O=O>>>8^r[(O^I[T++])&255];return~O}function R(I,U){for(var O=U^-1,q=0,T=I.length,L=0,G=0;q<T;)L=I.charCodeAt(q++),L<128?O=O>>>8^r[(O^L)&255]:L<2048?(O=O>>>8^r[(O^(192|L>>6&31))&255],O=O>>>8^r[(O^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,G=I.charCodeAt(q++)&1023,O=O>>>8^r[(O^(240|L>>8&7))&255],O=O>>>8^r[(O^(128|L>>2&63))&255],O=O>>>8^r[(O^(128|G>>6&15|(L&3)<<4))&255],O=O>>>8^r[(O^(128|G&63))&255]):(O=O>>>8^r[(O^(224|L>>12&15))&255],O=O>>>8^r[(O^(128|L>>6&63))&255],O=O>>>8^r[(O^(128|L&63))&255]);return~O}return t.table=r,t.bstr=Q,t.buf=z,t.str=R,t}(),cr=function(){var e={};e.version="1.2.1";function r(H,ie){for(var Z=H.split("/"),ee=ie.split("/"),Ae=0,oe=0,Se=Math.min(Z.length,ee.length);Ae<Se;++Ae){if(oe=Z[Ae].length-ee[Ae].length)return oe;if(Z[Ae]!=ee[Ae])return Z[Ae]<ee[Ae]?-1:1}return Z.length-ee.length}function n(H){if(H.charAt(H.length-1)=="/")return H.slice(0,-1).indexOf("/")===-1?H:n(H.slice(0,-1));var ie=H.lastIndexOf("/");return ie===-1?H:H.slice(0,ie+1)}function a(H){if(H.charAt(H.length-1)=="/")return a(H.slice(0,-1));var ie=H.lastIndexOf("/");return ie===-1?H:H.slice(ie+1)}function A(H,ie){typeof ie=="string"&&(ie=new Date(ie));var Z=ie.getHours();Z=Z<<6|ie.getMinutes(),Z=Z<<5|ie.getSeconds()>>>1,H.write_shift(2,Z);var ee=ie.getFullYear()-1980;ee=ee<<4|ie.getMonth()+1,ee=ee<<5|ie.getDate(),H.write_shift(2,ee)}function o(H){var ie=H.read_shift(2)&65535,Z=H.read_shift(2)&65535,ee=new Date,Ae=Z&31;Z>>>=5;var oe=Z&15;Z>>>=4,ee.setMilliseconds(0),ee.setFullYear(Z+1980),ee.setMonth(oe-1),ee.setDate(Ae);var Se=ie&31;ie>>>=5;var Ie=ie&63;return ie>>>=6,ee.setHours(ie),ee.setMinutes(Ie),ee.setSeconds(Se<<1),ee}function s(H){ma(H,0);for(var ie={},Z=0;H.l<=H.length-4;){var ee=H.read_shift(2),Ae=H.read_shift(2),oe=H.l+Ae,Se={};switch(ee){case 21589:Z=H.read_shift(1),Z&1&&(Se.mtime=H.read_shift(4)),Ae>5&&(Z&2&&(Se.atime=H.read_shift(4)),Z&4&&(Se.ctime=H.read_shift(4))),Se.mtime&&(Se.mt=new Date(Se.mtime*1e3));break}H.l=oe,ie[ee]=Se}return ie}var l;function c(){return l||(l={})}function u(H,ie){if(H[0]==80&&H[1]==75)return Yt(H,ie);if((H[0]|32)==109&&(H[1]|32)==105)return oa(H,ie);if(H.length<512)throw new Error("CFB file size "+H.length+" < 512");var Z=3,ee=512,Ae=0,oe=0,Se=0,Ie=0,Fe=0,pe=[],X=H.slice(0,512);ma(X,0);var we=p(X);switch(Z=we[0],Z){case 3:ee=512;break;case 4:ee=4096;break;case 0:if(we[1]==0)return Yt(H,ie);default:throw new Error("Major Version: Expected 3 or 4 saw "+Z)}ee!==512&&(X=H.slice(0,ee),ma(X,28));var Le=H.slice(0,ee);h(X,Z);var Ke=X.read_shift(4,"i");if(Z===3&&Ke!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ke);X.l+=4,Se=X.read_shift(4,"i"),X.l+=4,X.chk("00100000","Mini Stream Cutoff Size: "),Ie=X.read_shift(4,"i"),Ae=X.read_shift(4,"i"),Fe=X.read_shift(4,"i"),oe=X.read_shift(4,"i");for(var ze=-1,qe=0;qe<109&&(ze=X.read_shift(4,"i"),!(ze<0));++qe)pe[qe]=ze;var ut=d(H,ee);y(Fe,oe,ut,ee,pe);var zt=F(ut,Se,pe,ee);zt[Se].name="!Directory",Ae>0&&Ie!==G&&(zt[Ie].name="!MiniFAT"),zt[pe[0]].name="!FAT",zt.fat_addrs=pe,zt.ssz=ee;var Ct={},Er=[],sa=[],IA=[];N(Se,zt,ut,Er,Ae,Ct,sa,Ie),w(sa,IA,Er),Er.shift();var DA={FileIndex:sa,FullPaths:IA};return ie&&ie.raw&&(DA.raw={header:Le,sectors:ut}),DA}function p(H){if(H[H.l]==80&&H[H.l+1]==75)return[0,0];H.chk(Y,"Header Signature: "),H.l+=16;var ie=H.read_shift(2,"u");return[H.read_shift(2,"u"),ie]}function h(H,ie){var Z=9;switch(H.l+=2,Z=H.read_shift(2)){case 9:if(ie!=3)throw new Error("Sector Shift: Expected 9 saw "+Z);break;case 12:if(ie!=4)throw new Error("Sector Shift: Expected 12 saw "+Z);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Z)}H.chk("0600","Mini Sector Shift: "),H.chk("000000000000","Reserved: ")}function d(H,ie){for(var Z=Math.ceil(H.length/ie)-1,ee=[],Ae=1;Ae<Z;++Ae)ee[Ae-1]=H.slice(Ae*ie,(Ae+1)*ie);return ee[Z-1]=H.slice(Z*ie),ee}function w(H,ie,Z){for(var ee=0,Ae=0,oe=0,Se=0,Ie=0,Fe=Z.length,pe=[],X=[];ee<Fe;++ee)pe[ee]=X[ee]=ee,ie[ee]=Z[ee];for(;Ie<X.length;++Ie)ee=X[Ie],Ae=H[ee].L,oe=H[ee].R,Se=H[ee].C,pe[ee]===ee&&(Ae!==-1&&pe[Ae]!==Ae&&(pe[ee]=pe[Ae]),oe!==-1&&pe[oe]!==oe&&(pe[ee]=pe[oe])),Se!==-1&&(pe[Se]=ee),Ae!==-1&&ee!=pe[ee]&&(pe[Ae]=pe[ee],X.lastIndexOf(Ae)<Ie&&X.push(Ae)),oe!==-1&&ee!=pe[ee]&&(pe[oe]=pe[ee],X.lastIndexOf(oe)<Ie&&X.push(oe));for(ee=1;ee<Fe;++ee)pe[ee]===ee&&(oe!==-1&&pe[oe]!==oe?pe[ee]=pe[oe]:Ae!==-1&&pe[Ae]!==Ae&&(pe[ee]=pe[Ae]));for(ee=1;ee<Fe;++ee)if(H[ee].type!==0){if(Ie=ee,Ie!=pe[Ie])do Ie=pe[Ie],ie[ee]=ie[Ie]+"/"+ie[ee];while(Ie!==0&&pe[Ie]!==-1&&Ie!=pe[Ie]);pe[ee]=-1}for(ie[0]+="/",ee=1;ee<Fe;++ee)H[ee].type!==2&&(ie[ee]+="/")}function g(H,ie,Z){for(var ee=H.start,Ae=H.size,oe=[],Se=ee;Z&&Ae>0&&Se>=0;)oe.push(ie.slice(Se*L,Se*L+L)),Ae-=L,Se=vo(Z,Se*4);return oe.length===0?Oe(0):wn(oe).slice(0,H.size)}function y(H,ie,Z,ee,Ae){var oe=G;if(H===G){if(ie!==0)throw new Error("DIFAT chain shorter than expected")}else if(H!==-1){var Se=Z[H],Ie=(ee>>>2)-1;if(!Se)return;for(var Fe=0;Fe<Ie&&(oe=vo(Se,Fe*4))!==G;++Fe)Ae.push(oe);y(vo(Se,ee-4),ie-1,Z,ee,Ae)}}function m(H,ie,Z,ee,Ae){var oe=[],Se=[];Ae||(Ae=[]);var Ie=ee-1,Fe=0,pe=0;for(Fe=ie;Fe>=0;){Ae[Fe]=!0,oe[oe.length]=Fe,Se.push(H[Fe]);var X=Z[Math.floor(Fe*4/ee)];if(pe=Fe*4&Ie,ee<4+pe)throw new Error("FAT boundary crossed: "+Fe+" 4 "+ee);if(!H[X])break;Fe=vo(H[X],pe)}return{nodes:oe,data:ww([Se])}}function F(H,ie,Z,ee){var Ae=H.length,oe=[],Se=[],Ie=[],Fe=[],pe=ee-1,X=0,we=0,Le=0,Ke=0;for(X=0;X<Ae;++X)if(Ie=[],Le=X+ie,Le>=Ae&&(Le-=Ae),!Se[Le]){Fe=[];var ze=[];for(we=Le;we>=0;){ze[we]=!0,Se[we]=!0,Ie[Ie.length]=we,Fe.push(H[we]);var qe=Z[Math.floor(we*4/ee)];if(Ke=we*4&pe,ee<4+Ke)throw new Error("FAT boundary crossed: "+we+" 4 "+ee);if(!H[qe]||(we=vo(H[qe],Ke),ze[we]))break}oe[Le]={nodes:Ie,data:ww([Fe])}}return oe}function N(H,ie,Z,ee,Ae,oe,Se,Ie){for(var Fe=0,pe=ee.length?2:0,X=ie[H].data,we=0,Le=0,Ke;we<X.length;we+=128){var ze=X.slice(we,we+128);ma(ze,64),Le=ze.read_shift(2),Ke=hg(ze,0,Le-pe),ee.push(Ke);var qe={name:Ke,type:ze.read_shift(1),color:ze.read_shift(1),L:ze.read_shift(4,"i"),R:ze.read_shift(4,"i"),C:ze.read_shift(4,"i"),clsid:ze.read_shift(16),state:ze.read_shift(4,"i"),start:0,size:0},ut=ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2);ut!==0&&(qe.ct=Q(ze,ze.l-8));var zt=ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2)+ze.read_shift(2);zt!==0&&(qe.mt=Q(ze,ze.l-8)),qe.start=ze.read_shift(4,"i"),qe.size=ze.read_shift(4,"i"),qe.size<0&&qe.start<0&&(qe.size=qe.type=0,qe.start=G,qe.name=""),qe.type===5?(Fe=qe.start,Ae>0&&Fe!==G&&(ie[Fe].name="!StreamData")):qe.size>=4096?(qe.storage="fat",ie[qe.start]===void 0&&(ie[qe.start]=m(Z,qe.start,ie.fat_addrs,ie.ssz)),ie[qe.start].name=qe.name,qe.content=ie[qe.start].data.slice(0,qe.size)):(qe.storage="minifat",qe.size<0?qe.size=0:Fe!==G&&qe.start!==G&&ie[Fe]&&(qe.content=g(qe,ie[Fe].data,(ie[Ie]||{}).data))),qe.content&&ma(qe.content,0),oe[Ke]=qe,Se.push(qe)}}function Q(H,ie){return new Date((pa(H,ie+4)/1e7*Math.pow(2,32)+pa(H,ie)/1e7-11644473600)*1e3)}function z(H,ie){return c(),u(l.readFileSync(H),ie)}function R(H,ie){var Z=ie&&ie.type;switch(Z||Jt&&Buffer.isBuffer(H)&&(Z="buffer"),Z||"base64"){case"file":return z(H,ie);case"base64":return u(Xa(GA(H)),ie);case"binary":return u(Xa(H),ie)}return u(H,ie)}function I(H,ie){var Z=ie||{},ee=Z.root||"Root Entry";if(H.FullPaths||(H.FullPaths=[]),H.FileIndex||(H.FileIndex=[]),H.FullPaths.length!==H.FileIndex.length)throw new Error("inconsistent CFB structure");H.FullPaths.length===0&&(H.FullPaths[0]=ee+"/",H.FileIndex[0]={name:ee,type:5}),Z.CLSID&&(H.FileIndex[0].clsid=Z.CLSID),U(H)}function U(H){var ie="Sh33tJ5";if(!cr.find(H,"/"+ie)){var Z=Oe(4);Z[0]=55,Z[1]=Z[3]=50,Z[2]=54,H.FileIndex.push({name:ie,type:2,content:Z,size:4,L:69,R:69,C:69}),H.FullPaths.push(H.FullPaths[0]+ie),O(H)}}function O(H,ie){I(H);for(var Z=!1,ee=!1,Ae=H.FullPaths.length-1;Ae>=0;--Ae){var oe=H.FileIndex[Ae];switch(oe.type){case 0:ee?Z=!0:(H.FileIndex.pop(),H.FullPaths.pop());break;case 1:case 2:case 5:ee=!0,isNaN(oe.R*oe.L*oe.C)&&(Z=!0),oe.R>-1&&oe.L>-1&&oe.R==oe.L&&(Z=!0);break;default:Z=!0;break}}if(!(!Z&&!ie)){var Se=new Date(1987,1,19),Ie=0,Fe=Object.create?Object.create(null):{},pe=[];for(Ae=0;Ae<H.FullPaths.length;++Ae)Fe[H.FullPaths[Ae]]=!0,H.FileIndex[Ae].type!==0&&pe.push([H.FullPaths[Ae],H.FileIndex[Ae]]);for(Ae=0;Ae<pe.length;++Ae){var X=n(pe[Ae][0]);ee=Fe[X],ee||(pe.push([X,{name:a(X).replace("/",""),type:1,clsid:he,ct:Se,mt:Se,content:null}]),Fe[X]=!0)}for(pe.sort(function(Ke,ze){return r(Ke[0],ze[0])}),H.FullPaths=[],H.FileIndex=[],Ae=0;Ae<pe.length;++Ae)H.FullPaths[Ae]=pe[Ae][0],H.FileIndex[Ae]=pe[Ae][1];for(Ae=0;Ae<pe.length;++Ae){var we=H.FileIndex[Ae],Le=H.FullPaths[Ae];if(we.name=a(Le).replace("/",""),we.L=we.R=we.C=-(we.color=1),we.size=we.content?we.content.length:0,we.start=0,we.clsid=we.clsid||he,Ae===0)we.C=pe.length>1?1:-1,we.size=0,we.type=5;else if(Le.slice(-1)=="/"){for(Ie=Ae+1;Ie<pe.length&&n(H.FullPaths[Ie])!=Le;++Ie);for(we.C=Ie>=pe.length?-1:Ie,Ie=Ae+1;Ie<pe.length&&n(H.FullPaths[Ie])!=n(Le);++Ie);we.R=Ie>=pe.length?-1:Ie,we.type=1}else n(H.FullPaths[Ae+1]||"")==n(Le)&&(we.R=Ae+1),we.type=2}}}function q(H,ie){var Z=ie||{};if(Z.fileType=="mad")return gt(H,Z);switch(O(H),Z.fileType){case"zip":return _t(H,Z)}var ee=function(Ke){for(var ze=0,qe=0,ut=0;ut<Ke.FileIndex.length;++ut){var zt=Ke.FileIndex[ut];if(zt.content){var Ct=zt.content.length;Ct>0&&(Ct<4096?ze+=Ct+63>>6:qe+=Ct+511>>9)}}for(var Er=Ke.FullPaths.length+3>>2,sa=ze+7>>3,IA=ze+127>>7,DA=sa+qe+Er+IA,lA=DA+127>>7,QA=lA<=109?0:Math.ceil((lA-109)/127);DA+lA+QA+127>>7>lA;)QA=++lA<=109?0:Math.ceil((lA-109)/127);var ba=[1,QA,lA,IA,Er,qe,ze,0];return Ke.FileIndex[0].size=ze<<6,ba[7]=(Ke.FileIndex[0].start=ba[0]+ba[1]+ba[2]+ba[3]+ba[4]+ba[5])+(ba[6]+7>>3),ba}(H),Ae=Oe(ee[7]<<9),oe=0,Se=0;{for(oe=0;oe<8;++oe)Ae.write_shift(1,se[oe]);for(oe=0;oe<8;++oe)Ae.write_shift(2,0);for(Ae.write_shift(2,62),Ae.write_shift(2,3),Ae.write_shift(2,65534),Ae.write_shift(2,9),Ae.write_shift(2,6),oe=0;oe<3;++oe)Ae.write_shift(2,0);for(Ae.write_shift(4,0),Ae.write_shift(4,ee[2]),Ae.write_shift(4,ee[0]+ee[1]+ee[2]+ee[3]-1),Ae.write_shift(4,0),Ae.write_shift(4,4096),Ae.write_shift(4,ee[3]?ee[0]+ee[1]+ee[2]-1:G),Ae.write_shift(4,ee[3]),Ae.write_shift(-4,ee[1]?ee[0]-1:G),Ae.write_shift(4,ee[1]),oe=0;oe<109;++oe)Ae.write_shift(-4,oe<ee[2]?ee[1]+oe:-1)}if(ee[1])for(Se=0;Se<ee[1];++Se){for(;oe<236+Se*127;++oe)Ae.write_shift(-4,oe<ee[2]?ee[1]+oe:-1);Ae.write_shift(-4,Se===ee[1]-1?G:Se+1)}var Ie=function(Ke){for(Se+=Ke;oe<Se-1;++oe)Ae.write_shift(-4,oe+1);Ke&&(++oe,Ae.write_shift(-4,G))};for(Se=oe=0,Se+=ee[1];oe<Se;++oe)Ae.write_shift(-4,ge.DIFSECT);for(Se+=ee[2];oe<Se;++oe)Ae.write_shift(-4,ge.FATSECT);Ie(ee[3]),Ie(ee[4]);for(var Fe=0,pe=0,X=H.FileIndex[0];Fe<H.FileIndex.length;++Fe)X=H.FileIndex[Fe],X.content&&(pe=X.content.length,!(pe<4096)&&(X.start=Se,Ie(pe+511>>9)));for(Ie(ee[6]+7>>3);Ae.l&511;)Ae.write_shift(-4,ge.ENDOFCHAIN);for(Se=oe=0,Fe=0;Fe<H.FileIndex.length;++Fe)X=H.FileIndex[Fe],X.content&&(pe=X.content.length,!(!pe||pe>=4096)&&(X.start=Se,Ie(pe+63>>6)));for(;Ae.l&511;)Ae.write_shift(-4,ge.ENDOFCHAIN);for(oe=0;oe<ee[4]<<2;++oe){var we=H.FullPaths[oe];if(!we||we.length===0){for(Fe=0;Fe<17;++Fe)Ae.write_shift(4,0);for(Fe=0;Fe<3;++Fe)Ae.write_shift(4,-1);for(Fe=0;Fe<12;++Fe)Ae.write_shift(4,0);continue}X=H.FileIndex[oe],oe===0&&(X.start=X.size?X.start-1:G);var Le=oe===0&&Z.root||X.name;if(pe=2*(Le.length+1),Ae.write_shift(64,Le,"utf16le"),Ae.write_shift(2,pe),Ae.write_shift(1,X.type),Ae.write_shift(1,X.color),Ae.write_shift(-4,X.L),Ae.write_shift(-4,X.R),Ae.write_shift(-4,X.C),X.clsid)Ae.write_shift(16,X.clsid,"hex");else for(Fe=0;Fe<4;++Fe)Ae.write_shift(4,0);Ae.write_shift(4,X.state||0),Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(4,0),Ae.write_shift(4,X.start),Ae.write_shift(4,X.size),Ae.write_shift(4,0)}for(oe=1;oe<H.FileIndex.length;++oe)if(X=H.FileIndex[oe],X.size>=4096)if(Ae.l=X.start+1<<9,Jt&&Buffer.isBuffer(X.content))X.content.copy(Ae,Ae.l,0,X.size),Ae.l+=X.size+511&-512;else{for(Fe=0;Fe<X.size;++Fe)Ae.write_shift(1,X.content[Fe]);for(;Fe&511;++Fe)Ae.write_shift(1,0)}for(oe=1;oe<H.FileIndex.length;++oe)if(X=H.FileIndex[oe],X.size>0&&X.size<4096)if(Jt&&Buffer.isBuffer(X.content))X.content.copy(Ae,Ae.l,0,X.size),Ae.l+=X.size+63&-64;else{for(Fe=0;Fe<X.size;++Fe)Ae.write_shift(1,X.content[Fe]);for(;Fe&63;++Fe)Ae.write_shift(1,0)}if(Jt)Ae.l=Ae.length;else for(;Ae.l<Ae.length;)Ae.write_shift(1,0);return Ae}function T(H,ie){var Z=H.FullPaths.map(function(Fe){return Fe.toUpperCase()}),ee=Z.map(function(Fe){var pe=Fe.split("/");return pe[pe.length-(Fe.slice(-1)=="/"?2:1)]}),Ae=!1;ie.charCodeAt(0)===47?(Ae=!0,ie=Z[0].slice(0,-1)+ie):Ae=ie.indexOf("/")!==-1;var oe=ie.toUpperCase(),Se=Ae===!0?Z.indexOf(oe):ee.indexOf(oe);if(Se!==-1)return H.FileIndex[Se];var Ie=!oe.match(vh);for(oe=oe.replace(Gl,""),Ie&&(oe=oe.replace(vh,"!")),Se=0;Se<Z.length;++Se)if((Ie?Z[Se].replace(vh,"!"):Z[Se]).replace(Gl,"")==oe||(Ie?ee[Se].replace(vh,"!"):ee[Se]).replace(Gl,"")==oe)return H.FileIndex[Se];return null}var L=64,G=-2,Y="d0cf11e0a1b11ae1",se=[208,207,17,224,161,177,26,225],he="00000000000000000000000000000000",ge={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:G,FREESECT:-1,HEADER_SIGNATURE:Y,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:he,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function re(H,ie,Z){c();var ee=q(H,Z);l.writeFileSync(ie,ee)}function le(H){for(var ie=new Array(H.length),Z=0;Z<H.length;++Z)ie[Z]=String.fromCharCode(H[Z]);return ie.join("")}function fe(H,ie){var Z=q(H,ie);switch(ie&&ie.type||"buffer"){case"file":return c(),l.writeFileSync(ie.filename,Z),Z;case"binary":return typeof Z=="string"?Z:le(Z);case"base64":return zl(typeof Z=="string"?Z:le(Z));case"buffer":if(Jt)return Buffer.isBuffer(Z)?Z:jA(Z);case"array":return typeof Z=="string"?Xa(Z):Z}return Z}var Ue;function b(H){try{var ie=H.InflateRaw,Z=new ie;if(Z._processChunk(new Uint8Array([3,0]),Z._finishFlushFlag),Z.bytesRead)Ue=H;else throw new Error("zlib does not expose bytesRead")}catch(ee){console.error("cannot use native zlib: "+(ee.message||ee))}}function _(H,ie){if(!Ue)return Rt(H,ie);var Z=Ue.InflateRaw,ee=new Z,Ae=ee._processChunk(H.slice(H.l),ee._finishFlushFlag);return H.l+=ee.bytesRead,Ae}function B(H){return Ue?Ue.deflateRawSync(H):xt(H)}var x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],D=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function W(H){var ie=(H<<1|H<<11)&139536|(H<<5|H<<15)&558144;return(ie>>16|ie>>8|ie)&255}for(var ue=typeof Uint8Array<"u",Ce=ue?new Uint8Array(256):[],de=0;de<256;++de)Ce[de]=W(de);function ke(H,ie){var Z=Ce[H&255];return ie<=8?Z>>>8-ie:(Z=Z<<8|Ce[H>>8&255],ie<=16?Z>>>16-ie:(Z=Z<<8|Ce[H>>16&255],Z>>>24-ie))}function ne(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=6?0:H[ee+1]<<8))>>>Z&3}function Ee(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=5?0:H[ee+1]<<8))>>>Z&7}function xe(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=4?0:H[ee+1]<<8))>>>Z&15}function te(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=3?0:H[ee+1]<<8))>>>Z&31}function Pe(H,ie){var Z=ie&7,ee=ie>>>3;return(H[ee]|(Z<=1?0:H[ee+1]<<8))>>>Z&127}function rt(H,ie,Z){var ee=ie&7,Ae=ie>>>3,oe=(1<<Z)-1,Se=H[Ae]>>>ee;return Z<8-ee||(Se|=H[Ae+1]<<8-ee,Z<16-ee)||(Se|=H[Ae+2]<<16-ee,Z<24-ee)||(Se|=H[Ae+3]<<24-ee),Se&oe}function Ve(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return ee<=5?H[Ae]|=(Z&7)<<ee:(H[Ae]|=Z<<ee&255,H[Ae+1]=(Z&7)>>8-ee),ie+3}function We(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return Z=(Z&1)<<ee,H[Ae]|=Z,ie+1}function Ye(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return Z<<=ee,H[Ae]|=Z&255,Z>>>=8,H[Ae+1]=Z,ie+8}function Je(H,ie,Z){var ee=ie&7,Ae=ie>>>3;return Z<<=ee,H[Ae]|=Z&255,Z>>>=8,H[Ae+1]=Z&255,H[Ae+2]=Z>>>8,ie+16}function ot(H,ie){var Z=H.length,ee=2*Z>ie?2*Z:ie+5,Ae=0;if(Z>=ie)return H;if(Jt){var oe=Hv(ee);if(H.copy)H.copy(oe);else for(;Ae<H.length;++Ae)oe[Ae]=H[Ae];return oe}else if(ue){var Se=new Uint8Array(ee);if(Se.set)Se.set(H);else for(;Ae<Z;++Ae)Se[Ae]=H[Ae];return Se}return H.length=ee,H}function at(H){for(var ie=new Array(H),Z=0;Z<H;++Z)ie[Z]=0;return ie}function ft(H,ie,Z){var ee=1,Ae=0,oe=0,Se=0,Ie=0,Fe=H.length,pe=ue?new Uint16Array(32):at(32);for(oe=0;oe<32;++oe)pe[oe]=0;for(oe=Fe;oe<Z;++oe)H[oe]=0;Fe=H.length;var X=ue?new Uint16Array(Fe):at(Fe);for(oe=0;oe<Fe;++oe)pe[Ae=H[oe]]++,ee<Ae&&(ee=Ae),X[oe]=0;for(pe[0]=0,oe=1;oe<=ee;++oe)pe[oe+16]=Ie=Ie+pe[oe-1]<<1;for(oe=0;oe<Fe;++oe)Ie=H[oe],Ie!=0&&(X[oe]=pe[Ie+16]++);var we=0;for(oe=0;oe<Fe;++oe)if(we=H[oe],we!=0)for(Ie=ke(X[oe],ee)>>ee-we,Se=(1<<ee+4-we)-1;Se>=0;--Se)ie[Ie|Se<<we]=we&15|oe<<4;return ee}var yt=ue?new Uint16Array(512):at(512),kt=ue?new Uint16Array(32):at(32);if(!ue){for(var Nt=0;Nt<512;++Nt)yt[Nt]=0;for(Nt=0;Nt<32;++Nt)kt[Nt]=0}(function(){for(var H=[],ie=0;ie<32;ie++)H.push(5);ft(H,kt,32);var Z=[];for(ie=0;ie<=143;ie++)Z.push(8);for(;ie<=255;ie++)Z.push(9);for(;ie<=279;ie++)Z.push(7);for(;ie<=287;ie++)Z.push(8);ft(Z,yt,288)})();var dt=function(){for(var ie=ue?new Uint8Array(32768):[],Z=0,ee=0;Z<D.length-1;++Z)for(;ee<D[Z+1];++ee)ie[ee]=Z;for(;ee<32768;++ee)ie[ee]=29;var Ae=ue?new Uint8Array(259):[];for(Z=0,ee=0;Z<S.length-1;++Z)for(;ee<S[Z+1];++ee)Ae[ee]=Z;function oe(Ie,Fe){for(var pe=0;pe<Ie.length;){var X=Math.min(65535,Ie.length-pe),we=pe+X==Ie.length;for(Fe.write_shift(1,+we),Fe.write_shift(2,X),Fe.write_shift(2,~X&65535);X-- >0;)Fe[Fe.l++]=Ie[pe++]}return Fe.l}function Se(Ie,Fe){for(var pe=0,X=0,we=ue?new Uint16Array(32768):[];X<Ie.length;){var Le=Math.min(65535,Ie.length-X);if(Le<10){for(pe=Ve(Fe,pe,+(X+Le==Ie.length)),pe&7&&(pe+=8-(pe&7)),Fe.l=pe/8|0,Fe.write_shift(2,Le),Fe.write_shift(2,~Le&65535);Le-- >0;)Fe[Fe.l++]=Ie[X++];pe=Fe.l*8;continue}pe=Ve(Fe,pe,+(X+Le==Ie.length)+2);for(var Ke=0;Le-- >0;){var ze=Ie[X];Ke=(Ke<<5^ze)&32767;var qe=-1,ut=0;if((qe=we[Ke])&&(qe|=X&-32768,qe>X&&(qe-=32768),qe<X))for(;Ie[qe+ut]==Ie[X+ut]&&ut<250;)++ut;if(ut>2){ze=Ae[ut],ze<=22?pe=Ye(Fe,pe,Ce[ze+1]>>1)-1:(Ye(Fe,pe,3),pe+=5,Ye(Fe,pe,Ce[ze-23]>>5),pe+=3);var zt=ze<8?0:ze-4>>2;zt>0&&(Je(Fe,pe,ut-S[ze]),pe+=zt),ze=ie[X-qe],pe=Ye(Fe,pe,Ce[ze]>>3),pe-=3;var Ct=ze<4?0:ze-2>>1;Ct>0&&(Je(Fe,pe,X-qe-D[ze]),pe+=Ct);for(var Er=0;Er<ut;++Er)we[Ke]=X&32767,Ke=(Ke<<5^Ie[X])&32767,++X;Le-=ut-1}else ze<=143?ze=ze+48:pe=We(Fe,pe,1),pe=Ye(Fe,pe,Ce[ze]),we[Ke]=X&32767,++X}pe=Ye(Fe,pe,0)-1}return Fe.l=(pe+7)/8|0,Fe.l}return function(Fe,pe){return Fe.length<8?oe(Fe,pe):Se(Fe,pe)}}();function xt(H){var ie=Oe(50+Math.floor(H.length*1.1)),Z=dt(H,ie);return ie.slice(0,Z)}var tt=ue?new Uint16Array(32768):at(32768),ir=ue?new Uint16Array(32768):at(32768),Lt=ue?new Uint16Array(128):at(128),fr=1,Qt=1;function Kt(H,ie){var Z=te(H,ie)+257;ie+=5;var ee=te(H,ie)+1;ie+=5;var Ae=xe(H,ie)+4;ie+=4;for(var oe=0,Se=ue?new Uint8Array(19):at(19),Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Fe=1,pe=ue?new Uint8Array(8):at(8),X=ue?new Uint8Array(8):at(8),we=Se.length,Le=0;Le<Ae;++Le)Se[x[Le]]=oe=Ee(H,ie),Fe<oe&&(Fe=oe),pe[oe]++,ie+=3;var Ke=0;for(pe[0]=0,Le=1;Le<=Fe;++Le)X[Le]=Ke=Ke+pe[Le-1]<<1;for(Le=0;Le<we;++Le)(Ke=Se[Le])!=0&&(Ie[Le]=X[Ke]++);var ze=0;for(Le=0;Le<we;++Le)if(ze=Se[Le],ze!=0){Ke=Ce[Ie[Le]]>>8-ze;for(var qe=(1<<7-ze)-1;qe>=0;--qe)Lt[Ke|qe<<ze]=ze&7|Le<<3}var ut=[];for(Fe=1;ut.length<Z+ee;)switch(Ke=Lt[Pe(H,ie)],ie+=Ke&7,Ke>>>=3){case 16:for(oe=3+ne(H,ie),ie+=2,Ke=ut[ut.length-1];oe-- >0;)ut.push(Ke);break;case 17:for(oe=3+Ee(H,ie),ie+=3;oe-- >0;)ut.push(0);break;case 18:for(oe=11+Pe(H,ie),ie+=7;oe-- >0;)ut.push(0);break;default:ut.push(Ke),Fe<Ke&&(Fe=Ke);break}var zt=ut.slice(0,Z),Ct=ut.slice(Z);for(Le=Z;Le<286;++Le)zt[Le]=0;for(Le=ee;Le<30;++Le)Ct[Le]=0;return fr=ft(zt,tt,286),Qt=ft(Ct,ir,30),ie}function Jr(H,ie){if(H[0]==3&&!(H[1]&3))return[yo(ie),2];for(var Z=0,ee=0,Ae=Hv(ie||1<<18),oe=0,Se=Ae.length>>>0,Ie=0,Fe=0;!(ee&1);){if(ee=Ee(H,Z),Z+=3,ee>>>1)ee>>1==1?(Ie=9,Fe=5):(Z=Kt(H,Z),Ie=fr,Fe=Qt);else{Z&7&&(Z+=8-(Z&7));var pe=H[Z>>>3]|H[(Z>>>3)+1]<<8;if(Z+=32,pe>0)for(!ie&&Se<oe+pe&&(Ae=ot(Ae,oe+pe),Se=Ae.length);pe-- >0;)Ae[oe++]=H[Z>>>3],Z+=8;continue}for(;;){!ie&&Se<oe+32767&&(Ae=ot(Ae,oe+32767),Se=Ae.length);var X=rt(H,Z,Ie),we=ee>>>1==1?yt[X]:tt[X];if(Z+=we&15,we>>>=4,!(we>>>8&255))Ae[oe++]=we;else{if(we==256)break;we-=257;var Le=we<8?0:we-4>>2;Le>5&&(Le=0);var Ke=oe+S[we];Le>0&&(Ke+=rt(H,Z,Le),Z+=Le),X=rt(H,Z,Fe),we=ee>>>1==1?kt[X]:ir[X],Z+=we&15,we>>>=4;var ze=we<4?0:we-2>>1,qe=D[we];for(ze>0&&(qe+=rt(H,Z,ze),Z+=ze),!ie&&Se<Ke&&(Ae=ot(Ae,Ke+100),Se=Ae.length);oe<Ke;)Ae[oe]=Ae[oe-qe],++oe}}}return ie?[Ae,Z+7>>>3]:[Ae.slice(0,oe),Z+7>>>3]}function Rt(H,ie){var Z=H.slice(H.l||0),ee=Jr(Z,ie);return H.l+=ee[1],ee[0]}function _r(H,ie){if(H)typeof console<"u"&&console.error(ie);else throw new Error(ie)}function Yt(H,ie){var Z=H;ma(Z,0);var ee=[],Ae=[],oe={FileIndex:ee,FullPaths:Ae};I(oe,{root:ie.root});for(var Se=Z.length-4;(Z[Se]!=80||Z[Se+1]!=75||Z[Se+2]!=5||Z[Se+3]!=6)&&Se>=0;)--Se;Z.l=Se+4,Z.l+=4;var Ie=Z.read_shift(2);Z.l+=6;var Fe=Z.read_shift(4);for(Z.l=Fe,Se=0;Se<Ie;++Se){Z.l+=20;var pe=Z.read_shift(4),X=Z.read_shift(4),we=Z.read_shift(2),Le=Z.read_shift(2),Ke=Z.read_shift(2);Z.l+=8;var ze=Z.read_shift(4),qe=s(Z.slice(Z.l+we,Z.l+we+Le));Z.l+=we+Le+Ke;var ut=Z.l;Z.l=ze+4,on(Z,pe,X,oe,qe),Z.l=ut}return oe}function on(H,ie,Z,ee,Ae){H.l+=2;var oe=H.read_shift(2),Se=H.read_shift(2),Ie=o(H);if(oe&8257)throw new Error("Unsupported ZIP encryption");for(var Fe=H.read_shift(4),pe=H.read_shift(4),X=H.read_shift(4),we=H.read_shift(2),Le=H.read_shift(2),Ke="",ze=0;ze<we;++ze)Ke+=String.fromCharCode(H[H.l++]);if(Le){var qe=s(H.slice(H.l,H.l+Le));(qe[21589]||{}).mt&&(Ie=qe[21589].mt),((Ae||{})[21589]||{}).mt&&(Ie=Ae[21589].mt)}H.l+=Le;var ut=H.slice(H.l,H.l+pe);switch(Se){case 8:ut=_(H,X);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+Se)}var zt=!1;oe&8&&(Fe=H.read_shift(4),Fe==134695760&&(Fe=H.read_shift(4),zt=!0),pe=H.read_shift(4),X=H.read_shift(4)),pe!=ie&&_r(zt,"Bad compressed size: "+ie+" != "+pe),X!=Z&&_r(zt,"Bad uncompressed size: "+Z+" != "+X),Mn(ee,Ke,ut,{unsafe:!0,mt:Ie})}function _t(H,ie){var Z=ie||{},ee=[],Ae=[],oe=Oe(1),Se=Z.compression?8:0,Ie=0,Fe=0,pe=0,X=0,we=0,Le=H.FullPaths[0],Ke=Le,ze=H.FileIndex[0],qe=[],ut=0;for(Fe=1;Fe<H.FullPaths.length;++Fe)if(Ke=H.FullPaths[Fe].slice(Le.length),ze=H.FileIndex[Fe],!(!ze.size||!ze.content||Ke=="Sh33tJ5")){var zt=X,Ct=Oe(Ke.length);for(pe=0;pe<Ke.length;++pe)Ct.write_shift(1,Ke.charCodeAt(pe)&127);Ct=Ct.slice(0,Ct.l),qe[we]=NN.buf(ze.content,0);var Er=ze.content;Se==8&&(Er=B(Er)),oe=Oe(30),oe.write_shift(4,67324752),oe.write_shift(2,20),oe.write_shift(2,Ie),oe.write_shift(2,Se),ze.mt?A(oe,ze.mt):oe.write_shift(4,0),oe.write_shift(-4,qe[we]),oe.write_shift(4,Er.length),oe.write_shift(4,ze.content.length),oe.write_shift(2,Ct.length),oe.write_shift(2,0),X+=oe.length,ee.push(oe),X+=Ct.length,ee.push(Ct),X+=Er.length,ee.push(Er),oe=Oe(46),oe.write_shift(4,33639248),oe.write_shift(2,0),oe.write_shift(2,20),oe.write_shift(2,Ie),oe.write_shift(2,Se),oe.write_shift(4,0),oe.write_shift(-4,qe[we]),oe.write_shift(4,Er.length),oe.write_shift(4,ze.content.length),oe.write_shift(2,Ct.length),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(4,0),oe.write_shift(4,zt),ut+=oe.l,Ae.push(oe),ut+=Ct.length,Ae.push(Ct),++we}return oe=Oe(22),oe.write_shift(4,101010256),oe.write_shift(2,0),oe.write_shift(2,0),oe.write_shift(2,we),oe.write_shift(2,we),oe.write_shift(4,ut),oe.write_shift(4,X),oe.write_shift(2,0),wn([wn(ee),wn(Ae),oe])}var Gt={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function bt(H,ie){if(H.ctype)return H.ctype;var Z=H.name||"",ee=Z.match(/\.([^\.]+)$/);return ee&&Gt[ee[1]]||ie&&(ee=(Z=ie).match(/[\.\\]([^\.\\])+$/),ee&&Gt[ee[1]])?Gt[ee[1]]:"application/octet-stream"}function $t(H){for(var ie=zl(H),Z=[],ee=0;ee<ie.length;ee+=76)Z.push(ie.slice(ee,ee+76));return Z.join(`\r
265
265
  `)+`\r
266
266
  `}function xa(H){var ie=H.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(pe){var X=pe.charCodeAt(0).toString(16).toUpperCase();return"="+(X.length==1?"0"+X:X)});ie=ie.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),ie.charAt(0)==`
267
267
  `&&(ie="=0D"+ie.slice(1)),ie=ie.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
@@ -355,7 +355,7 @@ end`};e.events.push(["putFont",function(A){(function(o){var s=o.font,l=o.out,c=o
355
355
  `),l.push(` </office:body>
356
356
  `),s.bookType=="fods"?l.push("</office:document>"):l.push("</office:document-content>"),l.join("")}}();function YB(t,e){if(e.bookType=="fods")return qB(t,e);var r=og(),n="",a=[],A=[];return n="mimetype",Ot(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",Ot(r,n,qB(t,e)),a.push([n,"text/xml"]),A.push([n,"ContentFile"]),n="styles.xml",Ot(r,n,dQ(t,e)),a.push([n,"text/xml"]),A.push([n,"StylesFile"]),n="meta.xml",Ot(r,n,jr+Yw()),a.push([n,"text/xml"]),A.push([n,"MetadataFile"]),n="manifest.rdf",Ot(r,n,_6(A)),a.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",Ot(r,n,C6(a)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function $h(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gQ(t){return typeof TextEncoder<"u"?new TextEncoder().encode(t):Xa(qA(t))}function pQ(t,e){e:for(var r=0;r<=t.length-e.length;++r){for(var n=0;n<e.length;++n)if(t[r+n]!=e[n])continue e;return!0}return!1}function Pi(t){var e=t.reduce(function(a,A){return a+A.length},0),r=new Uint8Array(e),n=0;return t.forEach(function(a){r.set(a,n),n+=a.length}),r}function mQ(t,e,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,a=r/Math.pow(10,n-6176);t[e+15]|=n>>7,t[e+14]|=(n&127)<<1;for(var A=0;a>=1;++A,a/=256)t[e+A]=a&255;t[e+15]|=r>=0?0:128}function oc(t,e){var r=e?e[0]:0,n=t[r]&127;e:if(t[r++]>=128&&(n|=(t[r]&127)<<7,t[r++]<128||(n|=(t[r]&127)<<14,t[r++]<128)||(n|=(t[r]&127)<<21,t[r++]<128)||(n+=(t[r]&127)*Math.pow(2,28),++r,t[r++]<128)||(n+=(t[r]&127)*Math.pow(2,35),++r,t[r++]<128)||(n+=(t[r]&127)*Math.pow(2,42),++r,t[r++]<128)))break e;return e&&(e[0]=r),n}function Ar(t){var e=new Uint8Array(7);e[0]=t&127;var r=1;e:if(t>127){if(e[r-1]|=128,e[r]=t>>7&127,++r,t<=16383||(e[r-1]|=128,e[r]=t>>14&127,++r,t<=2097151)||(e[r-1]|=128,e[r]=t>>21&127,++r,t<=268435455)||(e[r-1]|=128,e[r]=t/256>>>21&127,++r,t<=34359738367)||(e[r-1]|=128,e[r]=t/65536>>>21&127,++r,t<=4398046511103))break e;e[r-1]|=128,e[r]=t/16777216>>>21&127,++r}return e.slice(0,r)}function Ss(t){var e=0,r=t[e]&127;e:if(t[e++]>=128){if(r|=(t[e]&127)<<7,t[e++]<128||(r|=(t[e]&127)<<14,t[e++]<128)||(r|=(t[e]&127)<<21,t[e++]<128))break e;r|=(t[e]&127)<<28}return r}function an(t){for(var e=[],r=[0];r[0]<t.length;){var n=r[0],a=oc(t,r),A=a&7;a=Math.floor(a/8);var o=0,s;if(a==0)break;switch(A){case 0:{for(var l=r[0];t[r[0]++]>=128;);s=t.slice(l,r[0])}break;case 5:o=4,s=t.slice(r[0],r[0]+o),r[0]+=o;break;case 1:o=8,s=t.slice(r[0],r[0]+o),r[0]+=o;break;case 2:o=oc(t,r),s=t.slice(r[0],r[0]+o),r[0]+=o;break;case 3:case 4:default:throw new Error("PB Type ".concat(A," for Field ").concat(a," at offset ").concat(n))}var c={data:s,type:A};e[a]==null?e[a]=[c]:e[a].push(c)}return e}function En(t){var e=[];return t.forEach(function(r,n){r.forEach(function(a){a.data&&(e.push(Ar(n*8+a.type)),a.type==2&&e.push(Ar(a.data.length)),e.push(a.data))})}),Pi(e)}function Ja(t){for(var e,r=[],n=[0];n[0]<t.length;){var a=oc(t,n),A=an(t.slice(n[0],n[0]+a));n[0]+=a;var o={id:Ss(A[1][0].data),messages:[]};A[2].forEach(function(s){var l=an(s.data),c=Ss(l[3][0].data);o.messages.push({meta:l,data:t.slice(n[0],n[0]+c)}),n[0]+=c}),(e=A[3])!=null&&e[0]&&(o.merge=Ss(A[3][0].data)>>>0>0),r.push(o)}return r}function ks(t){var e=[];return t.forEach(function(r){var n=[];n[1]=[{data:Ar(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:Ar(+!!r.merge),type:0}]);var a=[];r.messages.forEach(function(o){a.push(o.data),o.meta[3]=[{type:0,data:Ar(o.data.length)}],n[2].push({data:En(o.meta),type:2})});var A=En(n);e.push(Ar(A.length)),e.push(A),a.forEach(function(o){return e.push(o)})}),Pi(e)}function yQ(t,e){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var r=[0],n=oc(e,r),a=[];r[0]<e.length;){var A=e[r[0]]&3;if(A==0){var o=e[r[0]++]>>2;if(o<60)++o;else{var s=o-59;o=e[r[0]],s>1&&(o|=e[r[0]+1]<<8),s>2&&(o|=e[r[0]+2]<<16),s>3&&(o|=e[r[0]+3]<<24),o>>>=0,o++,r[0]+=s}a.push(e.slice(r[0],r[0]+o)),r[0]+=o;continue}else{var l=0,c=0;if(A==1?(c=(e[r[0]]>>2&7)+4,l=(e[r[0]++]&224)<<3,l|=e[r[0]++]):(c=(e[r[0]++]>>2)+1,A==2?(l=e[r[0]]|e[r[0]+1]<<8,r[0]+=2):(l=(e[r[0]]|e[r[0]+1]<<8|e[r[0]+2]<<16|e[r[0]+3]<<24)>>>0,r[0]+=4)),a=[Pi(a)],l==0)throw new Error("Invalid offset 0");if(l>a[0].length)throw new Error("Invalid offset beyond length");if(c>=l)for(a.push(a[0].slice(-l)),c-=l;c>=a[a.length-1].length;)a.push(a[a.length-1]),c-=a[a.length-1].length;a.push(a[0].slice(-l,-l+c))}}var u=Pi(a);if(u.length!=n)throw new Error("Unexpected length: ".concat(u.length," != ").concat(n));return u}function Za(t){for(var e=[],r=0;r<t.length;){var n=t[r++],a=t[r]|t[r+1]<<8|t[r+2]<<16;r+=3,e.push(yQ(n,t.slice(r,r+a))),r+=a}if(r!==t.length)throw new Error("data is not a valid framed stream!");return Pi(e)}function Ts(t){for(var e=[],r=0;r<t.length;){var n=Math.min(t.length-r,268435455),a=new Uint8Array(4);e.push(a);var A=Ar(n),o=A.length;e.push(A),n<=60?(o++,e.push(new Uint8Array([n-1<<2]))):n<=256?(o+=2,e.push(new Uint8Array([240,n-1&255]))):n<=65536?(o+=3,e.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(o+=4,e.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,e.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),e.push(t.slice(r,r+n)),o+=n,a[0]=0,a[1]=o&255,a[2]=o>>8&255,a[3]=o>>16&255,r+=n}return Pi(e)}function Ng(t,e){var r=new Uint8Array(32),n=$h(r),a=12,A=0;switch(r[0]=5,t.t){case"n":r[1]=2,mQ(r,a,t.v),A|=1,a+=16;break;case"b":r[1]=6,n.setFloat64(a,t.v?1:0,!0),A|=2,a+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[1]=3,n.setUint32(a,e.indexOf(t.v),!0),A|=8,a+=4;break;default:throw"unsupported cell type "+t.t}return n.setUint32(8,A,!0),r.slice(0,a)}function Lg(t,e){var r=new Uint8Array(32),n=$h(r),a=12,A=0;switch(r[0]=3,t.t){case"n":r[2]=2,n.setFloat64(a,t.v,!0),A|=32,a+=8;break;case"b":r[2]=6,n.setFloat64(a,t.v?1:0,!0),A|=32,a+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[2]=3,n.setUint32(a,e.indexOf(t.v),!0),A|=16,a+=4;break;default:throw"unsupported cell type "+t.t}return n.setUint32(4,A,!0),r.slice(0,a)}function Mi(t){var e=an(t);return oc(e[1][0].data)}function vQ(t,e,r){var n,a,A,o;if(!((n=t[6])!=null&&n[0])||!((a=t[7])!=null&&a[0]))throw"Mutation only works on post-BNC storages!";var s=((o=(A=t[8])==null?void 0:A[0])==null?void 0:o.data)&&Ss(t[8][0].data)>0||!1;if(s)throw"Math only works with normal offsets";for(var l=0,c=$h(t[7][0].data),u=0,p=[],h=$h(t[4][0].data),d=0,w=[],g=0;g<e.length;++g){if(e[g]==null){c.setUint16(g*2,65535,!0),h.setUint16(g*2,65535);continue}c.setUint16(g*2,u,!0),h.setUint16(g*2,d,!0);var y,m;switch(typeof e[g]){case"string":y=Ng({t:"s",v:e[g]},r),m=Lg({t:"s",v:e[g]},r);break;case"number":y=Ng({t:"n",v:e[g]},r),m=Lg({t:"n",v:e[g]},r);break;case"boolean":y=Ng({t:"b",v:e[g]},r),m=Lg({t:"b",v:e[g]},r);break;default:throw new Error("Unsupported value "+e[g])}p.push(y),u+=y.length,w.push(m),d+=m.length,++l}for(t[2][0].data=Ar(l);g<t[7][0].data.length/2;++g)c.setUint16(g*2,65535,!0),h.setUint16(g*2,65535,!0);return t[6][0].data=Pi(p),t[3][0].data=Pi(w),l}function wQ(t,e){if(!e||!e.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=ya(r["!ref"]);n.s.r=n.s.c=0;var a=!1;n.e.c>9&&(a=!0,n.e.c=9),n.e.r>49&&(a=!0,n.e.r=49),a&&console.error("The Numbers writer is currently limited to ".concat(Wr(n)));var A=Kh(r,{range:n,header:1}),o=["~Sh33tJ5~"];A.forEach(function(_){return _.forEach(function(B){typeof B=="string"&&o.push(B)})});var s={},l=[],c=cr.read(e.numbers,{type:"base64"});c.FileIndex.map(function(_,B){return[_,c.FullPaths[B]]}).forEach(function(_){var B=_[0],x=_[1];if(B.type==2&&B.name.match(/\.iwa/)){var S=B.content,D=Za(S),W=Ja(D);W.forEach(function(ue){l.push(ue.id),s[ue.id]={deps:[],location:x,type:Ss(ue.messages[0].meta[1][0].data)}})}}),l.sort(function(_,B){return _-B});var u=l.filter(function(_){return _>1}).map(function(_){return[_,Ar(_)]});c.FileIndex.map(function(_,B){return[_,c.FullPaths[B]]}).forEach(function(_){var B=_[0];if(_[1],!!B.name.match(/\.iwa/)){var x=Ja(Za(B.content));x.forEach(function(S){S.messages.forEach(function(D){u.forEach(function(W){S.messages.some(function(ue){return Ss(ue.meta[1][0].data)!=11006&&pQ(ue.data,W[1])})&&s[W[0]].deps.push(S.id)})})})}});for(var p=cr.find(c,s[1].location),h=Ja(Za(p.content)),d,w=0;w<h.length;++w){var g=h[w];g.id==1&&(d=g)}var y=Mi(an(d.messages[0].data)[1][0].data);for(p=cr.find(c,s[y].location),h=Ja(Za(p.content)),w=0;w<h.length;++w)g=h[w],g.id==y&&(d=g);for(y=Mi(an(d.messages[0].data)[2][0].data),p=cr.find(c,s[y].location),h=Ja(Za(p.content)),w=0;w<h.length;++w)g=h[w],g.id==y&&(d=g);for(y=Mi(an(d.messages[0].data)[2][0].data),p=cr.find(c,s[y].location),h=Ja(Za(p.content)),w=0;w<h.length;++w)g=h[w],g.id==y&&(d=g);var m=an(d.messages[0].data);{m[6][0].data=Ar(n.e.r+1),m[7][0].data=Ar(n.e.c+1);var F=Mi(m[46][0].data),N=cr.find(c,s[F].location),Q=Ja(Za(N.content));{for(var z=0;z<Q.length&&Q[z].id!=F;++z);if(Q[z].id!=F)throw"Bad ColumnRowUIDMapArchive";var R=an(Q[z].messages[0].data);R[1]=[],R[2]=[],R[3]=[];for(var I=0;I<=n.e.c;++I){var U=[];U[1]=U[2]=[{type:0,data:Ar(I+420690)}],R[1].push({type:2,data:En(U)}),R[2].push({type:0,data:Ar(I)}),R[3].push({type:0,data:Ar(I)})}R[4]=[],R[5]=[],R[6]=[];for(var O=0;O<=n.e.r;++O)U=[],U[1]=U[2]=[{type:0,data:Ar(O+726270)}],R[4].push({type:2,data:En(U)}),R[5].push({type:0,data:Ar(O)}),R[6].push({type:0,data:Ar(O)});Q[z].messages[0].data=En(R)}N.content=Ts(ks(Q)),N.size=N.content.length,delete m[46];var q=an(m[4][0].data);{q[7][0].data=Ar(n.e.r+1);var T=an(q[1][0].data),L=Mi(T[2][0].data);N=cr.find(c,s[L].location),Q=Ja(Za(N.content));{if(Q[0].id!=L)throw"Bad HeaderStorageBucket";var G=an(Q[0].messages[0].data);for(O=0;O<A.length;++O){var Y=an(G[2][0].data);Y[1][0].data=Ar(O),Y[4][0].data=Ar(A[O].length),G[2][O]={type:G[2][0].type,data:En(Y)}}Q[0].messages[0].data=En(G)}N.content=Ts(ks(Q)),N.size=N.content.length;var se=Mi(q[2][0].data);N=cr.find(c,s[se].location),Q=Ja(Za(N.content));{if(Q[0].id!=se)throw"Bad HeaderStorageBucket";for(G=an(Q[0].messages[0].data),I=0;I<=n.e.c;++I)Y=an(G[2][0].data),Y[1][0].data=Ar(I),Y[4][0].data=Ar(n.e.r+1),G[2][I]={type:G[2][0].type,data:En(Y)};Q[0].messages[0].data=En(G)}N.content=Ts(ks(Q)),N.size=N.content.length;var he=Mi(q[4][0].data);(function(){for(var _=cr.find(c,s[he].location),B=Ja(Za(_.content)),x,S=0;S<B.length;++S){var D=B[S];D.id==he&&(x=D)}var W=an(x.messages[0].data);{W[3]=[];var ue=[];o.forEach(function(ke,ne){ue[1]=[{type:0,data:Ar(ne)}],ue[2]=[{type:0,data:Ar(1)}],ue[3]=[{type:2,data:gQ(ke)}],W[3].push({type:2,data:En(ue)})})}x.messages[0].data=En(W);var Ce=ks(B),de=Ts(Ce);_.content=de,_.size=_.content.length})();var ge=an(q[3][0].data);{var re=ge[1][0];delete ge[2];var le=an(re.data);{var fe=Mi(le[2][0].data);(function(){for(var _=cr.find(c,s[fe].location),B=Ja(Za(_.content)),x,S=0;S<B.length;++S){var D=B[S];D.id==fe&&(x=D)}var W=an(x.messages[0].data);{delete W[6],delete ge[7];var ue=new Uint8Array(W[5][0].data);W[5]=[];for(var Ce=0,de=0;de<=n.e.r;++de){var ke=an(ue);Ce+=vQ(ke,A[de],o),ke[1][0].data=Ar(de),W[5].push({data:En(ke),type:2})}W[1]=[{type:0,data:Ar(n.e.c+1)}],W[2]=[{type:0,data:Ar(n.e.r+1)}],W[3]=[{type:0,data:Ar(Ce)}],W[4]=[{type:0,data:Ar(n.e.r+1)}]}x.messages[0].data=En(W);var ne=ks(B),Ee=Ts(ne);_.content=Ee,_.size=_.content.length})()}re.data=En(le)}q[3][0].data=En(ge)}m[4][0].data=En(q)}d.messages[0].data=En(m);var Ue=ks(h),b=Ts(Ue);return p.content=b,p.size=p.content.length,c}function BQ(t){return function(r){for(var n=0;n!=t.length;++n){var a=t[n];r[a[0]]===void 0&&(r[a[0]]=a[1]),a[2]==="n"&&(r[a[0]]=Number(r[a[0]]))}}}function Ug(t){BQ([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}function xQ(t,e){return e.bookType=="ods"?YB(t,e):e.bookType=="numbers"?wQ(t,e):e.bookType=="xlsb"?bQ(t,e):CQ(t,e)}function bQ(t,e){_s=1024,t&&!t.SSF&&(t.SSF=ra(kr)),t&&t.SSF&&(Eh(),Ch(t.SSF),e.revssf=_h(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,Ac?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r=e.bookType=="xlsb"?"bin":"xml",n=SB.indexOf(e.bookType)>-1,a=jw();Ug(e=e||{});var A=og(),o="",s=0;if(e.cellXfs=[],Oi(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),o="docProps/core.xml",Ot(A,o,Jw(t.Props,e)),a.coreprops.push(o),ar(e.rels,2,o,qt.CORE_PROPS),o="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var l=[],c=0;c<t.SheetNames.length;++c)(t.Workbook.Sheets[c]||{}).Hidden!=2&&l.push(t.SheetNames[c]);t.Props.SheetNames=l}for(t.Props.Worksheets=t.Props.SheetNames.length,Ot(A,o,eB(t.Props)),a.extprops.push(o),ar(e.rels,3,o,qt.EXT_PROPS),t.Custprops!==t.Props&&Bn(t.Custprops||{}).length>0&&(o="docProps/custom.xml",Ot(A,o,tB(t.Custprops)),a.custprops.push(o),ar(e.rels,4,o,qt.CUST_PROPS)),s=1;s<=t.SheetNames.length;++s){var u={"!id":{}},p=t.Sheets[t.SheetNames[s-1]],h=(p||{})["!type"]||"sheet";switch(h){case"chart":default:o="xl/worksheets/sheet"+s+"."+r,Ot(A,o,_D(s-1,o,e,t,u)),a.sheets.push(o),ar(e.wbrels,-1,"worksheets/sheet"+s+"."+r,qt.WS[0])}if(p){var d=p["!comments"],w=!1,g="";d&&d.length>0&&(g="xl/comments"+s+"."+r,Ot(A,g,kD(d,g)),a.comments.push(g),ar(u,-1,"../comments"+s+"."+r,qt.CMNT),w=!0),p["!legacy"]&&w&&Ot(A,"xl/drawings/vmlDrawing"+s+".vml",_B(s,p["!comments"])),delete p["!comments"],delete p["!legacy"]}u["!id"].rId1&&Ot(A,Xw(o),Cs(u))}return e.Strings!=null&&e.Strings.length>0&&(o="xl/sharedStrings."+r,Ot(A,o,SD(e.Strings,o,e)),a.strs.push(o),ar(e.wbrels,-1,"sharedStrings."+r,qt.SST)),o="xl/workbook."+r,Ot(A,o,ED(t,o)),a.workbooks.push(o),ar(e.rels,1,o,qt.WB),o="xl/theme/theme1.xml",Ot(A,o,CB(t.Themes,e)),a.themes.push(o),ar(e.wbrels,-1,"theme/theme1.xml",qt.THEME),o="xl/styles."+r,Ot(A,o,FD(t,o,e)),a.styles.push(o),ar(e.wbrels,-1,"styles."+r,qt.STY),t.vbaraw&&n&&(o="xl/vbaProject.bin",Ot(A,o,t.vbaraw),a.vba.push(o),ar(e.wbrels,-1,"vbaProject.bin",qt.VBA)),o="xl/metadata."+r,Ot(A,o,TD(o)),a.metadata.push(o),ar(e.wbrels,-1,"metadata."+r,qt.XLMETA),Ot(A,"[Content_Types].xml",Ww(a,e)),Ot(A,"_rels/.rels",Cs(e.rels)),Ot(A,"xl/_rels/workbook."+r+".rels",Cs(e.wbrels)),delete e.revssf,delete e.ssf,A}function CQ(t,e){_s=1024,t&&!t.SSF&&(t.SSF=ra(kr)),t&&t.SSF&&(Eh(),Ch(t.SSF),e.revssf=_h(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,Ac?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r="xml",n=SB.indexOf(e.bookType)>-1,a=jw();Ug(e=e||{});var A=og(),o="",s=0;if(e.cellXfs=[],Oi(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),o="docProps/core.xml",Ot(A,o,Jw(t.Props,e)),a.coreprops.push(o),ar(e.rels,2,o,qt.CORE_PROPS),o="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var l=[],c=0;c<t.SheetNames.length;++c)(t.Workbook.Sheets[c]||{}).Hidden!=2&&l.push(t.SheetNames[c]);t.Props.SheetNames=l}t.Props.Worksheets=t.Props.SheetNames.length,Ot(A,o,eB(t.Props)),a.extprops.push(o),ar(e.rels,3,o,qt.EXT_PROPS),t.Custprops!==t.Props&&Bn(t.Custprops||{}).length>0&&(o="docProps/custom.xml",Ot(A,o,tB(t.Custprops)),a.custprops.push(o),ar(e.rels,4,o,qt.CUST_PROPS));var u=["SheetJ5"];for(e.tcid=0,s=1;s<=t.SheetNames.length;++s){var p={"!id":{}},h=t.Sheets[t.SheetNames[s-1]],d=(h||{})["!type"]||"sheet";switch(d){case"chart":default:o="xl/worksheets/sheet"+s+"."+r,Ot(A,o,RB(s-1,e,t,p)),a.sheets.push(o),ar(e.wbrels,-1,"worksheets/sheet"+s+"."+r,qt.WS[0])}if(h){var w=h["!comments"],g=!1,y="";if(w&&w.length>0){var m=!1;w.forEach(function(F){F[1].forEach(function(N){N.T==!0&&(m=!0)})}),m&&(y="xl/threadedComments/threadedComment"+s+"."+r,Ot(A,y,t8(w,u,e)),a.threadedcomments.push(y),ar(p,-1,"../threadedComments/threadedComment"+s+"."+r,qt.TCMNT)),y="xl/comments"+s+"."+r,Ot(A,y,FB(w)),a.comments.push(y),ar(p,-1,"../comments"+s+"."+r,qt.CMNT),g=!0}h["!legacy"]&&g&&Ot(A,"xl/drawings/vmlDrawing"+s+".vml",_B(s,h["!comments"])),delete h["!comments"],delete h["!legacy"]}p["!id"].rId1&&Ot(A,Xw(o),Cs(p))}return e.Strings!=null&&e.Strings.length>0&&(o="xl/sharedStrings."+r,Ot(A,o,pB(e.Strings,e)),a.strs.push(o),ar(e.wbrels,-1,"sharedStrings."+r,qt.SST)),o="xl/workbook."+r,Ot(A,o,$B(t)),a.workbooks.push(o),ar(e.rels,1,o,qt.WB),o="xl/theme/theme1.xml",Ot(A,o,CB(t.Themes,e)),a.themes.push(o),ar(e.wbrels,-1,"theme/theme1.xml",qt.THEME),o="xl/styles."+r,Ot(A,o,BB(t,e)),a.styles.push(o),ar(e.wbrels,-1,"styles."+r,qt.STY),t.vbaraw&&n&&(o="xl/vbaProject.bin",Ot(A,o,t.vbaraw),a.vba.push(o),ar(e.wbrels,-1,"vbaProject.bin",qt.VBA)),o="xl/metadata."+r,Ot(A,o,EB()),a.metadata.push(o),ar(e.wbrels,-1,"metadata."+r,qt.XLMETA),u.length>1&&(o="xl/persons/person.xml",Ot(A,o,r8(u)),a.people.push(o),ar(e.wbrels,-1,"persons/person.xml",qt.PEOPLE)),Ot(A,"[Content_Types].xml",Ww(a,e)),Ot(A,"_rels/.rels",Cs(e.rels)),Ot(A,"xl/_rels/workbook."+r+".rels",Cs(e.wbrels)),delete e.revssf,delete e.ssf,A}function EQ(t,e){var r="";switch((e||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":r=GA(t.slice(0,12));break;case"binary":r=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(e&&e.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function JB(t,e){switch(e.type){case"base64":case"binary":break;case"buffer":case"array":e.type="";break;case"file":return jl(e.file,cr.write(t,{type:Jt?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");default:throw new Error("Unrecognized type "+e.type)}return cr.write(t,e)}function _Q(t,e){var r=ra(e||{}),n=xQ(t,r);return FQ(n,r)}function FQ(t,e){var r={},n=Jt?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(e.compression&&(r.compression="DEFLATE"),e.password)r.type=n;else switch(e.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");case"buffer":case"file":r.type=n;break;default:throw new Error("Unrecognized type "+e.type)}var a=t.FullPaths?cr.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!e.compression}):t.generate(r);if(typeof Deno<"u"&&typeof a=="string"){if(e.type=="binary"||e.type=="base64")return a;a=new Uint8Array(yh(a))}return e.password&&typeof encrypt_agile<"u"?JB(encrypt_agile(a,e.password),e):e.type==="file"?jl(e.file,a):e.type=="string"?Xl(a):a}function SQ(t,e){var r=e||{},n=zD(t,r);return JB(n,r)}function SA(t,e,r){r||(r="");var n=r+t;switch(e.type){case"base64":return zl(qA(n));case"binary":return qA(n);case"string":return t;case"file":return jl(e.file,n,"utf8");case"buffer":return Jt?jA(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):SA(n,{type:"binary"}).split("").map(function(a){return a.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function kQ(t,e){switch(e.type){case"base64":return zl(t);case"binary":return t;case"string":return t;case"file":return jl(e.file,t,"binary");case"buffer":return Jt?jA(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function zh(t,e){switch(e.type){case"string":case"base64":case"binary":for(var r="",n=0;n<t.length;++n)r+=String.fromCharCode(t[n]);return e.type=="base64"?zl(r):e.type=="string"?Xl(r):r;case"file":return jl(e.file,t);case"buffer":return t;default:throw new Error("Unrecognized type "+e.type)}}function ZB(t,e){rN(),dD(t);var r=ra(e||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var n=ZB(t,r);return r.type="array",yh(n)}var a=0;if(r.sheet&&(typeof r.sheet=="number"?a=r.sheet:a=t.SheetNames.indexOf(r.sheet),!t.SheetNames[a]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return SA(VD(t,r),r);case"slk":case"sylk":return SA(uL.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"htm":case"html":return SA(GB(t.Sheets[t.SheetNames[a]],r),r);case"txt":return kQ(tx(t.Sheets[t.SheetNames[a]],r),r);case"csv":return SA(Ig(t.Sheets[t.SheetNames[a]],r),r,"\uFEFF");case"dif":return SA(hL.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"dbf":return zh(cL.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"prn":return SA(fL.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"rtf":return SA(wL.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"eth":return SA(dB.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"fods":return SA(YB(t,r),r);case"wk1":return zh(gB.sheet_to_wk1(t.Sheets[t.SheetNames[a]],r),r);case"wk3":return zh(gB.book_to_wk3(t,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),zh(KB(t,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),SQ(t,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return _Q(t,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function TQ(t,e,r,n,a,A,o,s){var l=bn(r),c=s.defval,u=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),p=!0,h=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:r,enumerable:!1})}catch{h.__rowNum__=r}else h.__rowNum__=r;if(!o||t[r])for(var d=e.s.c;d<=e.e.c;++d){var w=o?t[r][d]:t[n[d]+l];if(w===void 0||w.t===void 0){if(c===void 0)continue;A[d]!=null&&(h[A[d]]=c);continue}var g=w.v;switch(w.t){case"z":if(g==null)break;continue;case"e":g=g==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+w.t)}if(A[d]!=null){if(g==null)if(w.t=="e"&&g===null)h[A[d]]=null;else if(c!==void 0)h[A[d]]=c;else if(u&&g===null)h[A[d]]=null;else continue;else h[A[d]]=u&&(w.t!=="n"||w.t==="n"&&s.rawNumbers!==!1)?g:YA(w,g,s);g!=null&&(p=!1)}}return{row:h,isempty:p}}function Kh(t,e){if(t==null||t["!ref"]==null)return[];var r={t:"n",v:0},n=0,a=1,A=[],o=0,s="",l={s:{r:0,c:0},e:{r:0,c:0}},c=e||{},u=c.range!=null?c.range:t["!ref"];switch(c.header===1?n=1:c.header==="A"?n=2:Array.isArray(c.header)?n=3:c.header==null&&(n=0),typeof u){case"string":l=Br(u);break;case"number":l=Br(t["!ref"]),l.s.r=u;break;default:l=u}n>0&&(a=0);var p=bn(l.s.r),h=[],d=[],w=0,g=0,y=Array.isArray(t),m=l.s.r,F=0,N={};y&&!t[m]&&(t[m]=[]);var Q=c.skipHidden&&t["!cols"]||[],z=c.skipHidden&&t["!rows"]||[];for(F=l.s.c;F<=l.e.c;++F)if(!(Q[F]||{}).hidden)switch(h[F]=Dn(F),r=y?t[m][F]:t[h[F]+p],n){case 1:A[F]=F-l.s.c;break;case 2:A[F]=h[F];break;case 3:A[F]=c.header[F-l.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),s=o=YA(r,null,c),g=N[o]||0,!g)N[o]=1;else{do s=o+"_"+g++;while(N[s]);N[o]=g,N[s]=1}A[F]=s}for(m=l.s.r+a;m<=l.e.r;++m)if(!(z[m]||{}).hidden){var R=TQ(t,l,m,h,n,A,y,c);(R.isempty===!1||(n===1?c.blankrows!==!1:c.blankrows))&&(d[w++]=R.row)}return d.length=w,d}var ex=/"/g;function NQ(t,e,r,n,a,A,o,s){for(var l=!0,c=[],u="",p=bn(r),h=e.s.c;h<=e.e.c;++h)if(n[h]){var d=s.dense?(t[r]||[])[h]:t[n[h]+p];if(d==null)u="";else if(d.v!=null){l=!1,u=""+(s.rawNumbers&&d.t=="n"?d.v:YA(d,null,s));for(var w=0,g=0;w!==u.length;++w)if((g=u.charCodeAt(w))===a||g===A||g===34||s.forceQuotes){u='"'+u.replace(ex,'""')+'"';break}u=="ID"&&(u='"ID"')}else d.f!=null&&!d.F?(l=!1,u="="+d.f,u.indexOf(",")>=0&&(u='"'+u.replace(ex,'""')+'"')):u="";c.push(u)}return s.blankrows===!1&&l?null:c.join(o)}function Ig(t,e){var r=[],n=e??{};if(t==null||t["!ref"]==null)return"";var a=Br(t["!ref"]),A=n.FS!==void 0?n.FS:",",o=A.charCodeAt(0),s=n.RS!==void 0?n.RS:`
357
357
  `,l=s.charCodeAt(0),c=new RegExp((A=="|"?"\\|":A)+"+$"),u="",p=[];n.dense=Array.isArray(t);for(var h=n.skipHidden&&t["!cols"]||[],d=n.skipHidden&&t["!rows"]||[],w=a.s.c;w<=a.e.c;++w)(h[w]||{}).hidden||(p[w]=Dn(w));for(var g=0,y=a.s.r;y<=a.e.r;++y)(d[y]||{}).hidden||(u=NQ(t,a,y,p,o,l,A,n),u!=null&&(n.strip&&(u=u.replace(c,"")),(u||n.blankrows!==!1)&&r.push((g++?s:"")+u)));return delete n.dense,r.join("")}function tx(t,e){e||(e={}),e.FS=" ",e.RS=`
358
- `;var r=Ig(t,e);return r}function LQ(t){var e="",r,n="";if(t==null||t["!ref"]==null)return[];var a=Br(t["!ref"]),A="",o=[],s,l=[],c=Array.isArray(t);for(s=a.s.c;s<=a.e.c;++s)o[s]=Dn(s);for(var u=a.s.r;u<=a.e.r;++u)for(A=bn(u),s=a.s.c;s<=a.e.c;++s)if(e=o[s]+A,r=c?(t[u]||[])[s]:t[e],n="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;n=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}l[l.length]=e+"="+n}return l}function rx(t,e,r){var n=r||{},a=+!n.skipHeader,A=t||{},o=0,s=0;if(A&&n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var l=typeof n.origin=="string"?hn(n.origin):n.origin;o=l.r,s=l.c}var c,u={s:{c:0,r:0},e:{c:s,r:o+e.length-1+a}};if(A["!ref"]){var p=Br(A["!ref"]);u.e.c=Math.max(u.e.c,p.e.c),u.e.r=Math.max(u.e.r,p.e.r),o==-1&&(o=p.e.r+1,u.e.r=o+e.length-1+a)}else o==-1&&(o=0,u.e.r=e.length-1+a);var h=n.header||[],d=0;e.forEach(function(g,y){Bn(g).forEach(function(m){(d=h.indexOf(m))==-1&&(h[d=h.length]=m);var F=g[m],N="z",Q="",z=nr({c:s+d,r:o+y+a});c=sc(A,z),F&&typeof F=="object"&&!(F instanceof Date)?A[z]=F:(typeof F=="number"?N="n":typeof F=="boolean"?N="b":typeof F=="string"?N="s":F instanceof Date?(N="d",n.cellDates||(N="n",F=ta(F)),Q=n.dateNF||kr[14]):F===null&&n.nullError&&(N="e",F=0),c?(c.t=N,c.v=F,delete c.w,delete c.R,Q&&(c.z=Q)):A[z]=c={t:N,v:F},Q&&(c.z=Q))})}),u.e.c=Math.max(u.e.c,s+h.length-1);var w=bn(o);if(a)for(d=0;d<h.length;++d)A[Dn(d+s)+w]={t:"s",v:h[d]};return A["!ref"]=Wr(u),A}function UQ(t,e){return rx(null,t,e)}function sc(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var n=hn(e);return t[n.r]||(t[n.r]=[]),t[n.r][n.c]||(t[n.r][n.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?sc(t,nr(e)):sc(t,nr({r:e,c:r||0}))}function IQ(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function DQ(){return{SheetNames:[],Sheets:{}}}function QQ(t,e,r,n){var a=1;if(!r)for(;a<=65535&&t.SheetNames.indexOf(r="Sheet"+a)!=-1;++a,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&t.SheetNames.indexOf(r)>=0){var A=r.match(/(^.*?)(\d+)$/);a=A&&+A[2]||0;var o=A&&A[1]||r;for(++a;a<=65535&&t.SheetNames.indexOf(r=o+a)!=-1;++a);}if(VB(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function OQ(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var n=IQ(t,e);switch(t.Workbook.Sheets[n]||(t.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[n].Hidden=r}function PQ(t,e){return t.z=e,t}function nx(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function MQ(t,e,r){return nx(t,"#"+e,r)}function RQ(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function HQ(t,e,r,n){for(var a=typeof e!="string"?e:Br(e),A=typeof e=="string"?e:Wr(e),o=a.s.r;o<=a.e.r;++o)for(var s=a.s.c;s<=a.e.c;++s){var l=sc(t,o,s);l.t="n",l.F=A,delete l.v,o==a.s.r&&s==a.s.c&&(l.f=r,n&&(l.D=!0))}return t}var Dg={encode_col:Dn,encode_row:bn,encode_cell:nr,encode_range:Wr,decode_col:pg,decode_row:gg,split_cell:n6,decode_cell:hn,decode_range:ya,format_cell:YA,sheet_add_aoa:Mw,sheet_add_json:rx,sheet_add_dom:jB,aoa_to_sheet:Bs,json_to_sheet:UQ,table_to_sheet:WB,table_to_book:hQ,sheet_to_csv:Ig,sheet_to_txt:tx,sheet_to_json:Kh,sheet_to_html:GB,sheet_to_formulae:LQ,sheet_to_row_object_array:Kh,sheet_get_cell:sc,book_new:DQ,book_append_sheet:QQ,book_set_sheet_visibility:OQ,cell_set_number_format:PQ,cell_set_hyperlink:nx,cell_set_internal_link:MQ,cell_add_comment:RQ,sheet_set_array_formula:HQ,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Gh(t,e,r,n,a){let{series:A}=t;if(!A||t.base===0)return{...A,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const o=[...A].map(c=>c.value).reduce((c,u)=>c+u,0),s=[];let l=0;for(let c=0;c<A.length;c+=1){let u=A[c].value/o;const p=u*(Math.PI*1.9999),d=A[c].value/2/o*(Math.PI*2),{startX:w,startY:g,endX:y,endY:m,path:F}=Ax([e,r],[n,a],[l,p],110);s.push({cx:e,cy:r,...A[c],proportion:u,ratio:p,path:F,startX:w,startY:g,endX:y,endY:m,center:Ax([e,r],[n*1.45,a*1.45],[l,d],110)}),l+=p}return s}function jh([t,e],[r,n]){return[t+r,e+n]}function Wh([[t,e],[r,n]],[a,A]){return[t*a+e*A,r*a+n*A]}function ax(t){return[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]}function Ax([t,e],[r,n],[a,A],o){A=A%(2*Math.PI);const s=ax(o),[l,c]=jh(Wh(s,[r*Math.cos(a),n*Math.sin(a)]),[t,e]),[u,p]=jh(Wh(s,[r*Math.cos(a+A),n*Math.sin(a+A)]),[t,e]),h=A>Math.PI?1:0,d=A>0?1:0;return{startX:l,startY:c,endX:u,endY:p,path:`M${l} ${c} A ${[r,n,o/(2*Math.PI)*360,h,d,u,p].join(" ")}`}}function aa({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(n=>{if(Object.hasOwn(e,n)){const a=e[n];typeof a=="boolean"?r[n]=a:["string","number"].includes(typeof a)?zQ(a)&&(r[n]=a):Array.isArray(r[n])?VQ({userConfig:e,key:n})&&(r[n]=a):$Q({userConfig:e,key:n})&&(r[n]=aa({defaultConfig:r[n],userConfig:a}))}}),r}function VQ({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length>=0}function $Q({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"}function zQ(t){return![null,void 0,NaN,1/0,-1/0].includes(t)}function KQ(t){return![void 0,NaN,1/0,-1/0].includes(t)}function GQ(t,e=0){return isNaN(t)?e:t}const It=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"],St=["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"];function Nr(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,n=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;if([void 0,null,NaN].includes(t))return null;if(t==="transparent")return"#FFFFFF00";let a;if(a=t.match(e)){const[,A,o,s]=a;return`#${A}${o}${s}`}else if(a=t.match(r)){const[,A,o,s]=a;return`#${Ns(A)}${Ns(o)}${Ns(s)}`}else if(a=t.match(n)){const[,A,o,s]=a,l=jQ(Number(A),Number(o),Number(s));return`#${Ns(l[0])}${Ns(l[1])}${Ns(l[2])}`}return null}function Ns(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e}function jQ(t,e,r){t/=360,e/=100,r/=100;let n,a,A;if(e===0)n=a=A=r;else{const o=(c,u,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?c+(u-c)*6*p:p<.5?u:p<.6666666666666666?c+(u-c)*(.6666666666666666-p)*6:c),s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),a=o(l,s,t),A=o(l,s,t-1/3)}return[Math.round(n*255),Math.round(a*255),Math.round(A*255)]}function ZA(t,e){const r=c=>({r:parseInt(c.substring(1,3),16),g:parseInt(c.substring(3,5),16),b:parseInt(c.substring(5,7),16)}),n=({r:c,g:u,b:p})=>{c/=255,u/=255,p/=255;const h=Math.max(c,u,p),d=Math.min(c,u,p);let w,g,y=(h+d)/2;if(h===d)w=g=0;else{const m=h-d;switch(g=y>.5?m/(2-h-d):m/(h+d),h){case c:w=(u-p)/m+(u<p?6:0);break;case u:w=(p-c)/m+2;break;case p:w=(c-u)/m+4;break}w/=6}return{h:w,s:g,l:y}},a=({h:c,s:u,l:p})=>{let h,d,w;if(u===0)h=d=w=p;else{const g=(F,N,Q)=>(Q<0&&(Q+=1),Q>1&&(Q-=1),Q<.16666666666666666?F+(N-F)*6*Q:Q<.5?N:Q<.6666666666666666?F+(N-F)*(.6666666666666666-Q)*6:F),y=p<.5?p*(1+u):p+u-p*u,m=2*p-y;h=g(m,y,c+.3333333333333333),d=g(m,y,c),w=g(m,y,c-.3333333333333333)}return{r:Math.round(h*255),g:Math.round(d*255),b:Math.round(w*255)}},A=r(t),o=n(A);o.h+=e,o.h=(o.h+1)%1;const s=a(o);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`}function WQ({centerX:t,centerY:e,outerPoints:r,radius:n,rotation:a}){const A=Math.PI/r,o=a;let s="";const l=[];for(let c=0;c<r*2;c+=1){let u=t+Math.cos(c*A+o)*n,p=e+Math.sin(c*A+o)*n;s+=`${u},${p} `,l.push({x:u,y:p})}return{path:`M${s}Z`,coordinates:l}}function eA({plot:t,radius:e,sides:r,rotation:n=0}){const a=t.x,A=t.y,o=r/2;return WQ({centerX:a,centerY:A,outerPoints:o,radius:e+1,rotation:n})}function XQ({centerX:t,centerY:e,innerCirclePoints:r,innerRadius:n,outerRadius:a}){const A=Math.PI/r,o=60,s=r*2;let l="";for(let c=0;c<s;c+=1){let p=c%2==0?a:n,h=t+Math.cos(c*A+o)*p,d=e+Math.sin(c*A+o)*p;l+=`${h},${d} `}return l}function Xh({plot:t,radius:e,apexes:r=5}){const n=t.x,a=t.y,A=r,o=e*3.5/A,l=o*2;return XQ({centerX:n,centerY:a,innerCirclePoints:A,innerRadius:o,outerRadius:l})}function qQ({series:t}){t=t.sort((c,u)=>c.x-u.x);function e(c,u,p){const h=(c.x-u.x)*(p.x-u.x)+(c.y-u.y)*(p.y-u.y),d=(c.x-u.x)*(p.y-u.y)-(p.x-u.x)*(c.y-u.y);return Math.atan2(d,h)}const r=[];let n;n=t[0];for(const c of t)c.x<n.x&&(n=c);r[0]=n;let a,A,o,s;a=r[0],A={x:a.x,y:a.y+1};do{o=Math.PI;for(const c of t)n=e(A,a,c),n<=o&&(s=c,o=n);s!==r[0]&&(r.push(s),A=a,a=s)}while(s!==r[0]);let l;return r.forEach(c=>{c&&c.x&&c.y&&(l+=`${Math.round(c.x)},${Math.round(c.y)} `)}),l=l.replaceAll("undefined",""),l}function Qg(t){if(t){let e=t;e.charAt(0)!=="#"&&(e=this.rgbToHex(t)),e=e.substring(1,7);let r=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16),o=[r/255,n/255,a/255].map(l=>l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]>.3?"#000000":"#FFFFFF"}return"#000000"}function Aa(t){for(const e in t)typeof t[e]=="object"&&!Array.isArray(t[e])&&t[e]!==null?Aa(t[e]):(e==="color"||e==="backgroundColor"||e==="stroke")&&(t[e]===""?t[e]="#000000":t[e]==="transparent"?t[e]="#FFFFFF00":t[e]=Nr(t[e]));return t}function ei(t,e){function r(l){let c=new ArrayBuffer(l.length),u=new Uint8Array(c);for(let p=0;p<l.length;p++)u[p]=l.charCodeAt(p)&255;return c}const n=Dg.book_new(),a=Dg.aoa_to_sheet(t);Dg.book_append_sheet(n,a,"Sheet1");const A=ZB(n,{bookType:"xlsx",type:"binary"}),o=new Blob([r(A)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),s=document.createElement("a");s.href=window.URL.createObjectURL(o),s.download=`${e.replaceAll(" ","_")}.xlsx`,s.click(),window.URL.revokeObjectURL(s.href)}function ix(t){let e,r,n,a;const A=t.length;let o=0,s=0,l=0,c=0;for(const{x:h,y:d}of t)o+=h,s+=d,l+=h*d,c+=h*h;const u=(A*l-o*s)/(A*c-o*o),p=(s-u*o)/A;return e=t[0].x,n=t[A-1].x,r=u*e+p,a=u*n+p,{x1:e,y1:r,x2:n,y2:a,slope:u}}const wa={vue_ui_table:{fontFamily:"inherit",maxHeight:500,rowsPerPage:25,style:{th:{backgroundColor:"#E1E5E8",color:"#2D353C",outline:"1px solid #FFFFFF",selected:{backgroundColor:"#6376DD",color:"#FFFFFF"}},rows:{even:{backgroundColor:"#f3f5f7",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}},odd:{backgroundColor:"#FFFFFF",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}}},inputs:{backgroundColor:"#FFFFFF",color:"#2D353C",border:"1px solid #CCCCCC",accentColor:"#6376DD"},dropdowns:{backgroundColor:"#E1E5E8",color:"#2D353C",icons:{selected:{color:"#008000",unicode:"✔"},unselected:{color:"#ff0000",unicode:"✖"}}},infoBar:{backgroundColor:"#E1E5E8",color:"#2D353C"},pagination:{buttons:{backgroundColor:"#E1E5E8",color:"#2D353C",opacityDisabled:.5},navigationIndicator:{backgroundColor:"#6376DD"}},exportMenu:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{backgroundColor:"#FAFAFA",color:"#2D353C"}},closeButtons:{backgroundColor:"transparent",color:"#2D353C",borderRadius:"50%"},chart:{modal:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{selected:{backgroundColor:"#6376DD",color:"#FFFFFF"},unselected:{backgroundColor:"#FFFFFF",color:"#2D353C"}}},layout:{backgroundColor:"#FFFFFF",axis:{stroke:"#ccd1d4",strokeWidth:2},bar:{fill:"",stroke:"#FFFFFF"},line:{stroke:"#6376DD75",strokeWidth:4,plot:{fill:"#22348f",stroke:"#FFFFFF",strokeWidth:1,radius:{selected:6,unselected:4}},selector:{stroke:"#ccc",strokeWidth:1,strokeDasharray:5}},labels:{color:"#2D353C"},progression:{stroke:"#2D353C",strokeWidth:2,strokeDasharray:4,arrowSize:7}}}},translations:{average:"Average",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"From",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"To",total:"Total",totalRows:"Total rows"},useChart:!0},vue_ui_xy:{chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#2D353C",height:300,width:500,zoom:{show:!0,color:"#2D353C"},padding:{top:36,right:12,bottom:12,left:48},highlighter:{color:"#2D353C",opacity:5},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"#2D353C",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"#2D353C",show:!0,values:[],fontSize:6,showOnlyFirstAndLast:!1}}},labels:{fontSize:10},legend:{color:"#2D353C",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#2D353C",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"#2D353C",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},table:{rounding:0,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8"}},showTable:!1},vue_ui_donut:{style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}},vue_ui_waffle:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grid:{size:20,spaceBetween:2,vertical:!1},rect:{rounded:!0,rounding:2,stroke:"#2D353C",strokeWidth:1,useGradient:!0,gradientIntensity:40},useDiv:!0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}},vue_ui_radar:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,plots:{show:!0,radius:2},outerPolygon:{stroke:"#CCCCCC",strokeWidth:1},dataPolygon:{strokeWidth:1,transparent:!1,opacity:20,useGradient:!0},grid:{show:!0,stroke:"#e1e5e8",strokeWidth:.5,graduations:5},labels:{dataLabels:{show:!0,fontSize:12,color:"#2D353C"}}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingPercentage:0}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},translations:{target:"Target"}},vue_ui_quadrant:{style:{fontFamily:"inherit",chart:{height:512,width:512,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,labels:{quadrantLabels:{show:!0,tl:{text:"",color:"#2D353C",fontSize:16,bold:!0},tr:{text:"",color:"#2D353C",fontSize:16,bold:!0},br:{text:"",color:"#2D353C",fontSize:16,bold:!0},bl:{text:"",color:"#2D353C",fontSize:16,bold:!0}},plotLabels:{show:!0,fontSize:10,color:"#2D353C",offsetY:8},axisLabels:{show:!0,fontSize:14,color:{positive:"#2D353C",negative:"#2D353C"}}},grid:{stroke:"#e1e5e8",strokeWidth:1.5,showArrows:!0,graduations:{stroke:"#e1e5e8",strokeWidth:.5,show:!0,steps:5,fill:!0,color:"#E1E5E8",roundingForce:10},xAxis:{min:-100,max:100,auto:!0,name:""},yAxis:{min:-100,max:100,auto:!0,name:""}},plots:{radius:6,outline:!0,outlineColor:"#FFFFFF",outlineWidth:1},areas:{show:!0,opacity:40,useGradient:!0}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table",showPlotLabels:"Show plot labels"}},translations:{category:"Category",item:"Item",side:"Side"}},vue_ui_gauge:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",animation:{use:!0,speed:1,acceleration:1},layout:{useDiv:!1,track:{size:1,useGradient:!0,gradientIntensity:40},markers:{size:1,color:"#2D353C",strokeWidth:1,stroke:"#2D353C",backgroundColor:"#FFFFFF",bold:!0,fontSizeRatio:1,offsetY:0,roundingValue:0},pointer:{size:1,stroke:"#2D353C",strokeWidth:12,useRatingColor:!0,color:"#CCCCCC",circle:{radius:10,stroke:"#2D353C",strokeWidth:2,color:"#FFFFFF"}}},legend:{fontSize:48,prefix:"",suffix:"",roundingValue:1,showPlusSymbol:!0,useRatingColor:!0,color:"#2D353C"},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title inside",showTable:"Show table"}},translations:{base:"Base"}},vue_ui_chestnut:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grandTotal:{show:!0,fontSize:20,bold:!0,suffix:"",prefix:"",roundingValue:0,color:"#2D353C",text:"Grand total",offsetY:0},roots:{stroke:"#FFFFFF",strokeWidth:5,useGradient:!0,gradientIntensity:20,underlayerColor:"#FFFFFF",labels:{show:!0,fontSize:16,adaptColorToBackground:!0,color:"#FFFFFF",bold:!0,roundingValue:0,prefix:"",suffix:"",name:{color:"#2D353C",fontSize:16,bold:!0}}},verticalSeparator:{stroke:"#FFFFFF",strokeWidth:5},links:{opacity:10},branches:{stroke:"#FFFFFF",strokeWidth:0,borderRadius:6,useGradient:!0,gradientIntensity:20,underlayerColor:"#FFFFFF",widthRatio:1.5,labels:{show:!0,fontSize:14,color:"#2D353C",bold:!0,dataLabels:{show:!0,hideUnderValue:5,fontSize:14,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}}},nuts:{offsetX:20,useGradient:!0,gradientIntensity:30,selected:{useMotion:!0,useGradient:!0,gradientIntensity:40,roundingValue:0,roundingPercentage:0,labels:{dataLabels:{hideUnderValue:5,color:"#2D353C",fontSize:12,bold:!0,prefix:"",suffix:""},core:{total:{color:"#2D353C",fontSize:24,bold:!1},value:{color:"#2D353C",fontSize:24,bold:!0,prefix:"",suffix:""}}}}},legend:{fontSize:16,color:"#2D353C",roundingValue:0,roundingPercentage:0,prefix:"",suffix:""},title:{color:"#2D353C",fontSize:20,text:"",bold:!0,offsetY:0,subtitle:{text:"",color:"#CCCCCC",bold:!1,fontSize:16,offsetY:0}}}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8",translations:{rootName:"root name",rootValue:"root value",rootToTotal:"%/total",branchName:"branch name",branchValue:"branch value",branchToRoot:"%/root",branchToTotal:"%/total",nutName:"nut name",nutValue:"nut value",nutToBranch:"%/branch",nutToRoot:"%/root",nutToTotal:"%/total"}},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{showTable:"Show table"}},translations:{total:"Total",proportionToTree:"of grand total",of:"of"}},vue_ui_onion:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",useGradient:!1,gradientIntensity:20,layout:{useDiv:!0,gutter:{color:"#e1e5e8",width:.62},track:{width:.62},labels:{show:!0,fontSize:14,color:"#2D353C",roundingValue:0,roundingPercentage:0,bold:!0,offsetY:0,offsetX:0,value:{show:!0},percentage:{show:!0}}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0},translations:{value:"Value",percentage:"Percentage",serie:"Serie"}}},vue_ui_vertical_bar:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,bars:{sort:"desc",useStroke:!1,strokeWidth:2,height:32,gap:6,borderRadius:4,offsetX:64,paddingRight:0,useGradient:!0,gradientIntensity:20,fillOpacity:90,underlayerColor:"#FFFFFF",dataLabels:{color:"#2D353C",bold:!0,fontSize:12,value:{show:!0,roundingValue:0,prefix:"",suffix:""},percentage:{show:!0,roundingPercentage:0},offsetX:0},nameLabels:{show:!0,color:"#2D353C",bold:!1,fontSize:10,offsetX:0},parentLabels:{show:!0,color:"#2D353C",bold:!1,fontSize:10,offsetX:0}},highlighter:{color:"#2D353C",opacity:5},separators:{show:!0,color:"#e1e5e8",strokeWidth:1}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},legend:{show:!0,fontSize:14,color:"#2D353C",backgroundColor:"#FFFFFF",bold:!0,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table",sort:"Sort desc"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}},translations:{parentName:"Serie",childName:"Child",value:"value",percentageToTotal:"%/total",percentageToSerie:"%/serie"}},vue_ui_screenshot:{mode:"download",quality:1,style:{info:{background:"#FFFFFF",bold:!0,border:"none",borderRadius:4,boxShadow:"0 6px 12px -6px rgba(0,0,0,0.2)",color:"#2D353C",fontFamily:"inherit",fontSize:14,minWidth:300,padding:12,top:-100},captureButton:{background:"#E1E5E8",bold:!0,border:"none",borderRadius:4,boxShadow:"0 6px 12px -6px rgba(0,0,0,0.2)",color:"#2D353C",fontFamily:"inherit",fontSize:14,minHeight:40,padding:"8px 12px"},cancelButton:{background:"#F17171",border:"none",borderRadius:10,color:"#FFFFFF",right:-14,size:28,top:-14},captureArea:{background:"radial-gradient(transparent, rgba(0,0,0,0.15))",border:"dashed 4px #2D353C",initialHeight:200,initialWidth:200},handles:{background:"#FFFFFF",border:"4px solid #2D353C",borderRadius:4,size:40}},translations:{captureButton:"capture",info:"Resize or move and click to capture"}},vue_ui_rating:{type:"star",readonly:!1,from:1,to:5,style:{fontFamily:"inherit",animated:!0,itemSize:32,backgroundColor:"#FFFFFF",star:{activeColor:"#FFD055",borderColor:"#FFD055",borderWidth:3,apexes:5,inactiveColor:"#e1e5e8",useGradient:!0},image:{src:"",inactiveOpacity:.3,alt:"rating image"},title:{textAlign:"center",fontSize:20,color:"#2D353C",bold:!0,text:"",offsetY:6,subtitle:{fontSize:14,color:"#CCCCCC",bold:!1,text:"",offsetY:12}},rating:{show:!0,fontSize:28,bold:!0,roundingValue:1,position:"bottom",offsetY:0,offsetX:0},tooltip:{show:!0,fontSize:14,offsetY:0,color:"#2D353C",bold:!0,backgroundColor:"#FFFFFF",borderColor:"#e1e5e8",borderRadius:4,boxShadow:"0 6px 12px -6px rgba(0,0,0,0.2)"}}},vue_ui_skeleton:{type:"line",style:{backgroundColor:"#FFFFFF",color:"#2D353C",maxHeight:500,animated:!0,line:{axis:{show:!0,color:"#e1e5e8",strokeWidth:.5},path:{color:"#e1e5e8",strokeWidth:1,showPlots:!0}},bar:{axis:{show:!0,color:"#e1e5e8",strokeWidth:.5},borderRadius:.5,color:"#e1e5e8",barWidth:9},donut:{color:"#e1e5e8",strokeWidth:64},onion:{color:"#E1E5E8"},gauge:{color:"#E1E5E8"},quadrant:{grid:{color:"#e1e5e8",strokeWidth:.5},plots:{radius:1.5,color:"#E1E5E8"}},radar:{grid:{color:"#E1E5E8",strokeWidth:.5},shapes:{color:"#E1E5E8"}},waffle:{color:"#e1e5e8"},table:{th:{color:"#E1E5E8"},td:{color:"#e1e5e8",strokeWidth:.5}},rating:{color:"#E1E5E8",filled:!0,strokeWidth:1,maxWidth:200},verticalBar:{axis:{show:!0,color:"#e1e5e8",strokeWidth:.5},borderRadius:.5,color:"#e1e5e8"}}}},toe="",Da=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},YQ={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`,e=Math.max(...this.dataset.map(n=>n.series.length)),r={start:0,end:e};return{opacity:St,useSafeValues:!0,palette:It,defaultConfig:wa.vue_ui_xy,clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t,slicer:r,maxX:e}},computed:{chartConfig(){if(!Object.keys(this.config||{}).length)return this.defaultConfig;const t=this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config});return this.convertConfigColors(t)},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null).slice(this.slicer.start,this.slicer.end),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,n)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*n*this.absoluteDataset.filter(a=>a.type==="bar").filter(a=>!this.segregatedSeries.includes(a.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[n]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){const t=Math.min(...this.safeDataset.filter(e=>!this.segregatedSeries.includes(e.id)).map(e=>Math.min(...e.series)));return t>0?0:t},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.chartConfig.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=this.relativeDataset.map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.timeLabels.forEach((r,n)=>{const a=[r];this.relativeDataset.forEach(A=>{a.push(this.canShowValue(A.absoluteValues[n])?Number(A.absoluteValues[n].toFixed(this.chartConfig.table.rounding)):"")}),e.push(a)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(a=>({name:a.name,color:a.color,type:a.type,value:a.absoluteValues.find((A,o)=>o===this.selectedSerieIndex)}));let e="",r=t.map(a=>a.value).filter(a=>this.isSafeValue(a)&&a!==null).reduce((a,A)=>Math.abs(a)+Math.abs(A),0);const n=this.timeLabels[this.selectedSerieIndex];return n&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${n}</div>`),t.forEach(a=>{this.isSafeValue(a.value)&&a.value!==null&&(e+=`<div><span style="color:${a.color}; margin-right: 3px">${this.icons[a.type]}</span>${a.name} : <b>${this.chartConfig.chart.tooltip.showValue?a.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(a.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums; background:${this.chartConfig.chart.tooltip.backgroundColor};color:${this.chartConfig.chart.tooltip.color}">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,n=48;if(t&&e){const{width:a,height:A}=t.getBoundingClientRect(),o=e.getBoundingClientRect();this.clientPosition.x+a/2>o.right?r=-a:this.clientPosition.x-a/2<o.left?r=0:r=-a/2,this.clientPosition.y+A>o.bottom&&(n=-A-48)}return{top:this.clientPosition.y+n,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let a=5;a>0;a-=1){const A=t*a;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*a),value:A})}const r=this.closestDecimal(this.min/5),n=[];for(let a=5;a>=0;a-=1){const A=Math.abs(r)*a;n.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*a),value:-A})}return[...e,...n]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,n=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${n})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",n),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,n)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
358
+ `;var r=Ig(t,e);return r}function LQ(t){var e="",r,n="";if(t==null||t["!ref"]==null)return[];var a=Br(t["!ref"]),A="",o=[],s,l=[],c=Array.isArray(t);for(s=a.s.c;s<=a.e.c;++s)o[s]=Dn(s);for(var u=a.s.r;u<=a.e.r;++u)for(A=bn(u),s=a.s.c;s<=a.e.c;++s)if(e=o[s]+A,r=c?(t[u]||[])[s]:t[e],n="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;n=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}l[l.length]=e+"="+n}return l}function rx(t,e,r){var n=r||{},a=+!n.skipHeader,A=t||{},o=0,s=0;if(A&&n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var l=typeof n.origin=="string"?hn(n.origin):n.origin;o=l.r,s=l.c}var c,u={s:{c:0,r:0},e:{c:s,r:o+e.length-1+a}};if(A["!ref"]){var p=Br(A["!ref"]);u.e.c=Math.max(u.e.c,p.e.c),u.e.r=Math.max(u.e.r,p.e.r),o==-1&&(o=p.e.r+1,u.e.r=o+e.length-1+a)}else o==-1&&(o=0,u.e.r=e.length-1+a);var h=n.header||[],d=0;e.forEach(function(g,y){Bn(g).forEach(function(m){(d=h.indexOf(m))==-1&&(h[d=h.length]=m);var F=g[m],N="z",Q="",z=nr({c:s+d,r:o+y+a});c=sc(A,z),F&&typeof F=="object"&&!(F instanceof Date)?A[z]=F:(typeof F=="number"?N="n":typeof F=="boolean"?N="b":typeof F=="string"?N="s":F instanceof Date?(N="d",n.cellDates||(N="n",F=ta(F)),Q=n.dateNF||kr[14]):F===null&&n.nullError&&(N="e",F=0),c?(c.t=N,c.v=F,delete c.w,delete c.R,Q&&(c.z=Q)):A[z]=c={t:N,v:F},Q&&(c.z=Q))})}),u.e.c=Math.max(u.e.c,s+h.length-1);var w=bn(o);if(a)for(d=0;d<h.length;++d)A[Dn(d+s)+w]={t:"s",v:h[d]};return A["!ref"]=Wr(u),A}function UQ(t,e){return rx(null,t,e)}function sc(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var n=hn(e);return t[n.r]||(t[n.r]=[]),t[n.r][n.c]||(t[n.r][n.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?sc(t,nr(e)):sc(t,nr({r:e,c:r||0}))}function IQ(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function DQ(){return{SheetNames:[],Sheets:{}}}function QQ(t,e,r,n){var a=1;if(!r)for(;a<=65535&&t.SheetNames.indexOf(r="Sheet"+a)!=-1;++a,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&t.SheetNames.indexOf(r)>=0){var A=r.match(/(^.*?)(\d+)$/);a=A&&+A[2]||0;var o=A&&A[1]||r;for(++a;a<=65535&&t.SheetNames.indexOf(r=o+a)!=-1;++a);}if(VB(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function OQ(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var n=IQ(t,e);switch(t.Workbook.Sheets[n]||(t.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[n].Hidden=r}function PQ(t,e){return t.z=e,t}function nx(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function MQ(t,e,r){return nx(t,"#"+e,r)}function RQ(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function HQ(t,e,r,n){for(var a=typeof e!="string"?e:Br(e),A=typeof e=="string"?e:Wr(e),o=a.s.r;o<=a.e.r;++o)for(var s=a.s.c;s<=a.e.c;++s){var l=sc(t,o,s);l.t="n",l.F=A,delete l.v,o==a.s.r&&s==a.s.c&&(l.f=r,n&&(l.D=!0))}return t}var Dg={encode_col:Dn,encode_row:bn,encode_cell:nr,encode_range:Wr,decode_col:pg,decode_row:gg,split_cell:n6,decode_cell:hn,decode_range:ya,format_cell:YA,sheet_add_aoa:Mw,sheet_add_json:rx,sheet_add_dom:jB,aoa_to_sheet:Bs,json_to_sheet:UQ,table_to_sheet:WB,table_to_book:hQ,sheet_to_csv:Ig,sheet_to_txt:tx,sheet_to_json:Kh,sheet_to_html:GB,sheet_to_formulae:LQ,sheet_to_row_object_array:Kh,sheet_get_cell:sc,book_new:DQ,book_append_sheet:QQ,book_set_sheet_visibility:OQ,cell_set_number_format:PQ,cell_set_hyperlink:nx,cell_set_internal_link:MQ,cell_add_comment:RQ,sheet_set_array_formula:HQ,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Gh(t,e,r,n,a){let{series:A}=t;if(!A||t.base===0)return{...A,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const o=[...A].map(c=>c.value).reduce((c,u)=>c+u,0),s=[];let l=0;for(let c=0;c<A.length;c+=1){let u=A[c].value/o;const p=u*(Math.PI*1.9999),d=A[c].value/2/o*(Math.PI*2),{startX:w,startY:g,endX:y,endY:m,path:F}=Ax([e,r],[n,a],[l,p],110);s.push({cx:e,cy:r,...A[c],proportion:u,ratio:p,path:F,startX:w,startY:g,endX:y,endY:m,center:Ax([e,r],[n*1.45,a*1.45],[l,d],110)}),l+=p}return s}function jh([t,e],[r,n]){return[t+r,e+n]}function Wh([[t,e],[r,n]],[a,A]){return[t*a+e*A,r*a+n*A]}function ax(t){return[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]}function Ax([t,e],[r,n],[a,A],o){A=A%(2*Math.PI);const s=ax(o),[l,c]=jh(Wh(s,[r*Math.cos(a),n*Math.sin(a)]),[t,e]),[u,p]=jh(Wh(s,[r*Math.cos(a+A),n*Math.sin(a+A)]),[t,e]),h=A>Math.PI?1:0,d=A>0?1:0;return{startX:l,startY:c,endX:u,endY:p,path:`M${l} ${c} A ${[r,n,o/(2*Math.PI)*360,h,d,u,p].join(" ")}`}}function aa({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(n=>{if(Object.hasOwn(e,n)){const a=e[n];typeof a=="boolean"?r[n]=a:["string","number"].includes(typeof a)?zQ(a)&&(r[n]=a):Array.isArray(r[n])?VQ({userConfig:e,key:n})&&(r[n]=a):$Q({userConfig:e,key:n})&&(r[n]=aa({defaultConfig:r[n],userConfig:a}))}}),r}function VQ({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length>=0}function $Q({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"}function zQ(t){return![null,void 0,NaN,1/0,-1/0].includes(t)}function KQ(t){return![void 0,NaN,1/0,-1/0].includes(t)}function GQ(t,e=0){return isNaN(t)?e:t}const It=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"],Et=["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"];function Nr(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,n=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;if([void 0,null,NaN].includes(t))return null;if(t==="transparent")return"#FFFFFF00";let a;if(a=t.match(e)){const[,A,o,s]=a;return`#${A}${o}${s}`}else if(a=t.match(r)){const[,A,o,s]=a;return`#${Ns(A)}${Ns(o)}${Ns(s)}`}else if(a=t.match(n)){const[,A,o,s]=a,l=jQ(Number(A),Number(o),Number(s));return`#${Ns(l[0])}${Ns(l[1])}${Ns(l[2])}`}return null}function Ns(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e}function jQ(t,e,r){t/=360,e/=100,r/=100;let n,a,A;if(e===0)n=a=A=r;else{const o=(c,u,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?c+(u-c)*6*p:p<.5?u:p<.6666666666666666?c+(u-c)*(.6666666666666666-p)*6:c),s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),a=o(l,s,t),A=o(l,s,t-1/3)}return[Math.round(n*255),Math.round(a*255),Math.round(A*255)]}function ZA(t,e){const r=c=>({r:parseInt(c.substring(1,3),16),g:parseInt(c.substring(3,5),16),b:parseInt(c.substring(5,7),16)}),n=({r:c,g:u,b:p})=>{c/=255,u/=255,p/=255;const h=Math.max(c,u,p),d=Math.min(c,u,p);let w,g,y=(h+d)/2;if(h===d)w=g=0;else{const m=h-d;switch(g=y>.5?m/(2-h-d):m/(h+d),h){case c:w=(u-p)/m+(u<p?6:0);break;case u:w=(p-c)/m+2;break;case p:w=(c-u)/m+4;break}w/=6}return{h:w,s:g,l:y}},a=({h:c,s:u,l:p})=>{let h,d,w;if(u===0)h=d=w=p;else{const g=(F,N,Q)=>(Q<0&&(Q+=1),Q>1&&(Q-=1),Q<.16666666666666666?F+(N-F)*6*Q:Q<.5?N:Q<.6666666666666666?F+(N-F)*(.6666666666666666-Q)*6:F),y=p<.5?p*(1+u):p+u-p*u,m=2*p-y;h=g(m,y,c+.3333333333333333),d=g(m,y,c),w=g(m,y,c-.3333333333333333)}return{r:Math.round(h*255),g:Math.round(d*255),b:Math.round(w*255)}},A=r(t),o=n(A);o.h+=e,o.h=(o.h+1)%1;const s=a(o);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`}function WQ({centerX:t,centerY:e,outerPoints:r,radius:n,rotation:a}){const A=Math.PI/r,o=a;let s="";const l=[];for(let c=0;c<r*2;c+=1){let u=t+Math.cos(c*A+o)*n,p=e+Math.sin(c*A+o)*n;s+=`${u},${p} `,l.push({x:u,y:p})}return{path:`M${s}Z`,coordinates:l}}function eA({plot:t,radius:e,sides:r,rotation:n=0}){const a=t.x,A=t.y,o=r/2;return WQ({centerX:a,centerY:A,outerPoints:o,radius:e+1,rotation:n})}function XQ({centerX:t,centerY:e,innerCirclePoints:r,innerRadius:n,outerRadius:a}){const A=Math.PI/r,o=60,s=r*2;let l="";for(let c=0;c<s;c+=1){let p=c%2==0?a:n,h=t+Math.cos(c*A+o)*p,d=e+Math.sin(c*A+o)*p;l+=`${h},${d} `}return l}function Xh({plot:t,radius:e,apexes:r=5}){const n=t.x,a=t.y,A=r,o=e*3.5/A,l=o*2;return XQ({centerX:n,centerY:a,innerCirclePoints:A,innerRadius:o,outerRadius:l})}function qQ({series:t}){t=t.sort((c,u)=>c.x-u.x);function e(c,u,p){const h=(c.x-u.x)*(p.x-u.x)+(c.y-u.y)*(p.y-u.y),d=(c.x-u.x)*(p.y-u.y)-(p.x-u.x)*(c.y-u.y);return Math.atan2(d,h)}const r=[];let n;n=t[0];for(const c of t)c.x<n.x&&(n=c);r[0]=n;let a,A,o,s;a=r[0],A={x:a.x,y:a.y+1};do{o=Math.PI;for(const c of t)n=e(A,a,c),n<=o&&(s=c,o=n);s!==r[0]&&(r.push(s),A=a,a=s)}while(s!==r[0]);let l;return r.forEach(c=>{c&&c.x&&c.y&&(l+=`${Math.round(c.x)},${Math.round(c.y)} `)}),l=l.replaceAll("undefined",""),l}function Qg(t){if(t){let e=t;e.charAt(0)!=="#"&&(e=this.rgbToHex(t)),e=e.substring(1,7);let r=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16),o=[r/255,n/255,a/255].map(l=>l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]>.3?"#000000":"#FFFFFF"}return"#000000"}function Aa(t){for(const e in t)typeof t[e]=="object"&&!Array.isArray(t[e])&&t[e]!==null?Aa(t[e]):(e==="color"||e==="backgroundColor"||e==="stroke")&&(t[e]===""?t[e]="#000000":t[e]==="transparent"?t[e]="#FFFFFF00":t[e]=Nr(t[e]));return t}function ei(t,e){function r(l){let c=new ArrayBuffer(l.length),u=new Uint8Array(c);for(let p=0;p<l.length;p++)u[p]=l.charCodeAt(p)&255;return c}const n=Dg.book_new(),a=Dg.aoa_to_sheet(t);Dg.book_append_sheet(n,a,"Sheet1");const A=ZB(n,{bookType:"xlsx",type:"binary"}),o=new Blob([r(A)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),s=document.createElement("a");s.href=window.URL.createObjectURL(o),s.download=`${e.replaceAll(" ","_")}.xlsx`,s.click(),window.URL.revokeObjectURL(s.href)}function ix(t){let e,r,n,a;const A=t.length;let o=0,s=0,l=0,c=0;for(const{x:h,y:d}of t)o+=h,s+=d,l+=h*d,c+=h*h;const u=(A*l-o*s)/(A*c-o*o),p=(s-u*o)/A;return e=t[0].x,n=t[A-1].x,r=u*e+p,a=u*n+p,{x1:e,y1:r,x2:n,y2:a,slope:u}}const wa={vue_ui_table:{fontFamily:"inherit",maxHeight:500,rowsPerPage:25,style:{th:{backgroundColor:"#E1E5E8",color:"#2D353C",outline:"1px solid #FFFFFF",selected:{backgroundColor:"#6376DD",color:"#FFFFFF"}},rows:{even:{backgroundColor:"#f3f5f7",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}},odd:{backgroundColor:"#FFFFFF",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}}},inputs:{backgroundColor:"#FFFFFF",color:"#2D353C",border:"1px solid #CCCCCC",accentColor:"#6376DD"},dropdowns:{backgroundColor:"#E1E5E8",color:"#2D353C",icons:{selected:{color:"#008000",unicode:"✔"},unselected:{color:"#ff0000",unicode:"✖"}}},infoBar:{backgroundColor:"#E1E5E8",color:"#2D353C"},pagination:{buttons:{backgroundColor:"#E1E5E8",color:"#2D353C",opacityDisabled:.5},navigationIndicator:{backgroundColor:"#6376DD"}},exportMenu:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{backgroundColor:"#FAFAFA",color:"#2D353C"}},closeButtons:{backgroundColor:"transparent",color:"#2D353C",borderRadius:"50%"},chart:{modal:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{selected:{backgroundColor:"#6376DD",color:"#FFFFFF"},unselected:{backgroundColor:"#FFFFFF",color:"#2D353C"}}},layout:{backgroundColor:"#FFFFFF",axis:{stroke:"#ccd1d4",strokeWidth:2},bar:{fill:"",stroke:"#FFFFFF"},line:{stroke:"#6376DD75",strokeWidth:4,plot:{fill:"#22348f",stroke:"#FFFFFF",strokeWidth:1,radius:{selected:6,unselected:4}},selector:{stroke:"#ccc",strokeWidth:1,strokeDasharray:5}},labels:{color:"#2D353C"},progression:{stroke:"#2D353C",strokeWidth:2,strokeDasharray:4,arrowSize:7}}}},translations:{average:"Average",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"From",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"To",total:"Total",totalRows:"Total rows"},useChart:!0},vue_ui_xy:{chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#2D353C",height:300,width:500,zoom:{show:!0,color:"#2D353C"},padding:{top:36,right:12,bottom:12,left:48},highlighter:{color:"#2D353C",opacity:5},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"#2D353C",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"#2D353C",show:!0,values:[],fontSize:6,showOnlyFirstAndLast:!1}}},labels:{fontSize:10},legend:{color:"#2D353C",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#2D353C",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"#2D353C",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},table:{rounding:0,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8"}},showTable:!1},vue_ui_donut:{style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}},vue_ui_waffle:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grid:{size:20,spaceBetween:2,vertical:!1},rect:{rounded:!0,rounding:2,stroke:"#2D353C",strokeWidth:1,useGradient:!0,gradientIntensity:40},useDiv:!0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}},vue_ui_radar:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,plots:{show:!0,radius:2},outerPolygon:{stroke:"#CCCCCC",strokeWidth:1},dataPolygon:{strokeWidth:1,transparent:!1,opacity:20,useGradient:!0},grid:{show:!0,stroke:"#e1e5e8",strokeWidth:.5,graduations:5},labels:{dataLabels:{show:!0,fontSize:12,color:"#2D353C"}}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingPercentage:0}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},translations:{target:"Target"}},vue_ui_quadrant:{style:{fontFamily:"inherit",chart:{height:512,width:512,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,labels:{quadrantLabels:{show:!0,tl:{text:"",color:"#2D353C",fontSize:16,bold:!0},tr:{text:"",color:"#2D353C",fontSize:16,bold:!0},br:{text:"",color:"#2D353C",fontSize:16,bold:!0},bl:{text:"",color:"#2D353C",fontSize:16,bold:!0}},plotLabels:{show:!0,fontSize:10,color:"#2D353C",offsetY:8},axisLabels:{show:!0,fontSize:14,color:{positive:"#2D353C",negative:"#2D353C"}}},grid:{stroke:"#e1e5e8",strokeWidth:1.5,showArrows:!0,graduations:{stroke:"#e1e5e8",strokeWidth:.5,show:!0,steps:5,fill:!0,color:"#E1E5E8",roundingForce:10},xAxis:{min:-100,max:100,auto:!0,name:""},yAxis:{min:-100,max:100,auto:!0,name:""}},plots:{radius:6,outline:!0,outlineColor:"#FFFFFF",outlineWidth:1},areas:{show:!0,opacity:40,useGradient:!0}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table",showPlotLabels:"Show plot labels"}},translations:{category:"Category",item:"Item",side:"Side"}},vue_ui_gauge:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",animation:{use:!0,speed:1,acceleration:1},layout:{useDiv:!1,track:{size:1,useGradient:!0,gradientIntensity:40},markers:{size:1,color:"#2D353C",strokeWidth:1,stroke:"#2D353C",backgroundColor:"#FFFFFF",bold:!0,fontSizeRatio:1,offsetY:0,roundingValue:0},pointer:{size:1,stroke:"#2D353C",strokeWidth:12,useRatingColor:!0,color:"#CCCCCC",circle:{radius:10,stroke:"#2D353C",strokeWidth:2,color:"#FFFFFF"}}},legend:{fontSize:48,prefix:"",suffix:"",roundingValue:1,showPlusSymbol:!0,useRatingColor:!0,color:"#2D353C"},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title inside",showTable:"Show table"}},translations:{base:"Base"}},vue_ui_chestnut:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grandTotal:{show:!0,fontSize:20,bold:!0,suffix:"",prefix:"",roundingValue:0,color:"#2D353C",text:"Grand total",offsetY:0},roots:{stroke:"#FFFFFF",strokeWidth:5,useGradient:!0,gradientIntensity:20,underlayerColor:"#FFFFFF",labels:{show:!0,fontSize:16,adaptColorToBackground:!0,color:"#FFFFFF",bold:!0,roundingValue:0,prefix:"",suffix:"",name:{color:"#2D353C",fontSize:16,bold:!0}}},verticalSeparator:{stroke:"#FFFFFF",strokeWidth:5},links:{opacity:10},branches:{stroke:"#FFFFFF",strokeWidth:0,borderRadius:6,useGradient:!0,gradientIntensity:20,underlayerColor:"#FFFFFF",widthRatio:1.5,labels:{show:!0,fontSize:14,color:"#2D353C",bold:!0,dataLabels:{show:!0,hideUnderValue:5,fontSize:14,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}}},nuts:{offsetX:20,useGradient:!0,gradientIntensity:30,selected:{useMotion:!0,useGradient:!0,gradientIntensity:40,roundingValue:0,roundingPercentage:0,labels:{dataLabels:{hideUnderValue:5,color:"#2D353C",fontSize:12,bold:!0,prefix:"",suffix:""},core:{total:{color:"#2D353C",fontSize:24,bold:!1},value:{color:"#2D353C",fontSize:24,bold:!0,prefix:"",suffix:""}}}}},legend:{fontSize:16,color:"#2D353C",roundingValue:0,roundingPercentage:0,prefix:"",suffix:""},title:{color:"#2D353C",fontSize:20,text:"",bold:!0,offsetY:0,subtitle:{text:"",color:"#CCCCCC",bold:!1,fontSize:16,offsetY:0}}}}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8",translations:{rootName:"root name",rootValue:"root value",rootToTotal:"%/total",branchName:"branch name",branchValue:"branch value",branchToRoot:"%/root",branchToTotal:"%/total",nutName:"nut name",nutValue:"nut value",nutToBranch:"%/branch",nutToRoot:"%/root",nutToTotal:"%/total"}},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}},userOptions:{show:!0,title:"options",labels:{showTable:"Show table"}},translations:{total:"Total",proportionToTree:"of grand total",of:"of"}},vue_ui_onion:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",useGradient:!1,gradientIntensity:20,layout:{useDiv:!0,gutter:{color:"#e1e5e8",width:.62},track:{width:.62},labels:{show:!0,fontSize:14,color:"#2D353C",roundingValue:0,roundingPercentage:0,bold:!0,offsetY:0,offsetX:0,value:{show:!0},percentage:{show:!0}}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0},translations:{value:"Value",percentage:"Percentage",serie:"Serie"}}},vue_ui_vertical_bar:{style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!0,bars:{sort:"desc",useStroke:!1,strokeWidth:2,height:32,gap:6,borderRadius:4,offsetX:64,paddingRight:0,useGradient:!0,gradientIntensity:20,fillOpacity:90,underlayerColor:"#FFFFFF",dataLabels:{color:"#2D353C",bold:!0,fontSize:12,value:{show:!0,roundingValue:0,prefix:"",suffix:""},percentage:{show:!0,roundingPercentage:0},offsetX:0},nameLabels:{show:!0,color:"#2D353C",bold:!1,fontSize:10,offsetX:0},parentLabels:{show:!0,color:"#2D353C",bold:!1,fontSize:10,offsetX:0}},highlighter:{color:"#2D353C",opacity:5},separators:{show:!0,color:"#e1e5e8",strokeWidth:1}},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},legend:{show:!0,fontSize:14,color:"#2D353C",backgroundColor:"#FFFFFF",bold:!0,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table",sort:"Sort desc"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0,prefix:"",suffix:""}},translations:{parentName:"Serie",childName:"Child",value:"value",percentageToTotal:"%/total",percentageToSerie:"%/serie"}},vue_ui_screenshot:{mode:"download",quality:1,style:{info:{background:"#FFFFFF",bold:!0,border:"none",borderRadius:4,boxShadow:"0 6px 12px -6px rgba(0,0,0,0.2)",color:"#2D353C",fontFamily:"inherit",fontSize:14,minWidth:300,padding:12,top:-100},captureButton:{background:"#E1E5E8",bold:!0,border:"none",borderRadius:4,boxShadow:"0 6px 12px -6px rgba(0,0,0,0.2)",color:"#2D353C",fontFamily:"inherit",fontSize:14,minHeight:40,padding:"8px 12px"},cancelButton:{background:"#F17171",border:"none",borderRadius:10,color:"#FFFFFF",right:-14,size:28,top:-14},captureArea:{background:"radial-gradient(transparent, rgba(0,0,0,0.15))",border:"dashed 4px #2D353C",initialHeight:200,initialWidth:200},handles:{background:"#FFFFFF",border:"4px solid #2D353C",borderRadius:4,size:40}},translations:{captureButton:"capture",info:"Resize or move and click to capture"}},vue_ui_rating:{type:"star",readonly:!1,from:1,to:5,style:{fontFamily:"inherit",animated:!0,itemSize:32,backgroundColor:"#FFFFFF",star:{activeColor:"#FFD055",borderColor:"#FFD055",borderWidth:3,apexes:5,inactiveColor:"#e1e5e8",useGradient:!0},image:{src:"",inactiveOpacity:.3,alt:"rating image"},title:{textAlign:"center",fontSize:20,color:"#2D353C",bold:!0,text:"",offsetY:6,subtitle:{fontSize:14,color:"#CCCCCC",bold:!1,text:"",offsetY:12}},rating:{show:!0,fontSize:28,bold:!0,roundingValue:1,position:"bottom",offsetY:0,offsetX:0},tooltip:{show:!0,fontSize:14,offsetY:0,color:"#2D353C",bold:!0,backgroundColor:"#FFFFFF",borderColor:"#e1e5e8",borderRadius:4,boxShadow:"0 6px 12px -6px rgba(0,0,0,0.2)"}}},vue_ui_skeleton:{type:"line",style:{backgroundColor:"#FFFFFF",color:"#2D353C",maxHeight:500,animated:!0,line:{axis:{show:!0,color:"#e1e5e8",strokeWidth:.5},path:{color:"#e1e5e8",strokeWidth:1,showPlots:!0}},bar:{axis:{show:!0,color:"#e1e5e8",strokeWidth:.5},borderRadius:.5,color:"#e1e5e8",barWidth:9},donut:{color:"#e1e5e8",strokeWidth:64},onion:{color:"#E1E5E8"},gauge:{color:"#E1E5E8"},quadrant:{grid:{color:"#e1e5e8",strokeWidth:.5},plots:{radius:1.5,color:"#E1E5E8"}},radar:{grid:{color:"#E1E5E8",strokeWidth:.5},shapes:{color:"#E1E5E8"}},waffle:{color:"#e1e5e8"},table:{th:{color:"#E1E5E8"},td:{color:"#e1e5e8",strokeWidth:.5}},rating:{color:"#E1E5E8",filled:!0,strokeWidth:1,maxWidth:200},verticalBar:{axis:{show:!0,color:"#e1e5e8",strokeWidth:.5},borderRadius:.5,color:"#e1e5e8"}}}},toe="",Da=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},YQ={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`,e=Math.max(...this.dataset.map(n=>n.series.length)),r={start:0,end:e};return{opacity:Et,useSafeValues:!0,palette:It,defaultConfig:wa.vue_ui_xy,clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t,slicer:r,maxX:e}},computed:{chartConfig(){if(!Object.keys(this.config||{}).length)return this.defaultConfig;const t=this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config});return this.convertConfigColors(t)},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null).slice(this.slicer.start,this.slicer.end),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,n)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*n*this.absoluteDataset.filter(a=>a.type==="bar").filter(a=>!this.segregatedSeries.includes(a.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[n]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){const t=Math.min(...this.safeDataset.filter(e=>!this.segregatedSeries.includes(e.id)).map(e=>Math.min(...e.series)));return t>0?0:t},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.chartConfig.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=this.relativeDataset.map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.timeLabels.forEach((r,n)=>{const a=[r];this.relativeDataset.forEach(A=>{a.push(this.canShowValue(A.absoluteValues[n])?Number(A.absoluteValues[n].toFixed(this.chartConfig.table.rounding)):"")}),e.push(a)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(a=>({name:a.name,color:a.color,type:a.type,value:a.absoluteValues.find((A,o)=>o===this.selectedSerieIndex)}));let e="",r=t.map(a=>a.value).filter(a=>this.isSafeValue(a)&&a!==null).reduce((a,A)=>Math.abs(a)+Math.abs(A),0);const n=this.timeLabels[this.selectedSerieIndex];return n&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${n}</div>`),t.forEach(a=>{this.isSafeValue(a.value)&&a.value!==null&&(e+=`<div><span style="color:${a.color}; margin-right: 3px">${this.icons[a.type]}</span>${a.name} : <b>${this.chartConfig.chart.tooltip.showValue?a.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(a.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums; background:${this.chartConfig.chart.tooltip.backgroundColor};color:${this.chartConfig.chart.tooltip.color}">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,n=48;if(t&&e){const{width:a,height:A}=t.getBoundingClientRect(),o=e.getBoundingClientRect();this.clientPosition.x+a/2>o.right?r=-a:this.clientPosition.x-a/2<o.left?r=0:r=-a/2,this.clientPosition.y+A>o.bottom&&(n=-A-48)}return{top:this.clientPosition.y+n,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let a=5;a>0;a-=1){const A=t*a;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*a),value:A})}const r=this.closestDecimal(this.min/5),n=[];for(let a=5;a>=0;a-=1){const A=Math.abs(r)*a;n.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*a),value:-A})}return[...e,...n]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,n=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${n})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",n),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,n)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
359
359
  -----> The serie '${e.name}' contains the value '${r}' at index ${n}.
360
360
  '${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv,showTable:this.chartConfig.showTable===!0}},methods:{checkNaN:GQ,isSafeValue:KQ,treeShake:aa,shiftHue:ZA,pdf:KA,convertColorToHex:Nr,convertConfigColors:Aa,makeXls:ei,adaptColorToBackground:Qg,calcLinearProgression:ix,calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let n;return t<0,n=Math.round(t/r)*r,n},ratioToMax(t){return t/this.absoluteMax},selectX(t){this.$emit("selectX",{dataset:this.relativeDataset.map(e=>({name:e.name,value:[null,void 0,NaN].includes(e.absoluteValues[t])?null:e.absoluteValues[t],color:e.color,type:e.type})),index:t,indexLabel:this.chartConfig.chart.grid.labels.xAxisLabels.values[t]})},getData(){return this.absoluteDataset.map(t=>({values:t.absoluteValues,color:t.color,name:t.name,type:t.type}))},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}this.$emit("selectLegend",this.relativeDataset.map(e=>({name:e.name,values:e.absoluteValues,color:e.color,type:e.type})))},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){this.isPrinting=!0,this.pdf({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.chartConfig.chart.title.text||"vue-ui-xy"}).finally(()=>{this.isPrinting=!1})},generateXls(){const t=[[this.chartConfig.chart.title.text],[this.chartConfig.chart.title.subtitle.text],[""]],e=["",...this.table.head.map(a=>a.label)],r=this.table.body,n=t.concat([e]).concat(r);this.makeXls(n,this.chartConfig.chart.title.text||"vue-ui-xy")}}},JQ=t=>(i.pushScopeId("data-v-98016d71"),t=t(),i.popScopeId(),t),ZQ=["id"],eO={class:"vue-ui-xy-user-option-item"},tO=["id","name"],rO=["for"],nO={class:"vue-ui-xy-user-option-item"},aO=["id","name"],AO=["for"],iO={class:"vue-ui-xy-user-option-item"},oO=["id","name"],sO=["for"],lO={class:"vue-ui-xy-user-option-item"},cO=["id","name"],uO=["for"],hO=["disabled"],fO=["stroke"],dO=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-98016d71></path><path d="M18 16v.01" data-v-98016d71></path><path d="M6 16v.01" data-v-98016d71></path><path d="M12 5v.01" data-v-98016d71></path><path d="M12 12v.01" data-v-98016d71></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-98016d71></path>',6)],gO={key:1},pO=["viewBox"],mO={class:"vue-ui-xy-grid"},yO=["stroke","x1","x2","y1","y2"],vO=["stroke","x1","x2","y1","y2"],wO={key:0},BO=["x1","x2","y1","y2","stroke"],xO=["id"],bO=["stop-color"],CO=["stop-color"],EO=["stop-color"],_O=["id"],FO=["stop-color"],SO=["stop-color"],kO=["stop-color"],TO=["id"],NO=["stop-color"],LO=["stop-color"],UO=["id"],IO=["stop-color"],DO=["stop-color"],QO=["x","y","height","width","fill"],OO={key:0},PO=["id"],MO=["fill"],RO=["x1","x2","y1","y2","stroke","marker-end"],HO=["x","y","font-size","fill"],VO=["cx","cy","r","fill","stroke"],$O={key:0},zO=["id"],KO=["fill"],GO=["x1","x2","y1","y2","stroke","marker-end"],jO=["x","y","font-size","fill"],WO=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],XO=["cx","cy","r","fill","stroke"],qO={key:0},YO=["id"],JO=["fill"],ZO=["x1","x2","y1","y2","stroke","marker-end"],e7=["x","y","font-size","fill"],t7={key:0},r7=["x","y","font-size","fill"],n7={key:1},a7=["x","y","font-size","fill"],A7=["x","y"],i7=["x","y"],o7={key:2},s7=["x","y","font-size","fill"],l7=["x","y"],c7=["x","y"],u7={key:3},h7=["x1","x2","y1","y2","stroke"],f7=["x","y","font-size","fill"],d7=["font-size","fill"],g7=["x","y","font-size","fill"],p7={key:4},m7={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},y7={key:5},v7=["y"],w7={class:"vue-ui-xy-legend"},B7=["onClick"],x7={key:6},b7=["y","x","font-size","fill"],C7={key:7},E7=["x","y","height","width","fill","onMouseenter","onClick"],_7={key:2,class:"vue-ui-xy-range-slider","data-html2canvas-ignore":""},F7={class:"vue-ui-xy-slider--left"},S7=["for"],k7=["id","max"],T7={class:"vue-ui-xy-slider--right"},N7=["for"],L7=["id","min","max"],U7=["onClick"],I7=["innerHTML"],D7=["innerHTML"],Q7={class:"vue-ui-xy-table"},O7={style:{"max-width":"200px",margin:"0 auto","text-align":"center"}},P7=[JQ(()=>i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[i.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),i.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],M7=["onMouseover"];function R7(t,e,r,n,a,A){return i.openBlock(),i.createElementBlock("div",{id:`vue-ui-xy_${a.uniqueId}`,class:"vue-ui-xy",ref:"chart",style:i.normalizeStyle(`background:${A.chartConfig.chart.backgroundColor}; color:${A.chartConfig.chart.color};width:100%`)},[A.chartConfig.chart.title.show&&(!a.mutableConfig.titleInside||a.isPrinting)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:i.normalizeStyle(`font-family:${A.chartConfig.chart.fontFamily}`)},[i.createElementVNode("div",{class:"vue-ui-xy-title-main",style:i.normalizeStyle(`font-size:${A.chartConfig.chart.title.fontSize}px; color:${A.chartConfig.chart.title.color}; font-weight:${A.chartConfig.chart.title.bold?"bold":"400"}`)},i.toDisplayString(A.chartConfig.chart.title.text),5),A.chartConfig.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:i.normalizeStyle(`font-size:${A.chartConfig.chart.title.subtitle.fontSize}px; color:${A.chartConfig.chart.title.subtitle.color}`)},i.toDisplayString(A.chartConfig.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),A.chartConfig.chart.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-xy-user-options",style:i.normalizeStyle(`background:${A.chartConfig.chart.backgroundColor};color:${A.chartConfig.chart.color}`),"data-html2canvas-ignore":"",ref:"details"},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${A.chartConfig.chart.backgroundColor};color:${A.chartConfig.chart.color}`)},i.toDisplayString(A.chartConfig.chart.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-xy-user-options-items",style:i.normalizeStyle(`background:${A.chartConfig.chart.backgroundColor};color:${A.chartConfig.chart.color}`)},[i.createElementVNode("div",eO,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-datalabels_${a.uniqueId}`,name:`vue-ui-xy-option-datalabels_${a.uniqueId}`,"onUpdate:modelValue":e[0]||(e[0]=o=>a.mutableConfig.dataLabels.show=o)},null,8,tO),[[i.vModelCheckbox,a.mutableConfig.dataLabels.show]]),i.createElementVNode("label",{for:`vue-ui-xy-option-datalabels_${a.uniqueId}`},i.toDisplayString(A.chartConfig.chart.userOptions.labels.dataLabels),9,rO)]),i.createElementVNode("div",nO,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-title_${a.uniqueId}`,name:`vue-ui-xy-option-title_${a.uniqueId}`,"onUpdate:modelValue":e[1]||(e[1]=o=>a.mutableConfig.titleInside=o)},null,8,aO),[[i.vModelCheckbox,a.mutableConfig.titleInside]]),i.createElementVNode("label",{for:`vue-ui-xy-option-title_${a.uniqueId}`},i.toDisplayString(A.chartConfig.chart.userOptions.labels.titleInside),9,AO)]),i.createElementVNode("div",iO,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-legend_${a.uniqueId}`,name:`vue-ui-xy-option-legend_${a.uniqueId}`,"onUpdate:modelValue":e[2]||(e[2]=o=>a.mutableConfig.legendInside=o)},null,8,oO),[[i.vModelCheckbox,a.mutableConfig.legendInside]]),i.createElementVNode("label",{for:`vue-ui-xy-option-legend_${a.uniqueId}`},i.toDisplayString(A.chartConfig.chart.userOptions.labels.legendInside),9,sO)]),i.createElementVNode("div",lO,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-table_${a.uniqueId}`,name:`vue-ui-xy-option-table_${a.uniqueId}`,"onUpdate:modelValue":e[3]||(e[3]=o=>a.mutableConfig.showTable=o)},null,8,cO),[[i.vModelCheckbox,a.mutableConfig.showTable]]),i.createElementVNode("label",{for:`vue-ui-xy-option-table_${a.uniqueId}`},i.toDisplayString(A.chartConfig.chart.userOptions.labels.showTable),9,uO)]),i.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...o)=>A.generatePdf&&A.generatePdf(...o)),disabled:a.isPrinting,style:i.normalizeStyle(`margin-top: 12px; background:${A.chartConfig.chart.backgroundColor};color:${A.chartConfig.chart.color}`)},[a.isPrinting?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:A.chartConfig.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},dO,8,fO)):(i.openBlock(),i.createElementBlock("span",gO,"PDF"))],12,hO),i.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...o)=>A.generateXls&&A.generateXls(...o)),style:i.normalizeStyle(`background:${A.chartConfig.chart.backgroundColor};color:${A.chartConfig.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{width:"100%",viewBox:A.viewBox,class:"vue-ui-xy-svg",style:i.normalizeStyle(`background:${A.chartConfig.chart.backgroundColor}; color:${A.chartConfig.chart.color}; font-family:${A.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...o)=>A.closeDetails&&A.closeDetails(...o))},[i.createElementVNode("g",mO,[i.createElementVNode("line",{stroke:A.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:A.drawingArea.left,x2:A.drawingArea.left,y1:A.drawingArea.top,y2:A.drawingArea.bottom,"stroke-linecap":"round"},null,8,yO),i.createElementVNode("line",{stroke:A.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:A.drawingArea.left,x2:A.drawingArea.right,y1:A.zero,y2:A.zero,"stroke-linecap":"round"},null,8,vO),A.chartConfig.chart.grid.showVerticalLines?(i.openBlock(),i.createElementBlock("g",wO,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.maxSeries+1,(o,s)=>(i.openBlock(),i.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:A.drawingArea.width/A.maxSeries*s+A.drawingArea.left,x2:A.drawingArea.width/A.maxSeries*s+A.drawingArea.left,y1:A.drawingArea.top,y2:A.drawingArea.bottom,"stroke-width":"0.5",stroke:A.chartConfig.chart.grid.stroke},null,8,BO))),128))])):i.createCommentVNode("",!0)]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.barSet,(o,s)=>(i.openBlock(),i.createElementBlock("defs",{key:`def_rect_${s}`},[i.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${a.uniqueId}`,x2:"0%",y2:"100%"},[i.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,bO),i.createElementVNode("stop",{offset:"62%","stop-color":`${A.shiftHue(o.color,.02)}DE`},null,8,CO),i.createElementVNode("stop",{offset:"100%","stop-color":`${A.shiftHue(o.color,.05)}66`},null,8,EO)],8,xO),i.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${a.uniqueId}`,x2:"0%",y2:"100%"},[i.createElementVNode("stop",{offset:"0%","stop-color":`${A.shiftHue(o.color,.05)}66`},null,8,FO),i.createElementVNode("stop",{offset:"38%","stop-color":`${A.shiftHue(o.color,.02)}DE`},null,8,SO),i.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,kO)],8,_O)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.plotSet,(o,s)=>(i.openBlock(),i.createElementBlock("defs",{key:`def_plot_${s}`},[i.createElementVNode("radialGradient",{id:`plotGradient_${s}_${a.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[i.createElementVNode("stop",{offset:"0%","stop-color":`${A.shiftHue(o.color,.05)}`},null,8,NO),i.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,LO)],8,TO)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.lineSet,(o,s)=>(i.openBlock(),i.createElementBlock("defs",{key:`def_line_${s}`},[i.createElementVNode("radialGradient",{id:`lineGradient_${s}_${a.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[i.createElementVNode("stop",{offset:"0%","stop-color":`${A.shiftHue(o.color,.05)}`},null,8,IO),i.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,DO)],8,UO)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.barSet,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`serie_bar_${s}`,class:i.normalizeClass(`serie_bar_${s}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`bar_plot_${s}_${c}`},[A.canShowValue(l.value)?(i.openBlock(),i.createElementBlock("rect",{key:0,x:A.calcRectX(l),y:A.calcRectY(l),height:A.calcRectHeight(l),width:A.calcRectWidth(),fill:A.chartConfig.bar.useGradient?l.value>=0?`url(#rectGradient_pos_${s}_${a.uniqueId})`:`url(#rectGradient_neg_${s}_${a.uniqueId})`:o.color},null,8,QO)):i.createCommentVNode("",!0)]))),128)),Object.hasOwn(o,"useProgression")&&o.useProgression===!0&&!isNaN(A.calcLinearProgression(o.plots).slope)?(i.openBlock(),i.createElementBlock("g",OO,[i.createElementVNode("defs",null,[i.createElementVNode("marker",{id:`bar_arrow_${s}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[i.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:o.color},null,8,MO)],8,PO)]),i.createElementVNode("line",{x1:A.calcLinearProgression(o.plots).x1,x2:A.calcLinearProgression(o.plots).x2,y1:A.calcLinearProgression(o.plots).y1,y2:A.calcLinearProgression(o.plots).y2,"stroke-width":1,stroke:o.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${s})`},null,8,RO),i.createElementVNode("text",{"text-anchor":"middle",x:A.calcLinearProgression(o.plots).x2,y:A.calcLinearProgression(o.plots).y2-6,"font-size":A.chartConfig.chart.labels.fontSize,fill:o.color},i.toDisplayString(A.calcLinearProgression(o.plots).slope<0?`+${(Math.abs(A.calcLinearProgression(o.plots).slope)*100).toFixed(2)}%`:`-${(Math.abs(A.calcLinearProgression(o.plots).slope)*100).toFixed(2)}%`),9,HO)])):i.createCommentVNode("",!0)],2))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.plotSet,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`serie_plot_${s}`,class:i.normalizeClass(`serie_plot_${s}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`circle_plot_${s}_${c}`},[A.canShowValue(l.value)?(i.openBlock(),i.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:A.chartConfig.plot.radius,fill:A.chartConfig.plot.useGradient?`url(#plotGradient_${s}_${a.uniqueId})`:o.color,stroke:A.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,VO)):i.createCommentVNode("",!0)]))),128)),Object.hasOwn(o,"useProgression")&&o.useProgression===!0&&!isNaN(A.calcLinearProgression(o.plots).slope)?(i.openBlock(),i.createElementBlock("g",$O,[i.createElementVNode("defs",null,[i.createElementVNode("marker",{id:`plot_arrow_${s}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[i.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:o.color},null,8,KO)],8,zO)]),i.createElementVNode("line",{x1:A.calcLinearProgression(o.plots).x1,x2:A.calcLinearProgression(o.plots).x2,y1:A.calcLinearProgression(o.plots).y1,y2:A.calcLinearProgression(o.plots).y2,"stroke-width":1,stroke:o.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${s})`},null,8,GO),i.createElementVNode("text",{"text-anchor":"middle",x:A.calcLinearProgression(o.plots).x2,y:A.calcLinearProgression(o.plots).y2-6,"font-size":A.chartConfig.chart.labels.fontSize,fill:o.color},i.toDisplayString(A.calcLinearProgression(o.plots).slope<0?`+${(Math.abs(A.calcLinearProgression(o.plots).slope)*100).toFixed(2)}%`:`-${(Math.abs(A.calcLinearProgression(o.plots).slope)*100).toFixed(2)}%`),9,jO)])):i.createCommentVNode("",!0)],2))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.lineSet,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`serie_line_${s}`,class:i.normalizeClass(`serie_line_${s}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`line_${s}_${c}`},[c<o.plots.length-1&&A.canShowValue(l.value)&&A.canShowValue(o.plots[c+1].value)?(i.openBlock(),i.createElementBlock("line",{key:0,x1:l.x,x2:o.plots[c+1].x,y1:l.y,y2:o.plots[c+1].y,stroke:o.color,"stroke-width":A.chartConfig.line.strokeWidth,"stroke-dasharray":o.dashed?A.chartConfig.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,WO)):i.createCommentVNode("",!0)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`circle_line_${s}_${c}`},[A.canShowValue(l.value)?(i.openBlock(),i.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:A.chartConfig.line.radius,fill:A.chartConfig.line.useGradient?`url(#lineGradient_${s}_${a.uniqueId})`:o.color,stroke:A.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,XO)):i.createCommentVNode("",!0)]))),128)),Object.hasOwn(o,"useProgression")&&o.useProgression===!0&&!isNaN(A.calcLinearProgression(o.plots).slope)?(i.openBlock(),i.createElementBlock("g",qO,[i.createElementVNode("defs",null,[i.createElementVNode("marker",{id:`line_arrow_${s}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[i.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:o.color},null,8,JO)],8,YO)]),i.createElementVNode("line",{x1:A.calcLinearProgression(o.plots).x1,x2:A.calcLinearProgression(o.plots).x2,y1:A.calcLinearProgression(o.plots).y1,y2:A.calcLinearProgression(o.plots).y2,"stroke-width":1,stroke:o.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${s})`},null,8,ZO),i.createElementVNode("text",{"text-anchor":"middle",x:A.calcLinearProgression(o.plots).x2,y:A.calcLinearProgression(o.plots).y2-6,"font-size":A.chartConfig.chart.labels.fontSize,fill:o.color},i.toDisplayString(A.calcLinearProgression(o.plots).slope<0?`+${(Math.abs(A.calcLinearProgression(o.plots).slope)*100).toFixed(2)}%`:`-${(Math.abs(A.calcLinearProgression(o.plots).slope)*100).toFixed(2)}%`),9,e7)])):i.createCommentVNode("",!0)],2))),128)),A.chartConfig.bar.labels.show&&a.mutableConfig.dataLabels.show?(i.openBlock(),i.createElementBlock("g",t7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.barSet,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`xLabel_bar_${s}`,class:i.normalizeClass(`xLabel_bar_${s}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`xLabel_bar_${s}_${c}`},[!Object.hasOwn(o,"dataLabels")||o.dataLabels===!0?(i.openBlock(),i.createElementBlock("text",{key:0,x:l.x+A.calcRectWidth(),y:l.y+A.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":A.chartConfig.chart.labels.fontSize,fill:A.chartConfig.bar.labels.color},i.toDisplayString(A.canShowValue(l.value)?l.value.toFixed(A.chartConfig.bar.labels.rounding):""),9,r7)):i.createCommentVNode("",!0)]))),128))],2))),128))])):i.createCommentVNode("",!0),A.chartConfig.plot.labels.show&&a.mutableConfig.dataLabels.show?(i.openBlock(),i.createElementBlock("g",n7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.plotSet,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`xLabel_plot_${s}`,class:i.normalizeClass(`xLabel_plot_${s}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`xLabel_plot_${s}_${c}`},[!Object.hasOwn(o,"dataLabels")||o.dataLabels===!0?(i.openBlock(),i.createElementBlock("text",{key:0,x:l.x,y:l.y+A.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":A.chartConfig.chart.labels.fontSize,fill:A.chartConfig.plot.labels.color},i.toDisplayString(A.canShowValue(l.value)?l.value.toFixed(A.chartConfig.plot.labels.rounding):""),9,a7)):i.createCommentVNode("",!0),c===0&&o.useTag&&o.useTag==="start"?(i.openBlock(),i.createElementBlock("foreignObject",{key:1,x:l.x,y:l.y-20,height:24,width:"150",style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`padding: 3px; background:${o.color}${a.opacity[80]};color:${A.adaptColorToBackground(o.color)};width:fit-content;font-size:${A.chartConfig.chart.labels.fontSize}px;border-radius: 2px;`)},i.toDisplayString(o.name),5)],8,A7)):i.createCommentVNode("",!0),c===o.plots.length-1&&o.useTag&&o.useTag==="end"?(i.openBlock(),i.createElementBlock("foreignObject",{key:2,x:l.x-o.name.length*(A.chartConfig.chart.labels.fontSize/2),y:l.y-20,height:24,width:"150",style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`padding: 3px; background:${o.color}${a.opacity[80]};color:${A.adaptColorToBackground(o.color)};width:fit-content;font-size:${A.chartConfig.chart.labels.fontSize}px;border-radius: 2px;`)},i.toDisplayString(o.name),5)],8,i7)):i.createCommentVNode("",!0)]))),128))],2))),128))])):i.createCommentVNode("",!0),A.chartConfig.line.labels.show&&a.mutableConfig.dataLabels.show?(i.openBlock(),i.createElementBlock("g",o7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.lineSet,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`xLabel_line_${s}`,class:i.normalizeClass(`xLabel_line_${s}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.plots,(l,c)=>(i.openBlock(),i.createElementBlock("g",{key:`xLabel_line_${s}_${c}`},[!Object.hasOwn(o,"dataLabels")||o.dataLabels===!0?(i.openBlock(),i.createElementBlock("text",{key:0,x:l.x,y:l.y+A.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":A.chartConfig.chart.labels.fontSize,fill:A.chartConfig.line.labels.color},i.toDisplayString(A.canShowValue(l.value)?l.value.toFixed(A.chartConfig.line.labels.rounding):""),9,s7)):i.createCommentVNode("",!0),c===0&&o.useTag&&o.useTag==="start"?(i.openBlock(),i.createElementBlock("foreignObject",{key:1,x:l.x,y:l.y-20,height:24,width:"150",style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`padding: 3px; background:${o.color}${a.opacity[80]};color:${A.adaptColorToBackground(o.color)};width:fit-content;font-size:${A.chartConfig.chart.labels.fontSize}px;border-radius: 2px;`)},i.toDisplayString(o.name),5)],8,l7)):i.createCommentVNode("",!0),c===o.plots.length-1&&o.useTag&&o.useTag==="end"?(i.openBlock(),i.createElementBlock("foreignObject",{key:2,x:l.x-o.name.length*(A.chartConfig.chart.labels.fontSize/2),y:l.y-20,height:24,width:"150",style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`padding: 3px; background:${o.color}${a.opacity[80]};color:${A.adaptColorToBackground(o.color)};width:fit-content;font-size:${A.chartConfig.chart.labels.fontSize}px;border-radius: 2px;`)},i.toDisplayString(o.name),5)],8,c7)):i.createCommentVNode("",!0)]))),128))],2))),128))])):i.createCommentVNode("",!0),A.chartConfig.chart.grid.labels.show?(i.openBlock(),i.createElementBlock("g",u7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.yLabels,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`yLabel_${s}`},[o.value>=A.min&&o.value<=A.max?(i.openBlock(),i.createElementBlock("line",{key:0,x1:A.drawingArea.left,x2:A.drawingArea.left-5,y1:o.y,y2:o.y,stroke:A.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,h7)):i.createCommentVNode("",!0),o.value>=A.min&&o.value<=A.max?(i.openBlock(),i.createElementBlock("text",{key:1,x:A.drawingArea.left-5,y:o.y+A.chartConfig.chart.labels.fontSize/3,"font-size":A.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end",fill:A.chartConfig.chart.grid.labels.color},i.toDisplayString(A.canShowValue(o.value)?o.value.toFixed(0):""),9,f7)):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0),i.createElementVNode("g",null,[A.chartConfig.chart.grid.labels.axis.yLabel?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":A.chartConfig.chart.grid.labels.axis.fontSize,fill:A.chartConfig.chart.grid.labels.color,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},i.toDisplayString(A.chartConfig.chart.grid.labels.axis.yLabel),9,d7)):i.createCommentVNode("",!0),A.chartConfig.chart.grid.labels.axis.xLabel?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"middle",x:A.chartConfig.chart.width/2,y:A.drawingArea.bottom+A.chartConfig.chart.grid.labels.axis.fontSize+A.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":A.chartConfig.chart.grid.labels.axis.fontSize,fill:A.chartConfig.chart.grid.labels.color},i.toDisplayString(A.chartConfig.chart.grid.labels.axis.xLabel),9,g7)):i.createCommentVNode("",!0)]),A.chartConfig.chart.title.show&&a.mutableConfig.titleInside&&!a.isPrinting?(i.openBlock(),i.createElementBlock("g",p7,[(i.openBlock(),i.createElementBlock("foreignObject",m7,[i.createElementVNode("div",{class:"vue-ui-xy-title",style:i.normalizeStyle(`font-family:${A.chartConfig.chart.fontFamily}`)},[i.createElementVNode("div",{class:"vue-ui-xy-title-main",style:i.normalizeStyle(`font-size:${A.chartConfig.chart.title.fontSize*.6}px; color:${A.chartConfig.chart.title.color}; font-weight:${A.chartConfig.chart.title.bold?"bold":"400"}`)},i.toDisplayString(A.chartConfig.chart.title.text),5),A.chartConfig.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:i.normalizeStyle(`font-size:${A.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${A.chartConfig.chart.title.subtitle.color}`)},i.toDisplayString(A.chartConfig.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)]))])):i.createCommentVNode("",!0),A.chartConfig.chart.legend.show&&a.mutableConfig.legendInside&&!a.isPrinting?(i.openBlock(),i.createElementBlock("g",y7,[(i.openBlock(),i.createElementBlock("foreignObject",{x:"0",y:A.drawingArea.bottom+A.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:i.normalizeStyle(`overflow:visible; font-size:${A.chartConfig.chart.legend.fontSize*.6}px`)},[i.createElementVNode("div",w7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.absoluteDataset,(o,s)=>(i.openBlock(),i.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:l=>A.segregate(o),class:i.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":a.segregatedSeries.includes(o.id)})},[["plot"].includes(o.type)?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${o.color}`)},"●",4)):i.createCommentVNode("",!0),["line"].includes(o.type)?(i.openBlock(),i.createElementBlock("span",{key:1,style:i.normalizeStyle(`color:${o.color}`)},"▬",4)):i.createCommentVNode("",!0),["bar"].includes(o.type)?(i.openBlock(),i.createElementBlock("span",{key:2,style:i.normalizeStyle(`color:${o.color}`)},"◼",4)):i.createCommentVNode("",!0),i.createElementVNode("span",{style:i.normalizeStyle(`color:${A.chartConfig.chart.legend.color}`)},i.toDisplayString(o.name),5)],10,B7))),128))])],12,v7))])):i.createCommentVNode("",!0),A.chartConfig.chart.grid.labels.xAxisLabels.show?(i.openBlock(),i.createElementBlock("g",x7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.timeLabels,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`time_label_${s}`},[o&&!A.chartConfig.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast||o&&A.chartConfig.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(s===0||s===A.timeLabels.length-1)?(i.openBlock(),i.createElementBlock("text",{key:0,"text-anchor":"middle",y:A.drawingArea.bottom+A.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:A.drawingArea.left+A.drawingArea.width/A.maxSeries*s+A.drawingArea.width/A.maxSeries/2,"font-size":A.chartConfig.chart.grid.labels.xAxisLabels.fontSize,fill:A.chartConfig.chart.grid.labels.xAxisLabels.color},i.toDisplayString(o||""),9,b7)):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0),A.chartConfig.chart.tooltip.show?(i.openBlock(),i.createElementBlock("g",C7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.maxSeries,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`tooltip_trap_${s}`},[i.createElementVNode("rect",{x:A.drawingArea.left+A.drawingArea.width/A.maxSeries*s,y:A.drawingArea.top,height:A.drawingArea.height,width:A.drawingArea.width/A.maxSeries,fill:a.selectedSerieIndex===s||a.selectedRowIndex===s?`${A.chartConfig.chart.highlighter.color}${a.opacity[A.chartConfig.chart.highlighter.opacity]}`:"transparent",onMouseenter:l=>A.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=l=>A.toggleTooltip(!1)),onClick:l=>A.selectX(s)},null,40,E7)]))),128))])):i.createCommentVNode("",!0)],12,pO)),A.chartConfig.chart.zoom.show?(i.openBlock(),i.createElementBlock("div",_7,[i.createElementVNode("div",F7,[i.createElementVNode("label",{for:`start_${a.uniqueId}`},i.toDisplayString(A.chartConfig.chart.grid.labels.xAxisLabels.values[a.slicer.start]),9,S7),i.withDirectives(i.createElementVNode("input",{id:`start_${a.uniqueId}`,type:"range",style:i.normalizeStyle(`accent-color:${A.chartConfig.chart.zoom.color}`),min:0,max:Math.floor(a.maxX/2),"onUpdate:modelValue":e[8]||(e[8]=o=>a.slicer.start=o)},null,12,k7),[[i.vModelText,a.slicer.start]])]),i.createElementVNode("div",T7,[i.createElementVNode("label",{for:`end_${a.uniqueId}`},i.toDisplayString(A.chartConfig.chart.grid.labels.xAxisLabels.values[a.slicer.end-1]),9,N7),i.withDirectives(i.createElementVNode("input",{id:`end_${a.uniqueId}`,type:"range",style:i.normalizeStyle(`accent-color:${A.chartConfig.chart.zoom.color}`),min:Math.ceil(a.maxX/2),max:a.maxX,"onUpdate:modelValue":e[9]||(e[9]=o=>a.slicer.end=o)},null,12,L7),[[i.vModelText,a.slicer.end]])])])):i.createCommentVNode("",!0),A.chartConfig.chart.legend.show&&(!a.mutableConfig.legendInside||a.isPrinting)?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-xy-legend",style:i.normalizeStyle(`font-size:${A.chartConfig.chart.legend.fontSize}px`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.absoluteDataset,(o,s)=>(i.openBlock(),i.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:l=>A.segregate(o),class:i.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":a.segregatedSeries.includes(o.id)})},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${o.color}`),innerHTML:a.icons[o.type]},null,12,I7),i.createElementVNode("span",{style:i.normalizeStyle(`color:${A.chartConfig.chart.legend.color}`)},i.toDisplayString(o.name),5)],10,U7))),128))],4)):i.createCommentVNode("",!0),A.chartConfig.chart.tooltip.show&&a.isTooltip?(i.openBlock(),i.createElementBlock("div",{key:4,class:"vue-ui-xy-tooltip",ref:"tooltip",style:i.normalizeStyle(`top:${A.tooltipPosition.top}px;left:${A.tooltipPosition.left}px; background-color:${A.chartConfig.chart.tooltip.backgroundColor};color:${A.chartConfig.chart.tooltip.color}`),innerHTML:A.tooltipContent},null,12,D7)):i.createCommentVNode("",!0),a.mutableConfig.showTable?(i.openBlock(),i.createElementBlock("div",{key:5,class:i.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":a.isPrinting}),onClick:e[11]||(e[11]=(...o)=>A.closeDetails&&A.closeDetails(...o))},[i.createElementVNode("table",Q7,[i.createElementVNode("thead",null,[i.createElementVNode("tr",null,[i.createElementVNode("th",{style:i.normalizeStyle(`background:${A.chartConfig.table.th.backgroundColor};color:${A.chartConfig.table.th.color}`)},null,4),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.table.head,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`th_${s}`,style:i.normalizeStyle(`background:${A.chartConfig.table.th.backgroundColor};color:${A.chartConfig.table.th.color}`)},[i.createElementVNode("div",O7,[i.createElementVNode("span",{style:i.normalizeStyle(`color:${o.color}; margin-right:3px`)},i.toDisplayString(a.icons[o.type]),5),i.createTextVNode(i.toDisplayString(o.label),1)])],4))),128))]),i.createElementVNode("tr",null,[i.createElementVNode("th",{align:"right",style:i.normalizeStyle(`background:${A.chartConfig.table.th.backgroundColor};color:${A.chartConfig.table.th.color}`)},P7,4),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.table.head,(o,s)=>(i.openBlock(),i.createElementBlock("th",{align:"right",key:`th_sum_${s}`,style:i.normalizeStyle(`background:${A.chartConfig.table.th.backgroundColor};color:${A.chartConfig.table.th.color};padding-right:6px`)},i.toDisplayString(r.dataset[s].series.slice(a.slicer.start,a.slicer.end).reduce((l,c)=>l+c,0).toFixed(A.chartConfig.table.rounding)),5))),128))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.table.body,(o,s)=>(i.openBlock(),i.createElementBlock("tr",{key:`tr_${s}`,class:i.normalizeClass({"vue-ui-xy-table-tr-selected":a.selectedSerieIndex===s||a.selectedRowIndex===s}),onMouseover:l=>a.selectedRowIndex=s,onMouseleave:e[10]||(e[10]=l=>a.selectedRowIndex=null)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o,(l,c)=>(i.openBlock(),i.createElementBlock("td",{key:`td_${s}_${c}`,style:i.normalizeStyle(`background:${A.chartConfig.table.td.backgroundColor};color:${A.chartConfig.table.td.color};padding-right:6px;`)},i.toDisplayString(l),5))),128))],42,M7))),128))])])],2)):i.createCommentVNode("",!0)],12,ZQ)}const H7=Da(YQ,[["render",R7],["__scopeId","data-v-98016d71"]]),aoe="",V7={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,defaultConfig:wa.vue_ui_table,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((e,r)=>e-r),palette:It,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(e=>({average:Object.hasOwn(e,"average")?e.average:!1,decimals:Object.hasOwn(e,"decimals")?e.decimals:0,isMultiselect:Object.hasOwn(e,"isMultiselect")?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,"isPercentage")?e.isPercentage:!1,isSearch:Object.hasOwn(e,"isSearch")?e.isSearch:!1,isSort:Object.hasOwn(e,"isSort")?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,"percentageTo")?e.percentageTo:void 0,prefix:Object.hasOwn(e,"prefix")?e.prefix:"",rangeFilter:Object.hasOwn(e,"rangeFilter")?e.rangeFilter:!1,suffix:Object.hasOwn(e,"suffix")?e.suffix:"",sum:Object.hasOwn(e,"sum")?e.sum:!1,type:e.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
361
361
  Provide an array of objects of type:
@@ -370,24 +370,24 @@ Provide an array of objects of type:
370
370
  isMultiselect: boolean;
371
371
  isPercentage: boolean;
372
372
  percentageTo: string; (or '')
373
- }`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,n=e/r,a=Math.max(...this.currentSelectionSpan.rows.map(h=>h.value)),A=Math.min(...this.currentSelectionSpan.rows.map(h=>h.value)),o=A>=0?0:Math.abs(A),s=a+o,l=a<0&&A<0,c=this.dataset.header[this.currentSelectionSpan.col].isPercentage,u=this.currentSelectionSpan.rows.map((h,d)=>({x:n*d+n/2,y:(1-(h.value+o)/s)*t,value:c?h.value*100:h.value,suffix:c?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:h.index,absoluteValue:c?Math.abs(h.value)*100:Math.abs(h.value)})),p=t-t*(o/s);return{isAllNegative:l,zero:p,plots:u,slot:n,progression:u.length>=2?this.calcLinearProgression(u):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){if(!Object.keys(this.config||{}).length)return this.defaultConfig;const t=this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config});return this.convertConfigColors(t)},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:aa,makeDonut:Gh,convertColorToHex:Nr,convertConfigColors:Aa,makeXls:ei,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((n,a)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(A=>A.index).includes(a)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,a)=>Math.abs(n)+Math.abs(a),0),absoluteValue:this.visibleRows.filter((n,a)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(A=>A.index).includes(a)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,a)=>n+a,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(a=>a.name),r=t==="all"?this.bodyCopy.map(a=>a.td):this.visibleRows.map(a=>a.td),n=[e].concat(r);this.makeXls(n,"vue-ui-table")},calcLinearProgression:ix,closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(n=>n===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),n=new Date(this.dates[e].from),a=new Date(this.dates[e].to);if(r<n||r>a)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(h=>new Date(h.td[t])),r=new Date(Math.min(...e)),n=new Date(Math.max(...e)),a=r.getFullYear(),A=n.getFullYear(),o=String(r.getMonth()+1).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0"),c=String(n.getDate()).padStart(2,"0"),u=`${a}-${o}-${l}`,p=`${A}-${s}-${c}`;return{from:u,to:p}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,n=e.isSearch,a=e.isMultiselect&&this.multiselects[t],A=e.rangeFilter,o=s=>{if(A&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&n&&a&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(r&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&n&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&o(t);if(r&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&a&&A)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(r&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&a&&A)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(n&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&A)return["",void 0].includes(this.searches[t])&&o(t);if(n)return["",void 0].includes(this.searches[t]);if(r&&A)return[void 0].includes(this.sorts[t])&&o(t);if(r)return[void 0].includes(this.sorts[t]);if(a&&A)return this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(a)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,n=40,a=37,A=39;if(![r,n,a,A].includes(e))return;const o=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,l=o.match(s),c=parseInt(l[1]),u=parseInt(l[2]),p=document.getElementById(`cell_${c}_${u+1}_${this.uid}`),h=document.getElementById(`cell_${c}_${u-1}_${this.uid}`),d=document.getElementById(`cell_${c+1}_${u}_${this.uid}`),w=document.getElementById(`cell_${c-1}_${u}_${this.uid}`);let g;switch(!0){case e===A:g=p;break;case e===a:g=h;break;case e===r:g=w;break;case e===n:g=d;break;default:return}g&&(g.focus(),g.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const n=e.y-38,a=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?n:t.value>e.value&&r.value>e.value?a:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,n):t&&!r?t.value>e.value?a:n:!t&&r&&r.value>e.value?a:n},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,n)=>{if(r.isSearch&&Object.assign(this.searches,{[n]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[n]:this.getDropdownOptions(n)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[n]:this.getDatesRange(n)}),Object.assign(this.filteredDatesIndexes,{[n]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[n]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(a=>a.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(a=>a.td).map(a=>a[n]))),max:Math.round(Math.max(...this.dataset.body.map(a=>a.td).map(a=>a[n])))}}),Object.assign(this.immutableRangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(a=>a.td).map(a=>a[n]))),max:Math.round(Math.max(...this.dataset.body.map(a=>a.td).map(a=>a[n])))}})),r.isPercentage){const a=this.dataset.header.map(o=>o.name).indexOf(r.percentageTo),A=this.dataset.body.map(o=>o.td[a]).reduce((o,s)=>o+s,0);e.push([n,a,A])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[n]:this.includesNaN(this.dataset.body.map(a=>Number(a.td[n])))})}),this.bodyCopy.forEach((r,n)=>{e.map(a=>{const[A,o,s]=a;r.td[A]=r.td[o]/s}),r.td.forEach((a,A)=>{this.dataset.header[A].type===this.constants.TEXT&&this.dataset.header[A].isSearch&&(r[A]=this.stringToNumber(a)),this.dataset.header[A].type===this.constants.DATE&&(r[A]=new Date(a).getTime()),this.dataset.header[A].type===this.constants.NUMERIC&&(r[A]=isNaN(Number(a))?A:a),this.tableBody[n][A]=r[A]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,n)=>{t().then(a=>{try{const A=e(a);r(A)}catch(A){n(A)}}).catch(a=>{n(a)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:n,event:a}){if(n!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const A=a.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(o=>o.index).includes(e)?(A.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(o=>o.index!==e),a.currentTarget.classList.remove(this.cssClass.CELL),Array.from(A.children).forEach((o,s)=>{o.dataset.row==="even"?(o.style.background=this.tableConfig.style.rows.even.backgroundColor,o.style.color=this.tableConfig.style.rows.even.olor):(o.style.background=this.tableConfig.style.rows.odd.backgroundColor,o.style.color=this.tableConfig.style.rows.odd.color)}),a.currentTarget.dataset.row==="even"?(a.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.even.color):(a.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(A.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(A.children).forEach((o,s)=>{o.dataset.row==="even"?(o.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,o.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(o.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,o.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),a.currentTarget.dataset.row==="odd"?(a.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(a.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((o,s)=>o.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,n=this.bodyCopy.map(a=>a.td[r]).reduce((a,A)=>a+A,0);this.bodyCopy.forEach(a=>{a.td[e]=a.td[r]/n})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,n)=>r[e]-n[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,n)=>n[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200);const a=document.getElementById(`th_dropdown_${t}`);a.dataset.isOpen==="false"?a.dataset.isOpen="true":a.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},tA=t=>(i.pushScopeId("data-v-573754b1"),t=t(),i.popScopeId(),t),$7={class:"vue-ui-table-export-hub"},z7=["innerHTML"],K7=["data-is-open"],G7=tA(()=>i.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),j7={class:"vue-ui-table-export-hub-options"},W7={class:"vue-ui-table-export-hub-option-wrapper"},X7={class:"label"},q7=["innerHTML"],Y7={class:"vue-ui-table-export-hub-option-wrapper"},J7={class:"label"},Z7=["innerHTML"],eP={class:"vue-ui-table"},tP={id:"tableHead"},rP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),nP={key:0},aP={key:0},AP={key:1},iP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),oP={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},sP=["innerHTML"],lP={key:0,style:{"margin-left":"3px"}},cP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),uP={key:0},hP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),fP={class:"th-filter"},dP={key:0,class:"th-date"},gP={class:"date-wrapper--inputs"},pP={class:"date-fieldset"},mP=["for"],yP=["id","onUpdate:modelValue","onInput"],vP={class:"date-fieldset"},wP=["for"],BP=["id","onUpdate:modelValue","onInput"],xP={class:"date-wrapper--button"},bP=["onClick"],CP=["innerHTML"],EP=["innerHTML"],_P=["innerHTML"],FP=["onClick","disabled"],SP=["placeholder","onUpdate:modelValue","name"],kP=["onClick"],TP=["innerHTML"],NP=["innerHTML"],LP=["innerHTML"],UP=["onClick","innerHTML"],IP=["innerHTML"],DP={key:5,class:"th-range-filter"},QP=["for"],OP=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),PP=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),MP=["id","max","min","onUpdate:modelValue"],RP=["id","max","min","onUpdate:modelValue"],HP=["for"],VP=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),$P=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),zP=["onClick","disabled"],KP=["id"],GP=["onClick"],jP=["onClick","onKeyup"],WP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),XP=["innerHTML","onClick","onKeyup"],qP=["data-row"],YP=["data-row"],JP=["data-row","onClick","onKeyup","id"],ZP=["innerHTML"],eM={key:1},tM={key:2},rM={key:5},nM=["innerHTML"],aM={key:0},AM={style:{"margin-left":"12px"}},iM={class:"format-num"},oM={style:{"margin-left":"12px"}},sM={key:0,class:"format-num"},lM={key:1,class:"format-num"},cM={key:2},uM={style:{"margin-left":"12px"}},hM={key:0,class:"format-num"},fM={key:1,class:"format-num"},dM={key:2},gM={key:0,class:"vue-ui-table-paginator format-num"},pM={key:1,class:"vue-ui-table-size-warning"},mM=["innerHTML"],yM={key:3,class:"vue-ui-table-pagination format-num"},vM=["innerHTML","disabled"],wM=["disabled"],BM={key:0,class:"vue-ui-table-page-scroller-wrapper"},xM={for:"pageScroller",style:{"font-size":"14px"}},bM=["max","value"],CM={key:1},EM=["disabled"],_M=["innerHTML","disabled"],FM={class:"chart-modal-options"},SM=["innerHTML"],kM=["innerHTML"],TM=["innerHTML"],NM={style:{"margin-bottom":"12px"}},LM={key:0},UM={key:1},IM={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},DM={class:"vue-ui-table-fieldset"},QM={class:"vue-ui-table-fieldset-wrapper"},OM=["name","id","checked","onInput"],PM=["for"],MM=["disabled"],RM=["innerHTML"],HM=["viewBox"],VM=["markerWidth","markerHeight","refY"],$M=["points","fill"],zM=["x2","y1","y2","stroke","stroke-width"],KM=["y2","stroke","stroke-width"],GM=["x","width","height","fill"],jM=i.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DD" data-v-573754b1></stop><stop offset="1" stop-color="#6376DD80" data-v-573754b1></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DD80" data-v-573754b1></stop><stop offset="1" stop-color="#6376DD" data-v-573754b1></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DDB3" data-v-573754b1></stop><stop offset="1" stop-color="#6376DD66" data-v-573754b1></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DD66" data-v-573754b1></stop><stop offset="1" stop-color="#6376DDB3" data-v-573754b1></stop></linearGradient>',4),WM=["x","y","height","width","fill","stroke"],XM=["x","y","width"],qM=["x1","y1","x2","y2","stroke-width","stroke"],YM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],JM=["cx","cy","r","fill","stroke","stroke-width"],ZM=["x","y","width"],eR=["x","width","height","onMouseenter"],tR=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],rR=tA(()=>i.createElementVNode("span",null,"---",-1)),nR=["d","stroke"],aR=["x","y"],AR={class:"vue-ui-table-donut-label-name"},iR=["fill"],oR=["fill"],sR=["fill"],lR=["fill"],cR={class:"vue-ui-table-donut-legend"};function uR(t,e,r,n,a,A){return i.openBlock(),i.createElementBlock("div",{class:"vue-ui-table-main",style:i.normalizeStyle(`font-family: ${A.tableConfig.fontFamily}`)},[i.createElementVNode("div",$7,[i.createElementVNode("button",{onClick:e[0]||(e[0]=o=>a.isExportRequest=!a.isExportRequest),innerHTML:A.icons.export,style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.backgroundColor};color:${A.tableConfig.style.exportMenu.color}`)},null,12,z7),i.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":a.isExportRequest||"false",style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.backgroundColor};color:${A.tableConfig.style.exportMenu.color}`)},[G7,i.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=o=>a.isExportRequest=!1),style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color};border-radius:${A.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),i.createElementVNode("div",j7,[i.createElementVNode("div",W7,[i.createElementVNode("div",X7,i.toDisplayString(A.tableConfig.translations.exportAllLabel)+" ("+i.toDisplayString(a.bodyCopy.length)+") ",1),i.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=o=>A.createXls("all")),style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.buttons.backgroundColor};color:${A.tableConfig.style.exportMenu.buttons.color}`)},[i.createElementVNode("div",{innerHTML:A.icons.fileDownload},null,8,q7),i.createElementVNode("span",null,i.toDisplayString(A.tableConfig.translations.exportAllButton),1)],4)]),i.createElementVNode("div",Y7,[i.createElementVNode("div",J7,i.toDisplayString(A.tableConfig.translations.exportPageLabel),1),i.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=o=>A.createXls("page")),style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.buttons.backgroundColor};color:${A.tableConfig.style.exportMenu.buttons.color}`)},[i.createElementVNode("div",{innerHTML:A.icons.fileDownload},null,8,Z7),i.createElementVNode("span",null,i.toDisplayString(A.tableConfig.translations.exportPageButton),1)],4)])])],12,K7)]),i.createElementVNode("div",{class:"vue-ui-table__wrapper",style:i.normalizeStyle(`max-height:${A.tableConfig.maxHeight}px`),ref:"tableWrapper"},[i.createElementVNode("table",eP,[i.createElementVNode("thead",tP,[i.createElementVNode("tr",null,[rP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,style:i.normalizeStyle(`overflow: visible;background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`),class:i.normalizeClass({"th-has-nan":a.hasNaN[s]})},[A.hasNumericTypes&&([a.constants.TEXT,a.constants.DATE].includes(o.type)||o.isPercentage)?(i.openBlock(),i.createElementBlock("span",nP,[i.createTextVNode(i.toDisplayString(o.name)+" ",1),o.isPercentage?(i.openBlock(),i.createElementBlock("span",aP," / "+i.toDisplayString(o.percentageTo),1)):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("span",AP,i.toDisplayString(o.name),1))],6))),128))]),A.hasNumericTypes?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("tr",null,[iP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,class:i.normalizeClass({"th-numeric":!0,"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[o.sum&&!a.hasNaN[s]?(i.openBlock(),i.createElementBlock("span",oP,[i.createElementVNode("span",{innerHTML:A.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,sP),i.createTextVNode(" "+i.toDisplayString(o.prefix)+" "+i.toDisplayString(Number(A.getSum(s).toFixed(o.decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix)+" ",1),a.percentages[s]&&o.percentageTo&&!o.isPercentage?(i.openBlock(),i.createElementBlock("span",lP," ("+i.toDisplayString(isNaN(A.getSum(s)/A.getSum(a.percentages[s].referenceIndex))?"-":(A.getSum(s)/A.getSum(a.percentages[s].referenceIndex)*100).toFixed(o.decimals))+"%) ",1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],6))),128))]),i.createElementVNode("tr",null,[cP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,class:i.normalizeClass({"th-numeric":!0,"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[o.average&&!a.hasNaN[s]?(i.openBlock(),i.createElementBlock("span",uP," ~ "+i.toDisplayString(o.prefix)+" "+i.toDisplayString(isNaN(A.getAverage(s))?"":Number(A.getAverage(s).toFixed(o.decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix),1)):i.createCommentVNode("",!0)],6))),128))]),i.createElementVNode("tr",null,[hP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,class:i.normalizeClass({"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[i.createElementVNode("div",fP,[o.type===a.constants.DATE&&a.dates[s]?(i.openBlock(),i.createElementBlock("div",dP,[i.createElementVNode("div",gP,[i.createElementVNode("div",pP,[i.createElementVNode("label",{for:`from_${s}`},i.toDisplayString(A.tableConfig.translations.from),9,mP),i.withDirectives(i.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":l=>a.dates[s].from=l,onInput:l=>{A.filterBody(),A.setFilterDatesIndexes(s)},style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,yP),[[i.vModelText,a.dates[s].from]])]),i.createElementVNode("div",vP,[i.createElementVNode("label",{for:`to_${s}`},i.toDisplayString(A.tableConfig.translations.to),9,wP),i.withDirectives(i.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":l=>a.dates[s].to=l,onInput:l=>{A.filterBody(),A.setFilterDatesIndexes(s)},style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,BP),[[i.vModelText,a.dates[s].to]])])]),i.createElementVNode("div",xP,[o.isSort?(i.openBlock(),i.createElementBlock("button",{key:0,onClick:l=>A.sortTh(s,l),class:i.normalizeClass({"th-button-active":[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])}),style:i.normalizeStyle(`background:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.color}`)},[a.sorts[s]===a.constants.ASC?(i.openBlock(),i.createElementBlock("span",{key:0,innerHTML:[a.constants.DATE].includes(o.type)?A.icons.sort09:A.icons.sortAZ},null,8,CP)):a.sorts[s]===a.constants.DESC?(i.openBlock(),i.createElementBlock("span",{key:1,innerHTML:[a.constants.DATE].includes(o.type)?A.icons.sort90:A.icons.sortZA},null,8,EP)):(i.openBlock(),i.createElementBlock("span",{key:2,innerHTML:A.icons.arrowSort},null,8,_P))],14,bP)):i.createCommentVNode("",!0),i.createElementVNode("button",{onClick:l=>{A.resetDates(s),A.resetFilter(s,o,l)},disabled:!a.filteredDatesIndexes[s]&&A.isResetDisabled(s,o),class:"th-reset"}," ✖ ",8,FP)])])):i.createCommentVNode("",!0),o.isSearch?i.withDirectives((i.openBlock(),i.createElementBlock("input",{key:1,placeholder:A.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":l=>a.searches[s]=l,onInput:e[4]||(e[4]=l=>A.debounce(A.filterBody,400)),name:`search_${s}`,style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,SP)),[[i.vModelText,a.searches[s]]]):i.createCommentVNode("",!0),!a.hasNaN[s]&&o.isSort&&o.type!==a.constants.DATE?(i.openBlock(),i.createElementBlock("button",{key:2,onClick:l=>A.sortTh(s,l),class:i.normalizeClass({"th-button-active":[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])}),style:i.normalizeStyle(`background:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.color}`)},[a.sorts[s]===a.constants.ASC?(i.openBlock(),i.createElementBlock("span",{key:0,innerHTML:[a.constants.NUMERIC].includes(o.type)?A.icons.sort09:A.icons.sortZA},null,8,TP)):a.sorts[s]===a.constants.DESC?(i.openBlock(),i.createElementBlock("span",{key:1,innerHTML:[a.constants.NUMERIC].includes(o.type)?A.icons.sort90:A.icons.sortAZ},null,8,NP)):(i.openBlock(),i.createElementBlock("span",{key:2,innerHTML:A.icons.arrowSort},null,8,LP))],14,kP)):i.createCommentVNode("",!0),o.isMultiselect?(i.openBlock(),i.createElementBlock("button",{key:3,onClick:l=>A.toggleMultiselect(s,o,l),innerHTML:A.icons.filter,class:i.normalizeClass({"th-button-active":a.multiselects[s]&&a.multiselects[s].length!==A.getDropdownOptions(s).length}),style:i.normalizeStyle(`background:${a.multiselects[s]&&a.multiselects[s].length!==A.getDropdownOptions(s).length?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${a.multiselects[s]&&a.multiselects[s].length!==A.getDropdownOptions(s).length?"":A.tableConfig.style.pagination.buttons.color}`)},null,14,UP)):i.createCommentVNode("",!0),a.currentSelectionSpan.col===s&&A.canChart?(i.openBlock(),i.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=l=>a.showChart=!a.showChart),innerHTML:A.icons.chart,class:i.normalizeClass({"th-button-active":a.showChart}),style:i.normalizeStyle(`background:${a.showChart?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${a.showChart?"":A.tableConfig.style.pagination.buttons.color}`)},null,14,IP)):i.createCommentVNode("",!0),o.rangeFilter&&a.rangeFilters[s]&&!a.hasNaN[s]?(i.openBlock(),i.createElementBlock("div",DP,[i.createElementVNode("label",{for:`rangeMin${s}`},[OP,i.createTextVNode(" min "),PP],8,QP),i.withDirectives(i.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:a.immutableRangeFilters[s].max,min:a.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>a.rangeFilters[s].min=l,onInput:e[6]||(e[6]=l=>A.debounce(A.filterBody,400)),style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,MP),[[i.vModelText,a.rangeFilters[s].min,void 0,{number:!0}]]),i.withDirectives(i.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:a.immutableRangeFilters[s].max,min:a.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>a.rangeFilters[s].max=l,onInput:e[7]||(e[7]=l=>A.debounce(A.filterBody,400)),style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,RP),[[i.vModelText,a.rangeFilters[s].max,void 0,{number:!0}]]),i.createElementVNode("label",{for:`rangeMax${s}`},[VP,i.createTextVNode(" max "),$P],8,HP)])):i.createCommentVNode("",!0),A.canResetColumn(s,o)?(i.openBlock(),i.createElementBlock("button",{key:6,onClick:l=>A.resetFilter(s,o,l),disabled:A.isResetDisabled(s,o),class:"th-reset"}," ✖ ",8,zP)):i.createCommentVNode("",!0),o.isMultiselect?(i.openBlock(),i.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:i.normalizeStyle(`background:${A.tableConfig.style.dropdowns.backgroundColor};color:${A.tableConfig.style.dropdowns.color}`)},[i.createElementVNode("button",{class:"close-dropdown",onClick:l=>A.toggleMultiselect(s,o,l),style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color}`)}," ✖ ",12,GP),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.getDropdownOptions(s),(l,c)=>(i.openBlock(),i.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${c}`,onClick:u=>A.selectDropdownOption(l,s),onKeyup:[i.withKeys(u=>A.selectDropdownOption(l,s),["enter"]),i.withKeys(u=>A.selectDropdownOption(l,s),["space"])],style:i.normalizeStyle(`opacity:${A.isDropdownOptionSelected(l,s)?1:.5}`),tabindex:"0"},[A.isDropdownOptionSelected(l,s)?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${A.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},i.toDisplayString(A.tableConfig.style.dropdowns.icons.selected.unicode),5)):(i.openBlock(),i.createElementBlock("span",{key:1,style:i.normalizeStyle(`color:${A.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},i.toDisplayString(A.tableConfig.style.dropdowns.icons.unselected.unicode),5)),i.createElementVNode("span",null,i.toDisplayString(l),1)],44,jP))),128))],12,KP)):i.createCommentVNode("",!0)])],6))),128))])],64)):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[WP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`col_selector_${s}`,class:i.normalizeClass({"vue-ui-table-col-selector":!a.hasNaN[s],"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${s===a.selectedColumn&&!a.hasNaN[s]?A.tableConfig.style.th.selected.backgroundColor:A.tableConfig.style.th.backgroundColor};color:${s===a.selectedColumn&&!a.hasNaN[s]?A.tableConfig.style.th.selected.color:A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[a.hasNaN[s]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,innerHTML:a.tableHead[s].type===a.constants.NUMERIC?A.icons.chevronDown:"",class:i.normalizeClass({"col-selector":a.tableHead[s].type===a.constants.NUMERIC}),tabindex:"0",onClick:i.withModifiers(l=>A.selectColumn(s),["stop"]),onKeyup:i.withKeys(l=>A.selectColumn(s),["enter"])},null,42,XP))],6))),128))])]),i.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...o)=>A.closeAllDropdowns&&A.closeAllDropdowns(...o)),onKeydown:e[9]||(e[9]=o=>A.navigateCell(o))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.visibleRows,(o,s)=>(i.openBlock(),i.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:i.normalizeClass(`tr_${a.uid}`),style:i.normalizeStyle(`${s%2===0?`background:${A.tableConfig.style.rows.odd.backgroundColor};color:${A.tableConfig.style.rows.odd.color}`:`background:${A.tableConfig.style.rows.even.backgroundColor};color:${A.tableConfig.style.rows.even.color}`}`)},[i.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},i.toDisplayString(o.absoluteIndex+1),9,YP),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.td,(l,c)=>(i.openBlock(),i.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${c}`,style:i.normalizeStyle(A.isNumeric(l)||r.dataset.header[c].type===a.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:u=>A.selectTd({td:l,rowIndex:s,colIndex:c,headerType:r.dataset.header[c].type,event:u}),onKeyup:[i.withKeys(u=>A.selectTd({td:l,rowIndex:s,colIndex:c,headerType:r.dataset.header[c].type,event:u}),["enter"]),i.withKeys(u=>A.selectTd({td:l,rowIndex:s,colIndex:c,headerType:r.dataset.header[c].type,event:u}),["space"])],class:i.normalizeClass({"td-numeric":r.dataset.header[c].type===a.constants.NUMERIC,"td-focusable":!0,"td-has-nan":a.hasNaN[c]}),id:`cell_${s}_${c}_${a.uid}`,tabindex:"0"},[o.meta&&o.meta.markerIndices.includes(c)&&o.meta.unicodeIcon?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${o.meta.color};margin-right:3px`),innerHTML:o.meta.unicodeIcon},null,12,ZP)):i.createCommentVNode("",!0),r.dataset.header[c].type===a.constants.DATE?(i.openBlock(),i.createElementBlock("span",eM,i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(new Date(l).toLocaleString().slice(0,10))+" "+i.toDisplayString(r.dataset.header[c].suffix),1)):r.dataset.header[c].isPercentage?(i.openBlock(),i.createElementBlock("span",tM,i.toDisplayString(Number((l*100).toFixed(r.dataset.header[c].decimals)).toLocaleString())+"% ",1)):a.percentages[c]&&r.dataset.header[c].percentageTo&&!r.dataset.header[c].isPercentage?(i.openBlock(),i.createElementBlock("span",{key:3,class:i.normalizeClass({"td-nan":isNaN(Number(l))})},i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(isNaN(Number(l))?`${l} is not ${a.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[c].decimals)).toLocaleString())+" "+i.toDisplayString(r.dataset.header[c].suffix)+" ("+i.toDisplayString(isNaN(Number(l))?"":Number((l/A.getSum(a.percentages[c].referenceIndex)*100).toFixed(r.dataset.header[c].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[c].type===a.constants.NUMERIC?(i.openBlock(),i.createElementBlock("span",{key:4,class:i.normalizeClass({"td-nan":isNaN(Number(l))})},i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(isNaN(Number(l))?`${l} is not ${a.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[c].decimals)).toLocaleString())+" "+i.toDisplayString(r.dataset.header[c].suffix),3)):(i.openBlock(),i.createElementBlock("span",rM,i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(l)+" "+i.toDisplayString(r.dataset.header[c].suffix),1))],46,JP))),128))],14,qP))),128))],32)])],4),i.createElementVNode("div",{class:i.normalizeClass({"td-selector-info":!0,"td-selector-info--active":a.currentSelectionSpan.col!==void 0&&a.currentSelectionSpan.rows.length}),style:i.normalizeStyle(`background:${A.tableConfig.style.infoBar.backgroundColor};color:${A.tableConfig.style.infoBar.color}`)},[a.currentSelectionSpan.col!==void 0&&a.currentSelectionSpan.rows.length?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",{innerHTML:A.icons.table,class:"td-selector-icon"},null,8,nM),i.createElementVNode("span",null,[i.createElementVNode("b",null,[i.createTextVNode(i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].name)+" ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("span",aM," / "+i.toDisplayString(r.dataset.header[a.percentages[a.currentSelectionSpan.col].referenceIndex].name),1)):i.createCommentVNode("",!0)]),i.createElementVNode("span",AM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.nb)+" : ",1),i.createElementVNode("b",iM,i.toDisplayString(a.currentSelectionSpan.rows.length),1)]),i.createElementVNode("span",oM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.sum)+" : ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",sM,i.toDisplayString(A.selectedCellsCalculations.sumPercentage),1)):(i.openBlock(),i.createElementBlock("b",lM,i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.selectedCellsCalculations.sumRegular)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),1)),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",cM,"%")):i.createCommentVNode("",!0)]),i.createElementVNode("span",uM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.average)+" : ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",hM,i.toDisplayString(A.selectedCellsCalculations.averagePercentage),1)):(i.openBlock(),i.createElementBlock("b",fM,i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.selectedCellsCalculations.averageRegular)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),1)),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",dM,"%")):i.createCommentVNode("",!0)])]),i.createElementVNode("button",{onClick:e[10]||(e[10]=(...o)=>A.resetSelection&&A.resetSelection(...o)),class:"td-selector-info-reset",style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color};border-radius:${A.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):i.createCommentVNode("",!0)],6),a.bodyCopy.length>10?(i.openBlock(),i.createElementBlock("div",gM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.totalRows)+" : "+i.toDisplayString(r.dataset.body.length)+" | "+i.toDisplayString(A.tableConfig.translations.paginatorLabel)+" : ",1),a.bodyCopy.length>10?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=o=>a.itemsPerPage=o),onChange:e[12]||(e[12]=(...o)=>A.resetSelection&&A.resetSelection(...o)),style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.paginatorOptions,(o,s)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[a.bodyCopy.length>o||r.dataset.body.length===o?(i.openBlock(),i.createElementBlock("option",{key:`paginator_option_${s}`},i.toDisplayString(o),1)):i.createCommentVNode("",!0)],64))),256))],36)),[[i.vModelSelect,a.itemsPerPage,void 0,{number:!0}]]):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),a.itemsPerPage>=250?(i.openBlock(),i.createElementBlock("div",pM,[i.createElementVNode("span",{innerHTML:A.icons.warning},null,8,mM),i.createTextVNode(i.toDisplayString(A.tableConfig.translations.sizeWarning),1)])):i.createCommentVNode("",!0),A.pages.length>1&&A.pages.length<=10?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${a.currentPage/(A.pages.length-1)*100}%)`)},null,4)):i.createCommentVNode("",!0),A.pages.length>1?(i.openBlock(),i.createElementBlock("div",yM,[i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=i.withModifiers(o=>A.navigate("previous"),["stop"])),innerHTML:A.icons.chevronLeft,disabled:a.currentPage===0,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===0?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,vM),A.pages.length>3?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=i.withModifiers(o=>A.navigate(1),["stop"])),disabled:a.currentPage===0,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===0?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,wM),A.pages.length>10?(i.openBlock(),i.createElementBlock("div",BM,[i.createElementVNode("label",xM,i.toDisplayString(A.tableConfig.translations.page)+" "+i.toDisplayString(a.currentPage+1)+" / "+i.toDisplayString(A.pages.length),1),i.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:A.pages.length-1,onInput:e[15]||(e[15]=o=>A.updateCurrentPage(o)),value:a.currentPage,style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border};accent-color:${A.tableConfig.style.inputs.accentColor}`)},null,44,bM)])):(i.openBlock(),i.createElementBlock("span",CM,i.toDisplayString(A.tableConfig.translations.page)+" "+i.toDisplayString(a.currentPage+1)+" / "+i.toDisplayString(A.pages.length),1)),i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=i.withModifiers(o=>A.navigate(A.pages.length),["stop"])),disabled:a.currentPage===A.pages.length-1,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===A.pages.length-1?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},i.toDisplayString(A.pages.length),13,EM)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.page)+" "+i.toDisplayString(a.currentPage+1)+" / "+i.toDisplayString(A.pages.length),1)],64)),i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=i.withModifiers(o=>A.navigate("next"),["stop"])),innerHTML:A.icons.chevronRight,disabled:a.currentPage===A.pages.length-1,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===A.pages.length-1?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,_M)])):i.createCommentVNode("",!0),a.showChart&&A.canChart?(i.openBlock(),i.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:i.normalizeStyle(`top:${a.clientY}px; left:${a.clientX}px;background:${A.tableConfig.style.chart.modal.backgroundColor};color:${A.tableConfig.style.chart.modal.color}`)},[i.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=o=>a.showChart=!1),style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color};border-radius:${A.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),i.createElementVNode("div",FM,[A.availableDonutCategories.length?(i.openBlock(),i.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=o=>a.showDonutOptions=!0),innerHTML:A.icons.donut,class:i.normalizeClass({"is-active-chart":a.chart.type===a.constants.DONUT||a.showDonutOptions}),style:i.normalizeStyle(`background:${a.chart.type===a.constants.DONUT||a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.backgroundColor:A.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${a.chart.type===a.constants.DONUT||a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.color:A.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,SM)):i.createCommentVNode("",!0),i.createElementVNode("button",{onClick:e[20]||(e[20]=o=>{a.chart.type=a.constants.LINE,a.showDonutOptions=!1}),innerHTML:A.icons.chart,class:i.normalizeClass({"is-active-chart":a.chart.type===a.constants.LINE&&!a.showDonutOptions}),style:i.normalizeStyle(`background:${a.chart.type===a.constants.LINE&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.backgroundColor:A.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${a.chart.type===a.constants.LINE&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.color:A.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,kM),i.createElementVNode("button",{onClick:e[21]||(e[21]=o=>{a.chart.type=a.constants.BAR,a.showDonutOptions=!1}),innerHTML:A.icons.bar,class:i.normalizeClass({"is-active-chart":a.chart.type===a.constants.BAR&&!a.showDonutOptions}),style:i.normalizeStyle(`background:${a.chart.type===a.constants.BAR&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.backgroundColor:A.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${a.chart.type===a.constants.BAR&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.color:A.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,TM)]),i.createElementVNode("div",NM,[i.createElementVNode("b",null,[i.createTextVNode(i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].name)+" ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage&&r.dataset.header[a.currentSelectionSpan.col].percentageTo?(i.openBlock(),i.createElementBlock("span",LM," / "+i.toDisplayString(r.dataset.header[a.percentages[a.currentSelectionSpan.col].referenceIndex].name),1)):i.createCommentVNode("",!0),a.chart.type===a.constants.DONUT&&a.selectedDonutCategory&&a.selectedDonutCategory.name?(i.openBlock(),i.createElementBlock("span",UM,i.toDisplayString(A.tableConfig.translations.by)+" "+i.toDisplayString(a.selectedDonutCategory.name),1)):i.createCommentVNode("",!0)])]),i.createElementVNode("div",IM,[a.showDonutOptions&&A.availableDonutCategories.length?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`background:${A.tableConfig.style.chart.modal.backgroundColor};color:${A.tableConfig.style.chart.modal.color}`)},[i.createElementVNode("fieldset",DM,[i.createElementVNode("legend",null,i.toDisplayString(A.tableConfig.translations.chooseCategoryColumn),1),i.createElementVNode("div",QM,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.availableDonutCategories,(o,s)=>(i.openBlock(),i.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[i.createElementVNode("input",{type:"radio",name:o.name,id:o.name,checked:a.selectedDonutCategory&&o.name===a.selectedDonutCategory.name,onInput:l=>a.selectedDonutCategory=A.availableDonutCategories[s],style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border};accent-color:${A.tableConfig.style.inputs.accentColor}`)},null,44,OM),i.createElementVNode("label",{for:o.name},i.toDisplayString(o.name),9,PM)]))),128))]),i.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!a.selectedDonutCategory,onClick:e[22]||(e[22]=(...o)=>A.applyDonutOption&&A.applyDonutOption(...o)),style:i.normalizeStyle(`background:${A.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${A.tableConfig.style.chart.modal.buttons.selected.color}`)},[i.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:A.icons.donut},null,8,RM),i.createTextVNode(" "+i.toDisplayString(A.tableConfig.translations.makeDonut),1)],12,MM)])],4)):i.createCommentVNode("",!0),[a.constants.BAR,a.constants.LINE].includes(a.chart.type)&&!a.showDonutOptions?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${a.chart.width} ${a.chart.height}`,class:"vue-ui-table-chart-svg",style:i.normalizeStyle(`background:${A.tableConfig.style.chart.layout.backgroundColor}`)},[i.createElementVNode("defs",null,[i.createElementVNode("marker",{id:"arrowhead",markerWidth:A.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:A.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:A.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[i.createElementVNode("polygon",{points:`0 0, ${A.tableConfig.style.chart.layout.progression.arrowSize} ${A.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${A.tableConfig.style.chart.layout.progression.arrowSize}`,fill:A.tableConfig.style.chart.layout.progression.stroke},null,8,$M)],8,VM)]),i.createElementVNode("g",null,[i.createElementVNode("line",{x1:0,x2:a.chart.width,y1:A.chartData.zero,y2:A.chartData.zero,stroke:A.tableConfig.style.chart.layout.axis.stroke,"stroke-width":A.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,zM),i.createElementVNode("line",{x1:0,x2:0,y1:0,y2:a.chart.height,stroke:A.tableConfig.style.chart.layout.axis.stroke,"stroke-width":A.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,KM)]),a.chart.type===a.constants.LINE?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(A.chartData.plots,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`trap_fill_${s}`},[i.createElementVNode("rect",{x:s*A.chartData.slot,y:0,width:A.chartData.slot,height:a.chart.height,fill:a.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,GM)]))),128)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.chartData.plots,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`plot_${s}`},[a.chart.type===a.constants.BAR?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[jM,i.createElementVNode("rect",{x:o.x-A.chartData.slot/2,y:A.chartData.isAllNegative?0:A.calcRectY(o.value,o.y),height:o.value>=0?A.chartData.zero-o.y:A.chartData.isAllNegative?o.y:o.y-A.chartData.zero,width:A.chartData.slot,fill:A.tableConfig.style.chart.layout.bar.fill?A.tableConfig.style.chart.layout.bar.fill:a.selectedPlot===s?o.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(o.value>=0,"url(#barGradient)"),stroke:A.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,WM),a.selectedPlot===s?(i.openBlock(),i.createElementBlock("foreignObject",{key:0,x:o.x-(A.chartData.slot<100?50:A.chartData.slot/2),y:o.value>=0?o.y-32:o.y+4,height:"20",width:A.chartData.slot<100?100:A.chartData.slot,style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${A.tableConfig.style.chart.layout.labels.color}`)},i.toDisplayString(o.prefix)+" "+i.toDisplayString(Number(o.value.toFixed(r.dataset.header[a.currentSelectionSpan.col].decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix),5)],8,XM)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),a.chart.type===a.constants.LINE?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[s+1<A.chartData.plots.length?(i.openBlock(),i.createElementBlock("line",{key:0,x1:o.x,y1:o.y,x2:A.chartData.plots[s+1].x,y2:A.chartData.plots[s+1].y,"stroke-width":A.tableConfig.style.chart.layout.line.strokeWidth,stroke:A.tableConfig.style.chart.layout.line.stroke},null,8,qM)):i.createCommentVNode("",!0),a.selectedPlot===s?(i.openBlock(),i.createElementBlock("line",{key:1,x1:o.x,y1:o.y,x2:o.x,y2:a.chart.height,stroke:A.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":A.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":A.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,YM)):i.createCommentVNode("",!0),i.createElementVNode("circle",{cx:o.x,cy:o.y,r:a.selectedPlot===s?A.tableConfig.style.chart.layout.line.plot.radius.selected:A.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:A.tableConfig.style.chart.layout.line.plot.fill,stroke:A.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":A.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,JM),a.selectedPlot===s?(i.openBlock(),i.createElementBlock("foreignObject",{key:2,x:o.x-(A.chartData.slot<100?50:A.chartData.slot/2),y:A.placeLabelOnTopOrBottom({previousPlot:A.chartData.plots[s-1],currentPlot:o,nextPlot:A.chartData.plots[s+1]}),height:"20",width:A.chartData.slot<100?100:A.chartData.slot,style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${A.tableConfig.style.chart.layout.labels.color}`)},i.toDisplayString(o.prefix)+" "+i.toDisplayString(Number(o.value.toFixed(r.dataset.header[a.currentSelectionSpan.col].decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix),5)],8,ZM)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.chartData.plots,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`trap_${s}`},[i.createElementVNode("rect",{x:s*A.chartData.slot,y:0,width:A.chartData.slot,height:a.chart.height,fill:"transparent",onMouseenter:l=>a.selectedPlot=s,onMouseleave:e[23]||(e[23]=l=>a.selectedPlot=void 0)},null,40,eR)]))),128)),A.chartData.progression&&A.chartData.plots.length>2?(i.openBlock(),i.createElementBlock("line",{key:1,x1:A.chartData.progression.x1,y1:A.chartData.progression.y1,x2:A.chartData.progression.x2,y2:A.chartData.progression.y2,stroke:A.tableConfig.style.chart.layout.progression.stroke,"stroke-width":A.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":A.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,tR)):i.createCommentVNode("",!0)],12,HM)),A.chartData.plots.length>=2?(i.openBlock(),i.createElementBlock("div",{key:0,class:"chart-trend",style:i.normalizeStyle(`color:${A.tableConfig.style.chart.modal.color}`)},[rR,i.createTextVNode(" Trend: "),i.createElementVNode("span",null,i.toDisplayString(A.chartData.progression.slope<0?"+":"-"),1),i.createTextVNode(" "+i.toDisplayString((Math.abs(A.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),[a.constants.DONUT].includes(a.chart.type)&&!a.showDonutOptions?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[(i.openBlock(),i.createElementBlock("svg",{viewBox:"0 0 100 100",style:i.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${A.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.currentDonut,(o,s)=>(i.openBlock(),i.createElementBlock("path",{key:`arc_${s}`,d:o.path,stroke:`${o.color}CC`,"stroke-width":20,fill:"none"},null,8,nR))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.currentDonut,(o,s)=>(i.openBlock(),i.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:A.calcDonutMarkerLabelPositionX(o)-15,y:o.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[A.isArcBigEnough(o)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:i.normalizeStyle(`color:${A.tableConfig.style.chart.layout.labels.color}`)},[i.createElementVNode("b",null,i.toDisplayString(A.displayArcPercentage(o,a.currentDonut)),1),i.createElementVNode("span",AR,i.toDisplayString(o.name),1)],4)):i.createCommentVNode("",!0)],8,aR))),128)),i.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(A.tableConfig.translations.total),9,iR),i.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.donutHollowLabels.total)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].isPercentage?"%":"")+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),9,oR),i.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(A.tableConfig.translations.average),9,sR),i.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.donutHollowLabels.average)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].isPercentage?"%":"")+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),9,lR)],4)),i.createElementVNode("div",cR,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.currentDonut.filter(o=>o.value>0),(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:i.normalizeStyle(`color:${A.tableConfig.style.chart.layout.labels.color}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${o.color}`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(o.name)+" : ",1),i.createElementVNode("b",null,i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.getDonutLegendValue(o.absoluteValue))+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].isPercentage?"%":"")+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),1),i.createElementVNode("span",null,"("+i.toDisplayString((o.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):i.createCommentVNode("",!0)],512)],4)):i.createCommentVNode("",!0)],4)}const hR=Da(V7,[["render",uR],["__scopeId","data-v-573754b1"]]),Aoe="",fR=t=>(i.pushScopeId("data-v-795deb2e"),t=t(),i.popScopeId(),t),dR=["id"],gR={class:"vue-ui-donut-user-option-item"},pR=["id","name"],mR=["for"],yR={class:"vue-ui-donut-user-option-item"},vR=["id","name"],wR=["for"],BR={class:"vue-ui-donut-user-option-item"},xR=["id","name"],bR=["for"],CR=["disabled"],ER=["stroke"],_R=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-795deb2e></path><path d="M18 16v.01" data-v-795deb2e></path><path d="M6 16v.01" data-v-795deb2e></path><path d="M12 5v.01" data-v-795deb2e></path><path d="M12 12v.01" data-v-795deb2e></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-795deb2e></path>',6)],FR={key:1},SR=["viewBox"],kR=["id"],TR=["stop-color"],NR=["stop-color"],LR=["stop-color"],UR={key:0},IR=["font-size","fill","x"],DR=["font-size","fill","x","y"],QR=["d","stroke","stroke-width"],OR=["cx","cy","fill"],PR=["d","stroke","stroke-width","onMouseenter","onClick"],MR=["cx","cy","r","fill"],RR=["x","y","fill","font-size"],HR=["x","y","fill","font-size"],VR=["x","y","fill","font-size"],$R=["x","y","fill","font-size"],zR=["x","y","fill","font-size"],KR=["x","y","fill","font-size"],GR=["y"],jR=["onClick"],WR=["onClick"],XR={key:0},qR=["innerHTML"],YR={key:0},JR={key:0},ZR=[fR(()=>i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[i.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),i.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],e9={style:{"max-width":"200px margin:0 auto"}},t9=Da({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-donut-${Math.random()}`),A=i.ref(wa.vue_ui_donut),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref(""),d=i.ref(null);i.onMounted(()=>{document.addEventListener("mousemove",w)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",w)});function w(b){u.value.x=b.clientX,u.value.y=b.clientY}const g=i.computed(()=>{let b=0,_=48;if(l.value&&s.value){const{width:B,height:x}=l.value.getBoundingClientRect(),S=s.value.getBoundingClientRect();u.value.x+B/2>S.right?b=-B:u.value.x-B/2<S.left?b=0:b=-B/2,u.value.y+x>S.bottom&&(_=-x-48)}return{top:u.value.y+_,left:u.value.x+b}}),y=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const b=aa({defaultConfig:A.value,userConfig:n.config});return Aa(b)}),m=i.ref({dataLabels:{show:y.value.style.chart.layout.labels.dataLabels.show},inside:y.value.style.chart.layout.useDiv,showTable:y.value.table.show}),F=i.computed(()=>({height:m.value.inside||o.value?512:360,width:512})),N=i.ref([]);function Q(b){N.value.includes(b)?N.value=N.value.filter(_=>_!==b):N.value.push(b),r("selectLegend",I.value.map(_=>({name:_.name,color:_.color,value:_.value})))}const z=i.computed(()=>n.dataset.map((b,_)=>({name:b.name,color:Nr(b.color)||It[_]||It[_%It.length],value:b.values.reduce((B,x)=>B+x,0),absoluteValues:b.values})).sort((b,_)=>_.value-b.value));function R(){return z.value.map(b=>({name:b.name,color:b.color,value:b.value}))}e({getData:R});const I=i.computed(()=>n.dataset.map((b,_)=>({name:b.name,color:Nr(b.color)||It[_]||It[_%It.length],value:b.values.reduce((B,x)=>B+x,0),absoluteValues:b.values})).sort((b,_)=>_.value-b.value).filter((b,_)=>!N.value.includes(_))),U=i.computed(()=>n.dataset.map((b,_)=>({name:b.name,color:Nr(b.color)||It[_]||It[_%It.length],value:b.values.reduce((B,x)=>B+x,0)})).sort((b,_)=>_.value-b.value)),O=i.computed(()=>Gh({series:I.value},F.value.width/2,F.value.height/2,100,100));function q(b){return b.center.endX+T(b,256)}function T(b,_){return b.center.endX-_>=0?30:-30}function L(b){return b.proportion*100>y.value.style.chart.layout.labels.dataLabels.hideUnderValue}function G(b,_){return isNaN(b.value/Y(_))?0:(b.value/Y(_)*100).toFixed(0)+"%"}function Y(b){return[...b].map(_=>_.value).reduce((_,B)=>_+B,0)}const se=i.computed(()=>I.value.map(b=>b.value).reduce((b,_)=>b+_,0)),he=i.computed(()=>se.value/I.value.length);function ge(){c.value&&c.value.removeAttribute("open")}function re(b,_,B=!0){p.value=B,d.value=_;let x="";x+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${b.name}</div>`,x+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${b.color};font-size:${y.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,y.value.style.chart.tooltip.showValue&&(x+=`<b>${b.value.toFixed(y.value.style.chart.tooltip.roundingValue)}</b>`),y.value.style.chart.tooltip.showPercentage&&(y.value.style.chart.tooltip.showValue?x+=`<span>(${(b.proportion*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:x+=`<b>${(b.proportion*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),h.value=`<div>${x}</div>`}function le(){o.value=!0,KA({domElement:document.getElementById(`donut__${a.value}`),fileName:y.value.style.chart.title.text||"vue-ui-donut"}).finally(()=>{o.value=!1})}const fe=i.computed(()=>{const b=I.value.map(B=>({name:B.name,color:B.color})),_=I.value.map(B=>B.value);return{head:b,body:_}});function Ue(){i.nextTick(()=>{const b=fe.value.head.map((B,x)=>[[B.name],[fe.value.body[x]],[isNaN(fe.value.body[x]/se.value)?"-":fe.value.body[x]/se.value*100]]),_=[[y.value.style.chart.title.text],[y.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(b);ei(_,y.value.style.chart.title.text||"vue-ui-donut")})}return(b,_)=>(i.openBlock(),i.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:i.normalizeStyle(`font-family:${y.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${a.value}`},[(!m.value.inside||o.value)&&y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${y.value.style.chart.backgroundColor}`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.color};font-size:${y.value.style.chart.title.fontSize}px;font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),5),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.subtitle.color};font-size:${y.value.style.chart.title.subtitle.fontSize}px;font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),y.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},i.toDisplayString(y.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},[i.createElementVNode("div",gR,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${a.value}`,name:`vue-ui-donut-option-datalabels_${a.value}`,"onUpdate:modelValue":_[0]||(_[0]=B=>m.value.dataLabels.show=B)},null,8,pR),[[i.vModelCheckbox,m.value.dataLabels.show]]),i.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${a.value}`},i.toDisplayString(y.value.userOptions.labels.dataLabels),9,mR)]),i.createElementVNode("div",yR,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${a.value}`,name:`vue-ui-donut-option-title_${a.value}`,"onUpdate:modelValue":_[1]||(_[1]=B=>m.value.inside=B)},null,8,vR),[[i.vModelCheckbox,m.value.inside]]),i.createElementVNode("label",{for:`vue-ui-donut-option-title_${a.value}`},i.toDisplayString(y.value.userOptions.labels.useDiv),9,wR)]),i.createElementVNode("div",BR,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${a.value}`,name:`vue-ui-donut-option-table_${a.value}`,"onUpdate:modelValue":_[2]||(_[2]=B=>m.value.showTable=B)},null,8,xR),[[i.vModelCheckbox,m.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-donut-option-table_${a.value}`},i.toDisplayString(y.value.userOptions.labels.showTable),9,bR)]),i.createElementVNode("button",{class:"vue-ui-donut-button",onClick:le,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:y.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},_R,8,ER)):(i.openBlock(),i.createElementBlock("span",FR,"PDF"))],12,CR),i.createElementVNode("button",{class:"vue-ui-donut-button",onClick:Ue,style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${F.value.width} ${F.value.height}`,style:i.normalizeStyle(`max-width:100%; overflow: visible; background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),onClick:ge},[i.createElementVNode("defs",null,[y.value.style.chart.useGradient?(i.openBlock(),i.createElementBlock("radialGradient",{key:0,id:`gradient_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(Nr)(y.value.style.chart.backgroundColor)}00`},null,8,TR),i.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+i.unref(St)[y.value.style.chart.gradientIntensity]},null,8,NR),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(Nr)(y.value.style.chart.backgroundColor)}00`},null,8,LR)],8,kR)):i.createCommentVNode("",!0)]),y.value.style.chart.title.text&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",UR,[i.createElementVNode("text",{"font-size":y.value.style.chart.title.fontSize,fill:y.value.style.chart.title.color,x:F.value.width/2,y:48,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),13,IR),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":y.value.style.chart.title.subtitle.fontSize,fill:y.value.style.chart.title.subtitle.color,x:F.value.width/2,y:48+y.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),13,DR)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(B,x)=>(i.openBlock(),i.createElementBlock("path",{d:B.path,stroke:`${B.color}CC`,"stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,QR))),256)),y.value.style.chart.useGradient?(i.openBlock(),i.createElementBlock("circle",{key:1,cx:F.value.width/2,cy:F.value.height/2,r:136,fill:`url(#gradient_${a.value})`},null,8,OR)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(B,x)=>(i.openBlock(),i.createElementBlock("path",{d:B.path,stroke:d.value===x?"rgba(0,0,0,0.1)":"transparent","stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:S=>re(B,x,!0),onMouseleave:_[3]||(_[3]=S=>{p.value=!1,d.value=null}),onClick:S=>Q(x)},null,40,PR))),256)),i.createElementVNode("circle",{cx:F.value.width/2,cy:F.value.height/2,r:F.value.width-400-y.value.style.chart.layout.donut.strokeWidth/2,fill:y.value.style.chart.backgroundColor},null,8,MR),y.value.style.chart.layout.labels.hollow.total.show?(i.openBlock(),i.createElementBlock("text",{key:2,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2-(y.value.style.chart.layout.labels.hollow.average.show?y.value.style.chart.layout.labels.hollow.total.fontSize:0)+y.value.style.chart.layout.labels.hollow.total.offsetY,fill:y.value.style.chart.layout.labels.hollow.total.color,"font-size":y.value.style.chart.layout.labels.hollow.total.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.total.text),13,RR)):i.createCommentVNode("",!0),y.value.style.chart.layout.labels.hollow.total.show?(i.openBlock(),i.createElementBlock("text",{key:3,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2+y.value.style.chart.layout.labels.hollow.total.fontSize-(y.value.style.chart.layout.labels.hollow.average.show?y.value.style.chart.layout.labels.hollow.total.fontSize:0)+y.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:y.value.style.chart.layout.labels.hollow.total.value.color,"font-size":y.value.style.chart.layout.labels.hollow.total.value.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+i.toDisplayString(se.value.toFixed(y.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+i.toDisplayString(y.value.style.chart.layout.labels.hollow.total.value.suffix),13,HR)):i.createCommentVNode("",!0),y.value.style.chart.layout.labels.hollow.average.show?(i.openBlock(),i.createElementBlock("text",{key:4,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2+(y.value.style.chart.layout.labels.hollow.total.show?y.value.style.chart.layout.labels.hollow.average.fontSize:0)+y.value.style.chart.layout.labels.hollow.average.offsetY,fill:y.value.style.chart.layout.labels.hollow.average.color,"font-size":y.value.style.chart.layout.labels.hollow.average.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.average.text),13,VR)):i.createCommentVNode("",!0),y.value.style.chart.layout.labels.hollow.average.show?(i.openBlock(),i.createElementBlock("text",{key:5,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2+(y.value.style.chart.layout.labels.hollow.total.show?y.value.style.chart.layout.labels.hollow.average.fontSize:0)+y.value.style.chart.layout.labels.hollow.average.fontSize+y.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:y.value.style.chart.layout.labels.hollow.average.value.color,"font-size":y.value.style.chart.layout.labels.hollow.average.value.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+i.toDisplayString(isNaN(he.value.toFixed(y.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":he.value.toFixed(y.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+i.toDisplayString(y.value.style.chart.layout.labels.hollow.average.value.suffix),13,$R)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(B,x)=>(i.openBlock(),i.createElementBlock("g",null,[L(B)&&m.value.dataLabels.show?(i.openBlock(),i.createElementBlock("text",{key:0,"text-anchor":"middle",x:q(B),y:B.center.endY-y.value.style.chart.layout.labels.percentage.fontSize/2,fill:y.value.style.chart.layout.labels.percentage.color,"font-size":y.value.style.chart.layout.labels.percentage.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},i.toDisplayString(G(B,O.value)),13,zR)):i.createCommentVNode("",!0),L(B)&&m.value.dataLabels.show?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"middle",x:q(B),y:B.center.endY+y.value.style.chart.layout.labels.percentage.fontSize/2,fill:y.value.style.chart.layout.labels.name.color,"font-size":y.value.style.chart.layout.labels.name.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.name.bold?"bold":""}`)},i.toDisplayString(B.name),13,KR)):i.createCommentVNode("",!0)]))),256)),y.value.style.chart.legend.show&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:6,x:0,y:F.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-donut-legend",style:i.normalizeStyle(`background:transparent;color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:S=>Q(x),style:i.normalizeStyle(`opacity:${N.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(B.value),1),i.createElementVNode("span",null,"("+i.toDisplayString(isNaN(B.value/se.value)?"-":(B.value/se.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1)],12,jR))),256))],4)],8,GR)):i.createCommentVNode("",!0)],12,SR)),y.value.style.chart.legend.show&&(!m.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:i.normalizeStyle(`background:${y.value.style.chart.legend.backgroundColor};color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`),onClick:ge},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:S=>Q(x),style:i.normalizeStyle(`opacity:${N.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(B.value.toFixed(y.value.style.chart.legend.roundingValue)),1),N.value.includes(x)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",XR,"("+i.toDisplayString(isNaN(B.value/se.value)?"-":(B.value/se.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1))],12,WR))),256))],4)):i.createCommentVNode("",!0),y.value.style.chart.tooltip.show&&p.value?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${g.value.top}px;left:${g.value.left}px;background:${y.value.style.chart.tooltip.backgroundColor};color:${y.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,qR)):i.createCommentVNode("",!0),m.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:ge,class:"vue-ui-donut-table",style:i.normalizeStyle(`width:100%;margin-top:${m.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",YR,[i.createElementVNode("th",{colspan:"3",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(y.value.style.chart.title.text),1),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",JR," : "+i.toDisplayString(y.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[i.createElementVNode("th",{align:"right",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};padding-right:6px`)},ZR,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)},i.toDisplayString(se.value.toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(fe.value.head,(B,x)=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},[i.createElementVNode("div",e9,[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};margin-right:6px;`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name),1)])],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(fe.value.body[x].toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(isNaN(fe.value.body[x]/se.value)?"-":(fe.value.body[x]/se.value*100).toFixed(y.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,dR))}},[["__scopeId","data-v-795deb2e"]]),loe="",r9=t=>(i.pushScopeId("data-v-1d2a2a37"),t=t(),i.popScopeId(),t),n9=["id"],a9={class:"vue-ui-waffle-user-option-item"},A9=["id","name"],i9=["for"],o9={class:"vue-ui-waffle-user-option-item"},s9=["id","name"],l9=["for"],c9=["disabled"],u9=["stroke"],h9=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-1d2a2a37></path><path d="M18 16v.01" data-v-1d2a2a37></path><path d="M6 16v.01" data-v-1d2a2a37></path><path d="M12 5v.01" data-v-1d2a2a37></path><path d="M12 12v.01" data-v-1d2a2a37></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-1d2a2a37></path>',6)],f9={key:1},d9=["viewBox"],g9=["id"],p9=["stop-color"],m9=["stop-color"],y9={key:0},v9=["font-size","fill","x","y"],w9=["font-size","fill","x","y"],B9=["rx","x","y","height","width","stroke","stroke-width"],x9=["onMouseover","rx","x","y","height","width","fill","stroke","stroke-width"],b9={key:1,x:0,y:512+64,width:"100%",height:"100",style:{overflow:"visible"}},C9=["onClick"],E9={key:0},_9=["onClick"],F9={key:0},S9=["innerHTML"],k9={key:0},T9={key:0},N9=[r9(()=>i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[i.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),i.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],L9={style:{"max-width":"200px margin:0 auto"}},U9=Da({__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-waffle-${Math.random()}`),A=i.ref(wa.vue_ui_waffle),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref(""),d=i.ref(null),w=i.computed(()=>{let B=0,x=48;if(l.value&&s.value){const{width:S,height:D}=l.value.getBoundingClientRect(),W=s.value.getBoundingClientRect();u.value.x+S/2>W.right?B=-S:u.value.x-S/2<W.left?B=0:B=-S/2,u.value.y+D>W.bottom&&(x=-D-48)}return{top:u.value.y+x,left:u.value.x+B}});i.onMounted(()=>{document.addEventListener("mousemove",g)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(B){u.value.x=B.clientX,u.value.y=B.clientY}const y=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const B=aa({defaultConfig:A.value,userConfig:n.config});return Aa(B)}),m=i.ref({inside:!y.value.style.chart.layout.useDiv,showTable:y.value.table.show}),F=i.computed(()=>({height:m.value.inside?704:512,width:512})),N=i.computed(()=>({top:m.value.inside?64:0,left:0,height:512,width:512})),Q=i.computed(()=>(N.value.width-y.value.style.chart.layout.grid.size*y.value.style.chart.layout.grid.spaceBetween)/y.value.style.chart.layout.grid.size);function z(B){const x=B.reduce((W,ue)=>W+ue,0),S=B.map(W=>Math.round(W/x*100)/100),D=S.reduce((W,ue)=>W+ue,0);if(D!==1){const W=S.length-1;S[W]+=1-D,S[W]=Math.round(S[W]*100)/100}return S}const R=i.computed(()=>n.dataset.map((B,x)=>({...B,color:Nr(B.color)||It[x]||It[x%It.length],uid:`serie_${x}`}))),I=i.computed(()=>{const B=R.value.filter((x,S)=>!le.value.includes(x.uid)).map((x,S)=>x.values.reduce((D,W)=>D+W));return z(B)}),U=i.computed(()=>{const B=R.value.map((x,S)=>x.values.reduce((D,W)=>D+W));return z(B)}),O=i.computed(()=>R.value.filter((B,x)=>!le.value.includes(B.uid)).map((B,x)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((S,D)=>S+D,0),absoluteValues:B.values,proportion:I.value[x]*Math.pow(y.value.style.chart.layout.grid.size,2)})).sort((B,x)=>x.value-B.value)),q=i.computed(()=>R.value.map((B,x)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((S,D)=>S+D,0),absoluteValues:B.values,proportion:U.value[x]*Math.pow(y.value.style.chart.layout.grid.size,2)})).sort((B,x)=>x.value-B.value));function T(){return q.value.map(B=>({name:B.name,color:B.color,value:B.value,proportion:B.proportion/Math.pow(y.value.style.chart.layout.grid.size,2)}))}e({getData:T});const L=i.computed(()=>O.value.map((B,x)=>{const S=x>0?O.value.filter((ue,Ce)=>Ce<x).map(ue=>ue.proportion).reduce((ue,Ce)=>ue+Ce)+B.proportion-O.value[x-1].proportion:B.proportion-B.proportion,D=S+B.proportion,W=[];for(let ue=S;ue<=D;ue+=1)W.push(ue);return{...B,start:x>0?O.value.filter((ue,Ce)=>Ce<x).map(ue=>ue.proportion).reduce((ue,Ce)=>ue+Ce)+B.proportion-O.value[x-1].proportion:B.proportion-B.proportion,rects:W}})),G=i.computed(()=>L.value.flatMap((B,x)=>B.rects.map((S,D)=>({name:B.name,color:B.color,value:B.value,serieIndex:x,...B})))),Y=i.computed(()=>{const B=[];for(let x=0;x<y.value.style.chart.layout.grid.size;x+=1)for(let S=0;S<y.value.style.chart.layout.grid.size;S+=1)B.push({x:(y.value.style.chart.layout.grid.vertical?x:S)*(Q.value+y.value.style.chart.layout.grid.spaceBetween),y:(y.value.style.chart.layout.grid.vertical?S:x)*(Q.value+y.value.style.chart.layout.grid.spaceBetween)+N.value.top});return B}),se=i.computed(()=>R.value.map((B,x)=>({name:B.name,color:B.color||It[x]||It[x%It.length],value:B.values.reduce((S,D)=>S+D,0),uid:B.uid})).sort((B,x)=>x.value-B.value)),he=i.computed(()=>O.value.map(B=>B.value).reduce((B,x)=>B+x,0));i.computed(()=>he.value/O.value.length);function ge(){c.value&&c.value.removeAttribute("open")}function re(B){if(le.value.length===n.dataset.length)return;const x=G.value[B];p.value=!0,d.value=G.value[B].serieIndex;let S="";S+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${x.name}</div>`,S+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${x.color};font-size:${y.value.style.chart.tooltip.fontSize*1.6}px;">◼</span>`,y.value.style.chart.tooltip.showValue&&(S+=`<b>${x.value.toFixed(y.value.style.chart.tooltip.roundingValue)}</b>`),y.value.style.chart.tooltip.showPercentage&&(y.value.style.chart.tooltip.showValue?S+=`<span>(${(x.value/he.value*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:S+=`<b>${(x.value/he.value*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),h.value=S}const le=i.ref([]);function fe(B){le.value.includes(B)?le.value=le.value.filter(x=>x!==B):le.value.push(B),r("selectLegend",O.value.map(x=>({name:x.name,color:x.color,value:x.value,proportion:x.proportion/Math.pow(y.value.style.chart.layout.grid.size,2)})))}const Ue=i.computed(()=>{const B=O.value.map(S=>({name:S.name,color:S.color})),x=O.value.map(S=>S.value);return{head:B,body:x}});function b(){o.value=!0,KA({domElement:document.getElementById(`vue-ui-waffle_${a.value}`),fileName:y.value.style.chart.title.text||"vue-ui-waffle"}).finally(()=>{o.value=!1})}function _(){i.nextTick(()=>{const B=Ue.value.head.map((S,D)=>[[S.name],[Ue.value.body[D]],[isNaN(Ue.value.body[D]/he.value)?"-":Ue.value.body[D]/he.value*100]]),x=[[y.value.style.chart.title.text],[y.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(B);ei(x,y.value.style.chart.title.text||"vue-ui-waffle")})}return(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-waffle",ref_key:"waffleChart",ref:s,id:`vue-ui-waffle_${a.value}`,style:i.normalizeStyle(`font-family:${y.value.style.fontFamily};width:100%; text-align:center`)},[(!m.value.inside||o.value)&&y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${y.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.color};font-size:${y.value.style.chart.title.fontSize}px;font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),5),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.subtitle.color};font-size:${y.value.style.chart.title.subtitle.fontSize}px;font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),y.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-waffle-user-options",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},i.toDisplayString(y.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-waffle-user-options-items",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},[i.createElementVNode("div",a9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-title_${a.value}`,name:`vue-ui-waffle-option-title_${a.value}`,"onUpdate:modelValue":x[0]||(x[0]=S=>m.value.inside=S)},null,8,A9),[[i.vModelCheckbox,m.value.inside]]),i.createElementVNode("label",{for:`vue-ui-waffle-option-title_${a.value}`},i.toDisplayString(y.value.userOptions.labels.useDiv),9,i9)]),i.createElementVNode("div",o9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-table_${a.value}`,name:`vue-ui-waffle-option-table_${a.value}`,"onUpdate:modelValue":x[1]||(x[1]=S=>m.value.showTable=S)},null,8,s9),[[i.vModelCheckbox,m.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-waffle-option-table_${a.value}`},i.toDisplayString(y.value.userOptions.labels.showTable),9,l9)]),i.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:b,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-waffle-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:y.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},h9,8,u9)):(i.openBlock(),i.createElementBlock("span",f9,"PDF"))],12,c9),i.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:_,style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${F.value.width} ${F.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),onClick:ge},[i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(S,D)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${a.value}_${D}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(S.color,.05)}${i.unref(St)[100-y.value.style.chart.layout.rect.gradientIntensity]}`},null,8,p9),i.createElementVNode("stop",{offset:"100%","stop-color":S.color},null,8,m9)],8,g9))),256))]),y.value.style.chart.title.text&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",y9,[i.createElementVNode("text",{"font-size":y.value.style.chart.title.fontSize,fill:y.value.style.chart.title.color,x:F.value.width/2,y:y.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),13,v9),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":y.value.style.chart.title.subtitle.fontSize,fill:y.value.style.chart.title.subtitle.color,x:F.value.width/2,y:y.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),13,w9)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Y.value,(S,D)=>(i.openBlock(),i.createElementBlock("rect",{rx:y.value.style.chart.layout.rect.rounded?y.value.style.chart.layout.rect.rounding:0,x:S.x,y:S.y,height:Q.value,width:Q.value,fill:"white",stroke:y.value.style.chart.layout.rect.stroke,"stroke-width":y.value.style.chart.layout.rect.strokeWidth},null,8,B9))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Y.value,(S,D)=>(i.openBlock(),i.createElementBlock("rect",{onMouseover:W=>re(D),onMouseleave:x[2]||(x[2]=W=>{p.value=!1,d.value=null}),rx:y.value.style.chart.layout.rect.rounded?y.value.style.chart.layout.rect.rounding:0,x:S.x,y:S.y,height:Q.value,width:Q.value,fill:y.value.style.chart.layout.rect.useGradient&&y.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${a.value}_${D})`:G.value[D].color,stroke:y.value.style.chart.layout.rect.stroke,"stroke-width":y.value.style.chart.layout.rect.strokeWidth},null,40,x9))),256)),y.value.style.chart.legend.show&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",b9,[i.createElementVNode("div",{class:"vue-ui-waffle-legend",style:i.normalizeStyle(`font-weight:${y.value.style.chart.legend.bold?"bold":""};background:${y.value.style.chart.legend.backgroundColor};color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`),onClick:ge},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(S,D)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:W=>fe(S.uid),style:i.normalizeStyle(`opacity:${le.value.includes(S.uid)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${S.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),i.createElementVNode("span",null,i.toDisplayString(S.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(S.value.toFixed(y.value.style.chart.legend.roundingValue)),1),le.value.includes(S.uid)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",E9,"("+i.toDisplayString(isNaN(S.value/he.value)?"-":(S.value/he.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1))],12,C9))),256))],4)])):i.createCommentVNode("",!0)],12,d9)),y.value.style.chart.legend.show&&(!m.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-waffle-legend",style:i.normalizeStyle(`font-weight:${y.value.style.chart.legend.bold?"bold":""};background:${y.value.style.chart.legend.backgroundColor};color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`),onClick:ge},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(S,D)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:W=>fe(S.uid),style:i.normalizeStyle(`opacity:${le.value.includes(S.uid)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${S.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),i.createElementVNode("span",null,i.toDisplayString(S.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(S.value.toFixed(y.value.style.chart.legend.roundingValue)),1),le.value.includes(S.uid)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",F9,"("+i.toDisplayString(isNaN(S.value/he.value)?"-":(S.value/he.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1))],12,_9))),256))],4)):i.createCommentVNode("",!0),y.value.style.chart.tooltip.show&&p.value&&le.value.length<n.dataset.length?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-waffle-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${w.value.top}px;left:${w.value.left}px;background:${y.value.style.chart.tooltip.backgroundColor};color:${y.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,S9)):i.createCommentVNode("",!0),m.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:ge,class:"vue-ui-waffle-table",style:i.normalizeStyle(`width:100%;margin-top:${m.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",k9,[i.createElementVNode("th",{colspan:"3",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(y.value.style.chart.title.text),1),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",T9," : "+i.toDisplayString(y.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[i.createElementVNode("th",{align:"right",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};padding-right:6px`)},N9,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)},i.toDisplayString(he.value.toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Ue.value.head,(S,D)=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},[i.createElementVNode("div",L9,[i.createElementVNode("span",{style:i.normalizeStyle(`color:${S.color};margin-right:6px;`)},"◼",4),i.createElementVNode("span",null,i.toDisplayString(S.name),1)])],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(Ue.value.body[D].toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(isNaN(Ue.value.body[D]/he.value)?"-":(Ue.value.body[D]/he.value*100).toFixed(y.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,n9))}},[["__scopeId","data-v-1d2a2a37"]]),foe="",I9=["id"],D9={class:"vue-ui-radar-user-option-item"},Q9=["id","name"],O9=["for"],P9={class:"vue-ui-radar-user-option-item"},M9=["id","name"],R9=["for"],H9=["disabled"],V9=["stroke"],$9=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dbff0f7d></path><path d="M18 16v.01" data-v-dbff0f7d></path><path d="M6 16v.01" data-v-dbff0f7d></path><path d="M12 5v.01" data-v-dbff0f7d></path><path d="M12 12v.01" data-v-dbff0f7d></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-dbff0f7d></path>',6)],z9={key:1},K9=["viewBox"],G9=["id"],j9=["stop-color"],W9=["stop-color"],X9={key:0},q9=["font-size","fill","x","y"],Y9=["font-size","fill","x","y"],J9={key:1},Z9=["x1","y1","x2","y2","stroke","stroke-width"],eH={key:0},tH=["d","stroke","stroke-width"],rH=["d","stroke","stroke-width"],nH={key:2},aH=["x","y","text-anchor","font-size","fill","onMouseenter"],AH={key:0},iH=["d","stroke","stroke-width","fill"],oH={key:3},sH=["cx","cy","fill","r"],lH={key:4,x:0,y:340,width:"100%",height:"60",style:{overflow:"visible"}},cH=["onClick"],uH=["onClick"],hH=["innerHTML"],fH={key:0},dH=["colspan"],gH={key:0},pH=["colspan"],mH={style:{width:"100%"}},yH=Da({__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-radar-${Math.random()}`),A=i.ref(wa.vue_ui_radar),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref("");i.onMounted(()=>{document.addEventListener("mousemove",d)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",d)});function d(b){u.value.x=b.clientX,u.value.y=b.clientY}const w=i.computed(()=>{let b=0,_=48;if(l.value&&s.value){const{width:B,height:x}=l.value.getBoundingClientRect(),S=s.value.getBoundingClientRect();u.value.x+B/2>S.right?b=-B:u.value.x-B/2<S.left?b=0:b=-B/2,u.value.y+x>S.bottom&&(_=-x-48)}return{top:u.value.y+_,left:u.value.x+b}}),g=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const b=aa({defaultConfig:A.value,userConfig:n.config});return Aa(b)}),y=i.ref({dataLabels:{show:g.value.style.chart.layout.labels.dataLabels.show},inside:!g.value.style.chart.layout.useDiv,showTable:g.value.table.show}),m=i.computed(()=>({height:y.value.inside?412:312,width:512})),F=i.ref([]);function N(b){F.value.includes(b)?F.value=F.value.filter(_=>_!==b):F.value.push(b),r("selectLegend",se.value.filter((_,B)=>!F.value.includes(B)).map(_=>({name:_.name,color:_.color,proportion:_.totalProportion})))}function Q(){return se.value.map(b=>({name:b.name,color:b.color,proportion:b.totalProportion}))}e({getData:Q});const z=i.computed(()=>n.dataset.categories.map((b,_)=>({name:b.name,categoryId:`radar_category_${a.value}_${_}`,color:Nr(b.color)||It[_]||It[_%It.length]}))),R=i.computed(()=>n.dataset.series.map((b,_)=>({...b,color:Nr(b.color)||It[_]||It[_%It.length],serieId:`radar_serie_${a.value}_${_}`}))),I=i.computed(()=>Math.max(...R.value.flatMap(b=>b.values))),U=i.computed(()=>R.value.length),O=i.computed(()=>eA({plot:{x:256,y:m.value.height/2},radius:128,sides:U.value,rotation:0})),q=i.computed(()=>{const b=[];for(let _=0;_<128;_+=128/g.value.style.chart.layout.grid.graduations)b.push(_);return b}),T=i.computed(()=>O.value.coordinates.map((b,_)=>{const B=R.value[_].values.map(x=>G({centerX:m.value.width/2,centerY:m.value.height/2,apexX:b.x,apexY:b.y,proportion:x/(R.value[_].target||I.value)}));return{...b,...R.value[_],plots:B}}));function L({x:b,y:_}){let B="middle";return b=Math.round(b),_=Math.round(_),b>m.value.width/2&&(b+=12,B="start"),b<m.value.width/2&&(b-=12,B="end"),_>m.value.height/2&&(_+=20),_<m.value.height/2&&(_-=12),_===m.value.height/2&&(_+=4),{x:b,y:_,anchor:B}}function G({centerX:b,centerY:_,apexX:B,apexY:x,proportion:S}){return{x:b+(B-b)*S,y:_+(x-_)*S}}function Y(b){let _="";return b.forEach(B=>{_+=`${B.x},${B.y} `}),`M${_}Z`}const se=i.computed(()=>{const b=R.value.map((_,B)=>_.values.map(x=>x/(_.target||I.value)));return z.value.map((_,B)=>({..._,totalProportion:b.map(x=>x[B]).reduce((x,S)=>x+S,0)/R.value.length}))}),he=i.computed(()=>{const b=[{name:"",color:""},{name:g.value.translations.target,color:""},...se.value],_=n.dataset.series.map((B,x)=>[B.name,B.target,...B.values.flatMap(S=>[S?S.toFixed(g.value.table.td.roundingValue):"-",isNaN(S/B.target)?"":(S/B.target*100).toFixed(g.value.table.td.roundingPercentage)+"%"])]);return{head:b,body:_}}),ge=i.ref(null);function re(b,_){ge.value=_,p.value=!0;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${b.name}</div>`;for(let x=0;x<b.values.length;x+=1)F.value.includes(x)||(B+=`<div style="display:flex;flex-wrap:wrap;align-items:center;gap:6px"><span style="color:${z.value[x].color}">●</span><span>${z.value[x].name}</span> : ${g.value.style.chart.tooltip.showValue?`<span>${b.values[x].toFixed(g.value.style.chart.tooltip.roundingValue)}</span>`:""} ${!g.value.style.chart.tooltip.showValue&&g.value.style.chart.tooltip.showPercentage?`<span>${(b.values[x]/b.target*100).toFixed(g.value.style.chart.tooltip.roundingPercentage)}%</span>`:g.value.style.chart.tooltip.showPercentage?`<span>(${(b.values[x]/b.target*100).toFixed(g.value.style.chart.tooltip.roundingPercentage)}%)</span>`:""}</div>`);h.value=B}function le(){o.value=!0,KA({domElement:document.getElementById(`vue-ui-radar_${a.value}`),fileName:g.value.style.chart.title.text||"vue-ui-radar"}).finally(()=>{o.value=!1})}function fe(){i.nextTick(()=>{const b=[[g.value.style.chart.title.text],[g.value.style.chart.title.subtitle.text],[""]],_=[[""],[g.value.translations.target],...se.value.flatMap(S=>[[S.name],["%"]])],B=n.dataset.series.map((S,D)=>[S.name,S.target,...S.values.flatMap(W=>[W,isNaN(W/S.target)?"":W/S.target*100])]),x=b.concat([_]).concat(B);ei(x,g.value.style.chart.title.text||"vue-ui-radar")})}function Ue(){c.value&&c.value.removeAttribute("open")}return(b,_)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-radar",ref_key:"radarChart",ref:s,id:`vue-ui-radar_${a.value}`,style:i.normalizeStyle(`font-family:${g.value.style.fontFamily};width:100%; text-align:center`)},[(!y.value.inside||o.value)&&g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${g.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.color};font-size:${g.value.style.chart.title.fontSize}px;font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),5),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.subtitle.color};font-size:${g.value.style.chart.title.subtitle.fontSize}px;font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),g.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-radar-user-options",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},i.toDisplayString(g.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-radar-user-options-items",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},[i.createElementVNode("div",D9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-title_${a.value}`,name:`vue-ui-radar-option-title_${a.value}`,"onUpdate:modelValue":_[0]||(_[0]=B=>y.value.inside=B)},null,8,Q9),[[i.vModelCheckbox,y.value.inside]]),i.createElementVNode("label",{for:`vue-ui-radar-option-title_${a.value}`},i.toDisplayString(g.value.userOptions.labels.useDiv),9,O9)]),i.createElementVNode("div",P9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-table_${a.value}`,name:`vue-ui-radar-option-table_${a.value}`,"onUpdate:modelValue":_[1]||(_[1]=B=>y.value.showTable=B)},null,8,M9),[[i.vModelCheckbox,y.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-radar-option-table_${a.value}`},i.toDisplayString(g.value.userOptions.labels.showTable),9,R9)]),i.createElementVNode("button",{class:"vue-ui-radar-button",onClick:le,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${g.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-radar-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:g.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},$9,8,V9)):(i.openBlock(),i.createElementBlock("span",z9,"PDF"))],12,H9),i.createElementVNode("button",{class:"vue-ui-radar-button",onClick:fe,style:i.normalizeStyle(`color:${g.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),onClick:Ue},[i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,(B,x)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${a.value}_${x}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(B.color,.05)}${i.unref(St)[g.value.style.chart.layout.dataPolygon.opacity]}`},null,8,j9),i.createElementVNode("stop",{offset:"100%","stop-color":B.color+i.unref(St)[g.value.style.chart.layout.dataPolygon.opacity]},null,8,W9)],8,G9))),256))]),g.value.style.chart.title.text&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",X9,[i.createElementVNode("text",{"font-size":g.value.style.chart.title.fontSize,fill:g.value.style.chart.title.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),13,q9),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":g.value.style.chart.title.subtitle.fontSize,fill:g.value.style.chart.title.subtitle.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),13,Y9)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),g.value.style.chart.layout.grid.show?(i.openBlock(),i.createElementBlock("g",J9,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,B=>(i.openBlock(),i.createElementBlock("line",{x1:m.value.width/2,y1:m.value.height/2,x2:B.x,y2:B.y,stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,Z9))),256)),g.value.style.chart.layout.grid.graduations>0?(i.openBlock(),i.createElementBlock("g",eH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,B=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:256,y:m.value.height/2},radius:B,sides:U.value,rotation:0}).path,fill:"none",stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,tH))),256))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("path",{d:O.value.path,fill:"none",stroke:g.value.style.chart.layout.outerPolygon.stroke,"stroke-width":g.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,rH),g.value.style.chart.layout.labels.dataLabels.show?(i.openBlock(),i.createElementBlock("g",nH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,(B,x)=>(i.openBlock(),i.createElementBlock("text",{x:L(B).x,y:L(B).y,"text-anchor":L(B).anchor,"font-size":g.value.style.chart.layout.labels.dataLabels.fontSize,fill:g.value.style.chart.layout.labels.dataLabels.color,onMouseenter:S=>re(B,x),onMouseleave:_[2]||(_[2]=S=>{p.value=!1,ge.value=null})},i.toDisplayString(B.name),41,aH))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,(B,x)=>(i.openBlock(),i.createElementBlock("g",null,[F.value.includes(x)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("g",AH,[i.createElementVNode("path",{d:Y(T.value.map(S=>S.plots[x])),stroke:B.color,"stroke-width":g.value.style.chart.layout.dataPolygon.strokeWidth,fill:g.value.style.chart.layout.dataPolygon.transparent?"transparent":g.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${a.value}_${x})`:B.color+i.unref(St)[g.value.style.chart.layout.dataPolygon.opacity]},null,8,iH)]))]))),256)),g.value.style.chart.layout.plots.show?(i.openBlock(),i.createElementBlock("g",oH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,(B,x)=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(B.plots,(S,D)=>(i.openBlock(),i.createElementBlock("circle",{cx:S.x,cy:S.y,fill:F.value.includes(D)?"transparent":z.value[D].color,r:ge.value!==null&&ge.value===x?g.value.style.chart.layout.plots.radius*1.6:g.value.style.chart.layout.plots.radius},null,8,sH))),256))]))),256))])):i.createCommentVNode("",!0),g.value.style.chart.legend.show&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",lH,[i.createElementVNode("div",{class:"vue-ui-radar-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:Ue},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:S=>N(x),style:i.normalizeStyle(`opacity:${F.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${g.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString((B.totalProportion*100).toFixed(g.value.style.chart.legend.roundingPercentage))+"%",1)],12,cH))),256))],4)])):i.createCommentVNode("",!0)],12,K9)),g.value.style.chart.legend.show&&(!y.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-radar-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};background:${g.value.style.chart.legend.backgroundColor};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:Ue},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:S=>N(x),style:i.normalizeStyle(`opacity:${F.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${g.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString((B.totalProportion*100).toFixed(g.value.style.chart.legend.roundingPercentage))+"%",1)],12,uH))),256))],4)):i.createCommentVNode("",!0),g.value.style.chart.tooltip.show&&p.value?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-radar-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${w.value.top}px;left:${w.value.left}px;background:${g.value.style.chart.tooltip.backgroundColor};color:${g.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,hH)):i.createCommentVNode("",!0),y.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:Ue,class:"vue-ui-radar-table",style:i.normalizeStyle(`width:100%;margin-top:${y.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",fH,[i.createElementVNode("th",{colspan:se.value.length+2+3,style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(g.value.style.chart.title.text),1),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",gH," : "+i.toDisplayString(g.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],12,dH)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(he.value.head,B=>(i.openBlock(),i.createElementBlock("th",{colspan:B.color?2:1,style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("div",mH,[B.color?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${B.color};margin-right:3px`)},"●",4)):i.createCommentVNode("",!0),i.createElementVNode("span",null,i.toDisplayString(B.name),1)])],12,pH))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(he.value.body,B=>(i.openBlock(),i.createElementBlock("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(B,x=>(i.openBlock(),i.createElementBlock("td",{style:i.normalizeStyle(`background:${g.value.table.td.backgroundColor};color:${g.value.table.td.color};outline:${g.value.table.td.outline}`)},i.toDisplayString(x),5))),256))]))),256))])])],4)):i.createCommentVNode("",!0)],12,I9))}},[["__scopeId","data-v-dbff0f7d"]]),poe="",vH=["id"],wH={class:"vue-ui-quadrant-user-option-item"},BH=["id","name"],xH=["for"],bH={class:"vue-ui-quadrant-user-option-item"},CH=["id","name"],EH=["for"],_H={class:"vue-ui-quadrant-user-option-item"},FH=["id","name"],SH=["for"],kH=["disabled"],TH=["stroke"],NH=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-c200bf52></path><path d="M18 16v.01" data-v-c200bf52></path><path d="M6 16v.01" data-v-c200bf52></path><path d="M12 5v.01" data-v-c200bf52></path><path d="M12 12v.01" data-v-c200bf52></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-c200bf52></path>',6)],LH={key:1},UH=["viewBox"],IH=["id"],DH=["stop-color"],QH=["stop-color"],OH={key:0},PH=["font-size","fill","x","y"],MH=["font-size","fill","x","y"],RH={key:1},HH=["fill","x","y","height","width","stroke-width","stroke","rx"],VH=["x1","y1","x2","y2","stroke","stroke-width"],$H=["x1","y1","x2","y2","stroke","stroke-width"],zH={key:2},KH=["points","fill"],GH=["points","fill"],jH=["points","fill"],WH=["points","fill"],XH={key:3},qH=["y","fill","font-size"],YH=["x","y","fill","font-size"],JH=["x","y","fill","font-size"],ZH=["y","fill","font-size"],eV={key:4},tV=["x","y","font-size","fill"],rV=["x","y","font-size","fill"],nV=["x","y","font-size","fill"],aV=["font-size","fill"],AV=["font-size","fill"],iV=["font-size","fill"],oV={key:5},sV=["fill","points"],lV={key:0},cV=["cx","cy","r","fill","stroke","stroke-width","onMouseover","onClick"],uV={key:1},hV=["d","fill","stroke","stroke-width","onMouseover","onClick"],fV={key:2},dV=["d","fill","stroke","stroke-width","onMouseover","onClick"],gV={key:3},pV=["d","fill","stroke","stroke-width","onMouseover","onClick"],mV={key:4},yV=["d","fill","stroke","stroke-width","onMouseover","onClick"],vV={key:5},wV=["d","fill","stroke","stroke-width","onMouseover","onClick"],BV={key:6},xV=["points","fill","stroke","stroke-width","onMouseover","onClick"],bV={key:6},CV=["x","y","font-size","fill"],EV=["y"],_V=["onClick"],FV=["innerHTML"],SV=["onClick"],kV=["innerHTML"],TV=["innerHTML"],NV={key:0},LV={key:0},UV={style:{width:"100%"}},IV=Da({__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-quadrant-${Math.random()}`),A=i.ref(wa.vue_ui_quadrant),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref("");i.onMounted(()=>{document.addEventListener("mousemove",d);const _=document.getElementById("xLabelMin");if(_){const D=_.getBBox().height/2+m.value.padding*.6,W=m.value.centerY;_.setAttributeNS(null,"transform",`rotate(-90, ${D}, ${W})`),_.setAttributeNS(null,"x",D),_.setAttributeNS(null,"y",W)}const B=document.getElementById("xLabelMax");if(B){const D=B.getBBox().height/2+m.value.right,W=m.value.centerY;B.setAttributeNS(null,"transform",`rotate(90, ${D}, ${W})`),B.setAttributeNS(null,"x",D),B.setAttributeNS(null,"y",W)}const x=document.getElementById("xLabelMaxName");if(x){const D=x.getBBox().height/2+m.value.right+m.value.padding*.3,W=m.value.centerY;x.setAttributeNS(null,"transform",`rotate(90, ${D}, ${W})`),x.setAttributeNS(null,"x",D),x.setAttributeNS(null,"y",W)}}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",d)});function d(_){u.value.x=_.clientX,u.value.y=_.clientY}const w=i.computed(()=>{let _=0,B=48;if(l.value&&s.value){const{width:x,height:S}=l.value.getBoundingClientRect(),D=s.value.getBoundingClientRect();u.value.x+x/2>D.right?_=-x:u.value.x-x/2<D.left?_=0:_=-x/2,u.value.y+S>D.bottom&&(B=-S-48)}return{top:u.value.y+B,left:u.value.x+_}}),g=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const _=aa({defaultConfig:A.value,userConfig:n.config});return Aa(_)}),y=i.ref({plotLabels:{show:g.value.style.chart.layout.labels.plotLabels.show},inside:!g.value.style.chart.layout.useDiv,showTable:g.value.table.show}),m=i.computed(()=>{const _=y.value.inside?100:0,B=y.value.inside?100:0,x=48;return{height:g.value.style.chart.height+_+B,usableHeight:g.value.style.chart.height-x*2,width:g.value.style.chart.width,usableWidth:g.value.style.chart.width-x*2,top:_+x,left:x,right:g.value.style.chart.width-x,bottom:g.value.style.chart.height+_-x,centerX:g.value.style.chart.width/2,centerY:g.value.style.chart.height+_-g.value.style.chart.height/2,padding:x}}),F=i.computed(()=>{const _=g.value.style.chart.layout.grid.graduations.steps,B=m.value.usableWidth/(_*2),x=m.value.top,S=[];for(let D=0;D<_;D+=1)S.push({x:m.value.padding+B*D,y:x+m.value.usableHeight*(D/_/2),height:m.value.usableHeight*(1-D/_),width:m.value.usableWidth*(1-D/_),opacity:St[Math.round((D+1)/_*20)]});return S}),N=i.computed(()=>{let _=g.value.style.chart.layout.grid.xAxis.max,B=g.value.style.chart.layout.grid.xAxis.min,x=g.value.style.chart.layout.grid.yAxis.max,S=g.value.style.chart.layout.grid.yAxis.min;return g.value.style.chart.layout.grid.xAxis.auto&&(_=Math.max(...z.value.flatMap(D=>D.series.map(W=>W.x))),B=Math.min(...z.value.flatMap(D=>D.series.map(W=>W.x)))),g.value.style.chart.layout.grid.yAxis.auto&&(x=Math.max(...z.value.flatMap(D=>D.series.map(W=>W.y))),S=Math.min(...z.value.flatMap(D=>D.series.map(W=>W.y)))),{x:{max:_,min:B},y:{max:x,min:S}}}),Q=i.ref([]),z=i.computed(()=>n.dataset.map((_,B)=>({..._,id:`cat_${B}_${a.value}`,color:Nr(_.color)||It[B]}))),R=i.computed(()=>z.value.filter(_=>!Q.value.includes(_.id))),I=i.computed(()=>z.value.map((_,B)=>({..._,shape:_.shape||"circle",series:_.series.map(x=>({...x,x:O(x.x),y:q(x.y),xValue:x.x,yValue:x.y,quadrantSide:se({x:x.x,y:x.y}),categoryName:_.name,shape:_.shape,color:_.color}))}))),U=i.computed(()=>R.value.map((_,B)=>({..._,shape:_.shape||"circle",color:_.color||It[B],series:_.series.map(x=>({...x,x:O(x.x),y:q(x.y),xValue:x.x,yValue:x.y,quadrantSide:se({x:x.x,y:x.y}),categoryName:_.name,shape:_.shape,color:_.color}))})));function O(_){const B=_/N.value.x.max;return m.value.centerX+m.value.usableWidth/2*B}function q(_){const B=_/N.value.y.max;return m.value.centerY+(1-m.value.usableHeight/2*B)}const T=i.computed(()=>{const _=U.value.flatMap(W=>W.series.map(ue=>({x:ue.xValue,y:ue.yValue,name:ue.name,category:ue.categoryName,quadrantSide:ue.quadrantSide,sideName:g.value.style.chart.layout.labels.quadrantLabels[ue.quadrantSide].text,color:W.color,shape:W.shape}))),B=g.value.style.chart.layout.grid.xAxis.name||"x",x=g.value.style.chart.layout.grid.yAxis.name||"y",S=[g.value.translations.category,g.value.translations.item,B,x,g.value.translations.side],D=_.map(W=>[W.category,W.name,W.x,W.y,W.sideName||W.quadrantSide]);return{head:S,body:D}});function L(_,B){let x="";switch(_){case"circle":x=`<span style="color:${B}">●</span>`;break;case"triangle":x=`<span style="color:${B}">▲</span>`;break;case"square":x=`<span style="color:${B}">◼</span>`;break;case"diamond":x=`<span style="color:${B}">◆</span>`;break;case"pentagon":x=`<span style="color:${B}">⬟</span>`;break;case"hexagon":x=`<span style="color:${B}">⬣</span>`;break;case"star":x=`<span style="color:${B}">🟊</span>`;break}return x}const G=i.computed(()=>I.value.map(_=>({name:_.name,shapePath:L(_.shape,_.color),id:_.id})));function Y(_){Q.value.includes(_)?Q.value=Q.value.filter(x=>x!==_):Q.value.push(_);const B=le();r("selectLegend",B)}function se(_){switch(!0){case(_.x>=0&&_.y>=0):return"tr";case(_.x>=0&&_.y<0):return"br";case(_.x<0&&_.y<0):return"bl";case(_.x<0&&_.y>=0):return"tl";default:return""}}function he(_,B){p.value=!0;let x="";B.quadrantSide&&(x+=`<div style="color:${g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].color};font-weight:${g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].bold?"bold":"400"}">${g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}</div>`),x+=`<div>${_.name}</div>`,x+=`<div style="padding-bottom:6px;border-bottom:1px solid #e1e5e8;margin-bottom:3px">${B.name}</div>`,x+=`<div>${g.value.style.chart.layout.grid.xAxis.name?g.value.style.chart.layout.grid.xAxis.name:"x"} : <b>${B.xValue.toFixed(g.value.style.chart.tooltip.roundingValue)}</b></div>`,x+=`<div>${g.value.style.chart.layout.grid.yAxis.name?g.value.style.chart.layout.grid.yAxis.name:"y"} : <b>${B.yValue.toFixed(g.value.style.chart.tooltip.roundingValue)}</b></div>`,h.value=`<div style="text-align:left;font-size:${g.value.style.chart.tooltip.fontSize}px">${x}</div>`}function ge(_,B){const x={category:_.name,itemName:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text};r("selectPlot",x)}function re(_){const B=U.value.flatMap(S=>S.series.filter(D=>D.quadrantSide===_).map(D=>({category:D.categoryName,itemName:D.name,x:D.xValue,y:D.yValue}))),x={quadrantSide:_,sideName:g.value.style.chart.layout.labels.quadrantLabels[_].text,items:[...B]};r("selectSide",x)}function le(){return U.value.map(_=>({color:_.color,name:_.name,shape:_.shape,series:_.series.map(B=>({name:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}))}))}e({getData:le});function fe(){c.value&&c.value.removeAttribute("open")}function Ue(){o.value=!0,i.nextTick(()=>{KA({domElement:document.getElementById(`vue-ui-quadrant_${a.value}`),fileName:g.value.style.chart.title.text||"vue-ui-quadrant"}).finally(()=>{o.value=!1})})}function b(){i.nextTick(()=>{const _=[[g.value.style.chart.title.text],[g.value.style.chart.title.subtitle.text],[""]],B=T.value.head,x=T.value.body,S=_.concat([B]).concat(x);ei(S,g.value.style.chart.title.text||"vue-ui-quadrant")})}return(_,B)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-quadrant",ref_key:"quadrantChart",ref:s,id:`vue-ui-quadrant_${a.value}`,style:i.normalizeStyle(`font-family:${g.value.style.fontFamily};width:100%; text-align:center`)},[(!y.value.inside||o.value)&&g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${g.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.color};font-size:${g.value.style.chart.title.fontSize}px;font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),5),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.subtitle.color};font-size:${g.value.style.chart.title.subtitle.fontSize}px;font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),g.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-quadrant-user-options",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},i.toDisplayString(g.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-quadrant-user-options-items",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},[i.createElementVNode("div",wH,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-plotLabels_${a.value}`,name:`vue-ui-quadrant-option-plotLabels_${a.value}`,"onUpdate:modelValue":B[0]||(B[0]=x=>y.value.plotLabels.show=x)},null,8,BH),[[i.vModelCheckbox,y.value.plotLabels.show]]),i.createElementVNode("label",{for:`vue-ui-quadrant-option-plotLabels_${a.value}`},i.toDisplayString(g.value.userOptions.labels.showPlotLabels),9,xH)]),i.createElementVNode("div",bH,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-title_${a.value}`,name:`vue-ui-quadrant-option-title_${a.value}`,"onUpdate:modelValue":B[1]||(B[1]=x=>y.value.inside=x)},null,8,CH),[[i.vModelCheckbox,y.value.inside]]),i.createElementVNode("label",{for:`vue-ui-quadrant-option-title_${a.value}`},i.toDisplayString(g.value.userOptions.labels.useDiv),9,EH)]),i.createElementVNode("div",_H,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-table_${a.value}`,name:`vue-ui-quadrant-option-table_${a.value}`,"onUpdate:modelValue":B[2]||(B[2]=x=>y.value.showTable=x)},null,8,FH),[[i.vModelCheckbox,y.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-quadrant-option-table_${a.value}`},i.toDisplayString(g.value.userOptions.labels.showTable),9,SH)]),i.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:Ue,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${g.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-quadrant-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:g.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},NH,8,TH)):(i.openBlock(),i.createElementBlock("span",LH,"PDF"))],12,kH),i.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:b,style:i.normalizeStyle(`color:${g.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),onClick:fe},[i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(x,S)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${a.value}_${S}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(x.color,.05)}${i.unref(St)[g.value.style.chart.layout.areas.opacity]}`},null,8,DH),i.createElementVNode("stop",{offset:"100%","stop-color":x.color+i.unref(St)[g.value.style.chart.layout.areas.opacity]},null,8,QH)],8,IH))),256))]),g.value.style.chart.title.text&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",OH,[i.createElementVNode("text",{"font-size":g.value.style.chart.title.fontSize,fill:g.value.style.chart.title.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize+6,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),13,PH),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":g.value.style.chart.title.subtitle.fontSize,fill:g.value.style.chart.title.subtitle.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize*2+6,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),13,MH)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),g.value.style.chart.layout.grid.graduations.show?(i.openBlock(),i.createElementBlock("g",RH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(F.value,x=>(i.openBlock(),i.createElementBlock("rect",{fill:g.value.style.chart.layout.grid.graduations.fill?`${g.value.style.chart.layout.grid.graduations.color}${x.opacity}`:"none",x:x.x,y:x.y,height:x.height,width:x.width,"stroke-width":g.value.style.chart.layout.grid.graduations.strokeWidth,stroke:g.value.style.chart.layout.grid.graduations.stroke,rx:g.value.style.chart.layout.grid.graduations.roundingForce},null,8,HH))),256))])):i.createCommentVNode("",!0),i.createElementVNode("line",{x1:m.value.left,y1:m.value.centerY,x2:m.value.right,y2:m.value.centerY,stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,VH),i.createElementVNode("line",{x1:m.value.centerX,y1:m.value.top,x2:m.value.centerX,y2:m.value.bottom,stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,$H),g.value.style.chart.layout.grid.showArrows?(i.openBlock(),i.createElementBlock("g",zH,[i.createElementVNode("polygon",{points:`${m.value.right-m.value.width*.02},${m.value.centerY-m.value.height*.009} ${m.value.right},${m.value.centerY} ${m.value.right-m.value.width*.02},${m.value.centerY+m.value.height*.009}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,KH),i.createElementVNode("polygon",{points:`${m.value.left+m.value.width*.02},${m.value.centerY-m.value.height*.009} ${m.value.left},${m.value.centerY} ${m.value.left+m.value.width*.02},${m.value.centerY+m.value.height*.009}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,GH),i.createElementVNode("polygon",{points:`${m.value.centerX-m.value.width*.013},${m.value.top+m.value.height*.015} ${m.value.centerX},${m.value.top} ${m.value.centerX+m.value.width*.013},${m.value.top+m.value.height*.015}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,jH),i.createElementVNode("polygon",{points:`${m.value.centerX-m.value.width*.013},${m.value.bottom-m.value.height*.015} ${m.value.centerX},${m.value.bottom} ${m.value.centerX+m.value.width*.013},${m.value.bottom-m.value.height*.015}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,WH)])):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.show?(i.openBlock(),i.createElementBlock("g",XH,[g.value.style.chart.layout.labels.quadrantLabels.tl.text?(i.openBlock(),i.createElementBlock("text",{key:0,x:0,y:m.value.top-m.value.padding/2,"text-anchor":"start",fill:g.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:B[3]||(B[3]=x=>re("tl"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.tl.text),13,qH)):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.tr.text?(i.openBlock(),i.createElementBlock("text",{key:1,x:m.value.width,y:m.value.top-m.value.padding/2,"text-anchor":"end",fill:g.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:B[4]||(B[4]=x=>re("tr"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.tr.text),13,YH)):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.br.text?(i.openBlock(),i.createElementBlock("text",{key:2,x:m.value.width,y:m.value.bottom+m.value.padding*.7,"text-anchor":"end",fill:g.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:B[5]||(B[5]=x=>re("br"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.br.text),13,JH)):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.bl.text?(i.openBlock(),i.createElementBlock("text",{key:3,x:0,y:m.value.bottom+m.value.padding*.7,"text-anchor":"start",fill:g.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:B[6]||(B[6]=x=>re("bl"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.bl.text),13,ZH)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.axisLabels.show?(i.openBlock(),i.createElementBlock("g",eV,[i.createElementVNode("text",{x:m.value.centerX,y:m.value.top-m.value.padding/6,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(N.value.y.max),9,tV),i.createElementVNode("text",{x:m.value.centerX,y:m.value.top-m.value.padding/2,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(g.value.style.chart.layout.grid.yAxis.name),9,rV),i.createElementVNode("text",{x:m.value.centerX,y:m.value.bottom+m.value.padding*.35,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.negative},i.toDisplayString(N.value.y.min),9,nV),i.createElementVNode("text",{id:"xLabelMin","text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.negative},i.toDisplayString(N.value.x.min),9,aV),i.createElementVNode("text",{id:"xLabelMax","text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(N.value.x.max),9,AV),i.createElementVNode("text",{id:"xLabelMaxName","text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(g.value.style.chart.layout.grid.xAxis.name),9,iV)])):i.createCommentVNode("",!0),g.value.style.chart.layout.areas.show?(i.openBlock(),i.createElementBlock("g",oV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(x,S)=>(i.openBlock(),i.createElementBlock("g",null,[x.series.length>2?(i.openBlock(),i.createElementBlock("polygon",{key:0,fill:g.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${a.value}_${S})`:`${x.color}${i.unref(St)[g.value.style.chart.layout.areas.opacity]}`,points:i.unref(qQ)(x)},null,8,sV)):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,x=>(i.openBlock(),i.createElementBlock("g",null,[x.shape==="circle"?(i.openBlock(),i.createElementBlock("g",lV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("circle",{cx:S.x,cy:S.y,r:g.value.style.chart.layout.plots.radius*.8,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[7]||(B[7]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,cV))),256))])):i.createCommentVNode("",!0),x.shape==="triangle"?(i.openBlock(),i.createElementBlock("g",uV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:3,rotation:.52}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[8]||(B[8]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,hV))),256))])):i.createCommentVNode("",!0),x.shape==="square"?(i.openBlock(),i.createElementBlock("g",fV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:4,rotation:.8}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[9]||(B[9]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,dV))),256))])):i.createCommentVNode("",!0),x.shape==="diamond"?(i.openBlock(),i.createElementBlock("g",gV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:4,rotation:0}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[10]||(B[10]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,pV))),256))])):i.createCommentVNode("",!0),x.shape==="pentagon"?(i.openBlock(),i.createElementBlock("g",mV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:5,rotation:.95}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[11]||(B[11]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,yV))),256))])):i.createCommentVNode("",!0),x.shape==="hexagon"?(i.openBlock(),i.createElementBlock("g",vV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:6,rotation:0}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[12]||(B[12]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,wV))),256))])):i.createCommentVNode("",!0),x.shape==="star"?(i.openBlock(),i.createElementBlock("g",BV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("polygon",{points:i.unref(Xh)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius}),fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[13]||(B[13]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,xV))),256))])):i.createCommentVNode("",!0)]))),256)),y.value.plotLabels.show?(i.openBlock(),i.createElementBlock("g",bV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,x=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("text",{x:S.x,y:S.y+g.value.style.chart.layout.labels.plotLabels.offsetY+g.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.plotLabels.fontSize,fill:g.value.style.chart.layout.labels.plotLabels.color},i.toDisplayString(S.name),9,CV))),256))]))),256))])):i.createCommentVNode("",!0),g.value.style.chart.legend.show&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:7,x:0,y:m.value.bottom+36,width:"100%",height:"90",style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-quadrant-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(x,S)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:D=>Y(x.id),style:i.normalizeStyle(`opacity:${Q.value.includes(x.id)?.5:1}`)},[i.createElementVNode("div",{innerHTML:x.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,FV),i.createElementVNode("span",null,i.toDisplayString(x.name),1)],12,_V))),256))],4)],8,EV)):i.createCommentVNode("",!0)],12,UH)),g.value.style.chart.legend.show&&(!y.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-quadrant-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};background:${g.value.style.chart.legend.backgroundColor};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(x,S)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:D=>Y(x.id),style:i.normalizeStyle(`opacity:${Q.value.includes(x.id)?.5:1}`)},[i.createElementVNode("div",{innerHTML:x.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,kV),i.createElementVNode("span",null,i.toDisplayString(x.name),1)],12,SV))),256))],4)):i.createCommentVNode("",!0),g.value.style.chart.tooltip.show&&p.value?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-quadrant-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${w.value.top}px;left:${w.value.left}px;background:${g.value.style.chart.tooltip.backgroundColor};color:${g.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,TV)):i.createCommentVNode("",!0),y.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:fe,class:"vue-ui-quadrant-table",style:i.normalizeStyle(`width:100%;margin-top:${y.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",NV,[i.createElementVNode("th",{colspan:5,style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(g.value.style.chart.title.text),1),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",LV," : "+i.toDisplayString(g.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value.head,x=>(i.openBlock(),i.createElementBlock("th",{style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("div",UV,i.toDisplayString(x),1)],4))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value.body,x=>(i.openBlock(),i.createElementBlock("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x,S=>(i.openBlock(),i.createElementBlock("td",{style:i.normalizeStyle(`background:${g.value.table.td.backgroundColor};color:${g.value.table.td.color};outline:${g.value.table.td.outline}`)},i.toDisplayString(isNaN(S)?S:S.toFixed(g.value.table.td.roundingValue)),5))),256))]))),256))])])],4)):i.createCommentVNode("",!0)],12,vH))}},[["__scopeId","data-v-c200bf52"]]),voe="",DV=["id"],QV={class:"vue-ui-gauge-user-option-item"},OV=["id","name"],PV=["for"],MV=["disabled"],RV=["stroke"],HV=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-77e98d1e></path><path d="M18 16v.01" data-v-77e98d1e></path><path d="M6 16v.01" data-v-77e98d1e></path><path d="M12 5v.01" data-v-77e98d1e></path><path d="M12 12v.01" data-v-77e98d1e></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-77e98d1e></path>',6)],VV={key:1},$V=["viewBox"],zV=["id"],KV=["stop-color"],GV=["stop-color"],jV=["stop-color"],WV={key:0},XV=["font-size","fill","x","y"],qV=["font-size","fill","x","y"],YV=["font-size","fill","x","y"],JV=["d","stroke","stroke-width"],ZV={key:1},e$=["cx","cy","fill"],t$=["cx","cy","r","fill"],r$=["y","width","height","fill"],n$=["cx","cy","r","fill","stroke","stroke-width"],a$=["cx","cy","r","fill","stroke","stroke-width"],A$=["x","y","font-size","font-weight","fill"],i$=["x","y","font-size","font-weight","fill"],o$=["x1","y1","x2","y2","stroke","stroke-width"],s$=["x1","y1","x2","y2","stroke","stroke-width"],l$=["cx","cy","fill","r","stroke-width","stroke"],c$=["x","y","font-size","fill"],u$=Da({__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(t){const e=t,r=i.ref(`vue-ui-gauge-${Math.random()}`),n=i.ref(wa.vue_ui_gauge),a=i.ref(!1),A=i.ref(null),o=i.ref(null),s=i.computed(()=>{if(!Object.keys(e.config||{}).length)return n.value;const R=aa({defaultConfig:n.value,userConfig:e.config});return Aa(R)}),l=i.ref({inside:!s.value.style.chart.layout.useDiv}),c=i.computed(()=>{const R=[];e.dataset.series.forEach(U=>{R.push(U.from),R.push(U.to)});const I=Math.max(...R);return{...e.dataset,series:e.dataset.series.map((U,O)=>({...U,color:Nr(U.color)||It[O],value:(U.to-U.from)/I*100}))}}),u=i.computed(()=>({height:l.value.inside?512:358.4,width:512,top:l.value.inside?76.8:0,bottom:l.value.inside?435.2:358.4,centerX:l.value.inside?256:179.2,centerY:256})),p=i.ref(0),h=i.ref(0),d=i.ref(s.value.style.chart.animation.use?0:e.dataset.value),w=i.computed(()=>{const R=u.value.width/2,I=u.value.height*.69,U=Math.PI*((d.value+0-h.value)/(p.value-h.value))+Math.PI;return{x1:R,y1:I,x2:R+u.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.cos(U),y2:I+u.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.sin(U)}}),g=i.computed(()=>{for(let R=0;R<c.value.series.length;R+=1){const{color:I,from:U,to:O}=c.value.series[R];if(d.value>=U&&d.value<=O)return I}return"#2D353C"});i.onMounted(()=>{const R=[];c.value.series.forEach(L=>{R.push(L.from),R.push(L.to)}),p.value=Math.max(...R),h.value=Math.min(...R);const I=String(p.value).length;let U=0,O=(I>2?.01:.001)*s.value.style.chart.animation.speed,q=(I>2?.05:.005)*s.value.style.chart.animation.acceleration;function T(){d.value+=O+U,U+=q,d.value<e.dataset.value?requestAnimationFrame(T):d.value=e.dataset.value}s.value.style.chart.animation.use&&(d.value=h.value,T())});function y([R,I],[U,O],[q,T],L){T=T%Math.PI;const G=ax(L),[Y,se]=jh(Wh(G,[U*Math.cos(q),O*Math.sin(q)]),[R,I]),[he,ge]=jh(Wh(G,[U*Math.cos(q+T),O*Math.sin(q+T)]),[R,I]),re=T>Math.PI?1:0,le=T>0?1:0;return{startX:Y,startY:se,endX:he,endY:ge,path:`M${Y} ${se} A ${[U,O,L/(2*Math.PI)*180,re,le,he,ge].join(" ")}`}}function m(R,I,U,O,q){let{series:T}=R;if(R.base||(R.base=1),!T||R.base===0)return{...T,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const L=[...T].map(se=>se.value).reduce((se,he)=>se+he,0),G=[];let Y=0;for(let se=0;se<T.length;se+=1){let he=T[se].value/L;const ge=he*(Math.PI*.975),le=T[se].value/2/L*Math.PI,{startX:fe,startY:Ue,endX:b,endY:_,path:B}=y([I,U],[O,q],[Y,ge],110);G.push({...T[se],proportion:he,ratio:ge,path:B,startX:fe,startY:Ue,endX:b,endY:_,center:y([I,U],[O,q],[Y,le],110)}),Y+=ge}return G}function F(R,I,U){const q=String(U).length>2?-3:0;return R===0?I+14+q:I+9+q}function N(R){return String(R).length>2?15:20}function Q(){a.value=!0,KA({domElement:document.getElementById(`vue-ui-gauge_${r.value}`),fileName:s.value.style.chart.title.text||"vue-ui-gauge"}).finally(()=>{a.value=!1})}function z(){o.value&&o.value.removeAttribute("open")}return(R,I)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-gauge",ref_key:"gaugeChart",ref:A,id:`vue-ui-gauge_${r.value}`,style:i.normalizeStyle(`font-family:${s.value.style.fontFamily};width:100%; text-align:center`)},[(!l.value.inside||a.value)&&s.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${s.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.color};font-size:${s.value.style.chart.title.fontSize}px;font-weight:${s.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.text),5),s.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0),isNaN(t.dataset.base)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.translations.base)+" : "+i.toDisplayString(t.dataset.base),5))],4)):i.createCommentVNode("",!0),s.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-gauge-user-options",style:i.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:o},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},i.toDisplayString(s.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-gauge-user-options-items",style:i.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},[i.createElementVNode("div",QV,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-gauge-option-title_${r.value}`,name:`vue-ui-gauge-option-title_${r.value}`,"onUpdate:modelValue":I[0]||(I[0]=U=>l.value.inside=U)},null,8,OV),[[i.vModelCheckbox,l.value.inside]]),i.createElementVNode("label",{for:`vue-ui-gauge-option-title_${r.value}`},i.toDisplayString(s.value.userOptions.labels.useDiv),9,PV)]),i.createElementVNode("button",{class:"vue-ui-gauge-button",onClick:Q,disabled:a.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${s.value.style.chart.color}`])},[a.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-gauge-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:s.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},HV,8,RV)):(i.openBlock(),i.createElementBlock("span",VV,"PDF"))],12,MV)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),onClick:z},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{id:`gradient_${r.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[i.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${i.unref(St)[1]}`},null,8,KV),i.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${i.unref(St)[s.value.style.chart.layout.track.gradientIntensity]}`},null,8,GV),i.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${i.unref(St)[1]}`},null,8,jV)],8,zV)]),s.value.style.chart.title.text&&l.value.inside&&!a.value?(i.openBlock(),i.createElementBlock("g",WV,[i.createElementVNode("text",{"font-size":s.value.style.chart.title.fontSize*1.5,fill:s.value.style.chart.title.color,x:u.value.width/2,y:s.value.style.chart.title.fontSize*1.5+20,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${s.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.text),13,XV),s.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:u.value.width/2,y:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.subtitle.text),13,qV)):i.createCommentVNode("",!0),isNaN(t.dataset.base)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("text",{key:1,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:u.value.width/2,y:s.value.style.chart.title.subtitle.text?s.value.style.chart.title.fontSize*2.3*2+20:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.translations.base)+" : "+i.toDisplayString(t.dataset.base),13,YV))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m(c.value,u.value.width/2,u.value.height*.7,u.value.width/2.5,u.value.width/2.5),(U,O)=>(i.openBlock(),i.createElementBlock("path",{key:`arc_${O}`,d:U.path,fill:"none",stroke:U.color,"stroke-linecap":"round","stroke-width":u.value.width/16*s.value.style.chart.layout.track.size},null,8,JV))),128)),s.value.style.chart.layout.track.useGradient?(i.openBlock(),i.createElementBlock("g",ZV,[i.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height*.69,r:"225",fill:`url(#gradient_${r.value})`,stroke:"none"},null,8,e$),i.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height*.69+4,r:188*1/s.value.style.chart.layout.track.size,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,t$),i.createElementVNode("rect",{x:0,y:u.value.height*.69,width:u.value.width,height:u.value.height-u.value.height*.69,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,r$)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m(c.value,u.value.width/2,u.value.height*.7,u.value.width/2.5,u.value.width/2.5),(U,O)=>(i.openBlock(),i.createElementBlock("circle",{cx:U.center.startX,cy:O===0?U.center.startY+5:U.center.startY,r:u.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,n$))),256)),i.createElementVNode("circle",{cx:u.value.width*.9,cy:u.value.height*.69,r:u.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,a$),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m(c.value,u.value.width/2,u.value.height*.7,u.value.width/2.5,u.value.width/2.5),(U,O)=>(i.openBlock(),i.createElementBlock("text",{x:U.center.startX,y:F(O,U.center.startY,U.from)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":N(U.from)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},i.toDisplayString(U.from.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,A$))),256)),i.createElementVNode("text",{x:u.value.width*.9,y:F(1,u.value.height*.69,p.value)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":N(p.value)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},i.toDisplayString(p.value.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,i$),isNaN(w.value.x2)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("line",{key:2,x1:w.value.x1,y1:w.value.y1,x2:w.value.x2,y2:w.value.y2,stroke:s.value.style.chart.layout.pointer.stroke,"stroke-width":s.value.style.chart.layout.pointer.strokeWidth,"stroke-linecap":"round"},null,8,o$)),isNaN(w.value.x2)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("line",{key:3,x1:w.value.x1,y1:w.value.y1,x2:w.value.x2,y2:w.value.y2,stroke:s.value.style.chart.layout.pointer.useRatingColor?g.value:s.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":s.value.style.chart.layout.pointer.strokeWidth*.7},null,8,s$)),i.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height*.69,fill:s.value.style.chart.layout.pointer.circle.color,r:s.value.style.chart.layout.pointer.circle.radius,"stroke-width":s.value.style.chart.layout.pointer.circle.strokeWidth,stroke:s.value.style.chart.layout.pointer.circle.stroke},null,8,l$),i.createElementVNode("text",{x:u.value.width/2,y:u.value.height*.9,"text-anchor":"middle","font-size":s.value.style.chart.legend.fontSize,"font-weight":"bold",fill:s.value.style.chart.legend.useRatingColor?g.value:s.value.style.chart.legend.color},i.toDisplayString(s.value.style.chart.legend.prefix)+" "+i.toDisplayString(s.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":"")+i.toDisplayString(d.value.toFixed(s.value.style.chart.legend.roundingValue))+" "+i.toDisplayString(s.value.style.chart.legend.suffix),9,c$)],12,$V))],12,DV))}},[["__scopeId","data-v-77e98d1e"]]),xoe="",h$=["id"],f$={class:"vue-ui-chestnut-user-option-item"},d$=["id","name"],g$=["for"],p$=["disabled"],m$=["stroke"],y$=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-6650dd2d></path><path d="M18 16v.01" data-v-6650dd2d></path><path d="M6 16v.01" data-v-6650dd2d></path><path d="M12 5v.01" data-v-6650dd2d></path><path d="M12 12v.01" data-v-6650dd2d></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-6650dd2d></path>',6)],v$={key:1},w$=["viewBox"],B$={key:0},x$=["fill","font-weight","font-size","x","y"],b$=["fill","font-weight","font-size","x","y"],C$=["id"],E$=["stop-color"],_$=["stop-color"],F$=["id"],S$=["stop-color"],k$=["stop-color"],T$=["id"],N$=["stop-color"],L$=["stop-color"],U$=["stop-color"],I$=["id"],D$=["stop-color"],Q$=["stop-color"],O$=["stop-color"],P$=["id"],M$=["stop-color"],R$=["stop-color"],H$=["stop-color"],V$={key:1},$$=["x","y","font-size","font-weight","fill"],z$=["x","y","font-size","font-weight","fill"],K$=["d","stroke"],G$=["cx","cy","r","fill"],j$=["cx","cy","r","fill","stroke","stroke-width","onClick"],W$={key:2},X$=["x","y","font-size","fill","onClick"],q$={key:0},Y$=["x","y","fill","font-size","font-weight"],J$=["x","y","height","width","fill","rx","onClick"],Z$=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],ez={key:3},tz=["x","y","fill","font-size","onClick"],rz=["d","stroke"],nz=["cx","cy","fill","onClick"],az=["fill","cx","cy","r","onClick"],Az={key:4},iz=["x","y","font-size","font-weight","fill"],oz=["x1","x2","y1","y2","stroke","stroke-width"],sz=["y","height","width"],lz={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},cz={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},uz={viewBox:"0 0 20 20",height:"16",width:"16"},hz=["fill"],fz={key:6},dz=["y","height","width"],gz={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},pz={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},mz={viewBox:"0 0 20 20",height:"16",width:"16"},yz=["fill"],vz=["cx","cy","fill"],wz=["cx","cy","fill"],Bz=["d","stroke"],xz=["cx","cy","fill"],bz=["cx","cy","fill"],Cz=["d","stroke"],Ez=["x","y","fill","font-size","font-weight"],_z=["x","y","fill","font-size","font-weight"],Fz=["x","text-anchor","y","fill","font-size"],Sz=["x","text-anchor","y","fill","font-size"],kz=["x","text-anchor","y","fill","font-size"],Tz=["x","text-anchor","y","fill","font-size"],Nz=["x","text-anchor","y","fill","font-size"],Lz=["x","y","font-size","fill"],Uz=["x","y","font-size","fill"],Iz=["x","y","font-size","fill"],Dz={key:0},Qz={key:0},Oz={key:0},Pz={key:1},Mz={key:0},Rz={key:1},Hz={key:0},Vz={key:1},$z={key:0},zz={key:1},Kz={key:0},Gz={key:1},jz={key:0},Wz={key:1},Xz={key:0},qz={key:1},Yz=Da({__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-chestnut-${Math.random()}`),A=i.ref(wa.vue_ui_chestnut),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0});i.ref(!1),i.ref(""),i.onMounted(()=>{document.addEventListener("mousemove",p)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",p)});function p(de){u.value.x=de.clientX,u.value.y=de.clientY}i.computed(()=>{let de=0,ke=48;if(l.value&&radarChart.value){const{width:ne,height:Ee}=l.value.getBoundingClientRect(),xe=radarChart.value.getBoundingClientRect();u.value.x+ne/2>xe.right?de=-ne:u.value.x-ne/2<xe.left?de=0:de=-ne/2,u.value.y+Ee>xe.bottom&&(ke=-Ee-48)}return{top:u.value.y+ke,left:u.value.x+de}});const h=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const de=aa({defaultConfig:A.value,userConfig:n.config});return Aa(de)}),d=i.ref({showTable:h.value.table.show}),w=i.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),g=i.computed(()=>({left:w.value.padding.left,top:w.value.padding.top,right:w.value.width-w.value.padding.right,bottom:w.value.height-w.value.padding.bottom,width:w.value.width-(w.value.padding.left+w.value.padding.right),height:w.value.height-(w.value.padding.top+w.value.padding.bottom),seedX:w.value.padding.left+64})),y=i.computed(()=>n.dataset.flatMap(de=>de.branches.map(ke=>ke.value)).reduce((de,ke)=>de+ke)),m=i.computed(()=>n.dataset.map((de,ke)=>{const ne=de.branches.map(Ee=>Ee.value).reduce((Ee,xe)=>Ee+xe);return{...de,color:Nr(de.color)||It[ke]||It[ke%It.length],id:de.id||`root_${ke}_${a.value}`,type:"root",total:ne,rootIndex:ke,branches:de.branches.map((Ee,xe)=>({...Ee,rootName:de.name,rootIndex:ke,color:Nr(de.color)||It[ke]||It[ke%It.length],value:Ee.value>=0?Ee.value:0,id:Ee.id||`branch_${ke}_${xe}_${a.value}`,proportionToRoot:Ee.value/ne,type:"branch",breakdown:Ee.breakdown.map((te,Pe)=>({table:{rootName:de.name,rootValue:ne,rootToTotal:ne/y.value,branchName:Ee.name,branchValue:Ee.value,branchToTotal:Ee.value/y.value,branchToRoot:Ee.value/ne,nutName:te.name,nutValue:te.value,nutToTotal:te.value/y.value,nutToRoot:te.value/ne,nutToBranch:te.value/Ee.value},...te,type:"nut",branchName:Ee.name,rootName:de.name,branchTotal:Ee.value>=0?Ee.value:0,proportionToBranch:te.value/Ee.value,proportionToRoot:te.value/ne,proportionToTree:te.value/y.value,rootIndex:ke,id:te.id||`nut_${ke}_${xe}_${Pe}_${a.value}`,color:Nr(te.color)||It[Pe]||It[Pe%It.length],value:te.value>=0?te.value:0}))}))}}));function F(){return m.value}e({getData:F});const N=i.computed(()=>m.value.flatMap(de=>de.branches).length),Q=i.computed(()=>Math.max(...m.value.map(de=>de.branches.map(ke=>ke.value).reduce((ke,ne)=>ke+ne,0)))),z=i.computed(()=>Math.max(...m.value.flatMap(de=>de.branches.map(ke=>ke.value)))),R=i.computed(()=>256+w.value.padding.left),I=i.computed(()=>m.value.sort((de,ke)=>ke.total-de.total).map((de,ke)=>{const ne=g.value.height/m.value.length/2,Ee=de.total/Q.value*(ne>64?64:ne);return{...de,x:g.value.seedX,y:g.value.top+g.value.height/m.value.length*(ke+1)-(g.value.height/m.value.length/2+w.value.gap/2),r:Ee<w.value.branchSize/2?w.value.branchSize/2:Ee}})),U=i.computed(()=>h.value.style.chart.layout.branches.widthRatio<=0?.1:h.value.style.chart.layout.branches.widthRatio>1.8?1.8:h.value.style.chart.layout.branches.widthRatio),O=i.computed(()=>I.value.flatMap(de=>de.branches)),q=i.computed(()=>O.value.sort((de,ke)=>ke.value-de.value).map((de,ke)=>({...de,y1:ke*w.value.branchSize+g.value.top+ke*w.value.gap,y2:ke*w.value.branchSize+w.value.branchSize,x1:R.value,x2:384*de.value/z.value*U.value+R.value})));function T(de){const ke=I.value.find(ne=>ne.rootIndex===de.rootIndex);return{x:ke.x,y:ke.y,r:ke.r}}const L=i.ref(null),G=i.ref(null),Y=i.ref(null),se=i.ref(null);function he(){L.value=null,Y.value=null,se.value=null}i.computed(()=>L.value?L.value.rootIndex:null);function ge(de){return se.value?se.value===null?!0:de.type==="root"?de.id===se.value.id:de.rootIndex===se.value.rootIndex:L.value===null&&Y.value===null?!0:de.type==="nut"?L.value.id===de.id:de.type==="branch"?Y.value.id===de.id:de.type==="root"?Y.value&&Y.value.rootIndex===de.rootIndex||L.value&&L.value.rootIndex===de.rootIndex:!1}function re(de){he(),i.nextTick(()=>{L.value=de,Y.value=de,G.value=Gh({series:de.breakdown,base:1},de.x2+24+h.value.style.chart.layout.nuts.offsetX,de.y1+w.value.branchSize/2,80,80),r("selectNut",de.breakdown)})}function le(){L.value=null,G.value=null,r("selectNut",null)}function fe(de){Y.value&&Y.value.id===de.id?(Y.value=null,he(),r("selectBranch",null)):(he(),Y.value=de,r("selectBranch",de))}function Ue(de){se.value&&se.value.id===de.id?(he(),r("selectRoot",null)):(he(),se.value=de,r("selectRoot",de))}function b(de,ke=!1){let ne=0,Ee=ke?16:0,xe="middle";return de.center.endX>de.cx?(ne=de.center.endX+16+Ee,xe="start"):de.center.endX<de.cx?(ne=de.center.endX-16-Ee,xe="end"):(ne=de.centerX+Ee,xe="middle"),{x:ne,anchor:xe}}function _(de){return de.center.endY>de.cy?de.center.endY+16:de.center.endY<de.cy?de.center.endY-32:de.center.endY}function B(){return g.value.bottom-(L.value.y1+180)<0?0:g.value.bottom}function x(de){const ke=`M${b(de).x},${_(de)-4} `,ne=` ${de.center.endX},${de.center.endY}`;let Ee="";return de.center.endX>de.cx?Ee=`${b(de).x-12},${_(de)-4}`:de.center.endX<de.cx?Ee=`${b(de).x+12},${_(de)-4}`:Ee=`${b(de).x+12},${_(de)-4}`,`${ke}${Ee}${ne}`}function S(de){return de.proportion*100>h.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}i.onMounted(()=>{const de=N.value*(w.value.branchSize+w.value.gap)+w.value.padding.top+w.value.padding.bottom;w.value.height=de});function D(){o.value=!0,KA({domElement:document.getElementById(`vue-ui-chestnut_${a.value}`),fileName:h.value.style.chart.layout.title.text||"vue-ui-chestnut"}).finally(()=>{o.value=!1})}const W=i.computed(()=>{const de=[h.value.table.th.translations.rootName,h.value.table.th.translations.rootValue,h.value.table.th.translations.rootToTotal,h.value.table.th.translations.branchName,h.value.table.th.translations.branchValue,h.value.table.th.translations.branchToRoot,h.value.table.th.translations.branchToTotal,h.value.table.th.translations.nutName,h.value.table.th.translations.nutValue,h.value.table.th.translations.nutToBranch,h.value.table.th.translations.nutToRoot,h.value.table.th.translations.nutToTotal],ke=m.value.flatMap((ne,Ee)=>ne.branches.flatMap((xe,te)=>xe.breakdown.flatMap((Pe,rt)=>Pe.table)));return{head:de,body:ke}});function ue(){i.nextTick(()=>{const de=[[h.value.style.chart.layout.title.text],[h.value.style.chart.layout.title.subtitle.text],[""],["Grand total",y.value],[""]],ke=W.value.head,ne=W.value.body.map((xe,te)=>[W.value.body[te-1]&&W.value.body[te-1].rootName===xe.rootName?"":xe.rootName,W.value.body[te-1]&&W.value.body[te-1].rootName===xe.rootName?"":xe.rootValue,W.value.body[te-1]&&W.value.body[te-1].rootName===xe.rootName?"":xe.rootToTotal,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchName,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchValue,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchToRoot,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchToTotal,xe.nutName,xe.nutValue,xe.nutToBranch,xe.nutToRoot,xe.nutToTotal]),Ee=de.concat([ke]).concat(ne);ei(Ee,h.value.style.chart.layout.title.text||"vue-ui-chestnut")})}function Ce(de){de.target&&de.target.tagName==="svg"&&he(),c.value&&c.value.removeAttribute("open")}return(de,ke)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-chestnut",ref_key:"chestnutChart",ref:s,id:`vue-ui-chestnut_${a.value}`,style:i.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[h.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:0,class:"vue-ui-chestnut-user-options",style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},i.toDisplayString(h.value.userOptions.title),5),i.createElementVNode("div",f$,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-chestnut-option-table_${a.value}`,name:`vue-ui-chestnut-option-table_${a.value}`,"onUpdate:modelValue":ke[0]||(ke[0]=ne=>d.value.showTable=ne)},null,8,d$),[[i.vModelCheckbox,d.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-chestnut-option-table_${a.value}`},i.toDisplayString(h.value.userOptions.labels.showTable),9,g$)]),i.createElementVNode("div",{class:"vue-ui-chestnut-user-options-items",style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[i.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:D,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${h.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-chestnut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},y$,8,m$)):(i.openBlock(),i.createElementBlock("span",v$,"PDF"))],12,p$),i.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:ue,style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),w.value.height>0?(i.openBlock(),i.createElementBlock("svg",{key:1,viewBox:`0 0 ${w.value.width} ${w.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:Ce},[L.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("g",B$,[h.value.style.chart.layout.title.text?(i.openBlock(),i.createElementBlock("text",{key:0,"text-anchor":"middle",fill:h.value.style.chart.layout.title.color,"font-weight":h.value.style.chart.layout.title.bold?"bold":"normal","font-size":h.value.style.chart.layout.title.fontSize,x:w.value.width/2,y:12+h.value.style.chart.layout.title.fontSize+h.value.style.chart.layout.title.offsetY,onClick:he},i.toDisplayString(h.value.style.chart.layout.title.text),9,x$)):i.createCommentVNode("",!0),h.value.style.chart.layout.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"middle",fill:h.value.style.chart.layout.title.subtitle.color,"font-weight":h.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":h.value.style.chart.layout.title.subtitle.fontSize,x:w.value.width/2,y:48+h.value.style.chart.layout.title.subtitle.fontSize+h.value.style.chart.layout.title.subtitle.offsetY,onClick:he},i.toDisplayString(h.value.style.chart.layout.title.subtitle.text),9,b$)):i.createCommentVNode("",!0)])),i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,(ne,Ee)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${a.value}_${ne.rootIndex}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(ne.color,.05)}${i.unref(St)[100-h.value.style.chart.layout.roots.gradientIntensity]}`},null,8,E$),i.createElementVNode("stop",{offset:"100%","stop-color":ne.color},null,8,_$)],8,C$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,ne=>(i.openBlock(),i.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${a.value}_${ne.rootIndex}`},[i.createElementVNode("stop",{offset:"0%","stop-color":ne.color},null,8,S$),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(ZA)(ne.color,.02)}${i.unref(St)[100-h.value.style.chart.layout.branches.gradientIntensity]}`},null,8,k$)],8,F$))),256)),i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${i.unref(St)[0]}`},null,8,N$),i.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${i.unref(St)[h.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,L$),i.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${i.unref(St)[0]}`},null,8,U$)],8,T$),i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${i.unref(St)[0]}`},null,8,D$),i.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${i.unref(St)[h.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Q$),i.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${i.unref(St)[0]}`},null,8,O$)],8,I$),i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${h.value.style.chart.backgroundColor}${i.unref(St)[100]}`},null,8,M$),i.createElementVNode("stop",{offset:"80%","stop-color":`${h.value.style.chart.backgroundColor}${i.unref(St)[60]}`},null,8,R$),i.createElementVNode("stop",{offset:"100%","stop-color":`${h.value.style.chart.backgroundColor}${i.unref(St)[0]}`},null,8,H$)],8,P$)]),h.value.style.chart.layout.grandTotal.show?(i.openBlock(),i.createElementBlock("g",V$,[i.createElementVNode("text",{x:g.value.seedX,y:32+h.value.style.chart.layout.grandTotal.offsetY,"font-size":h.value.style.chart.layout.grandTotal.fontSize,"font-weight":h.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:h.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:he},i.toDisplayString(h.value.style.chart.layout.grandTotal.text),9,$$),i.createElementVNode("text",{x:g.value.seedX,y:38+h.value.style.chart.layout.grandTotal.fontSize+h.value.style.chart.layout.grandTotal.offsetY,"font-size":h.value.style.chart.layout.grandTotal.fontSize,"font-weight":h.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:h.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:he},i.toDisplayString(h.value.style.chart.layout.grandTotal.prefix)+" "+i.toDisplayString(y.value.toFixed(h.value.style.chart.layout.grandTotal.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.grandTotal.suffix),9,z$)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(w.value.branchSize,(Ee,xe)=>(i.openBlock(),i.createElementBlock("path",{d:`M
373
+ }`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,n=e/r,a=Math.max(...this.currentSelectionSpan.rows.map(h=>h.value)),A=Math.min(...this.currentSelectionSpan.rows.map(h=>h.value)),o=A>=0?0:Math.abs(A),s=a+o,l=a<0&&A<0,c=this.dataset.header[this.currentSelectionSpan.col].isPercentage,u=this.currentSelectionSpan.rows.map((h,d)=>({x:n*d+n/2,y:(1-(h.value+o)/s)*t,value:c?h.value*100:h.value,suffix:c?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:h.index,absoluteValue:c?Math.abs(h.value)*100:Math.abs(h.value)})),p=t-t*(o/s);return{isAllNegative:l,zero:p,plots:u,slot:n,progression:u.length>=2?this.calcLinearProgression(u):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){if(!Object.keys(this.config||{}).length)return this.defaultConfig;const t=this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config});return this.convertConfigColors(t)},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:aa,makeDonut:Gh,convertColorToHex:Nr,convertConfigColors:Aa,makeXls:ei,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((n,a)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(A=>A.index).includes(a)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,a)=>Math.abs(n)+Math.abs(a),0),absoluteValue:this.visibleRows.filter((n,a)=>n.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(A=>A.index).includes(a)).map(n=>n.td[this.currentSelectionSpan.col]).reduce((n,a)=>n+a,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(a=>a.name),r=t==="all"?this.bodyCopy.map(a=>a.td):this.visibleRows.map(a=>a.td),n=[e].concat(r);this.makeXls(n,"vue-ui-table")},calcLinearProgression:ix,closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(n=>n===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),n=new Date(this.dates[e].from),a=new Date(this.dates[e].to);if(r<n||r>a)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(h=>new Date(h.td[t])),r=new Date(Math.min(...e)),n=new Date(Math.max(...e)),a=r.getFullYear(),A=n.getFullYear(),o=String(r.getMonth()+1).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0"),c=String(n.getDate()).padStart(2,"0"),u=`${a}-${o}-${l}`,p=`${A}-${s}-${c}`;return{from:u,to:p}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,n=e.isSearch,a=e.isMultiselect&&this.multiselects[t],A=e.rangeFilter,o=s=>{if(A&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&n&&a&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(r&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&n&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&o(t);if(r&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&a&&A)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(r&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&a&&A)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(n&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(n&&A)return["",void 0].includes(this.searches[t])&&o(t);if(n)return["",void 0].includes(this.searches[t]);if(r&&A)return[void 0].includes(this.sorts[t])&&o(t);if(r)return[void 0].includes(this.sorts[t]);if(a&&A)return this.multiselects[t].length===this.getDropdownOptions(t).length&&o(t);if(a)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,n=40,a=37,A=39;if(![r,n,a,A].includes(e))return;const o=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,l=o.match(s),c=parseInt(l[1]),u=parseInt(l[2]),p=document.getElementById(`cell_${c}_${u+1}_${this.uid}`),h=document.getElementById(`cell_${c}_${u-1}_${this.uid}`),d=document.getElementById(`cell_${c+1}_${u}_${this.uid}`),w=document.getElementById(`cell_${c-1}_${u}_${this.uid}`);let g;switch(!0){case e===A:g=p;break;case e===a:g=h;break;case e===r:g=w;break;case e===n:g=d;break;default:return}g&&(g.focus(),g.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const n=e.y-38,a=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?n:t.value>e.value&&r.value>e.value?a:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,n):t&&!r?t.value>e.value?a:n:!t&&r&&r.value>e.value?a:n},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,n)=>{if(r.isSearch&&Object.assign(this.searches,{[n]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[n]:this.getDropdownOptions(n)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[n]:this.getDatesRange(n)}),Object.assign(this.filteredDatesIndexes,{[n]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[n]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(a=>a.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(a=>a.td).map(a=>a[n]))),max:Math.round(Math.max(...this.dataset.body.map(a=>a.td).map(a=>a[n])))}}),Object.assign(this.immutableRangeFilters,{[n]:{min:Math.round(Math.min(...this.dataset.body.map(a=>a.td).map(a=>a[n]))),max:Math.round(Math.max(...this.dataset.body.map(a=>a.td).map(a=>a[n])))}})),r.isPercentage){const a=this.dataset.header.map(o=>o.name).indexOf(r.percentageTo),A=this.dataset.body.map(o=>o.td[a]).reduce((o,s)=>o+s,0);e.push([n,a,A])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[n]:this.includesNaN(this.dataset.body.map(a=>Number(a.td[n])))})}),this.bodyCopy.forEach((r,n)=>{e.map(a=>{const[A,o,s]=a;r.td[A]=r.td[o]/s}),r.td.forEach((a,A)=>{this.dataset.header[A].type===this.constants.TEXT&&this.dataset.header[A].isSearch&&(r[A]=this.stringToNumber(a)),this.dataset.header[A].type===this.constants.DATE&&(r[A]=new Date(a).getTime()),this.dataset.header[A].type===this.constants.NUMERIC&&(r[A]=isNaN(Number(a))?A:a),this.tableBody[n][A]=r[A]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,n)=>{t().then(a=>{try{const A=e(a);r(A)}catch(A){n(A)}}).catch(a=>{n(a)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:n,event:a}){if(n!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const A=a.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(o=>o.index).includes(e)?(A.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(o=>o.index!==e),a.currentTarget.classList.remove(this.cssClass.CELL),Array.from(A.children).forEach((o,s)=>{o.dataset.row==="even"?(o.style.background=this.tableConfig.style.rows.even.backgroundColor,o.style.color=this.tableConfig.style.rows.even.olor):(o.style.background=this.tableConfig.style.rows.odd.backgroundColor,o.style.color=this.tableConfig.style.rows.odd.color)}),a.currentTarget.dataset.row==="even"?(a.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.even.color):(a.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(A.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(A.children).forEach((o,s)=>{o.dataset.row==="even"?(o.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,o.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(o.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,o.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),a.currentTarget.dataset.row==="odd"?(a.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(a.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,a.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((o,s)=>o.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,n=this.bodyCopy.map(a=>a.td[r]).reduce((a,A)=>a+A,0);this.bodyCopy.forEach(a=>{a.td[e]=a.td[r]/n})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,n)=>r[e]-n[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,n)=>n[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const n=r.currentTarget;clearTimeout(this.buttonTimeout),n.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{n.classList.remove("clicked")},200);const a=document.getElementById(`th_dropdown_${t}`);a.dataset.isOpen==="false"?a.dataset.isOpen="true":a.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},tA=t=>(i.pushScopeId("data-v-573754b1"),t=t(),i.popScopeId(),t),$7={class:"vue-ui-table-export-hub"},z7=["innerHTML"],K7=["data-is-open"],G7=tA(()=>i.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),j7={class:"vue-ui-table-export-hub-options"},W7={class:"vue-ui-table-export-hub-option-wrapper"},X7={class:"label"},q7=["innerHTML"],Y7={class:"vue-ui-table-export-hub-option-wrapper"},J7={class:"label"},Z7=["innerHTML"],eP={class:"vue-ui-table"},tP={id:"tableHead"},rP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),nP={key:0},aP={key:0},AP={key:1},iP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),oP={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},sP=["innerHTML"],lP={key:0,style:{"margin-left":"3px"}},cP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),uP={key:0},hP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),fP={class:"th-filter"},dP={key:0,class:"th-date"},gP={class:"date-wrapper--inputs"},pP={class:"date-fieldset"},mP=["for"],yP=["id","onUpdate:modelValue","onInput"],vP={class:"date-fieldset"},wP=["for"],BP=["id","onUpdate:modelValue","onInput"],xP={class:"date-wrapper--button"},bP=["onClick"],CP=["innerHTML"],EP=["innerHTML"],_P=["innerHTML"],FP=["onClick","disabled"],SP=["placeholder","onUpdate:modelValue","name"],kP=["onClick"],TP=["innerHTML"],NP=["innerHTML"],LP=["innerHTML"],UP=["onClick","innerHTML"],IP=["innerHTML"],DP={key:5,class:"th-range-filter"},QP=["for"],OP=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),PP=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),MP=["id","max","min","onUpdate:modelValue"],RP=["id","max","min","onUpdate:modelValue"],HP=["for"],VP=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),$P=tA(()=>i.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),zP=["onClick","disabled"],KP=["id"],GP=["onClick"],jP=["onClick","onKeyup"],WP=tA(()=>i.createElementVNode("th",{class:"invisible-cell"},null,-1)),XP=["innerHTML","onClick","onKeyup"],qP=["data-row"],YP=["data-row"],JP=["data-row","onClick","onKeyup","id"],ZP=["innerHTML"],eM={key:1},tM={key:2},rM={key:5},nM=["innerHTML"],aM={key:0},AM={style:{"margin-left":"12px"}},iM={class:"format-num"},oM={style:{"margin-left":"12px"}},sM={key:0,class:"format-num"},lM={key:1,class:"format-num"},cM={key:2},uM={style:{"margin-left":"12px"}},hM={key:0,class:"format-num"},fM={key:1,class:"format-num"},dM={key:2},gM={key:0,class:"vue-ui-table-paginator format-num"},pM={key:1,class:"vue-ui-table-size-warning"},mM=["innerHTML"],yM={key:3,class:"vue-ui-table-pagination format-num"},vM=["innerHTML","disabled"],wM=["disabled"],BM={key:0,class:"vue-ui-table-page-scroller-wrapper"},xM={for:"pageScroller",style:{"font-size":"14px"}},bM=["max","value"],CM={key:1},EM=["disabled"],_M=["innerHTML","disabled"],FM={class:"chart-modal-options"},SM=["innerHTML"],kM=["innerHTML"],TM=["innerHTML"],NM={style:{"margin-bottom":"12px"}},LM={key:0},UM={key:1},IM={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},DM={class:"vue-ui-table-fieldset"},QM={class:"vue-ui-table-fieldset-wrapper"},OM=["name","id","checked","onInput"],PM=["for"],MM=["disabled"],RM=["innerHTML"],HM=["viewBox"],VM=["markerWidth","markerHeight","refY"],$M=["points","fill"],zM=["x2","y1","y2","stroke","stroke-width"],KM=["y2","stroke","stroke-width"],GM=["x","width","height","fill"],jM=i.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DD" data-v-573754b1></stop><stop offset="1" stop-color="#6376DD80" data-v-573754b1></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DD80" data-v-573754b1></stop><stop offset="1" stop-color="#6376DD" data-v-573754b1></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DDB3" data-v-573754b1></stop><stop offset="1" stop-color="#6376DD66" data-v-573754b1></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-573754b1><stop offset="0.2" stop-color="#6376DD66" data-v-573754b1></stop><stop offset="1" stop-color="#6376DDB3" data-v-573754b1></stop></linearGradient>',4),WM=["x","y","height","width","fill","stroke"],XM=["x","y","width"],qM=["x1","y1","x2","y2","stroke-width","stroke"],YM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],JM=["cx","cy","r","fill","stroke","stroke-width"],ZM=["x","y","width"],eR=["x","width","height","onMouseenter"],tR=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],rR=tA(()=>i.createElementVNode("span",null,"---",-1)),nR=["d","stroke"],aR=["x","y"],AR={class:"vue-ui-table-donut-label-name"},iR=["fill"],oR=["fill"],sR=["fill"],lR=["fill"],cR={class:"vue-ui-table-donut-legend"};function uR(t,e,r,n,a,A){return i.openBlock(),i.createElementBlock("div",{class:"vue-ui-table-main",style:i.normalizeStyle(`font-family: ${A.tableConfig.fontFamily}`)},[i.createElementVNode("div",$7,[i.createElementVNode("button",{onClick:e[0]||(e[0]=o=>a.isExportRequest=!a.isExportRequest),innerHTML:A.icons.export,style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.backgroundColor};color:${A.tableConfig.style.exportMenu.color}`)},null,12,z7),i.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":a.isExportRequest||"false",style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.backgroundColor};color:${A.tableConfig.style.exportMenu.color}`)},[G7,i.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=o=>a.isExportRequest=!1),style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color};border-radius:${A.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),i.createElementVNode("div",j7,[i.createElementVNode("div",W7,[i.createElementVNode("div",X7,i.toDisplayString(A.tableConfig.translations.exportAllLabel)+" ("+i.toDisplayString(a.bodyCopy.length)+") ",1),i.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=o=>A.createXls("all")),style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.buttons.backgroundColor};color:${A.tableConfig.style.exportMenu.buttons.color}`)},[i.createElementVNode("div",{innerHTML:A.icons.fileDownload},null,8,q7),i.createElementVNode("span",null,i.toDisplayString(A.tableConfig.translations.exportAllButton),1)],4)]),i.createElementVNode("div",Y7,[i.createElementVNode("div",J7,i.toDisplayString(A.tableConfig.translations.exportPageLabel),1),i.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=o=>A.createXls("page")),style:i.normalizeStyle(`background:${A.tableConfig.style.exportMenu.buttons.backgroundColor};color:${A.tableConfig.style.exportMenu.buttons.color}`)},[i.createElementVNode("div",{innerHTML:A.icons.fileDownload},null,8,Z7),i.createElementVNode("span",null,i.toDisplayString(A.tableConfig.translations.exportPageButton),1)],4)])])],12,K7)]),i.createElementVNode("div",{class:"vue-ui-table__wrapper",style:i.normalizeStyle(`max-height:${A.tableConfig.maxHeight}px`),ref:"tableWrapper"},[i.createElementVNode("table",eP,[i.createElementVNode("thead",tP,[i.createElementVNode("tr",null,[rP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,style:i.normalizeStyle(`overflow: visible;background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`),class:i.normalizeClass({"th-has-nan":a.hasNaN[s]})},[A.hasNumericTypes&&([a.constants.TEXT,a.constants.DATE].includes(o.type)||o.isPercentage)?(i.openBlock(),i.createElementBlock("span",nP,[i.createTextVNode(i.toDisplayString(o.name)+" ",1),o.isPercentage?(i.openBlock(),i.createElementBlock("span",aP," / "+i.toDisplayString(o.percentageTo),1)):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("span",AP,i.toDisplayString(o.name),1))],6))),128))]),A.hasNumericTypes?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("tr",null,[iP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,class:i.normalizeClass({"th-numeric":!0,"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[o.sum&&!a.hasNaN[s]?(i.openBlock(),i.createElementBlock("span",oP,[i.createElementVNode("span",{innerHTML:A.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,sP),i.createTextVNode(" "+i.toDisplayString(o.prefix)+" "+i.toDisplayString(Number(A.getSum(s).toFixed(o.decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix)+" ",1),a.percentages[s]&&o.percentageTo&&!o.isPercentage?(i.openBlock(),i.createElementBlock("span",lP," ("+i.toDisplayString(isNaN(A.getSum(s)/A.getSum(a.percentages[s].referenceIndex))?"-":(A.getSum(s)/A.getSum(a.percentages[s].referenceIndex)*100).toFixed(o.decimals))+"%) ",1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],6))),128))]),i.createElementVNode("tr",null,[cP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,class:i.normalizeClass({"th-numeric":!0,"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[o.average&&!a.hasNaN[s]?(i.openBlock(),i.createElementBlock("span",uP," ~ "+i.toDisplayString(o.prefix)+" "+i.toDisplayString(isNaN(A.getAverage(s))?"":Number(A.getAverage(s).toFixed(o.decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix),1)):i.createCommentVNode("",!0)],6))),128))]),i.createElementVNode("tr",null,[hP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`thead_${s}`,class:i.normalizeClass({"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${A.tableConfig.style.th.backgroundColor};color:${A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[i.createElementVNode("div",fP,[o.type===a.constants.DATE&&a.dates[s]?(i.openBlock(),i.createElementBlock("div",dP,[i.createElementVNode("div",gP,[i.createElementVNode("div",pP,[i.createElementVNode("label",{for:`from_${s}`},i.toDisplayString(A.tableConfig.translations.from),9,mP),i.withDirectives(i.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":l=>a.dates[s].from=l,onInput:l=>{A.filterBody(),A.setFilterDatesIndexes(s)},style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,yP),[[i.vModelText,a.dates[s].from]])]),i.createElementVNode("div",vP,[i.createElementVNode("label",{for:`to_${s}`},i.toDisplayString(A.tableConfig.translations.to),9,wP),i.withDirectives(i.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":l=>a.dates[s].to=l,onInput:l=>{A.filterBody(),A.setFilterDatesIndexes(s)},style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,BP),[[i.vModelText,a.dates[s].to]])])]),i.createElementVNode("div",xP,[o.isSort?(i.openBlock(),i.createElementBlock("button",{key:0,onClick:l=>A.sortTh(s,l),class:i.normalizeClass({"th-button-active":[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])}),style:i.normalizeStyle(`background:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.color}`)},[a.sorts[s]===a.constants.ASC?(i.openBlock(),i.createElementBlock("span",{key:0,innerHTML:[a.constants.DATE].includes(o.type)?A.icons.sort09:A.icons.sortAZ},null,8,CP)):a.sorts[s]===a.constants.DESC?(i.openBlock(),i.createElementBlock("span",{key:1,innerHTML:[a.constants.DATE].includes(o.type)?A.icons.sort90:A.icons.sortZA},null,8,EP)):(i.openBlock(),i.createElementBlock("span",{key:2,innerHTML:A.icons.arrowSort},null,8,_P))],14,bP)):i.createCommentVNode("",!0),i.createElementVNode("button",{onClick:l=>{A.resetDates(s),A.resetFilter(s,o,l)},disabled:!a.filteredDatesIndexes[s]&&A.isResetDisabled(s,o),class:"th-reset"}," ✖ ",8,FP)])])):i.createCommentVNode("",!0),o.isSearch?i.withDirectives((i.openBlock(),i.createElementBlock("input",{key:1,placeholder:A.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":l=>a.searches[s]=l,onInput:e[4]||(e[4]=l=>A.debounce(A.filterBody,400)),name:`search_${s}`,style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,SP)),[[i.vModelText,a.searches[s]]]):i.createCommentVNode("",!0),!a.hasNaN[s]&&o.isSort&&o.type!==a.constants.DATE?(i.openBlock(),i.createElementBlock("button",{key:2,onClick:l=>A.sortTh(s,l),class:i.normalizeClass({"th-button-active":[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])}),style:i.normalizeStyle(`background:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${[a.constants.DESC,a.constants.ASC].includes(a.sorts[s])?"":A.tableConfig.style.pagination.buttons.color}`)},[a.sorts[s]===a.constants.ASC?(i.openBlock(),i.createElementBlock("span",{key:0,innerHTML:[a.constants.NUMERIC].includes(o.type)?A.icons.sort09:A.icons.sortZA},null,8,TP)):a.sorts[s]===a.constants.DESC?(i.openBlock(),i.createElementBlock("span",{key:1,innerHTML:[a.constants.NUMERIC].includes(o.type)?A.icons.sort90:A.icons.sortAZ},null,8,NP)):(i.openBlock(),i.createElementBlock("span",{key:2,innerHTML:A.icons.arrowSort},null,8,LP))],14,kP)):i.createCommentVNode("",!0),o.isMultiselect?(i.openBlock(),i.createElementBlock("button",{key:3,onClick:l=>A.toggleMultiselect(s,o,l),innerHTML:A.icons.filter,class:i.normalizeClass({"th-button-active":a.multiselects[s]&&a.multiselects[s].length!==A.getDropdownOptions(s).length}),style:i.normalizeStyle(`background:${a.multiselects[s]&&a.multiselects[s].length!==A.getDropdownOptions(s).length?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${a.multiselects[s]&&a.multiselects[s].length!==A.getDropdownOptions(s).length?"":A.tableConfig.style.pagination.buttons.color}`)},null,14,UP)):i.createCommentVNode("",!0),a.currentSelectionSpan.col===s&&A.canChart?(i.openBlock(),i.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=l=>a.showChart=!a.showChart),innerHTML:A.icons.chart,class:i.normalizeClass({"th-button-active":a.showChart}),style:i.normalizeStyle(`background:${a.showChart?"":A.tableConfig.style.pagination.buttons.backgroundColor};color:${a.showChart?"":A.tableConfig.style.pagination.buttons.color}`)},null,14,IP)):i.createCommentVNode("",!0),o.rangeFilter&&a.rangeFilters[s]&&!a.hasNaN[s]?(i.openBlock(),i.createElementBlock("div",DP,[i.createElementVNode("label",{for:`rangeMin${s}`},[OP,i.createTextVNode(" min "),PP],8,QP),i.withDirectives(i.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:a.immutableRangeFilters[s].max,min:a.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>a.rangeFilters[s].min=l,onInput:e[6]||(e[6]=l=>A.debounce(A.filterBody,400)),style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,MP),[[i.vModelText,a.rangeFilters[s].min,void 0,{number:!0}]]),i.withDirectives(i.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:a.immutableRangeFilters[s].max,min:a.immutableRangeFilters[s].min,"onUpdate:modelValue":l=>a.rangeFilters[s].max=l,onInput:e[7]||(e[7]=l=>A.debounce(A.filterBody,400)),style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},null,44,RP),[[i.vModelText,a.rangeFilters[s].max,void 0,{number:!0}]]),i.createElementVNode("label",{for:`rangeMax${s}`},[VP,i.createTextVNode(" max "),$P],8,HP)])):i.createCommentVNode("",!0),A.canResetColumn(s,o)?(i.openBlock(),i.createElementBlock("button",{key:6,onClick:l=>A.resetFilter(s,o,l),disabled:A.isResetDisabled(s,o),class:"th-reset"}," ✖ ",8,zP)):i.createCommentVNode("",!0),o.isMultiselect?(i.openBlock(),i.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:i.normalizeStyle(`background:${A.tableConfig.style.dropdowns.backgroundColor};color:${A.tableConfig.style.dropdowns.color}`)},[i.createElementVNode("button",{class:"close-dropdown",onClick:l=>A.toggleMultiselect(s,o,l),style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color}`)}," ✖ ",12,GP),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.getDropdownOptions(s),(l,c)=>(i.openBlock(),i.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${c}`,onClick:u=>A.selectDropdownOption(l,s),onKeyup:[i.withKeys(u=>A.selectDropdownOption(l,s),["enter"]),i.withKeys(u=>A.selectDropdownOption(l,s),["space"])],style:i.normalizeStyle(`opacity:${A.isDropdownOptionSelected(l,s)?1:.5}`),tabindex:"0"},[A.isDropdownOptionSelected(l,s)?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${A.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},i.toDisplayString(A.tableConfig.style.dropdowns.icons.selected.unicode),5)):(i.openBlock(),i.createElementBlock("span",{key:1,style:i.normalizeStyle(`color:${A.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},i.toDisplayString(A.tableConfig.style.dropdowns.icons.unselected.unicode),5)),i.createElementVNode("span",null,i.toDisplayString(l),1)],44,jP))),128))],12,KP)):i.createCommentVNode("",!0)])],6))),128))])],64)):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[WP,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tableHead,(o,s)=>(i.openBlock(),i.createElementBlock("th",{key:`col_selector_${s}`,class:i.normalizeClass({"vue-ui-table-col-selector":!a.hasNaN[s],"th-has-nan":a.hasNaN[s]}),style:i.normalizeStyle(`background:${s===a.selectedColumn&&!a.hasNaN[s]?A.tableConfig.style.th.selected.backgroundColor:A.tableConfig.style.th.backgroundColor};color:${s===a.selectedColumn&&!a.hasNaN[s]?A.tableConfig.style.th.selected.color:A.tableConfig.style.th.color};outline:${A.tableConfig.style.th.outline}`)},[a.hasNaN[s]?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,innerHTML:a.tableHead[s].type===a.constants.NUMERIC?A.icons.chevronDown:"",class:i.normalizeClass({"col-selector":a.tableHead[s].type===a.constants.NUMERIC}),tabindex:"0",onClick:i.withModifiers(l=>A.selectColumn(s),["stop"]),onKeyup:i.withKeys(l=>A.selectColumn(s),["enter"])},null,42,XP))],6))),128))])]),i.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...o)=>A.closeAllDropdowns&&A.closeAllDropdowns(...o)),onKeydown:e[9]||(e[9]=o=>A.navigateCell(o))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.visibleRows,(o,s)=>(i.openBlock(),i.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:i.normalizeClass(`tr_${a.uid}`),style:i.normalizeStyle(`${s%2===0?`background:${A.tableConfig.style.rows.odd.backgroundColor};color:${A.tableConfig.style.rows.odd.color}`:`background:${A.tableConfig.style.rows.even.backgroundColor};color:${A.tableConfig.style.rows.even.color}`}`)},[i.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},i.toDisplayString(o.absoluteIndex+1),9,YP),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.td,(l,c)=>(i.openBlock(),i.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${c}`,style:i.normalizeStyle(A.isNumeric(l)||r.dataset.header[c].type===a.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:u=>A.selectTd({td:l,rowIndex:s,colIndex:c,headerType:r.dataset.header[c].type,event:u}),onKeyup:[i.withKeys(u=>A.selectTd({td:l,rowIndex:s,colIndex:c,headerType:r.dataset.header[c].type,event:u}),["enter"]),i.withKeys(u=>A.selectTd({td:l,rowIndex:s,colIndex:c,headerType:r.dataset.header[c].type,event:u}),["space"])],class:i.normalizeClass({"td-numeric":r.dataset.header[c].type===a.constants.NUMERIC,"td-focusable":!0,"td-has-nan":a.hasNaN[c]}),id:`cell_${s}_${c}_${a.uid}`,tabindex:"0"},[o.meta&&o.meta.markerIndices.includes(c)&&o.meta.unicodeIcon?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${o.meta.color};margin-right:3px`),innerHTML:o.meta.unicodeIcon},null,12,ZP)):i.createCommentVNode("",!0),r.dataset.header[c].type===a.constants.DATE?(i.openBlock(),i.createElementBlock("span",eM,i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(new Date(l).toLocaleString().slice(0,10))+" "+i.toDisplayString(r.dataset.header[c].suffix),1)):r.dataset.header[c].isPercentage?(i.openBlock(),i.createElementBlock("span",tM,i.toDisplayString(Number((l*100).toFixed(r.dataset.header[c].decimals)).toLocaleString())+"% ",1)):a.percentages[c]&&r.dataset.header[c].percentageTo&&!r.dataset.header[c].isPercentage?(i.openBlock(),i.createElementBlock("span",{key:3,class:i.normalizeClass({"td-nan":isNaN(Number(l))})},i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(isNaN(Number(l))?`${l} is not ${a.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[c].decimals)).toLocaleString())+" "+i.toDisplayString(r.dataset.header[c].suffix)+" ("+i.toDisplayString(isNaN(Number(l))?"":Number((l/A.getSum(a.percentages[c].referenceIndex)*100).toFixed(r.dataset.header[c].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[c].type===a.constants.NUMERIC?(i.openBlock(),i.createElementBlock("span",{key:4,class:i.normalizeClass({"td-nan":isNaN(Number(l))})},i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(isNaN(Number(l))?`${l} is not ${a.constants.NUMERIC}`:Number(l.toFixed(r.dataset.header[c].decimals)).toLocaleString())+" "+i.toDisplayString(r.dataset.header[c].suffix),3)):(i.openBlock(),i.createElementBlock("span",rM,i.toDisplayString(r.dataset.header[c].prefix)+" "+i.toDisplayString(l)+" "+i.toDisplayString(r.dataset.header[c].suffix),1))],46,JP))),128))],14,qP))),128))],32)])],4),i.createElementVNode("div",{class:i.normalizeClass({"td-selector-info":!0,"td-selector-info--active":a.currentSelectionSpan.col!==void 0&&a.currentSelectionSpan.rows.length}),style:i.normalizeStyle(`background:${A.tableConfig.style.infoBar.backgroundColor};color:${A.tableConfig.style.infoBar.color}`)},[a.currentSelectionSpan.col!==void 0&&a.currentSelectionSpan.rows.length?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",{innerHTML:A.icons.table,class:"td-selector-icon"},null,8,nM),i.createElementVNode("span",null,[i.createElementVNode("b",null,[i.createTextVNode(i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].name)+" ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("span",aM," / "+i.toDisplayString(r.dataset.header[a.percentages[a.currentSelectionSpan.col].referenceIndex].name),1)):i.createCommentVNode("",!0)]),i.createElementVNode("span",AM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.nb)+" : ",1),i.createElementVNode("b",iM,i.toDisplayString(a.currentSelectionSpan.rows.length),1)]),i.createElementVNode("span",oM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.sum)+" : ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",sM,i.toDisplayString(A.selectedCellsCalculations.sumPercentage),1)):(i.openBlock(),i.createElementBlock("b",lM,i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.selectedCellsCalculations.sumRegular)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),1)),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",cM,"%")):i.createCommentVNode("",!0)]),i.createElementVNode("span",uM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.average)+" : ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",hM,i.toDisplayString(A.selectedCellsCalculations.averagePercentage),1)):(i.openBlock(),i.createElementBlock("b",fM,i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.selectedCellsCalculations.averageRegular)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),1)),r.dataset.header[a.currentSelectionSpan.col].isPercentage?(i.openBlock(),i.createElementBlock("b",dM,"%")):i.createCommentVNode("",!0)])]),i.createElementVNode("button",{onClick:e[10]||(e[10]=(...o)=>A.resetSelection&&A.resetSelection(...o)),class:"td-selector-info-reset",style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color};border-radius:${A.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):i.createCommentVNode("",!0)],6),a.bodyCopy.length>10?(i.openBlock(),i.createElementBlock("div",gM,[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.totalRows)+" : "+i.toDisplayString(r.dataset.body.length)+" | "+i.toDisplayString(A.tableConfig.translations.paginatorLabel)+" : ",1),a.bodyCopy.length>10?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=o=>a.itemsPerPage=o),onChange:e[12]||(e[12]=(...o)=>A.resetSelection&&A.resetSelection(...o)),style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.paginatorOptions,(o,s)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[a.bodyCopy.length>o||r.dataset.body.length===o?(i.openBlock(),i.createElementBlock("option",{key:`paginator_option_${s}`},i.toDisplayString(o),1)):i.createCommentVNode("",!0)],64))),256))],36)),[[i.vModelSelect,a.itemsPerPage,void 0,{number:!0}]]):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),a.itemsPerPage>=250?(i.openBlock(),i.createElementBlock("div",pM,[i.createElementVNode("span",{innerHTML:A.icons.warning},null,8,mM),i.createTextVNode(i.toDisplayString(A.tableConfig.translations.sizeWarning),1)])):i.createCommentVNode("",!0),A.pages.length>1&&A.pages.length<=10?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${a.currentPage/(A.pages.length-1)*100}%)`)},null,4)):i.createCommentVNode("",!0),A.pages.length>1?(i.openBlock(),i.createElementBlock("div",yM,[i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=i.withModifiers(o=>A.navigate("previous"),["stop"])),innerHTML:A.icons.chevronLeft,disabled:a.currentPage===0,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===0?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,vM),A.pages.length>3?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=i.withModifiers(o=>A.navigate(1),["stop"])),disabled:a.currentPage===0,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===0?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,wM),A.pages.length>10?(i.openBlock(),i.createElementBlock("div",BM,[i.createElementVNode("label",xM,i.toDisplayString(A.tableConfig.translations.page)+" "+i.toDisplayString(a.currentPage+1)+" / "+i.toDisplayString(A.pages.length),1),i.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:A.pages.length-1,onInput:e[15]||(e[15]=o=>A.updateCurrentPage(o)),value:a.currentPage,style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border};accent-color:${A.tableConfig.style.inputs.accentColor}`)},null,44,bM)])):(i.openBlock(),i.createElementBlock("span",CM,i.toDisplayString(A.tableConfig.translations.page)+" "+i.toDisplayString(a.currentPage+1)+" / "+i.toDisplayString(A.pages.length),1)),i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=i.withModifiers(o=>A.navigate(A.pages.length),["stop"])),disabled:a.currentPage===A.pages.length-1,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===A.pages.length-1?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},i.toDisplayString(A.pages.length),13,EM)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(A.tableConfig.translations.page)+" "+i.toDisplayString(a.currentPage+1)+" / "+i.toDisplayString(A.pages.length),1)],64)),i.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=i.withModifiers(o=>A.navigate("next"),["stop"])),innerHTML:A.icons.chevronRight,disabled:a.currentPage===A.pages.length-1,style:i.normalizeStyle(`background:${A.tableConfig.style.pagination.buttons.backgroundColor};color:${A.tableConfig.style.pagination.buttons.color};opacity:${a.currentPage===A.pages.length-1?A.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,_M)])):i.createCommentVNode("",!0),a.showChart&&A.canChart?(i.openBlock(),i.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:i.normalizeStyle(`top:${a.clientY}px; left:${a.clientX}px;background:${A.tableConfig.style.chart.modal.backgroundColor};color:${A.tableConfig.style.chart.modal.color}`)},[i.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=o=>a.showChart=!1),style:i.normalizeStyle(`background:${A.tableConfig.style.closeButtons.backgroundColor};color:${A.tableConfig.style.closeButtons.color};border-radius:${A.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),i.createElementVNode("div",FM,[A.availableDonutCategories.length?(i.openBlock(),i.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=o=>a.showDonutOptions=!0),innerHTML:A.icons.donut,class:i.normalizeClass({"is-active-chart":a.chart.type===a.constants.DONUT||a.showDonutOptions}),style:i.normalizeStyle(`background:${a.chart.type===a.constants.DONUT||a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.backgroundColor:A.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${a.chart.type===a.constants.DONUT||a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.color:A.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,SM)):i.createCommentVNode("",!0),i.createElementVNode("button",{onClick:e[20]||(e[20]=o=>{a.chart.type=a.constants.LINE,a.showDonutOptions=!1}),innerHTML:A.icons.chart,class:i.normalizeClass({"is-active-chart":a.chart.type===a.constants.LINE&&!a.showDonutOptions}),style:i.normalizeStyle(`background:${a.chart.type===a.constants.LINE&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.backgroundColor:A.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${a.chart.type===a.constants.LINE&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.color:A.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,kM),i.createElementVNode("button",{onClick:e[21]||(e[21]=o=>{a.chart.type=a.constants.BAR,a.showDonutOptions=!1}),innerHTML:A.icons.bar,class:i.normalizeClass({"is-active-chart":a.chart.type===a.constants.BAR&&!a.showDonutOptions}),style:i.normalizeStyle(`background:${a.chart.type===a.constants.BAR&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.backgroundColor:A.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${a.chart.type===a.constants.BAR&&!a.showDonutOptions?A.tableConfig.style.chart.modal.buttons.selected.color:A.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,TM)]),i.createElementVNode("div",NM,[i.createElementVNode("b",null,[i.createTextVNode(i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].name)+" ",1),r.dataset.header[a.currentSelectionSpan.col].isPercentage&&r.dataset.header[a.currentSelectionSpan.col].percentageTo?(i.openBlock(),i.createElementBlock("span",LM," / "+i.toDisplayString(r.dataset.header[a.percentages[a.currentSelectionSpan.col].referenceIndex].name),1)):i.createCommentVNode("",!0),a.chart.type===a.constants.DONUT&&a.selectedDonutCategory&&a.selectedDonutCategory.name?(i.openBlock(),i.createElementBlock("span",UM,i.toDisplayString(A.tableConfig.translations.by)+" "+i.toDisplayString(a.selectedDonutCategory.name),1)):i.createCommentVNode("",!0)])]),i.createElementVNode("div",IM,[a.showDonutOptions&&A.availableDonutCategories.length?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`background:${A.tableConfig.style.chart.modal.backgroundColor};color:${A.tableConfig.style.chart.modal.color}`)},[i.createElementVNode("fieldset",DM,[i.createElementVNode("legend",null,i.toDisplayString(A.tableConfig.translations.chooseCategoryColumn),1),i.createElementVNode("div",QM,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.availableDonutCategories,(o,s)=>(i.openBlock(),i.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[i.createElementVNode("input",{type:"radio",name:o.name,id:o.name,checked:a.selectedDonutCategory&&o.name===a.selectedDonutCategory.name,onInput:l=>a.selectedDonutCategory=A.availableDonutCategories[s],style:i.normalizeStyle(`background:${A.tableConfig.style.inputs.backgroundColor};color:${A.tableConfig.style.inputs.color};border:${A.tableConfig.style.inputs.border};accent-color:${A.tableConfig.style.inputs.accentColor}`)},null,44,OM),i.createElementVNode("label",{for:o.name},i.toDisplayString(o.name),9,PM)]))),128))]),i.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!a.selectedDonutCategory,onClick:e[22]||(e[22]=(...o)=>A.applyDonutOption&&A.applyDonutOption(...o)),style:i.normalizeStyle(`background:${A.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${A.tableConfig.style.chart.modal.buttons.selected.color}`)},[i.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:A.icons.donut},null,8,RM),i.createTextVNode(" "+i.toDisplayString(A.tableConfig.translations.makeDonut),1)],12,MM)])],4)):i.createCommentVNode("",!0),[a.constants.BAR,a.constants.LINE].includes(a.chart.type)&&!a.showDonutOptions?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${a.chart.width} ${a.chart.height}`,class:"vue-ui-table-chart-svg",style:i.normalizeStyle(`background:${A.tableConfig.style.chart.layout.backgroundColor}`)},[i.createElementVNode("defs",null,[i.createElementVNode("marker",{id:"arrowhead",markerWidth:A.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:A.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:A.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[i.createElementVNode("polygon",{points:`0 0, ${A.tableConfig.style.chart.layout.progression.arrowSize} ${A.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${A.tableConfig.style.chart.layout.progression.arrowSize}`,fill:A.tableConfig.style.chart.layout.progression.stroke},null,8,$M)],8,VM)]),i.createElementVNode("g",null,[i.createElementVNode("line",{x1:0,x2:a.chart.width,y1:A.chartData.zero,y2:A.chartData.zero,stroke:A.tableConfig.style.chart.layout.axis.stroke,"stroke-width":A.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,zM),i.createElementVNode("line",{x1:0,x2:0,y1:0,y2:a.chart.height,stroke:A.tableConfig.style.chart.layout.axis.stroke,"stroke-width":A.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,KM)]),a.chart.type===a.constants.LINE?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(A.chartData.plots,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`trap_fill_${s}`},[i.createElementVNode("rect",{x:s*A.chartData.slot,y:0,width:A.chartData.slot,height:a.chart.height,fill:a.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,GM)]))),128)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.chartData.plots,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`plot_${s}`},[a.chart.type===a.constants.BAR?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[jM,i.createElementVNode("rect",{x:o.x-A.chartData.slot/2,y:A.chartData.isAllNegative?0:A.calcRectY(o.value,o.y),height:o.value>=0?A.chartData.zero-o.y:A.chartData.isAllNegative?o.y:o.y-A.chartData.zero,width:A.chartData.slot,fill:A.tableConfig.style.chart.layout.bar.fill?A.tableConfig.style.chart.layout.bar.fill:a.selectedPlot===s?o.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(o.value>=0,"url(#barGradient)"),stroke:A.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,WM),a.selectedPlot===s?(i.openBlock(),i.createElementBlock("foreignObject",{key:0,x:o.x-(A.chartData.slot<100?50:A.chartData.slot/2),y:o.value>=0?o.y-32:o.y+4,height:"20",width:A.chartData.slot<100?100:A.chartData.slot,style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${A.tableConfig.style.chart.layout.labels.color}`)},i.toDisplayString(o.prefix)+" "+i.toDisplayString(Number(o.value.toFixed(r.dataset.header[a.currentSelectionSpan.col].decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix),5)],8,XM)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),a.chart.type===a.constants.LINE?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[s+1<A.chartData.plots.length?(i.openBlock(),i.createElementBlock("line",{key:0,x1:o.x,y1:o.y,x2:A.chartData.plots[s+1].x,y2:A.chartData.plots[s+1].y,"stroke-width":A.tableConfig.style.chart.layout.line.strokeWidth,stroke:A.tableConfig.style.chart.layout.line.stroke},null,8,qM)):i.createCommentVNode("",!0),a.selectedPlot===s?(i.openBlock(),i.createElementBlock("line",{key:1,x1:o.x,y1:o.y,x2:o.x,y2:a.chart.height,stroke:A.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":A.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":A.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,YM)):i.createCommentVNode("",!0),i.createElementVNode("circle",{cx:o.x,cy:o.y,r:a.selectedPlot===s?A.tableConfig.style.chart.layout.line.plot.radius.selected:A.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:A.tableConfig.style.chart.layout.line.plot.fill,stroke:A.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":A.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,JM),a.selectedPlot===s?(i.openBlock(),i.createElementBlock("foreignObject",{key:2,x:o.x-(A.chartData.slot<100?50:A.chartData.slot/2),y:A.placeLabelOnTopOrBottom({previousPlot:A.chartData.plots[s-1],currentPlot:o,nextPlot:A.chartData.plots[s+1]}),height:"20",width:A.chartData.slot<100?100:A.chartData.slot,style:{overflow:"visible"}},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${A.tableConfig.style.chart.layout.labels.color}`)},i.toDisplayString(o.prefix)+" "+i.toDisplayString(Number(o.value.toFixed(r.dataset.header[a.currentSelectionSpan.col].decimals)).toLocaleString())+" "+i.toDisplayString(o.suffix),5)],8,ZM)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0)]))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.chartData.plots,(o,s)=>(i.openBlock(),i.createElementBlock("g",{key:`trap_${s}`},[i.createElementVNode("rect",{x:s*A.chartData.slot,y:0,width:A.chartData.slot,height:a.chart.height,fill:"transparent",onMouseenter:l=>a.selectedPlot=s,onMouseleave:e[23]||(e[23]=l=>a.selectedPlot=void 0)},null,40,eR)]))),128)),A.chartData.progression&&A.chartData.plots.length>2?(i.openBlock(),i.createElementBlock("line",{key:1,x1:A.chartData.progression.x1,y1:A.chartData.progression.y1,x2:A.chartData.progression.x2,y2:A.chartData.progression.y2,stroke:A.tableConfig.style.chart.layout.progression.stroke,"stroke-width":A.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":A.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,tR)):i.createCommentVNode("",!0)],12,HM)),A.chartData.plots.length>=2?(i.openBlock(),i.createElementBlock("div",{key:0,class:"chart-trend",style:i.normalizeStyle(`color:${A.tableConfig.style.chart.modal.color}`)},[rR,i.createTextVNode(" Trend: "),i.createElementVNode("span",null,i.toDisplayString(A.chartData.progression.slope<0?"+":"-"),1),i.createTextVNode(" "+i.toDisplayString((Math.abs(A.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),[a.constants.DONUT].includes(a.chart.type)&&!a.showDonutOptions?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[(i.openBlock(),i.createElementBlock("svg",{viewBox:"0 0 100 100",style:i.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${A.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.currentDonut,(o,s)=>(i.openBlock(),i.createElementBlock("path",{key:`arc_${s}`,d:o.path,stroke:`${o.color}CC`,"stroke-width":20,fill:"none"},null,8,nR))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.currentDonut,(o,s)=>(i.openBlock(),i.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:A.calcDonutMarkerLabelPositionX(o)-15,y:o.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[A.isArcBigEnough(o)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:i.normalizeStyle(`color:${A.tableConfig.style.chart.layout.labels.color}`)},[i.createElementVNode("b",null,i.toDisplayString(A.displayArcPercentage(o,a.currentDonut)),1),i.createElementVNode("span",AR,i.toDisplayString(o.name),1)],4)):i.createCommentVNode("",!0)],8,aR))),128)),i.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(A.tableConfig.translations.total),9,iR),i.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.donutHollowLabels.total)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].isPercentage?"%":"")+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),9,oR),i.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(A.tableConfig.translations.average),9,sR),i.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:A.tableConfig.style.chart.layout.labels.color},i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.donutHollowLabels.average)+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].isPercentage?"%":"")+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),9,lR)],4)),i.createElementVNode("div",cR,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.currentDonut.filter(o=>o.value>0),(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:i.normalizeStyle(`color:${A.tableConfig.style.chart.layout.labels.color}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${o.color}`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(o.name)+" : ",1),i.createElementVNode("b",null,i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].prefix)+" "+i.toDisplayString(A.getDonutLegendValue(o.absoluteValue))+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].isPercentage?"%":"")+" "+i.toDisplayString(r.dataset.header[a.currentSelectionSpan.col].suffix),1),i.createElementVNode("span",null,"("+i.toDisplayString((o.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):i.createCommentVNode("",!0)],512)],4)):i.createCommentVNode("",!0)],4)}const hR=Da(V7,[["render",uR],["__scopeId","data-v-573754b1"]]),Aoe="",fR=t=>(i.pushScopeId("data-v-795deb2e"),t=t(),i.popScopeId(),t),dR=["id"],gR={class:"vue-ui-donut-user-option-item"},pR=["id","name"],mR=["for"],yR={class:"vue-ui-donut-user-option-item"},vR=["id","name"],wR=["for"],BR={class:"vue-ui-donut-user-option-item"},xR=["id","name"],bR=["for"],CR=["disabled"],ER=["stroke"],_R=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-795deb2e></path><path d="M18 16v.01" data-v-795deb2e></path><path d="M6 16v.01" data-v-795deb2e></path><path d="M12 5v.01" data-v-795deb2e></path><path d="M12 12v.01" data-v-795deb2e></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-795deb2e></path>',6)],FR={key:1},SR=["viewBox"],kR=["id"],TR=["stop-color"],NR=["stop-color"],LR=["stop-color"],UR={key:0},IR=["font-size","fill","x"],DR=["font-size","fill","x","y"],QR=["d","stroke","stroke-width"],OR=["cx","cy","fill"],PR=["d","stroke","stroke-width","onMouseenter","onClick"],MR=["cx","cy","r","fill"],RR=["x","y","fill","font-size"],HR=["x","y","fill","font-size"],VR=["x","y","fill","font-size"],$R=["x","y","fill","font-size"],zR=["x","y","fill","font-size"],KR=["x","y","fill","font-size"],GR=["y"],jR=["onClick"],WR=["onClick"],XR={key:0},qR=["innerHTML"],YR={key:0},JR={key:0},ZR=[fR(()=>i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[i.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),i.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],e9={style:{"max-width":"200px margin:0 auto"}},t9=Da({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-donut-${Math.random()}`),A=i.ref(wa.vue_ui_donut),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref(""),d=i.ref(null);i.onMounted(()=>{document.addEventListener("mousemove",w)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",w)});function w(b){u.value.x=b.clientX,u.value.y=b.clientY}const g=i.computed(()=>{let b=0,_=48;if(l.value&&s.value){const{width:B,height:x}=l.value.getBoundingClientRect(),S=s.value.getBoundingClientRect();u.value.x+B/2>S.right?b=-B:u.value.x-B/2<S.left?b=0:b=-B/2,u.value.y+x>S.bottom&&(_=-x-48)}return{top:u.value.y+_,left:u.value.x+b}}),y=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const b=aa({defaultConfig:A.value,userConfig:n.config});return Aa(b)}),m=i.ref({dataLabels:{show:y.value.style.chart.layout.labels.dataLabels.show},inside:y.value.style.chart.layout.useDiv,showTable:y.value.table.show}),F=i.computed(()=>({height:m.value.inside||o.value?512:360,width:512})),N=i.ref([]);function Q(b){N.value.includes(b)?N.value=N.value.filter(_=>_!==b):N.value.push(b),r("selectLegend",I.value.map(_=>({name:_.name,color:_.color,value:_.value})))}const z=i.computed(()=>n.dataset.map((b,_)=>({name:b.name,color:Nr(b.color)||It[_]||It[_%It.length],value:b.values.reduce((B,x)=>B+x,0),absoluteValues:b.values})).sort((b,_)=>_.value-b.value));function R(){return z.value.map(b=>({name:b.name,color:b.color,value:b.value}))}e({getData:R});const I=i.computed(()=>n.dataset.map((b,_)=>({name:b.name,color:Nr(b.color)||It[_]||It[_%It.length],value:b.values.reduce((B,x)=>B+x,0),absoluteValues:b.values})).sort((b,_)=>_.value-b.value).filter((b,_)=>!N.value.includes(_))),U=i.computed(()=>n.dataset.map((b,_)=>({name:b.name,color:Nr(b.color)||It[_]||It[_%It.length],value:b.values.reduce((B,x)=>B+x,0)})).sort((b,_)=>_.value-b.value)),O=i.computed(()=>Gh({series:I.value},F.value.width/2,F.value.height/2,100,100));function q(b){return b.center.endX+T(b,256)}function T(b,_){return b.center.endX-_>=0?30:-30}function L(b){return b.proportion*100>y.value.style.chart.layout.labels.dataLabels.hideUnderValue}function G(b,_){return isNaN(b.value/Y(_))?0:(b.value/Y(_)*100).toFixed(0)+"%"}function Y(b){return[...b].map(_=>_.value).reduce((_,B)=>_+B,0)}const se=i.computed(()=>I.value.map(b=>b.value).reduce((b,_)=>b+_,0)),he=i.computed(()=>se.value/I.value.length);function ge(){c.value&&c.value.removeAttribute("open")}function re(b,_,B=!0){p.value=B,d.value=_;let x="";x+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${b.name}</div>`,x+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${b.color};font-size:${y.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,y.value.style.chart.tooltip.showValue&&(x+=`<b>${b.value.toFixed(y.value.style.chart.tooltip.roundingValue)}</b>`),y.value.style.chart.tooltip.showPercentage&&(y.value.style.chart.tooltip.showValue?x+=`<span>(${(b.proportion*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:x+=`<b>${(b.proportion*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),h.value=`<div>${x}</div>`}function le(){o.value=!0,KA({domElement:document.getElementById(`donut__${a.value}`),fileName:y.value.style.chart.title.text||"vue-ui-donut"}).finally(()=>{o.value=!1})}const fe=i.computed(()=>{const b=I.value.map(B=>({name:B.name,color:B.color})),_=I.value.map(B=>B.value);return{head:b,body:_}});function Ue(){i.nextTick(()=>{const b=fe.value.head.map((B,x)=>[[B.name],[fe.value.body[x]],[isNaN(fe.value.body[x]/se.value)?"-":fe.value.body[x]/se.value*100]]),_=[[y.value.style.chart.title.text],[y.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(b);ei(_,y.value.style.chart.title.text||"vue-ui-donut")})}return(b,_)=>(i.openBlock(),i.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:i.normalizeStyle(`font-family:${y.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${a.value}`},[(!m.value.inside||o.value)&&y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${y.value.style.chart.backgroundColor}`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.color};font-size:${y.value.style.chart.title.fontSize}px;font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),5),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.subtitle.color};font-size:${y.value.style.chart.title.subtitle.fontSize}px;font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),y.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},i.toDisplayString(y.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},[i.createElementVNode("div",gR,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${a.value}`,name:`vue-ui-donut-option-datalabels_${a.value}`,"onUpdate:modelValue":_[0]||(_[0]=B=>m.value.dataLabels.show=B)},null,8,pR),[[i.vModelCheckbox,m.value.dataLabels.show]]),i.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${a.value}`},i.toDisplayString(y.value.userOptions.labels.dataLabels),9,mR)]),i.createElementVNode("div",yR,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${a.value}`,name:`vue-ui-donut-option-title_${a.value}`,"onUpdate:modelValue":_[1]||(_[1]=B=>m.value.inside=B)},null,8,vR),[[i.vModelCheckbox,m.value.inside]]),i.createElementVNode("label",{for:`vue-ui-donut-option-title_${a.value}`},i.toDisplayString(y.value.userOptions.labels.useDiv),9,wR)]),i.createElementVNode("div",BR,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${a.value}`,name:`vue-ui-donut-option-table_${a.value}`,"onUpdate:modelValue":_[2]||(_[2]=B=>m.value.showTable=B)},null,8,xR),[[i.vModelCheckbox,m.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-donut-option-table_${a.value}`},i.toDisplayString(y.value.userOptions.labels.showTable),9,bR)]),i.createElementVNode("button",{class:"vue-ui-donut-button",onClick:le,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:y.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},_R,8,ER)):(i.openBlock(),i.createElementBlock("span",FR,"PDF"))],12,CR),i.createElementVNode("button",{class:"vue-ui-donut-button",onClick:Ue,style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${F.value.width} ${F.value.height}`,style:i.normalizeStyle(`max-width:100%; overflow: visible; background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),onClick:ge},[i.createElementVNode("defs",null,[y.value.style.chart.useGradient?(i.openBlock(),i.createElementBlock("radialGradient",{key:0,id:`gradient_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(Nr)(y.value.style.chart.backgroundColor)}00`},null,8,TR),i.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+i.unref(Et)[y.value.style.chart.gradientIntensity]},null,8,NR),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(Nr)(y.value.style.chart.backgroundColor)}00`},null,8,LR)],8,kR)):i.createCommentVNode("",!0)]),y.value.style.chart.title.text&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",UR,[i.createElementVNode("text",{"font-size":y.value.style.chart.title.fontSize,fill:y.value.style.chart.title.color,x:F.value.width/2,y:48,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),13,IR),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":y.value.style.chart.title.subtitle.fontSize,fill:y.value.style.chart.title.subtitle.color,x:F.value.width/2,y:48+y.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),13,DR)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(B,x)=>(i.openBlock(),i.createElementBlock("path",{d:B.path,stroke:`${B.color}CC`,"stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,QR))),256)),y.value.style.chart.useGradient?(i.openBlock(),i.createElementBlock("circle",{key:1,cx:F.value.width/2,cy:F.value.height/2,r:136,fill:`url(#gradient_${a.value})`},null,8,OR)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(B,x)=>(i.openBlock(),i.createElementBlock("path",{d:B.path,stroke:d.value===x?"rgba(0,0,0,0.1)":"transparent","stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:S=>re(B,x,!0),onMouseleave:_[3]||(_[3]=S=>{p.value=!1,d.value=null}),onClick:S=>Q(x)},null,40,PR))),256)),i.createElementVNode("circle",{cx:F.value.width/2,cy:F.value.height/2,r:F.value.width-400-y.value.style.chart.layout.donut.strokeWidth/2,fill:y.value.style.chart.backgroundColor},null,8,MR),y.value.style.chart.layout.labels.hollow.total.show?(i.openBlock(),i.createElementBlock("text",{key:2,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2-(y.value.style.chart.layout.labels.hollow.average.show?y.value.style.chart.layout.labels.hollow.total.fontSize:0)+y.value.style.chart.layout.labels.hollow.total.offsetY,fill:y.value.style.chart.layout.labels.hollow.total.color,"font-size":y.value.style.chart.layout.labels.hollow.total.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.total.text),13,RR)):i.createCommentVNode("",!0),y.value.style.chart.layout.labels.hollow.total.show?(i.openBlock(),i.createElementBlock("text",{key:3,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2+y.value.style.chart.layout.labels.hollow.total.fontSize-(y.value.style.chart.layout.labels.hollow.average.show?y.value.style.chart.layout.labels.hollow.total.fontSize:0)+y.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:y.value.style.chart.layout.labels.hollow.total.value.color,"font-size":y.value.style.chart.layout.labels.hollow.total.value.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+i.toDisplayString(se.value.toFixed(y.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+i.toDisplayString(y.value.style.chart.layout.labels.hollow.total.value.suffix),13,HR)):i.createCommentVNode("",!0),y.value.style.chart.layout.labels.hollow.average.show?(i.openBlock(),i.createElementBlock("text",{key:4,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2+(y.value.style.chart.layout.labels.hollow.total.show?y.value.style.chart.layout.labels.hollow.average.fontSize:0)+y.value.style.chart.layout.labels.hollow.average.offsetY,fill:y.value.style.chart.layout.labels.hollow.average.color,"font-size":y.value.style.chart.layout.labels.hollow.average.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.average.text),13,VR)):i.createCommentVNode("",!0),y.value.style.chart.layout.labels.hollow.average.show?(i.openBlock(),i.createElementBlock("text",{key:5,"text-anchor":"middle",x:F.value.width/2,y:F.value.height/2+(y.value.style.chart.layout.labels.hollow.total.show?y.value.style.chart.layout.labels.hollow.average.fontSize:0)+y.value.style.chart.layout.labels.hollow.average.fontSize+y.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:y.value.style.chart.layout.labels.hollow.average.value.color,"font-size":y.value.style.chart.layout.labels.hollow.average.value.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+i.toDisplayString(isNaN(he.value.toFixed(y.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":he.value.toFixed(y.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+i.toDisplayString(y.value.style.chart.layout.labels.hollow.average.value.suffix),13,$R)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(B,x)=>(i.openBlock(),i.createElementBlock("g",null,[L(B)&&m.value.dataLabels.show?(i.openBlock(),i.createElementBlock("text",{key:0,"text-anchor":"middle",x:q(B),y:B.center.endY-y.value.style.chart.layout.labels.percentage.fontSize/2,fill:y.value.style.chart.layout.labels.percentage.color,"font-size":y.value.style.chart.layout.labels.percentage.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},i.toDisplayString(G(B,O.value)),13,zR)):i.createCommentVNode("",!0),L(B)&&m.value.dataLabels.show?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"middle",x:q(B),y:B.center.endY+y.value.style.chart.layout.labels.percentage.fontSize/2,fill:y.value.style.chart.layout.labels.name.color,"font-size":y.value.style.chart.layout.labels.name.fontSize,style:i.normalizeStyle(`font-weight:${y.value.style.chart.layout.labels.name.bold?"bold":""}`)},i.toDisplayString(B.name),13,KR)):i.createCommentVNode("",!0)]))),256)),y.value.style.chart.legend.show&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:6,x:0,y:F.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-donut-legend",style:i.normalizeStyle(`background:transparent;color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:S=>Q(x),style:i.normalizeStyle(`opacity:${N.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(B.value),1),i.createElementVNode("span",null,"("+i.toDisplayString(isNaN(B.value/se.value)?"-":(B.value/se.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1)],12,jR))),256))],4)],8,GR)):i.createCommentVNode("",!0)],12,SR)),y.value.style.chart.legend.show&&(!m.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:i.normalizeStyle(`background:${y.value.style.chart.legend.backgroundColor};color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`),onClick:ge},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:S=>Q(x),style:i.normalizeStyle(`opacity:${N.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(B.value.toFixed(y.value.style.chart.legend.roundingValue)),1),N.value.includes(x)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",XR,"("+i.toDisplayString(isNaN(B.value/se.value)?"-":(B.value/se.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1))],12,WR))),256))],4)):i.createCommentVNode("",!0),y.value.style.chart.tooltip.show&&p.value?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${g.value.top}px;left:${g.value.left}px;background:${y.value.style.chart.tooltip.backgroundColor};color:${y.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,qR)):i.createCommentVNode("",!0),m.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:ge,class:"vue-ui-donut-table",style:i.normalizeStyle(`width:100%;margin-top:${m.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",YR,[i.createElementVNode("th",{colspan:"3",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(y.value.style.chart.title.text),1),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",JR," : "+i.toDisplayString(y.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[i.createElementVNode("th",{align:"right",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};padding-right:6px`)},ZR,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)},i.toDisplayString(se.value.toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(fe.value.head,(B,x)=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},[i.createElementVNode("div",e9,[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};margin-right:6px;`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name),1)])],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(fe.value.body[x].toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(isNaN(fe.value.body[x]/se.value)?"-":(fe.value.body[x]/se.value*100).toFixed(y.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,dR))}},[["__scopeId","data-v-795deb2e"]]),loe="",r9=t=>(i.pushScopeId("data-v-1d2a2a37"),t=t(),i.popScopeId(),t),n9=["id"],a9={class:"vue-ui-waffle-user-option-item"},A9=["id","name"],i9=["for"],o9={class:"vue-ui-waffle-user-option-item"},s9=["id","name"],l9=["for"],c9=["disabled"],u9=["stroke"],h9=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-1d2a2a37></path><path d="M18 16v.01" data-v-1d2a2a37></path><path d="M6 16v.01" data-v-1d2a2a37></path><path d="M12 5v.01" data-v-1d2a2a37></path><path d="M12 12v.01" data-v-1d2a2a37></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-1d2a2a37></path>',6)],f9={key:1},d9=["viewBox"],g9=["id"],p9=["stop-color"],m9=["stop-color"],y9={key:0},v9=["font-size","fill","x","y"],w9=["font-size","fill","x","y"],B9=["rx","x","y","height","width","stroke","stroke-width"],x9=["onMouseover","rx","x","y","height","width","fill","stroke","stroke-width"],b9={key:1,x:0,y:512+64,width:"100%",height:"100",style:{overflow:"visible"}},C9=["onClick"],E9={key:0},_9=["onClick"],F9={key:0},S9=["innerHTML"],k9={key:0},T9={key:0},N9=[r9(()=>i.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[i.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),i.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],L9={style:{"max-width":"200px margin:0 auto"}},U9=Da({__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-waffle-${Math.random()}`),A=i.ref(wa.vue_ui_waffle),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref(""),d=i.ref(null),w=i.computed(()=>{let B=0,x=48;if(l.value&&s.value){const{width:S,height:D}=l.value.getBoundingClientRect(),W=s.value.getBoundingClientRect();u.value.x+S/2>W.right?B=-S:u.value.x-S/2<W.left?B=0:B=-S/2,u.value.y+D>W.bottom&&(x=-D-48)}return{top:u.value.y+x,left:u.value.x+B}});i.onMounted(()=>{document.addEventListener("mousemove",g)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(B){u.value.x=B.clientX,u.value.y=B.clientY}const y=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const B=aa({defaultConfig:A.value,userConfig:n.config});return Aa(B)}),m=i.ref({inside:!y.value.style.chart.layout.useDiv,showTable:y.value.table.show}),F=i.computed(()=>({height:m.value.inside?704:512,width:512})),N=i.computed(()=>({top:m.value.inside?64:0,left:0,height:512,width:512})),Q=i.computed(()=>(N.value.width-y.value.style.chart.layout.grid.size*y.value.style.chart.layout.grid.spaceBetween)/y.value.style.chart.layout.grid.size);function z(B){const x=B.reduce((W,ue)=>W+ue,0),S=B.map(W=>Math.round(W/x*100)/100),D=S.reduce((W,ue)=>W+ue,0);if(D!==1){const W=S.length-1;S[W]+=1-D,S[W]=Math.round(S[W]*100)/100}return S}const R=i.computed(()=>n.dataset.map((B,x)=>({...B,color:Nr(B.color)||It[x]||It[x%It.length],uid:`serie_${x}`}))),I=i.computed(()=>{const B=R.value.filter((x,S)=>!le.value.includes(x.uid)).map((x,S)=>x.values.reduce((D,W)=>D+W));return z(B)}),U=i.computed(()=>{const B=R.value.map((x,S)=>x.values.reduce((D,W)=>D+W));return z(B)}),O=i.computed(()=>R.value.filter((B,x)=>!le.value.includes(B.uid)).map((B,x)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((S,D)=>S+D,0),absoluteValues:B.values,proportion:I.value[x]*Math.pow(y.value.style.chart.layout.grid.size,2)})).sort((B,x)=>x.value-B.value)),q=i.computed(()=>R.value.map((B,x)=>({uid:B.uid,name:B.name,color:B.color,value:B.values.reduce((S,D)=>S+D,0),absoluteValues:B.values,proportion:U.value[x]*Math.pow(y.value.style.chart.layout.grid.size,2)})).sort((B,x)=>x.value-B.value));function T(){return q.value.map(B=>({name:B.name,color:B.color,value:B.value,proportion:B.proportion/Math.pow(y.value.style.chart.layout.grid.size,2)}))}e({getData:T});const L=i.computed(()=>O.value.map((B,x)=>{const S=x>0?O.value.filter((ue,Ce)=>Ce<x).map(ue=>ue.proportion).reduce((ue,Ce)=>ue+Ce)+B.proportion-O.value[x-1].proportion:B.proportion-B.proportion,D=S+B.proportion,W=[];for(let ue=S;ue<=D;ue+=1)W.push(ue);return{...B,start:x>0?O.value.filter((ue,Ce)=>Ce<x).map(ue=>ue.proportion).reduce((ue,Ce)=>ue+Ce)+B.proportion-O.value[x-1].proportion:B.proportion-B.proportion,rects:W}})),G=i.computed(()=>L.value.flatMap((B,x)=>B.rects.map((S,D)=>({name:B.name,color:B.color,value:B.value,serieIndex:x,...B})))),Y=i.computed(()=>{const B=[];for(let x=0;x<y.value.style.chart.layout.grid.size;x+=1)for(let S=0;S<y.value.style.chart.layout.grid.size;S+=1)B.push({x:(y.value.style.chart.layout.grid.vertical?x:S)*(Q.value+y.value.style.chart.layout.grid.spaceBetween),y:(y.value.style.chart.layout.grid.vertical?S:x)*(Q.value+y.value.style.chart.layout.grid.spaceBetween)+N.value.top});return B}),se=i.computed(()=>R.value.map((B,x)=>({name:B.name,color:B.color||It[x]||It[x%It.length],value:B.values.reduce((S,D)=>S+D,0),uid:B.uid})).sort((B,x)=>x.value-B.value)),he=i.computed(()=>O.value.map(B=>B.value).reduce((B,x)=>B+x,0));i.computed(()=>he.value/O.value.length);function ge(){c.value&&c.value.removeAttribute("open")}function re(B){if(le.value.length===n.dataset.length)return;const x=G.value[B];p.value=!0,d.value=G.value[B].serieIndex;let S="";S+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${x.name}</div>`,S+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${x.color};font-size:${y.value.style.chart.tooltip.fontSize*1.6}px;">◼</span>`,y.value.style.chart.tooltip.showValue&&(S+=`<b>${x.value.toFixed(y.value.style.chart.tooltip.roundingValue)}</b>`),y.value.style.chart.tooltip.showPercentage&&(y.value.style.chart.tooltip.showValue?S+=`<span>(${(x.value/he.value*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:S+=`<b>${(x.value/he.value*100).toFixed(y.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),h.value=S}const le=i.ref([]);function fe(B){le.value.includes(B)?le.value=le.value.filter(x=>x!==B):le.value.push(B),r("selectLegend",O.value.map(x=>({name:x.name,color:x.color,value:x.value,proportion:x.proportion/Math.pow(y.value.style.chart.layout.grid.size,2)})))}const Ue=i.computed(()=>{const B=O.value.map(S=>({name:S.name,color:S.color})),x=O.value.map(S=>S.value);return{head:B,body:x}});function b(){o.value=!0,KA({domElement:document.getElementById(`vue-ui-waffle_${a.value}`),fileName:y.value.style.chart.title.text||"vue-ui-waffle"}).finally(()=>{o.value=!1})}function _(){i.nextTick(()=>{const B=Ue.value.head.map((S,D)=>[[S.name],[Ue.value.body[D]],[isNaN(Ue.value.body[D]/he.value)?"-":Ue.value.body[D]/he.value*100]]),x=[[y.value.style.chart.title.text],[y.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(B);ei(x,y.value.style.chart.title.text||"vue-ui-waffle")})}return(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-waffle",ref_key:"waffleChart",ref:s,id:`vue-ui-waffle_${a.value}`,style:i.normalizeStyle(`font-family:${y.value.style.fontFamily};width:100%; text-align:center`)},[(!m.value.inside||o.value)&&y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${y.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.color};font-size:${y.value.style.chart.title.fontSize}px;font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),5),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${y.value.style.chart.title.subtitle.color};font-size:${y.value.style.chart.title.subtitle.fontSize}px;font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),y.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-waffle-user-options",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},i.toDisplayString(y.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-waffle-user-options-items",style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)},[i.createElementVNode("div",a9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-title_${a.value}`,name:`vue-ui-waffle-option-title_${a.value}`,"onUpdate:modelValue":x[0]||(x[0]=S=>m.value.inside=S)},null,8,A9),[[i.vModelCheckbox,m.value.inside]]),i.createElementVNode("label",{for:`vue-ui-waffle-option-title_${a.value}`},i.toDisplayString(y.value.userOptions.labels.useDiv),9,i9)]),i.createElementVNode("div",o9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-table_${a.value}`,name:`vue-ui-waffle-option-table_${a.value}`,"onUpdate:modelValue":x[1]||(x[1]=S=>m.value.showTable=S)},null,8,s9),[[i.vModelCheckbox,m.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-waffle-option-table_${a.value}`},i.toDisplayString(y.value.userOptions.labels.showTable),9,l9)]),i.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:b,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-waffle-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:y.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},h9,8,u9)):(i.openBlock(),i.createElementBlock("span",f9,"PDF"))],12,c9),i.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:_,style:i.normalizeStyle(`background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${F.value.width} ${F.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${y.value.style.chart.backgroundColor};color:${y.value.style.chart.color}`),onClick:ge},[i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(S,D)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${a.value}_${D}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(S.color,.05)}${i.unref(Et)[100-y.value.style.chart.layout.rect.gradientIntensity]}`},null,8,p9),i.createElementVNode("stop",{offset:"100%","stop-color":S.color},null,8,m9)],8,g9))),256))]),y.value.style.chart.title.text&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",y9,[i.createElementVNode("text",{"font-size":y.value.style.chart.title.fontSize,fill:y.value.style.chart.title.color,x:F.value.width/2,y:y.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.text),13,v9),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":y.value.style.chart.title.subtitle.fontSize,fill:y.value.style.chart.title.subtitle.color,x:F.value.width/2,y:y.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${y.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(y.value.style.chart.title.subtitle.text),13,w9)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Y.value,(S,D)=>(i.openBlock(),i.createElementBlock("rect",{rx:y.value.style.chart.layout.rect.rounded?y.value.style.chart.layout.rect.rounding:0,x:S.x,y:S.y,height:Q.value,width:Q.value,fill:"white",stroke:y.value.style.chart.layout.rect.stroke,"stroke-width":y.value.style.chart.layout.rect.strokeWidth},null,8,B9))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Y.value,(S,D)=>(i.openBlock(),i.createElementBlock("rect",{onMouseover:W=>re(D),onMouseleave:x[2]||(x[2]=W=>{p.value=!1,d.value=null}),rx:y.value.style.chart.layout.rect.rounded?y.value.style.chart.layout.rect.rounding:0,x:S.x,y:S.y,height:Q.value,width:Q.value,fill:y.value.style.chart.layout.rect.useGradient&&y.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${a.value}_${D})`:G.value[D].color,stroke:y.value.style.chart.layout.rect.stroke,"stroke-width":y.value.style.chart.layout.rect.strokeWidth},null,40,x9))),256)),y.value.style.chart.legend.show&&m.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",b9,[i.createElementVNode("div",{class:"vue-ui-waffle-legend",style:i.normalizeStyle(`font-weight:${y.value.style.chart.legend.bold?"bold":""};background:${y.value.style.chart.legend.backgroundColor};color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`),onClick:ge},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(S,D)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:W=>fe(S.uid),style:i.normalizeStyle(`opacity:${le.value.includes(S.uid)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${S.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),i.createElementVNode("span",null,i.toDisplayString(S.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(S.value.toFixed(y.value.style.chart.legend.roundingValue)),1),le.value.includes(S.uid)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",E9,"("+i.toDisplayString(isNaN(S.value/he.value)?"-":(S.value/he.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1))],12,C9))),256))],4)])):i.createCommentVNode("",!0)],12,d9)),y.value.style.chart.legend.show&&(!m.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-waffle-legend",style:i.normalizeStyle(`font-weight:${y.value.style.chart.legend.bold?"bold":""};background:${y.value.style.chart.legend.backgroundColor};color:${y.value.style.chart.legend.color};font-size:${y.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${y.value.style.chart.legend.bold?"bold":""}`),onClick:ge},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(S,D)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:W=>fe(S.uid),style:i.normalizeStyle(`opacity:${le.value.includes(S.uid)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${S.color};font-size:${y.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),i.createElementVNode("span",null,i.toDisplayString(S.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(S.value.toFixed(y.value.style.chart.legend.roundingValue)),1),le.value.includes(S.uid)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",F9,"("+i.toDisplayString(isNaN(S.value/he.value)?"-":(S.value/he.value*100).toFixed(y.value.style.chart.legend.roundingPercentage))+"%)",1))],12,_9))),256))],4)):i.createCommentVNode("",!0),y.value.style.chart.tooltip.show&&p.value&&le.value.length<n.dataset.length?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-waffle-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${w.value.top}px;left:${w.value.left}px;background:${y.value.style.chart.tooltip.backgroundColor};color:${y.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,S9)):i.createCommentVNode("",!0),m.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:ge,class:"vue-ui-waffle-table",style:i.normalizeStyle(`width:100%;margin-top:${m.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[y.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",k9,[i.createElementVNode("th",{colspan:"3",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(y.value.style.chart.title.text),1),y.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",T9," : "+i.toDisplayString(y.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[i.createElementVNode("th",{align:"right",style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};padding-right:6px`)},N9,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)},i.toDisplayString(he.value.toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("th",{style:i.normalizeStyle(`background:${y.value.table.th.backgroundColor};color:${y.value.table.th.color};outline:${y.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Ue.value.head,(S,D)=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},[i.createElementVNode("div",L9,[i.createElementVNode("span",{style:i.normalizeStyle(`color:${S.color};margin-right:6px;`)},"◼",4),i.createElementVNode("span",null,i.toDisplayString(S.name),1)])],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(Ue.value.body[D].toFixed(y.value.table.td.roundingValue)),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${y.value.table.td.backgroundColor};color:${y.value.table.td.color};outline:${y.value.table.td.outline}`)},i.toDisplayString(isNaN(Ue.value.body[D]/he.value)?"-":(Ue.value.body[D]/he.value*100).toFixed(y.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,n9))}},[["__scopeId","data-v-1d2a2a37"]]),foe="",I9=["id"],D9={class:"vue-ui-radar-user-option-item"},Q9=["id","name"],O9=["for"],P9={class:"vue-ui-radar-user-option-item"},M9=["id","name"],R9=["for"],H9=["disabled"],V9=["stroke"],$9=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dbff0f7d></path><path d="M18 16v.01" data-v-dbff0f7d></path><path d="M6 16v.01" data-v-dbff0f7d></path><path d="M12 5v.01" data-v-dbff0f7d></path><path d="M12 12v.01" data-v-dbff0f7d></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-dbff0f7d></path>',6)],z9={key:1},K9=["viewBox"],G9=["id"],j9=["stop-color"],W9=["stop-color"],X9={key:0},q9=["font-size","fill","x","y"],Y9=["font-size","fill","x","y"],J9={key:1},Z9=["x1","y1","x2","y2","stroke","stroke-width"],eH={key:0},tH=["d","stroke","stroke-width"],rH=["d","stroke","stroke-width"],nH={key:2},aH=["x","y","text-anchor","font-size","fill","onMouseenter"],AH={key:0},iH=["d","stroke","stroke-width","fill"],oH={key:3},sH=["cx","cy","fill","r"],lH={key:4,x:0,y:340,width:"100%",height:"60",style:{overflow:"visible"}},cH=["onClick"],uH=["onClick"],hH=["innerHTML"],fH={key:0},dH=["colspan"],gH={key:0},pH=["colspan"],mH={style:{width:"100%"}},yH=Da({__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-radar-${Math.random()}`),A=i.ref(wa.vue_ui_radar),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref("");i.onMounted(()=>{document.addEventListener("mousemove",d)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",d)});function d(b){u.value.x=b.clientX,u.value.y=b.clientY}const w=i.computed(()=>{let b=0,_=48;if(l.value&&s.value){const{width:B,height:x}=l.value.getBoundingClientRect(),S=s.value.getBoundingClientRect();u.value.x+B/2>S.right?b=-B:u.value.x-B/2<S.left?b=0:b=-B/2,u.value.y+x>S.bottom&&(_=-x-48)}return{top:u.value.y+_,left:u.value.x+b}}),g=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const b=aa({defaultConfig:A.value,userConfig:n.config});return Aa(b)}),y=i.ref({dataLabels:{show:g.value.style.chart.layout.labels.dataLabels.show},inside:!g.value.style.chart.layout.useDiv,showTable:g.value.table.show}),m=i.computed(()=>({height:y.value.inside?412:312,width:512})),F=i.ref([]);function N(b){F.value.includes(b)?F.value=F.value.filter(_=>_!==b):F.value.push(b),r("selectLegend",se.value.filter((_,B)=>!F.value.includes(B)).map(_=>({name:_.name,color:_.color,proportion:_.totalProportion})))}function Q(){return se.value.map(b=>({name:b.name,color:b.color,proportion:b.totalProportion}))}e({getData:Q});const z=i.computed(()=>n.dataset.categories.map((b,_)=>({name:b.name,categoryId:`radar_category_${a.value}_${_}`,color:Nr(b.color)||It[_]||It[_%It.length]}))),R=i.computed(()=>n.dataset.series.map((b,_)=>({...b,color:Nr(b.color)||It[_]||It[_%It.length],serieId:`radar_serie_${a.value}_${_}`}))),I=i.computed(()=>Math.max(...R.value.flatMap(b=>b.values))),U=i.computed(()=>R.value.length),O=i.computed(()=>eA({plot:{x:256,y:m.value.height/2},radius:128,sides:U.value,rotation:0})),q=i.computed(()=>{const b=[];for(let _=0;_<128;_+=128/g.value.style.chart.layout.grid.graduations)b.push(_);return b}),T=i.computed(()=>O.value.coordinates.map((b,_)=>{const B=R.value[_].values.map(x=>G({centerX:m.value.width/2,centerY:m.value.height/2,apexX:b.x,apexY:b.y,proportion:x/(R.value[_].target||I.value)}));return{...b,...R.value[_],plots:B}}));function L({x:b,y:_}){let B="middle";return b=Math.round(b),_=Math.round(_),b>m.value.width/2&&(b+=12,B="start"),b<m.value.width/2&&(b-=12,B="end"),_>m.value.height/2&&(_+=20),_<m.value.height/2&&(_-=12),_===m.value.height/2&&(_+=4),{x:b,y:_,anchor:B}}function G({centerX:b,centerY:_,apexX:B,apexY:x,proportion:S}){return{x:b+(B-b)*S,y:_+(x-_)*S}}function Y(b){let _="";return b.forEach(B=>{_+=`${B.x},${B.y} `}),`M${_}Z`}const se=i.computed(()=>{const b=R.value.map((_,B)=>_.values.map(x=>x/(_.target||I.value)));return z.value.map((_,B)=>({..._,totalProportion:b.map(x=>x[B]).reduce((x,S)=>x+S,0)/R.value.length}))}),he=i.computed(()=>{const b=[{name:"",color:""},{name:g.value.translations.target,color:""},...se.value],_=n.dataset.series.map((B,x)=>[B.name,B.target,...B.values.flatMap(S=>[S?S.toFixed(g.value.table.td.roundingValue):"-",isNaN(S/B.target)?"":(S/B.target*100).toFixed(g.value.table.td.roundingPercentage)+"%"])]);return{head:b,body:_}}),ge=i.ref(null);function re(b,_){ge.value=_,p.value=!0;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${b.name}</div>`;for(let x=0;x<b.values.length;x+=1)F.value.includes(x)||(B+=`<div style="display:flex;flex-wrap:wrap;align-items:center;gap:6px"><span style="color:${z.value[x].color}">●</span><span>${z.value[x].name}</span> : ${g.value.style.chart.tooltip.showValue?`<span>${b.values[x].toFixed(g.value.style.chart.tooltip.roundingValue)}</span>`:""} ${!g.value.style.chart.tooltip.showValue&&g.value.style.chart.tooltip.showPercentage?`<span>${(b.values[x]/b.target*100).toFixed(g.value.style.chart.tooltip.roundingPercentage)}%</span>`:g.value.style.chart.tooltip.showPercentage?`<span>(${(b.values[x]/b.target*100).toFixed(g.value.style.chart.tooltip.roundingPercentage)}%)</span>`:""}</div>`);h.value=B}function le(){o.value=!0,KA({domElement:document.getElementById(`vue-ui-radar_${a.value}`),fileName:g.value.style.chart.title.text||"vue-ui-radar"}).finally(()=>{o.value=!1})}function fe(){i.nextTick(()=>{const b=[[g.value.style.chart.title.text],[g.value.style.chart.title.subtitle.text],[""]],_=[[""],[g.value.translations.target],...se.value.flatMap(S=>[[S.name],["%"]])],B=n.dataset.series.map((S,D)=>[S.name,S.target,...S.values.flatMap(W=>[W,isNaN(W/S.target)?"":W/S.target*100])]),x=b.concat([_]).concat(B);ei(x,g.value.style.chart.title.text||"vue-ui-radar")})}function Ue(){c.value&&c.value.removeAttribute("open")}return(b,_)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-radar",ref_key:"radarChart",ref:s,id:`vue-ui-radar_${a.value}`,style:i.normalizeStyle(`font-family:${g.value.style.fontFamily};width:100%; text-align:center`)},[(!y.value.inside||o.value)&&g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${g.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.color};font-size:${g.value.style.chart.title.fontSize}px;font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),5),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.subtitle.color};font-size:${g.value.style.chart.title.subtitle.fontSize}px;font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),g.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-radar-user-options",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},i.toDisplayString(g.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-radar-user-options-items",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},[i.createElementVNode("div",D9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-title_${a.value}`,name:`vue-ui-radar-option-title_${a.value}`,"onUpdate:modelValue":_[0]||(_[0]=B=>y.value.inside=B)},null,8,Q9),[[i.vModelCheckbox,y.value.inside]]),i.createElementVNode("label",{for:`vue-ui-radar-option-title_${a.value}`},i.toDisplayString(g.value.userOptions.labels.useDiv),9,O9)]),i.createElementVNode("div",P9,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-radar-option-table_${a.value}`,name:`vue-ui-radar-option-table_${a.value}`,"onUpdate:modelValue":_[1]||(_[1]=B=>y.value.showTable=B)},null,8,M9),[[i.vModelCheckbox,y.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-radar-option-table_${a.value}`},i.toDisplayString(g.value.userOptions.labels.showTable),9,R9)]),i.createElementVNode("button",{class:"vue-ui-radar-button",onClick:le,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${g.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-radar-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:g.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},$9,8,V9)):(i.openBlock(),i.createElementBlock("span",z9,"PDF"))],12,H9),i.createElementVNode("button",{class:"vue-ui-radar-button",onClick:fe,style:i.normalizeStyle(`color:${g.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),onClick:Ue},[i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,(B,x)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${a.value}_${x}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(B.color,.05)}${i.unref(Et)[g.value.style.chart.layout.dataPolygon.opacity]}`},null,8,j9),i.createElementVNode("stop",{offset:"100%","stop-color":B.color+i.unref(Et)[g.value.style.chart.layout.dataPolygon.opacity]},null,8,W9)],8,G9))),256))]),g.value.style.chart.title.text&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",X9,[i.createElementVNode("text",{"font-size":g.value.style.chart.title.fontSize,fill:g.value.style.chart.title.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),13,q9),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":g.value.style.chart.title.subtitle.fontSize,fill:g.value.style.chart.title.subtitle.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),13,Y9)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),g.value.style.chart.layout.grid.show?(i.openBlock(),i.createElementBlock("g",J9,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,B=>(i.openBlock(),i.createElementBlock("line",{x1:m.value.width/2,y1:m.value.height/2,x2:B.x,y2:B.y,stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,Z9))),256)),g.value.style.chart.layout.grid.graduations>0?(i.openBlock(),i.createElementBlock("g",eH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,B=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:256,y:m.value.height/2},radius:B,sides:U.value,rotation:0}).path,fill:"none",stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,tH))),256))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("path",{d:O.value.path,fill:"none",stroke:g.value.style.chart.layout.outerPolygon.stroke,"stroke-width":g.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,rH),g.value.style.chart.layout.labels.dataLabels.show?(i.openBlock(),i.createElementBlock("g",nH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,(B,x)=>(i.openBlock(),i.createElementBlock("text",{x:L(B).x,y:L(B).y,"text-anchor":L(B).anchor,"font-size":g.value.style.chart.layout.labels.dataLabels.fontSize,fill:g.value.style.chart.layout.labels.dataLabels.color,onMouseenter:S=>re(B,x),onMouseleave:_[2]||(_[2]=S=>{p.value=!1,ge.value=null})},i.toDisplayString(B.name),41,aH))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,(B,x)=>(i.openBlock(),i.createElementBlock("g",null,[F.value.includes(x)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("g",AH,[i.createElementVNode("path",{d:Y(T.value.map(S=>S.plots[x])),stroke:B.color,"stroke-width":g.value.style.chart.layout.dataPolygon.strokeWidth,fill:g.value.style.chart.layout.dataPolygon.transparent?"transparent":g.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${a.value}_${x})`:B.color+i.unref(Et)[g.value.style.chart.layout.dataPolygon.opacity]},null,8,iH)]))]))),256)),g.value.style.chart.layout.plots.show?(i.openBlock(),i.createElementBlock("g",oH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,(B,x)=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(B.plots,(S,D)=>(i.openBlock(),i.createElementBlock("circle",{cx:S.x,cy:S.y,fill:F.value.includes(D)?"transparent":z.value[D].color,r:ge.value!==null&&ge.value===x?g.value.style.chart.layout.plots.radius*1.6:g.value.style.chart.layout.plots.radius},null,8,sH))),256))]))),256))])):i.createCommentVNode("",!0),g.value.style.chart.legend.show&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",lH,[i.createElementVNode("div",{class:"vue-ui-radar-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:Ue},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:S=>N(x),style:i.normalizeStyle(`opacity:${F.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${g.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString((B.totalProportion*100).toFixed(g.value.style.chart.legend.roundingPercentage))+"%",1)],12,cH))),256))],4)])):i.createCommentVNode("",!0)],12,K9)),g.value.style.chart.legend.show&&(!y.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-radar-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};background:${g.value.style.chart.legend.backgroundColor};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:Ue},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.value,(B,x)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-radar-legend-item",onClick:S=>N(x),style:i.normalizeStyle(`opacity:${F.value.includes(x)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${B.color};font-size:${g.value.style.chart.legend.fontSize*1.6}px`)},"●",4),i.createElementVNode("span",null,i.toDisplayString(B.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString((B.totalProportion*100).toFixed(g.value.style.chart.legend.roundingPercentage))+"%",1)],12,uH))),256))],4)):i.createCommentVNode("",!0),g.value.style.chart.tooltip.show&&p.value?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-radar-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${w.value.top}px;left:${w.value.left}px;background:${g.value.style.chart.tooltip.backgroundColor};color:${g.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,hH)):i.createCommentVNode("",!0),y.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:Ue,class:"vue-ui-radar-table",style:i.normalizeStyle(`width:100%;margin-top:${y.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",fH,[i.createElementVNode("th",{colspan:se.value.length+2+3,style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(g.value.style.chart.title.text),1),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",gH," : "+i.toDisplayString(g.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],12,dH)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(he.value.head,B=>(i.openBlock(),i.createElementBlock("th",{colspan:B.color?2:1,style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("div",mH,[B.color?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${B.color};margin-right:3px`)},"●",4)):i.createCommentVNode("",!0),i.createElementVNode("span",null,i.toDisplayString(B.name),1)])],12,pH))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(he.value.body,B=>(i.openBlock(),i.createElementBlock("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(B,x=>(i.openBlock(),i.createElementBlock("td",{style:i.normalizeStyle(`background:${g.value.table.td.backgroundColor};color:${g.value.table.td.color};outline:${g.value.table.td.outline}`)},i.toDisplayString(x),5))),256))]))),256))])])],4)):i.createCommentVNode("",!0)],12,I9))}},[["__scopeId","data-v-dbff0f7d"]]),poe="",vH=["id"],wH={class:"vue-ui-quadrant-user-option-item"},BH=["id","name"],xH=["for"],bH={class:"vue-ui-quadrant-user-option-item"},CH=["id","name"],EH=["for"],_H={class:"vue-ui-quadrant-user-option-item"},FH=["id","name"],SH=["for"],kH=["disabled"],TH=["stroke"],NH=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-c200bf52></path><path d="M18 16v.01" data-v-c200bf52></path><path d="M6 16v.01" data-v-c200bf52></path><path d="M12 5v.01" data-v-c200bf52></path><path d="M12 12v.01" data-v-c200bf52></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-c200bf52></path>',6)],LH={key:1},UH=["viewBox"],IH=["id"],DH=["stop-color"],QH=["stop-color"],OH={key:0},PH=["font-size","fill","x","y"],MH=["font-size","fill","x","y"],RH={key:1},HH=["fill","x","y","height","width","stroke-width","stroke","rx"],VH=["x1","y1","x2","y2","stroke","stroke-width"],$H=["x1","y1","x2","y2","stroke","stroke-width"],zH={key:2},KH=["points","fill"],GH=["points","fill"],jH=["points","fill"],WH=["points","fill"],XH={key:3},qH=["y","fill","font-size"],YH=["x","y","fill","font-size"],JH=["x","y","fill","font-size"],ZH=["y","fill","font-size"],eV={key:4},tV=["x","y","font-size","fill"],rV=["x","y","font-size","fill"],nV=["x","y","font-size","fill"],aV=["font-size","fill"],AV=["font-size","fill"],iV=["font-size","fill"],oV={key:5},sV=["fill","points"],lV={key:0},cV=["cx","cy","r","fill","stroke","stroke-width","onMouseover","onClick"],uV={key:1},hV=["d","fill","stroke","stroke-width","onMouseover","onClick"],fV={key:2},dV=["d","fill","stroke","stroke-width","onMouseover","onClick"],gV={key:3},pV=["d","fill","stroke","stroke-width","onMouseover","onClick"],mV={key:4},yV=["d","fill","stroke","stroke-width","onMouseover","onClick"],vV={key:5},wV=["d","fill","stroke","stroke-width","onMouseover","onClick"],BV={key:6},xV=["points","fill","stroke","stroke-width","onMouseover","onClick"],bV={key:6},CV=["x","y","font-size","fill"],EV=["y"],_V=["onClick"],FV=["innerHTML"],SV=["onClick"],kV=["innerHTML"],TV=["innerHTML"],NV={key:0},LV={key:0},UV={style:{width:"100%"}},IV=Da({__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-quadrant-${Math.random()}`),A=i.ref(wa.vue_ui_quadrant),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref("");i.onMounted(()=>{document.addEventListener("mousemove",d);const _=document.getElementById("xLabelMin");if(_){const D=_.getBBox().height/2+m.value.padding*.6,W=m.value.centerY;_.setAttributeNS(null,"transform",`rotate(-90, ${D}, ${W})`),_.setAttributeNS(null,"x",D),_.setAttributeNS(null,"y",W)}const B=document.getElementById("xLabelMax");if(B){const D=B.getBBox().height/2+m.value.right,W=m.value.centerY;B.setAttributeNS(null,"transform",`rotate(90, ${D}, ${W})`),B.setAttributeNS(null,"x",D),B.setAttributeNS(null,"y",W)}const x=document.getElementById("xLabelMaxName");if(x){const D=x.getBBox().height/2+m.value.right+m.value.padding*.3,W=m.value.centerY;x.setAttributeNS(null,"transform",`rotate(90, ${D}, ${W})`),x.setAttributeNS(null,"x",D),x.setAttributeNS(null,"y",W)}}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",d)});function d(_){u.value.x=_.clientX,u.value.y=_.clientY}const w=i.computed(()=>{let _=0,B=48;if(l.value&&s.value){const{width:x,height:S}=l.value.getBoundingClientRect(),D=s.value.getBoundingClientRect();u.value.x+x/2>D.right?_=-x:u.value.x-x/2<D.left?_=0:_=-x/2,u.value.y+S>D.bottom&&(B=-S-48)}return{top:u.value.y+B,left:u.value.x+_}}),g=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const _=aa({defaultConfig:A.value,userConfig:n.config});return Aa(_)}),y=i.ref({plotLabels:{show:g.value.style.chart.layout.labels.plotLabels.show},inside:!g.value.style.chart.layout.useDiv,showTable:g.value.table.show}),m=i.computed(()=>{const _=y.value.inside?100:0,B=y.value.inside?100:0,x=48;return{height:g.value.style.chart.height+_+B,usableHeight:g.value.style.chart.height-x*2,width:g.value.style.chart.width,usableWidth:g.value.style.chart.width-x*2,top:_+x,left:x,right:g.value.style.chart.width-x,bottom:g.value.style.chart.height+_-x,centerX:g.value.style.chart.width/2,centerY:g.value.style.chart.height+_-g.value.style.chart.height/2,padding:x}}),F=i.computed(()=>{const _=g.value.style.chart.layout.grid.graduations.steps,B=m.value.usableWidth/(_*2),x=m.value.top,S=[];for(let D=0;D<_;D+=1)S.push({x:m.value.padding+B*D,y:x+m.value.usableHeight*(D/_/2),height:m.value.usableHeight*(1-D/_),width:m.value.usableWidth*(1-D/_),opacity:Et[Math.round((D+1)/_*20)]});return S}),N=i.computed(()=>{let _=g.value.style.chart.layout.grid.xAxis.max,B=g.value.style.chart.layout.grid.xAxis.min,x=g.value.style.chart.layout.grid.yAxis.max,S=g.value.style.chart.layout.grid.yAxis.min;return g.value.style.chart.layout.grid.xAxis.auto&&(_=Math.max(...z.value.flatMap(D=>D.series.map(W=>W.x))),B=Math.min(...z.value.flatMap(D=>D.series.map(W=>W.x)))),g.value.style.chart.layout.grid.yAxis.auto&&(x=Math.max(...z.value.flatMap(D=>D.series.map(W=>W.y))),S=Math.min(...z.value.flatMap(D=>D.series.map(W=>W.y)))),{x:{max:_,min:B},y:{max:x,min:S}}}),Q=i.ref([]),z=i.computed(()=>n.dataset.map((_,B)=>({..._,id:`cat_${B}_${a.value}`,color:Nr(_.color)||It[B]}))),R=i.computed(()=>z.value.filter(_=>!Q.value.includes(_.id))),I=i.computed(()=>z.value.map((_,B)=>({..._,shape:_.shape||"circle",series:_.series.map(x=>({...x,x:O(x.x),y:q(x.y),xValue:x.x,yValue:x.y,quadrantSide:se({x:x.x,y:x.y}),categoryName:_.name,shape:_.shape,color:_.color}))}))),U=i.computed(()=>R.value.map((_,B)=>({..._,shape:_.shape||"circle",color:_.color||It[B],series:_.series.map(x=>({...x,x:O(x.x),y:q(x.y),xValue:x.x,yValue:x.y,quadrantSide:se({x:x.x,y:x.y}),categoryName:_.name,shape:_.shape,color:_.color}))})));function O(_){const B=_/N.value.x.max;return m.value.centerX+m.value.usableWidth/2*B}function q(_){const B=_/N.value.y.max;return m.value.centerY+(1-m.value.usableHeight/2*B)}const T=i.computed(()=>{const _=U.value.flatMap(W=>W.series.map(ue=>({x:ue.xValue,y:ue.yValue,name:ue.name,category:ue.categoryName,quadrantSide:ue.quadrantSide,sideName:g.value.style.chart.layout.labels.quadrantLabels[ue.quadrantSide].text,color:W.color,shape:W.shape}))),B=g.value.style.chart.layout.grid.xAxis.name||"x",x=g.value.style.chart.layout.grid.yAxis.name||"y",S=[g.value.translations.category,g.value.translations.item,B,x,g.value.translations.side],D=_.map(W=>[W.category,W.name,W.x,W.y,W.sideName||W.quadrantSide]);return{head:S,body:D}});function L(_,B){let x="";switch(_){case"circle":x=`<span style="color:${B}">●</span>`;break;case"triangle":x=`<span style="color:${B}">▲</span>`;break;case"square":x=`<span style="color:${B}">◼</span>`;break;case"diamond":x=`<span style="color:${B}">◆</span>`;break;case"pentagon":x=`<span style="color:${B}">⬟</span>`;break;case"hexagon":x=`<span style="color:${B}">⬣</span>`;break;case"star":x=`<span style="color:${B}">🟊</span>`;break}return x}const G=i.computed(()=>I.value.map(_=>({name:_.name,shapePath:L(_.shape,_.color),id:_.id})));function Y(_){Q.value.includes(_)?Q.value=Q.value.filter(x=>x!==_):Q.value.push(_);const B=le();r("selectLegend",B)}function se(_){switch(!0){case(_.x>=0&&_.y>=0):return"tr";case(_.x>=0&&_.y<0):return"br";case(_.x<0&&_.y<0):return"bl";case(_.x<0&&_.y>=0):return"tl";default:return""}}function he(_,B){p.value=!0;let x="";B.quadrantSide&&(x+=`<div style="color:${g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].color};font-weight:${g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].bold?"bold":"400"}">${g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}</div>`),x+=`<div>${_.name}</div>`,x+=`<div style="padding-bottom:6px;border-bottom:1px solid #e1e5e8;margin-bottom:3px">${B.name}</div>`,x+=`<div>${g.value.style.chart.layout.grid.xAxis.name?g.value.style.chart.layout.grid.xAxis.name:"x"} : <b>${B.xValue.toFixed(g.value.style.chart.tooltip.roundingValue)}</b></div>`,x+=`<div>${g.value.style.chart.layout.grid.yAxis.name?g.value.style.chart.layout.grid.yAxis.name:"y"} : <b>${B.yValue.toFixed(g.value.style.chart.tooltip.roundingValue)}</b></div>`,h.value=`<div style="text-align:left;font-size:${g.value.style.chart.tooltip.fontSize}px">${x}</div>`}function ge(_,B){const x={category:_.name,itemName:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text};r("selectPlot",x)}function re(_){const B=U.value.flatMap(S=>S.series.filter(D=>D.quadrantSide===_).map(D=>({category:D.categoryName,itemName:D.name,x:D.xValue,y:D.yValue}))),x={quadrantSide:_,sideName:g.value.style.chart.layout.labels.quadrantLabels[_].text,items:[...B]};r("selectSide",x)}function le(){return U.value.map(_=>({color:_.color,name:_.name,shape:_.shape,series:_.series.map(B=>({name:B.name,x:B.xValue,y:B.yValue,quadrantSide:B.quadrantSide,sideName:g.value.style.chart.layout.labels.quadrantLabels[B.quadrantSide].text}))}))}e({getData:le});function fe(){c.value&&c.value.removeAttribute("open")}function Ue(){o.value=!0,i.nextTick(()=>{KA({domElement:document.getElementById(`vue-ui-quadrant_${a.value}`),fileName:g.value.style.chart.title.text||"vue-ui-quadrant"}).finally(()=>{o.value=!1})})}function b(){i.nextTick(()=>{const _=[[g.value.style.chart.title.text],[g.value.style.chart.title.subtitle.text],[""]],B=T.value.head,x=T.value.body,S=_.concat([B]).concat(x);ei(S,g.value.style.chart.title.text||"vue-ui-quadrant")})}return(_,B)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-quadrant",ref_key:"quadrantChart",ref:s,id:`vue-ui-quadrant_${a.value}`,style:i.normalizeStyle(`font-family:${g.value.style.fontFamily};width:100%; text-align:center`)},[(!y.value.inside||o.value)&&g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${g.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.color};font-size:${g.value.style.chart.title.fontSize}px;font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),5),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${g.value.style.chart.title.subtitle.color};font-size:${g.value.style.chart.title.subtitle.fontSize}px;font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),g.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-quadrant-user-options",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},i.toDisplayString(g.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-quadrant-user-options-items",style:i.normalizeStyle(`background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`)},[i.createElementVNode("div",wH,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-plotLabels_${a.value}`,name:`vue-ui-quadrant-option-plotLabels_${a.value}`,"onUpdate:modelValue":B[0]||(B[0]=x=>y.value.plotLabels.show=x)},null,8,BH),[[i.vModelCheckbox,y.value.plotLabels.show]]),i.createElementVNode("label",{for:`vue-ui-quadrant-option-plotLabels_${a.value}`},i.toDisplayString(g.value.userOptions.labels.showPlotLabels),9,xH)]),i.createElementVNode("div",bH,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-title_${a.value}`,name:`vue-ui-quadrant-option-title_${a.value}`,"onUpdate:modelValue":B[1]||(B[1]=x=>y.value.inside=x)},null,8,CH),[[i.vModelCheckbox,y.value.inside]]),i.createElementVNode("label",{for:`vue-ui-quadrant-option-title_${a.value}`},i.toDisplayString(g.value.userOptions.labels.useDiv),9,EH)]),i.createElementVNode("div",_H,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-quadrant-option-table_${a.value}`,name:`vue-ui-quadrant-option-table_${a.value}`,"onUpdate:modelValue":B[2]||(B[2]=x=>y.value.showTable=x)},null,8,FH),[[i.vModelCheckbox,y.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-quadrant-option-table_${a.value}`},i.toDisplayString(g.value.userOptions.labels.showTable),9,SH)]),i.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:Ue,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${g.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-quadrant-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:g.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},NH,8,TH)):(i.openBlock(),i.createElementBlock("span",LH,"PDF"))],12,kH),i.createElementVNode("button",{class:"vue-ui-quadrant-button",onClick:b,style:i.normalizeStyle(`color:${g.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${g.value.style.chart.backgroundColor};color:${g.value.style.chart.color}`),onClick:fe},[i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(x,S)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${a.value}_${S}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(x.color,.05)}${i.unref(Et)[g.value.style.chart.layout.areas.opacity]}`},null,8,DH),i.createElementVNode("stop",{offset:"100%","stop-color":x.color+i.unref(Et)[g.value.style.chart.layout.areas.opacity]},null,8,QH)],8,IH))),256))]),g.value.style.chart.title.text&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",OH,[i.createElementVNode("text",{"font-size":g.value.style.chart.title.fontSize,fill:g.value.style.chart.title.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize+6,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.text),13,PH),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":g.value.style.chart.title.subtitle.fontSize,fill:g.value.style.chart.title.subtitle.color,x:m.value.width/2,y:g.value.style.chart.title.fontSize*2+6,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${g.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(g.value.style.chart.title.subtitle.text),13,MH)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),g.value.style.chart.layout.grid.graduations.show?(i.openBlock(),i.createElementBlock("g",RH,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(F.value,x=>(i.openBlock(),i.createElementBlock("rect",{fill:g.value.style.chart.layout.grid.graduations.fill?`${g.value.style.chart.layout.grid.graduations.color}${x.opacity}`:"none",x:x.x,y:x.y,height:x.height,width:x.width,"stroke-width":g.value.style.chart.layout.grid.graduations.strokeWidth,stroke:g.value.style.chart.layout.grid.graduations.stroke,rx:g.value.style.chart.layout.grid.graduations.roundingForce},null,8,HH))),256))])):i.createCommentVNode("",!0),i.createElementVNode("line",{x1:m.value.left,y1:m.value.centerY,x2:m.value.right,y2:m.value.centerY,stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,VH),i.createElementVNode("line",{x1:m.value.centerX,y1:m.value.top,x2:m.value.centerX,y2:m.value.bottom,stroke:g.value.style.chart.layout.grid.stroke,"stroke-width":g.value.style.chart.layout.grid.strokeWidth},null,8,$H),g.value.style.chart.layout.grid.showArrows?(i.openBlock(),i.createElementBlock("g",zH,[i.createElementVNode("polygon",{points:`${m.value.right-m.value.width*.02},${m.value.centerY-m.value.height*.009} ${m.value.right},${m.value.centerY} ${m.value.right-m.value.width*.02},${m.value.centerY+m.value.height*.009}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,KH),i.createElementVNode("polygon",{points:`${m.value.left+m.value.width*.02},${m.value.centerY-m.value.height*.009} ${m.value.left},${m.value.centerY} ${m.value.left+m.value.width*.02},${m.value.centerY+m.value.height*.009}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,GH),i.createElementVNode("polygon",{points:`${m.value.centerX-m.value.width*.013},${m.value.top+m.value.height*.015} ${m.value.centerX},${m.value.top} ${m.value.centerX+m.value.width*.013},${m.value.top+m.value.height*.015}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,jH),i.createElementVNode("polygon",{points:`${m.value.centerX-m.value.width*.013},${m.value.bottom-m.value.height*.015} ${m.value.centerX},${m.value.bottom} ${m.value.centerX+m.value.width*.013},${m.value.bottom-m.value.height*.015}`,fill:g.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,WH)])):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.show?(i.openBlock(),i.createElementBlock("g",XH,[g.value.style.chart.layout.labels.quadrantLabels.tl.text?(i.openBlock(),i.createElementBlock("text",{key:0,x:0,y:m.value.top-m.value.padding/2,"text-anchor":"start",fill:g.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:B[3]||(B[3]=x=>re("tl"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.tl.text),13,qH)):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.tr.text?(i.openBlock(),i.createElementBlock("text",{key:1,x:m.value.width,y:m.value.top-m.value.padding/2,"text-anchor":"end",fill:g.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:B[4]||(B[4]=x=>re("tr"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.tr.text),13,YH)):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.br.text?(i.openBlock(),i.createElementBlock("text",{key:2,x:m.value.width,y:m.value.bottom+m.value.padding*.7,"text-anchor":"end",fill:g.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:B[5]||(B[5]=x=>re("br"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.br.text),13,JH)):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.quadrantLabels.bl.text?(i.openBlock(),i.createElementBlock("text",{key:3,x:0,y:m.value.bottom+m.value.padding*.7,"text-anchor":"start",fill:g.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":g.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:i.normalizeStyle(`font-weight:${g.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:B[6]||(B[6]=x=>re("bl"))},i.toDisplayString(g.value.style.chart.layout.labels.quadrantLabels.bl.text),13,ZH)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),g.value.style.chart.layout.labels.axisLabels.show?(i.openBlock(),i.createElementBlock("g",eV,[i.createElementVNode("text",{x:m.value.centerX,y:m.value.top-m.value.padding/6,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(N.value.y.max),9,tV),i.createElementVNode("text",{x:m.value.centerX,y:m.value.top-m.value.padding/2,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(g.value.style.chart.layout.grid.yAxis.name),9,rV),i.createElementVNode("text",{x:m.value.centerX,y:m.value.bottom+m.value.padding*.35,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.negative},i.toDisplayString(N.value.y.min),9,nV),i.createElementVNode("text",{id:"xLabelMin","text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.negative},i.toDisplayString(N.value.x.min),9,aV),i.createElementVNode("text",{id:"xLabelMax","text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(N.value.x.max),9,AV),i.createElementVNode("text",{id:"xLabelMaxName","text-anchor":"middle","font-size":g.value.style.chart.layout.labels.axisLabels.fontSize,fill:g.value.style.chart.layout.labels.axisLabels.color.positive},i.toDisplayString(g.value.style.chart.layout.grid.xAxis.name),9,iV)])):i.createCommentVNode("",!0),g.value.style.chart.layout.areas.show?(i.openBlock(),i.createElementBlock("g",oV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,(x,S)=>(i.openBlock(),i.createElementBlock("g",null,[x.series.length>2?(i.openBlock(),i.createElementBlock("polygon",{key:0,fill:g.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${a.value}_${S})`:`${x.color}${i.unref(Et)[g.value.style.chart.layout.areas.opacity]}`,points:i.unref(qQ)(x)},null,8,sV)):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,x=>(i.openBlock(),i.createElementBlock("g",null,[x.shape==="circle"?(i.openBlock(),i.createElementBlock("g",lV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("circle",{cx:S.x,cy:S.y,r:g.value.style.chart.layout.plots.radius*.8,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[7]||(B[7]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,cV))),256))])):i.createCommentVNode("",!0),x.shape==="triangle"?(i.openBlock(),i.createElementBlock("g",uV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:3,rotation:.52}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[8]||(B[8]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,hV))),256))])):i.createCommentVNode("",!0),x.shape==="square"?(i.openBlock(),i.createElementBlock("g",fV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:4,rotation:.8}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[9]||(B[9]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,dV))),256))])):i.createCommentVNode("",!0),x.shape==="diamond"?(i.openBlock(),i.createElementBlock("g",gV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:4,rotation:0}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[10]||(B[10]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,pV))),256))])):i.createCommentVNode("",!0),x.shape==="pentagon"?(i.openBlock(),i.createElementBlock("g",mV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:5,rotation:.95}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[11]||(B[11]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,yV))),256))])):i.createCommentVNode("",!0),x.shape==="hexagon"?(i.openBlock(),i.createElementBlock("g",vV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("path",{d:i.unref(eA)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius,sides:6,rotation:0}).path,fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[12]||(B[12]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,wV))),256))])):i.createCommentVNode("",!0),x.shape==="star"?(i.openBlock(),i.createElementBlock("g",BV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("polygon",{points:i.unref(Xh)({plot:{x:S.x,y:S.y},radius:g.value.style.chart.layout.plots.radius}),fill:x.color,stroke:g.value.style.chart.layout.plots.outline?g.value.style.chart.layout.plots.outlineColor:"none","stroke-width":g.value.style.chart.layout.plots.outlineWidth,onMouseover:D=>he(x,S),onMouseout:B[13]||(B[13]=D=>p.value=!1),onClick:D=>ge(x,S)},null,40,xV))),256))])):i.createCommentVNode("",!0)]))),256)),y.value.plotLabels.show?(i.openBlock(),i.createElementBlock("g",bV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(U.value,x=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.series,S=>(i.openBlock(),i.createElementBlock("text",{x:S.x,y:S.y+g.value.style.chart.layout.labels.plotLabels.offsetY+g.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":g.value.style.chart.layout.labels.plotLabels.fontSize,fill:g.value.style.chart.layout.labels.plotLabels.color},i.toDisplayString(S.name),9,CV))),256))]))),256))])):i.createCommentVNode("",!0),g.value.style.chart.legend.show&&y.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:7,x:0,y:m.value.bottom+36,width:"100%",height:"90",style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-quadrant-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(x,S)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:D=>Y(x.id),style:i.normalizeStyle(`opacity:${Q.value.includes(x.id)?.5:1}`)},[i.createElementVNode("div",{innerHTML:x.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,FV),i.createElementVNode("span",null,i.toDisplayString(x.name),1)],12,_V))),256))],4)],8,EV)):i.createCommentVNode("",!0)],12,UH)),g.value.style.chart.legend.show&&(!y.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-quadrant-legend",style:i.normalizeStyle(`font-weight:${g.value.style.chart.legend.bold?"bold":""};background:${g.value.style.chart.legend.backgroundColor};color:${g.value.style.chart.legend.color};font-size:${g.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${g.value.style.chart.legend.bold?"bold":""}`),onClick:fe},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(x,S)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-quadrant-legend-item",onClick:D=>Y(x.id),style:i.normalizeStyle(`opacity:${Q.value.includes(x.id)?.5:1}`)},[i.createElementVNode("div",{innerHTML:x.shapePath,style:{display:"flex","align-items":"center","justify-content":"center"}},null,8,kV),i.createElementVNode("span",null,i.toDisplayString(x.name),1)],12,SV))),256))],4)):i.createCommentVNode("",!0),g.value.style.chart.tooltip.show&&p.value?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-quadrant-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${w.value.top}px;left:${w.value.left}px;background:${g.value.style.chart.tooltip.backgroundColor};color:${g.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,TV)):i.createCommentVNode("",!0),y.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:fe,class:"vue-ui-quadrant-table",style:i.normalizeStyle(`width:100%;margin-top:${y.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[g.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",NV,[i.createElementVNode("th",{colspan:5,style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(g.value.style.chart.title.text),1),g.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",LV," : "+i.toDisplayString(g.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value.head,x=>(i.openBlock(),i.createElementBlock("th",{style:i.normalizeStyle(`background:${g.value.table.th.backgroundColor};color:${g.value.table.th.color};outline:${g.value.table.th.outline}`)},[i.createElementVNode("div",UV,i.toDisplayString(x),1)],4))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value.body,x=>(i.openBlock(),i.createElementBlock("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x,S=>(i.openBlock(),i.createElementBlock("td",{style:i.normalizeStyle(`background:${g.value.table.td.backgroundColor};color:${g.value.table.td.color};outline:${g.value.table.td.outline}`)},i.toDisplayString(isNaN(S)?S:S.toFixed(g.value.table.td.roundingValue)),5))),256))]))),256))])])],4)):i.createCommentVNode("",!0)],12,vH))}},[["__scopeId","data-v-c200bf52"]]),voe="",DV=["id"],QV={class:"vue-ui-gauge-user-option-item"},OV=["id","name"],PV=["for"],MV=["disabled"],RV=["stroke"],HV=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-77e98d1e></path><path d="M18 16v.01" data-v-77e98d1e></path><path d="M6 16v.01" data-v-77e98d1e></path><path d="M12 5v.01" data-v-77e98d1e></path><path d="M12 12v.01" data-v-77e98d1e></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-77e98d1e></path>',6)],VV={key:1},$V=["viewBox"],zV=["id"],KV=["stop-color"],GV=["stop-color"],jV=["stop-color"],WV={key:0},XV=["font-size","fill","x","y"],qV=["font-size","fill","x","y"],YV=["font-size","fill","x","y"],JV=["d","stroke","stroke-width"],ZV={key:1},e$=["cx","cy","fill"],t$=["cx","cy","r","fill"],r$=["y","width","height","fill"],n$=["cx","cy","r","fill","stroke","stroke-width"],a$=["cx","cy","r","fill","stroke","stroke-width"],A$=["x","y","font-size","font-weight","fill"],i$=["x","y","font-size","font-weight","fill"],o$=["x1","y1","x2","y2","stroke","stroke-width"],s$=["x1","y1","x2","y2","stroke","stroke-width"],l$=["cx","cy","fill","r","stroke-width","stroke"],c$=["x","y","font-size","fill"],u$=Da({__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(t){const e=t,r=i.ref(`vue-ui-gauge-${Math.random()}`),n=i.ref(wa.vue_ui_gauge),a=i.ref(!1),A=i.ref(null),o=i.ref(null),s=i.computed(()=>{if(!Object.keys(e.config||{}).length)return n.value;const R=aa({defaultConfig:n.value,userConfig:e.config});return Aa(R)}),l=i.ref({inside:!s.value.style.chart.layout.useDiv}),c=i.computed(()=>{const R=[];e.dataset.series.forEach(U=>{R.push(U.from),R.push(U.to)});const I=Math.max(...R);return{...e.dataset,series:e.dataset.series.map((U,O)=>({...U,color:Nr(U.color)||It[O],value:(U.to-U.from)/I*100}))}}),u=i.computed(()=>({height:l.value.inside?512:358.4,width:512,top:l.value.inside?76.8:0,bottom:l.value.inside?435.2:358.4,centerX:l.value.inside?256:179.2,centerY:256})),p=i.ref(0),h=i.ref(0),d=i.ref(s.value.style.chart.animation.use?0:e.dataset.value),w=i.computed(()=>{const R=u.value.width/2,I=u.value.height*.69,U=Math.PI*((d.value+0-h.value)/(p.value-h.value))+Math.PI;return{x1:R,y1:I,x2:R+u.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.cos(U),y2:I+u.value.width/3.2*s.value.style.chart.layout.pointer.size*Math.sin(U)}}),g=i.computed(()=>{for(let R=0;R<c.value.series.length;R+=1){const{color:I,from:U,to:O}=c.value.series[R];if(d.value>=U&&d.value<=O)return I}return"#2D353C"});i.onMounted(()=>{const R=[];c.value.series.forEach(L=>{R.push(L.from),R.push(L.to)}),p.value=Math.max(...R),h.value=Math.min(...R);const I=String(p.value).length;let U=0,O=(I>2?.01:.001)*s.value.style.chart.animation.speed,q=(I>2?.05:.005)*s.value.style.chart.animation.acceleration;function T(){d.value+=O+U,U+=q,d.value<e.dataset.value?requestAnimationFrame(T):d.value=e.dataset.value}s.value.style.chart.animation.use&&(d.value=h.value,T())});function y([R,I],[U,O],[q,T],L){T=T%Math.PI;const G=ax(L),[Y,se]=jh(Wh(G,[U*Math.cos(q),O*Math.sin(q)]),[R,I]),[he,ge]=jh(Wh(G,[U*Math.cos(q+T),O*Math.sin(q+T)]),[R,I]),re=T>Math.PI?1:0,le=T>0?1:0;return{startX:Y,startY:se,endX:he,endY:ge,path:`M${Y} ${se} A ${[U,O,L/(2*Math.PI)*180,re,le,he,ge].join(" ")}`}}function m(R,I,U,O,q){let{series:T}=R;if(R.base||(R.base=1),!T||R.base===0)return{...T,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const L=[...T].map(se=>se.value).reduce((se,he)=>se+he,0),G=[];let Y=0;for(let se=0;se<T.length;se+=1){let he=T[se].value/L;const ge=he*(Math.PI*.975),le=T[se].value/2/L*Math.PI,{startX:fe,startY:Ue,endX:b,endY:_,path:B}=y([I,U],[O,q],[Y,ge],110);G.push({...T[se],proportion:he,ratio:ge,path:B,startX:fe,startY:Ue,endX:b,endY:_,center:y([I,U],[O,q],[Y,le],110)}),Y+=ge}return G}function F(R,I,U){const q=String(U).length>2?-3:0;return R===0?I+14+q:I+9+q}function N(R){return String(R).length>2?15:20}function Q(){a.value=!0,KA({domElement:document.getElementById(`vue-ui-gauge_${r.value}`),fileName:s.value.style.chart.title.text||"vue-ui-gauge"}).finally(()=>{a.value=!1})}function z(){o.value&&o.value.removeAttribute("open")}return(R,I)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-gauge",ref_key:"gaugeChart",ref:A,id:`vue-ui-gauge_${r.value}`,style:i.normalizeStyle(`font-family:${s.value.style.fontFamily};width:100%; text-align:center`)},[(!l.value.inside||a.value)&&s.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${s.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.color};font-size:${s.value.style.chart.title.fontSize}px;font-weight:${s.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.text),5),s.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0),isNaN(t.dataset.base)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(`width:100%;text-align:center;color:${s.value.style.chart.title.subtitle.color};font-size:${s.value.style.chart.title.subtitle.fontSize}px;font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.translations.base)+" : "+i.toDisplayString(t.dataset.base),5))],4)):i.createCommentVNode("",!0),s.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-gauge-user-options",style:i.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:o},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},i.toDisplayString(s.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-gauge-user-options-items",style:i.normalizeStyle(`background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`)},[i.createElementVNode("div",QV,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-gauge-option-title_${r.value}`,name:`vue-ui-gauge-option-title_${r.value}`,"onUpdate:modelValue":I[0]||(I[0]=U=>l.value.inside=U)},null,8,OV),[[i.vModelCheckbox,l.value.inside]]),i.createElementVNode("label",{for:`vue-ui-gauge-option-title_${r.value}`},i.toDisplayString(s.value.userOptions.labels.useDiv),9,PV)]),i.createElementVNode("button",{class:"vue-ui-gauge-button",onClick:Q,disabled:a.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${s.value.style.chart.color}`])},[a.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-gauge-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:s.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},HV,8,RV)):(i.openBlock(),i.createElementBlock("span",VV,"PDF"))],12,MV)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${s.value.style.chart.backgroundColor};color:${s.value.style.chart.color}`),onClick:z},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{id:`gradient_${r.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[i.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${i.unref(Et)[1]}`},null,8,KV),i.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${i.unref(Et)[s.value.style.chart.layout.track.gradientIntensity]}`},null,8,GV),i.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${i.unref(Et)[1]}`},null,8,jV)],8,zV)]),s.value.style.chart.title.text&&l.value.inside&&!a.value?(i.openBlock(),i.createElementBlock("g",WV,[i.createElementVNode("text",{"font-size":s.value.style.chart.title.fontSize*1.5,fill:s.value.style.chart.title.color,x:u.value.width/2,y:s.value.style.chart.title.fontSize*1.5+20,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${s.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.text),13,XV),s.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:u.value.width/2,y:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.style.chart.title.subtitle.text),13,qV)):i.createCommentVNode("",!0),isNaN(t.dataset.base)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("text",{key:1,"font-size":s.value.style.chart.title.subtitle.fontSize*1.5,fill:s.value.style.chart.title.subtitle.color,x:u.value.width/2,y:s.value.style.chart.title.subtitle.text?s.value.style.chart.title.fontSize*2.3*2+20:s.value.style.chart.title.fontSize*1.5*2+20,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${s.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(s.value.translations.base)+" : "+i.toDisplayString(t.dataset.base),13,YV))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m(c.value,u.value.width/2,u.value.height*.7,u.value.width/2.5,u.value.width/2.5),(U,O)=>(i.openBlock(),i.createElementBlock("path",{key:`arc_${O}`,d:U.path,fill:"none",stroke:U.color,"stroke-linecap":"round","stroke-width":u.value.width/16*s.value.style.chart.layout.track.size},null,8,JV))),128)),s.value.style.chart.layout.track.useGradient?(i.openBlock(),i.createElementBlock("g",ZV,[i.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height*.69,r:"225",fill:`url(#gradient_${r.value})`,stroke:"none"},null,8,e$),i.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height*.69+4,r:188*1/s.value.style.chart.layout.track.size,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,t$),i.createElementVNode("rect",{x:0,y:u.value.height*.69,width:u.value.width,height:u.value.height-u.value.height*.69,fill:s.value.style.chart.backgroundColor,stroke:"none"},null,8,r$)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m(c.value,u.value.width/2,u.value.height*.7,u.value.width/2.5,u.value.width/2.5),(U,O)=>(i.openBlock(),i.createElementBlock("circle",{cx:U.center.startX,cy:O===0?U.center.startY+5:U.center.startY,r:u.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,n$))),256)),i.createElementVNode("circle",{cx:u.value.width*.9,cy:u.value.height*.69,r:u.value.width/31*s.value.style.chart.layout.track.size*s.value.style.chart.layout.markers.size,fill:s.value.style.chart.layout.markers.backgroundColor,stroke:s.value.style.chart.layout.markers.stroke,"stroke-width":s.value.style.chart.layout.markers.strokeWidth},null,8,a$),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m(c.value,u.value.width/2,u.value.height*.7,u.value.width/2.5,u.value.width/2.5),(U,O)=>(i.openBlock(),i.createElementBlock("text",{x:U.center.startX,y:F(O,U.center.startY,U.from)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":N(U.from)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},i.toDisplayString(U.from.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,A$))),256)),i.createElementVNode("text",{x:u.value.width*.9,y:F(1,u.value.height*.69,p.value)+s.value.style.chart.layout.markers.offsetY,"text-anchor":"middle","font-size":N(p.value)*s.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${s.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:s.value.style.chart.layout.markers.color},i.toDisplayString(p.value.toFixed(s.value.style.chart.layout.markers.roundingValue)),9,i$),isNaN(w.value.x2)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("line",{key:2,x1:w.value.x1,y1:w.value.y1,x2:w.value.x2,y2:w.value.y2,stroke:s.value.style.chart.layout.pointer.stroke,"stroke-width":s.value.style.chart.layout.pointer.strokeWidth,"stroke-linecap":"round"},null,8,o$)),isNaN(w.value.x2)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("line",{key:3,x1:w.value.x1,y1:w.value.y1,x2:w.value.x2,y2:w.value.y2,stroke:s.value.style.chart.layout.pointer.useRatingColor?g.value:s.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":s.value.style.chart.layout.pointer.strokeWidth*.7},null,8,s$)),i.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height*.69,fill:s.value.style.chart.layout.pointer.circle.color,r:s.value.style.chart.layout.pointer.circle.radius,"stroke-width":s.value.style.chart.layout.pointer.circle.strokeWidth,stroke:s.value.style.chart.layout.pointer.circle.stroke},null,8,l$),i.createElementVNode("text",{x:u.value.width/2,y:u.value.height*.9,"text-anchor":"middle","font-size":s.value.style.chart.legend.fontSize,"font-weight":"bold",fill:s.value.style.chart.legend.useRatingColor?g.value:s.value.style.chart.legend.color},i.toDisplayString(s.value.style.chart.legend.prefix)+" "+i.toDisplayString(s.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":"")+i.toDisplayString(d.value.toFixed(s.value.style.chart.legend.roundingValue))+" "+i.toDisplayString(s.value.style.chart.legend.suffix),9,c$)],12,$V))],12,DV))}},[["__scopeId","data-v-77e98d1e"]]),xoe="",h$=["id"],f$={class:"vue-ui-chestnut-user-option-item"},d$=["id","name"],g$=["for"],p$=["disabled"],m$=["stroke"],y$=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-6650dd2d></path><path d="M18 16v.01" data-v-6650dd2d></path><path d="M6 16v.01" data-v-6650dd2d></path><path d="M12 5v.01" data-v-6650dd2d></path><path d="M12 12v.01" data-v-6650dd2d></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-6650dd2d></path>',6)],v$={key:1},w$=["viewBox"],B$={key:0},x$=["fill","font-weight","font-size","x","y"],b$=["fill","font-weight","font-size","x","y"],C$=["id"],E$=["stop-color"],_$=["stop-color"],F$=["id"],S$=["stop-color"],k$=["stop-color"],T$=["id"],N$=["stop-color"],L$=["stop-color"],U$=["stop-color"],I$=["id"],D$=["stop-color"],Q$=["stop-color"],O$=["stop-color"],P$=["id"],M$=["stop-color"],R$=["stop-color"],H$=["stop-color"],V$={key:1},$$=["x","y","font-size","font-weight","fill"],z$=["x","y","font-size","font-weight","fill"],K$=["d","stroke"],G$=["cx","cy","r","fill"],j$=["cx","cy","r","fill","stroke","stroke-width","onClick"],W$={key:2},X$=["x","y","font-size","fill","onClick"],q$={key:0},Y$=["x","y","fill","font-size","font-weight"],J$=["x","y","height","width","fill","rx","onClick"],Z$=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],ez={key:3},tz=["x","y","fill","font-size","onClick"],rz=["d","stroke"],nz=["cx","cy","fill","onClick"],az=["fill","cx","cy","r","onClick"],Az={key:4},iz=["x","y","font-size","font-weight","fill"],oz=["x1","x2","y1","y2","stroke","stroke-width"],sz=["y","height","width"],lz={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},cz={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},uz={viewBox:"0 0 20 20",height:"16",width:"16"},hz=["fill"],fz={key:6},dz=["y","height","width"],gz={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},pz={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},mz={viewBox:"0 0 20 20",height:"16",width:"16"},yz=["fill"],vz=["cx","cy","fill"],wz=["cx","cy","fill"],Bz=["d","stroke"],xz=["cx","cy","fill"],bz=["cx","cy","fill"],Cz=["d","stroke"],Ez=["x","y","fill","font-size","font-weight"],_z=["x","y","fill","font-size","font-weight"],Fz=["x","text-anchor","y","fill","font-size"],Sz=["x","text-anchor","y","fill","font-size"],kz=["x","text-anchor","y","fill","font-size"],Tz=["x","text-anchor","y","fill","font-size"],Nz=["x","text-anchor","y","fill","font-size"],Lz=["x","y","font-size","fill"],Uz=["x","y","font-size","fill"],Iz=["x","y","font-size","fill"],Dz={key:0},Qz={key:0},Oz={key:0},Pz={key:1},Mz={key:0},Rz={key:1},Hz={key:0},Vz={key:1},$z={key:0},zz={key:1},Kz={key:0},Gz={key:1},jz={key:0},Wz={key:1},Xz={key:0},qz={key:1},Yz=Da({__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-chestnut-${Math.random()}`),A=i.ref(wa.vue_ui_chestnut),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0});i.ref(!1),i.ref(""),i.onMounted(()=>{document.addEventListener("mousemove",p)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",p)});function p(de){u.value.x=de.clientX,u.value.y=de.clientY}i.computed(()=>{let de=0,ke=48;if(l.value&&radarChart.value){const{width:ne,height:Ee}=l.value.getBoundingClientRect(),xe=radarChart.value.getBoundingClientRect();u.value.x+ne/2>xe.right?de=-ne:u.value.x-ne/2<xe.left?de=0:de=-ne/2,u.value.y+Ee>xe.bottom&&(ke=-Ee-48)}return{top:u.value.y+ke,left:u.value.x+de}});const h=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const de=aa({defaultConfig:A.value,userConfig:n.config});return Aa(de)}),d=i.ref({showTable:h.value.table.show}),w=i.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),g=i.computed(()=>({left:w.value.padding.left,top:w.value.padding.top,right:w.value.width-w.value.padding.right,bottom:w.value.height-w.value.padding.bottom,width:w.value.width-(w.value.padding.left+w.value.padding.right),height:w.value.height-(w.value.padding.top+w.value.padding.bottom),seedX:w.value.padding.left+64})),y=i.computed(()=>n.dataset.flatMap(de=>de.branches.map(ke=>ke.value)).reduce((de,ke)=>de+ke)),m=i.computed(()=>n.dataset.map((de,ke)=>{const ne=de.branches.map(Ee=>Ee.value).reduce((Ee,xe)=>Ee+xe);return{...de,color:Nr(de.color)||It[ke]||It[ke%It.length],id:de.id||`root_${ke}_${a.value}`,type:"root",total:ne,rootIndex:ke,branches:de.branches.map((Ee,xe)=>({...Ee,rootName:de.name,rootIndex:ke,color:Nr(de.color)||It[ke]||It[ke%It.length],value:Ee.value>=0?Ee.value:0,id:Ee.id||`branch_${ke}_${xe}_${a.value}`,proportionToRoot:Ee.value/ne,type:"branch",breakdown:Ee.breakdown.map((te,Pe)=>({table:{rootName:de.name,rootValue:ne,rootToTotal:ne/y.value,branchName:Ee.name,branchValue:Ee.value,branchToTotal:Ee.value/y.value,branchToRoot:Ee.value/ne,nutName:te.name,nutValue:te.value,nutToTotal:te.value/y.value,nutToRoot:te.value/ne,nutToBranch:te.value/Ee.value},...te,type:"nut",branchName:Ee.name,rootName:de.name,branchTotal:Ee.value>=0?Ee.value:0,proportionToBranch:te.value/Ee.value,proportionToRoot:te.value/ne,proportionToTree:te.value/y.value,rootIndex:ke,id:te.id||`nut_${ke}_${xe}_${Pe}_${a.value}`,color:Nr(te.color)||It[Pe]||It[Pe%It.length],value:te.value>=0?te.value:0}))}))}}));function F(){return m.value}e({getData:F});const N=i.computed(()=>m.value.flatMap(de=>de.branches).length),Q=i.computed(()=>Math.max(...m.value.map(de=>de.branches.map(ke=>ke.value).reduce((ke,ne)=>ke+ne,0)))),z=i.computed(()=>Math.max(...m.value.flatMap(de=>de.branches.map(ke=>ke.value)))),R=i.computed(()=>256+w.value.padding.left),I=i.computed(()=>m.value.sort((de,ke)=>ke.total-de.total).map((de,ke)=>{const ne=g.value.height/m.value.length/2,Ee=de.total/Q.value*(ne>64?64:ne);return{...de,x:g.value.seedX,y:g.value.top+g.value.height/m.value.length*(ke+1)-(g.value.height/m.value.length/2+w.value.gap/2),r:Ee<w.value.branchSize/2?w.value.branchSize/2:Ee}})),U=i.computed(()=>h.value.style.chart.layout.branches.widthRatio<=0?.1:h.value.style.chart.layout.branches.widthRatio>1.8?1.8:h.value.style.chart.layout.branches.widthRatio),O=i.computed(()=>I.value.flatMap(de=>de.branches)),q=i.computed(()=>O.value.sort((de,ke)=>ke.value-de.value).map((de,ke)=>({...de,y1:ke*w.value.branchSize+g.value.top+ke*w.value.gap,y2:ke*w.value.branchSize+w.value.branchSize,x1:R.value,x2:384*de.value/z.value*U.value+R.value})));function T(de){const ke=I.value.find(ne=>ne.rootIndex===de.rootIndex);return{x:ke.x,y:ke.y,r:ke.r}}const L=i.ref(null),G=i.ref(null),Y=i.ref(null),se=i.ref(null);function he(){L.value=null,Y.value=null,se.value=null}i.computed(()=>L.value?L.value.rootIndex:null);function ge(de){return se.value?se.value===null?!0:de.type==="root"?de.id===se.value.id:de.rootIndex===se.value.rootIndex:L.value===null&&Y.value===null?!0:de.type==="nut"?L.value.id===de.id:de.type==="branch"?Y.value.id===de.id:de.type==="root"?Y.value&&Y.value.rootIndex===de.rootIndex||L.value&&L.value.rootIndex===de.rootIndex:!1}function re(de){he(),i.nextTick(()=>{L.value=de,Y.value=de,G.value=Gh({series:de.breakdown,base:1},de.x2+24+h.value.style.chart.layout.nuts.offsetX,de.y1+w.value.branchSize/2,80,80),r("selectNut",de.breakdown)})}function le(){L.value=null,G.value=null,r("selectNut",null)}function fe(de){Y.value&&Y.value.id===de.id?(Y.value=null,he(),r("selectBranch",null)):(he(),Y.value=de,r("selectBranch",de))}function Ue(de){se.value&&se.value.id===de.id?(he(),r("selectRoot",null)):(he(),se.value=de,r("selectRoot",de))}function b(de,ke=!1){let ne=0,Ee=ke?16:0,xe="middle";return de.center.endX>de.cx?(ne=de.center.endX+16+Ee,xe="start"):de.center.endX<de.cx?(ne=de.center.endX-16-Ee,xe="end"):(ne=de.centerX+Ee,xe="middle"),{x:ne,anchor:xe}}function _(de){return de.center.endY>de.cy?de.center.endY+16:de.center.endY<de.cy?de.center.endY-32:de.center.endY}function B(){return g.value.bottom-(L.value.y1+180)<0?0:g.value.bottom}function x(de){const ke=`M${b(de).x},${_(de)-4} `,ne=` ${de.center.endX},${de.center.endY}`;let Ee="";return de.center.endX>de.cx?Ee=`${b(de).x-12},${_(de)-4}`:de.center.endX<de.cx?Ee=`${b(de).x+12},${_(de)-4}`:Ee=`${b(de).x+12},${_(de)-4}`,`${ke}${Ee}${ne}`}function S(de){return de.proportion*100>h.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}i.onMounted(()=>{const de=N.value*(w.value.branchSize+w.value.gap)+w.value.padding.top+w.value.padding.bottom;w.value.height=de});function D(){o.value=!0,KA({domElement:document.getElementById(`vue-ui-chestnut_${a.value}`),fileName:h.value.style.chart.layout.title.text||"vue-ui-chestnut"}).finally(()=>{o.value=!1})}const W=i.computed(()=>{const de=[h.value.table.th.translations.rootName,h.value.table.th.translations.rootValue,h.value.table.th.translations.rootToTotal,h.value.table.th.translations.branchName,h.value.table.th.translations.branchValue,h.value.table.th.translations.branchToRoot,h.value.table.th.translations.branchToTotal,h.value.table.th.translations.nutName,h.value.table.th.translations.nutValue,h.value.table.th.translations.nutToBranch,h.value.table.th.translations.nutToRoot,h.value.table.th.translations.nutToTotal],ke=m.value.flatMap((ne,Ee)=>ne.branches.flatMap((xe,te)=>xe.breakdown.flatMap((Pe,rt)=>Pe.table)));return{head:de,body:ke}});function ue(){i.nextTick(()=>{const de=[[h.value.style.chart.layout.title.text],[h.value.style.chart.layout.title.subtitle.text],[""],["Grand total",y.value],[""]],ke=W.value.head,ne=W.value.body.map((xe,te)=>[W.value.body[te-1]&&W.value.body[te-1].rootName===xe.rootName?"":xe.rootName,W.value.body[te-1]&&W.value.body[te-1].rootName===xe.rootName?"":xe.rootValue,W.value.body[te-1]&&W.value.body[te-1].rootName===xe.rootName?"":xe.rootToTotal,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchName,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchValue,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchToRoot,W.value.body[te-1]&&W.value.body[te-1].branchName===xe.branchName?"":xe.branchToTotal,xe.nutName,xe.nutValue,xe.nutToBranch,xe.nutToRoot,xe.nutToTotal]),Ee=de.concat([ke]).concat(ne);ei(Ee,h.value.style.chart.layout.title.text||"vue-ui-chestnut")})}function Ce(de){de.target&&de.target.tagName==="svg"&&he(),c.value&&c.value.removeAttribute("open")}return(de,ke)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-chestnut",ref_key:"chestnutChart",ref:s,id:`vue-ui-chestnut_${a.value}`,style:i.normalizeStyle(`font-family:${h.value.style.fontFamily};width:100%; text-align:center`)},[h.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:0,class:"vue-ui-chestnut-user-options",style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},i.toDisplayString(h.value.userOptions.title),5),i.createElementVNode("div",f$,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-chestnut-option-table_${a.value}`,name:`vue-ui-chestnut-option-table_${a.value}`,"onUpdate:modelValue":ke[0]||(ke[0]=ne=>d.value.showTable=ne)},null,8,d$),[[i.vModelCheckbox,d.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-chestnut-option-table_${a.value}`},i.toDisplayString(h.value.userOptions.labels.showTable),9,g$)]),i.createElementVNode("div",{class:"vue-ui-chestnut-user-options-items",style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)},[i.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:D,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${h.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-chestnut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:h.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},y$,8,m$)):(i.openBlock(),i.createElementBlock("span",v$,"PDF"))],12,p$),i.createElementVNode("button",{class:"vue-ui-chestnut-button",onClick:ue,style:i.normalizeStyle(`background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),w.value.height>0?(i.openBlock(),i.createElementBlock("svg",{key:1,viewBox:`0 0 ${w.value.width} ${w.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${h.value.style.chart.backgroundColor};color:${h.value.style.chart.color}`),onClick:Ce},[L.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("g",B$,[h.value.style.chart.layout.title.text?(i.openBlock(),i.createElementBlock("text",{key:0,"text-anchor":"middle",fill:h.value.style.chart.layout.title.color,"font-weight":h.value.style.chart.layout.title.bold?"bold":"normal","font-size":h.value.style.chart.layout.title.fontSize,x:w.value.width/2,y:12+h.value.style.chart.layout.title.fontSize+h.value.style.chart.layout.title.offsetY,onClick:he},i.toDisplayString(h.value.style.chart.layout.title.text),9,x$)):i.createCommentVNode("",!0),h.value.style.chart.layout.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"middle",fill:h.value.style.chart.layout.title.subtitle.color,"font-weight":h.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":h.value.style.chart.layout.title.subtitle.fontSize,x:w.value.width/2,y:48+h.value.style.chart.layout.title.subtitle.fontSize+h.value.style.chart.layout.title.subtitle.offsetY,onClick:he},i.toDisplayString(h.value.style.chart.layout.title.subtitle.text),9,b$)):i.createCommentVNode("",!0)])),i.createElementVNode("defs",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,(ne,Ee)=>(i.openBlock(),i.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${a.value}_${ne.rootIndex}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(ne.color,.05)}${i.unref(Et)[100-h.value.style.chart.layout.roots.gradientIntensity]}`},null,8,E$),i.createElementVNode("stop",{offset:"100%","stop-color":ne.color},null,8,_$)],8,C$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,ne=>(i.openBlock(),i.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${a.value}_${ne.rootIndex}`},[i.createElementVNode("stop",{offset:"0%","stop-color":ne.color},null,8,S$),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(ZA)(ne.color,.02)}${i.unref(Et)[100-h.value.style.chart.layout.branches.gradientIntensity]}`},null,8,k$)],8,F$))),256)),i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${i.unref(Et)[0]}`},null,8,N$),i.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${i.unref(Et)[h.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,L$),i.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${i.unref(Et)[0]}`},null,8,U$)],8,T$),i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${i.unref(Et)[0]}`},null,8,D$),i.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${i.unref(Et)[h.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Q$),i.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${i.unref(Et)[0]}`},null,8,O$)],8,I$),i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${h.value.style.chart.backgroundColor}${i.unref(Et)[100]}`},null,8,M$),i.createElementVNode("stop",{offset:"80%","stop-color":`${h.value.style.chart.backgroundColor}${i.unref(Et)[60]}`},null,8,R$),i.createElementVNode("stop",{offset:"100%","stop-color":`${h.value.style.chart.backgroundColor}${i.unref(Et)[0]}`},null,8,H$)],8,P$)]),h.value.style.chart.layout.grandTotal.show?(i.openBlock(),i.createElementBlock("g",V$,[i.createElementVNode("text",{x:g.value.seedX,y:32+h.value.style.chart.layout.grandTotal.offsetY,"font-size":h.value.style.chart.layout.grandTotal.fontSize,"font-weight":h.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:h.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:he},i.toDisplayString(h.value.style.chart.layout.grandTotal.text),9,$$),i.createElementVNode("text",{x:g.value.seedX,y:38+h.value.style.chart.layout.grandTotal.fontSize+h.value.style.chart.layout.grandTotal.offsetY,"font-size":h.value.style.chart.layout.grandTotal.fontSize,"font-weight":h.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:h.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:he},i.toDisplayString(h.value.style.chart.layout.grandTotal.prefix)+" "+i.toDisplayString(y.value.toFixed(h.value.style.chart.layout.grandTotal.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.grandTotal.suffix),9,z$)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(w.value.branchSize,(Ee,xe)=>(i.openBlock(),i.createElementBlock("path",{d:`M
374
374
  ${ne.x1},${ne.y1+xe}
375
375
  C${ne.x1-20},${ne.y1+xe}
376
376
  ${ne.x1-80},${ne.y1+xe}
377
377
  ${T(ne).x+T(ne).r/2}, ${T(ne).y}
378
- `,stroke:`${ne.color}${i.unref(St)[h.value.style.chart.layout.links.opacity]}`,fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:i.normalizeStyle(`opacity:${ge(ne)?1:0}`),onClick:he},null,12,K$))),256))]))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("circle",{cx:ne.x,cy:ne.y,r:ne.r,fill:h.value.style.chart.layout.roots.underlayerColor,stroke:"none",style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`)},null,12,G$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("circle",{cx:ne.x,cy:ne.y,r:ne.r,fill:h.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${a.value}_${ne.rootIndex})`:ne.color,stroke:h.value.style.chart.layout.roots.stroke,"stroke-width":h.value.style.chart.layout.roots.strokeWidth,style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>Ue(ne)},null,12,j$))),256)),h.value.style.chart.layout.roots.labels.show?(i.openBlock(),i.createElementBlock("g",W$,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("text",{x:ne.x,y:ne.y+h.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":h.value.style.chart.layout.roots.labels.fontSize,fill:h.value.style.chart.layout.roots.labels.adaptColorToBackground?i.unref(Qg)(ne.color):h.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>Ue(ne)},i.toDisplayString(h.value.style.chart.layout.roots.labels.prefix)+" "+i.toDisplayString(ne.total.toFixed(h.value.style.chart.layout.roots.labels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.roots.labels.suffix),13,X$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[L.value&&ne.rootIndex===L.value.rootIndex||Y.value&&ne.rootIndex===Y.value.rootIndex||se.value&&ne.rootIndex===se.value.rootIndex?(i.openBlock(),i.createElementBlock("g",q$,[i.createElementVNode("text",{x:ne.x,y:ne.y+ne.r+24,"text-anchor":"middle",fill:h.value.style.chart.layout.roots.labels.name.color,"font-size":h.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":h.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:he},i.toDisplayString(ne.name),9,Y$)])):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("rect",{x:ne.x1,y:ne.y1,height:w.value.branchSize,width:ne.x2-ne.x1,fill:h.value.style.chart.layout.branches.underlayerColor,rx:h.value.style.chart.layout.branches.borderRadius,stroke:"none",style:i.normalizeStyle(`opacity:${ge(ne)?1:.05}`),onClick:Ee=>fe(ne)},null,12,J$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("rect",{x:ne.x1,y:ne.y1,height:w.value.branchSize,width:ne.x2-ne.x1,fill:h.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${a.value}_${ne.rootIndex})`:ne.color,rx:h.value.style.chart.layout.branches.borderRadius,stroke:h.value.style.chart.layout.branches.stroke,"stroke-width":h.value.style.chart.layout.branches.strokeWidth,style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>fe(ne)},null,12,Z$))),256)),h.value.style.chart.layout.branches.labels.dataLabels.show?(i.openBlock(),i.createElementBlock("g",ez,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[ne.proportionToRoot*100>h.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(i.openBlock(),i.createElementBlock("text",{key:0,x:ne.x1+6,y:ne.y1+w.value.branchSize/1.5,"text-anchor":"start",fill:i.unref(Qg)(ne.color),"font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>fe(ne)},i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+i.toDisplayString(ne.value.toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.suffix),13,tz)):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Gh)({series:ne.breakdown,base:1},ne.x2+24+h.value.style.chart.layout.nuts.offsetX,ne.y1+w.value.branchSize/2,w.value.branchSize/3,w.value.branchSize/3),(Ee,xe)=>(i.openBlock(),i.createElementBlock("path",{d:Ee.path,stroke:Ee.color,"stroke-width":10,fill:"none",style:i.normalizeStyle(`opacity:${ge(ne)?1:.1}`)},null,12,rz))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,Ee=>(i.openBlock(),i.createElementBlock("circle",{cx:Ee.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:Ee.y1+w.value.branchSize/2,r:6,fill:h.value.style.chart.backgroundColor,onClick:xe=>re(Ee),style:{cursor:"pointer"}},null,8,nz))),256)),i.createElementVNode("circle",{fill:h.value.style.chart.layout.nuts.useGradient?`url(#nut_${a.value})`:"transparent",cx:ne.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:ne.y1+w.value.branchSize/2,r:w.value.branchSize/2+2,onClick:Ee=>re(ne),style:i.normalizeStyle(`cursor:pointer;opacity:${ge(ne)?1:.1}`)},null,12,az)]))),256)),h.value.style.chart.layout.branches.labels.show&&!Y.value?(i.openBlock(),i.createElementBlock("g",Az,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("text",{x:ne.x2+w.value.branchSize+24+h.value.style.chart.layout.nuts.offsetX,y:ne.y1+w.value.branchSize/2+5,"font-size":h.value.style.chart.layout.branches.labels.fontSize,"font-weight":h.value.style.chart.layout.branches.labels.bold?"bold":"normal",fill:h.value.style.chart.layout.branches.labels.color,"text-anchor":"start",style:i.normalizeStyle(`opacity:${ge(ne)?1:.1}`)},i.toDisplayString(ne.name),13,iz))),256))])):i.createCommentVNode("",!0),i.createElementVNode("line",{x1:256+w.value.padding.left,x2:256+w.value.padding.left,y1:g.value.top,y2:g.value.bottom,stroke:h.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":h.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,oz),!L.value&&!Y.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:5,x:0,y:g.value.bottom,height:w.value.height-g.value.bottom,width:w.value.width,style:{overflow:"visible"},onClick:he},[i.createElementVNode("div",lz,[i.createElementVNode("div",cz,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${h.value.style.chart.layout.legend.fontSize}px;`)},[(i.openBlock(),i.createElementBlock("svg",uz,[i.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:ne.color,stroke:"none"},null,8,hz)])),i.createElementVNode("span",null,i.toDisplayString(ne.name),1),i.createTextVNode(" : "),i.createElementVNode("b",null,i.toDisplayString(h.value.style.chart.layout.legend.prefix)+" "+i.toDisplayString(ne.total.toFixed(h.value.style.chart.layout.legend.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.legend.suffix),1),i.createTextVNode("("+i.toDisplayString((ne.total/y.value*100).toFixed(h.value.style.chart.layout.legend.roundingPercentage))+"%) ",1)],4))),256))])])],8,sz)):i.createCommentVNode("",!0),L.value&&G.value?(i.openBlock(),i.createElementBlock("g",fz,[(i.openBlock(),i.createElementBlock("foreignObject",{x:0,y:B(),height:w.value.height-g.value.bottom,width:w.value.width,style:{overflow:"visible"},onClick:he},[i.createElementVNode("div",gz,[i.createElementVNode("b",null,i.toDisplayString(L.value.name),1),i.createElementVNode("div",pz,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(L.value.breakdown,(ne,Ee)=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${h.value.style.chart.layout.legend.fontSize}px;`)},[(i.openBlock(),i.createElementBlock("svg",mz,[i.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:ne.color,stroke:"none"},null,8,yz)])),i.createElementVNode("span",null,[i.createTextVNode(i.toDisplayString(ne.name)+" : ",1),i.createElementVNode("b",null,i.toDisplayString(h.value.style.chart.layout.legend.prefix)+" "+i.toDisplayString(ne.value.toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.legend.suffix),1),i.createTextVNode(" ("+i.toDisplayString((ne.proportionToBranch*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,dz)),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${a.value})`,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,vz),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:118,fill:h.value.style.chart.backgroundColor,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,wz),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,ne=>(i.openBlock(),i.createElementBlock("path",{d:ne.path,stroke:ne.color,"stroke-width":64,fill:"none",onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Bz))),256)),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:100,fill:`url(#nutpick_${a.value})`,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,xz),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:48,fill:h.value.style.chart.backgroundColor,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,bz),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[S(ne)?(i.openBlock(),i.createElementBlock("path",{key:0,d:x(ne),stroke:ne.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Cz)):i.createCommentVNode("",!0)]))),256)),i.createElementVNode("text",{x:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,y:L.value.y1+8,fill:h.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":h.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString(h.value.translations.total),11,Ez),i.createElementVNode("text",{x:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,y:L.value.y1+36,fill:h.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":h.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.core.value.prefix)+" "+i.toDisplayString(L.value.value.toFixed(h.value.style.chart.layout.nuts.selected.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.core.value.suffix),11,_z),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(ne,Ee)=>(i.openBlock(),i.createElementBlock("g",null,[S(ne)?(i.openBlock(),i.createElementBlock("text",{key:0,x:b(ne).x,"text-anchor":b(ne).anchor,y:_(ne),fill:ne.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,Fz)):i.createCommentVNode("",!0),S(ne)?(i.openBlock(),i.createElementBlock("text",{key:1,x:b(ne,!0).x,"text-anchor":b(ne,!0).anchor,y:_(ne),fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString(L.value.breakdown[Ee].name),15,Sz)):i.createCommentVNode("",!0)]))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(ne,Ee)=>(i.openBlock(),i.createElementBlock("g",null,[S(ne)?(i.openBlock(),i.createElementBlock("text",{key:0,x:b(ne,!0).x,"text-anchor":b(ne).anchor,y:_(ne)+h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString((L.value.breakdown[Ee].value/L.value.value*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.of)+" "+i.toDisplayString(L.value.breakdown[Ee].branchName)+" ("+i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix)+" "+i.toDisplayString(L.value.breakdown[Ee].value)+" "+i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix)+") ",15,kz)):i.createCommentVNode("",!0),S(ne)?(i.openBlock(),i.createElementBlock("text",{key:1,x:b(ne,!0).x,"text-anchor":b(ne).anchor,y:_(ne)+h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString((L.value.breakdown[Ee].proportionToRoot*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.of)+" "+i.toDisplayString(L.value.breakdown[Ee].rootName),15,Tz)):i.createCommentVNode("",!0),S(ne)?(i.openBlock(),i.createElementBlock("text",{key:2,x:b(ne,!0).x,"text-anchor":b(ne).anchor,y:_(ne)+h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString((L.value.breakdown[Ee].proportionToTree*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.proportionToTree),15,Nz)):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[Y.value&&Y.value.id===ne.id&&!L.value?(i.openBlock(),i.createElementBlock("text",{key:0,x:ne.x1+6,y:ne.y1+w.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.branches.labels.color,onClick:he},i.toDisplayString(ne.name)+" : "+i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+i.toDisplayString(ne.value.toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.suffix),9,Lz)):i.createCommentVNode("",!0),Y.value&&Y.value.id===ne.id&&!L.value?(i.openBlock(),i.createElementBlock("text",{key:1,x:ne.x1+6,y:ne.y1+w.value.branchSize+48,"text-anchor":"start","font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.branches.labels.color,onClick:he},i.toDisplayString((ne.proportionToRoot*100).toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.of)+" "+i.toDisplayString(ne.rootName),9,Uz)):i.createCommentVNode("",!0),Y.value&&Y.value.id===ne.id&&!L.value?(i.openBlock(),i.createElementBlock("text",{key:2,x:ne.x1+6,y:ne.y1+w.value.branchSize+72,"text-anchor":"start","font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.branches.labels.color,onClick:he},i.toDisplayString((ne.value/y.value*100).toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.proportionToTree),9,Iz)):i.createCommentVNode("",!0)]))),256))],12,w$)):i.createCommentVNode("",!0),d.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:2,onClick:Ce,class:"vue-ui-chestnut-table",style:"width:100%;overflow-x:auto"},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[h.value.style.chart.layout.title.text?(i.openBlock(),i.createElementBlock("tr",Dz,[i.createElementVNode("th",{colspan:"12",style:i.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(h.value.style.chart.layout.title.text),1),h.value.style.chart.layout.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",Qz," : "+i.toDisplayString(h.value.style.chart.layout.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(W.value.head,ne=>(i.openBlock(),i.createElementBlock("th",{style:i.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},i.toDisplayString(ne),5))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(W.value.body,(ne,Ee)=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].rootName===ne.rootName?(i.openBlock(),i.createElementBlock("span",Oz)):(i.openBlock(),i.createElementBlock("span",Pz,i.toDisplayString(ne.rootName),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].rootName===ne.rootName?(i.openBlock(),i.createElementBlock("span",Mz)):(i.openBlock(),i.createElementBlock("span",Rz,i.toDisplayString(ne.rootValue.toFixed(h.value.table.td.roundingValue)),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].rootName===ne.rootName?(i.openBlock(),i.createElementBlock("span",Hz)):(i.openBlock(),i.createElementBlock("span",Vz,i.toDisplayString((ne.rootToTotal*100).toFixed(h.value.table.td.roundingPercentage))+"% ",1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",$z)):(i.openBlock(),i.createElementBlock("span",zz,i.toDisplayString(ne.branchName),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",Kz)):(i.openBlock(),i.createElementBlock("span",Gz,i.toDisplayString(ne.branchValue.toFixed(h.value.table.td.roundingValue)),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",jz)):(i.openBlock(),i.createElementBlock("span",Wz,i.toDisplayString((ne.branchToRoot*100).toFixed(h.value.table.td.roundingPercentage))+"% ",1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",Xz)):(i.openBlock(),i.createElementBlock("span",qz,i.toDisplayString((ne.branchToTotal*100).toFixed(h.value.table.td.roundingPercentage))+"% ",1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString(ne.nutName),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString(ne.nutValue.toFixed(h.value.table.td.roundingValue)),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString((ne.nutToBranch*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString((ne.nutToRoot*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString((ne.nutToTotal*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5)]))),256))])])])):i.createCommentVNode("",!0)],12,h$))}},[["__scopeId","data-v-6650dd2d"]]),Eoe="",Jz=["id"],Zz={class:"vue-ui-onion-user-option-item"},eK=["id","name"],tK=["for"],rK={class:"vue-ui-onion-user-option-item"},nK=["id","name"],aK=["for"],AK=["disabled"],iK=["stroke"],oK=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-82c99d17></path><path d="M18 16v.01" data-v-82c99d17></path><path d="M6 16v.01" data-v-82c99d17></path><path d="M12 5v.01" data-v-82c99d17></path><path d="M12 12v.01" data-v-82c99d17></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-82c99d17></path>',6)],sK={key:1},lK=["viewBox"],cK=["id"],uK=["stop-color"],hK=["stop-color"],fK=["stop-color"],dK={key:0},gK=["font-size","fill","x","y"],pK=["font-size","fill","x","y"],mK=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],yK=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],vK={key:1},wK=["cx","cy","r","fill"],BK={key:2},xK=["x","y","font-size","fill","font-weight"],bK=["y","height"],CK=["onClick"],EK=["onClick"],_K={key:0},FK={key:0},SK=["colspan"],kK=Da({__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-onion-${Math.random()}`),A=i.ref(wa.vue_ui_onion),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const O=aa({defaultConfig:A.value,userConfig:n.config});return Aa(O)}),u=i.ref({inside:!c.value.style.chart.layout.useDiv,showTable:c.value.table.show}),p=i.computed(()=>{const O=u.value.inside?80:64;return{height:512,width:512,padding:{top:O,left:O,right:O,bottom:O}}}),h=i.computed(()=>({top:p.value.padding.top,left:p.value.padding.left,right:p.value.width-p.value.padding.right,bottom:p.value.height-p.value.padding.bottom,centerX:p.value.width/2,centerY:p.value.height/2,width:p.value.width-p.value.padding.right-p.value.padding.left,height:p.value.height-p.value.padding.bottom-p.value.padding.top,minRadius:64,maxRadius:p.value.width-p.value.padding.right-p.value.padding.left})),d=i.computed(()=>n.dataset.map((O,q)=>({...O,color:Nr(O.color)||It[q],id:`onion_serie_${q}_${a.value}`}))),w=i.ref([]),g=i.computed(()=>d.value.filter(O=>!w.value.includes(O.id)).length),y=i.computed(()=>({gutter:h.value.width/2/g.value*c.value.style.chart.layout.gutter.width,track:h.value.width/2/g.value*c.value.style.chart.layout.track.width})),m=i.computed(()=>d.value.filter(O=>!w.value.includes(O.id)).map((O,q)=>{const T=(h.value.maxRadius-y.value.track)/g.value/2*(1+q),L=h.value.centerY-(h.value.centerY-h.value.top-c.value.style.chart.layout.labels.fontSize)/g.value*(q+1);return{...O,labelY:L,radius:T,path:F(T,O.percentage)}}));function F(O,q){const T=O*(1.5+(q/100>.3333333333333333?0:1-q/100))*Math.PI,L=O*1.5*Math.PI;return{bgDashArray:`${L} ${L}`,bgDashOffset:L-q/100*L,dashArray:`${T} ${T}`,dashOffset:T-q/100*T,fullOffset:0,active:`M${h.value.centerX},${h.value.centerY} A ${O},${O} 0 0 0 ${h.value.right},${h.value.top}`}}function N(O){w.value.includes(O)?w.value=w.value.filter(q=>q!==O):w.value.push(O),r("selectLegend",m.value)}function Q(){return m.value}e({getData:Q});const z=i.computed(()=>{const O=[c.value.table.translations.serie,c.value.table.translations.percentage,c.value.table.translations.value],q=m.value.map(T=>[T.name,T.percentage,T.value]);return{head:O,body:q}});function R(){o.value=!0,i.nextTick(()=>{KA({domElement:document.getElementById(`vue-ui-onion_${a.value}`),fileName:c.value.style.chart.title.text||"vue-ui-onion"}).finally(()=>{o.value=!1})})}function I(){i.nextTick(()=>{const O=[[c.value.style.chart.title.text],[c.value.style.chart.title.subtitle.text],[""]],q=z.value.head,T=z.value.body,L=O.concat([q]).concat(T);ei(L,c.value.style.chart.title.text||"vue-ui-onion")})}function U(){l.value&&l.value.removeAttribute("open")}return(O,q)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-onion",ref_key:"onionChart",ref:s,id:`vue-ui-onion_${a.value}`,style:i.normalizeStyle(`font-family:${c.value.style.fontFamily};width:100%; text-align:center`)},[(!u.value.inside||o.value)&&c.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${c.value.style.chart.backgroundColor}`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${c.value.style.chart.title.color};font-size:${c.value.style.chart.title.fontSize}px;font-weight:${c.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.text),5),c.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${c.value.style.chart.title.subtitle.color};font-size:${c.value.style.chart.title.subtitle.fontSize}px;font-weight:${c.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),c.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-onion-user-options",style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:l},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},i.toDisplayString(c.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-onion-user-options-items",style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},[i.createElementVNode("div",Zz,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-onion-option-title_${a.value}`,name:`vue-ui-onion-option-title_${a.value}`,"onUpdate:modelValue":q[0]||(q[0]=T=>u.value.inside=T)},null,8,eK),[[i.vModelCheckbox,u.value.inside]]),i.createElementVNode("label",{for:`vue-ui-onion-option-title_${a.value}`},i.toDisplayString(c.value.userOptions.labels.useDiv),9,tK)]),i.createElementVNode("div",rK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-onion-option-table_${a.value}`,name:`vue-ui-onion-option-table_${a.value}`,"onUpdate:modelValue":q[1]||(q[1]=T=>u.value.showTable=T)},null,8,nK),[[i.vModelCheckbox,u.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-onion-option-table_${a.value}`},i.toDisplayString(c.value.userOptions.labels.showTable),9,aK)]),i.createElementVNode("button",{class:"vue-ui-onion-button",onClick:R,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-onion-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:c.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},oK,8,iK)):(i.openBlock(),i.createElementBlock("span",sK,"PDF"))],12,AK),i.createElementVNode("button",{class:"vue-ui-onion-button",onClick:I,style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${p.value.width} ${p.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),onClick:U},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{id:`onion_gradient_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(Nr)(c.value.style.chart.backgroundColor)}00`},null,8,uK),i.createElementVNode("stop",{offset:"90%","stop-color":"#FFFFFF"+i.unref(St)[c.value.style.chart.gradientIntensity]},null,8,hK),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(Nr)(c.value.style.chart.backgroundColor)}00`},null,8,fK)],8,cK)]),c.value.style.chart.title.text&&u.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",dK,[i.createElementVNode("text",{"font-size":c.value.style.chart.title.fontSize,fill:c.value.style.chart.title.color,x:p.value.width/2,y:c.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${c.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.text),13,gK),c.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":c.value.style.chart.title.subtitle.fontSize,fill:c.value.style.chart.title.subtitle.color,x:p.value.width/2,y:c.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${c.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.subtitle.text),13,pK)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("circle",{cx:h.value.centerX,cy:h.value.centerY,r:T.radius,stroke:c.value.style.chart.layout.gutter.color,"stroke-width":y.value.gutter,fill:"none","stroke-dasharray":T.path.bgDashArray,"stroke-dashoffset":T.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,mK))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("circle",{cx:h.value.centerX,cy:h.value.centerY,r:T.radius,stroke:`${T.color}`,"stroke-width":y.value.track,fill:"none","stroke-dasharray":T.path.dashArray,"stroke-dashoffset":T.path.dashOffset,class:"vue-ui-onion-path","stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,yK))),256)),c.value.style.chart.useGradient?(i.openBlock(),i.createElementBlock("g",vK,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("circle",{cx:h.value.centerX,cy:h.value.centerY,r:T.radius*1.1,stroke:"none",fill:`url(#onion_gradient_${a.value})`,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,wK))),256))])):i.createCommentVNode("",!0),c.value.style.chart.layout.labels.show?(i.openBlock(),i.createElementBlock("g",BK,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("g",null,[w.value.includes(T.id)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("text",{key:0,x:p.value.width/2-y.value.gutter*.8+c.value.style.chart.layout.labels.offsetX,y:T.labelY,"text-anchor":"end","font-size":c.value.style.chart.layout.labels.fontSize,fill:c.value.style.chart.layout.labels.color,"font-weight":c.value.style.chart.layout.labels.bold?"bold":"normal"},i.toDisplayString(T.name)+" "+i.toDisplayString(c.value.style.chart.layout.labels.percentage.show?` : ${T.percentage.toFixed(c.value.style.chart.layout.labels.roundingPercentage)}%`:"")+" "+i.toDisplayString(!c.value.style.chart.layout.labels.percentage.show&&c.value.style.chart.layout.labels.value.show?` : ${T.value?`${T.prefix}${T.value.toFixed(c.value.style.chart.layout.labels.roundingValue)}${T.suffix}`:""}`:`${c.value.style.chart.layout.labels.value.show&&T.value?`(${T.prefix}${T.value.toFixed(c.value.style.chart.layout.labels.roundingValue)}${T.suffix})`:""}`),9,xK))]))),256))])):i.createCommentVNode("",!0),c.value.style.chart.legend.show&&u.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:3,x:0,y:h.value.bottom,width:"100%",height:p.value.height-h.value.bottom,style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-onion-legend",style:i.normalizeStyle(`color:${c.value.style.chart.legend.color};font-size:${c.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${c.value.style.chart.legend.bold?"bold":""}`),onClick:U},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(T,L)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-onion-legend-item",onClick:G=>N(T.id),style:i.normalizeStyle(`opacity:${w.value.includes(T.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${T.color};font-size:${c.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(T.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(T.percentage.toFixed(c.value.style.chart.legend.roundingPercentage))+"% ",1)],12,CK))),256))],4)],8,bK)):i.createCommentVNode("",!0)],12,lK)),c.value.style.chart.legend.show&&(!u.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-onion-legend",style:i.normalizeStyle(`background:${c.value.style.chart.legend.backgroundColor};color:${c.value.style.chart.legend.color};font-size:${c.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${c.value.style.chart.legend.bold?"bold":""}`),onClick:U},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(T,L)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-onion-legend-item",onClick:G=>N(T.id),style:i.normalizeStyle(`opacity:${w.value.includes(T.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${T.color};font-size:${c.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(T.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(T.percentage.toFixed(c.value.style.chart.legend.roundingPercentage))+"% ",1)],12,EK))),256))],4)):i.createCommentVNode("",!0),u.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:3,onClick:U,class:"vue-ui-onion-table",style:i.normalizeStyle(`width:100%;margin-top:${u.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[c.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",_K,[i.createElementVNode("th",{colspan:"3",style:i.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(c.value.style.chart.title.text),1),c.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",FK," : "+i.toDisplayString(c.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value.head,T=>(i.openBlock(),i.createElementBlock("th",{colspan:T.color?2:1,style:i.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},i.toDisplayString(T),13,SK))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${T.color}`)}," ⬤ ",4),i.createTextVNode(" "+i.toDisplayString(T.name),1)],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},i.toDisplayString(isNaN(T.percentage)?"":T.percentage.toFixed(c.value.table.td.roundingPercentage))+"% ",5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},i.toDisplayString(T.prefix)+i.toDisplayString(isNaN(T.value)?"":T.value.toFixed(c.value.table.td.roundingValue))+i.toDisplayString(T.suffix),5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,Jz))}},[["__scopeId","data-v-82c99d17"]]),Soe="",TK=["id"],NK={class:"vue-ui-vertical-bar-user-option-item"},LK=["id","name"],UK=["for"],IK={class:"vue-ui-vertical-bar-user-option-item"},DK=["id","name"],QK=["for"],OK={class:"vue-ui-vertical-bar-user-option-item"},PK=["id","name"],MK=["for"],RK=["disabled"],HK=["stroke"],VK=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-44939c84></path><path d="M18 16v.01" data-v-44939c84></path><path d="M6 16v.01" data-v-44939c84></path><path d="M12 5v.01" data-v-44939c84></path><path d="M12 12v.01" data-v-44939c84></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-44939c84></path>',6)],$K={key:1},zK=["viewBox"],KK=["id"],GK=["stop-color"],jK=["stop-color"],WK={key:0},XK=["font-size","fill","x","y"],qK=["font-size","fill","x","y"],YK=["x","y","width","height","fill","rx"],JK=["x","y","width","height","fill","rx","stroke","stroke-width"],ZK=["x2","y1","y2","stroke","stroke-width"],eG=["x","y","font-size","fill","font-weight"],tG=["x","y","font-size","fill","font-weight"],rG=["x","y","font-size","fill","font-weight"],nG=["x","y","font-size","fill","font-weight"],aG=["y","width","height","fill","onMouseenter"],AG=["y","height"],iG=["onClick"],oG=["onClick"],sG=["innerHTML"],lG={key:0},cG={key:0},uG={style:{width:"100%"}},hG=Da({__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-vertical-bar-${Math.random()}`),A=i.ref(wa.vue_ui_vertical_bar),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref(""),d=i.ref(0),w=i.ref(null);i.onMounted(()=>{document.addEventListener("mousemove",g),d.value=n.dataset.flatMap(x=>x.children&&x.children.length>0?x.children.length:1).reduce((x,S)=>x+S,0)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(x){u.value.x=x.clientX,u.value.y=x.clientY}const y=i.computed(()=>{let x=0,S=48;if(l.value&&s.value){const{width:D,height:W}=l.value.getBoundingClientRect(),ue=s.value.getBoundingClientRect();u.value.x+D/2>ue.right?x=-D:u.value.x-D/2<ue.left?x=0:x=-D/2,u.value.y+W>ue.bottom&&(S=-W-48)}return{top:u.value.y+S,left:u.value.x+x}}),m=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const x=aa({defaultConfig:A.value,userConfig:n.config});return Aa(x)}),F=i.ref({inside:!m.value.style.chart.layout.useDiv,showTable:m.value.table.show,sortDesc:m.value.style.chart.layout.bars.sort==="desc"}),N=i.computed(()=>F.value.sortDesc),Q=i.computed(()=>n.dataset.sort((x,S)=>N.value?S.value-x.value:x.value-S.value).map((x,S)=>({...x,id:`vertical_parent_${S}_${a.value}`,hasChildren:!!x.children&&x.children.length>0,isChild:!1,color:Nr(x.color)||It[S]||It[S%It.length],children:!x.children||!x.children.length?[]:x.children.sort((D,W)=>N.value?W.value-D.value:D.value-W.value).map((D,W)=>({...D,isChild:!0,parentId:`vertical_parent_${S}_${a.value}`,parentName:x.name,parentValue:x.value,id:`vertical_child_${S}_${W}_${a.value}`,childIndex:W,color:Nr(D.color)||Nr(x.color)||It[S]||It[S%It.length]})).map((D,W)=>({...D,isFirstChild:W===0,isLastChild:W===x.children.length-1}))}))),z=i.computed(()=>({width:512,height:(m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap)*d.value,padding:{top:F.value.inside?64:12,left:128+m.value.style.chart.layout.bars.offsetX,right:64+m.value.style.chart.layout.bars.paddingRight,bottom:F.value.inside?92:12}})),R=i.computed(()=>({fullHeight:z.value.padding.top+z.value.padding.bottom+z.value.height,top:z.value.padding.top,left:z.value.padding.left,right:z.value.width-z.value.padding.right,bottom:z.value.padding.top+z.value.height,width:z.value.width-(z.value.padding.left+z.value.padding.right)}));function I(){d.value=q.value.flatMap(x=>x.children&&x.children.length>0?x.children.length:1).reduce((x,S)=>x+S,0)}const U=i.ref([]);function O(x){U.value.includes(x)?U.value=U.value.filter(S=>S!==x):U.value.push(x),I(),r("selectLegend",q.value)}const q=i.computed(()=>Q.value.filter(x=>!U.value.includes(x.id))),T=i.computed(()=>q.value.map(x=>x.value).reduce((x,S)=>x+S));function L(x,S=!1,D=0){return S?(x/T.value*100).toFixed(D)+"%":x/T.value}const G=i.computed(()=>q.value.flatMap(x=>x.hasChildren?x.children:x)),Y=i.computed(()=>Math.max(...q.value.flatMap(x=>x.children&&x.children.length?Math.max(...x.children.map(S=>S.value)):x.value)));function se(x){const S=x/Y.value;return R.value.width*S}function he(x){return se(x)+R.value.left}function ge(x,S){const D=q.value.find(Ce=>Ce.id===x.parentId),W=R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*S,ue=D.children.length*(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height);return{y:W+ue/2,name:D.name,value:[void 0,NaN,null].includes(D.value)?"":D.value.toFixed(m.value.style.chart.layout.bars.dataLabels.value.roundingValue),percentageToTotal:isNaN(D.value/T.value)?"":L(D.value,!0,m.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)}}function re(){return q.value}e({getData:re,recalculateHeight:I});const le=i.ref(null);function fe(x){p.value=!0,le.value=x.id;let S="";const D=x.isChild?x.parentName:x.name,W=x.isChild?x.name:"";S+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;text-align:left;">
378
+ `,stroke:`${ne.color}${i.unref(Et)[h.value.style.chart.layout.links.opacity]}`,fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:i.normalizeStyle(`opacity:${ge(ne)?1:0}`),onClick:he},null,12,K$))),256))]))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("circle",{cx:ne.x,cy:ne.y,r:ne.r,fill:h.value.style.chart.layout.roots.underlayerColor,stroke:"none",style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`)},null,12,G$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("circle",{cx:ne.x,cy:ne.y,r:ne.r,fill:h.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${a.value}_${ne.rootIndex})`:ne.color,stroke:h.value.style.chart.layout.roots.stroke,"stroke-width":h.value.style.chart.layout.roots.strokeWidth,style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>Ue(ne)},null,12,j$))),256)),h.value.style.chart.layout.roots.labels.show?(i.openBlock(),i.createElementBlock("g",W$,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("text",{x:ne.x,y:ne.y+h.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":h.value.style.chart.layout.roots.labels.fontSize,fill:h.value.style.chart.layout.roots.labels.adaptColorToBackground?i.unref(Qg)(ne.color):h.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>Ue(ne)},i.toDisplayString(h.value.style.chart.layout.roots.labels.prefix)+" "+i.toDisplayString(ne.total.toFixed(h.value.style.chart.layout.roots.labels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.roots.labels.suffix),13,X$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[L.value&&ne.rootIndex===L.value.rootIndex||Y.value&&ne.rootIndex===Y.value.rootIndex||se.value&&ne.rootIndex===se.value.rootIndex?(i.openBlock(),i.createElementBlock("g",q$,[i.createElementVNode("text",{x:ne.x,y:ne.y+ne.r+24,"text-anchor":"middle",fill:h.value.style.chart.layout.roots.labels.name.color,"font-size":h.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":h.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:he},i.toDisplayString(ne.name),9,Y$)])):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("rect",{x:ne.x1,y:ne.y1,height:w.value.branchSize,width:ne.x2-ne.x1,fill:h.value.style.chart.layout.branches.underlayerColor,rx:h.value.style.chart.layout.branches.borderRadius,stroke:"none",style:i.normalizeStyle(`opacity:${ge(ne)?1:.05}`),onClick:Ee=>fe(ne)},null,12,J$))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("rect",{x:ne.x1,y:ne.y1,height:w.value.branchSize,width:ne.x2-ne.x1,fill:h.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${a.value}_${ne.rootIndex})`:ne.color,rx:h.value.style.chart.layout.branches.borderRadius,stroke:h.value.style.chart.layout.branches.stroke,"stroke-width":h.value.style.chart.layout.branches.strokeWidth,style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>fe(ne)},null,12,Z$))),256)),h.value.style.chart.layout.branches.labels.dataLabels.show?(i.openBlock(),i.createElementBlock("g",ez,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[ne.proportionToRoot*100>h.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(i.openBlock(),i.createElementBlock("text",{key:0,x:ne.x1+6,y:ne.y1+w.value.branchSize/1.5,"text-anchor":"start",fill:i.unref(Qg)(ne.color),"font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:i.normalizeStyle(`cursor:pointer; opacity:${ge(ne)?1:.05}`),onClick:Ee=>fe(ne)},i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+i.toDisplayString(ne.value.toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.suffix),13,tz)):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Gh)({series:ne.breakdown,base:1},ne.x2+24+h.value.style.chart.layout.nuts.offsetX,ne.y1+w.value.branchSize/2,w.value.branchSize/3,w.value.branchSize/3),(Ee,xe)=>(i.openBlock(),i.createElementBlock("path",{d:Ee.path,stroke:Ee.color,"stroke-width":10,fill:"none",style:i.normalizeStyle(`opacity:${ge(ne)?1:.1}`)},null,12,rz))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,Ee=>(i.openBlock(),i.createElementBlock("circle",{cx:Ee.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:Ee.y1+w.value.branchSize/2,r:6,fill:h.value.style.chart.backgroundColor,onClick:xe=>re(Ee),style:{cursor:"pointer"}},null,8,nz))),256)),i.createElementVNode("circle",{fill:h.value.style.chart.layout.nuts.useGradient?`url(#nut_${a.value})`:"transparent",cx:ne.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:ne.y1+w.value.branchSize/2,r:w.value.branchSize/2+2,onClick:Ee=>re(ne),style:i.normalizeStyle(`cursor:pointer;opacity:${ge(ne)?1:.1}`)},null,12,az)]))),256)),h.value.style.chart.layout.branches.labels.show&&!Y.value?(i.openBlock(),i.createElementBlock("g",Az,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("text",{x:ne.x2+w.value.branchSize+24+h.value.style.chart.layout.nuts.offsetX,y:ne.y1+w.value.branchSize/2+5,"font-size":h.value.style.chart.layout.branches.labels.fontSize,"font-weight":h.value.style.chart.layout.branches.labels.bold?"bold":"normal",fill:h.value.style.chart.layout.branches.labels.color,"text-anchor":"start",style:i.normalizeStyle(`opacity:${ge(ne)?1:.1}`)},i.toDisplayString(ne.name),13,iz))),256))])):i.createCommentVNode("",!0),i.createElementVNode("line",{x1:256+w.value.padding.left,x2:256+w.value.padding.left,y1:g.value.top,y2:g.value.bottom,stroke:h.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":h.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,oz),!L.value&&!Y.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:5,x:0,y:g.value.bottom,height:w.value.height-g.value.bottom,width:w.value.width,style:{overflow:"visible"},onClick:he},[i.createElementVNode("div",lz,[i.createElementVNode("div",cz,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ne=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${h.value.style.chart.layout.legend.fontSize}px;`)},[(i.openBlock(),i.createElementBlock("svg",uz,[i.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:ne.color,stroke:"none"},null,8,hz)])),i.createElementVNode("span",null,i.toDisplayString(ne.name),1),i.createTextVNode(" : "),i.createElementVNode("b",null,i.toDisplayString(h.value.style.chart.layout.legend.prefix)+" "+i.toDisplayString(ne.total.toFixed(h.value.style.chart.layout.legend.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.legend.suffix),1),i.createTextVNode("("+i.toDisplayString((ne.total/y.value*100).toFixed(h.value.style.chart.layout.legend.roundingPercentage))+"%) ",1)],4))),256))])])],8,sz)):i.createCommentVNode("",!0),L.value&&G.value?(i.openBlock(),i.createElementBlock("g",fz,[(i.openBlock(),i.createElementBlock("foreignObject",{x:0,y:B(),height:w.value.height-g.value.bottom,width:w.value.width,style:{overflow:"visible"},onClick:he},[i.createElementVNode("div",gz,[i.createElementVNode("b",null,i.toDisplayString(L.value.name),1),i.createElementVNode("div",pz,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(L.value.breakdown,(ne,Ee)=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${h.value.style.chart.layout.legend.fontSize}px;`)},[(i.openBlock(),i.createElementBlock("svg",mz,[i.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:ne.color,stroke:"none"},null,8,yz)])),i.createElementVNode("span",null,[i.createTextVNode(i.toDisplayString(ne.name)+" : ",1),i.createElementVNode("b",null,i.toDisplayString(h.value.style.chart.layout.legend.prefix)+" "+i.toDisplayString(ne.value.toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.legend.suffix),1),i.createTextVNode(" ("+i.toDisplayString((ne.proportionToBranch*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,dz)),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${a.value})`,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,vz),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:118,fill:h.value.style.chart.backgroundColor,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,wz),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,ne=>(i.openBlock(),i.createElementBlock("path",{d:ne.path,stroke:ne.color,"stroke-width":64,fill:"none",onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Bz))),256)),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:100,fill:`url(#nutpick_${a.value})`,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,xz),i.createElementVNode("circle",{cx:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,cy:L.value.y1+w.value.branchSize/2,r:48,fill:h.value.style.chart.backgroundColor,onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,bz),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[S(ne)?(i.openBlock(),i.createElementBlock("path",{key:0,d:x(ne),stroke:ne.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Cz)):i.createCommentVNode("",!0)]))),256)),i.createElementVNode("text",{x:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,y:L.value.y1+8,fill:h.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":h.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString(h.value.translations.total),11,Ez),i.createElementVNode("text",{x:L.value.x2+24+h.value.style.chart.layout.nuts.offsetX,y:L.value.y1+36,fill:h.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":h.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:le,class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.core.value.prefix)+" "+i.toDisplayString(L.value.value.toFixed(h.value.style.chart.layout.nuts.selected.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.core.value.suffix),11,_z),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(ne,Ee)=>(i.openBlock(),i.createElementBlock("g",null,[S(ne)?(i.openBlock(),i.createElementBlock("text",{key:0,x:b(ne).x,"text-anchor":b(ne).anchor,y:_(ne),fill:ne.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,Fz)):i.createCommentVNode("",!0),S(ne)?(i.openBlock(),i.createElementBlock("text",{key:1,x:b(ne,!0).x,"text-anchor":b(ne,!0).anchor,y:_(ne),fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString(L.value.breakdown[Ee].name),15,Sz)):i.createCommentVNode("",!0)]))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(ne,Ee)=>(i.openBlock(),i.createElementBlock("g",null,[S(ne)?(i.openBlock(),i.createElementBlock("text",{key:0,x:b(ne,!0).x,"text-anchor":b(ne).anchor,y:_(ne)+h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString((L.value.breakdown[Ee].value/L.value.value*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.of)+" "+i.toDisplayString(L.value.breakdown[Ee].branchName)+" ("+i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix)+" "+i.toDisplayString(L.value.breakdown[Ee].value)+" "+i.toDisplayString(h.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix)+") ",15,kz)):i.createCommentVNode("",!0),S(ne)?(i.openBlock(),i.createElementBlock("text",{key:1,x:b(ne,!0).x,"text-anchor":b(ne).anchor,y:_(ne)+h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString((L.value.breakdown[Ee].proportionToRoot*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.of)+" "+i.toDisplayString(L.value.breakdown[Ee].rootName),15,Tz)):i.createCommentVNode("",!0),S(ne)?(i.openBlock(),i.createElementBlock("text",{key:2,x:b(ne,!0).x,"text-anchor":b(ne).anchor,y:_(ne)+h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:h.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":h.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:i.normalizeStyle(`font-weight:${h.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:i.normalizeClass(h.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},i.toDisplayString((L.value.breakdown[Ee].proportionToTree*100).toFixed(h.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.proportionToTree),15,Nz)):i.createCommentVNode("",!0)]))),256))])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,ne=>(i.openBlock(),i.createElementBlock("g",null,[Y.value&&Y.value.id===ne.id&&!L.value?(i.openBlock(),i.createElementBlock("text",{key:0,x:ne.x1+6,y:ne.y1+w.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.branches.labels.color,onClick:he},i.toDisplayString(ne.name)+" : "+i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.prefix)+" "+i.toDisplayString(ne.value.toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingValue))+" "+i.toDisplayString(h.value.style.chart.layout.branches.labels.dataLabels.suffix),9,Lz)):i.createCommentVNode("",!0),Y.value&&Y.value.id===ne.id&&!L.value?(i.openBlock(),i.createElementBlock("text",{key:1,x:ne.x1+6,y:ne.y1+w.value.branchSize+48,"text-anchor":"start","font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.branches.labels.color,onClick:he},i.toDisplayString((ne.proportionToRoot*100).toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.of)+" "+i.toDisplayString(ne.rootName),9,Uz)):i.createCommentVNode("",!0),Y.value&&Y.value.id===ne.id&&!L.value?(i.openBlock(),i.createElementBlock("text",{key:2,x:ne.x1+6,y:ne.y1+w.value.branchSize+72,"text-anchor":"start","font-size":h.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:h.value.style.chart.layout.branches.labels.color,onClick:he},i.toDisplayString((ne.value/y.value*100).toFixed(h.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage))+"% "+i.toDisplayString(h.value.translations.proportionToTree),9,Iz)):i.createCommentVNode("",!0)]))),256))],12,w$)):i.createCommentVNode("",!0),d.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:2,onClick:Ce,class:"vue-ui-chestnut-table",style:"width:100%;overflow-x:auto"},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[h.value.style.chart.layout.title.text?(i.openBlock(),i.createElementBlock("tr",Dz,[i.createElementVNode("th",{colspan:"12",style:i.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(h.value.style.chart.layout.title.text),1),h.value.style.chart.layout.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",Qz," : "+i.toDisplayString(h.value.style.chart.layout.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(W.value.head,ne=>(i.openBlock(),i.createElementBlock("th",{style:i.normalizeStyle(`background:${h.value.table.th.backgroundColor};color:${h.value.table.th.color};outline:${h.value.table.th.outline}`)},i.toDisplayString(ne),5))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(W.value.body,(ne,Ee)=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].rootName===ne.rootName?(i.openBlock(),i.createElementBlock("span",Oz)):(i.openBlock(),i.createElementBlock("span",Pz,i.toDisplayString(ne.rootName),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].rootName===ne.rootName?(i.openBlock(),i.createElementBlock("span",Mz)):(i.openBlock(),i.createElementBlock("span",Rz,i.toDisplayString(ne.rootValue.toFixed(h.value.table.td.roundingValue)),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].rootName===ne.rootName?(i.openBlock(),i.createElementBlock("span",Hz)):(i.openBlock(),i.createElementBlock("span",Vz,i.toDisplayString((ne.rootToTotal*100).toFixed(h.value.table.td.roundingPercentage))+"% ",1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",$z)):(i.openBlock(),i.createElementBlock("span",zz,i.toDisplayString(ne.branchName),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",Kz)):(i.openBlock(),i.createElementBlock("span",Gz,i.toDisplayString(ne.branchValue.toFixed(h.value.table.td.roundingValue)),1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",jz)):(i.openBlock(),i.createElementBlock("span",Wz,i.toDisplayString((ne.branchToRoot*100).toFixed(h.value.table.td.roundingPercentage))+"% ",1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},[W.value.body[Ee-1]&&W.value.body[Ee-1].branchName===ne.branchName?(i.openBlock(),i.createElementBlock("span",Xz)):(i.openBlock(),i.createElementBlock("span",qz,i.toDisplayString((ne.branchToTotal*100).toFixed(h.value.table.td.roundingPercentage))+"% ",1))],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString(ne.nutName),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString(ne.nutValue.toFixed(h.value.table.td.roundingValue)),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString((ne.nutToBranch*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString((ne.nutToRoot*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${h.value.table.td.backgroundColor};color:${h.value.table.td.color};outline:${h.value.table.td.outline}`)},i.toDisplayString((ne.nutToTotal*100).toFixed(h.value.table.td.roundingPercentage))+"% ",5)]))),256))])])])):i.createCommentVNode("",!0)],12,h$))}},[["__scopeId","data-v-6650dd2d"]]),Eoe="",Jz=["id"],Zz={class:"vue-ui-onion-user-option-item"},eK=["id","name"],tK=["for"],rK={class:"vue-ui-onion-user-option-item"},nK=["id","name"],aK=["for"],AK=["disabled"],iK=["stroke"],oK=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-82c99d17></path><path d="M18 16v.01" data-v-82c99d17></path><path d="M6 16v.01" data-v-82c99d17></path><path d="M12 5v.01" data-v-82c99d17></path><path d="M12 12v.01" data-v-82c99d17></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-82c99d17></path>',6)],sK={key:1},lK=["viewBox"],cK=["id"],uK=["stop-color"],hK=["stop-color"],fK=["stop-color"],dK={key:0},gK=["font-size","fill","x","y"],pK=["font-size","fill","x","y"],mK=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],yK=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],vK={key:1},wK=["cx","cy","r","fill"],BK={key:2},xK=["x","y","font-size","fill","font-weight"],bK=["y","height"],CK=["onClick"],EK=["onClick"],_K={key:0},FK={key:0},SK=["colspan"],kK=Da({__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-onion-${Math.random()}`),A=i.ref(wa.vue_ui_onion),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const O=aa({defaultConfig:A.value,userConfig:n.config});return Aa(O)}),u=i.ref({inside:!c.value.style.chart.layout.useDiv,showTable:c.value.table.show}),p=i.computed(()=>{const O=u.value.inside?80:64;return{height:512,width:512,padding:{top:O,left:O,right:O,bottom:O}}}),h=i.computed(()=>({top:p.value.padding.top,left:p.value.padding.left,right:p.value.width-p.value.padding.right,bottom:p.value.height-p.value.padding.bottom,centerX:p.value.width/2,centerY:p.value.height/2,width:p.value.width-p.value.padding.right-p.value.padding.left,height:p.value.height-p.value.padding.bottom-p.value.padding.top,minRadius:64,maxRadius:p.value.width-p.value.padding.right-p.value.padding.left})),d=i.computed(()=>n.dataset.map((O,q)=>({...O,color:Nr(O.color)||It[q],id:`onion_serie_${q}_${a.value}`}))),w=i.ref([]),g=i.computed(()=>d.value.filter(O=>!w.value.includes(O.id)).length),y=i.computed(()=>({gutter:h.value.width/2/g.value*c.value.style.chart.layout.gutter.width,track:h.value.width/2/g.value*c.value.style.chart.layout.track.width})),m=i.computed(()=>d.value.filter(O=>!w.value.includes(O.id)).map((O,q)=>{const T=(h.value.maxRadius-y.value.track)/g.value/2*(1+q),L=h.value.centerY-(h.value.centerY-h.value.top-c.value.style.chart.layout.labels.fontSize)/g.value*(q+1);return{...O,labelY:L,radius:T,path:F(T,O.percentage)}}));function F(O,q){const T=O*(1.5+(q/100>.3333333333333333?0:1-q/100))*Math.PI,L=O*1.5*Math.PI;return{bgDashArray:`${L} ${L}`,bgDashOffset:L-q/100*L,dashArray:`${T} ${T}`,dashOffset:T-q/100*T,fullOffset:0,active:`M${h.value.centerX},${h.value.centerY} A ${O},${O} 0 0 0 ${h.value.right},${h.value.top}`}}function N(O){w.value.includes(O)?w.value=w.value.filter(q=>q!==O):w.value.push(O),r("selectLegend",m.value)}function Q(){return m.value}e({getData:Q});const z=i.computed(()=>{const O=[c.value.table.translations.serie,c.value.table.translations.percentage,c.value.table.translations.value],q=m.value.map(T=>[T.name,T.percentage,T.value]);return{head:O,body:q}});function R(){o.value=!0,i.nextTick(()=>{KA({domElement:document.getElementById(`vue-ui-onion_${a.value}`),fileName:c.value.style.chart.title.text||"vue-ui-onion"}).finally(()=>{o.value=!1})})}function I(){i.nextTick(()=>{const O=[[c.value.style.chart.title.text],[c.value.style.chart.title.subtitle.text],[""]],q=z.value.head,T=z.value.body,L=O.concat([q]).concat(T);ei(L,c.value.style.chart.title.text||"vue-ui-onion")})}function U(){l.value&&l.value.removeAttribute("open")}return(O,q)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-onion",ref_key:"onionChart",ref:s,id:`vue-ui-onion_${a.value}`,style:i.normalizeStyle(`font-family:${c.value.style.fontFamily};width:100%; text-align:center`)},[(!u.value.inside||o.value)&&c.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${c.value.style.chart.backgroundColor}`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${c.value.style.chart.title.color};font-size:${c.value.style.chart.title.fontSize}px;font-weight:${c.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.text),5),c.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${c.value.style.chart.title.subtitle.color};font-size:${c.value.style.chart.title.subtitle.fontSize}px;font-weight:${c.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),c.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-onion-user-options",style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:l},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},i.toDisplayString(c.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-onion-user-options-items",style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)},[i.createElementVNode("div",Zz,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-onion-option-title_${a.value}`,name:`vue-ui-onion-option-title_${a.value}`,"onUpdate:modelValue":q[0]||(q[0]=T=>u.value.inside=T)},null,8,eK),[[i.vModelCheckbox,u.value.inside]]),i.createElementVNode("label",{for:`vue-ui-onion-option-title_${a.value}`},i.toDisplayString(c.value.userOptions.labels.useDiv),9,tK)]),i.createElementVNode("div",rK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-onion-option-table_${a.value}`,name:`vue-ui-onion-option-table_${a.value}`,"onUpdate:modelValue":q[1]||(q[1]=T=>u.value.showTable=T)},null,8,nK),[[i.vModelCheckbox,u.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-onion-option-table_${a.value}`},i.toDisplayString(c.value.userOptions.labels.showTable),9,aK)]),i.createElementVNode("button",{class:"vue-ui-onion-button",onClick:R,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-onion-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:c.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},oK,8,iK)):(i.openBlock(),i.createElementBlock("span",sK,"PDF"))],12,AK),i.createElementVNode("button",{class:"vue-ui-onion-button",onClick:I,style:i.normalizeStyle(`background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${p.value.width} ${p.value.height}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${c.value.style.chart.backgroundColor};color:${c.value.style.chart.color}`),onClick:U},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{id:`onion_gradient_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(Nr)(c.value.style.chart.backgroundColor)}00`},null,8,uK),i.createElementVNode("stop",{offset:"90%","stop-color":"#FFFFFF"+i.unref(Et)[c.value.style.chart.gradientIntensity]},null,8,hK),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(Nr)(c.value.style.chart.backgroundColor)}00`},null,8,fK)],8,cK)]),c.value.style.chart.title.text&&u.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",dK,[i.createElementVNode("text",{"font-size":c.value.style.chart.title.fontSize,fill:c.value.style.chart.title.color,x:p.value.width/2,y:c.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${c.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.text),13,gK),c.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":c.value.style.chart.title.subtitle.fontSize,fill:c.value.style.chart.title.subtitle.color,x:p.value.width/2,y:c.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${c.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(c.value.style.chart.title.subtitle.text),13,pK)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("circle",{cx:h.value.centerX,cy:h.value.centerY,r:T.radius,stroke:c.value.style.chart.layout.gutter.color,"stroke-width":y.value.gutter,fill:"none","stroke-dasharray":T.path.bgDashArray,"stroke-dashoffset":T.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,mK))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("circle",{cx:h.value.centerX,cy:h.value.centerY,r:T.radius,stroke:`${T.color}`,"stroke-width":y.value.track,fill:"none","stroke-dasharray":T.path.dashArray,"stroke-dashoffset":T.path.dashOffset,class:"vue-ui-onion-path","stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,yK))),256)),c.value.style.chart.useGradient?(i.openBlock(),i.createElementBlock("g",vK,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("circle",{cx:h.value.centerX,cy:h.value.centerY,r:T.radius*1.1,stroke:"none",fill:`url(#onion_gradient_${a.value})`,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,wK))),256))])):i.createCommentVNode("",!0),c.value.style.chart.layout.labels.show?(i.openBlock(),i.createElementBlock("g",BK,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("g",null,[w.value.includes(T.id)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("text",{key:0,x:p.value.width/2-y.value.gutter*.8+c.value.style.chart.layout.labels.offsetX,y:T.labelY,"text-anchor":"end","font-size":c.value.style.chart.layout.labels.fontSize,fill:c.value.style.chart.layout.labels.color,"font-weight":c.value.style.chart.layout.labels.bold?"bold":"normal"},i.toDisplayString(T.name)+" "+i.toDisplayString(c.value.style.chart.layout.labels.percentage.show?` : ${T.percentage.toFixed(c.value.style.chart.layout.labels.roundingPercentage)}%`:"")+" "+i.toDisplayString(!c.value.style.chart.layout.labels.percentage.show&&c.value.style.chart.layout.labels.value.show?` : ${T.value?`${T.prefix}${T.value.toFixed(c.value.style.chart.layout.labels.roundingValue)}${T.suffix}`:""}`:`${c.value.style.chart.layout.labels.value.show&&T.value?`(${T.prefix}${T.value.toFixed(c.value.style.chart.layout.labels.roundingValue)}${T.suffix})`:""}`),9,xK))]))),256))])):i.createCommentVNode("",!0),c.value.style.chart.legend.show&&u.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:3,x:0,y:h.value.bottom,width:"100%",height:p.value.height-h.value.bottom,style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-onion-legend",style:i.normalizeStyle(`color:${c.value.style.chart.legend.color};font-size:${c.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${c.value.style.chart.legend.bold?"bold":""}`),onClick:U},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(T,L)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-onion-legend-item",onClick:G=>N(T.id),style:i.normalizeStyle(`opacity:${w.value.includes(T.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${T.color};font-size:${c.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(T.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(T.percentage.toFixed(c.value.style.chart.legend.roundingPercentage))+"% ",1)],12,CK))),256))],4)],8,bK)):i.createCommentVNode("",!0)],12,lK)),c.value.style.chart.legend.show&&(!u.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-onion-legend",style:i.normalizeStyle(`background:${c.value.style.chart.legend.backgroundColor};color:${c.value.style.chart.legend.color};font-size:${c.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${c.value.style.chart.legend.bold?"bold":""}`),onClick:U},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(T,L)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-onion-legend-item",onClick:G=>N(T.id),style:i.normalizeStyle(`opacity:${w.value.includes(T.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${T.color};font-size:${c.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(T.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(T.percentage.toFixed(c.value.style.chart.legend.roundingPercentage))+"% ",1)],12,EK))),256))],4)):i.createCommentVNode("",!0),u.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:3,onClick:U,class:"vue-ui-onion-table",style:i.normalizeStyle(`width:100%;margin-top:${u.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[c.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",_K,[i.createElementVNode("th",{colspan:"3",style:i.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(c.value.style.chart.title.text),1),c.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",FK," : "+i.toDisplayString(c.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value.head,T=>(i.openBlock(),i.createElementBlock("th",{colspan:T.color?2:1,style:i.normalizeStyle(`background:${c.value.table.th.backgroundColor};color:${c.value.table.th.color};outline:${c.value.table.th.outline}`)},i.toDisplayString(T),13,SK))),256))])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,T=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${T.color}`)}," ⬤ ",4),i.createTextVNode(" "+i.toDisplayString(T.name),1)],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},i.toDisplayString(isNaN(T.percentage)?"":T.percentage.toFixed(c.value.table.td.roundingPercentage))+"% ",5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${c.value.table.td.backgroundColor};color:${c.value.table.td.color};outline:${c.value.table.td.outline}`)},i.toDisplayString(T.prefix)+i.toDisplayString(isNaN(T.value)?"":T.value.toFixed(c.value.table.td.roundingValue))+i.toDisplayString(T.suffix),5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,Jz))}},[["__scopeId","data-v-82c99d17"]]),Soe="",TK=["id"],NK={class:"vue-ui-vertical-bar-user-option-item"},LK=["id","name"],UK=["for"],IK={class:"vue-ui-vertical-bar-user-option-item"},DK=["id","name"],QK=["for"],OK={class:"vue-ui-vertical-bar-user-option-item"},PK=["id","name"],MK=["for"],RK=["disabled"],HK=["stroke"],VK=[i.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-44939c84></path><path d="M18 16v.01" data-v-44939c84></path><path d="M6 16v.01" data-v-44939c84></path><path d="M12 5v.01" data-v-44939c84></path><path d="M12 12v.01" data-v-44939c84></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-44939c84></path>',6)],$K={key:1},zK=["viewBox"],KK=["id"],GK=["stop-color"],jK=["stop-color"],WK={key:0},XK=["font-size","fill","x","y"],qK=["font-size","fill","x","y"],YK=["x","y","width","height","fill","rx"],JK=["x","y","width","height","fill","rx","stroke","stroke-width"],ZK=["x2","y1","y2","stroke","stroke-width"],eG=["x","y","font-size","fill","font-weight"],tG=["x","y","font-size","fill","font-weight"],rG=["x","y","font-size","fill","font-weight"],nG=["x","y","font-size","fill","font-weight"],aG=["y","width","height","fill","onMouseenter"],AG=["y","height"],iG=["onClick"],oG=["onClick"],sG=["innerHTML"],lG={key:0},cG={key:0},uG={style:{width:"100%"}},hG=Da({__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-vertical-bar-${Math.random()}`),A=i.ref(wa.vue_ui_vertical_bar),o=i.ref(!1),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref({x:0,y:0}),p=i.ref(!1),h=i.ref(""),d=i.ref(0),w=i.ref(null);i.onMounted(()=>{document.addEventListener("mousemove",g),d.value=n.dataset.flatMap(x=>x.children&&x.children.length>0?x.children.length:1).reduce((x,S)=>x+S,0)}),i.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(x){u.value.x=x.clientX,u.value.y=x.clientY}const y=i.computed(()=>{let x=0,S=48;if(l.value&&s.value){const{width:D,height:W}=l.value.getBoundingClientRect(),ue=s.value.getBoundingClientRect();u.value.x+D/2>ue.right?x=-D:u.value.x-D/2<ue.left?x=0:x=-D/2,u.value.y+W>ue.bottom&&(S=-W-48)}return{top:u.value.y+S,left:u.value.x+x}}),m=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const x=aa({defaultConfig:A.value,userConfig:n.config});return Aa(x)}),F=i.ref({inside:!m.value.style.chart.layout.useDiv,showTable:m.value.table.show,sortDesc:m.value.style.chart.layout.bars.sort==="desc"}),N=i.computed(()=>F.value.sortDesc),Q=i.computed(()=>n.dataset.sort((x,S)=>N.value?S.value-x.value:x.value-S.value).map((x,S)=>({...x,id:`vertical_parent_${S}_${a.value}`,hasChildren:!!x.children&&x.children.length>0,isChild:!1,color:Nr(x.color)||It[S]||It[S%It.length],children:!x.children||!x.children.length?[]:x.children.sort((D,W)=>N.value?W.value-D.value:D.value-W.value).map((D,W)=>({...D,isChild:!0,parentId:`vertical_parent_${S}_${a.value}`,parentName:x.name,parentValue:x.value,id:`vertical_child_${S}_${W}_${a.value}`,childIndex:W,color:Nr(D.color)||Nr(x.color)||It[S]||It[S%It.length]})).map((D,W)=>({...D,isFirstChild:W===0,isLastChild:W===x.children.length-1}))}))),z=i.computed(()=>({width:512,height:(m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap)*d.value,padding:{top:F.value.inside?64:12,left:128+m.value.style.chart.layout.bars.offsetX,right:64+m.value.style.chart.layout.bars.paddingRight,bottom:F.value.inside?92:12}})),R=i.computed(()=>({fullHeight:z.value.padding.top+z.value.padding.bottom+z.value.height,top:z.value.padding.top,left:z.value.padding.left,right:z.value.width-z.value.padding.right,bottom:z.value.padding.top+z.value.height,width:z.value.width-(z.value.padding.left+z.value.padding.right)}));function I(){d.value=q.value.flatMap(x=>x.children&&x.children.length>0?x.children.length:1).reduce((x,S)=>x+S,0)}const U=i.ref([]);function O(x){U.value.includes(x)?U.value=U.value.filter(S=>S!==x):U.value.push(x),I(),r("selectLegend",q.value)}const q=i.computed(()=>Q.value.filter(x=>!U.value.includes(x.id))),T=i.computed(()=>q.value.map(x=>x.value).reduce((x,S)=>x+S));function L(x,S=!1,D=0){return S?(x/T.value*100).toFixed(D)+"%":x/T.value}const G=i.computed(()=>q.value.flatMap(x=>x.hasChildren?x.children:x)),Y=i.computed(()=>Math.max(...q.value.flatMap(x=>x.children&&x.children.length?Math.max(...x.children.map(S=>S.value)):x.value)));function se(x){const S=x/Y.value;return R.value.width*S}function he(x){return se(x)+R.value.left}function ge(x,S){const D=q.value.find(Ce=>Ce.id===x.parentId),W=R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*S,ue=D.children.length*(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height);return{y:W+ue/2,name:D.name,value:[void 0,NaN,null].includes(D.value)?"":D.value.toFixed(m.value.style.chart.layout.bars.dataLabels.value.roundingValue),percentageToTotal:isNaN(D.value/T.value)?"":L(D.value,!0,m.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)}}function re(){return q.value}e({getData:re,recalculateHeight:I});const le=i.ref(null);function fe(x){p.value=!0,le.value=x.id;let S="";const D=x.isChild?x.parentName:x.name,W=x.isChild?x.name:"";S+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;text-align:left;">
379
379
  <div><span style="color:${x.color};margin-right:3px">⬤</span>${D}</div>
380
380
  ${W?`<div>${W}</div>`:""}
381
- </div>`,m.value.style.chart.tooltip.showValue&&(S+=`<div>${m.value.translations.value} : <b>${m.value.style.chart.tooltip.prefix}${[void 0,NaN,null].includes(x.value)?"-":x.value.toFixed(m.value.style.chart.tooltip.roundingValue)}${m.value.style.chart.tooltip.suffix}</b></div>`),m.value.style.chart.tooltip.showPercentage&&(S+=`<div>${m.value.translations.percentageToTotal} : <b>${isNaN(x.value/T.value)?"-":`${(x.value/T.value*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`,x.isChild&&(S+=`<div>${m.value.translations.percentageToSerie} : <b>${isNaN(x.value/x.parentValue)?"-":`${(x.value/x.parentValue*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)),h.value=`<div style="text-align:left">${S}</div>`}function Ue(){o.value=!0,i.nextTick(()=>{KA({domElement:document.getElementById(`vue-ui-vertical-bar_${a.value}`),fileName:m.value.style.chart.title.text||"vue-ui-vertical-bar"}).finally(()=>{o.value=!1})})}const b=i.computed(()=>{const x=[m.value.translations.parentName,m.value.translations.value,m.value.translations.percentageToTotal,m.value.translations.childName,m.value.translations.value,m.value.translations.percentageToSerie,m.value.translations.percentageToTotal],S=G.value.map(D=>D.isChild?D.isFirstChild?{color:D.color,parentName:D.parentName,parentValue:D.parentValue,percentageToTotal:D.parentValue/T.value,childName:D.name,childValue:D.value,childPercentageToParent:D.value/D.parentValue,childPercentageToTotal:D.value/T.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:D.name,childValue:D.value,childPercentageToParent:D.value/D.parentValue,childPercentageToTotal:D.value/T.value}:{color:D.color,parentName:D.name,parentValue:D.value,percentageToTotal:D.value/T.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:x,body:S}});function _(){const x=[[m.value.style.chart.title.text],[m.value.style.chart.title.subtitle.text],[""]],S=b.value.head,D=b.value.body.map(ue=>[ue.parentName,ue.parentValue,ue.percentageToTotal,ue.childName,ue.childValue,ue.childPercentageToParent,ue.childPercentageToTotal]),W=x.concat([S]).concat(D);ei(W,m.value.style.chart.title.text||"vue-ui-vertical-bar")}function B(){c.value&&c.value.removeAttribute("open")}return(x,S)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-vertical-bar",ref:"quadrantChart",id:`vue-ui-vertical-bar_${a.value}`,style:i.normalizeStyle(`font-family:${m.value.style.fontFamily};width:100%; text-align:center`)},[(!F.value.inside||o.value)&&m.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${m.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.color};font-size:${m.value.style.chart.title.fontSize}px;font-weight:${m.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.text),5),m.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.subtitle.color};font-size:${m.value.style.chart.title.subtitle.fontSize}px;font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),m.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-vertical-bar-user-options",style:i.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},i.toDisplayString(m.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-vertical-bar-user-options-items",style:i.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},[i.createElementVNode("div",NK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-vertical-bar-option-title_${a.value}`,name:`vue-ui-vertical-bar-option-title_${a.value}`,"onUpdate:modelValue":S[0]||(S[0]=D=>F.value.inside=D)},null,8,LK),[[i.vModelCheckbox,F.value.inside]]),i.createElementVNode("label",{for:`vue-ui-vertical-bar-option-title_${a.value}`},i.toDisplayString(m.value.userOptions.labels.useDiv),9,UK)]),i.createElementVNode("div",IK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-vertical-bar-option-table_${a.value}`,name:`vue-ui-vertical-bar-option-table_${a.value}`,"onUpdate:modelValue":S[1]||(S[1]=D=>F.value.showTable=D)},null,8,DK),[[i.vModelCheckbox,F.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-vertical-bar-option-table_${a.value}`},i.toDisplayString(m.value.userOptions.labels.showTable),9,QK)]),i.createElementVNode("div",OK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-vertical-bar-option-sort_${a.value}`,name:`vue-ui-vertical-bar-option-sort_${a.value}`,"onUpdate:modelValue":S[2]||(S[2]=D=>F.value.sortDesc=D),onChange:I},null,40,PK),[[i.vModelCheckbox,F.value.sortDesc]]),i.createElementVNode("label",{for:`vue-ui-vertical-bar-option-sort_${a.value}`},i.toDisplayString(m.value.userOptions.labels.sort),9,MK)]),i.createElementVNode("button",{class:"vue-ui-vertical-bar-button",onClick:Ue,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${m.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-vertical-bar-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:m.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},VK,8,HK)):(i.openBlock(),i.createElementBlock("span",$K,"PDF"))],12,RK),i.createElementVNode("button",{class:"vue-ui-vertical-bar-button",onClick:_,style:i.normalizeStyle(`color:${m.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${z.value.width} ${R.value.fullHeight}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),onClick:B},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(D,W)=>(i.openBlock(),i.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${a.value}_${W}`},[i.createElementVNode("stop",{offset:"0%","stop-color":D.color},null,8,GK),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(ZA)(D.color,.03)}${i.unref(St)[100-m.value.style.chart.layout.bars.gradientIntensity]}`},null,8,jK)],8,KK))),256)),m.value.style.chart.title.text&&F.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",WK,[i.createElementVNode("text",{"font-size":m.value.style.chart.title.fontSize,fill:m.value.style.chart.title.color,x:z.value.width/2,y:m.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${m.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.text),13,XK),m.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":m.value.style.chart.title.subtitle.fontSize,fill:m.value.style.chart.title.subtitle.color,x:z.value.width/2,y:m.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.subtitle.text),13,qK)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(D,W)=>(i.openBlock(),i.createElementBlock("g",null,[i.createElementVNode("rect",{x:R.value.left,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,width:se(D.value),height:m.value.style.chart.layout.bars.height,fill:m.value.style.chart.layout.bars.underlayerColor,rx:m.value.style.chart.layout.bars.borderRadius},null,8,YK)]))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(D,W)=>(i.openBlock(),i.createElementBlock("g",null,[i.createElementVNode("rect",{x:R.value.left,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,width:se(D.value),height:m.value.style.chart.layout.bars.height,fill:m.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${a.value}_${W})`:`${D.color}${i.unref(St)[m.value.style.chart.layout.bars.fillOpacity]}`,rx:m.value.style.chart.layout.bars.borderRadius,stroke:m.value.style.chart.layout.bars.useStroke?D.color:"none","stroke-width":m.value.style.chart.layout.bars.useStroke?m.value.style.chart.layout.bars.strokeWidth:0},null,8,JK),(!D.isChild||D.isLastChild)&&m.value.style.chart.layout.separators.show&&W!==G.value.length-1?(i.openBlock(),i.createElementBlock("line",{key:0,x1:0,x2:R.value.left,y1:m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap/2+R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,y2:m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap/2+R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,stroke:m.value.style.chart.layout.separators.color,"stroke-width":m.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,ZK)):i.createCommentVNode("",!0),i.createElementVNode("text",{x:he(D.value)+3+m.value.style.chart.layout.bars.dataLabels.offsetX,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W+m.value.style.chart.layout.bars.height/2+m.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":"start","font-size":m.value.style.chart.layout.bars.dataLabels.fontSize,fill:m.value.style.chart.layout.bars.dataLabels.color,"font-weight":m.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.value.prefix)+" "+i.toDisplayString(isNaN(D.value)||!m.value.style.chart.layout.bars.dataLabels.value.show?"":D.value.toFixed(m.value.style.chart.layout.bars.dataLabels.value.roundingValue))+" "+i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.value.suffix)+" "+i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.percentage.show?`(${L(D.value,!0,m.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`:""),9,eG),(D.isChild||!D.hasChildren)&&m.value.style.chart.layout.bars.nameLabels.show?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"end",x:R.value.left-3+m.value.style.chart.layout.bars.nameLabels.offsetX,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W+m.value.style.chart.layout.bars.height/2+m.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":m.value.style.chart.layout.bars.nameLabels.fontSize,fill:m.value.style.chart.layout.bars.nameLabels.color,"font-weight":m.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},i.toDisplayString(D.name),9,tG)):i.createCommentVNode("",!0),D.isChild&&D.childIndex===0&&m.value.style.chart.layout.bars.parentLabels.show?(i.openBlock(),i.createElementBlock("text",{key:2,x:3+m.value.style.chart.layout.bars.parentLabels.offsetX,y:ge(D,W).y,"font-size":m.value.style.chart.layout.bars.parentLabels.fontSize,fill:m.value.style.chart.layout.bars.parentLabels.color,"font-weight":m.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},i.toDisplayString(ge(D,W).name),9,rG)):i.createCommentVNode("",!0),D.isChild&&D.childIndex===0&&m.value.style.chart.layout.bars.parentLabels.show?(i.openBlock(),i.createElementBlock("text",{key:3,x:3+m.value.style.chart.layout.bars.parentLabels.offsetX,y:ge(D,W).y+m.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":m.value.style.chart.layout.bars.parentLabels.fontSize,fill:m.value.style.chart.layout.bars.parentLabels.color,"font-weight":m.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.value.show?ge(D,W).value:"")+" "+i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.percentage.show?`(${ge(D,W).percentageToTotal})`:""),9,nG)):i.createCommentVNode("",!0),i.createElementVNode("rect",{x:0,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W-m.value.style.chart.layout.bars.gap/2,width:z.value.width,height:m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap,fill:le.value===D.id?`${m.value.style.chart.layout.highlighter.color}${i.unref(St)[m.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:ue=>fe(D),onMouseleave:S[3]||(S[3]=ue=>{w.value=null,p.value=!1,le.value=null})},null,40,aG)]))),256)),m.value.style.chart.legend.show&&F.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:1,x:0,y:R.value.bottom+24,width:"100%",height:R.value.fullHeight-R.value.bottom-24,style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-vertical-bar-legend",style:i.normalizeStyle(`color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`),onClick:B},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Q.value,(D,W)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-vertical-bar-legend-item",onClick:ue=>O(D.id),style:i.normalizeStyle(`opacity:${U.value.includes(D.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${D.color};font-size:${m.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(D.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(m.value.style.chart.legend.prefix)+i.toDisplayString(D.value.toFixed(m.value.style.chart.legend.roundingValue))+i.toDisplayString(m.value.style.chart.legend.suffix),1)],12,iG))),256))],4)],8,AG)):i.createCommentVNode("",!0)],12,zK)),m.value.style.chart.legend.show&&(!F.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-vertical-bar-legend",style:i.normalizeStyle(`background:${m.value.style.chart.legend.backgroundColor};color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`),onClick:B},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Q.value,(D,W)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-vertical-bar-legend-item",onClick:ue=>O(D.id),style:i.normalizeStyle(`opacity:${U.value.includes(D.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${D.color};font-size:${m.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(D.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(m.value.style.chart.legend.prefix)+i.toDisplayString(D.value.toFixed(m.value.style.chart.legend.roundingValue))+i.toDisplayString(m.value.style.chart.legend.suffix),1)],12,oG))),256))],4)):i.createCommentVNode("",!0),m.value.style.chart.tooltip.show&&p.value&&U.value.length<n.dataset.length?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-vertical-bar-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${y.value.top}px;left:${y.value.left}px;background:${m.value.style.chart.tooltip.backgroundColor};color:${m.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,sG)):i.createCommentVNode("",!0),F.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:B,class:"vue-ui-vertical-bar-table",style:i.normalizeStyle(`width:100%;margin-top:${F.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[m.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",lG,[i.createElementVNode("th",{colspan:7,style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(m.value.style.chart.title.text),1),m.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",cG," : "+i.toDisplayString(m.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value.head,D=>(i.openBlock(),i.createElementBlock("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},[i.createElementVNode("div",uG,i.toDisplayString(D),1)],4))),256))]),i.createElementVNode("tr",null,[i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+i.toDisplayString(m.value.table.td.prefix)+i.toDisplayString(isNaN(T.value)?"":T.value.toFixed(m.value.table.td.roundingValue))+i.toDisplayString(m.value.table.td.suffix),5),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4)])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value.body,D=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},[D.color?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${D.color};margin-right:3px`)},"⬤",4)):i.createCommentVNode("",!0),i.createElementVNode("span",null,i.toDisplayString(D.parentName),1)],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(m.value.table.td.prefix)+i.toDisplayString(["",NaN,void 0].includes(D.parentValue)?"":D.parentValue.toFixed(m.value.table.td.roundingValue))+i.toDisplayString(m.value.table.td.suffix),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(["",NaN,void 0].includes(D.percentageToTotal)?"":`${(D.percentageToTotal*100).toFixed(m.value.table.td.roundingPercentage)}%`),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(D.childName),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(m.value.table.td.prefix)+i.toDisplayString(["",NaN,void 0].includes(D.childValue)?"":D.childValue.toFixed(m.value.table.td.roundingValue))+i.toDisplayString(m.value.table.td.suffix),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(["",NaN,void 0].includes(D.childPercentageToParent)?"":`${(D.childPercentageToParent*100).toFixed(m.value.table.td.roundingPercentage)}%`),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(["",NaN,void 0].includes(D.childPercentageToTotal)?"":`${(D.childPercentageToTotal*100).toFixed(m.value.table.td.roundingPercentage)}%`),5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,TK))}},[["__scopeId","data-v-44939c84"]]),fG={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-screenshot-${Math.random()}`),A=i.ref(wa.vue_ui_screenshot),o=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const re=aa({defaultConfig:A.value,userConfig:n.config});return Aa(re)}),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref(null),p=i.ref(null),h=i.ref(null),d=i.ref(null),w=i.ref(null),g=i.ref(null),y=i.ref(null),m=i.ref(null),F=i.ref(!1),N=i.ref(null);function Q(){const re=document.createElement("DIV");return re.style.position="fixed",re.style.top="200px",re.style.left="100px",re.style.width=`${o.value.style.captureArea.initialWidth}px`,re.style.height=`${o.value.style.captureArea.initialHeight}px`,re.style.background=o.value.style.captureArea.background,re.style.cursor="move",re.style.boxSizing="border-box",re.style.border=o.value.style.captureArea.border,re.style.resize="both",re.style.padding="none !important",re.style.margin="none !important",re}function z(){s.value&&(clearTimeout(N.value),s.value.remove(),s.value=null)}function R(re){const le=document.createElement("DIV");le.classList.add("vue-ui-screenshot-info-text"),le.innerHTML=o.value.translations.info,le.dataset.html2canvasIgnore="true",le.style.background=o.value.style.info.background,le.style.color=o.value.style.info.color,le.style.fontWeight=o.value.style.info.bold?"bold":"normal",le.style.minWidth=`${o.value.style.info.minWidth}px`,le.style.left="50%",le.style.padding=`${o.value.style.info.padding}px`,le.style.position="absolute",le.style.textAlign="center",le.style.top=`${o.value.style.info.top}px`,le.style.transform="translateX(-50%)",le.style.borderRadius=`${o.value.style.info.borderRadius}px`,le.style.boxShadow=o.value.style.info.boxShadow,le.style.fontFamily=o.value.style.info.fontFamily,le.style.fontSize=`${o.value.style.info.fontSize}px`,le.style.border=o.value.style.info.border,le.style.userSelect="none";const fe=document.createElement("BUTTON");fe.classList.add("vue-ui-screenshot-close-button"),fe.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',fe.style.outline="none",fe.style.display="flex",fe.style.cursor="pointer",fe.style.borderRadius="50%",fe.style.alignItems="center",fe.style.position="absolute",fe.style.justifyContent="center",fe.style.transformOrigin="center",fe.style.top=`${o.value.style.cancelButton.top}px`,fe.style.right=`${o.value.style.cancelButton.right}px`,fe.style.background=o.value.style.cancelButton.background,fe.style.color=o.value.style.cancelButton.color,fe.style.border=o.value.style.cancelButton.border,fe.style.borderRadius=`${o.value.style.cancelButton.borderRadius}px`,fe.style.height=`${o.value.style.cancelButton.size}px`,fe.style.width=`${o.value.style.cancelButton.size}px`,fe.addEventListener("click",z),le.appendChild(fe),re.appendChild(le)}function I(re){s.value&&(F.value=!0,re.touches?(h.value=re.touches[0].clientX,d.value=re.touches[0].clientY):(h.value=re.clientX,d.value=re.clientY),y.value=s.value.getBoundingClientRect().width,m.value=s.value.getBoundingClientRect().height,re.target.addEventListener("mousemove",U),re.target.addEventListener("touchmove",U))}function U(re){if(!s.value)return;let le,fe;re.touches?(w.value=re.touches[0].clientX,le=re.touches[0].clientX,g.value=re.touches[0].clientY,fe=re.touches[0].clientY):(w.value=re.clientX,le=re.clientX,g.value=re.clientY,fe=re.clientY);const Ue=re.target.classList[0],b=s.value.style;switch(!0){case Ue==="vue-ui-screenshot-handle-nw":b.top=`${fe}px`,b.left=`${le}px`,b.width=`${y.value+(h.value-w.value)}px`,b.height=`${m.value+(d.value-g.value)}px`;break;case Ue==="vue-ui-screenshot-handle-ne":b.top=`${fe}px`,b.width=`${y.value+(w.value-h.value)}px`,b.height=`${m.value+(d.value-g.value)}px`;break;case Ue==="vue-ui-screenshot-handle-sw":b.left=`${le}px`,b.width=`${y.value+(h.value-w.value)}px`,b.height=`${m.value+(g.value-d.value)}px`;break;case Ue==="vue-ui-screenshot-handle-se":b.width=`${y.value+(w.value-h.value)}px`,b.height=`${m.value+(g.value-d.value)}px`;break}}function O(re){if(!s.value)return;re.stopPropagation();const le=Array.from(re.target.classList);le.includes("vue-ui-screenshot-handle-se")||le.includes("vue-ui-screenshot-handle-sw")||le.includes("vue-ui-screenshot-handle-nw")||le.includes("vue-ui-screenshot-handle-ne")||(F.value=!0,s.value.style.pointerEvents="auto",re.touches?(l.value=re.touches[0].clientX,c.value=re.touches[0].clientY):(l.value=re.clientX,c.value=re.clientY),u.value=l.value,p.value=c.value,document.addEventListener("mousemove",T),document.addEventListener("touchmove",T),document.addEventListener("mouseup",q),document.addEventListener("touchend",q))}function q(){l.value=null,c.value=null,u.value=null,p.value=null,F.value=!1,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",q),document.removeEventListener("touchmove",T),document.removeEventListener("touchend",q)}function T(re){if(!s.value)return;const le=s.value.getBoundingClientRect();let fe,Ue;re.touches?(fe=re.touches[0].clientX-l.value,Ue=re.touches[0].clientY-c.value,l.value=re.touches[0].clientX,c.value=re.touches[0].clientY):(fe=re.clientX-l.value,Ue=re.clientY-c.value,l.value=re.clientX,c.value=re.clientY),s.value.style.top=`${le.top+Ue}px`,s.value.style.left=`${le.left+fe}px`}function L(re){re.target.removeEventListener("mousemove",U),re.target.removeEventListener("touchmove",U),document.removeEventListener("mousemove",T),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",q),document.removeEventListener("touchend",q),F.value=!1}function G(){const re=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(re)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(re)?"mobile":"desktop"}function Y(){const re=document.getElementById(`vue-ui-screenshot-button-${a.value}`);re.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
381
+ </div>`,m.value.style.chart.tooltip.showValue&&(S+=`<div>${m.value.translations.value} : <b>${m.value.style.chart.tooltip.prefix}${[void 0,NaN,null].includes(x.value)?"-":x.value.toFixed(m.value.style.chart.tooltip.roundingValue)}${m.value.style.chart.tooltip.suffix}</b></div>`),m.value.style.chart.tooltip.showPercentage&&(S+=`<div>${m.value.translations.percentageToTotal} : <b>${isNaN(x.value/T.value)?"-":`${(x.value/T.value*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`,x.isChild&&(S+=`<div>${m.value.translations.percentageToSerie} : <b>${isNaN(x.value/x.parentValue)?"-":`${(x.value/x.parentValue*100).toFixed(m.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)),h.value=`<div style="text-align:left">${S}</div>`}function Ue(){o.value=!0,i.nextTick(()=>{KA({domElement:document.getElementById(`vue-ui-vertical-bar_${a.value}`),fileName:m.value.style.chart.title.text||"vue-ui-vertical-bar"}).finally(()=>{o.value=!1})})}const b=i.computed(()=>{const x=[m.value.translations.parentName,m.value.translations.value,m.value.translations.percentageToTotal,m.value.translations.childName,m.value.translations.value,m.value.translations.percentageToSerie,m.value.translations.percentageToTotal],S=G.value.map(D=>D.isChild?D.isFirstChild?{color:D.color,parentName:D.parentName,parentValue:D.parentValue,percentageToTotal:D.parentValue/T.value,childName:D.name,childValue:D.value,childPercentageToParent:D.value/D.parentValue,childPercentageToTotal:D.value/T.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:D.name,childValue:D.value,childPercentageToParent:D.value/D.parentValue,childPercentageToTotal:D.value/T.value}:{color:D.color,parentName:D.name,parentValue:D.value,percentageToTotal:D.value/T.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:x,body:S}});function _(){const x=[[m.value.style.chart.title.text],[m.value.style.chart.title.subtitle.text],[""]],S=b.value.head,D=b.value.body.map(ue=>[ue.parentName,ue.parentValue,ue.percentageToTotal,ue.childName,ue.childValue,ue.childPercentageToParent,ue.childPercentageToTotal]),W=x.concat([S]).concat(D);ei(W,m.value.style.chart.title.text||"vue-ui-vertical-bar")}function B(){c.value&&c.value.removeAttribute("open")}return(x,S)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-vertical-bar",ref:"quadrantChart",id:`vue-ui-vertical-bar_${a.value}`,style:i.normalizeStyle(`font-family:${m.value.style.fontFamily};width:100%; text-align:center`)},[(!F.value.inside||o.value)&&m.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;background:${m.value.style.chart.backgroundColor};padding-bottom:12px`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.color};font-size:${m.value.style.chart.title.fontSize}px;font-weight:${m.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.text),5),m.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:100%;text-align:center;color:${m.value.style.chart.title.subtitle.color};font-size:${m.value.style.chart.title.subtitle.fontSize}px;font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.subtitle.text),5)):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),m.value.userOptions.show?(i.openBlock(),i.createElementBlock("details",{key:1,class:"vue-ui-vertical-bar-user-options",style:i.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:c},[i.createElementVNode("summary",{style:i.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},i.toDisplayString(m.value.userOptions.title),5),i.createElementVNode("div",{class:"vue-ui-vertical-bar-user-options-items",style:i.normalizeStyle(`background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`)},[i.createElementVNode("div",NK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-vertical-bar-option-title_${a.value}`,name:`vue-ui-vertical-bar-option-title_${a.value}`,"onUpdate:modelValue":S[0]||(S[0]=D=>F.value.inside=D)},null,8,LK),[[i.vModelCheckbox,F.value.inside]]),i.createElementVNode("label",{for:`vue-ui-vertical-bar-option-title_${a.value}`},i.toDisplayString(m.value.userOptions.labels.useDiv),9,UK)]),i.createElementVNode("div",IK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-vertical-bar-option-table_${a.value}`,name:`vue-ui-vertical-bar-option-table_${a.value}`,"onUpdate:modelValue":S[1]||(S[1]=D=>F.value.showTable=D)},null,8,DK),[[i.vModelCheckbox,F.value.showTable]]),i.createElementVNode("label",{for:`vue-ui-vertical-bar-option-table_${a.value}`},i.toDisplayString(m.value.userOptions.labels.showTable),9,QK)]),i.createElementVNode("div",OK,[i.withDirectives(i.createElementVNode("input",{type:"checkbox",id:`vue-ui-vertical-bar-option-sort_${a.value}`,name:`vue-ui-vertical-bar-option-sort_${a.value}`,"onUpdate:modelValue":S[2]||(S[2]=D=>F.value.sortDesc=D),onChange:I},null,40,PK),[[i.vModelCheckbox,F.value.sortDesc]]),i.createElementVNode("label",{for:`vue-ui-vertical-bar-option-sort_${a.value}`},i.toDisplayString(m.value.userOptions.labels.sort),9,MK)]),i.createElementVNode("button",{class:"vue-ui-vertical-bar-button",onClick:Ue,disabled:o.value,style:i.normalizeStyle([{"margin-top":"12px"},`color:${m.value.style.chart.color}`])},[o.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"vue-ui-vertical-bar-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:m.value.style.chart.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},VK,8,HK)):(i.openBlock(),i.createElementBlock("span",$K,"PDF"))],12,RK),i.createElementVNode("button",{class:"vue-ui-vertical-bar-button",onClick:_,style:i.normalizeStyle(`color:${m.value.style.chart.color}`)}," XLSX ",4)],4)],4)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock("svg",{viewBox:`0 0 ${z.value.width} ${R.value.fullHeight}`,style:i.normalizeStyle(`max-width:100%;overflow:visible;background:${m.value.style.chart.backgroundColor};color:${m.value.style.chart.color}`),onClick:B},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(D,W)=>(i.openBlock(),i.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${a.value}_${W}`},[i.createElementVNode("stop",{offset:"0%","stop-color":D.color},null,8,GK),i.createElementVNode("stop",{offset:"100%","stop-color":`${i.unref(ZA)(D.color,.03)}${i.unref(Et)[100-m.value.style.chart.layout.bars.gradientIntensity]}`},null,8,jK)],8,KK))),256)),m.value.style.chart.title.text&&F.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("g",WK,[i.createElementVNode("text",{"font-size":m.value.style.chart.title.fontSize,fill:m.value.style.chart.title.color,x:z.value.width/2,y:m.value.style.chart.title.fontSize,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${m.value.style.chart.title.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.text),13,XK),m.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("text",{key:0,"font-size":m.value.style.chart.title.subtitle.fontSize,fill:m.value.style.chart.title.subtitle.color,x:z.value.width/2,y:m.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:i.normalizeStyle(`font-weight:${m.value.style.chart.title.subtitle.bold?"bold":""}`)},i.toDisplayString(m.value.style.chart.title.subtitle.text),13,qK)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(D,W)=>(i.openBlock(),i.createElementBlock("g",null,[i.createElementVNode("rect",{x:R.value.left,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,width:se(D.value),height:m.value.style.chart.layout.bars.height,fill:m.value.style.chart.layout.bars.underlayerColor,rx:m.value.style.chart.layout.bars.borderRadius},null,8,YK)]))),256)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(G.value,(D,W)=>(i.openBlock(),i.createElementBlock("g",null,[i.createElementVNode("rect",{x:R.value.left,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,width:se(D.value),height:m.value.style.chart.layout.bars.height,fill:m.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${a.value}_${W})`:`${D.color}${i.unref(Et)[m.value.style.chart.layout.bars.fillOpacity]}`,rx:m.value.style.chart.layout.bars.borderRadius,stroke:m.value.style.chart.layout.bars.useStroke?D.color:"none","stroke-width":m.value.style.chart.layout.bars.useStroke?m.value.style.chart.layout.bars.strokeWidth:0},null,8,JK),(!D.isChild||D.isLastChild)&&m.value.style.chart.layout.separators.show&&W!==G.value.length-1?(i.openBlock(),i.createElementBlock("line",{key:0,x1:0,x2:R.value.left,y1:m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap/2+R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,y2:m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap/2+R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W,stroke:m.value.style.chart.layout.separators.color,"stroke-width":m.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,ZK)):i.createCommentVNode("",!0),i.createElementVNode("text",{x:he(D.value)+3+m.value.style.chart.layout.bars.dataLabels.offsetX,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W+m.value.style.chart.layout.bars.height/2+m.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":"start","font-size":m.value.style.chart.layout.bars.dataLabels.fontSize,fill:m.value.style.chart.layout.bars.dataLabels.color,"font-weight":m.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.value.prefix)+" "+i.toDisplayString(isNaN(D.value)||!m.value.style.chart.layout.bars.dataLabels.value.show?"":D.value.toFixed(m.value.style.chart.layout.bars.dataLabels.value.roundingValue))+" "+i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.value.suffix)+" "+i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.percentage.show?`(${L(D.value,!0,m.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`:""),9,eG),(D.isChild||!D.hasChildren)&&m.value.style.chart.layout.bars.nameLabels.show?(i.openBlock(),i.createElementBlock("text",{key:1,"text-anchor":"end",x:R.value.left-3+m.value.style.chart.layout.bars.nameLabels.offsetX,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W+m.value.style.chart.layout.bars.height/2+m.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":m.value.style.chart.layout.bars.nameLabels.fontSize,fill:m.value.style.chart.layout.bars.nameLabels.color,"font-weight":m.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},i.toDisplayString(D.name),9,tG)):i.createCommentVNode("",!0),D.isChild&&D.childIndex===0&&m.value.style.chart.layout.bars.parentLabels.show?(i.openBlock(),i.createElementBlock("text",{key:2,x:3+m.value.style.chart.layout.bars.parentLabels.offsetX,y:ge(D,W).y,"font-size":m.value.style.chart.layout.bars.parentLabels.fontSize,fill:m.value.style.chart.layout.bars.parentLabels.color,"font-weight":m.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},i.toDisplayString(ge(D,W).name),9,rG)):i.createCommentVNode("",!0),D.isChild&&D.childIndex===0&&m.value.style.chart.layout.bars.parentLabels.show?(i.openBlock(),i.createElementBlock("text",{key:3,x:3+m.value.style.chart.layout.bars.parentLabels.offsetX,y:ge(D,W).y+m.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":m.value.style.chart.layout.bars.parentLabels.fontSize,fill:m.value.style.chart.layout.bars.parentLabels.color,"font-weight":m.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.value.show?ge(D,W).value:"")+" "+i.toDisplayString(m.value.style.chart.layout.bars.dataLabels.percentage.show?`(${ge(D,W).percentageToTotal})`:""),9,nG)):i.createCommentVNode("",!0),i.createElementVNode("rect",{x:0,y:R.value.top+(m.value.style.chart.layout.bars.gap+m.value.style.chart.layout.bars.height)*W-m.value.style.chart.layout.bars.gap/2,width:z.value.width,height:m.value.style.chart.layout.bars.height+m.value.style.chart.layout.bars.gap,fill:le.value===D.id?`${m.value.style.chart.layout.highlighter.color}${i.unref(Et)[m.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:ue=>fe(D),onMouseleave:S[3]||(S[3]=ue=>{w.value=null,p.value=!1,le.value=null})},null,40,aG)]))),256)),m.value.style.chart.legend.show&&F.value.inside&&!o.value?(i.openBlock(),i.createElementBlock("foreignObject",{key:1,x:0,y:R.value.bottom+24,width:"100%",height:R.value.fullHeight-R.value.bottom-24,style:{overflow:"visible"}},[i.createElementVNode("div",{class:"vue-ui-vertical-bar-legend",style:i.normalizeStyle(`color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`),onClick:B},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Q.value,(D,W)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-vertical-bar-legend-item",onClick:ue=>O(D.id),style:i.normalizeStyle(`opacity:${U.value.includes(D.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${D.color};font-size:${m.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(D.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(m.value.style.chart.legend.prefix)+i.toDisplayString(D.value.toFixed(m.value.style.chart.legend.roundingValue))+i.toDisplayString(m.value.style.chart.legend.suffix),1)],12,iG))),256))],4)],8,AG)):i.createCommentVNode("",!0)],12,zK)),m.value.style.chart.legend.show&&(!F.value.inside||o.value)?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vue-ui-vertical-bar-legend",style:i.normalizeStyle(`background:${m.value.style.chart.legend.backgroundColor};color:${m.value.style.chart.legend.color};font-size:${m.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${m.value.style.chart.legend.bold?"bold":""}`),onClick:B},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Q.value,(D,W)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-vertical-bar-legend-item",onClick:ue=>O(D.id),style:i.normalizeStyle(`opacity:${U.value.includes(D.id)?.5:1}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`color:${D.color};font-size:${m.value.style.chart.legend.fontSize}px`)},"⬤",4),i.createElementVNode("span",null,i.toDisplayString(D.name)+" : ",1),i.createElementVNode("span",null,i.toDisplayString(m.value.style.chart.legend.prefix)+i.toDisplayString(D.value.toFixed(m.value.style.chart.legend.roundingValue))+i.toDisplayString(m.value.style.chart.legend.suffix),1)],12,oG))),256))],4)):i.createCommentVNode("",!0),m.value.style.chart.tooltip.show&&p.value&&U.value.length<n.dataset.length?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vue-ui-vertical-bar-tooltip",ref_key:"tooltip",ref:l,style:i.normalizeStyle(`top:${y.value.top}px;left:${y.value.left}px;background:${m.value.style.chart.tooltip.backgroundColor};color:${m.value.style.chart.tooltip.color}`),innerHTML:h.value},null,12,sG)):i.createCommentVNode("",!0),F.value.showTable?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:B,class:"vue-ui-vertical-bar-table",style:i.normalizeStyle(`width:100%;margin-top:${F.value.inside?"48px":""}`)},[i.createElementVNode("table",null,[i.createElementVNode("thead",null,[m.value.style.chart.title.text?(i.openBlock(),i.createElementBlock("tr",lG,[i.createElementVNode("th",{colspan:7,style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},[i.createElementVNode("span",null,i.toDisplayString(m.value.style.chart.title.text),1),m.value.style.chart.title.subtitle.text?(i.openBlock(),i.createElementBlock("span",cG," : "+i.toDisplayString(m.value.style.chart.title.subtitle.text),1)):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0),i.createElementVNode("tr",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value.head,D=>(i.openBlock(),i.createElementBlock("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},[i.createElementVNode("div",uG,i.toDisplayString(D),1)],4))),256))]),i.createElementVNode("tr",null,[i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+i.toDisplayString(m.value.table.td.prefix)+i.toDisplayString(isNaN(T.value)?"":T.value.toFixed(m.value.table.td.roundingValue))+i.toDisplayString(m.value.table.td.suffix),5),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4),i.createElementVNode("th",{style:i.normalizeStyle(`background:${m.value.table.th.backgroundColor};color:${m.value.table.th.color};outline:${m.value.table.th.outline}`)},null,4)])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value.body,D=>(i.openBlock(),i.createElementBlock("tr",null,[i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},[D.color?(i.openBlock(),i.createElementBlock("span",{key:0,style:i.normalizeStyle(`color:${D.color};margin-right:3px`)},"⬤",4)):i.createCommentVNode("",!0),i.createElementVNode("span",null,i.toDisplayString(D.parentName),1)],4),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(m.value.table.td.prefix)+i.toDisplayString(["",NaN,void 0].includes(D.parentValue)?"":D.parentValue.toFixed(m.value.table.td.roundingValue))+i.toDisplayString(m.value.table.td.suffix),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(["",NaN,void 0].includes(D.percentageToTotal)?"":`${(D.percentageToTotal*100).toFixed(m.value.table.td.roundingPercentage)}%`),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(D.childName),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(m.value.table.td.prefix)+i.toDisplayString(["",NaN,void 0].includes(D.childValue)?"":D.childValue.toFixed(m.value.table.td.roundingValue))+i.toDisplayString(m.value.table.td.suffix),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(["",NaN,void 0].includes(D.childPercentageToParent)?"":`${(D.childPercentageToParent*100).toFixed(m.value.table.td.roundingPercentage)}%`),5),i.createElementVNode("td",{style:i.normalizeStyle(`background:${m.value.table.td.backgroundColor};color:${m.value.table.td.color};outline:${m.value.table.td.outline}`)},i.toDisplayString(["",NaN,void 0].includes(D.childPercentageToTotal)?"":`${(D.childPercentageToTotal*100).toFixed(m.value.table.td.roundingPercentage)}%`),5)]))),256))])])],4)):i.createCommentVNode("",!0)],12,TK))}},[["__scopeId","data-v-44939c84"]]),fG={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-screenshot-${Math.random()}`),A=i.ref(wa.vue_ui_screenshot),o=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const re=aa({defaultConfig:A.value,userConfig:n.config});return Aa(re)}),s=i.ref(null),l=i.ref(null),c=i.ref(null),u=i.ref(null),p=i.ref(null),h=i.ref(null),d=i.ref(null),w=i.ref(null),g=i.ref(null),y=i.ref(null),m=i.ref(null),F=i.ref(!1),N=i.ref(null);function Q(){const re=document.createElement("DIV");return re.style.position="fixed",re.style.top="200px",re.style.left="100px",re.style.width=`${o.value.style.captureArea.initialWidth}px`,re.style.height=`${o.value.style.captureArea.initialHeight}px`,re.style.background=o.value.style.captureArea.background,re.style.cursor="move",re.style.boxSizing="border-box",re.style.border=o.value.style.captureArea.border,re.style.resize="both",re.style.padding="none !important",re.style.margin="none !important",re}function z(){s.value&&(clearTimeout(N.value),s.value.remove(),s.value=null)}function R(re){const le=document.createElement("DIV");le.classList.add("vue-ui-screenshot-info-text"),le.innerHTML=o.value.translations.info,le.dataset.html2canvasIgnore="true",le.style.background=o.value.style.info.background,le.style.color=o.value.style.info.color,le.style.fontWeight=o.value.style.info.bold?"bold":"normal",le.style.minWidth=`${o.value.style.info.minWidth}px`,le.style.left="50%",le.style.padding=`${o.value.style.info.padding}px`,le.style.position="absolute",le.style.textAlign="center",le.style.top=`${o.value.style.info.top}px`,le.style.transform="translateX(-50%)",le.style.borderRadius=`${o.value.style.info.borderRadius}px`,le.style.boxShadow=o.value.style.info.boxShadow,le.style.fontFamily=o.value.style.info.fontFamily,le.style.fontSize=`${o.value.style.info.fontSize}px`,le.style.border=o.value.style.info.border,le.style.userSelect="none";const fe=document.createElement("BUTTON");fe.classList.add("vue-ui-screenshot-close-button"),fe.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',fe.style.outline="none",fe.style.display="flex",fe.style.cursor="pointer",fe.style.borderRadius="50%",fe.style.alignItems="center",fe.style.position="absolute",fe.style.justifyContent="center",fe.style.transformOrigin="center",fe.style.top=`${o.value.style.cancelButton.top}px`,fe.style.right=`${o.value.style.cancelButton.right}px`,fe.style.background=o.value.style.cancelButton.background,fe.style.color=o.value.style.cancelButton.color,fe.style.border=o.value.style.cancelButton.border,fe.style.borderRadius=`${o.value.style.cancelButton.borderRadius}px`,fe.style.height=`${o.value.style.cancelButton.size}px`,fe.style.width=`${o.value.style.cancelButton.size}px`,fe.addEventListener("click",z),le.appendChild(fe),re.appendChild(le)}function I(re){s.value&&(F.value=!0,re.touches?(h.value=re.touches[0].clientX,d.value=re.touches[0].clientY):(h.value=re.clientX,d.value=re.clientY),y.value=s.value.getBoundingClientRect().width,m.value=s.value.getBoundingClientRect().height,re.target.addEventListener("mousemove",U),re.target.addEventListener("touchmove",U))}function U(re){if(!s.value)return;let le,fe;re.touches?(w.value=re.touches[0].clientX,le=re.touches[0].clientX,g.value=re.touches[0].clientY,fe=re.touches[0].clientY):(w.value=re.clientX,le=re.clientX,g.value=re.clientY,fe=re.clientY);const Ue=re.target.classList[0],b=s.value.style;switch(!0){case Ue==="vue-ui-screenshot-handle-nw":b.top=`${fe}px`,b.left=`${le}px`,b.width=`${y.value+(h.value-w.value)}px`,b.height=`${m.value+(d.value-g.value)}px`;break;case Ue==="vue-ui-screenshot-handle-ne":b.top=`${fe}px`,b.width=`${y.value+(w.value-h.value)}px`,b.height=`${m.value+(d.value-g.value)}px`;break;case Ue==="vue-ui-screenshot-handle-sw":b.left=`${le}px`,b.width=`${y.value+(h.value-w.value)}px`,b.height=`${m.value+(g.value-d.value)}px`;break;case Ue==="vue-ui-screenshot-handle-se":b.width=`${y.value+(w.value-h.value)}px`,b.height=`${m.value+(g.value-d.value)}px`;break}}function O(re){if(!s.value)return;re.stopPropagation();const le=Array.from(re.target.classList);le.includes("vue-ui-screenshot-handle-se")||le.includes("vue-ui-screenshot-handle-sw")||le.includes("vue-ui-screenshot-handle-nw")||le.includes("vue-ui-screenshot-handle-ne")||(F.value=!0,s.value.style.pointerEvents="auto",re.touches?(l.value=re.touches[0].clientX,c.value=re.touches[0].clientY):(l.value=re.clientX,c.value=re.clientY),u.value=l.value,p.value=c.value,document.addEventListener("mousemove",T),document.addEventListener("touchmove",T),document.addEventListener("mouseup",q),document.addEventListener("touchend",q))}function q(){l.value=null,c.value=null,u.value=null,p.value=null,F.value=!1,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",q),document.removeEventListener("touchmove",T),document.removeEventListener("touchend",q)}function T(re){if(!s.value)return;const le=s.value.getBoundingClientRect();let fe,Ue;re.touches?(fe=re.touches[0].clientX-l.value,Ue=re.touches[0].clientY-c.value,l.value=re.touches[0].clientX,c.value=re.touches[0].clientY):(fe=re.clientX-l.value,Ue=re.clientY-c.value,l.value=re.clientX,c.value=re.clientY),s.value.style.top=`${le.top+Ue}px`,s.value.style.left=`${le.left+fe}px`}function L(re){re.target.removeEventListener("mousemove",U),re.target.removeEventListener("touchmove",U),document.removeEventListener("mousemove",T),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",q),document.removeEventListener("touchend",q),F.value=!1}function G(){const re=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(re)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(re)?"mobile":"desktop"}function Y(){const re=document.getElementById(`vue-ui-screenshot-button-${a.value}`);re.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
382
382
  <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
383
383
  <path d="M4 8v-2a2 2 0 0 1 2 -2h2" />
384
384
  <path d="M4 16v2a2 2 0 0 0 2 2h2" />
385
385
  <path d="M16 4h2a2 2 0 0 1 2 2v2" />
386
386
  <path d="M16 20h2a2 2 0 0 0 2 -2v-2" />
387
387
  <path d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />
388
- </svg>`,document.getElementById(`vue-ui-screenshot-button-${a.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),re.classList.add("loading"),re.setAttribute("disabled","true")}function se(){if(!s.value)return;Y();const re=s.value.getBoundingClientRect();N.value=setTimeout(()=>{Ud(document.body,{allowTaint:!0,width:re.width,height:re.height,x:re.left+window.scrollX,y:re.top+window.scrollY,useCORS:!0,scale:o.value.quality}).then(le=>{const fe=le.toDataURL("image/png",1),Ue=fe.split(",")[1],_=atob(Ue).length/1024;if(o.value.mode==="download"){const B=document.createElement("a");B.download="screenshot.png",B.href=fe,B.click()}o.value.mode==="post"&&r("postImage",{createdAt:Date.now(),fileSize:`${_.toFixed(2)} KB`,image:fe,x:re.left+window.scrollX,y:re.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:G()})}).finally(z)},10)}function he(re){const le=o.value.style.handles.size/2+4,fe=document.createElement("DIV");fe.style.top=`${-le}px`,fe.style.left=`${-le}px`,fe.style.cursor="nw-resize",fe.classList.add("vue-ui-screenshot-handle-nw");const Ue=document.createElement("DIV");Ue.style.top=`${-le}px`,Ue.style.left="auto",Ue.style.right=`${-le}px`,Ue.style.cursor="ne-resize",Ue.classList.add("vue-ui-screenshot-handle-ne");const b=document.createElement("DIV");b.style.top="auto",b.style.bottom=`${-le}px`,b.style.left=`${-le}px`,b.style.cursor="sw-resize",b.classList.add("vue-ui-screenshot-handle-sw");const _=document.createElement("DIV");_.style.top="auto",_.style.left="auto",_.style.right=`${-le}px`,_.style.bottom=`${-le}px`,_.style.cursor="se-resize",_.classList.add("vue-ui-screenshot-handle-se");const B=document.createElement("BUTTON");B.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /><path d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /></svg><span>${o.value.translations.captureButton}</span>`,B.classList.add("vue-ui-screenshot-capture-button"),B.id=`vue-ui-screenshot-button-${a.value}`,B.style.position="absolute",B.style.top="50%",B.style.left="50%",B.style.transform="translate(-50%,-50%)",B.style.background=o.value.style.captureButton.background,B.style.color=o.value.style.captureButton.color,B.style.border=o.value.style.captureButton.border,B.style.outline="none",B.style.cursor="pointer",B.style.padding=o.value.style.captureButton.padding,B.style.fontFamily=o.value.style.captureButton.fontFamily,B.style.fontSize=`${o.value.style.captureButton.fontSize}px`,B.style.minHeight=`${o.value.style.captureButton.minHeight}px`,B.style.width="fit-content",B.style.display="flex",B.style.alignItems="center",B.style.justifyContent="center",B.style.gap="3px",B.style.borderRadius=`${o.value.style.captureButton.borderRadius}px`,B.style.boxShadow=o.value.style.captureButton.boxShadow,B.style.userSelect="none",B.style.opacity="0.95",B.style.textAlign="left",B.style.fontWeight=o.value.style.captureButton.bold?"bold":"normal",B.addEventListener("mouseenter",()=>{B.style.opacity="1"}),B.addEventListener("mouseleave",()=>{B.style.opacity="0.95"}),B.addEventListener("click",se),re.appendChild(B),[fe,Ue,b,_].forEach((x,S)=>{x.classList.add(`handle-${S}`),x.dataset.html2canvasIgnore="true",x.style.position="absolute",x.style.height=`${o.value.style.handles.size}px`,x.style.width=`${o.value.style.handles.size}px`,x.style.background=o.value.style.handles.background,x.style.border=o.value.style.handles.border,x.style.borderRadius=`${o.value.style.handles.borderRadius}px`,x.style.pointerEvents="auto !important",x.addEventListener("mousedown",I),x.addEventListener("touchstart",I),re.appendChild(x)})}function ge(){s.value||i.nextTick(()=>{const re=Q();re.dataset.html2canvasIgnore=!0,R(re),he(re),s.value=re,re.addEventListener("touchmove",function(le){le.preventDefault()},{passive:!1}),document.body.appendChild(re),document.addEventListener("mousedown",O),document.addEventListener("touchstart",O),document.addEventListener("mouseup",L),document.addEventListener("touchend",L)})}return e({shoot:ge,close:z}),(re,le)=>(i.openBlock(),i.createElementBlock("div"))}},Noe="",dG={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},gG=["src","height","width"],pG=["height","width"],mG=["id"],yG=["stop-color"],vG=["stop-color"],wG=["points","fill","stroke","stroke-width"],BG=["src","alt","height","width","id"],xG=["viewBox","height","id"],bG=["id"],CG=["stop-color"],EG=["stop-color"],_G=["points","fill","stroke"],FG=["height"],SG=["onClick","onMouseenter","onKeyup"],kG=["onMouseenter"],TG=Da({__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-rating-${Math.random()}`),A=i.ref(wa.vue_ui_rating);i.ref(!1),i.ref(null),i.ref(null),i.ref(null),i.ref({x:0,y:0});const o=i.ref(!1);i.ref("");const s=i.ref(void 0),l=i.ref([]),c=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const z=aa({defaultConfig:A.value,userConfig:n.config});return Aa(z)}),u=i.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)?g(n.dataset.rating):n.dataset.rating),p=i.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)),h=i.ref(u.value),d=i.ref(c.value.type==="image"),w=i.ref(c.value.readonly);function g(z){let R=0,I=0;for(const O in z){const q=parseInt(O),T=z[O];R+=q*T,I+=T}if(I===0)return 0;const U=R/I;return Math.min(c.value.to,Math.max(c.value.from,U))}i.onMounted(()=>{for(let z=c.value.from;z<=c.value.to;z+=1)l.value.push(z)});function y(z,R=!1){return z>s.value||w.value?R?c.value.style.image.inactiveOpacity:c.value.style.star.inactiveColor:R?1:c.value.style.star.useGradient?`url(#star_gradient_under_${a.value})`:c.value.style.star.activeColor}function m(z,R=!1){const I=h.value-z,U=R?1:100;switch(!0){case I<0:return 0;case I>1:return 1*U;default:return I*U}}function F(z){w.value||(h.value=z,r("rate",z))}function N(){return h.value}function Q(z=!0){w.value=z}return e({getData:N,toggleReadonly:Q}),(z,R)=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(`background:${c.value.style.backgroundColor};font-family:${c.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:R[2]||(R[2]=I=>o.value=!0),onMouseleave:R[3]||(R[3]=I=>{o.value=!1,s.value=void 0})},[c.value.style.title.text?(i.openBlock(),i.createElementBlock("div",dG,[i.createElementVNode("div",{style:i.normalizeStyle(`color:${c.value.style.title.color};font-weight:${c.value.style.title.bold?"bold":"normal"};text-align:${c.value.style.title.textAlign};margin-bottom:${c.value.style.title.offsetY}px;font-size:${c.value.style.title.fontSize}px`)},i.toDisplayString(c.value.style.title.text),5),c.value.style.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`color:${c.value.style.title.subtitle.color};font-size:${c.value.style.title.subtitle.fontSize}px;text-align:${c.value.style.title.textAlign};margin-bottom:${c.value.style.title.subtitle.offsetY}px;font-weight:${c.value.style.title.subtitle.bold?"bold":"normal"}`)},i.toDisplayString(c.value.style.title.subtitle.text),5)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),c.value.style.rating.show&&c.value.style.rating.position==="top"?(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(`width:100%;text-align:center;margin-bottom:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};margin-left:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:i.normalizeStyle(`height:${c.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[c.value.style.rating.show&&c.value.style.rating.position==="left"?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};padding-right:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,(I,U)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:i.normalizeStyle(`position:relative;height:${c.value.style.itemSize}px;width:${c.value.style.itemSize}px`)},[d.value?(i.openBlock(),i.createElementBlock("img",{key:0,src:c.value.style.image.src,height:c.value.style.itemSize,width:c.value.style.itemSize,class:"vue-ui-rating-unit",style:i.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?c.value.style.image.inactiveOpacity:y(I,!0)}`)},null,12,gG)):(i.openBlock(),i.createElementBlock("svg",{key:1,viewBox:"0 0 100 100",height:c.value.style.itemSize,width:c.value.style.itemSize,class:"vue-ui-rating-unit"},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(c.value.style.star.activeColor,.05)}`},null,8,yG),i.createElementVNode("stop",{offset:"100%","stop-color":c.value.style.star.activeColor},null,8,vG)],8,mG)]),i.createElementVNode("polygon",{points:i.unref(Xh)({plot:{x:50,y:50},radius:30,apexes:c.value.style.star.apexes}),fill:isNaN(s.value)?c.value.style.star.inactiveColor:y(I),stroke:c.value.style.star.borderColor?c.value.style.star.borderColor:s.value?y(I):c.value.style.star.inactiveColor,"stroke-width":c.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,wG)],8,pG)),d.value?(i.openBlock(),i.createElementBlock("img",{key:2,src:c.value.style.image.src,alt:`${c.value.style.image.alt} ${I}`,height:c.value.style.itemSize,width:c.value.style.itemSize,id:`active_${a.value}_${I}`,class:"vue-ui-rating-unit",style:i.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(U,!0)*c.value.style.itemSize}px,${c.value.style.itemSize}px,0px`)},null,12,BG)):(i.openBlock(),i.createElementBlock("svg",{key:3,viewBox:`0 0 ${m(U)} 100`,height:c.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${a.value}_${I}`,style:{position:"absolute",top:"0",left:"0"}},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(c.value.style.star.activeColor,.05)}`},null,8,CG),i.createElementVNode("stop",{offset:"100%","stop-color":c.value.style.star.activeColor},null,8,EG)],8,bG)]),i.createElementVNode("polygon",{points:i.unref(Xh)({plot:{x:50,y:50},radius:30,apexes:c.value.style.star.apexes}),fill:c.value.style.star.useGradient?`url(#star_gradient_over_${a.value})`:c.value.style.star.activeColor,stroke:c.value.style.star.activeColor},null,8,_G)],8,xG)),(i.openBlock(),i.createElementBlock("svg",{viewBox:"0 0 100 100",height:c.value.style.itemSize,class:"vue-ui-rating-unit",style:i.normalizeStyle(`position:absolute;top:0;left:0;${w.value?"":"cursor:pointer"}`)},[w.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:O=>F(I),onMouseenter:O=>s.value=I,onMouseleave:R[0]||(R[0]=O=>s.value=void 0),tabindex:"0",onKeyup:i.withKeys(O=>F(I),["enter"])},null,40,SG)),w.value?(i.openBlock(),i.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:O=>s.value=I,onMouseleave:R[1]||(R[1]=O=>s.value=void 0)},null,40,kG)):i.createCommentVNode("",!0)],12,FG)),c.value.style.tooltip.show&&p.value&&w.value?(i.openBlock(),i.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:i.normalizeStyle(`border:1px solid ${c.value.style.tooltip.borderColor};position:absolute;top:${-48+c.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${c.value.style.tooltip.backgroundColor};display:${s.value===I?"block":"none"};padding:2px 12px;border-radius:${c.value.style.tooltip.borderRadius}px;box-shadow:${c.value.style.tooltip.boxShadow}`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${c.value.style.tooltip.color}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`font-size:${c.value.style.tooltip.fontSize}px`)},i.toDisplayString(I),5),i.createTextVNode(" : "),i.createElementVNode("span",{style:i.normalizeStyle(`font-weight:${c.value.style.tooltip.bold?"bold":"normal"};font-size:${c.value.style.tooltip.fontSize}px`)},i.toDisplayString(n.dataset.rating[I]),5),i.createElementVNode("div",{style:i.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${c.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):i.createCommentVNode("",!0)],4))),256)),c.value.style.rating.show&&c.value.style.rating.position==="right"?(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};padding-left:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0)],4),c.value.style.rating.show&&c.value.style.rating.position==="bottom"?(i.openBlock(),i.createElementBlock("div",{key:2,style:i.normalizeStyle(`width:100%;text-align:center;margin-top:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};margin-left:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0)],36))}},[["__scopeId","data-v-163406e4"]]),Uoe="",NG=["id"],LG={key:0},UG=["stroke","stroke-width"],IG=["stroke","stroke-width"],DG=["stroke","stroke-width"],QG={key:1},OG=["r","fill"],PG=["r","fill"],MG={key:0},RG=["stroke","stroke-width"],HG=["stroke","stroke-width"],VG=["fill","rx","x","y","width","height"],$G=["stroke-width","stroke"],zG=["stroke-width","stroke"],KG=["stroke-width","stroke"],GG=["stroke"],jG=["stroke"],WG=["stroke"],XG=["stroke"],qG=["fill"],YG=["stroke"],JG=["stroke","stroke-width"],ZG=["stroke","stroke-width"],ej=["fill","r"],tj=["fill","r"],rj=["fill","r"],nj=["fill","r"],aj=["fill","r"],Aj=["fill","r"],ij=["fill","r"],oj=["fill","r"],sj=["fill","r"],lj=["d","stroke","stroke-width"],cj=["d","stroke","stroke-width"],uj=["d","stroke","stroke-width"],hj=["d","stroke","stroke-width"],fj=["stroke","stroke-width"],dj=["stroke","stroke-width"],gj=["stroke","stroke-width"],pj=["fill"],mj=["fill"],yj=["x","y","fill"],vj=["x","y","fill"],wj=["x","y","fill"],Bj=["fill"],xj=["fill"],bj=["y1","y2","stroke","stroke-width"],Cj=["x1","x2","stroke","stroke-width"],Ej=["points","fill","stroke","stroke-width"],_j={key:0},Fj=["stroke","stroke-width"],Sj=["y","width","fill","rx"],kj=Da({__name:"vue-ui-skeleton",props:{config:{type:Object,default(){return{}}}},setup(t){const e=t,r=i.ref(`vue-ui-skeleton-${Math.random()}`),n=i.ref(wa.vue_ui_skeleton),a=i.computed(()=>{if(!Object.keys(e.config||{}).length)return n.value;const h=aa({defaultConfig:n.value,userConfig:e.config});return Aa(h)}),A=i.computed(()=>a.value.style.animated),o=i.computed(()=>a.value.type),s=i.ref([60,50,55,36,40,25,26,12]),l=i.computed(()=>eA({plot:{x:50,y:50},radius:40,sides:6}).path),c=i.computed(()=>eA({plot:{x:50,y:50},radius:30,sides:6}).path),u=i.computed(()=>eA({plot:{x:50,y:50},radius:20,sides:6}).path),p=i.computed(()=>eA({plot:{x:50,y:50},radius:10,sides:6}).path);return(h,d)=>(i.openBlock(),i.createElementBlock("div",{id:r.value,class:i.normalizeClass({"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":A.value}),style:i.normalizeStyle(`background:${a.value.style.backgroundColor};color:${a.value.style.color};width:100%;height:100%;max-height:${a.value.style.maxHeight}px;display:flex;align-items:center;justify-content:center;`)},[o.value==="line"?(i.openBlock(),i.createElementBlock("svg",{key:0,width:"100%",viewBox:"0 0 100 70",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[a.value.style.line.axis.show?(i.openBlock(),i.createElementBlock("g",LG,[i.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:a.value.style.line.axis.color,"stroke-width":a.value.style.line.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,UG),i.createElementVNode("line",{x1:"3",x2:"97",y1:"67",y2:"67",stroke:a.value.style.line.axis.color,"stroke-width":a.value.style.line.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,IG)])):i.createCommentVNode("",!0),i.createElementVNode("path",{d:"M 9,60 22,50 35,55 48,36 61,40 74,25 87,26 90,12",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",stroke:a.value.style.line.path.color,"stroke-width":a.value.style.line.path.strokeWidth},null,8,DG),a.value.style.line.path.showPlots?(i.openBlock(),i.createElementBlock("g",QG,[i.createElementVNode("circle",{cx:"9",cy:"60",r:a.value.style.line.path.strokeWidth,fill:a.value.style.line.path.color},null,8,OG),i.createElementVNode("circle",{cx:"90",cy:"12",r:a.value.style.line.path.strokeWidth,fill:a.value.style.line.path.color},null,8,PG)])):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),o.value==="bar"?(i.openBlock(),i.createElementBlock("svg",{key:1,width:"100%",viewBox:"0 0 100 70",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[a.value.style.bar.axis.show?(i.openBlock(),i.createElementBlock("g",MG,[i.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:a.value.style.bar.axis.color,"stroke-width":a.value.style.bar.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,RG),i.createElementVNode("line",{x1:"3",x2:"97",y1:"67",y2:"67",stroke:a.value.style.bar.axis.color,"stroke-width":a.value.style.bar.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,HG)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(w,g)=>(i.openBlock(),i.createElementBlock("rect",{fill:a.value.style.bar.color,rx:a.value.style.bar.borderRadius,x:6+11.2*g,y:w,width:a.value.style.bar.barWidth,height:67-w},null,8,VG))),256))],4)):i.createCommentVNode("",!0),o.value==="donut"?(i.openBlock(),i.createElementBlock("svg",{key:2,width:"100%",viewBox:"0 0 400 400",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:" M 300 200 A 100 100 0 0 1 113 250",fill:"none","stroke-width":a.value.style.donut.strokeWidth,stroke:a.value.style.donut.color},null,8,$G),i.createElementVNode("path",{d:" M 113 250 A 100 100 0 0 1 250 113",fill:"none","stroke-width":a.value.style.donut.strokeWidth,stroke:`${a.value.style.donut.color}${i.unref(St)[60]}`},null,8,zG),i.createElementVNode("path",{d:" M 250 113 A 100 100 0 0 1 300 200",fill:"none","stroke-width":a.value.style.donut.strokeWidth,stroke:`${a.value.style.donut.color}${i.unref(St)[30]}`},null,8,KG)],4)):i.createCommentVNode("",!0),o.value==="onion"?(i.openBlock(),i.createElementBlock("svg",{key:3,width:"100%",viewBox:"0 0 400 400",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:" M 200 60 A 140 140 0 1 1 60 200",stroke:a.value.style.onion.color,"stroke-linecap":"round","stroke-width":"20",fill:"none"},null,8,GG),i.createElementVNode("path",{d:" M 200 100 A 100 100 0 1 1 100 200",stroke:a.value.style.onion.color,"stroke-linecap":"round","stroke-width":"20",fill:"none"},null,8,jG),i.createElementVNode("path",{d:" M 200 140 A 60 60 0 1 1 140 200",fill:"none",stroke:a.value.style.onion.color,"stroke-linecap":"round","stroke-width":"20"},null,8,WG)],4)):i.createCommentVNode("",!0),o.value==="gauge"?(i.openBlock(),i.createElementBlock("svg",{key:4,width:"100%",viewBox:"0 0 400 400",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:" M 82 255 A 120 120 0 1 1 318 255",fill:"none",stroke:a.value.style.gauge.color,"stroke-linecap":"round","stroke-width":"20"},null,8,XG),i.createElementVNode("circle",{cx:"200",cy:"256",r:"12",fill:a.value.style.gauge.color},null,8,qG),i.createElementVNode("line",{x1:"200",y1:"256",x2:"250",y2:"160","stroke-width":"8",stroke:a.value.style.gauge.color,"stroke-linecap":"round"},null,8,YG)],4)):i.createCommentVNode("",!0),o.value==="quadrant"?(i.openBlock(),i.createElementBlock("svg",{key:5,viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("line",{x1:"50",x2:"50",y1:"3",y2:"97",stroke:a.value.style.quadrant.grid.color,"stroke-width":a.value.style.quadrant.grid.strokeWidth},null,8,JG),i.createElementVNode("line",{x1:"3",x2:"97",y1:"50",y2:"50",stroke:a.value.style.quadrant.grid.color,"stroke-width":a.value.style.quadrant.grid.strokeWidth},null,8,ZG),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"20",cy:"20"},null,8,ej),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"80",cy:"60"},null,8,tj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"65",cy:"55"},null,8,rj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"36",cy:"67"},null,8,nj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"15",cy:"75"},null,8,aj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"40",cy:"55"},null,8,Aj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"76",cy:"32"},null,8,ij),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"85",cy:"26"},null,8,oj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"55",cy:"46"},null,8,sj)],4)):i.createCommentVNode("",!0),o.value==="radar"?(i.openBlock(),i.createElementBlock("svg",{key:6,viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:l.value,fill:"none",stroke:a.value.style.radar.grid.color,"stroke-width":a.value.style.radar.grid.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,lj),i.createElementVNode("path",{d:c.value,fill:"none",stroke:`${a.value.style.radar.grid.color}${i.unref(St)[70]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,cj),i.createElementVNode("path",{d:u.value,fill:"none",stroke:`${a.value.style.radar.grid.color}${i.unref(St)[70]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,uj),i.createElementVNode("path",{d:p.value,fill:"none",stroke:`${a.value.style.radar.grid.color}${i.unref(St)[70]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,hj),i.createElementVNode("path",{d:"M 9,50 91,50",stroke:`${a.value.style.radar.grid.color}${i.unref(St)[50]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2},null,8,fj),i.createElementVNode("path",{d:"M 29.5,14.5 70.5 85.5",stroke:`${a.value.style.radar.grid.color}${i.unref(St)[50]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2},null,8,dj),i.createElementVNode("path",{d:"M 29.5,85.5 70.5 14.5",stroke:`${a.value.style.radar.grid.color}${i.unref(St)[50]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2},null,8,gj),i.createElementVNode("path",{d:"M 34,23 68.5,18, 70,50 61.5,70 35,75.5 10,50 Z",stroke:"none","stroke-linejoin":"round",fill:`${a.value.style.radar.shapes.color}${i.unref(St)[30]}`},null,8,pj),i.createElementVNode("path",{d:"M 43.5,40 64.5,25, 84,50 55.5,60 29.5,85.5 25,50 Z",stroke:"none","stroke-linejoin":"round",fill:`${a.value.style.radar.shapes.color}${i.unref(St)[50]}`},null,8,mj)],4)):i.createCommentVNode("",!0),o.value==="waffle"?(i.openBlock(),i.createElementBlock("svg",{key:7,viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(w,g)=>i.createElementVNode("g",null,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(y,m)=>i.createElementVNode("g",null,[i.createElementVNode("rect",{x:3+m*9.6,y:3+g*9.6,height:9,width:9,fill:`${a.value.style.waffle.color}${i.unref(St)[20]}`,rx:"1"},null,8,yj)])),64))])),64)),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(w,g)=>i.createElementVNode("g",null,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(y,m)=>i.createElementVNode("g",null,[g>2?(i.openBlock(),i.createElementBlock("rect",{key:0,x:3+m*9.6,y:3+g*9.6,height:9,width:9,fill:`${a.value.style.waffle.color}${i.unref(St)[30]}`,rx:"1"},null,8,vj)):i.createCommentVNode("",!0)])),64))])),64)),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(w,g)=>i.createElementVNode("g",null,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(y,m)=>i.createElementVNode("g",null,[g>6?(i.openBlock(),i.createElementBlock("rect",{key:0,x:3+m*9.6,y:3+g*9.6,height:9,width:9,fill:`${a.value.style.waffle.color}${i.unref(St)[50]}`,rx:"1"},null,8,wj)):i.createCommentVNode("",!0)])),64))])),64))],4)):i.createCommentVNode("",!0),o.value==="table"?(i.openBlock(),i.createElementBlock("svg",{key:8,width:"100%",viewBox:"0 0 100 70",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("rect",{fill:`${a.value.style.table.th.color}${i.unref(St)[50]}`,x:3.5,y:3,height:"10",width:"93.5"},null,8,Bj),i.createElementVNode("rect",{fill:`${a.value.style.table.th.color}${i.unref(St)[50]}`,x:3.5,y:13,height:"50",width:"23.25"},null,8,xj),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(7,(w,g)=>i.createElementVNode("line",{x1:"4",x2:"96",y1:3+g*10,y2:3+g*10,stroke:a.value.style.table.td.color,"stroke-width":a.value.style.table.td.strokeWidth,"stroke-linecap":"round"},null,8,bj)),64)),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(5,(w,g)=>i.createElementVNode("line",{x1:3.5+g*23.25,x2:3.5+g*23.25,y1:"3",y2:"63",stroke:a.value.style.table.td.color,"stroke-width":a.value.style.table.td.strokeWidth,"stroke-linecap":"round"},null,8,Cj)),64))],4)):i.createCommentVNode("",!0),o.value==="rating"?(i.openBlock(),i.createElementBlock("svg",{key:9,width:"100%",viewBox:"0 0 100 30",style:i.normalizeStyle(`background:${a.value.style.backgroundColor};max-width:${a.value.style.rating.maxWidth}px`)},[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(5,(w,g)=>i.createElementVNode("polygon",{points:i.unref(Xh)({plot:{x:10+g*20,y:15},radius:6}),fill:a.value.style.rating.filled?a.value.style.rating.color:"none",stroke:a.value.style.rating.color,"stroke-width":a.value.style.rating.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ej)),64))],4)):i.createCommentVNode("",!0),o.value==="verticalBar"?(i.openBlock(),i.createElementBlock("svg",{key:10,width:"100%",viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[a.value.style.verticalBar.axis.show?(i.openBlock(),i.createElementBlock("g",_j,[i.createElementVNode("line",{x1:3,x2:3,y1:3,y2:97,stroke:a.value.style.verticalBar.axis.color,"stroke-width":a.value.style.verticalBar.axis.strokeWidth},null,8,Fj),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(6,(w,g)=>i.createElementVNode("rect",{x:3,y:5+g*15.6,height:"12",width:94-94*g/6,fill:a.value.style.verticalBar.color,rx:a.value.style.verticalBar.borderRadius},null,8,Sj)),64))])):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0)],14,NG))}},[["__scopeId","data-v-25049ddf"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Ri(t){"@babel/helpers - typeof";return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ri(t)}function Og(t,e){return Og=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Og(t,e)}function Tj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qh(t,e,r){return Tj()?qh=Reflect.construct:qh=function(a,A,o){var s=[null];s.push.apply(s,A);var l=Function.bind.apply(a,s),c=new l;return o&&Og(c,o.prototype),c},qh.apply(null,arguments)}function rA(t){return Nj(t)||Lj(t)||Uj(t)||Ij()}function Nj(t){if(Array.isArray(t))return Pg(t)}function Lj(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Uj(t,e){if(t){if(typeof t=="string")return Pg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pg(t,e)}}function Pg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ij(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
389
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Dj=Object.hasOwnProperty,ox=Object.setPrototypeOf,Qj=Object.isFrozen,Oj=Object.getPrototypeOf,Pj=Object.getOwnPropertyDescriptor,Wn=Object.freeze,nA=Object.seal,Mj=Object.create,sx=typeof Reflect<"u"&&Reflect,Yh=sx.apply,Mg=sx.construct;Yh||(Yh=function(e,r,n){return e.apply(r,n)}),Wn||(Wn=function(e){return e}),nA||(nA=function(e){return e}),Mg||(Mg=function(e,r){return qh(e,rA(r))});var Rj=Qa(Array.prototype.forEach),lx=Qa(Array.prototype.pop),lc=Qa(Array.prototype.push),Jh=Qa(String.prototype.toLowerCase),Rg=Qa(String.prototype.toString),Hj=Qa(String.prototype.match),aA=Qa(String.prototype.replace),Vj=Qa(String.prototype.indexOf),$j=Qa(String.prototype.trim),Xn=Qa(RegExp.prototype.test),Hg=zj(TypeError);function Qa(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return Yh(t,e,n)}}function zj(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Mg(t,r)}}function Pt(t,e,r){var n;r=(n=r)!==null&&n!==void 0?n:Jh,ox&&ox(t,null);for(var a=e.length;a--;){var A=e[a];if(typeof A=="string"){var o=r(A);o!==A&&(Qj(e)||(e[a]=o),A=o)}t[A]=!0}return t}function So(t){var e=Mj(null),r;for(r in t)Yh(Dj,t,[r])===!0&&(e[r]=t[r]);return e}function Zh(t,e){for(;t!==null;){var r=Pj(t,e);if(r){if(r.get)return Qa(r.get);if(typeof r.value=="function")return Qa(r.value)}t=Oj(t)}function n(a){return console.warn("fallback value for",a),null}return n}var cx=Wn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vg=Wn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$g=Wn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kj=Wn(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),zg=Wn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Gj=Wn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ux=Wn(["#text"]),hx=Wn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kg=Wn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fx=Wn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ef=Wn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jj=nA(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wj=nA(/<%[\w\W]*|[\w\W]*%>/gm),Xj=nA(/\${[\w\W]*}/gm),qj=nA(/^data-[\-\w.\u00B7-\uFFFF]/),Yj=nA(/^aria-[\-\w]+$/),Jj=nA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zj=nA(/^(?:\w+script|data):/i),eW=nA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tW=nA(/^html$/i),rW=function(){return typeof window>"u"?null:window},nW=function(e,r){if(Ri(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,a="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(a)&&(n=r.currentScript.getAttribute(a));var A="dompurify"+(n?"#"+n:"");try{return e.createPolicy(A,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+A+" could not be created."),null}};function dx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rW(),e=function(X){return dx(X)};if(e.version="2.4.7",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,n=t.document,a=t.DocumentFragment,A=t.HTMLTemplateElement,o=t.Node,s=t.Element,l=t.NodeFilter,c=t.NamedNodeMap,u=c===void 0?t.NamedNodeMap||t.MozNamedAttrMap:c,p=t.HTMLFormElement,h=t.DOMParser,d=t.trustedTypes,w=s.prototype,g=Zh(w,"cloneNode"),y=Zh(w,"nextSibling"),m=Zh(w,"childNodes"),F=Zh(w,"parentNode");if(typeof A=="function"){var N=n.createElement("template");N.content&&N.content.ownerDocument&&(n=N.content.ownerDocument)}var Q=nW(d,r),z=Q?Q.createHTML(""):"",R=n,I=R.implementation,U=R.createNodeIterator,O=R.createDocumentFragment,q=R.getElementsByTagName,T=r.importNode,L={};try{L=So(n).documentMode?n.documentMode:{}}catch{}var G={};e.isSupported=typeof F=="function"&&I&&I.createHTMLDocument!==void 0&&L!==9;var Y=jj,se=Wj,he=Xj,ge=qj,re=Yj,le=Zj,fe=eW,Ue=Jj,b=null,_=Pt({},[].concat(rA(cx),rA(Vg),rA($g),rA(zg),rA(ux))),B=null,x=Pt({},[].concat(rA(hx),rA(Kg),rA(fx),rA(ef))),S=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),D=null,W=null,ue=!0,Ce=!0,de=!1,ke=!0,ne=!1,Ee=!1,xe=!1,te=!1,Pe=!1,rt=!1,Ve=!1,We=!0,Ye=!1,Je="user-content-",ot=!0,at=!1,ft={},yt=null,kt=Pt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Nt=null,dt=Pt({},["audio","video","img","source","image","track"]),xt=null,tt=Pt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ir="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",fr="http://www.w3.org/1999/xhtml",Qt=fr,Kt=!1,Jr=null,Rt=Pt({},[ir,Lt,fr],Rg),_r,Yt=["application/xhtml+xml","text/html"],on="text/html",Et,Gt=null,bt=n.createElement("form"),$t=function(X){return X instanceof RegExp||X instanceof Function},xa=function(X){Gt&&Gt===X||((!X||Ri(X)!=="object")&&(X={}),X=So(X),_r=Yt.indexOf(X.PARSER_MEDIA_TYPE)===-1?_r=on:_r=X.PARSER_MEDIA_TYPE,Et=_r==="application/xhtml+xml"?Rg:Jh,b="ALLOWED_TAGS"in X?Pt({},X.ALLOWED_TAGS,Et):_,B="ALLOWED_ATTR"in X?Pt({},X.ALLOWED_ATTR,Et):x,Jr="ALLOWED_NAMESPACES"in X?Pt({},X.ALLOWED_NAMESPACES,Rg):Rt,xt="ADD_URI_SAFE_ATTR"in X?Pt(So(tt),X.ADD_URI_SAFE_ATTR,Et):tt,Nt="ADD_DATA_URI_TAGS"in X?Pt(So(dt),X.ADD_DATA_URI_TAGS,Et):dt,yt="FORBID_CONTENTS"in X?Pt({},X.FORBID_CONTENTS,Et):kt,D="FORBID_TAGS"in X?Pt({},X.FORBID_TAGS,Et):{},W="FORBID_ATTR"in X?Pt({},X.FORBID_ATTR,Et):{},ft="USE_PROFILES"in X?X.USE_PROFILES:!1,ue=X.ALLOW_ARIA_ATTR!==!1,Ce=X.ALLOW_DATA_ATTR!==!1,de=X.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=X.SAFE_FOR_TEMPLATES||!1,Ee=X.WHOLE_DOCUMENT||!1,Pe=X.RETURN_DOM||!1,rt=X.RETURN_DOM_FRAGMENT||!1,Ve=X.RETURN_TRUSTED_TYPE||!1,te=X.FORCE_BODY||!1,We=X.SANITIZE_DOM!==!1,Ye=X.SANITIZE_NAMED_PROPS||!1,ot=X.KEEP_CONTENT!==!1,at=X.IN_PLACE||!1,Ue=X.ALLOWED_URI_REGEXP||Ue,Qt=X.NAMESPACE||fr,S=X.CUSTOM_ELEMENT_HANDLING||{},X.CUSTOM_ELEMENT_HANDLING&&$t(X.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(S.tagNameCheck=X.CUSTOM_ELEMENT_HANDLING.tagNameCheck),X.CUSTOM_ELEMENT_HANDLING&&$t(X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(S.attributeNameCheck=X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(S.allowCustomizedBuiltInElements=X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ne&&(Ce=!1),rt&&(Pe=!0),ft&&(b=Pt({},rA(ux)),B=[],ft.html===!0&&(Pt(b,cx),Pt(B,hx)),ft.svg===!0&&(Pt(b,Vg),Pt(B,Kg),Pt(B,ef)),ft.svgFilters===!0&&(Pt(b,$g),Pt(B,Kg),Pt(B,ef)),ft.mathMl===!0&&(Pt(b,zg),Pt(B,fx),Pt(B,ef))),X.ADD_TAGS&&(b===_&&(b=So(b)),Pt(b,X.ADD_TAGS,Et)),X.ADD_ATTR&&(B===x&&(B=So(B)),Pt(B,X.ADD_ATTR,Et)),X.ADD_URI_SAFE_ATTR&&Pt(xt,X.ADD_URI_SAFE_ATTR,Et),X.FORBID_CONTENTS&&(yt===kt&&(yt=So(yt)),Pt(yt,X.FORBID_CONTENTS,Et)),ot&&(b["#text"]=!0),Ee&&Pt(b,["html","head","body"]),b.table&&(Pt(b,["tbody"]),delete D.tbody),Wn&&Wn(X),Gt=X)},Ir=Pt({},["mi","mo","mn","ms","mtext"]),Yn=Pt({},["foreignobject","desc","title","annotation-xml"]),oa=Pt({},["title","style","font","a","script"]),gt=Pt({},Vg);Pt(gt,$g),Pt(gt,Kj);var Fn=Pt({},zg);Pt(Fn,Gj);var Mn=function(X){var we=F(X);(!we||!we.tagName)&&(we={namespaceURI:Qt,tagName:"template"});var Le=Jh(X.tagName),Ke=Jh(we.tagName);return Jr[X.namespaceURI]?X.namespaceURI===Lt?we.namespaceURI===fr?Le==="svg":we.namespaceURI===ir?Le==="svg"&&(Ke==="annotation-xml"||Ir[Ke]):!!gt[Le]:X.namespaceURI===ir?we.namespaceURI===fr?Le==="math":we.namespaceURI===Lt?Le==="math"&&Yn[Ke]:!!Fn[Le]:X.namespaceURI===fr?we.namespaceURI===Lt&&!Yn[Ke]||we.namespaceURI===ir&&!Ir[Ke]?!1:!Fn[Le]&&(oa[Le]||!gt[Le]):!!(_r==="application/xhtml+xml"&&Jr[X.namespaceURI]):!1},mr=function(X){lc(e.removed,{element:X});try{X.parentNode.removeChild(X)}catch{try{X.outerHTML=z}catch{X.remove()}}},xr=function(X,we){try{lc(e.removed,{attribute:we.getAttributeNode(X),from:we})}catch{lc(e.removed,{attribute:null,from:we})}if(we.removeAttribute(X),X==="is"&&!B[X])if(Pe||rt)try{mr(we)}catch{}else try{we.setAttribute(X,"")}catch{}},br=function(X){var we,Le;if(te)X="<remove></remove>"+X;else{var Ke=Hj(X,/^[\r\n\t ]+/);Le=Ke&&Ke[0]}_r==="application/xhtml+xml"&&Qt===fr&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");var ze=Q?Q.createHTML(X):X;if(Qt===fr)try{we=new h().parseFromString(ze,_r)}catch{}if(!we||!we.documentElement){we=I.createDocument(Qt,"template",null);try{we.documentElement.innerHTML=Kt?z:ze}catch{}}var qe=we.body||we.documentElement;return X&&Le&&qe.insertBefore(n.createTextNode(Le),qe.childNodes[0]||null),Qt===fr?q.call(we,Ee?"html":"body")[0]:Ee?we.documentElement:qe},H=function(X){return U.call(X.ownerDocument||X,X,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ie=function(X){return X instanceof p&&(typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||!(X.attributes instanceof u)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function")},Z=function(X){return Ri(o)==="object"?X instanceof o:X&&Ri(X)==="object"&&typeof X.nodeType=="number"&&typeof X.nodeName=="string"},ee=function(X,we,Le){G[X]&&Rj(G[X],function(Ke){Ke.call(e,we,Le,Gt)})},Ae=function(X){var we;if(ee("beforeSanitizeElements",X,null),ie(X)||Xn(/[\u0080-\uFFFF]/,X.nodeName))return mr(X),!0;var Le=Et(X.nodeName);if(ee("uponSanitizeElement",X,{tagName:Le,allowedTags:b}),X.hasChildNodes()&&!Z(X.firstElementChild)&&(!Z(X.content)||!Z(X.content.firstElementChild))&&Xn(/<[/\w]/g,X.innerHTML)&&Xn(/<[/\w]/g,X.textContent)||Le==="select"&&Xn(/<template/i,X.innerHTML))return mr(X),!0;if(!b[Le]||D[Le]){if(!D[Le]&&Se(Le)&&(S.tagNameCheck instanceof RegExp&&Xn(S.tagNameCheck,Le)||S.tagNameCheck instanceof Function&&S.tagNameCheck(Le)))return!1;if(ot&&!yt[Le]){var Ke=F(X)||X.parentNode,ze=m(X)||X.childNodes;if(ze&&Ke)for(var qe=ze.length,ut=qe-1;ut>=0;--ut)Ke.insertBefore(g(ze[ut],!0),y(X))}return mr(X),!0}return X instanceof s&&!Mn(X)||(Le==="noscript"||Le==="noembed"||Le==="noframes")&&Xn(/<\/no(script|embed|frames)/i,X.innerHTML)?(mr(X),!0):(ne&&X.nodeType===3&&(we=X.textContent,we=aA(we,Y," "),we=aA(we,se," "),we=aA(we,he," "),X.textContent!==we&&(lc(e.removed,{element:X.cloneNode()}),X.textContent=we)),ee("afterSanitizeElements",X,null),!1)},oe=function(X,we,Le){if(We&&(we==="id"||we==="name")&&(Le in n||Le in bt))return!1;if(!(Ce&&!W[we]&&Xn(ge,we))){if(!(ue&&Xn(re,we))){if(!B[we]||W[we]){if(!(Se(X)&&(S.tagNameCheck instanceof RegExp&&Xn(S.tagNameCheck,X)||S.tagNameCheck instanceof Function&&S.tagNameCheck(X))&&(S.attributeNameCheck instanceof RegExp&&Xn(S.attributeNameCheck,we)||S.attributeNameCheck instanceof Function&&S.attributeNameCheck(we))||we==="is"&&S.allowCustomizedBuiltInElements&&(S.tagNameCheck instanceof RegExp&&Xn(S.tagNameCheck,Le)||S.tagNameCheck instanceof Function&&S.tagNameCheck(Le))))return!1}else if(!xt[we]){if(!Xn(Ue,aA(Le,fe,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&X!=="script"&&Vj(Le,"data:")===0&&Nt[X])){if(!(de&&!Xn(le,aA(Le,fe,"")))){if(Le)return!1}}}}}}return!0},Se=function(X){return X.indexOf("-")>0},Ie=function(X){var we,Le,Ke,ze;ee("beforeSanitizeAttributes",X,null);var qe=X.attributes;if(qe){var ut={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};for(ze=qe.length;ze--;){we=qe[ze];var zt=we,Ct=zt.name,Er=zt.namespaceURI;if(Le=Ct==="value"?we.value:$j(we.value),Ke=Et(Ct),ut.attrName=Ke,ut.attrValue=Le,ut.keepAttr=!0,ut.forceKeepAttr=void 0,ee("uponSanitizeAttribute",X,ut),Le=ut.attrValue,!ut.forceKeepAttr&&(xr(Ct,X),!!ut.keepAttr)){if(!ke&&Xn(/\/>/i,Le)){xr(Ct,X);continue}ne&&(Le=aA(Le,Y," "),Le=aA(Le,se," "),Le=aA(Le,he," "));var sa=Et(X.nodeName);if(oe(sa,Ke,Le)){if(Ye&&(Ke==="id"||Ke==="name")&&(xr(Ct,X),Le=Je+Le),Q&&Ri(d)==="object"&&typeof d.getAttributeType=="function"&&!Er)switch(d.getAttributeType(sa,Ke)){case"TrustedHTML":{Le=Q.createHTML(Le);break}case"TrustedScriptURL":{Le=Q.createScriptURL(Le);break}}try{Er?X.setAttributeNS(Er,Ct,Le):X.setAttribute(Ct,Le),lx(e.removed)}catch{}}}}ee("afterSanitizeAttributes",X,null)}},Fe=function pe(X){var we,Le=H(X);for(ee("beforeSanitizeShadowDOM",X,null);we=Le.nextNode();)ee("uponSanitizeShadowNode",we,null),!Ae(we)&&(we.content instanceof a&&pe(we.content),Ie(we));ee("afterSanitizeShadowDOM",X,null)};return e.sanitize=function(pe){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we,Le,Ke,ze,qe;if(Kt=!pe,Kt&&(pe="<!-->"),typeof pe!="string"&&!Z(pe))if(typeof pe.toString=="function"){if(pe=pe.toString(),typeof pe!="string")throw Hg("dirty is not a string, aborting")}else throw Hg("toString is not a function");if(!e.isSupported){if(Ri(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof pe=="string")return t.toStaticHTML(pe);if(Z(pe))return t.toStaticHTML(pe.outerHTML)}return pe}if(xe||xa(X),e.removed=[],typeof pe=="string"&&(at=!1),at){if(pe.nodeName){var ut=Et(pe.nodeName);if(!b[ut]||D[ut])throw Hg("root node is forbidden and cannot be sanitized in-place")}}else if(pe instanceof o)we=br("<!---->"),Le=we.ownerDocument.importNode(pe,!0),Le.nodeType===1&&Le.nodeName==="BODY"||Le.nodeName==="HTML"?we=Le:we.appendChild(Le);else{if(!Pe&&!ne&&!Ee&&pe.indexOf("<")===-1)return Q&&Ve?Q.createHTML(pe):pe;if(we=br(pe),!we)return Pe?null:Ve?z:""}we&&te&&mr(we.firstChild);for(var zt=H(at?pe:we);Ke=zt.nextNode();)Ke.nodeType===3&&Ke===ze||Ae(Ke)||(Ke.content instanceof a&&Fe(Ke.content),Ie(Ke),ze=Ke);if(ze=null,at)return pe;if(Pe){if(rt)for(qe=O.call(we.ownerDocument);we.firstChild;)qe.appendChild(we.firstChild);else qe=we;return(B.shadowroot||B.shadowrootmod)&&(qe=T.call(r,qe,!0)),qe}var Ct=Ee?we.outerHTML:we.innerHTML;return Ee&&b["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&Xn(tW,we.ownerDocument.doctype.name)&&(Ct="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
390
- `+Ct),ne&&(Ct=aA(Ct,Y," "),Ct=aA(Ct,se," "),Ct=aA(Ct,he," ")),Q&&Ve?Q.createHTML(Ct):Ct},e.setConfig=function(pe){xa(pe),xe=!0},e.clearConfig=function(){Gt=null,xe=!1},e.isValidAttribute=function(pe,X,we){Gt||xa({});var Le=Et(pe),Ke=Et(X);return oe(Le,Ke,we)},e.addHook=function(pe,X){typeof X=="function"&&(G[pe]=G[pe]||[],lc(G[pe],X))},e.removeHook=function(pe){if(G[pe])return lx(G[pe])},e.removeHooks=function(pe){G[pe]&&(G[pe]=[])},e.removeAllHooks=function(){G={}},e}var aW=dx();const AW=Object.freeze(Object.defineProperty({__proto__:null,default:aW},Symbol.toStringTag,{value:"Module"}));var cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var tf=function(t){return t&&t.Math==Math&&t},An=tf(typeof globalThis=="object"&&globalThis)||tf(typeof window=="object"&&window)||tf(typeof self=="object"&&self)||tf(typeof cc=="object"&&cc)||function(){return this}()||cc||Function("return this")(),Ls={},Vr=function(t){try{return!!t()}catch{return!0}},iW=Vr,kA=!iW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),oW=Vr,rf=!oW(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),sW=rf,nf=Function.prototype.call,_n=sW?nf.bind(nf):function(){return nf.apply(nf,arguments)},px={},mx={}.propertyIsEnumerable,yx=Object.getOwnPropertyDescriptor,lW=yx&&!mx.call({1:2},1);px.f=lW?function(e){var r=yx(this,e);return!!r&&r.enumerable}:mx;var af=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},vx=rf,wx=Function.prototype,Gg=wx.call,cW=vx&&wx.bind.bind(Gg,Gg),$r=vx?cW:function(t){return function(){return Gg.apply(t,arguments)}},Bx=$r,uW=Bx({}.toString),hW=Bx("".slice),ko=function(t){return hW(uW(t),8,-1)},fW=$r,dW=Vr,gW=ko,jg=Object,pW=fW("".split),xx=dW(function(){return!jg("z").propertyIsEnumerable(0)})?function(t){return gW(t)=="String"?pW(t,""):jg(t)}:jg,To=function(t){return t==null},mW=To,yW=TypeError,TA=function(t){if(mW(t))throw yW("Can't call method on "+t);return t},vW=xx,wW=TA,uc=function(t){return vW(wW(t))},Wg=typeof document=="object"&&document.all,BW=typeof Wg>"u"&&Wg!==void 0,bx={all:Wg,IS_HTMLDDA:BW},Cx=bx,xW=Cx.all,Lr=Cx.IS_HTMLDDA?function(t){return typeof t=="function"||t===xW}:function(t){return typeof t=="function"},Ex=Lr,_x=bx,bW=_x.all,ti=_x.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Ex(t)||t===bW}:function(t){return typeof t=="object"?t!==null:Ex(t)},Xg=An,CW=Lr,EW=function(t){return CW(t)?t:void 0},No=function(t,e){return arguments.length<2?EW(Xg[t]):Xg[t]&&Xg[t][e]},_W=$r,Af=_W({}.isPrototypeOf),of=typeof navigator<"u"&&String(navigator.userAgent)||"",Fx=An,qg=of,Sx=Fx.process,kx=Fx.Deno,Tx=Sx&&Sx.versions||kx&&kx.version,Nx=Tx&&Tx.v8,AA,sf;Nx&&(AA=Nx.split("."),sf=AA[0]>0&&AA[0]<4?1:+(AA[0]+AA[1])),!sf&&qg&&(AA=qg.match(/Edge\/(\d+)/),(!AA||AA[1]>=74)&&(AA=qg.match(/Chrome\/(\d+)/),AA&&(sf=+AA[1])));var Yg=sf,Lx=Yg,FW=Vr,SW=An,kW=SW.String,Ux=!!Object.getOwnPropertySymbols&&!FW(function(){var t=Symbol();return!kW(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Lx&&Lx<41}),TW=Ux,Ix=TW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",NW=No,LW=Lr,UW=Af,IW=Ix,DW=Object,Dx=IW?function(t){return typeof t=="symbol"}:function(t){var e=NW("Symbol");return LW(e)&&UW(e.prototype,DW(t))},QW=String,lf=function(t){try{return QW(t)}catch{return"Object"}},OW=Lr,PW=lf,MW=TypeError,ri=function(t){if(OW(t))return t;throw MW(PW(t)+" is not a function")},RW=ri,HW=To,Us=function(t,e){var r=t[e];return HW(r)?void 0:RW(r)},Jg=_n,Zg=Lr,e1=ti,VW=TypeError,$W=function(t,e){var r,n;if(e==="string"&&Zg(r=t.toString)&&!e1(n=Jg(r,t))||Zg(r=t.valueOf)&&!e1(n=Jg(r,t))||e!=="string"&&Zg(r=t.toString)&&!e1(n=Jg(r,t)))return n;throw VW("Can't convert object to primitive value")},Qx={exports:{}},Ox=An,zW=Object.defineProperty,t1=function(t,e){try{zW(Ox,t,{value:e,configurable:!0,writable:!0})}catch{Ox[t]=e}return e},KW=An,GW=t1,Px="__core-js_shared__",jW=KW[Px]||GW(Px,{}),r1=jW,Mx=r1;(Qx.exports=function(t,e){return Mx[t]||(Mx[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var n1=Qx.exports,WW=TA,XW=Object,cf=function(t){return XW(WW(t))},qW=$r,YW=cf,JW=qW({}.hasOwnProperty),iA=Object.hasOwn||function(e,r){return JW(YW(e),r)},ZW=$r,eX=0,tX=Math.random(),rX=ZW(1 .toString),Rx=function(t){return"Symbol("+(t===void 0?"":t)+")_"+rX(++eX+tX,36)},nX=An,aX=n1,Hx=iA,AX=Rx,iX=Ux,oX=Ix,Is=nX.Symbol,a1=aX("wks"),sX=oX?Is.for||Is:Is&&Is.withoutSetter||AX,dn=function(t){return Hx(a1,t)||(a1[t]=iX&&Hx(Is,t)?Is[t]:sX("Symbol."+t)),a1[t]},lX=_n,Vx=ti,$x=Dx,cX=Us,uX=$W,hX=dn,fX=TypeError,dX=hX("toPrimitive"),gX=function(t,e){if(!Vx(t)||$x(t))return t;var r=cX(t,dX),n;if(r){if(e===void 0&&(e="default"),n=lX(r,t,e),!Vx(n)||$x(n))return n;throw fX("Can't convert object to primitive value")}return e===void 0&&(e="number"),uX(t,e)},pX=gX,mX=Dx,A1=function(t){var e=pX(t,"string");return mX(e)?e:e+""},yX=An,zx=ti,i1=yX.document,vX=zx(i1)&&zx(i1.createElement),uf=function(t){return vX?i1.createElement(t):{}},wX=kA,BX=Vr,xX=uf,Kx=!wX&&!BX(function(){return Object.defineProperty(xX("div"),"a",{get:function(){return 7}}).a!=7}),bX=kA,CX=_n,EX=px,_X=af,FX=uc,SX=A1,kX=iA,TX=Kx,Gx=Object.getOwnPropertyDescriptor;Ls.f=bX?Gx:function(e,r){if(e=FX(e),r=SX(r),TX)try{return Gx(e,r)}catch{}if(kX(e,r))return _X(!CX(EX.f,e,r),e[r])};var NA={},NX=kA,LX=Vr,jx=NX&&LX(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),UX=ti,IX=String,DX=TypeError,On=function(t){if(UX(t))return t;throw DX(IX(t)+" is not an object")},QX=kA,OX=Kx,PX=jx,hf=On,Wx=A1,MX=TypeError,o1=Object.defineProperty,RX=Object.getOwnPropertyDescriptor,s1="enumerable",l1="configurable",c1="writable";NA.f=QX?PX?function(e,r,n){if(hf(e),r=Wx(r),hf(n),typeof e=="function"&&r==="prototype"&&"value"in n&&c1 in n&&!n[c1]){var a=RX(e,r);a&&a[c1]&&(e[r]=n.value,n={configurable:l1 in n?n[l1]:a[l1],enumerable:s1 in n?n[s1]:a[s1],writable:!1})}return o1(e,r,n)}:o1:function(e,r,n){if(hf(e),r=Wx(r),hf(n),OX)try{return o1(e,r,n)}catch{}if("get"in n||"set"in n)throw MX("Accessors not supported");return"value"in n&&(e[r]=n.value),e};var HX=kA,VX=NA,$X=af,hc=HX?function(t,e,r){return VX.f(t,e,$X(1,r))}:function(t,e,r){return t[e]=r,t},Xx={exports:{}},u1=kA,zX=iA,qx=Function.prototype,KX=u1&&Object.getOwnPropertyDescriptor,h1=zX(qx,"name"),GX=h1&&(function(){}).name==="something",jX=h1&&(!u1||u1&&KX(qx,"name").configurable),ff={EXISTS:h1,PROPER:GX,CONFIGURABLE:jX},WX=$r,XX=Lr,f1=r1,qX=WX(Function.toString);XX(f1.inspectSource)||(f1.inspectSource=function(t){return qX(t)});var d1=f1.inspectSource,YX=An,JX=Lr,Yx=YX.WeakMap,ZX=JX(Yx)&&/native code/.test(String(Yx)),eq=n1,tq=Rx,Jx=eq("keys"),g1=function(t){return Jx[t]||(Jx[t]=tq(t))},p1={},rq=ZX,Zx=An,nq=ti,aq=hc,m1=iA,y1=r1,Aq=g1,iq=p1,eb="Object already initialized",v1=Zx.TypeError,oq=Zx.WeakMap,df,fc,gf,sq=function(t){return gf(t)?fc(t):df(t,{})},lq=function(t){return function(e){var r;if(!nq(e)||(r=fc(e)).type!==t)throw v1("Incompatible receiver, "+t+" required");return r}};if(rq||y1.state){var LA=y1.state||(y1.state=new oq);LA.get=LA.get,LA.has=LA.has,LA.set=LA.set,df=function(t,e){if(LA.has(t))throw v1(eb);return e.facade=t,LA.set(t,e),e},fc=function(t){return LA.get(t)||{}},gf=function(t){return LA.has(t)}}else{var Ds=Aq("state");iq[Ds]=!0,df=function(t,e){if(m1(t,Ds))throw v1(eb);return e.facade=t,aq(t,Ds,e),e},fc=function(t){return m1(t,Ds)?t[Ds]:{}},gf=function(t){return m1(t,Ds)}}var pf={set:df,get:fc,has:gf,enforce:sq,getterFor:lq},w1=$r,cq=Vr,uq=Lr,mf=iA,B1=kA,hq=ff.CONFIGURABLE,fq=d1,tb=pf,dq=tb.enforce,gq=tb.get,rb=String,yf=Object.defineProperty,pq=w1("".slice),mq=w1("".replace),yq=w1([].join),vq=B1&&!cq(function(){return yf(function(){},"length",{value:8}).length!==8}),wq=String(String).split("String"),Bq=Xx.exports=function(t,e,r){pq(rb(e),0,7)==="Symbol("&&(e="["+mq(rb(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!mf(t,"name")||hq&&t.name!==e)&&(B1?yf(t,"name",{value:e,configurable:!0}):t.name=e),vq&&r&&mf(r,"arity")&&t.length!==r.arity&&yf(t,"length",{value:r.arity});try{r&&mf(r,"constructor")&&r.constructor?B1&&yf(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=dq(t);return mf(n,"source")||(n.source=yq(wq,typeof e=="string"?e:"")),t};Function.prototype.toString=Bq(function(){return uq(this)&&gq(this).source||fq(this)},"toString");var nb=Xx.exports,xq=Lr,bq=NA,Cq=nb,Eq=t1,Lo=function(t,e,r,n){n||(n={});var a=n.enumerable,A=n.name!==void 0?n.name:e;if(xq(r)&&Cq(r,A,n),n.global)a?t[e]=r:Eq(e,r);else{try{n.unsafe?t[e]&&(a=!0):delete t[e]}catch{}a?t[e]=r:bq.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ab={},_q=Math.ceil,Fq=Math.floor,Sq=Math.trunc||function(e){var r=+e;return(r>0?Fq:_q)(r)},kq=Sq,vf=function(t){var e=+t;return e!==e||e===0?0:kq(e)},Tq=vf,Nq=Math.max,Lq=Math.min,Ab=function(t,e){var r=Tq(t);return r<0?Nq(r+e,0):Lq(r,e)},Uq=vf,Iq=Math.min,Qs=function(t){return t>0?Iq(Uq(t),9007199254740991):0},Dq=Qs,wf=function(t){return Dq(t.length)},Qq=uc,Oq=Ab,Pq=wf,ib=function(t){return function(e,r,n){var a=Qq(e),A=Pq(a),o=Oq(n,A),s;if(t&&r!=r){for(;A>o;)if(s=a[o++],s!=s)return!0}else for(;A>o;o++)if((t||o in a)&&a[o]===r)return t||o||0;return!t&&-1}},ob={includes:ib(!0),indexOf:ib(!1)},Mq=$r,x1=iA,Rq=uc,Hq=ob.indexOf,Vq=p1,sb=Mq([].push),lb=function(t,e){var r=Rq(t),n=0,a=[],A;for(A in r)!x1(Vq,A)&&x1(r,A)&&sb(a,A);for(;e.length>n;)x1(r,A=e[n++])&&(~Hq(a,A)||sb(a,A));return a},b1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$q=lb,zq=b1,Kq=zq.concat("length","prototype");ab.f=Object.getOwnPropertyNames||function(e){return $q(e,Kq)};var cb={};cb.f=Object.getOwnPropertySymbols;var Gq=No,jq=$r,Wq=ab,Xq=cb,qq=On,Yq=jq([].concat),Jq=Gq("Reflect","ownKeys")||function(e){var r=Wq.f(qq(e)),n=Xq.f;return n?Yq(r,n(e)):r},ub=iA,Zq=Jq,eY=Ls,tY=NA,rY=function(t,e,r){for(var n=Zq(e),a=tY.f,A=eY.f,o=0;o<n.length;o++){var s=n[o];!ub(t,s)&&!(r&&ub(r,s))&&a(t,s,A(e,s))}},nY=Vr,aY=Lr,AY=/#|\.prototype\./,dc=function(t,e){var r=oY[iY(t)];return r==lY?!0:r==sY?!1:aY(e)?nY(e):!!e},iY=dc.normalize=function(t){return String(t).replace(AY,".").toLowerCase()},oY=dc.data={},sY=dc.NATIVE="N",lY=dc.POLYFILL="P",hb=dc,C1=An,cY=Ls.f,uY=hc,hY=Lo,fY=t1,dY=rY,gY=hb,qn=function(t,e){var r=t.target,n=t.global,a=t.stat,A,o,s,l,c,u;if(n?o=C1:a?o=C1[r]||fY(r,{}):o=(C1[r]||{}).prototype,o)for(s in e){if(c=e[s],t.dontCallGetSet?(u=cY(o,s),l=u&&u.value):l=o[s],A=gY(n?s:r+(a?".":"#")+s,t.forced),!A&&l!==void 0){if(typeof c==typeof l)continue;dY(c,l)}(t.sham||l&&l.sham)&&uY(c,"sham",!0),hY(o,s,c,t)}},pY=ko,gc=typeof process<"u"&&pY(process)=="process",mY=$r,yY=ri,vY=function(t,e,r){try{return mY(yY(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},wY=Lr,BY=String,xY=TypeError,bY=function(t){if(typeof t=="object"||wY(t))return t;throw xY("Can't set "+BY(t)+" as a prototype")},CY=vY,EY=On,_Y=bY,fb=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=CY(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(a,A){return EY(a),_Y(A),t?r(a,A):a.__proto__=A,a}}():void 0),FY=NA.f,SY=iA,kY=dn,db=kY("toStringTag"),E1=function(t,e,r){t&&!r&&(t=t.prototype),t&&!SY(t,db)&&FY(t,db,{configurable:!0,value:e})},gb=nb,TY=NA,NY=function(t,e,r){return r.get&&gb(r.get,e,{getter:!0}),r.set&&gb(r.set,e,{setter:!0}),TY.f(t,e,r)},LY=No,UY=NY,IY=dn,DY=kA,pb=IY("species"),QY=function(t){var e=LY(t);DY&&e&&!e[pb]&&UY(e,pb,{configurable:!0,get:function(){return this}})},OY=Af,PY=TypeError,MY=function(t,e){if(OY(e,t))return t;throw PY("Incorrect invocation")},RY=dn,HY=RY("toStringTag"),mb={};mb[HY]="z";var VY=String(mb)==="[object z]",$Y=VY,zY=Lr,Bf=ko,KY=dn,GY=KY("toStringTag"),jY=Object,WY=Bf(function(){return arguments}())=="Arguments",XY=function(t,e){try{return t[e]}catch{}},_1=$Y?Bf:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=XY(e=jY(t),GY))=="string"?r:WY?Bf(e):(n=Bf(e))=="Object"&&zY(e.callee)?"Arguments":n},qY=$r,YY=Vr,yb=Lr,JY=_1,ZY=No,eJ=d1,vb=function(){},tJ=[],wb=ZY("Reflect","construct"),F1=/^\s*(?:class|function)\b/,rJ=qY(F1.exec),nJ=!F1.exec(vb),pc=function(e){if(!yb(e))return!1;try{return wb(vb,tJ,e),!0}catch{return!1}},Bb=function(e){if(!yb(e))return!1;switch(JY(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return nJ||!!rJ(F1,eJ(e))}catch{return!0}};Bb.sham=!0;var aJ=!wb||YY(function(){var t;return pc(pc.call)||!pc(Object)||!pc(function(){t=!0})||t})?Bb:pc,AJ=aJ,iJ=lf,oJ=TypeError,sJ=function(t){if(AJ(t))return t;throw oJ(iJ(t)+" is not a constructor")},xb=On,lJ=sJ,cJ=To,uJ=dn,hJ=uJ("species"),bb=function(t,e){var r=xb(t).constructor,n;return r===void 0||cJ(n=xb(r)[hJ])?e:lJ(n)},fJ=rf,Cb=Function.prototype,Eb=Cb.apply,_b=Cb.call,S1=typeof Reflect=="object"&&Reflect.apply||(fJ?_b.bind(Eb):function(){return _b.apply(Eb,arguments)}),dJ=ko,gJ=$r,mc=function(t){if(dJ(t)==="Function")return gJ(t)},Fb=mc,pJ=ri,mJ=rf,yJ=Fb(Fb.bind),k1=function(t,e){return pJ(t),e===void 0?t:mJ?yJ(t,e):function(){return t.apply(e,arguments)}},vJ=No,Sb=vJ("document","documentElement"),wJ=$r,BJ=wJ([].slice),xJ=TypeError,bJ=function(t,e){if(t<e)throw xJ("Not enough arguments");return t},CJ=of,kb=/(?:ipad|iphone|ipod).*applewebkit/i.test(CJ),Ba=An,EJ=S1,_J=k1,Tb=Lr,FJ=iA,Nb=Vr,Lb=Sb,SJ=BJ,Ub=uf,kJ=bJ,TJ=kb,NJ=gc,T1=Ba.setImmediate,N1=Ba.clearImmediate,LJ=Ba.process,L1=Ba.Dispatch,UJ=Ba.Function,Ib=Ba.MessageChannel,IJ=Ba.String,U1=0,yc={},Db="onreadystatechange",vc,Uo,I1,D1;Nb(function(){vc=Ba.location});var Q1=function(t){if(FJ(yc,t)){var e=yc[t];delete yc[t],e()}},O1=function(t){return function(){Q1(t)}},Qb=function(t){Q1(t.data)},Ob=function(t){Ba.postMessage(IJ(t),vc.protocol+"//"+vc.host)};(!T1||!N1)&&(T1=function(e){kJ(arguments.length,1);var r=Tb(e)?e:UJ(e),n=SJ(arguments,1);return yc[++U1]=function(){EJ(r,void 0,n)},Uo(U1),U1},N1=function(e){delete yc[e]},NJ?Uo=function(t){LJ.nextTick(O1(t))}:L1&&L1.now?Uo=function(t){L1.now(O1(t))}:Ib&&!TJ?(I1=new Ib,D1=I1.port2,I1.port1.onmessage=Qb,Uo=_J(D1.postMessage,D1)):Ba.addEventListener&&Tb(Ba.postMessage)&&!Ba.importScripts&&vc&&vc.protocol!=="file:"&&!Nb(Ob)?(Uo=Ob,Ba.addEventListener("message",Qb,!1)):Db in Ub("script")?Uo=function(t){Lb.appendChild(Ub("script"))[Db]=function(){Lb.removeChild(this),Q1(t)}}:Uo=function(t){setTimeout(O1(t),0)});var Pb={set:T1,clear:N1},Mb=function(){this.head=null,this.tail=null};Mb.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Rb=Mb,DJ=of,QJ=/ipad|iphone|ipod/i.test(DJ)&&typeof Pebble<"u",OJ=of,PJ=/web0s(?!.*chrome)/i.test(OJ),Io=An,Hb=k1,MJ=Ls.f,P1=Pb.set,RJ=Rb,HJ=kb,VJ=QJ,$J=PJ,M1=gc,Vb=Io.MutationObserver||Io.WebKitMutationObserver,$b=Io.document,zb=Io.process,xf=Io.Promise,Kb=MJ(Io,"queueMicrotask"),R1=Kb&&Kb.value,Os,H1,V1,bf,Gb;if(!R1){var Cf=new RJ,Ef=function(){var t,e;for(M1&&(t=zb.domain)&&t.exit();e=Cf.get();)try{e()}catch(r){throw Cf.head&&Os(),r}t&&t.enter()};!HJ&&!M1&&!$J&&Vb&&$b?(H1=!0,V1=$b.createTextNode(""),new Vb(Ef).observe(V1,{characterData:!0}),Os=function(){V1.data=H1=!H1}):!VJ&&xf&&xf.resolve?(bf=xf.resolve(void 0),bf.constructor=xf,Gb=Hb(bf.then,bf),Os=function(){Gb(Ef)}):M1?Os=function(){zb.nextTick(Ef)}:(P1=Hb(P1,Io),Os=function(){P1(Ef)}),R1=function(t){Cf.head||Os(),Cf.add(t)}}var zJ=R1,KJ=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}},$1=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},GJ=An,_f=GJ.Promise,jb=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",jJ=jb,WJ=gc,XJ=!jJ&&!WJ&&typeof window=="object"&&typeof document=="object",qJ=An,wc=_f,YJ=Lr,JJ=hb,ZJ=d1,eZ=dn,tZ=XJ,rZ=jb,z1=Yg;wc&&wc.prototype;var nZ=eZ("species"),K1=!1,Wb=YJ(qJ.PromiseRejectionEvent),aZ=JJ("Promise",function(){var t=ZJ(wc),e=t!==String(wc);if(!e&&z1===66)return!0;if(!z1||z1<51||!/native code/.test(t)){var r=new wc(function(A){A(1)}),n=function(A){A(function(){},function(){})},a=r.constructor={};if(a[nZ]=n,K1=r.then(function(){})instanceof n,!K1)return!0}return!e&&(tZ||rZ)&&!Wb}),Bc={CONSTRUCTOR:aZ,REJECTION_EVENT:Wb,SUBCLASSING:K1},Ps={},Xb=ri,AZ=TypeError,iZ=function(t){var e,r;this.promise=new t(function(n,a){if(e!==void 0||r!==void 0)throw AZ("Bad Promise constructor");e=n,r=a}),this.resolve=Xb(e),this.reject=Xb(r)};Ps.f=function(t){return new iZ(t)};var oZ=qn,Ff=gc,Hi=An,Ms=_n,qb=Lo,Yb=fb,sZ=E1,lZ=QY,cZ=ri,Sf=Lr,uZ=ti,hZ=MY,fZ=bb,Jb=Pb.set,G1=zJ,dZ=KJ,gZ=$1,pZ=Rb,Zb=pf,kf=_f,j1=Bc,e5=Ps,Tf="Promise",t5=j1.CONSTRUCTOR,mZ=j1.REJECTION_EVENT,yZ=j1.SUBCLASSING,W1=Zb.getterFor(Tf),vZ=Zb.set,Rs=kf&&kf.prototype,Do=kf,Nf=Rs,r5=Hi.TypeError,X1=Hi.document,q1=Hi.process,Y1=e5.f,wZ=Y1,BZ=!!(X1&&X1.createEvent&&Hi.dispatchEvent),n5="unhandledrejection",xZ="rejectionhandled",a5=0,A5=1,bZ=2,J1=1,i5=2,Lf,o5,CZ,s5,l5=function(t){var e;return uZ(t)&&Sf(e=t.then)?e:!1},c5=function(t,e){var r=e.value,n=e.state==A5,a=n?t.ok:t.fail,A=t.resolve,o=t.reject,s=t.domain,l,c,u;try{a?(n||(e.rejection===i5&&_Z(e),e.rejection=J1),a===!0?l=r:(s&&s.enter(),l=a(r),s&&(s.exit(),u=!0)),l===t.promise?o(r5("Promise-chain cycle")):(c=l5(l))?Ms(c,l,A,o):A(l)):o(r)}catch(p){s&&!u&&s.exit(),o(p)}},u5=function(t,e){t.notified||(t.notified=!0,G1(function(){for(var r=t.reactions,n;n=r.get();)c5(n,t);t.notified=!1,e&&!t.rejection&&EZ(t)}))},h5=function(t,e,r){var n,a;BZ?(n=X1.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),Hi.dispatchEvent(n)):n={promise:e,reason:r},!mZ&&(a=Hi["on"+t])?a(n):t===n5&&dZ("Unhandled promise rejection",r)},EZ=function(t){Ms(Jb,Hi,function(){var e=t.facade,r=t.value,n=f5(t),a;if(n&&(a=gZ(function(){Ff?q1.emit("unhandledRejection",r,e):h5(n5,e,r)}),t.rejection=Ff||f5(t)?i5:J1,a.error))throw a.value})},f5=function(t){return t.rejection!==J1&&!t.parent},_Z=function(t){Ms(Jb,Hi,function(){var e=t.facade;Ff?q1.emit("rejectionHandled",e):h5(xZ,e,t.value)})},Hs=function(t,e,r){return function(n){t(e,n,r)}},Vs=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=bZ,u5(t,!0))},Z1=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw r5("Promise can't be resolved itself");var n=l5(e);n?G1(function(){var a={done:!1};try{Ms(n,e,Hs(Z1,a,t),Hs(Vs,a,t))}catch(A){Vs(a,A,t)}}):(t.value=e,t.state=A5,u5(t,!1))}catch(a){Vs({done:!1},a,t)}}};if(t5&&(Do=function(e){hZ(this,Nf),cZ(e),Ms(Lf,this);var r=W1(this);try{e(Hs(Z1,r),Hs(Vs,r))}catch(n){Vs(r,n)}},Nf=Do.prototype,Lf=function(e){vZ(this,{type:Tf,done:!1,notified:!1,parent:!1,reactions:new pZ,rejection:!1,state:a5,value:void 0})},Lf.prototype=qb(Nf,"then",function(e,r){var n=W1(this),a=Y1(fZ(this,Do));return n.parent=!0,a.ok=Sf(e)?e:!0,a.fail=Sf(r)&&r,a.domain=Ff?q1.domain:void 0,n.state==a5?n.reactions.add(a):G1(function(){c5(a,n)}),a.promise}),o5=function(){var t=new Lf,e=W1(t);this.promise=t,this.resolve=Hs(Z1,e),this.reject=Hs(Vs,e)},e5.f=Y1=function(t){return t===Do||t===CZ?new o5(t):wZ(t)},Sf(kf)&&Rs!==Object.prototype)){s5=Rs.then,yZ||qb(Rs,"then",function(e,r){var n=this;return new Do(function(a,A){Ms(s5,n,a,A)}).then(e,r)},{unsafe:!0});try{delete Rs.constructor}catch{}Yb&&Yb(Rs,Nf)}oZ({global:!0,constructor:!0,wrap:!0,forced:t5},{Promise:Do}),sZ(Do,Tf,!1),lZ(Tf);var xc={},FZ=dn,SZ=xc,kZ=FZ("iterator"),TZ=Array.prototype,NZ=function(t){return t!==void 0&&(SZ.Array===t||TZ[kZ]===t)},LZ=_1,d5=Us,UZ=To,IZ=xc,DZ=dn,QZ=DZ("iterator"),g5=function(t){if(!UZ(t))return d5(t,QZ)||d5(t,"@@iterator")||IZ[LZ(t)]},OZ=_n,PZ=ri,MZ=On,RZ=lf,HZ=g5,VZ=TypeError,$Z=function(t,e){var r=arguments.length<2?HZ(t):e;if(PZ(r))return MZ(OZ(r,t));throw VZ(RZ(t)+" is not iterable")},zZ=_n,p5=On,KZ=Us,GZ=function(t,e,r){var n,a;p5(t);try{if(n=KZ(t,"return"),!n){if(e==="throw")throw r;return r}n=zZ(n,t)}catch(A){a=!0,n=A}if(e==="throw")throw r;if(a)throw n;return p5(n),r},jZ=k1,WZ=_n,XZ=On,qZ=lf,YZ=NZ,JZ=wf,m5=Af,ZZ=$Z,eee=g5,y5=GZ,tee=TypeError,Uf=function(t,e){this.stopped=t,this.result=e},v5=Uf.prototype,w5=function(t,e,r){var n=r&&r.that,a=!!(r&&r.AS_ENTRIES),A=!!(r&&r.IS_RECORD),o=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=jZ(e,n),c,u,p,h,d,w,g,y=function(F){return c&&y5(c,"normal",F),new Uf(!0,F)},m=function(F){return a?(XZ(F),s?l(F[0],F[1],y):l(F[0],F[1])):s?l(F,y):l(F)};if(A)c=t.iterator;else if(o)c=t;else{if(u=eee(t),!u)throw tee(qZ(t)+" is not iterable");if(YZ(u)){for(p=0,h=JZ(t);h>p;p++)if(d=m(t[p]),d&&m5(v5,d))return d;return new Uf(!1)}c=ZZ(t,u)}for(w=A?t.next:c.next;!(g=WZ(w,c)).done;){try{d=m(g.value)}catch(F){y5(c,"throw",F)}if(typeof d=="object"&&d&&m5(v5,d))return d}return new Uf(!1)},ree=dn,B5=ree("iterator"),x5=!1;try{var nee=0,b5={next:function(){return{done:!!nee++}},return:function(){x5=!0}};b5[B5]=function(){return this},Array.from(b5,function(){throw 2})}catch{}var aee=function(t,e){if(!e&&!x5)return!1;var r=!1;try{var n={};n[B5]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},Aee=_f,iee=aee,oee=Bc.CONSTRUCTOR,C5=oee||!iee(function(t){Aee.all(t).then(void 0,function(){})}),see=qn,lee=_n,cee=ri,uee=Ps,hee=$1,fee=w5,dee=C5;see({target:"Promise",stat:!0,forced:dee},{all:function(e){var r=this,n=uee.f(r),a=n.resolve,A=n.reject,o=hee(function(){var s=cee(r.resolve),l=[],c=0,u=1;fee(e,function(p){var h=c++,d=!1;u++,lee(s,r,p).then(function(w){d||(d=!0,l[h]=w,--u||a(l))},A)}),--u||a(l)});return o.error&&A(o.value),n.promise}});var gee=qn,pee=Bc.CONSTRUCTOR,ep=_f,mee=No,yee=Lr,vee=Lo,E5=ep&&ep.prototype;if(gee({target:"Promise",proto:!0,forced:pee,real:!0},{catch:function(t){return this.then(void 0,t)}}),yee(ep)){var _5=mee("Promise").prototype.catch;E5.catch!==_5&&vee(E5,"catch",_5,{unsafe:!0})}var wee=qn,Bee=_n,xee=ri,bee=Ps,Cee=$1,Eee=w5,_ee=C5;wee({target:"Promise",stat:!0,forced:_ee},{race:function(e){var r=this,n=bee.f(r),a=n.reject,A=Cee(function(){var o=xee(r.resolve);Eee(e,function(s){Bee(o,r,s).then(n.resolve,a)})});return A.error&&a(A.value),n.promise}});var Fee=qn,See=_n,kee=Ps,Tee=Bc.CONSTRUCTOR;Fee({target:"Promise",stat:!0,forced:Tee},{reject:function(e){var r=kee.f(this);return See(r.reject,void 0,e),r.promise}});var Nee=On,Lee=ti,Uee=Ps,Iee=function(t,e){if(Nee(t),Lee(e)&&e.constructor===t)return e;var r=Uee.f(t),n=r.resolve;return n(e),r.promise},Dee=qn,Qee=No,Oee=Bc.CONSTRUCTOR,Pee=Iee;Qee("Promise"),Dee({target:"Promise",stat:!0,forced:Oee},{resolve:function(e){return Pee(this,e)}});function F5(t,e,r,n,a,A,o){try{var s=t[A](o),l=s.value}catch(c){r(c);return}s.done?e(l):Promise.resolve(l).then(n,a)}function ni(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var A=t.apply(e,r);function o(l){F5(A,n,a,o,s,"next",l)}function s(l){F5(A,n,a,o,s,"throw",l)}o(void 0)})}}var Mee=_1,Ree=String,UA=function(t){if(Mee(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Ree(t)},Hee=On,S5=function(){var t=Hee(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},tp=Vr,Vee=An,rp=Vee.RegExp,np=tp(function(){var t=rp("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),$ee=np||tp(function(){return!rp("a","y").sticky}),zee=np||tp(function(){var t=rp("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),k5={BROKEN_CARET:zee,MISSED_STICKY:$ee,UNSUPPORTED_Y:np},T5={},Kee=lb,Gee=b1,jee=Object.keys||function(e){return Kee(e,Gee)},Wee=kA,Xee=jx,qee=NA,Yee=On,Jee=uc,Zee=jee;T5.f=Wee&&!Xee?Object.defineProperties:function(e,r){Yee(e);for(var n=Jee(r),a=Zee(r),A=a.length,o=0,s;A>o;)qee.f(e,s=a[o++],n[s]);return e};var ete=On,tte=T5,N5=b1,rte=p1,nte=Sb,ate=uf,Ate=g1,L5=">",U5="<",ap="prototype",Ap="script",I5=Ate("IE_PROTO"),ip=function(){},D5=function(t){return U5+Ap+L5+t+U5+"/"+Ap+L5},Q5=function(t){t.write(D5("")),t.close();var e=t.parentWindow.Object;return t=null,e},ite=function(){var t=ate("iframe"),e="java"+Ap+":",r;return t.style.display="none",nte.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(D5("document.F=Object")),r.close(),r.F},If,Df=function(){try{If=new ActiveXObject("htmlfile")}catch{}Df=typeof document<"u"?document.domain&&If?Q5(If):ite():Q5(If);for(var t=N5.length;t--;)delete Df[ap][N5[t]];return Df()};rte[I5]=!0;var op=Object.create||function(e,r){var n;return e!==null?(ip[ap]=ete(e),n=new ip,ip[ap]=null,n[I5]=e):n=Df(),r===void 0?n:tte.f(n,r)},ote=Vr,ste=An,lte=ste.RegExp,cte=ote(function(){var t=lte(".","s");return!(t.dotAll&&t.exec(`
388
+ </svg>`,document.getElementById(`vue-ui-screenshot-button-${a.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),re.classList.add("loading"),re.setAttribute("disabled","true")}function se(){if(!s.value)return;Y();const re=s.value.getBoundingClientRect();N.value=setTimeout(()=>{Ud(document.body,{allowTaint:!0,width:re.width,height:re.height,x:re.left+window.scrollX,y:re.top+window.scrollY,useCORS:!0,scale:o.value.quality}).then(le=>{const fe=le.toDataURL("image/png",1),Ue=fe.split(",")[1],_=atob(Ue).length/1024;if(o.value.mode==="download"){const B=document.createElement("a");B.download="screenshot.png",B.href=fe,B.click()}o.value.mode==="post"&&r("postImage",{createdAt:Date.now(),fileSize:`${_.toFixed(2)} KB`,image:fe,x:re.left+window.scrollX,y:re.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:G()})}).finally(z)},10)}function he(re){const le=o.value.style.handles.size/2+4,fe=document.createElement("DIV");fe.style.top=`${-le}px`,fe.style.left=`${-le}px`,fe.style.cursor="nw-resize",fe.classList.add("vue-ui-screenshot-handle-nw");const Ue=document.createElement("DIV");Ue.style.top=`${-le}px`,Ue.style.left="auto",Ue.style.right=`${-le}px`,Ue.style.cursor="ne-resize",Ue.classList.add("vue-ui-screenshot-handle-ne");const b=document.createElement("DIV");b.style.top="auto",b.style.bottom=`${-le}px`,b.style.left=`${-le}px`,b.style.cursor="sw-resize",b.classList.add("vue-ui-screenshot-handle-sw");const _=document.createElement("DIV");_.style.top="auto",_.style.left="auto",_.style.right=`${-le}px`,_.style.bottom=`${-le}px`,_.style.cursor="se-resize",_.classList.add("vue-ui-screenshot-handle-se");const B=document.createElement("BUTTON");B.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /><path d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /></svg><span>${o.value.translations.captureButton}</span>`,B.classList.add("vue-ui-screenshot-capture-button"),B.id=`vue-ui-screenshot-button-${a.value}`,B.style.position="absolute",B.style.top="50%",B.style.left="50%",B.style.transform="translate(-50%,-50%)",B.style.background=o.value.style.captureButton.background,B.style.color=o.value.style.captureButton.color,B.style.border=o.value.style.captureButton.border,B.style.outline="none",B.style.cursor="pointer",B.style.padding=o.value.style.captureButton.padding,B.style.fontFamily=o.value.style.captureButton.fontFamily,B.style.fontSize=`${o.value.style.captureButton.fontSize}px`,B.style.minHeight=`${o.value.style.captureButton.minHeight}px`,B.style.width="fit-content",B.style.display="flex",B.style.alignItems="center",B.style.justifyContent="center",B.style.gap="3px",B.style.borderRadius=`${o.value.style.captureButton.borderRadius}px`,B.style.boxShadow=o.value.style.captureButton.boxShadow,B.style.userSelect="none",B.style.opacity="0.95",B.style.textAlign="left",B.style.fontWeight=o.value.style.captureButton.bold?"bold":"normal",B.addEventListener("mouseenter",()=>{B.style.opacity="1"}),B.addEventListener("mouseleave",()=>{B.style.opacity="0.95"}),B.addEventListener("click",se),re.appendChild(B),[fe,Ue,b,_].forEach((x,S)=>{x.classList.add(`handle-${S}`),x.dataset.html2canvasIgnore="true",x.style.position="absolute",x.style.height=`${o.value.style.handles.size}px`,x.style.width=`${o.value.style.handles.size}px`,x.style.background=o.value.style.handles.background,x.style.border=o.value.style.handles.border,x.style.borderRadius=`${o.value.style.handles.borderRadius}px`,x.style.pointerEvents="auto !important",x.addEventListener("mousedown",I),x.addEventListener("touchstart",I),re.appendChild(x)})}function ge(){s.value||i.nextTick(()=>{const re=Q();re.dataset.html2canvasIgnore=!0,R(re),he(re),s.value=re,re.addEventListener("touchmove",function(le){le.preventDefault()},{passive:!1}),document.body.appendChild(re),document.addEventListener("mousedown",O),document.addEventListener("touchstart",O),document.addEventListener("mouseup",L),document.addEventListener("touchend",L)})}return e({shoot:ge,close:z}),(re,le)=>(i.openBlock(),i.createElementBlock("div"))}},Noe="",dG={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},gG=["src","height","width"],pG=["height","width"],mG=["id"],yG=["stop-color"],vG=["stop-color"],wG=["points","fill","stroke","stroke-width"],BG=["src","alt","height","width","id"],xG=["viewBox","height","id"],bG=["id"],CG=["stop-color"],EG=["stop-color"],_G=["points","fill","stroke"],FG=["height"],SG=["onClick","onMouseenter","onKeyup"],kG=["onMouseenter"],TG=Da({__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(t,{expose:e,emit:r}){const n=t,a=i.ref(`vue-ui-rating-${Math.random()}`),A=i.ref(wa.vue_ui_rating);i.ref(!1),i.ref(null),i.ref(null),i.ref(null),i.ref({x:0,y:0});const o=i.ref(!1);i.ref("");const s=i.ref(void 0),l=i.ref([]),c=i.computed(()=>{if(!Object.keys(n.config||{}).length)return A.value;const z=aa({defaultConfig:A.value,userConfig:n.config});return Aa(z)}),u=i.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)?g(n.dataset.rating):n.dataset.rating),p=i.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)),h=i.ref(u.value),d=i.ref(c.value.type==="image"),w=i.ref(c.value.readonly);function g(z){let R=0,I=0;for(const O in z){const q=parseInt(O),T=z[O];R+=q*T,I+=T}if(I===0)return 0;const U=R/I;return Math.min(c.value.to,Math.max(c.value.from,U))}i.onMounted(()=>{for(let z=c.value.from;z<=c.value.to;z+=1)l.value.push(z)});function y(z,R=!1){return z>s.value||w.value?R?c.value.style.image.inactiveOpacity:c.value.style.star.inactiveColor:R?1:c.value.style.star.useGradient?`url(#star_gradient_under_${a.value})`:c.value.style.star.activeColor}function m(z,R=!1){const I=h.value-z,U=R?1:100;switch(!0){case I<0:return 0;case I>1:return 1*U;default:return I*U}}function F(z){w.value||(h.value=z,r("rate",z))}function N(){return h.value}function Q(z=!0){w.value=z}return e({getData:N,toggleReadonly:Q}),(z,R)=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(`background:${c.value.style.backgroundColor};font-family:${c.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:R[2]||(R[2]=I=>o.value=!0),onMouseleave:R[3]||(R[3]=I=>{o.value=!1,s.value=void 0})},[c.value.style.title.text?(i.openBlock(),i.createElementBlock("div",dG,[i.createElementVNode("div",{style:i.normalizeStyle(`color:${c.value.style.title.color};font-weight:${c.value.style.title.bold?"bold":"normal"};text-align:${c.value.style.title.textAlign};margin-bottom:${c.value.style.title.offsetY}px;font-size:${c.value.style.title.fontSize}px`)},i.toDisplayString(c.value.style.title.text),5),c.value.style.title.subtitle.text?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`color:${c.value.style.title.subtitle.color};font-size:${c.value.style.title.subtitle.fontSize}px;text-align:${c.value.style.title.textAlign};margin-bottom:${c.value.style.title.subtitle.offsetY}px;font-weight:${c.value.style.title.subtitle.bold?"bold":"normal"}`)},i.toDisplayString(c.value.style.title.subtitle.text),5)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),c.value.style.rating.show&&c.value.style.rating.position==="top"?(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(`width:100%;text-align:center;margin-bottom:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};margin-left:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:i.normalizeStyle(`height:${c.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[c.value.style.rating.show&&c.value.style.rating.position==="left"?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};padding-right:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,(I,U)=>(i.openBlock(),i.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:i.normalizeStyle(`position:relative;height:${c.value.style.itemSize}px;width:${c.value.style.itemSize}px`)},[d.value?(i.openBlock(),i.createElementBlock("img",{key:0,src:c.value.style.image.src,height:c.value.style.itemSize,width:c.value.style.itemSize,class:"vue-ui-rating-unit",style:i.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?c.value.style.image.inactiveOpacity:y(I,!0)}`)},null,12,gG)):(i.openBlock(),i.createElementBlock("svg",{key:1,viewBox:"0 0 100 100",height:c.value.style.itemSize,width:c.value.style.itemSize,class:"vue-ui-rating-unit"},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(c.value.style.star.activeColor,.05)}`},null,8,yG),i.createElementVNode("stop",{offset:"100%","stop-color":c.value.style.star.activeColor},null,8,vG)],8,mG)]),i.createElementVNode("polygon",{points:i.unref(Xh)({plot:{x:50,y:50},radius:30,apexes:c.value.style.star.apexes}),fill:isNaN(s.value)?c.value.style.star.inactiveColor:y(I),stroke:c.value.style.star.borderColor?c.value.style.star.borderColor:s.value?y(I):c.value.style.star.inactiveColor,"stroke-width":c.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,wG)],8,pG)),d.value?(i.openBlock(),i.createElementBlock("img",{key:2,src:c.value.style.image.src,alt:`${c.value.style.image.alt} ${I}`,height:c.value.style.itemSize,width:c.value.style.itemSize,id:`active_${a.value}_${I}`,class:"vue-ui-rating-unit",style:i.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(U,!0)*c.value.style.itemSize}px,${c.value.style.itemSize}px,0px`)},null,12,BG)):(i.openBlock(),i.createElementBlock("svg",{key:3,viewBox:`0 0 ${m(U)} 100`,height:c.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${a.value}_${I}`,style:{position:"absolute",top:"0",left:"0"}},[i.createElementVNode("defs",null,[i.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${a.value}`},[i.createElementVNode("stop",{offset:"0%","stop-color":`${i.unref(ZA)(c.value.style.star.activeColor,.05)}`},null,8,CG),i.createElementVNode("stop",{offset:"100%","stop-color":c.value.style.star.activeColor},null,8,EG)],8,bG)]),i.createElementVNode("polygon",{points:i.unref(Xh)({plot:{x:50,y:50},radius:30,apexes:c.value.style.star.apexes}),fill:c.value.style.star.useGradient?`url(#star_gradient_over_${a.value})`:c.value.style.star.activeColor,stroke:c.value.style.star.activeColor},null,8,_G)],8,xG)),(i.openBlock(),i.createElementBlock("svg",{viewBox:"0 0 100 100",height:c.value.style.itemSize,class:"vue-ui-rating-unit",style:i.normalizeStyle(`position:absolute;top:0;left:0;${w.value?"":"cursor:pointer"}`)},[w.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:O=>F(I),onMouseenter:O=>s.value=I,onMouseleave:R[0]||(R[0]=O=>s.value=void 0),tabindex:"0",onKeyup:i.withKeys(O=>F(I),["enter"])},null,40,SG)),w.value?(i.openBlock(),i.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:O=>s.value=I,onMouseleave:R[1]||(R[1]=O=>s.value=void 0)},null,40,kG)):i.createCommentVNode("",!0)],12,FG)),c.value.style.tooltip.show&&p.value&&w.value?(i.openBlock(),i.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:i.normalizeStyle(`border:1px solid ${c.value.style.tooltip.borderColor};position:absolute;top:${-48+c.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${c.value.style.tooltip.backgroundColor};display:${s.value===I?"block":"none"};padding:2px 12px;border-radius:${c.value.style.tooltip.borderRadius}px;box-shadow:${c.value.style.tooltip.boxShadow}`)},[i.createElementVNode("div",{style:i.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${c.value.style.tooltip.color}`)},[i.createElementVNode("span",{style:i.normalizeStyle(`font-size:${c.value.style.tooltip.fontSize}px`)},i.toDisplayString(I),5),i.createTextVNode(" : "),i.createElementVNode("span",{style:i.normalizeStyle(`font-weight:${c.value.style.tooltip.bold?"bold":"normal"};font-size:${c.value.style.tooltip.fontSize}px`)},i.toDisplayString(n.dataset.rating[I]),5),i.createElementVNode("div",{style:i.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${c.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):i.createCommentVNode("",!0)],4))),256)),c.value.style.rating.show&&c.value.style.rating.position==="right"?(i.openBlock(),i.createElementBlock("div",{key:1,style:i.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};padding-left:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0)],4),c.value.style.rating.show&&c.value.style.rating.position==="bottom"?(i.openBlock(),i.createElementBlock("div",{key:2,style:i.normalizeStyle(`width:100%;text-align:center;margin-top:${c.value.style.rating.offsetY}px;font-size:${c.value.style.rating.fontSize}px;font-weight:${c.value.style.rating.bold?"bold":"normal"};margin-left:${c.value.style.rating.offsetX}px`)},i.toDisplayString(isNaN(h.value)?"":h.value.toFixed(c.value.style.rating.roundingValue)),5)):i.createCommentVNode("",!0)],36))}},[["__scopeId","data-v-163406e4"]]),Uoe="",NG=["id"],LG={key:0},UG=["stroke","stroke-width"],IG=["stroke","stroke-width"],DG=["stroke","stroke-width"],QG={key:1},OG=["r","fill"],PG=["r","fill"],MG={key:0},RG=["stroke","stroke-width"],HG=["stroke","stroke-width"],VG=["fill","rx","x","y","width","height"],$G=["stroke-width","stroke"],zG=["stroke-width","stroke"],KG=["stroke-width","stroke"],GG=["stroke"],jG=["stroke"],WG=["stroke"],XG=["stroke"],qG=["fill"],YG=["stroke"],JG=["stroke","stroke-width"],ZG=["stroke","stroke-width"],ej=["fill","r"],tj=["fill","r"],rj=["fill","r"],nj=["fill","r"],aj=["fill","r"],Aj=["fill","r"],ij=["fill","r"],oj=["fill","r"],sj=["fill","r"],lj=["d","stroke","stroke-width"],cj=["d","stroke","stroke-width"],uj=["d","stroke","stroke-width"],hj=["d","stroke","stroke-width"],fj=["stroke","stroke-width"],dj=["stroke","stroke-width"],gj=["stroke","stroke-width"],pj=["fill"],mj=["fill"],yj=["x","y","fill"],vj=["x","y","fill"],wj=["x","y","fill"],Bj=["fill"],xj=["fill"],bj=["y1","y2","stroke","stroke-width"],Cj=["x1","x2","stroke","stroke-width"],Ej=["points","fill","stroke","stroke-width"],_j={key:0},Fj=["stroke","stroke-width"],Sj=["y","width","fill","rx"],kj=Da({__name:"vue-ui-skeleton",props:{config:{type:Object,default(){return{}}}},setup(t){const e=t,r=i.ref(`vue-ui-skeleton-${Math.random()}`),n=i.ref(wa.vue_ui_skeleton),a=i.computed(()=>{if(!Object.keys(e.config||{}).length)return n.value;const h=aa({defaultConfig:n.value,userConfig:e.config});return Aa(h)}),A=i.computed(()=>a.value.style.animated),o=i.computed(()=>a.value.type),s=i.ref([60,50,55,36,40,25,26,12]),l=i.computed(()=>eA({plot:{x:50,y:50},radius:40,sides:6}).path),c=i.computed(()=>eA({plot:{x:50,y:50},radius:30,sides:6}).path),u=i.computed(()=>eA({plot:{x:50,y:50},radius:20,sides:6}).path),p=i.computed(()=>eA({plot:{x:50,y:50},radius:10,sides:6}).path);return(h,d)=>(i.openBlock(),i.createElementBlock("div",{id:r.value,class:i.normalizeClass({"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":A.value}),style:i.normalizeStyle(`background:${a.value.style.backgroundColor};color:${a.value.style.color};width:100%;height:100%;max-height:${a.value.style.maxHeight}px;display:flex;align-items:center;justify-content:center;`)},[o.value==="line"?(i.openBlock(),i.createElementBlock("svg",{key:0,width:"100%",viewBox:"0 0 100 70",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[a.value.style.line.axis.show?(i.openBlock(),i.createElementBlock("g",LG,[i.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:a.value.style.line.axis.color,"stroke-width":a.value.style.line.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,UG),i.createElementVNode("line",{x1:"3",x2:"97",y1:"67",y2:"67",stroke:a.value.style.line.axis.color,"stroke-width":a.value.style.line.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,IG)])):i.createCommentVNode("",!0),i.createElementVNode("path",{d:"M 9,60 22,50 35,55 48,36 61,40 74,25 87,26 90,12",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",stroke:a.value.style.line.path.color,"stroke-width":a.value.style.line.path.strokeWidth},null,8,DG),a.value.style.line.path.showPlots?(i.openBlock(),i.createElementBlock("g",QG,[i.createElementVNode("circle",{cx:"9",cy:"60",r:a.value.style.line.path.strokeWidth,fill:a.value.style.line.path.color},null,8,OG),i.createElementVNode("circle",{cx:"90",cy:"12",r:a.value.style.line.path.strokeWidth,fill:a.value.style.line.path.color},null,8,PG)])):i.createCommentVNode("",!0)],4)):i.createCommentVNode("",!0),o.value==="bar"?(i.openBlock(),i.createElementBlock("svg",{key:1,width:"100%",viewBox:"0 0 100 70",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[a.value.style.bar.axis.show?(i.openBlock(),i.createElementBlock("g",MG,[i.createElementVNode("line",{x1:"3",x2:"3",y1:"3",y2:"67",stroke:a.value.style.bar.axis.color,"stroke-width":a.value.style.bar.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,RG),i.createElementVNode("line",{x1:"3",x2:"97",y1:"67",y2:"67",stroke:a.value.style.bar.axis.color,"stroke-width":a.value.style.bar.axis.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,HG)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(w,g)=>(i.openBlock(),i.createElementBlock("rect",{fill:a.value.style.bar.color,rx:a.value.style.bar.borderRadius,x:6+11.2*g,y:w,width:a.value.style.bar.barWidth,height:67-w},null,8,VG))),256))],4)):i.createCommentVNode("",!0),o.value==="donut"?(i.openBlock(),i.createElementBlock("svg",{key:2,width:"100%",viewBox:"0 0 400 400",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:" M 300 200 A 100 100 0 0 1 113 250",fill:"none","stroke-width":a.value.style.donut.strokeWidth,stroke:a.value.style.donut.color},null,8,$G),i.createElementVNode("path",{d:" M 113 250 A 100 100 0 0 1 250 113",fill:"none","stroke-width":a.value.style.donut.strokeWidth,stroke:`${a.value.style.donut.color}${i.unref(Et)[60]}`},null,8,zG),i.createElementVNode("path",{d:" M 250 113 A 100 100 0 0 1 300 200",fill:"none","stroke-width":a.value.style.donut.strokeWidth,stroke:`${a.value.style.donut.color}${i.unref(Et)[30]}`},null,8,KG)],4)):i.createCommentVNode("",!0),o.value==="onion"?(i.openBlock(),i.createElementBlock("svg",{key:3,width:"100%",viewBox:"0 0 400 400",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:" M 200 60 A 140 140 0 1 1 60 200",stroke:a.value.style.onion.color,"stroke-linecap":"round","stroke-width":"20",fill:"none"},null,8,GG),i.createElementVNode("path",{d:" M 200 100 A 100 100 0 1 1 100 200",stroke:`${a.value.style.onion.color}${i.unref(Et)[60]}`,"stroke-linecap":"round","stroke-width":"20",fill:"none"},null,8,jG),i.createElementVNode("path",{d:" M 200 140 A 60 60 0 1 1 140 200",fill:"none",stroke:`${a.value.style.onion.color}${i.unref(Et)[40]}`,"stroke-linecap":"round","stroke-width":"20"},null,8,WG)],4)):i.createCommentVNode("",!0),o.value==="gauge"?(i.openBlock(),i.createElementBlock("svg",{key:4,width:"100%",viewBox:"0 0 400 400",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:" M 82 255 A 120 120 0 1 1 318 255",fill:"none",stroke:a.value.style.gauge.color,"stroke-linecap":"round","stroke-width":"20"},null,8,XG),i.createElementVNode("circle",{cx:"200",cy:"256",r:"12",fill:a.value.style.gauge.color},null,8,qG),i.createElementVNode("line",{x1:"200",y1:"256",x2:"250",y2:"160","stroke-width":"8",stroke:a.value.style.gauge.color,"stroke-linecap":"round"},null,8,YG)],4)):i.createCommentVNode("",!0),o.value==="quadrant"?(i.openBlock(),i.createElementBlock("svg",{key:5,viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("line",{x1:"50",x2:"50",y1:"3",y2:"97",stroke:a.value.style.quadrant.grid.color,"stroke-width":a.value.style.quadrant.grid.strokeWidth},null,8,JG),i.createElementVNode("line",{x1:"3",x2:"97",y1:"50",y2:"50",stroke:a.value.style.quadrant.grid.color,"stroke-width":a.value.style.quadrant.grid.strokeWidth},null,8,ZG),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"20",cy:"20"},null,8,ej),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"80",cy:"60"},null,8,tj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"65",cy:"55"},null,8,rj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"36",cy:"67"},null,8,nj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"15",cy:"75"},null,8,aj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"40",cy:"55"},null,8,Aj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"76",cy:"32"},null,8,ij),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"85",cy:"26"},null,8,oj),i.createElementVNode("circle",{fill:a.value.style.quadrant.plots.color,r:a.value.style.quadrant.plots.radius,cx:"55",cy:"46"},null,8,sj)],4)):i.createCommentVNode("",!0),o.value==="radar"?(i.openBlock(),i.createElementBlock("svg",{key:6,viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("path",{d:l.value,fill:"none",stroke:a.value.style.radar.grid.color,"stroke-width":a.value.style.radar.grid.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,lj),i.createElementVNode("path",{d:c.value,fill:"none",stroke:`${a.value.style.radar.grid.color}${i.unref(Et)[70]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,cj),i.createElementVNode("path",{d:u.value,fill:"none",stroke:`${a.value.style.radar.grid.color}${i.unref(Et)[70]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,uj),i.createElementVNode("path",{d:p.value,fill:"none",stroke:`${a.value.style.radar.grid.color}${i.unref(Et)[70]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,hj),i.createElementVNode("path",{d:"M 9,50 91,50",stroke:`${a.value.style.radar.grid.color}${i.unref(Et)[50]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2},null,8,fj),i.createElementVNode("path",{d:"M 29.5,14.5 70.5 85.5",stroke:`${a.value.style.radar.grid.color}${i.unref(Et)[50]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2},null,8,dj),i.createElementVNode("path",{d:"M 29.5,85.5 70.5 14.5",stroke:`${a.value.style.radar.grid.color}${i.unref(Et)[50]}`,"stroke-width":a.value.style.radar.grid.strokeWidth/2},null,8,gj),i.createElementVNode("path",{d:"M 34,23 68.5,18, 70,50 61.5,70 35,75.5 10,50 Z",stroke:"none","stroke-linejoin":"round",fill:`${a.value.style.radar.shapes.color}${i.unref(Et)[30]}`},null,8,pj),i.createElementVNode("path",{d:"M 43.5,40 64.5,25, 84,50 55.5,60 29.5,85.5 25,50 Z",stroke:"none","stroke-linejoin":"round",fill:`${a.value.style.radar.shapes.color}${i.unref(Et)[50]}`},null,8,mj)],4)):i.createCommentVNode("",!0),o.value==="waffle"?(i.openBlock(),i.createElementBlock("svg",{key:7,viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(w,g)=>i.createElementVNode("g",null,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(y,m)=>i.createElementVNode("g",null,[i.createElementVNode("rect",{x:3+m*9.6,y:3+g*9.6,height:9,width:9,fill:`${a.value.style.waffle.color}${i.unref(Et)[20]}`,rx:"1"},null,8,yj)])),64))])),64)),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(w,g)=>i.createElementVNode("g",null,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(y,m)=>i.createElementVNode("g",null,[g>2?(i.openBlock(),i.createElementBlock("rect",{key:0,x:3+m*9.6,y:3+g*9.6,height:9,width:9,fill:`${a.value.style.waffle.color}${i.unref(Et)[30]}`,rx:"1"},null,8,vj)):i.createCommentVNode("",!0)])),64))])),64)),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(w,g)=>i.createElementVNode("g",null,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(10,(y,m)=>i.createElementVNode("g",null,[g>6?(i.openBlock(),i.createElementBlock("rect",{key:0,x:3+m*9.6,y:3+g*9.6,height:9,width:9,fill:`${a.value.style.waffle.color}${i.unref(Et)[50]}`,rx:"1"},null,8,wj)):i.createCommentVNode("",!0)])),64))])),64))],4)):i.createCommentVNode("",!0),o.value==="table"?(i.openBlock(),i.createElementBlock("svg",{key:8,width:"100%",viewBox:"0 0 100 70",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[i.createElementVNode("rect",{fill:`${a.value.style.table.th.color}${i.unref(Et)[50]}`,x:3.5,y:3,height:"10",width:"93.5"},null,8,Bj),i.createElementVNode("rect",{fill:`${a.value.style.table.th.color}${i.unref(Et)[50]}`,x:3.5,y:13,height:"50",width:"23.25"},null,8,xj),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(7,(w,g)=>i.createElementVNode("line",{x1:"4",x2:"96",y1:3+g*10,y2:3+g*10,stroke:a.value.style.table.td.color,"stroke-width":a.value.style.table.td.strokeWidth,"stroke-linecap":"round"},null,8,bj)),64)),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(5,(w,g)=>i.createElementVNode("line",{x1:3.5+g*23.25,x2:3.5+g*23.25,y1:"3",y2:"63",stroke:a.value.style.table.td.color,"stroke-width":a.value.style.table.td.strokeWidth,"stroke-linecap":"round"},null,8,Cj)),64))],4)):i.createCommentVNode("",!0),o.value==="rating"?(i.openBlock(),i.createElementBlock("svg",{key:9,width:"100%",viewBox:"0 0 100 30",style:i.normalizeStyle(`background:${a.value.style.backgroundColor};max-width:${a.value.style.rating.maxWidth}px`)},[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(5,(w,g)=>i.createElementVNode("polygon",{points:i.unref(Xh)({plot:{x:10+g*20,y:15},radius:6}),fill:a.value.style.rating.filled?a.value.style.rating.color:"none",stroke:a.value.style.rating.color,"stroke-width":a.value.style.rating.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ej)),64))],4)):i.createCommentVNode("",!0),o.value==="verticalBar"?(i.openBlock(),i.createElementBlock("svg",{key:10,width:"100%",viewBox:"0 0 100 100",style:i.normalizeStyle(`background:${a.value.style.backgroundColor}`)},[a.value.style.verticalBar.axis.show?(i.openBlock(),i.createElementBlock("g",_j,[i.createElementVNode("line",{x1:3,x2:3,y1:3,y2:97,stroke:a.value.style.verticalBar.axis.color,"stroke-width":a.value.style.verticalBar.axis.strokeWidth},null,8,Fj)])):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(6,(w,g)=>i.createElementVNode("rect",{x:3,y:5+g*15.6,height:"12",width:94-94*g/6,fill:a.value.style.verticalBar.color,rx:a.value.style.verticalBar.borderRadius},null,8,Sj)),64))],4)):i.createCommentVNode("",!0)],14,NG))}},[["__scopeId","data-v-f5831007"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Ri(t){"@babel/helpers - typeof";return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ri(t)}function Og(t,e){return Og=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Og(t,e)}function Tj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qh(t,e,r){return Tj()?qh=Reflect.construct:qh=function(a,A,o){var s=[null];s.push.apply(s,A);var l=Function.bind.apply(a,s),c=new l;return o&&Og(c,o.prototype),c},qh.apply(null,arguments)}function rA(t){return Nj(t)||Lj(t)||Uj(t)||Ij()}function Nj(t){if(Array.isArray(t))return Pg(t)}function Lj(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Uj(t,e){if(t){if(typeof t=="string")return Pg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pg(t,e)}}function Pg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ij(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
389
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Dj=Object.hasOwnProperty,ox=Object.setPrototypeOf,Qj=Object.isFrozen,Oj=Object.getPrototypeOf,Pj=Object.getOwnPropertyDescriptor,Wn=Object.freeze,nA=Object.seal,Mj=Object.create,sx=typeof Reflect<"u"&&Reflect,Yh=sx.apply,Mg=sx.construct;Yh||(Yh=function(e,r,n){return e.apply(r,n)}),Wn||(Wn=function(e){return e}),nA||(nA=function(e){return e}),Mg||(Mg=function(e,r){return qh(e,rA(r))});var Rj=Qa(Array.prototype.forEach),lx=Qa(Array.prototype.pop),lc=Qa(Array.prototype.push),Jh=Qa(String.prototype.toLowerCase),Rg=Qa(String.prototype.toString),Hj=Qa(String.prototype.match),aA=Qa(String.prototype.replace),Vj=Qa(String.prototype.indexOf),$j=Qa(String.prototype.trim),Xn=Qa(RegExp.prototype.test),Hg=zj(TypeError);function Qa(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return Yh(t,e,n)}}function zj(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Mg(t,r)}}function Pt(t,e,r){var n;r=(n=r)!==null&&n!==void 0?n:Jh,ox&&ox(t,null);for(var a=e.length;a--;){var A=e[a];if(typeof A=="string"){var o=r(A);o!==A&&(Qj(e)||(e[a]=o),A=o)}t[A]=!0}return t}function So(t){var e=Mj(null),r;for(r in t)Yh(Dj,t,[r])===!0&&(e[r]=t[r]);return e}function Zh(t,e){for(;t!==null;){var r=Pj(t,e);if(r){if(r.get)return Qa(r.get);if(typeof r.value=="function")return Qa(r.value)}t=Oj(t)}function n(a){return console.warn("fallback value for",a),null}return n}var cx=Wn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vg=Wn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$g=Wn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kj=Wn(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),zg=Wn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Gj=Wn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ux=Wn(["#text"]),hx=Wn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kg=Wn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fx=Wn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ef=Wn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jj=nA(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wj=nA(/<%[\w\W]*|[\w\W]*%>/gm),Xj=nA(/\${[\w\W]*}/gm),qj=nA(/^data-[\-\w.\u00B7-\uFFFF]/),Yj=nA(/^aria-[\-\w]+$/),Jj=nA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zj=nA(/^(?:\w+script|data):/i),eW=nA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tW=nA(/^html$/i),rW=function(){return typeof window>"u"?null:window},nW=function(e,r){if(Ri(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,a="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(a)&&(n=r.currentScript.getAttribute(a));var A="dompurify"+(n?"#"+n:"");try{return e.createPolicy(A,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+A+" could not be created."),null}};function dx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rW(),e=function(X){return dx(X)};if(e.version="2.4.7",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,n=t.document,a=t.DocumentFragment,A=t.HTMLTemplateElement,o=t.Node,s=t.Element,l=t.NodeFilter,c=t.NamedNodeMap,u=c===void 0?t.NamedNodeMap||t.MozNamedAttrMap:c,p=t.HTMLFormElement,h=t.DOMParser,d=t.trustedTypes,w=s.prototype,g=Zh(w,"cloneNode"),y=Zh(w,"nextSibling"),m=Zh(w,"childNodes"),F=Zh(w,"parentNode");if(typeof A=="function"){var N=n.createElement("template");N.content&&N.content.ownerDocument&&(n=N.content.ownerDocument)}var Q=nW(d,r),z=Q?Q.createHTML(""):"",R=n,I=R.implementation,U=R.createNodeIterator,O=R.createDocumentFragment,q=R.getElementsByTagName,T=r.importNode,L={};try{L=So(n).documentMode?n.documentMode:{}}catch{}var G={};e.isSupported=typeof F=="function"&&I&&I.createHTMLDocument!==void 0&&L!==9;var Y=jj,se=Wj,he=Xj,ge=qj,re=Yj,le=Zj,fe=eW,Ue=Jj,b=null,_=Pt({},[].concat(rA(cx),rA(Vg),rA($g),rA(zg),rA(ux))),B=null,x=Pt({},[].concat(rA(hx),rA(Kg),rA(fx),rA(ef))),S=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),D=null,W=null,ue=!0,Ce=!0,de=!1,ke=!0,ne=!1,Ee=!1,xe=!1,te=!1,Pe=!1,rt=!1,Ve=!1,We=!0,Ye=!1,Je="user-content-",ot=!0,at=!1,ft={},yt=null,kt=Pt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Nt=null,dt=Pt({},["audio","video","img","source","image","track"]),xt=null,tt=Pt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ir="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",fr="http://www.w3.org/1999/xhtml",Qt=fr,Kt=!1,Jr=null,Rt=Pt({},[ir,Lt,fr],Rg),_r,Yt=["application/xhtml+xml","text/html"],on="text/html",_t,Gt=null,bt=n.createElement("form"),$t=function(X){return X instanceof RegExp||X instanceof Function},xa=function(X){Gt&&Gt===X||((!X||Ri(X)!=="object")&&(X={}),X=So(X),_r=Yt.indexOf(X.PARSER_MEDIA_TYPE)===-1?_r=on:_r=X.PARSER_MEDIA_TYPE,_t=_r==="application/xhtml+xml"?Rg:Jh,b="ALLOWED_TAGS"in X?Pt({},X.ALLOWED_TAGS,_t):_,B="ALLOWED_ATTR"in X?Pt({},X.ALLOWED_ATTR,_t):x,Jr="ALLOWED_NAMESPACES"in X?Pt({},X.ALLOWED_NAMESPACES,Rg):Rt,xt="ADD_URI_SAFE_ATTR"in X?Pt(So(tt),X.ADD_URI_SAFE_ATTR,_t):tt,Nt="ADD_DATA_URI_TAGS"in X?Pt(So(dt),X.ADD_DATA_URI_TAGS,_t):dt,yt="FORBID_CONTENTS"in X?Pt({},X.FORBID_CONTENTS,_t):kt,D="FORBID_TAGS"in X?Pt({},X.FORBID_TAGS,_t):{},W="FORBID_ATTR"in X?Pt({},X.FORBID_ATTR,_t):{},ft="USE_PROFILES"in X?X.USE_PROFILES:!1,ue=X.ALLOW_ARIA_ATTR!==!1,Ce=X.ALLOW_DATA_ATTR!==!1,de=X.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=X.SAFE_FOR_TEMPLATES||!1,Ee=X.WHOLE_DOCUMENT||!1,Pe=X.RETURN_DOM||!1,rt=X.RETURN_DOM_FRAGMENT||!1,Ve=X.RETURN_TRUSTED_TYPE||!1,te=X.FORCE_BODY||!1,We=X.SANITIZE_DOM!==!1,Ye=X.SANITIZE_NAMED_PROPS||!1,ot=X.KEEP_CONTENT!==!1,at=X.IN_PLACE||!1,Ue=X.ALLOWED_URI_REGEXP||Ue,Qt=X.NAMESPACE||fr,S=X.CUSTOM_ELEMENT_HANDLING||{},X.CUSTOM_ELEMENT_HANDLING&&$t(X.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(S.tagNameCheck=X.CUSTOM_ELEMENT_HANDLING.tagNameCheck),X.CUSTOM_ELEMENT_HANDLING&&$t(X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(S.attributeNameCheck=X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(S.allowCustomizedBuiltInElements=X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ne&&(Ce=!1),rt&&(Pe=!0),ft&&(b=Pt({},rA(ux)),B=[],ft.html===!0&&(Pt(b,cx),Pt(B,hx)),ft.svg===!0&&(Pt(b,Vg),Pt(B,Kg),Pt(B,ef)),ft.svgFilters===!0&&(Pt(b,$g),Pt(B,Kg),Pt(B,ef)),ft.mathMl===!0&&(Pt(b,zg),Pt(B,fx),Pt(B,ef))),X.ADD_TAGS&&(b===_&&(b=So(b)),Pt(b,X.ADD_TAGS,_t)),X.ADD_ATTR&&(B===x&&(B=So(B)),Pt(B,X.ADD_ATTR,_t)),X.ADD_URI_SAFE_ATTR&&Pt(xt,X.ADD_URI_SAFE_ATTR,_t),X.FORBID_CONTENTS&&(yt===kt&&(yt=So(yt)),Pt(yt,X.FORBID_CONTENTS,_t)),ot&&(b["#text"]=!0),Ee&&Pt(b,["html","head","body"]),b.table&&(Pt(b,["tbody"]),delete D.tbody),Wn&&Wn(X),Gt=X)},Ir=Pt({},["mi","mo","mn","ms","mtext"]),Yn=Pt({},["foreignobject","desc","title","annotation-xml"]),oa=Pt({},["title","style","font","a","script"]),gt=Pt({},Vg);Pt(gt,$g),Pt(gt,Kj);var Fn=Pt({},zg);Pt(Fn,Gj);var Mn=function(X){var we=F(X);(!we||!we.tagName)&&(we={namespaceURI:Qt,tagName:"template"});var Le=Jh(X.tagName),Ke=Jh(we.tagName);return Jr[X.namespaceURI]?X.namespaceURI===Lt?we.namespaceURI===fr?Le==="svg":we.namespaceURI===ir?Le==="svg"&&(Ke==="annotation-xml"||Ir[Ke]):!!gt[Le]:X.namespaceURI===ir?we.namespaceURI===fr?Le==="math":we.namespaceURI===Lt?Le==="math"&&Yn[Ke]:!!Fn[Le]:X.namespaceURI===fr?we.namespaceURI===Lt&&!Yn[Ke]||we.namespaceURI===ir&&!Ir[Ke]?!1:!Fn[Le]&&(oa[Le]||!gt[Le]):!!(_r==="application/xhtml+xml"&&Jr[X.namespaceURI]):!1},mr=function(X){lc(e.removed,{element:X});try{X.parentNode.removeChild(X)}catch{try{X.outerHTML=z}catch{X.remove()}}},xr=function(X,we){try{lc(e.removed,{attribute:we.getAttributeNode(X),from:we})}catch{lc(e.removed,{attribute:null,from:we})}if(we.removeAttribute(X),X==="is"&&!B[X])if(Pe||rt)try{mr(we)}catch{}else try{we.setAttribute(X,"")}catch{}},br=function(X){var we,Le;if(te)X="<remove></remove>"+X;else{var Ke=Hj(X,/^[\r\n\t ]+/);Le=Ke&&Ke[0]}_r==="application/xhtml+xml"&&Qt===fr&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");var ze=Q?Q.createHTML(X):X;if(Qt===fr)try{we=new h().parseFromString(ze,_r)}catch{}if(!we||!we.documentElement){we=I.createDocument(Qt,"template",null);try{we.documentElement.innerHTML=Kt?z:ze}catch{}}var qe=we.body||we.documentElement;return X&&Le&&qe.insertBefore(n.createTextNode(Le),qe.childNodes[0]||null),Qt===fr?q.call(we,Ee?"html":"body")[0]:Ee?we.documentElement:qe},H=function(X){return U.call(X.ownerDocument||X,X,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ie=function(X){return X instanceof p&&(typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||!(X.attributes instanceof u)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function")},Z=function(X){return Ri(o)==="object"?X instanceof o:X&&Ri(X)==="object"&&typeof X.nodeType=="number"&&typeof X.nodeName=="string"},ee=function(X,we,Le){G[X]&&Rj(G[X],function(Ke){Ke.call(e,we,Le,Gt)})},Ae=function(X){var we;if(ee("beforeSanitizeElements",X,null),ie(X)||Xn(/[\u0080-\uFFFF]/,X.nodeName))return mr(X),!0;var Le=_t(X.nodeName);if(ee("uponSanitizeElement",X,{tagName:Le,allowedTags:b}),X.hasChildNodes()&&!Z(X.firstElementChild)&&(!Z(X.content)||!Z(X.content.firstElementChild))&&Xn(/<[/\w]/g,X.innerHTML)&&Xn(/<[/\w]/g,X.textContent)||Le==="select"&&Xn(/<template/i,X.innerHTML))return mr(X),!0;if(!b[Le]||D[Le]){if(!D[Le]&&Se(Le)&&(S.tagNameCheck instanceof RegExp&&Xn(S.tagNameCheck,Le)||S.tagNameCheck instanceof Function&&S.tagNameCheck(Le)))return!1;if(ot&&!yt[Le]){var Ke=F(X)||X.parentNode,ze=m(X)||X.childNodes;if(ze&&Ke)for(var qe=ze.length,ut=qe-1;ut>=0;--ut)Ke.insertBefore(g(ze[ut],!0),y(X))}return mr(X),!0}return X instanceof s&&!Mn(X)||(Le==="noscript"||Le==="noembed"||Le==="noframes")&&Xn(/<\/no(script|embed|frames)/i,X.innerHTML)?(mr(X),!0):(ne&&X.nodeType===3&&(we=X.textContent,we=aA(we,Y," "),we=aA(we,se," "),we=aA(we,he," "),X.textContent!==we&&(lc(e.removed,{element:X.cloneNode()}),X.textContent=we)),ee("afterSanitizeElements",X,null),!1)},oe=function(X,we,Le){if(We&&(we==="id"||we==="name")&&(Le in n||Le in bt))return!1;if(!(Ce&&!W[we]&&Xn(ge,we))){if(!(ue&&Xn(re,we))){if(!B[we]||W[we]){if(!(Se(X)&&(S.tagNameCheck instanceof RegExp&&Xn(S.tagNameCheck,X)||S.tagNameCheck instanceof Function&&S.tagNameCheck(X))&&(S.attributeNameCheck instanceof RegExp&&Xn(S.attributeNameCheck,we)||S.attributeNameCheck instanceof Function&&S.attributeNameCheck(we))||we==="is"&&S.allowCustomizedBuiltInElements&&(S.tagNameCheck instanceof RegExp&&Xn(S.tagNameCheck,Le)||S.tagNameCheck instanceof Function&&S.tagNameCheck(Le))))return!1}else if(!xt[we]){if(!Xn(Ue,aA(Le,fe,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&X!=="script"&&Vj(Le,"data:")===0&&Nt[X])){if(!(de&&!Xn(le,aA(Le,fe,"")))){if(Le)return!1}}}}}}return!0},Se=function(X){return X.indexOf("-")>0},Ie=function(X){var we,Le,Ke,ze;ee("beforeSanitizeAttributes",X,null);var qe=X.attributes;if(qe){var ut={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};for(ze=qe.length;ze--;){we=qe[ze];var zt=we,Ct=zt.name,Er=zt.namespaceURI;if(Le=Ct==="value"?we.value:$j(we.value),Ke=_t(Ct),ut.attrName=Ke,ut.attrValue=Le,ut.keepAttr=!0,ut.forceKeepAttr=void 0,ee("uponSanitizeAttribute",X,ut),Le=ut.attrValue,!ut.forceKeepAttr&&(xr(Ct,X),!!ut.keepAttr)){if(!ke&&Xn(/\/>/i,Le)){xr(Ct,X);continue}ne&&(Le=aA(Le,Y," "),Le=aA(Le,se," "),Le=aA(Le,he," "));var sa=_t(X.nodeName);if(oe(sa,Ke,Le)){if(Ye&&(Ke==="id"||Ke==="name")&&(xr(Ct,X),Le=Je+Le),Q&&Ri(d)==="object"&&typeof d.getAttributeType=="function"&&!Er)switch(d.getAttributeType(sa,Ke)){case"TrustedHTML":{Le=Q.createHTML(Le);break}case"TrustedScriptURL":{Le=Q.createScriptURL(Le);break}}try{Er?X.setAttributeNS(Er,Ct,Le):X.setAttribute(Ct,Le),lx(e.removed)}catch{}}}}ee("afterSanitizeAttributes",X,null)}},Fe=function pe(X){var we,Le=H(X);for(ee("beforeSanitizeShadowDOM",X,null);we=Le.nextNode();)ee("uponSanitizeShadowNode",we,null),!Ae(we)&&(we.content instanceof a&&pe(we.content),Ie(we));ee("afterSanitizeShadowDOM",X,null)};return e.sanitize=function(pe){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we,Le,Ke,ze,qe;if(Kt=!pe,Kt&&(pe="<!-->"),typeof pe!="string"&&!Z(pe))if(typeof pe.toString=="function"){if(pe=pe.toString(),typeof pe!="string")throw Hg("dirty is not a string, aborting")}else throw Hg("toString is not a function");if(!e.isSupported){if(Ri(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof pe=="string")return t.toStaticHTML(pe);if(Z(pe))return t.toStaticHTML(pe.outerHTML)}return pe}if(xe||xa(X),e.removed=[],typeof pe=="string"&&(at=!1),at){if(pe.nodeName){var ut=_t(pe.nodeName);if(!b[ut]||D[ut])throw Hg("root node is forbidden and cannot be sanitized in-place")}}else if(pe instanceof o)we=br("<!---->"),Le=we.ownerDocument.importNode(pe,!0),Le.nodeType===1&&Le.nodeName==="BODY"||Le.nodeName==="HTML"?we=Le:we.appendChild(Le);else{if(!Pe&&!ne&&!Ee&&pe.indexOf("<")===-1)return Q&&Ve?Q.createHTML(pe):pe;if(we=br(pe),!we)return Pe?null:Ve?z:""}we&&te&&mr(we.firstChild);for(var zt=H(at?pe:we);Ke=zt.nextNode();)Ke.nodeType===3&&Ke===ze||Ae(Ke)||(Ke.content instanceof a&&Fe(Ke.content),Ie(Ke),ze=Ke);if(ze=null,at)return pe;if(Pe){if(rt)for(qe=O.call(we.ownerDocument);we.firstChild;)qe.appendChild(we.firstChild);else qe=we;return(B.shadowroot||B.shadowrootmod)&&(qe=T.call(r,qe,!0)),qe}var Ct=Ee?we.outerHTML:we.innerHTML;return Ee&&b["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&Xn(tW,we.ownerDocument.doctype.name)&&(Ct="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
390
+ `+Ct),ne&&(Ct=aA(Ct,Y," "),Ct=aA(Ct,se," "),Ct=aA(Ct,he," ")),Q&&Ve?Q.createHTML(Ct):Ct},e.setConfig=function(pe){xa(pe),xe=!0},e.clearConfig=function(){Gt=null,xe=!1},e.isValidAttribute=function(pe,X,we){Gt||xa({});var Le=_t(pe),Ke=_t(X);return oe(Le,Ke,we)},e.addHook=function(pe,X){typeof X=="function"&&(G[pe]=G[pe]||[],lc(G[pe],X))},e.removeHook=function(pe){if(G[pe])return lx(G[pe])},e.removeHooks=function(pe){G[pe]&&(G[pe]=[])},e.removeAllHooks=function(){G={}},e}var aW=dx();const AW=Object.freeze(Object.defineProperty({__proto__:null,default:aW},Symbol.toStringTag,{value:"Module"}));var cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var tf=function(t){return t&&t.Math==Math&&t},An=tf(typeof globalThis=="object"&&globalThis)||tf(typeof window=="object"&&window)||tf(typeof self=="object"&&self)||tf(typeof cc=="object"&&cc)||function(){return this}()||cc||Function("return this")(),Ls={},Vr=function(t){try{return!!t()}catch{return!0}},iW=Vr,kA=!iW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),oW=Vr,rf=!oW(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),sW=rf,nf=Function.prototype.call,_n=sW?nf.bind(nf):function(){return nf.apply(nf,arguments)},px={},mx={}.propertyIsEnumerable,yx=Object.getOwnPropertyDescriptor,lW=yx&&!mx.call({1:2},1);px.f=lW?function(e){var r=yx(this,e);return!!r&&r.enumerable}:mx;var af=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},vx=rf,wx=Function.prototype,Gg=wx.call,cW=vx&&wx.bind.bind(Gg,Gg),$r=vx?cW:function(t){return function(){return Gg.apply(t,arguments)}},Bx=$r,uW=Bx({}.toString),hW=Bx("".slice),ko=function(t){return hW(uW(t),8,-1)},fW=$r,dW=Vr,gW=ko,jg=Object,pW=fW("".split),xx=dW(function(){return!jg("z").propertyIsEnumerable(0)})?function(t){return gW(t)=="String"?pW(t,""):jg(t)}:jg,To=function(t){return t==null},mW=To,yW=TypeError,TA=function(t){if(mW(t))throw yW("Can't call method on "+t);return t},vW=xx,wW=TA,uc=function(t){return vW(wW(t))},Wg=typeof document=="object"&&document.all,BW=typeof Wg>"u"&&Wg!==void 0,bx={all:Wg,IS_HTMLDDA:BW},Cx=bx,xW=Cx.all,Lr=Cx.IS_HTMLDDA?function(t){return typeof t=="function"||t===xW}:function(t){return typeof t=="function"},Ex=Lr,_x=bx,bW=_x.all,ti=_x.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Ex(t)||t===bW}:function(t){return typeof t=="object"?t!==null:Ex(t)},Xg=An,CW=Lr,EW=function(t){return CW(t)?t:void 0},No=function(t,e){return arguments.length<2?EW(Xg[t]):Xg[t]&&Xg[t][e]},_W=$r,Af=_W({}.isPrototypeOf),of=typeof navigator<"u"&&String(navigator.userAgent)||"",Fx=An,qg=of,Sx=Fx.process,kx=Fx.Deno,Tx=Sx&&Sx.versions||kx&&kx.version,Nx=Tx&&Tx.v8,AA,sf;Nx&&(AA=Nx.split("."),sf=AA[0]>0&&AA[0]<4?1:+(AA[0]+AA[1])),!sf&&qg&&(AA=qg.match(/Edge\/(\d+)/),(!AA||AA[1]>=74)&&(AA=qg.match(/Chrome\/(\d+)/),AA&&(sf=+AA[1])));var Yg=sf,Lx=Yg,FW=Vr,SW=An,kW=SW.String,Ux=!!Object.getOwnPropertySymbols&&!FW(function(){var t=Symbol();return!kW(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Lx&&Lx<41}),TW=Ux,Ix=TW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",NW=No,LW=Lr,UW=Af,IW=Ix,DW=Object,Dx=IW?function(t){return typeof t=="symbol"}:function(t){var e=NW("Symbol");return LW(e)&&UW(e.prototype,DW(t))},QW=String,lf=function(t){try{return QW(t)}catch{return"Object"}},OW=Lr,PW=lf,MW=TypeError,ri=function(t){if(OW(t))return t;throw MW(PW(t)+" is not a function")},RW=ri,HW=To,Us=function(t,e){var r=t[e];return HW(r)?void 0:RW(r)},Jg=_n,Zg=Lr,e1=ti,VW=TypeError,$W=function(t,e){var r,n;if(e==="string"&&Zg(r=t.toString)&&!e1(n=Jg(r,t))||Zg(r=t.valueOf)&&!e1(n=Jg(r,t))||e!=="string"&&Zg(r=t.toString)&&!e1(n=Jg(r,t)))return n;throw VW("Can't convert object to primitive value")},Qx={exports:{}},Ox=An,zW=Object.defineProperty,t1=function(t,e){try{zW(Ox,t,{value:e,configurable:!0,writable:!0})}catch{Ox[t]=e}return e},KW=An,GW=t1,Px="__core-js_shared__",jW=KW[Px]||GW(Px,{}),r1=jW,Mx=r1;(Qx.exports=function(t,e){return Mx[t]||(Mx[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var n1=Qx.exports,WW=TA,XW=Object,cf=function(t){return XW(WW(t))},qW=$r,YW=cf,JW=qW({}.hasOwnProperty),iA=Object.hasOwn||function(e,r){return JW(YW(e),r)},ZW=$r,eX=0,tX=Math.random(),rX=ZW(1 .toString),Rx=function(t){return"Symbol("+(t===void 0?"":t)+")_"+rX(++eX+tX,36)},nX=An,aX=n1,Hx=iA,AX=Rx,iX=Ux,oX=Ix,Is=nX.Symbol,a1=aX("wks"),sX=oX?Is.for||Is:Is&&Is.withoutSetter||AX,dn=function(t){return Hx(a1,t)||(a1[t]=iX&&Hx(Is,t)?Is[t]:sX("Symbol."+t)),a1[t]},lX=_n,Vx=ti,$x=Dx,cX=Us,uX=$W,hX=dn,fX=TypeError,dX=hX("toPrimitive"),gX=function(t,e){if(!Vx(t)||$x(t))return t;var r=cX(t,dX),n;if(r){if(e===void 0&&(e="default"),n=lX(r,t,e),!Vx(n)||$x(n))return n;throw fX("Can't convert object to primitive value")}return e===void 0&&(e="number"),uX(t,e)},pX=gX,mX=Dx,A1=function(t){var e=pX(t,"string");return mX(e)?e:e+""},yX=An,zx=ti,i1=yX.document,vX=zx(i1)&&zx(i1.createElement),uf=function(t){return vX?i1.createElement(t):{}},wX=kA,BX=Vr,xX=uf,Kx=!wX&&!BX(function(){return Object.defineProperty(xX("div"),"a",{get:function(){return 7}}).a!=7}),bX=kA,CX=_n,EX=px,_X=af,FX=uc,SX=A1,kX=iA,TX=Kx,Gx=Object.getOwnPropertyDescriptor;Ls.f=bX?Gx:function(e,r){if(e=FX(e),r=SX(r),TX)try{return Gx(e,r)}catch{}if(kX(e,r))return _X(!CX(EX.f,e,r),e[r])};var NA={},NX=kA,LX=Vr,jx=NX&&LX(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),UX=ti,IX=String,DX=TypeError,On=function(t){if(UX(t))return t;throw DX(IX(t)+" is not an object")},QX=kA,OX=Kx,PX=jx,hf=On,Wx=A1,MX=TypeError,o1=Object.defineProperty,RX=Object.getOwnPropertyDescriptor,s1="enumerable",l1="configurable",c1="writable";NA.f=QX?PX?function(e,r,n){if(hf(e),r=Wx(r),hf(n),typeof e=="function"&&r==="prototype"&&"value"in n&&c1 in n&&!n[c1]){var a=RX(e,r);a&&a[c1]&&(e[r]=n.value,n={configurable:l1 in n?n[l1]:a[l1],enumerable:s1 in n?n[s1]:a[s1],writable:!1})}return o1(e,r,n)}:o1:function(e,r,n){if(hf(e),r=Wx(r),hf(n),OX)try{return o1(e,r,n)}catch{}if("get"in n||"set"in n)throw MX("Accessors not supported");return"value"in n&&(e[r]=n.value),e};var HX=kA,VX=NA,$X=af,hc=HX?function(t,e,r){return VX.f(t,e,$X(1,r))}:function(t,e,r){return t[e]=r,t},Xx={exports:{}},u1=kA,zX=iA,qx=Function.prototype,KX=u1&&Object.getOwnPropertyDescriptor,h1=zX(qx,"name"),GX=h1&&(function(){}).name==="something",jX=h1&&(!u1||u1&&KX(qx,"name").configurable),ff={EXISTS:h1,PROPER:GX,CONFIGURABLE:jX},WX=$r,XX=Lr,f1=r1,qX=WX(Function.toString);XX(f1.inspectSource)||(f1.inspectSource=function(t){return qX(t)});var d1=f1.inspectSource,YX=An,JX=Lr,Yx=YX.WeakMap,ZX=JX(Yx)&&/native code/.test(String(Yx)),eq=n1,tq=Rx,Jx=eq("keys"),g1=function(t){return Jx[t]||(Jx[t]=tq(t))},p1={},rq=ZX,Zx=An,nq=ti,aq=hc,m1=iA,y1=r1,Aq=g1,iq=p1,eb="Object already initialized",v1=Zx.TypeError,oq=Zx.WeakMap,df,fc,gf,sq=function(t){return gf(t)?fc(t):df(t,{})},lq=function(t){return function(e){var r;if(!nq(e)||(r=fc(e)).type!==t)throw v1("Incompatible receiver, "+t+" required");return r}};if(rq||y1.state){var LA=y1.state||(y1.state=new oq);LA.get=LA.get,LA.has=LA.has,LA.set=LA.set,df=function(t,e){if(LA.has(t))throw v1(eb);return e.facade=t,LA.set(t,e),e},fc=function(t){return LA.get(t)||{}},gf=function(t){return LA.has(t)}}else{var Ds=Aq("state");iq[Ds]=!0,df=function(t,e){if(m1(t,Ds))throw v1(eb);return e.facade=t,aq(t,Ds,e),e},fc=function(t){return m1(t,Ds)?t[Ds]:{}},gf=function(t){return m1(t,Ds)}}var pf={set:df,get:fc,has:gf,enforce:sq,getterFor:lq},w1=$r,cq=Vr,uq=Lr,mf=iA,B1=kA,hq=ff.CONFIGURABLE,fq=d1,tb=pf,dq=tb.enforce,gq=tb.get,rb=String,yf=Object.defineProperty,pq=w1("".slice),mq=w1("".replace),yq=w1([].join),vq=B1&&!cq(function(){return yf(function(){},"length",{value:8}).length!==8}),wq=String(String).split("String"),Bq=Xx.exports=function(t,e,r){pq(rb(e),0,7)==="Symbol("&&(e="["+mq(rb(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!mf(t,"name")||hq&&t.name!==e)&&(B1?yf(t,"name",{value:e,configurable:!0}):t.name=e),vq&&r&&mf(r,"arity")&&t.length!==r.arity&&yf(t,"length",{value:r.arity});try{r&&mf(r,"constructor")&&r.constructor?B1&&yf(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=dq(t);return mf(n,"source")||(n.source=yq(wq,typeof e=="string"?e:"")),t};Function.prototype.toString=Bq(function(){return uq(this)&&gq(this).source||fq(this)},"toString");var nb=Xx.exports,xq=Lr,bq=NA,Cq=nb,Eq=t1,Lo=function(t,e,r,n){n||(n={});var a=n.enumerable,A=n.name!==void 0?n.name:e;if(xq(r)&&Cq(r,A,n),n.global)a?t[e]=r:Eq(e,r);else{try{n.unsafe?t[e]&&(a=!0):delete t[e]}catch{}a?t[e]=r:bq.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ab={},_q=Math.ceil,Fq=Math.floor,Sq=Math.trunc||function(e){var r=+e;return(r>0?Fq:_q)(r)},kq=Sq,vf=function(t){var e=+t;return e!==e||e===0?0:kq(e)},Tq=vf,Nq=Math.max,Lq=Math.min,Ab=function(t,e){var r=Tq(t);return r<0?Nq(r+e,0):Lq(r,e)},Uq=vf,Iq=Math.min,Qs=function(t){return t>0?Iq(Uq(t),9007199254740991):0},Dq=Qs,wf=function(t){return Dq(t.length)},Qq=uc,Oq=Ab,Pq=wf,ib=function(t){return function(e,r,n){var a=Qq(e),A=Pq(a),o=Oq(n,A),s;if(t&&r!=r){for(;A>o;)if(s=a[o++],s!=s)return!0}else for(;A>o;o++)if((t||o in a)&&a[o]===r)return t||o||0;return!t&&-1}},ob={includes:ib(!0),indexOf:ib(!1)},Mq=$r,x1=iA,Rq=uc,Hq=ob.indexOf,Vq=p1,sb=Mq([].push),lb=function(t,e){var r=Rq(t),n=0,a=[],A;for(A in r)!x1(Vq,A)&&x1(r,A)&&sb(a,A);for(;e.length>n;)x1(r,A=e[n++])&&(~Hq(a,A)||sb(a,A));return a},b1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$q=lb,zq=b1,Kq=zq.concat("length","prototype");ab.f=Object.getOwnPropertyNames||function(e){return $q(e,Kq)};var cb={};cb.f=Object.getOwnPropertySymbols;var Gq=No,jq=$r,Wq=ab,Xq=cb,qq=On,Yq=jq([].concat),Jq=Gq("Reflect","ownKeys")||function(e){var r=Wq.f(qq(e)),n=Xq.f;return n?Yq(r,n(e)):r},ub=iA,Zq=Jq,eY=Ls,tY=NA,rY=function(t,e,r){for(var n=Zq(e),a=tY.f,A=eY.f,o=0;o<n.length;o++){var s=n[o];!ub(t,s)&&!(r&&ub(r,s))&&a(t,s,A(e,s))}},nY=Vr,aY=Lr,AY=/#|\.prototype\./,dc=function(t,e){var r=oY[iY(t)];return r==lY?!0:r==sY?!1:aY(e)?nY(e):!!e},iY=dc.normalize=function(t){return String(t).replace(AY,".").toLowerCase()},oY=dc.data={},sY=dc.NATIVE="N",lY=dc.POLYFILL="P",hb=dc,C1=An,cY=Ls.f,uY=hc,hY=Lo,fY=t1,dY=rY,gY=hb,qn=function(t,e){var r=t.target,n=t.global,a=t.stat,A,o,s,l,c,u;if(n?o=C1:a?o=C1[r]||fY(r,{}):o=(C1[r]||{}).prototype,o)for(s in e){if(c=e[s],t.dontCallGetSet?(u=cY(o,s),l=u&&u.value):l=o[s],A=gY(n?s:r+(a?".":"#")+s,t.forced),!A&&l!==void 0){if(typeof c==typeof l)continue;dY(c,l)}(t.sham||l&&l.sham)&&uY(c,"sham",!0),hY(o,s,c,t)}},pY=ko,gc=typeof process<"u"&&pY(process)=="process",mY=$r,yY=ri,vY=function(t,e,r){try{return mY(yY(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},wY=Lr,BY=String,xY=TypeError,bY=function(t){if(typeof t=="object"||wY(t))return t;throw xY("Can't set "+BY(t)+" as a prototype")},CY=vY,EY=On,_Y=bY,fb=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=CY(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(a,A){return EY(a),_Y(A),t?r(a,A):a.__proto__=A,a}}():void 0),FY=NA.f,SY=iA,kY=dn,db=kY("toStringTag"),E1=function(t,e,r){t&&!r&&(t=t.prototype),t&&!SY(t,db)&&FY(t,db,{configurable:!0,value:e})},gb=nb,TY=NA,NY=function(t,e,r){return r.get&&gb(r.get,e,{getter:!0}),r.set&&gb(r.set,e,{setter:!0}),TY.f(t,e,r)},LY=No,UY=NY,IY=dn,DY=kA,pb=IY("species"),QY=function(t){var e=LY(t);DY&&e&&!e[pb]&&UY(e,pb,{configurable:!0,get:function(){return this}})},OY=Af,PY=TypeError,MY=function(t,e){if(OY(e,t))return t;throw PY("Incorrect invocation")},RY=dn,HY=RY("toStringTag"),mb={};mb[HY]="z";var VY=String(mb)==="[object z]",$Y=VY,zY=Lr,Bf=ko,KY=dn,GY=KY("toStringTag"),jY=Object,WY=Bf(function(){return arguments}())=="Arguments",XY=function(t,e){try{return t[e]}catch{}},_1=$Y?Bf:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=XY(e=jY(t),GY))=="string"?r:WY?Bf(e):(n=Bf(e))=="Object"&&zY(e.callee)?"Arguments":n},qY=$r,YY=Vr,yb=Lr,JY=_1,ZY=No,eJ=d1,vb=function(){},tJ=[],wb=ZY("Reflect","construct"),F1=/^\s*(?:class|function)\b/,rJ=qY(F1.exec),nJ=!F1.exec(vb),pc=function(e){if(!yb(e))return!1;try{return wb(vb,tJ,e),!0}catch{return!1}},Bb=function(e){if(!yb(e))return!1;switch(JY(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return nJ||!!rJ(F1,eJ(e))}catch{return!0}};Bb.sham=!0;var aJ=!wb||YY(function(){var t;return pc(pc.call)||!pc(Object)||!pc(function(){t=!0})||t})?Bb:pc,AJ=aJ,iJ=lf,oJ=TypeError,sJ=function(t){if(AJ(t))return t;throw oJ(iJ(t)+" is not a constructor")},xb=On,lJ=sJ,cJ=To,uJ=dn,hJ=uJ("species"),bb=function(t,e){var r=xb(t).constructor,n;return r===void 0||cJ(n=xb(r)[hJ])?e:lJ(n)},fJ=rf,Cb=Function.prototype,Eb=Cb.apply,_b=Cb.call,S1=typeof Reflect=="object"&&Reflect.apply||(fJ?_b.bind(Eb):function(){return _b.apply(Eb,arguments)}),dJ=ko,gJ=$r,mc=function(t){if(dJ(t)==="Function")return gJ(t)},Fb=mc,pJ=ri,mJ=rf,yJ=Fb(Fb.bind),k1=function(t,e){return pJ(t),e===void 0?t:mJ?yJ(t,e):function(){return t.apply(e,arguments)}},vJ=No,Sb=vJ("document","documentElement"),wJ=$r,BJ=wJ([].slice),xJ=TypeError,bJ=function(t,e){if(t<e)throw xJ("Not enough arguments");return t},CJ=of,kb=/(?:ipad|iphone|ipod).*applewebkit/i.test(CJ),Ba=An,EJ=S1,_J=k1,Tb=Lr,FJ=iA,Nb=Vr,Lb=Sb,SJ=BJ,Ub=uf,kJ=bJ,TJ=kb,NJ=gc,T1=Ba.setImmediate,N1=Ba.clearImmediate,LJ=Ba.process,L1=Ba.Dispatch,UJ=Ba.Function,Ib=Ba.MessageChannel,IJ=Ba.String,U1=0,yc={},Db="onreadystatechange",vc,Uo,I1,D1;Nb(function(){vc=Ba.location});var Q1=function(t){if(FJ(yc,t)){var e=yc[t];delete yc[t],e()}},O1=function(t){return function(){Q1(t)}},Qb=function(t){Q1(t.data)},Ob=function(t){Ba.postMessage(IJ(t),vc.protocol+"//"+vc.host)};(!T1||!N1)&&(T1=function(e){kJ(arguments.length,1);var r=Tb(e)?e:UJ(e),n=SJ(arguments,1);return yc[++U1]=function(){EJ(r,void 0,n)},Uo(U1),U1},N1=function(e){delete yc[e]},NJ?Uo=function(t){LJ.nextTick(O1(t))}:L1&&L1.now?Uo=function(t){L1.now(O1(t))}:Ib&&!TJ?(I1=new Ib,D1=I1.port2,I1.port1.onmessage=Qb,Uo=_J(D1.postMessage,D1)):Ba.addEventListener&&Tb(Ba.postMessage)&&!Ba.importScripts&&vc&&vc.protocol!=="file:"&&!Nb(Ob)?(Uo=Ob,Ba.addEventListener("message",Qb,!1)):Db in Ub("script")?Uo=function(t){Lb.appendChild(Ub("script"))[Db]=function(){Lb.removeChild(this),Q1(t)}}:Uo=function(t){setTimeout(O1(t),0)});var Pb={set:T1,clear:N1},Mb=function(){this.head=null,this.tail=null};Mb.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Rb=Mb,DJ=of,QJ=/ipad|iphone|ipod/i.test(DJ)&&typeof Pebble<"u",OJ=of,PJ=/web0s(?!.*chrome)/i.test(OJ),Io=An,Hb=k1,MJ=Ls.f,P1=Pb.set,RJ=Rb,HJ=kb,VJ=QJ,$J=PJ,M1=gc,Vb=Io.MutationObserver||Io.WebKitMutationObserver,$b=Io.document,zb=Io.process,xf=Io.Promise,Kb=MJ(Io,"queueMicrotask"),R1=Kb&&Kb.value,Os,H1,V1,bf,Gb;if(!R1){var Cf=new RJ,Ef=function(){var t,e;for(M1&&(t=zb.domain)&&t.exit();e=Cf.get();)try{e()}catch(r){throw Cf.head&&Os(),r}t&&t.enter()};!HJ&&!M1&&!$J&&Vb&&$b?(H1=!0,V1=$b.createTextNode(""),new Vb(Ef).observe(V1,{characterData:!0}),Os=function(){V1.data=H1=!H1}):!VJ&&xf&&xf.resolve?(bf=xf.resolve(void 0),bf.constructor=xf,Gb=Hb(bf.then,bf),Os=function(){Gb(Ef)}):M1?Os=function(){zb.nextTick(Ef)}:(P1=Hb(P1,Io),Os=function(){P1(Ef)}),R1=function(t){Cf.head||Os(),Cf.add(t)}}var zJ=R1,KJ=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}},$1=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},GJ=An,_f=GJ.Promise,jb=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",jJ=jb,WJ=gc,XJ=!jJ&&!WJ&&typeof window=="object"&&typeof document=="object",qJ=An,wc=_f,YJ=Lr,JJ=hb,ZJ=d1,eZ=dn,tZ=XJ,rZ=jb,z1=Yg;wc&&wc.prototype;var nZ=eZ("species"),K1=!1,Wb=YJ(qJ.PromiseRejectionEvent),aZ=JJ("Promise",function(){var t=ZJ(wc),e=t!==String(wc);if(!e&&z1===66)return!0;if(!z1||z1<51||!/native code/.test(t)){var r=new wc(function(A){A(1)}),n=function(A){A(function(){},function(){})},a=r.constructor={};if(a[nZ]=n,K1=r.then(function(){})instanceof n,!K1)return!0}return!e&&(tZ||rZ)&&!Wb}),Bc={CONSTRUCTOR:aZ,REJECTION_EVENT:Wb,SUBCLASSING:K1},Ps={},Xb=ri,AZ=TypeError,iZ=function(t){var e,r;this.promise=new t(function(n,a){if(e!==void 0||r!==void 0)throw AZ("Bad Promise constructor");e=n,r=a}),this.resolve=Xb(e),this.reject=Xb(r)};Ps.f=function(t){return new iZ(t)};var oZ=qn,Ff=gc,Hi=An,Ms=_n,qb=Lo,Yb=fb,sZ=E1,lZ=QY,cZ=ri,Sf=Lr,uZ=ti,hZ=MY,fZ=bb,Jb=Pb.set,G1=zJ,dZ=KJ,gZ=$1,pZ=Rb,Zb=pf,kf=_f,j1=Bc,e5=Ps,Tf="Promise",t5=j1.CONSTRUCTOR,mZ=j1.REJECTION_EVENT,yZ=j1.SUBCLASSING,W1=Zb.getterFor(Tf),vZ=Zb.set,Rs=kf&&kf.prototype,Do=kf,Nf=Rs,r5=Hi.TypeError,X1=Hi.document,q1=Hi.process,Y1=e5.f,wZ=Y1,BZ=!!(X1&&X1.createEvent&&Hi.dispatchEvent),n5="unhandledrejection",xZ="rejectionhandled",a5=0,A5=1,bZ=2,J1=1,i5=2,Lf,o5,CZ,s5,l5=function(t){var e;return uZ(t)&&Sf(e=t.then)?e:!1},c5=function(t,e){var r=e.value,n=e.state==A5,a=n?t.ok:t.fail,A=t.resolve,o=t.reject,s=t.domain,l,c,u;try{a?(n||(e.rejection===i5&&_Z(e),e.rejection=J1),a===!0?l=r:(s&&s.enter(),l=a(r),s&&(s.exit(),u=!0)),l===t.promise?o(r5("Promise-chain cycle")):(c=l5(l))?Ms(c,l,A,o):A(l)):o(r)}catch(p){s&&!u&&s.exit(),o(p)}},u5=function(t,e){t.notified||(t.notified=!0,G1(function(){for(var r=t.reactions,n;n=r.get();)c5(n,t);t.notified=!1,e&&!t.rejection&&EZ(t)}))},h5=function(t,e,r){var n,a;BZ?(n=X1.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),Hi.dispatchEvent(n)):n={promise:e,reason:r},!mZ&&(a=Hi["on"+t])?a(n):t===n5&&dZ("Unhandled promise rejection",r)},EZ=function(t){Ms(Jb,Hi,function(){var e=t.facade,r=t.value,n=f5(t),a;if(n&&(a=gZ(function(){Ff?q1.emit("unhandledRejection",r,e):h5(n5,e,r)}),t.rejection=Ff||f5(t)?i5:J1,a.error))throw a.value})},f5=function(t){return t.rejection!==J1&&!t.parent},_Z=function(t){Ms(Jb,Hi,function(){var e=t.facade;Ff?q1.emit("rejectionHandled",e):h5(xZ,e,t.value)})},Hs=function(t,e,r){return function(n){t(e,n,r)}},Vs=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=bZ,u5(t,!0))},Z1=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw r5("Promise can't be resolved itself");var n=l5(e);n?G1(function(){var a={done:!1};try{Ms(n,e,Hs(Z1,a,t),Hs(Vs,a,t))}catch(A){Vs(a,A,t)}}):(t.value=e,t.state=A5,u5(t,!1))}catch(a){Vs({done:!1},a,t)}}};if(t5&&(Do=function(e){hZ(this,Nf),cZ(e),Ms(Lf,this);var r=W1(this);try{e(Hs(Z1,r),Hs(Vs,r))}catch(n){Vs(r,n)}},Nf=Do.prototype,Lf=function(e){vZ(this,{type:Tf,done:!1,notified:!1,parent:!1,reactions:new pZ,rejection:!1,state:a5,value:void 0})},Lf.prototype=qb(Nf,"then",function(e,r){var n=W1(this),a=Y1(fZ(this,Do));return n.parent=!0,a.ok=Sf(e)?e:!0,a.fail=Sf(r)&&r,a.domain=Ff?q1.domain:void 0,n.state==a5?n.reactions.add(a):G1(function(){c5(a,n)}),a.promise}),o5=function(){var t=new Lf,e=W1(t);this.promise=t,this.resolve=Hs(Z1,e),this.reject=Hs(Vs,e)},e5.f=Y1=function(t){return t===Do||t===CZ?new o5(t):wZ(t)},Sf(kf)&&Rs!==Object.prototype)){s5=Rs.then,yZ||qb(Rs,"then",function(e,r){var n=this;return new Do(function(a,A){Ms(s5,n,a,A)}).then(e,r)},{unsafe:!0});try{delete Rs.constructor}catch{}Yb&&Yb(Rs,Nf)}oZ({global:!0,constructor:!0,wrap:!0,forced:t5},{Promise:Do}),sZ(Do,Tf,!1),lZ(Tf);var xc={},FZ=dn,SZ=xc,kZ=FZ("iterator"),TZ=Array.prototype,NZ=function(t){return t!==void 0&&(SZ.Array===t||TZ[kZ]===t)},LZ=_1,d5=Us,UZ=To,IZ=xc,DZ=dn,QZ=DZ("iterator"),g5=function(t){if(!UZ(t))return d5(t,QZ)||d5(t,"@@iterator")||IZ[LZ(t)]},OZ=_n,PZ=ri,MZ=On,RZ=lf,HZ=g5,VZ=TypeError,$Z=function(t,e){var r=arguments.length<2?HZ(t):e;if(PZ(r))return MZ(OZ(r,t));throw VZ(RZ(t)+" is not iterable")},zZ=_n,p5=On,KZ=Us,GZ=function(t,e,r){var n,a;p5(t);try{if(n=KZ(t,"return"),!n){if(e==="throw")throw r;return r}n=zZ(n,t)}catch(A){a=!0,n=A}if(e==="throw")throw r;if(a)throw n;return p5(n),r},jZ=k1,WZ=_n,XZ=On,qZ=lf,YZ=NZ,JZ=wf,m5=Af,ZZ=$Z,eee=g5,y5=GZ,tee=TypeError,Uf=function(t,e){this.stopped=t,this.result=e},v5=Uf.prototype,w5=function(t,e,r){var n=r&&r.that,a=!!(r&&r.AS_ENTRIES),A=!!(r&&r.IS_RECORD),o=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=jZ(e,n),c,u,p,h,d,w,g,y=function(F){return c&&y5(c,"normal",F),new Uf(!0,F)},m=function(F){return a?(XZ(F),s?l(F[0],F[1],y):l(F[0],F[1])):s?l(F,y):l(F)};if(A)c=t.iterator;else if(o)c=t;else{if(u=eee(t),!u)throw tee(qZ(t)+" is not iterable");if(YZ(u)){for(p=0,h=JZ(t);h>p;p++)if(d=m(t[p]),d&&m5(v5,d))return d;return new Uf(!1)}c=ZZ(t,u)}for(w=A?t.next:c.next;!(g=WZ(w,c)).done;){try{d=m(g.value)}catch(F){y5(c,"throw",F)}if(typeof d=="object"&&d&&m5(v5,d))return d}return new Uf(!1)},ree=dn,B5=ree("iterator"),x5=!1;try{var nee=0,b5={next:function(){return{done:!!nee++}},return:function(){x5=!0}};b5[B5]=function(){return this},Array.from(b5,function(){throw 2})}catch{}var aee=function(t,e){if(!e&&!x5)return!1;var r=!1;try{var n={};n[B5]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},Aee=_f,iee=aee,oee=Bc.CONSTRUCTOR,C5=oee||!iee(function(t){Aee.all(t).then(void 0,function(){})}),see=qn,lee=_n,cee=ri,uee=Ps,hee=$1,fee=w5,dee=C5;see({target:"Promise",stat:!0,forced:dee},{all:function(e){var r=this,n=uee.f(r),a=n.resolve,A=n.reject,o=hee(function(){var s=cee(r.resolve),l=[],c=0,u=1;fee(e,function(p){var h=c++,d=!1;u++,lee(s,r,p).then(function(w){d||(d=!0,l[h]=w,--u||a(l))},A)}),--u||a(l)});return o.error&&A(o.value),n.promise}});var gee=qn,pee=Bc.CONSTRUCTOR,ep=_f,mee=No,yee=Lr,vee=Lo,E5=ep&&ep.prototype;if(gee({target:"Promise",proto:!0,forced:pee,real:!0},{catch:function(t){return this.then(void 0,t)}}),yee(ep)){var _5=mee("Promise").prototype.catch;E5.catch!==_5&&vee(E5,"catch",_5,{unsafe:!0})}var wee=qn,Bee=_n,xee=ri,bee=Ps,Cee=$1,Eee=w5,_ee=C5;wee({target:"Promise",stat:!0,forced:_ee},{race:function(e){var r=this,n=bee.f(r),a=n.reject,A=Cee(function(){var o=xee(r.resolve);Eee(e,function(s){Bee(o,r,s).then(n.resolve,a)})});return A.error&&a(A.value),n.promise}});var Fee=qn,See=_n,kee=Ps,Tee=Bc.CONSTRUCTOR;Fee({target:"Promise",stat:!0,forced:Tee},{reject:function(e){var r=kee.f(this);return See(r.reject,void 0,e),r.promise}});var Nee=On,Lee=ti,Uee=Ps,Iee=function(t,e){if(Nee(t),Lee(e)&&e.constructor===t)return e;var r=Uee.f(t),n=r.resolve;return n(e),r.promise},Dee=qn,Qee=No,Oee=Bc.CONSTRUCTOR,Pee=Iee;Qee("Promise"),Dee({target:"Promise",stat:!0,forced:Oee},{resolve:function(e){return Pee(this,e)}});function F5(t,e,r,n,a,A,o){try{var s=t[A](o),l=s.value}catch(c){r(c);return}s.done?e(l):Promise.resolve(l).then(n,a)}function ni(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var A=t.apply(e,r);function o(l){F5(A,n,a,o,s,"next",l)}function s(l){F5(A,n,a,o,s,"throw",l)}o(void 0)})}}var Mee=_1,Ree=String,UA=function(t){if(Mee(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Ree(t)},Hee=On,S5=function(){var t=Hee(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},tp=Vr,Vee=An,rp=Vee.RegExp,np=tp(function(){var t=rp("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),$ee=np||tp(function(){return!rp("a","y").sticky}),zee=np||tp(function(){var t=rp("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),k5={BROKEN_CARET:zee,MISSED_STICKY:$ee,UNSUPPORTED_Y:np},T5={},Kee=lb,Gee=b1,jee=Object.keys||function(e){return Kee(e,Gee)},Wee=kA,Xee=jx,qee=NA,Yee=On,Jee=uc,Zee=jee;T5.f=Wee&&!Xee?Object.defineProperties:function(e,r){Yee(e);for(var n=Jee(r),a=Zee(r),A=a.length,o=0,s;A>o;)qee.f(e,s=a[o++],n[s]);return e};var ete=On,tte=T5,N5=b1,rte=p1,nte=Sb,ate=uf,Ate=g1,L5=">",U5="<",ap="prototype",Ap="script",I5=Ate("IE_PROTO"),ip=function(){},D5=function(t){return U5+Ap+L5+t+U5+"/"+Ap+L5},Q5=function(t){t.write(D5("")),t.close();var e=t.parentWindow.Object;return t=null,e},ite=function(){var t=ate("iframe"),e="java"+Ap+":",r;return t.style.display="none",nte.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(D5("document.F=Object")),r.close(),r.F},If,Df=function(){try{If=new ActiveXObject("htmlfile")}catch{}Df=typeof document<"u"?document.domain&&If?Q5(If):ite():Q5(If);for(var t=N5.length;t--;)delete Df[ap][N5[t]];return Df()};rte[I5]=!0;var op=Object.create||function(e,r){var n;return e!==null?(ip[ap]=ete(e),n=new ip,ip[ap]=null,n[I5]=e):n=Df(),r===void 0?n:tte.f(n,r)},ote=Vr,ste=An,lte=ste.RegExp,cte=ote(function(){var t=lte(".","s");return!(t.dotAll&&t.exec(`
391
391
  `)&&t.flags==="s")}),ute=Vr,hte=An,fte=hte.RegExp,dte=ute(function(){var t=fte("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),$s=_n,Qf=$r,gte=UA,pte=S5,mte=k5,yte=n1,vte=op,wte=pf.get,Bte=cte,xte=dte,bte=yte("native-string-replace",String.prototype.replace),Of=RegExp.prototype.exec,sp=Of,Cte=Qf("".charAt),Ete=Qf("".indexOf),_te=Qf("".replace),lp=Qf("".slice),cp=function(){var t=/a/,e=/b*/g;return $s(Of,t,"a"),$s(Of,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),O5=mte.BROKEN_CARET,up=/()??/.exec("")[1]!==void 0,Fte=cp||up||O5||Bte||xte;Fte&&(sp=function(e){var r=this,n=wte(r),a=gte(e),A=n.raw,o,s,l,c,u,p,h;if(A)return A.lastIndex=r.lastIndex,o=$s(sp,A,a),r.lastIndex=A.lastIndex,o;var d=n.groups,w=O5&&r.sticky,g=$s(pte,r),y=r.source,m=0,F=a;if(w&&(g=_te(g,"y",""),Ete(g,"g")===-1&&(g+="g"),F=lp(a,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&Cte(a,r.lastIndex-1)!==`
392
392
  `)&&(y="(?: "+y+")",F=" "+F,m++),s=new RegExp("^(?:"+y+")",g)),up&&(s=new RegExp("^"+y+"$(?!\\s)",g)),cp&&(l=r.lastIndex),c=$s(Of,w?s:r,F),w?c?(c.input=lp(c.input,m),c[0]=lp(c[0],m),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:cp&&c&&(r.lastIndex=r.global?c.index+c[0].length:l),up&&c&&c.length>1&&$s(bte,c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&d)for(c.groups=p=vte(null),u=0;u<d.length;u++)h=d[u],p[h[0]]=c[h[1]];return c});var Pf=sp,Ste=qn,P5=Pf;Ste({target:"RegExp",proto:!0,forced:/./.exec!==P5},{exec:P5});var M5=mc,R5=Lo,kte=Pf,H5=Vr,V5=dn,Tte=hc,Nte=V5("species"),hp=RegExp.prototype,fp=function(t,e,r,n){var a=V5(t),A=!H5(function(){var c={};return c[a]=function(){return 7},""[t](c)!=7}),o=A&&!H5(function(){var c=!1,u=/a/;return t==="split"&&(u={},u.constructor={},u.constructor[Nte]=function(){return u},u.flags="",u[a]=/./[a]),u.exec=function(){return c=!0,null},u[a](""),!c});if(!A||!o||r){var s=M5(/./[a]),l=e(a,""[t],function(c,u,p,h,d){var w=M5(c),g=u.exec;return g===kte||g===hp.exec?A&&!d?{done:!0,value:s(u,p,h)}:{done:!0,value:w(p,u,h)}:{done:!1}});R5(String.prototype,t,l[0]),R5(hp,a,l[1])}n&&Tte(hp[a],"sham",!0)},dp=$r,Lte=vf,Ute=UA,Ite=TA,Dte=dp("".charAt),$5=dp("".charCodeAt),Qte=dp("".slice),z5=function(t){return function(e,r){var n=Ute(Ite(e)),a=Lte(r),A=n.length,o,s;return a<0||a>=A?t?"":void 0:(o=$5(n,a),o<55296||o>56319||a+1===A||(s=$5(n,a+1))<56320||s>57343?t?Dte(n,a):o:t?Qte(n,a,a+2):(o-55296<<10)+(s-56320)+65536)}},Ote={codeAt:z5(!1),charAt:z5(!0)},Pte=Ote.charAt,gp=function(t,e,r){return e+(r?Pte(t,e).length:1)},K5=_n,Mte=On,Rte=Lr,Hte=ko,Vte=Pf,$te=TypeError,pp=function(t,e){var r=t.exec;if(Rte(r)){var n=K5(r,t,e);return n!==null&&Mte(n),n}if(Hte(t)==="RegExp")return K5(Vte,t,e);throw $te("RegExp#exec called on incompatible receiver")},zte=_n,Kte=fp,Gte=On,jte=To,Wte=Qs,mp=UA,Xte=TA,qte=Us,Yte=gp,G5=pp;Kte("match",function(t,e,r){return[function(a){var A=Xte(this),o=jte(a)?void 0:qte(a,t);return o?zte(o,a,A):new RegExp(a)[t](mp(A))},function(n){var a=Gte(this),A=mp(n),o=r(e,a,A);if(o.done)return o.value;if(!a.global)return G5(a,A);var s=a.unicode;a.lastIndex=0;for(var l=[],c=0,u;(u=G5(a,A))!==null;){var p=mp(u[0]);l[c]=p,p===""&&(a.lastIndex=Yte(A,Wte(a.lastIndex),s)),c++}return c===0?null:l}]});var yp=$r,Jte=cf,Zte=Math.floor,vp=yp("".charAt),ere=yp("".replace),wp=yp("".slice),tre=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,rre=/\$([$&'`]|\d{1,2})/g,nre=function(t,e,r,n,a,A){var o=r+t.length,s=n.length,l=rre;return a!==void 0&&(a=Jte(a),l=tre),ere(A,l,function(c,u){var p;switch(vp(u,0)){case"$":return"$";case"&":return t;case"`":return wp(e,0,r);case"'":return wp(e,o);case"<":p=a[wp(u,1,-1)];break;default:var h=+u;if(h===0)return c;if(h>s){var d=Zte(h/10);return d===0?c:d<=s?n[d-1]===void 0?vp(u,1):n[d-1]+vp(u,1):c}p=n[h-1]}return p===void 0?"":p})},are=S1,j5=_n,Mf=$r,Are=fp,ire=Vr,ore=On,sre=Lr,lre=To,cre=vf,ure=Qs,zs=UA,hre=TA,fre=gp,dre=Us,gre=nre,pre=pp,mre=dn,Bp=mre("replace"),yre=Math.max,vre=Math.min,wre=Mf([].concat),xp=Mf([].push),W5=Mf("".indexOf),X5=Mf("".slice),Bre=function(t){return t===void 0?t:String(t)},xre=function(){return"a".replace(/./,"$0")==="$0"}(),q5=function(){return/./[Bp]?/./[Bp]("a","$0")==="":!1}(),bre=!ire(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"});Are("replace",function(t,e,r){var n=q5?"$":"$0";return[function(A,o){var s=hre(this),l=lre(A)?void 0:dre(A,Bp);return l?j5(l,A,s,o):j5(e,zs(s),A,o)},function(a,A){var o=ore(this),s=zs(a);if(typeof A=="string"&&W5(A,n)===-1&&W5(A,"$<")===-1){var l=r(e,o,s,A);if(l.done)return l.value}var c=sre(A);c||(A=zs(A));var u=o.global;if(u){var p=o.unicode;o.lastIndex=0}for(var h=[];;){var d=pre(o,s);if(d===null||(xp(h,d),!u))break;var w=zs(d[0]);w===""&&(o.lastIndex=fre(s,ure(o.lastIndex),p))}for(var g="",y=0,m=0;m<h.length;m++){d=h[m];for(var F=zs(d[0]),N=yre(vre(cre(d.index),s.length),0),Q=[],z=1;z<d.length;z++)xp(Q,Bre(d[z]));var R=d.groups;if(c){var I=wre([F],Q,N,s);R!==void 0&&xp(I,R);var U=zs(are(A,void 0,I))}else U=gre(F,s,N,Q,R,A);N>=y&&(g+=X5(s,y,N)+U,y=N+F.length)}return g+X5(s,y)}]},!bre||!xre||q5);var Cre=ti,Ere=ko,_re=dn,Fre=_re("match"),Y5=function(t){var e;return Cre(t)&&((e=t[Fre])!==void 0?!!e:Ere(t)=="RegExp")},Sre=Y5,kre=TypeError,bp=function(t){if(Sre(t))throw kre("The method doesn't accept regular expressions");return t},Tre=dn,Nre=Tre("match"),Cp=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[Nre]=!1,"/./"[t](e)}catch{}}return!1},Lre=qn,J5=mc,Ure=Ls.f,Ire=Qs,Z5=UA,Dre=bp,Qre=TA,Ore=Cp,eC=J5("".startsWith),Pre=J5("".slice),Mre=Math.min,tC=Ore("startsWith"),Rre=!tC&&!!function(){var t=Ure(String.prototype,"startsWith");return t&&!t.writable}();Lre({target:"String",proto:!0,forced:!Rre&&!tC},{startsWith:function(e){var r=Z5(Qre(this));Dre(e);var n=Ire(Mre(arguments.length>1?arguments[1]:void 0,r.length)),a=Z5(e);return eC?eC(r,a,n):Pre(r,n,n+a.length)===a}});var Hre=dn,Vre=op,$re=NA.f,Ep=Hre("unscopables"),_p=Array.prototype;_p[Ep]==null&&$re(_p,Ep,{configurable:!0,value:Vre(null)});var zre=function(t){_p[Ep][t]=!0},Kre=Vr,Gre=!Kre(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),jre=iA,Wre=Lr,Xre=cf,qre=g1,Yre=Gre,rC=qre("IE_PROTO"),Fp=Object,Jre=Fp.prototype,nC=Yre?Fp.getPrototypeOf:function(t){var e=Xre(t);if(jre(e,rC))return e[rC];var r=e.constructor;return Wre(r)&&e instanceof r?r.prototype:e instanceof Fp?Jre:null},Zre=Vr,ene=Lr,tne=ti,aC=nC,rne=Lo,nne=dn,Sp=nne("iterator"),AC=!1,Qo,kp,Tp;[].keys&&(Tp=[].keys(),"next"in Tp?(kp=aC(aC(Tp)),kp!==Object.prototype&&(Qo=kp)):AC=!0);var ane=!tne(Qo)||Zre(function(){var t={};return Qo[Sp].call(t)!==t});ane&&(Qo={}),ene(Qo[Sp])||rne(Qo,Sp,function(){return this});var iC={IteratorPrototype:Qo,BUGGY_SAFARI_ITERATORS:AC},Ane=iC.IteratorPrototype,ine=op,one=af,sne=E1,lne=xc,cne=function(){return this},une=function(t,e,r,n){var a=e+" Iterator";return t.prototype=ine(Ane,{next:one(+!n,r)}),sne(t,a,!1),lne[a]=cne,t},hne=qn,fne=_n,oC=ff,dne=Lr,gne=une,sC=nC,lC=fb,pne=E1,mne=hc,Np=Lo,yne=dn,vne=xc,cC=iC,wne=oC.PROPER,Bne=oC.CONFIGURABLE,uC=cC.IteratorPrototype,Rf=cC.BUGGY_SAFARI_ITERATORS,bc=yne("iterator"),hC="keys",Cc="values",fC="entries",xne=function(){return this},bne=function(t,e,r,n,a,A,o){gne(r,e,n);var s=function(m){if(m===a&&h)return h;if(!Rf&&m in u)return u[m];switch(m){case hC:return function(){return new r(this,m)};case Cc:return function(){return new r(this,m)};case fC:return function(){return new r(this,m)}}return function(){return new r(this)}},l=e+" Iterator",c=!1,u=t.prototype,p=u[bc]||u["@@iterator"]||a&&u[a],h=!Rf&&p||s(a),d=e=="Array"&&u.entries||p,w,g,y;if(d&&(w=sC(d.call(new t)),w!==Object.prototype&&w.next&&(sC(w)!==uC&&(lC?lC(w,uC):dne(w[bc])||Np(w,bc,xne)),pne(w,l,!0))),wne&&a==Cc&&p&&p.name!==Cc&&(Bne?mne(u,"name",Cc):(c=!0,h=function(){return fne(p,this)})),a)if(g={values:s(Cc),keys:A?h:s(hC),entries:s(fC)},o)for(y in g)(Rf||c||!(y in u))&&Np(u,y,g[y]);else hne({target:e,proto:!0,forced:Rf||c},g);return u[bc]!==h&&Np(u,bc,h,{name:a}),vne[e]=h,g},Cne=function(t,e){return{value:t,done:e}},Ene=uc,Lp=zre,dC=xc,gC=pf,_ne=NA.f,Fne=bne,Hf=Cne,Sne=kA,pC="Array Iterator",kne=gC.set,Tne=gC.getterFor(pC),Nne=Fne(Array,"Array",function(t,e){kne(this,{type:pC,target:Ene(t),index:0,kind:e})},function(){var t=Tne(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,Hf(void 0,!0)):r=="keys"?Hf(n,!1):r=="values"?Hf(e[n],!1):Hf([n,e[n]],!1)},"values"),mC=dC.Arguments=dC.Array;if(Lp("keys"),Lp("values"),Lp("entries"),Sne&&mC.name!=="values")try{_ne(mC,"name",{value:"values"})}catch{}var Lne={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Une=uf,Up=Une("span").classList,yC=Up&&Up.constructor&&Up.constructor.prototype,Ine=yC===Object.prototype?void 0:yC,vC=An,wC=Lne,Dne=Ine,Ec=Nne,Ip=hc,BC=dn,Dp=BC("iterator"),xC=BC("toStringTag"),Qp=Ec.values,bC=function(t,e){if(t){if(t[Dp]!==Qp)try{Ip(t,Dp,Qp)}catch{t[Dp]=Qp}if(t[xC]||Ip(t,xC,e),wC[e]){for(var r in Ec)if(t[r]!==Ec[r])try{Ip(t,r,Ec[r])}catch{t[r]=Ec[r]}}}};for(var Op in wC)bC(vC[Op]&&vC[Op].prototype,Op);bC(Dne,"DOMTokenList");function Qne(t,e){if(Xt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Xt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function One(t){var e=Qne(t,"string");return Xt(e)==="symbol"?e:String(e)}function Pp(t,e,r){return e=One(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Pne=ri,Mne=cf,Rne=xx,Hne=wf,Vne=TypeError,CC=function(t){return function(e,r,n,a){Pne(r);var A=Mne(e),o=Rne(A),s=Hne(A),l=t?s-1:0,c=t?-1:1;if(n<2)for(;;){if(l in o){a=o[l],l+=c;break}if(l+=c,t?l<0:s<=l)throw Vne("Reduce of empty array with no initial value")}for(;t?l>=0:s>l;l+=c)l in o&&(a=r(a,o[l],l,A));return a}},$ne={left:CC(!1),right:CC(!0)},zne=Vr,EC=function(t,e){var r=[][t];return!!r&&zne(function(){r.call(null,e||function(){return 1},1)})},Kne=qn,Gne=$ne.left,jne=EC,_C=Yg,Wne=gc,Xne=!Wne&&_C>79&&_C<83,qne=Xne||!jne("reduce");Kne({target:"Array",proto:!0,forced:qne},{reduce:function(e){var r=arguments.length;return Gne(this,e,r,r>1?arguments[1]:void 0)}});var Yne=qn,FC=mc,Jne=Ls.f,Zne=Qs,SC=UA,eae=bp,tae=TA,rae=Cp,kC=FC("".endsWith),nae=FC("".slice),aae=Math.min,TC=rae("endsWith"),Aae=!TC&&!!function(){var t=Jne(String.prototype,"endsWith");return t&&!t.writable}();Yne({target:"String",proto:!0,forced:!Aae&&!TC},{endsWith:function(e){var r=SC(tae(this));eae(e);var n=arguments.length>1?arguments[1]:void 0,a=r.length,A=n===void 0?a:aae(Zne(n),a),o=SC(e);return kC?kC(r,o,A):nae(r,A-o.length,A)===o}});var iae=A1,oae=NA,sae=af,lae=function(t,e,r){var n=iae(e);n in t?oae.f(t,n,sae(0,r)):t[n]=r},NC=Ab,cae=wf,uae=lae,hae=Array,fae=Math.max,dae=function(t,e,r){for(var n=cae(t),a=NC(e,n),A=NC(r===void 0?n:r,n),o=hae(fae(A-a,0)),s=0;a<A;a++,s++)uae(o,s,t[a]);return o.length=s,o},gae=S1,_c=_n,Mp=$r,pae=fp,mae=On,yae=To,vae=Y5,LC=TA,wae=bb,Bae=gp,xae=Qs,Rp=UA,bae=Us,UC=dae,IC=pp,Cae=Pf,Eae=k5,_ae=Vr,Ks=Eae.UNSUPPORTED_Y,DC=4294967295,Fae=Math.min,QC=[].push,Sae=Mp(/./.exec),Gs=Mp(QC),Fc=Mp("".slice),kae=!_ae(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return r.length!==2||r[0]!=="a"||r[1]!=="b"});pae("split",function(t,e,r){var n;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?n=function(a,A){var o=Rp(LC(this)),s=A===void 0?DC:A>>>0;if(s===0)return[];if(a===void 0)return[o];if(!vae(a))return _c(e,o,a,s);for(var l=[],c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),u=0,p=new RegExp(a.source,c+"g"),h,d,w;(h=_c(Cae,p,o))&&(d=p.lastIndex,!(d>u&&(Gs(l,Fc(o,u,h.index)),h.length>1&&h.index<o.length&&gae(QC,l,UC(h,1)),w=h[0].length,u=d,l.length>=s)));)p.lastIndex===h.index&&p.lastIndex++;return u===o.length?(w||!Sae(p,""))&&Gs(l,""):Gs(l,Fc(o,u)),l.length>s?UC(l,0,s):l}:"0".split(void 0,0).length?n=function(a,A){return a===void 0&&A===0?[]:_c(e,this,a,A)}:n=e,[function(A,o){var s=LC(this),l=yae(A)?void 0:bae(A,t);return l?_c(l,A,s,o):_c(n,Rp(s),A,o)},function(a,A){var o=mae(this),s=Rp(a),l=r(n,o,s,A,n!==e);if(l.done)return l.value;var c=wae(o,RegExp),u=o.unicode,p=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Ks?"g":"y"),h=new c(Ks?"^(?:"+o.source+")":o,p),d=A===void 0?DC:A>>>0;if(d===0)return[];if(s.length===0)return IC(h,s)===null?[s]:[];for(var w=0,g=0,y=[];g<s.length;){h.lastIndex=Ks?0:g;var m=IC(h,Ks?Fc(s,g):s),F;if(m===null||(F=Fae(xae(h.lastIndex+(Ks?g:0)),s.length))===w)g=Bae(s,g,u);else{if(Gs(y,Fc(s,w,g)),y.length===d)return y;for(var N=1;N<=m.length-1;N++)if(Gs(y,m[N]),y.length===d)return y;g=w=F}}return Gs(y,Fc(s,w)),y}]},!kae,Ks);var Vf={exports:{}},Sc={exports:{}};(function(){var t,e,r,n,a,A;typeof performance<"u"&&performance!==null&&performance.now?Sc.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Sc.exports=function(){return(t()-a)/1e6},e=process.hrtime,t=function(){var o;return o=e(),o[0]*1e9+o[1]},n=t(),A=process.uptime()*1e9,a=n-A):Date.now?(Sc.exports=function(){return Date.now()-r},r=Date.now()):(Sc.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(cc);for(var Tae=Sc.exports,Nae=Tae,ai=typeof window>"u"?cc:window,$f=["moz","webkit"],js="AnimationFrame",Ws=ai["request"+js],kc=ai["cancel"+js]||ai["cancelRequest"+js],Tc=0;!Ws&&Tc<$f.length;Tc++)Ws=ai[$f[Tc]+"Request"+js],kc=ai[$f[Tc]+"Cancel"+js]||ai[$f[Tc]+"CancelRequest"+js];if(!Ws||!kc){var Hp=0,OC=0,Oo=[],Lae=1e3/60;Ws=function(t){if(Oo.length===0){var e=Nae(),r=Math.max(0,Lae-(e-Hp));Hp=r+e,setTimeout(function(){var n=Oo.slice(0);Oo.length=0;for(var a=0;a<n.length;a++)if(!n[a].cancelled)try{n[a].callback(Hp)}catch(A){setTimeout(function(){throw A},0)}},Math.round(r))}return Oo.push({handle:++OC,callback:t,cancelled:!1}),OC},kc=function(t){for(var e=0;e<Oo.length;e++)Oo[e].handle===t&&(Oo[e].cancelled=!0)}}Vf.exports=function(t){return Ws.call(ai,t)},Vf.exports.cancel=function(){kc.apply(ai,arguments)},Vf.exports.polyfill=function(t){t||(t=ai),t.requestAnimationFrame=Ws,t.cancelAnimationFrame=kc};var Uae=Vf.exports;const Vp=gx(Uae);var PC=`
393
393
  \v\f\r                 \u2028\u2029\uFEFF`,Iae=$r,Dae=TA,Qae=UA,$p=PC,MC=Iae("".replace),Oae=RegExp("^["+$p+"]+"),Pae=RegExp("(^|[^"+$p+"])["+$p+"]+$"),zp=function(t){return function(e){var r=Qae(Dae(e));return t&1&&(r=MC(r,Oae,"")),t&2&&(r=MC(r,Pae,"$1")),r}},Mae={start:zp(1),end:zp(2),trim:zp(3)},Rae=ff.PROPER,Hae=Vr,RC=PC,HC="​…᠎",Vae=function(t){return Hae(function(){return!!RC[t]()||HC[t]()!==HC||Rae&&RC[t].name!==t})},$ae=qn,zae=Mae.trim,Kae=Vae;$ae({target:"String",proto:!0,forced:Kae("trim")},{trim:function(){return zae(this)}});var Gae=function(t){this.ok=!1,this.alpha=1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3]),parseFloat(l[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],n=0;n<r.length;n++){var a=r[n].re,A=r[n].process,o=a.exec(t);if(o){var s=A(o);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var l=this.r.toString(16),c=this.g.toString(16),u=this.b.toString(16);return l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),"#"+l+c+u},this.getHelpXML=function(){for(var l=new Array,c=0;c<r.length;c++)for(var u=r[c].example,p=0;p<u.length;p++)l[l.length]=u[p];for(var h in e)l[l.length]=h;var d=document.createElement("ul");d.setAttribute("id","rgbcolor-examples");for(var c=0;c<l.length;c++)try{var w=document.createElement("li"),g=new RGBColor(l[c]),y=document.createElement("div");y.style.cssText="margin: 3px; border: 1px solid black; background:"+g.toHex()+"; color:"+g.toHex(),y.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+l[c]+" -> "+g.toRGB()+" -> "+g.toHex());w.appendChild(y),w.appendChild(m),d.appendChild(w)}catch{}return d}};const Kp=gx(Gae);var jae=qn,Wae=mc,Xae=ob.indexOf,qae=EC,Gp=Wae([].indexOf),VC=!!Gp&&1/Gp([1],1,-0)<0,Yae=VC||!qae("indexOf");jae({target:"Array",proto:!0,forced:Yae},{indexOf:function(e){var r=arguments.length>1?arguments[1]:void 0;return VC?Gp(this,e,r)||0:Xae(this,e,r)}});var Jae=qn,Zae=$r,eAe=bp,tAe=TA,$C=UA,rAe=Cp,nAe=Zae("".indexOf);Jae({target:"String",proto:!0,forced:!rAe("includes")},{includes:function(e){return!!~nAe($C(tAe(this)),$C(eAe(e)),arguments.length>1?arguments[1]:void 0)}});var aAe=ko,AAe=Array.isArray||function(e){return aAe(e)=="Array"},iAe=qn,oAe=$r,sAe=AAe,lAe=oAe([].reverse),zC=[1,2];iAe({target:"Array",proto:!0,forced:String(zC)===String(zC.reverse())},{reverse:function(){return sAe(this)&&(this.length=this.length),lAe(this)}});/*! *****************************************************************************
@@ -404,4 +404,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
404
404
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
405
405
  PERFORMANCE OF THIS SOFTWARE.
406
406
  ***************************************************************************** */var KC=function(t,e){return(KC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])})(t,e)};function GC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}KC(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function cAe(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(n.type===je.CLOSE_PATH)e+="z";else if(n.type===je.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===je.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===je.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===je.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===je.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===je.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===je.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===je.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==je.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+r+".");e+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y}}return e}function jp(t,e){var r=t[0],n=t[1];return[r*Math.cos(e)-n*Math.sin(e),r*Math.sin(e)+n*Math.cos(e)]}function oA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if(typeof t[r]!="number")throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var Vi=Math.PI;function Wp(t,e,r){t.lArcFlag=t.lArcFlag===0?0:1,t.sweepFlag=t.sweepFlag===0?0:1;var n=t.rX,a=t.rY,A=t.x,o=t.y;n=Math.abs(t.rX),a=Math.abs(t.rY);var s=jp([(e-A)/2,(r-o)/2],-t.xRot/180*Vi),l=s[0],c=s[1],u=Math.pow(l,2)/Math.pow(n,2)+Math.pow(c,2)/Math.pow(a,2);1<u&&(n*=Math.sqrt(u),a*=Math.sqrt(u)),t.rX=n,t.rY=a;var p=Math.pow(n,2)*Math.pow(c,2)+Math.pow(a,2)*Math.pow(l,2),h=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-p)/p)),d=n*c/a*h,w=-a*l/n*h,g=jp([d,w],t.xRot/180*Vi);t.cX=g[0]+(e+A)/2,t.cY=g[1]+(r+o)/2,t.phi1=Math.atan2((c-w)/a,(l-d)/n),t.phi2=Math.atan2((-c-w)/a,(-l-d)/n),t.sweepFlag===0&&t.phi2>t.phi1&&(t.phi2-=2*Vi),t.sweepFlag===1&&t.phi2<t.phi1&&(t.phi2+=2*Vi),t.phi1*=180/Vi,t.phi2*=180/Vi}function jC(t,e,r){oA(t,e,r);var n=t*t+e*e-r*r;if(0>n)return[];if(n===0)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var a=Math.sqrt(n);return[[(t*r+e*a)/(t*t+e*e),(e*r-t*a)/(t*t+e*e)],[(t*r-e*a)/(t*t+e*e),(e*r+t*a)/(t*t+e*e)]]}var qr,Ai=Math.PI/180;function WC(t,e,r){return(1-r)*t+r*e}function XC(t,e,r,n){return t+Math.cos(n/180*Vi)*e+Math.sin(n/180*Vi)*r}function qC(t,e,r,n){var a=1e-6,A=e-t,o=r-e,s=3*A+3*(n-r)-6*o,l=6*(o-A),c=3*A;return Math.abs(s)<a?[-c/l]:function(u,p,h){h===void 0&&(h=1e-6);var d=u*u/4-p;if(d<-h)return[];if(d<=h)return[-u/2];var w=Math.sqrt(d);return[-u/2-w,-u/2+w]}(l/s,c/s,a)}function YC(t,e,r,n,a){var A=1-a;return t*(A*A*A)+e*(3*A*A*a)+r*(3*A*a*a)+n*(a*a*a)}(function(t){function e(){return a(function(s,l,c){return s.relative&&(s.x1!==void 0&&(s.x1+=l),s.y1!==void 0&&(s.y1+=c),s.x2!==void 0&&(s.x2+=l),s.y2!==void 0&&(s.y2+=c),s.x!==void 0&&(s.x+=l),s.y!==void 0&&(s.y+=c),s.relative=!1),s})}function r(){var s=NaN,l=NaN,c=NaN,u=NaN;return a(function(p,h,d){return p.type&je.SMOOTH_CURVE_TO&&(p.type=je.CURVE_TO,s=isNaN(s)?h:s,l=isNaN(l)?d:l,p.x1=p.relative?h-s:2*h-s,p.y1=p.relative?d-l:2*d-l),p.type&je.CURVE_TO?(s=p.relative?h+p.x2:p.x2,l=p.relative?d+p.y2:p.y2):(s=NaN,l=NaN),p.type&je.SMOOTH_QUAD_TO&&(p.type=je.QUAD_TO,c=isNaN(c)?h:c,u=isNaN(u)?d:u,p.x1=p.relative?h-c:2*h-c,p.y1=p.relative?d-u:2*d-u),p.type&je.QUAD_TO?(c=p.relative?h+p.x1:p.x1,u=p.relative?d+p.y1:p.y1):(c=NaN,u=NaN),p})}function n(){var s=NaN,l=NaN;return a(function(c,u,p){if(c.type&je.SMOOTH_QUAD_TO&&(c.type=je.QUAD_TO,s=isNaN(s)?u:s,l=isNaN(l)?p:l,c.x1=c.relative?u-s:2*u-s,c.y1=c.relative?p-l:2*p-l),c.type&je.QUAD_TO){s=c.relative?u+c.x1:c.x1,l=c.relative?p+c.y1:c.y1;var h=c.x1,d=c.y1;c.type=je.CURVE_TO,c.x1=((c.relative?0:u)+2*h)/3,c.y1=((c.relative?0:p)+2*d)/3,c.x2=(c.x+2*h)/3,c.y2=(c.y+2*d)/3}else s=NaN,l=NaN;return c})}function a(s){var l=0,c=0,u=NaN,p=NaN;return function(h){if(isNaN(u)&&!(h.type&je.MOVE_TO))throw new Error("path must start with moveto");var d=s(h,l,c,u,p);return h.type&je.CLOSE_PATH&&(l=u,c=p),h.x!==void 0&&(l=h.relative?l+h.x:h.x),h.y!==void 0&&(c=h.relative?c+h.y:h.y),h.type&je.MOVE_TO&&(u=l,p=c),d}}function A(s,l,c,u,p,h){return oA(s,l,c,u,p,h),a(function(d,w,g,y){var m=d.x1,F=d.x2,N=d.relative&&!isNaN(y),Q=d.x!==void 0?d.x:N?0:w,z=d.y!==void 0?d.y:N?0:g;function R(b){return b*b}d.type&je.HORIZ_LINE_TO&&l!==0&&(d.type=je.LINE_TO,d.y=d.relative?0:g),d.type&je.VERT_LINE_TO&&c!==0&&(d.type=je.LINE_TO,d.x=d.relative?0:w),d.x!==void 0&&(d.x=d.x*s+z*c+(N?0:p)),d.y!==void 0&&(d.y=Q*l+d.y*u+(N?0:h)),d.x1!==void 0&&(d.x1=d.x1*s+d.y1*c+(N?0:p)),d.y1!==void 0&&(d.y1=m*l+d.y1*u+(N?0:h)),d.x2!==void 0&&(d.x2=d.x2*s+d.y2*c+(N?0:p)),d.y2!==void 0&&(d.y2=F*l+d.y2*u+(N?0:h));var I=s*u-l*c;if(d.xRot!==void 0&&(s!==1||l!==0||c!==0||u!==1))if(I===0)delete d.rX,delete d.rY,delete d.xRot,delete d.lArcFlag,delete d.sweepFlag,d.type=je.LINE_TO;else{var U=d.xRot*Math.PI/180,O=Math.sin(U),q=Math.cos(U),T=1/R(d.rX),L=1/R(d.rY),G=R(q)*T+R(O)*L,Y=2*O*q*(T-L),se=R(O)*T+R(q)*L,he=G*u*u-Y*l*u+se*l*l,ge=Y*(s*u+l*c)-2*(G*c*u+se*s*l),re=G*c*c-Y*s*c+se*s*s,le=(Math.atan2(ge,he-re)+Math.PI)%Math.PI/2,fe=Math.sin(le),Ue=Math.cos(le);d.rX=Math.abs(I)/Math.sqrt(he*R(Ue)+ge*fe*Ue+re*R(fe)),d.rY=Math.abs(I)/Math.sqrt(he*R(fe)-ge*fe*Ue+re*R(Ue)),d.xRot=180*le/Math.PI}return d.sweepFlag!==void 0&&0>I&&(d.sweepFlag=+!d.sweepFlag),d})}function o(){return function(s){var l={};for(var c in s)l[c]=s[c];return l}}t.ROUND=function(s){function l(c){return Math.round(c*s)/s}return s===void 0&&(s=1e13),oA(s),function(c){return c.x1!==void 0&&(c.x1=l(c.x1)),c.y1!==void 0&&(c.y1=l(c.y1)),c.x2!==void 0&&(c.x2=l(c.x2)),c.y2!==void 0&&(c.y2=l(c.y2)),c.x!==void 0&&(c.x=l(c.x)),c.y!==void 0&&(c.y=l(c.y)),c.rX!==void 0&&(c.rX=l(c.rX)),c.rY!==void 0&&(c.rY=l(c.rY)),c}},t.TO_ABS=e,t.TO_REL=function(){return a(function(s,l,c){return s.relative||(s.x1!==void 0&&(s.x1-=l),s.y1!==void 0&&(s.y1-=c),s.x2!==void 0&&(s.x2-=l),s.y2!==void 0&&(s.y2-=c),s.x!==void 0&&(s.x-=l),s.y!==void 0&&(s.y-=c),s.relative=!0),s})},t.NORMALIZE_HVZ=function(s,l,c){return s===void 0&&(s=!0),l===void 0&&(l=!0),c===void 0&&(c=!0),a(function(u,p,h,d,w){if(isNaN(d)&&!(u.type&je.MOVE_TO))throw new Error("path must start with moveto");return l&&u.type&je.HORIZ_LINE_TO&&(u.type=je.LINE_TO,u.y=u.relative?0:h),c&&u.type&je.VERT_LINE_TO&&(u.type=je.LINE_TO,u.x=u.relative?0:p),s&&u.type&je.CLOSE_PATH&&(u.type=je.LINE_TO,u.x=u.relative?d-p:d,u.y=u.relative?w-h:w),u.type&je.ARC&&(u.rX===0||u.rY===0)&&(u.type=je.LINE_TO,delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag),u})},t.NORMALIZE_ST=r,t.QT_TO_C=n,t.INFO=a,t.SANITIZE=function(s){s===void 0&&(s=0),oA(s);var l=NaN,c=NaN,u=NaN,p=NaN;return a(function(h,d,w,g,y){var m=Math.abs,F=!1,N=0,Q=0;if(h.type&je.SMOOTH_CURVE_TO&&(N=isNaN(l)?0:d-l,Q=isNaN(c)?0:w-c),h.type&(je.CURVE_TO|je.SMOOTH_CURVE_TO)?(l=h.relative?d+h.x2:h.x2,c=h.relative?w+h.y2:h.y2):(l=NaN,c=NaN),h.type&je.SMOOTH_QUAD_TO?(u=isNaN(u)?d:2*d-u,p=isNaN(p)?w:2*w-p):h.type&je.QUAD_TO?(u=h.relative?d+h.x1:h.x1,p=h.relative?w+h.y1:h.y2):(u=NaN,p=NaN),h.type&je.LINE_COMMANDS||h.type&je.ARC&&(h.rX===0||h.rY===0||!h.lArcFlag)||h.type&je.CURVE_TO||h.type&je.SMOOTH_CURVE_TO||h.type&je.QUAD_TO||h.type&je.SMOOTH_QUAD_TO){var z=h.x===void 0?0:h.relative?h.x:h.x-d,R=h.y===void 0?0:h.relative?h.y:h.y-w;N=isNaN(u)?h.x1===void 0?N:h.relative?h.x:h.x1-d:u-d,Q=isNaN(p)?h.y1===void 0?Q:h.relative?h.y:h.y1-w:p-w;var I=h.x2===void 0?0:h.relative?h.x:h.x2-d,U=h.y2===void 0?0:h.relative?h.y:h.y2-w;m(z)<=s&&m(R)<=s&&m(N)<=s&&m(Q)<=s&&m(I)<=s&&m(U)<=s&&(F=!0)}return h.type&je.CLOSE_PATH&&m(d-g)<=s&&m(w-y)<=s&&(F=!0),F?[]:h})},t.MATRIX=A,t.ROTATE=function(s,l,c){l===void 0&&(l=0),c===void 0&&(c=0),oA(s,l,c);var u=Math.sin(s),p=Math.cos(s);return A(p,u,-u,p,l-l*p+c*u,c-l*u-c*p)},t.TRANSLATE=function(s,l){return l===void 0&&(l=0),oA(s,l),A(1,0,0,1,s,l)},t.SCALE=function(s,l){return l===void 0&&(l=s),oA(s,l),A(s,0,0,l,0,0)},t.SKEW_X=function(s){return oA(s),A(1,0,Math.atan(s),1,0,0)},t.SKEW_Y=function(s){return oA(s),A(1,Math.atan(s),0,1,0,0)},t.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),oA(s),A(-1,0,0,1,s,0)},t.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),oA(s),A(1,0,0,-1,0,s)},t.A_TO_C=function(){return a(function(s,l,c){return je.ARC===s.type?function(u,p,h){var d,w,g,y;u.cX||Wp(u,p,h);for(var m=Math.min(u.phi1,u.phi2),F=Math.max(u.phi1,u.phi2)-m,N=Math.ceil(F/90),Q=new Array(N),z=p,R=h,I=0;I<N;I++){var U=WC(u.phi1,u.phi2,I/N),O=WC(u.phi1,u.phi2,(I+1)/N),q=O-U,T=4/3*Math.tan(q*Ai/4),L=[Math.cos(U*Ai)-T*Math.sin(U*Ai),Math.sin(U*Ai)+T*Math.cos(U*Ai)],G=L[0],Y=L[1],se=[Math.cos(O*Ai),Math.sin(O*Ai)],he=se[0],ge=se[1],re=[he+T*Math.sin(O*Ai),ge-T*Math.cos(O*Ai)],le=re[0],fe=re[1];Q[I]={relative:u.relative,type:je.CURVE_TO};var Ue=function(b,_){var B=jp([b*u.rX,_*u.rY],u.xRot),x=B[0],S=B[1];return[u.cX+x,u.cY+S]};d=Ue(G,Y),Q[I].x1=d[0],Q[I].y1=d[1],w=Ue(le,fe),Q[I].x2=w[0],Q[I].y2=w[1],g=Ue(he,ge),Q[I].x=g[0],Q[I].y=g[1],u.relative&&(Q[I].x1-=z,Q[I].y1-=R,Q[I].x2-=z,Q[I].y2-=R,Q[I].x-=z,Q[I].y-=R),z=(y=[Q[I].x,Q[I].y])[0],R=y[1]}return Q}(s,s.relative?0:l,s.relative?0:c):s})},t.ANNOTATE_ARCS=function(){return a(function(s,l,c){return s.relative&&(l=0,c=0),je.ARC===s.type&&Wp(s,l,c),s})},t.CLONE=o,t.CALCULATE_BOUNDS=function(){var s=function(h){var d={};for(var w in h)d[w]=h[w];return d},l=e(),c=n(),u=r(),p=a(function(h,d,w){var g=u(c(l(s(h))));function y(fe){fe>p.maxX&&(p.maxX=fe),fe<p.minX&&(p.minX=fe)}function m(fe){fe>p.maxY&&(p.maxY=fe),fe<p.minY&&(p.minY=fe)}if(g.type&je.DRAWING_COMMANDS&&(y(d),m(w)),g.type&je.HORIZ_LINE_TO&&y(g.x),g.type&je.VERT_LINE_TO&&m(g.y),g.type&je.LINE_TO&&(y(g.x),m(g.y)),g.type&je.CURVE_TO){y(g.x),m(g.y);for(var F=0,N=qC(d,g.x1,g.x2,g.x);F<N.length;F++)0<(le=N[F])&&1>le&&y(YC(d,g.x1,g.x2,g.x,le));for(var Q=0,z=qC(w,g.y1,g.y2,g.y);Q<z.length;Q++)0<(le=z[Q])&&1>le&&m(YC(w,g.y1,g.y2,g.y,le))}if(g.type&je.ARC){y(g.x),m(g.y),Wp(g,d,w);for(var R=g.xRot/180*Math.PI,I=Math.cos(R)*g.rX,U=Math.sin(R)*g.rX,O=-Math.sin(R)*g.rY,q=Math.cos(R)*g.rY,T=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],L=T[0],G=T[1],Y=function(fe){var Ue=fe[0],b=fe[1],_=180*Math.atan2(b,Ue)/Math.PI;return _<L?_+360:_},se=0,he=jC(O,-I,0).map(Y);se<he.length;se++)(le=he[se])>L&&le<G&&y(XC(g.cX,I,O,le));for(var ge=0,re=jC(q,-U,0).map(Y);ge<re.length;ge++){var le;(le=re[ge])>L&&le<G&&m(XC(g.cY,U,q,le))}}return h});return p.minX=1/0,p.maxX=-1/0,p.minY=1/0,p.maxY=-1/0,p}})(qr||(qr={}));var sA,JC=function(){function t(){}return t.prototype.round=function(e){return this.transform(qr.ROUND(e))},t.prototype.toAbs=function(){return this.transform(qr.TO_ABS())},t.prototype.toRel=function(){return this.transform(qr.TO_REL())},t.prototype.normalizeHVZ=function(e,r,n){return this.transform(qr.NORMALIZE_HVZ(e,r,n))},t.prototype.normalizeST=function(){return this.transform(qr.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(qr.QT_TO_C())},t.prototype.aToC=function(){return this.transform(qr.A_TO_C())},t.prototype.sanitize=function(e){return this.transform(qr.SANITIZE(e))},t.prototype.translate=function(e,r){return this.transform(qr.TRANSLATE(e,r))},t.prototype.scale=function(e,r){return this.transform(qr.SCALE(e,r))},t.prototype.rotate=function(e,r,n){return this.transform(qr.ROTATE(e,r,n))},t.prototype.matrix=function(e,r,n,a,A,o){return this.transform(qr.MATRIX(e,r,n,a,A,o))},t.prototype.skewX=function(e){return this.transform(qr.SKEW_X(e))},t.prototype.skewY=function(e){return this.transform(qr.SKEW_Y(e))},t.prototype.xSymmetry=function(e){return this.transform(qr.X_AXIS_SYMMETRY(e))},t.prototype.ySymmetry=function(e){return this.transform(qr.Y_AXIS_SYMMETRY(e))},t.prototype.annotateArcs=function(){return this.transform(qr.ANNOTATE_ARCS())},t}(),uAe=function(t){return t===" "||t===" "||t==="\r"||t===`
407
- `},ZC=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},hAe=function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return GC(e,t),e.prototype.finish=function(r){if(r===void 0&&(r=[]),this.parse(" ",r),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return r},e.prototype.parse=function(r,n){var a=this;n===void 0&&(n=[]);for(var A=function(p){n.push(p),a.curArgs.length=0,a.canParseCommandOrComma=!0},o=0;o<r.length;o++){var s=r[o],l=!(this.curCommandType!==je.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),c=ZC(s)&&(this.curNumber==="0"&&s==="0"||l);if(!ZC(s)||c)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||l){if(this.curNumber&&this.curCommandType!==-1){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===je.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(u),this.curArgs.length===fAe[this.curCommandType]&&(je.HORIZ_LINE_TO===this.curCommandType?A({type:je.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):je.VERT_LINE_TO===this.curCommandType?A({type:je.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===je.MOVE_TO||this.curCommandType===je.LINE_TO||this.curCommandType===je.SMOOTH_QUAD_TO?(A({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),je.MOVE_TO===this.curCommandType&&(this.curCommandType=je.LINE_TO)):this.curCommandType===je.CURVE_TO?A({type:je.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===je.SMOOTH_CURVE_TO?A({type:je.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.QUAD_TO?A({type:je.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.ARC&&A({type:je.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!uAe(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(c)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=je.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=je.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=je.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=je.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=je.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=je.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=je.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=je.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=je.ARC,this.curCommandRelative=s==="a"}else n.push({type:je.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return n},e.prototype.transform=function(r){return Object.create(this,{parse:{value:function(n,a){a===void 0&&(a=[]);for(var A=0,o=Object.getPrototypeOf(this).parse.call(this,n);A<o.length;A++){var s=o[A],l=r(s);Array.isArray(l)?a.push.apply(a,l):a.push(l)}return a}}})},e}(JC),je=function(t){function e(r){var n=t.call(this)||this;return n.commands=typeof r=="string"?e.parse(r):r,n}return GC(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var r=qr.CALCULATE_BOUNDS();return this.transform(r),r},e.prototype.transform=function(r){for(var n=[],a=0,A=this.commands;a<A.length;a++){var o=r(A[a]);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return this.commands=n,this},e.encode=function(r){return cAe(r)},e.parse=function(r){var n=new hAe,a=[];return n.parse(r,a),n.finish(a),a},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(JC),fAe=((sA={})[je.MOVE_TO]=2,sA[je.LINE_TO]=2,sA[je.HORIZ_LINE_TO]=1,sA[je.VERT_LINE_TO]=1,sA[je.CLOSE_PATH]=0,sA[je.QUAD_TO]=4,sA[je.SMOOTH_QUAD_TO]=2,sA[je.CURVE_TO]=6,sA[je.SMOOTH_CURVE_TO]=4,sA[je.ARC]=7,sA),dAe=_n,gAe=iA,pAe=Af,mAe=S5,e4=RegExp.prototype,yAe=function(t){var e=t.flags;return e===void 0&&!("flags"in e4)&&!gAe(t,"flags")&&pAe(e4,t)?dAe(mAe,t):e},vAe=ff.PROPER,wAe=Lo,BAe=On,t4=UA,xAe=Vr,bAe=yAe,Xp="toString",CAe=RegExp.prototype,r4=CAe[Xp],EAe=xAe(function(){return r4.call({source:"a",flags:"b"})!="/a/b"}),_Ae=vAe&&r4.name!=Xp;(EAe||_Ae)&&wAe(RegExp.prototype,Xp,function(){var e=BAe(this),r=t4(e.source),n=t4(bAe(e));return"/"+r+"/"+n},{unsafe:!0});function zf(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zf=function(e){return typeof e}:zf=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zf(t)}function FAe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var SAe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],kAe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function TAe(t,e,r,n,a){if(typeof t=="string"&&(t=document.getElementById(t)),!t||zf(t)!=="object"||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var A=t.getContext("2d");try{return A.getImageData(e,r,n,a)}catch(o){throw new Error("unable to access image data: "+o)}}function NAe(t,e,r,n,a,A){if(!(isNaN(A)||A<1)){A|=0;var o=TAe(t,e,r,n,a);o=LAe(o,e,r,n,a,A),t.getContext("2d").putImageData(o,e,r)}}function LAe(t,e,r,n,a,A){for(var o=t.data,s=2*A+1,l=n-1,c=a-1,u=A+1,p=u*(u+1)/2,h=new n4,d=h,w,g=1;g<s;g++)d=d.next=new n4,g===u&&(w=d);d.next=h;for(var y=null,m=null,F=0,N=0,Q=SAe[A],z=kAe[A],R=0;R<a;R++){d=h;for(var I=o[N],U=o[N+1],O=o[N+2],q=o[N+3],T=0;T<u;T++)d.r=I,d.g=U,d.b=O,d.a=q,d=d.next;for(var L=0,G=0,Y=0,se=0,he=u*I,ge=u*U,re=u*O,le=u*q,fe=p*I,Ue=p*U,b=p*O,_=p*q,B=1;B<u;B++){var x=N+((l<B?l:B)<<2),S=o[x],D=o[x+1],W=o[x+2],ue=o[x+3],Ce=u-B;fe+=(d.r=S)*Ce,Ue+=(d.g=D)*Ce,b+=(d.b=W)*Ce,_+=(d.a=ue)*Ce,L+=S,G+=D,Y+=W,se+=ue,d=d.next}y=h,m=w;for(var de=0;de<n;de++){var ke=_*Q>>z;if(o[N+3]=ke,ke!==0){var ne=255/ke;o[N]=(fe*Q>>z)*ne,o[N+1]=(Ue*Q>>z)*ne,o[N+2]=(b*Q>>z)*ne}else o[N]=o[N+1]=o[N+2]=0;fe-=he,Ue-=ge,b-=re,_-=le,he-=y.r,ge-=y.g,re-=y.b,le-=y.a;var Ee=de+A+1;Ee=F+(Ee<l?Ee:l)<<2,L+=y.r=o[Ee],G+=y.g=o[Ee+1],Y+=y.b=o[Ee+2],se+=y.a=o[Ee+3],fe+=L,Ue+=G,b+=Y,_+=se,y=y.next;var xe=m,te=xe.r,Pe=xe.g,rt=xe.b,Ve=xe.a;he+=te,ge+=Pe,re+=rt,le+=Ve,L-=te,G-=Pe,Y-=rt,se-=Ve,m=m.next,N+=4}F+=n}for(var We=0;We<n;We++){N=We<<2;var Ye=o[N],Je=o[N+1],ot=o[N+2],at=o[N+3],ft=u*Ye,yt=u*Je,kt=u*ot,Nt=u*at,dt=p*Ye,xt=p*Je,tt=p*ot,ir=p*at;d=h;for(var Lt=0;Lt<u;Lt++)d.r=Ye,d.g=Je,d.b=ot,d.a=at,d=d.next;for(var fr=n,Qt=0,Kt=0,Jr=0,Rt=0,_r=1;_r<=A;_r++){N=fr+We<<2;var Yt=u-_r;dt+=(d.r=Ye=o[N])*Yt,xt+=(d.g=Je=o[N+1])*Yt,tt+=(d.b=ot=o[N+2])*Yt,ir+=(d.a=at=o[N+3])*Yt,Rt+=Ye,Qt+=Je,Kt+=ot,Jr+=at,d=d.next,_r<c&&(fr+=n)}N=We,y=h,m=w;for(var on=0;on<a;on++){var Et=N<<2;o[Et+3]=at=ir*Q>>z,at>0?(at=255/at,o[Et]=(dt*Q>>z)*at,o[Et+1]=(xt*Q>>z)*at,o[Et+2]=(tt*Q>>z)*at):o[Et]=o[Et+1]=o[Et+2]=0,dt-=ft,xt-=yt,tt-=kt,ir-=Nt,ft-=y.r,yt-=y.g,kt-=y.b,Nt-=y.a,Et=We+((Et=on+u)<c?Et:c)*n<<2,dt+=Rt+=y.r=o[Et],xt+=Qt+=y.g=o[Et+1],tt+=Kt+=y.b=o[Et+2],ir+=Jr+=y.a=o[Et+3],y=y.next,ft+=Ye=m.r,yt+=Je=m.g,kt+=ot=m.b,Nt+=at=m.a,Rt-=Ye,Qt-=Je,Kt-=ot,Jr-=at,m=m.next,N+=n}}return t}var n4=function t(){FAe(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function UAe(){var{DOMParser:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas(r,n){return new OffscreenCanvas(r,n)},createImage(r){return ni(function*(){var n=yield fetch(r),a=yield n.blob(),A=yield createImageBitmap(a);return A})()}};return(typeof DOMParser<"u"||typeof t>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function IAe(t){var{DOMParser:e,canvas:r,fetch:n}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:r.createCanvas,createImage:r.loadImage}}var DAe=Object.freeze({__proto__:null,offscreen:UAe,node:IAe});function Po(t){return t.replace(/(?!\u3000)\s+/gm," ")}function a4(t){return t.replace(/^[\n \t]+/,"")}function A4(t){return t.replace(/[\n \t]+$/,"")}function ia(t){var e=(t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var QAe=/^[A-Z-]+$/;function i4(t){return QAe.test(t)?t.toLowerCase():t}function qp(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function o4(t){if(!t.startsWith("rgb"))return t;var e=3,r=t.replace(/\d+(\.\d+)?/g,(n,a)=>e--&&a?String(Math.round(parseFloat(n))):n);return r}var OAe=/(\[[^\]]+\])/g,PAe=/(#[^\s+>~.[:]+)/g,MAe=/(\.[^\s+>~.[:]+)/g,RAe=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,HAe=/(:[\w-]+\([^)]*\))/gi,VAe=/(:[^\s+>~.[:]+)/g,$Ae=/([^\s+>~.[:]+)/g;function Mo(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function s4(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[r,n]=Mo(r,OAe),e[1]+=n,[r,n]=Mo(r,PAe),e[0]+=n,[r,n]=Mo(r,MAe),e[1]+=n,[r,n]=Mo(r,RAe),e[2]+=n,[r,n]=Mo(r,HAe),e[1]+=n,[r,n]=Mo(r,VAe),e[1]+=n,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,n]=Mo(r,$Ae),e[2]+=n,e.join("")}var Ro=1e-8;function Yp(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Kf(t,e){return(t[0]*e[0]+t[1]*e[1])/(Yp(t)*Yp(e))}function Jp(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Kf(t,e))}function Zp(t){return t*t*t}function em(t){return 3*t*t*(1-t)}function tm(t){return 3*t*(1-t)*(1-t)}function rm(t){return(1-t)*(1-t)*(1-t)}function nm(t){return t*t}function am(t){return 2*t*(1-t)}function Am(t){return(1-t)*(1-t)}class pt{constructor(e,r,n){this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}static empty(e){return new pt(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:r,name:n}=this;return Po(this.getString()).trim().split(e).map(a=>new pt(r,n,a))}hasValue(e){var{value:r}=this;return r!==null&&r!==""&&(e||r!==0)&&typeof r<"u"}isString(e){var{value:r}=this,n=typeof r=="string";return!n||!e?n:e.test(r)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:r}=this,n=parseFloat(r);return this.isString(/%$/)&&(n/=100),n}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var r=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=o4(r),this.value=r),r}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[n,a]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:A}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(A.computeSize("x"),A.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(A.computeSize("x"),A.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*A.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*A.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&a):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*A.computeSize(n);default:{var o=this.getNumber();return r&&o<1?o*A.computeSize(n):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),r=/#([^)'"]+)/.exec(e);return r&&(r=r[1]),r||(r=e),this.document.definitions[r]}getFillStyleDefinition(e,r){var n=this.getDefinition();if(!n)return null;if(typeof n.createGradient=="function")return n.createGradient(this.document.ctx,e,r);if(typeof n.createPattern=="function"){if(n.getHrefAttribute().hasValue()){var a=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),a.hasValue()&&n.getAttribute("patternTransform",!0).setValue(a.value)}return n.createPattern(this.document.ctx,e,r)}return null}getTextBaseline(){return this.hasValue()?pt.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var r=this.getColor(),n=r.length,a=0,A=0;A<n&&(r[A]===","&&a++,a!==3);A++);if(e.hasValue()&&this.isString()&&a!==3){var o=new Kp(r);o.ok&&(o.alpha=e.getNumber(),r=o.toRGBA())}return new pt(this.document,this.name,r)}}pt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class l4{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,r){this.viewPorts.push({width:e,height:r})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Ur{constructor(e,r){this.x=e,this.y=r}static parse(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[n=r,a=r]=ia(e);return new Ur(n,a)}static parseScale(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=r,a=n]=ia(e);return new Ur(n,a)}static parsePath(e){for(var r=ia(e),n=r.length,a=[],A=0;A<n;A+=2)a.push(new Ur(r[A],r[A+1]));return a}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:r,y:n}=this,a=r*e[0]+n*e[2]+e[4],A=r*e[1]+n*e[3]+e[5];this.x=a,this.y=A}}class c4{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:r,onMouseMove:n}=this,a=e.ctx.canvas;a.onclick=r,a.onmousemove=n,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:r,eventElements:n}=this,{style:a}=e.ctx.canvas;a&&(a.cursor=""),r.forEach((A,o)=>{for(var{run:s}=A,l=n[o];l;)s(l),l=l.parent}),this.events=[],this.eventElements=[]}}checkPath(e,r){if(!(!this.working||!r)){var{events:n,eventElements:a}=this;n.forEach((A,o)=>{var{x:s,y:l}=A;!a[o]&&r.isPointInPath&&r.isPointInPath(s,l)&&(a[o]=e)})}}checkBoundingBox(e,r){if(!(!this.working||!r)){var{events:n,eventElements:a}=this;n.forEach((A,o)=>{var{x:s,y:l}=A;!a[o]&&r.isPointInBox(s,l)&&(a[o]=e)})}}mapXY(e,r){for(var{window:n,ctx:a}=this.screen,A=new Ur(e,r),o=a.canvas;o;)A.x-=o.offsetLeft,A.y-=o.offsetTop,o=o.offsetParent;return n.scrollX&&(A.x+=n.scrollX),n.scrollY&&(A.y+=n.scrollY),A}onClick(e){var{x:r,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:r,y:n,run(a){a.onClick&&a.onClick()}})}onMouseMove(e){var{x:r,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:r,y:n,run(a){a.onMouseMove&&a.onMouseMove()}})}}var u4=typeof window<"u"?window:null,h4=typeof fetch<"u"?fetch.bind(void 0):null;class Nc{constructor(e){var{fetch:r=h4,window:n=u4}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new l4,this.mouse=new c4(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,this.fetch=r}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(r=>r());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:r,ctx:n,aspectRatio:a,width:A,desiredWidth:o,height:s,desiredHeight:l,minX:c=0,minY:u=0,refX:p,refY:h,clip:d=!1,clipX:w=0,clipY:g=0}=e,y=Po(a).replace(/^defer\s/,""),[m,F]=y.split(" "),N=m||"xMidYMid",Q=F||"meet",z=A/o,R=s/l,I=Math.min(z,R),U=Math.max(z,R),O=o,q=l;Q==="meet"&&(O*=I,q*=I),Q==="slice"&&(O*=U,q*=U);var T=new pt(r,"refX",p),L=new pt(r,"refY",h),G=T.hasValue()&&L.hasValue();if(G&&n.translate(-I*T.getPixels("x"),-I*L.getPixels("y")),d){var Y=I*w,se=I*g;n.beginPath(),n.moveTo(Y,se),n.lineTo(A,se),n.lineTo(A,s),n.lineTo(Y,s),n.closePath(),n.clip()}if(!G){var he=Q==="meet"&&I===R,ge=Q==="slice"&&U===R,re=Q==="meet"&&I===z,le=Q==="slice"&&U===z;N.startsWith("xMid")&&(he||ge)&&n.translate(A/2-O/2,0),N.endsWith("YMid")&&(re||le)&&n.translate(0,s/2-q/2),N.startsWith("xMax")&&(he||ge)&&n.translate(A-O,0),N.endsWith("YMax")&&(re||le)&&n.translate(0,s-q)}switch(!0){case N==="none":n.scale(z,R);break;case Q==="meet":n.scale(I,I);break;case Q==="slice":n.scale(U,U);break}n.translate(-c,-u)}start(e){var{enableRedraw:r=!1,ignoreMouse:n=!1,ignoreAnimation:a=!1,ignoreDimensions:A=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:l,scaleHeight:c,offsetX:u,offsetY:p}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:h,mouse:d}=this,w=1e3/h;if(this.frameDuration=w,this.readyPromise=new Promise(N=>{this.resolveReady=N}),this.isReady()&&this.render(e,A,o,l,c,u,p),!!r){var g=Date.now(),y=g,m=0,F=()=>{g=Date.now(),m=g-y,m>=w&&(y=g-m%w,this.shouldUpdate(a,s)&&(this.render(e,A,o,l,c,u,p),d.runEvents())),this.intervalId=Vp(F)};n||d.start(),this.intervalId=Vp(F)}}stop(){this.intervalId&&(Vp.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,r){if(!e){var{frameDuration:n}=this,a=this.animations.reduce((A,o)=>o.update(n)||A,!1);if(a)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,r,n,a,A,o,s){var{CLIENT_WIDTH:l,CLIENT_HEIGHT:c,viewPort:u,ctx:p,isFirstRender:h}=this,d=p.canvas;u.clear(),d.width&&d.height?u.setCurrent(d.width,d.height):u.setCurrent(l,c);var w=e.getStyle("width"),g=e.getStyle("height");!r&&(h||typeof a!="number"&&typeof A!="number")&&(w.hasValue()&&(d.width=w.getPixels("x"),d.style&&(d.style.width="".concat(d.width,"px"))),g.hasValue()&&(d.height=g.getPixels("y"),d.style&&(d.style.height="".concat(d.height,"px"))));var y=d.clientWidth||d.width,m=d.clientHeight||d.height;if(r&&w.hasValue()&&g.hasValue()&&(y=w.getPixels("x"),m=g.getPixels("y")),u.setCurrent(y,m),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof a=="number"||typeof A=="number"){var F=ia(e.getAttribute("viewBox").getString()),N=0,Q=0;if(typeof a=="number"){var z=e.getStyle("width");z.hasValue()?N=z.getPixels("x")/a:isNaN(F[2])||(N=F[2]/a)}if(typeof A=="number"){var R=e.getStyle("height");R.hasValue()?Q=R.getPixels("y")/A:isNaN(F[3])||(Q=F[3]/A)}N||(N=Q),Q||(Q=N),e.getAttribute("width",!0).setValue(a),e.getAttribute("height",!0).setValue(A);var I=e.getStyle("transform",!0,!0);I.setValue("".concat(I.getString()," scale(").concat(1/N,", ").concat(1/Q,")"))}n||p.clearRect(0,0,y,m),e.render(p),h&&(this.isFirstRender=!1)}}Nc.defaultWindow=u4,Nc.defaultFetch=h4;var{defaultFetch:zAe}=Nc,KAe=typeof DOMParser<"u"?DOMParser:null;class Gf{constructor(){var{fetch:e=zAe,DOMParser:r=KAe}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=r}parse(e){var r=this;return ni(function*(){return e.startsWith("<")?r.parseFromString(e):r.load(e)})()}parseFromString(e){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(e,"text/xml"))}}checkDocument(e){var r=e.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return e}load(e){var r=this;return ni(function*(){var n=yield r.fetch(e),a=yield n.text();return r.parseFromString(a)})()}}class f4{constructor(e,r){this.type="translate",this.point=null,this.point=Ur.parse(r)}apply(e){var{x:r,y:n}=this.point;e.translate(r||0,n||0)}unapply(e){var{x:r,y:n}=this.point;e.translate(-1*r||0,-1*n||0)}applyToPoint(e){var{x:r,y:n}=this.point;e.applyTransform([1,0,0,1,r||0,n||0])}}class d4{constructor(e,r,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var a=ia(r);this.angle=new pt(e,"angle",a[0]),this.originX=n[0],this.originY=n[1],this.cx=a[1]||0,this.cy=a[2]||0}apply(e){var{cx:r,cy:n,originX:a,originY:A,angle:o}=this,s=r+a.getPixels("x"),l=n+A.getPixels("y");e.translate(s,l),e.rotate(o.getRadians()),e.translate(-s,-l)}unapply(e){var{cx:r,cy:n,originX:a,originY:A,angle:o}=this,s=r+a.getPixels("x"),l=n+A.getPixels("y");e.translate(s,l),e.rotate(-1*o.getRadians()),e.translate(-s,-l)}applyToPoint(e){var{cx:r,cy:n,angle:a}=this,A=a.getRadians();e.applyTransform([1,0,0,1,r||0,n||0]),e.applyTransform([Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0]),e.applyTransform([1,0,0,1,-r||0,-n||0])}}class g4{constructor(e,r,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var a=Ur.parseScale(r);(a.x===0||a.y===0)&&(a.x=Ro,a.y=Ro),this.scale=a,this.originX=n[0],this.originY=n[1]}apply(e){var{scale:{x:r,y:n},originX:a,originY:A}=this,o=a.getPixels("x"),s=A.getPixels("y");e.translate(o,s),e.scale(r,n||r),e.translate(-o,-s)}unapply(e){var{scale:{x:r,y:n},originX:a,originY:A}=this,o=a.getPixels("x"),s=A.getPixels("y");e.translate(o,s),e.scale(1/r,1/n||r),e.translate(-o,-s)}applyToPoint(e){var{x:r,y:n}=this.scale;e.applyTransform([r||0,0,0,n||0,0,0])}}class im{constructor(e,r,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ia(r),this.originX=n[0],this.originY=n[1]}apply(e){var{originX:r,originY:n,matrix:a}=this,A=r.getPixels("x"),o=n.getPixels("y");e.translate(A,o),e.transform(a[0],a[1],a[2],a[3],a[4],a[5]),e.translate(-A,-o)}unapply(e){var{originX:r,originY:n,matrix:a}=this,A=a[0],o=a[2],s=a[4],l=a[1],c=a[3],u=a[5],p=0,h=0,d=1,w=1/(A*(c*d-u*h)-o*(l*d-u*p)+s*(l*h-c*p)),g=r.getPixels("x"),y=n.getPixels("y");e.translate(g,y),e.transform(w*(c*d-u*h),w*(u*p-l*d),w*(s*h-o*d),w*(A*d-s*p),w*(o*u-s*c),w*(s*l-A*u)),e.translate(-g,-y)}applyToPoint(e){e.applyTransform(this.matrix)}}class om extends im{constructor(e,r,n){super(e,r,n),this.type="skew",this.angle=null,this.angle=new pt(e,"angle",r)}}class p4 extends om{constructor(e,r,n){super(e,r,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class m4 extends om{constructor(e,r,n){super(e,r,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function GAe(t){return Po(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function jAe(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}class $i{constructor(e,r,n){this.document=e,this.transforms=[];var a=GAe(r);a.forEach(A=>{if(A!=="none"){var[o,s]=jAe(A),l=$i.transformTypes[o];typeof l<"u"&&this.transforms.push(new l(this.document,s,n))}})}static fromElement(e,r){var n=r.getStyle("transform",!1,!0),[a,A=a]=r.getStyle("transform-origin",!1,!0).split(),o=[a,A];return n.hasValue()?new $i(e,n.getString(),o):null}apply(e){for(var{transforms:r}=this,n=r.length,a=0;a<n;a++)r[a].apply(e)}unapply(e){for(var{transforms:r}=this,n=r.length,a=n-1;a>=0;a--)r[a].unapply(e)}applyToPoint(e){for(var{transforms:r}=this,n=r.length,a=0;a<n;a++)r[a].applyToPoint(e)}}$i.transformTypes={translate:f4,rotate:d4,scale:g4,matrix:im,skewX:p4,skewY:m4};class pr{constructor(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=r,this.captureTextNodes=n,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!r||r.nodeType!==1)){if(Array.from(r.attributes).forEach(s=>{var l=i4(s.nodeName);this.attributes[l]=new pt(e,l,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map(s=>s.trim());a.forEach(s=>{if(s){var[l,c]=s.split(":").map(u=>u.trim());this.styles[l]=new pt(e,l,c)}})}var{definitions:A}=e,o=this.getAttribute("id");o.hasValue()&&(A[o.getString()]||(A[o.getString()]=this)),Array.from(r.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(n&&(s.nodeType===3||s.nodeType===4)){var l=e.createTextNode(s);l.getText().length>0&&this.addChild(l)}})}}getAttribute(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.attributes[e];if(!n&&r){var a=new pt(this.document,e,"");return this.attributes[e]=a,a}return n||pt.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return pt.empty(this.document)}getStyle(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.styles[e];if(a)return a;var A=this.getAttribute(e);if(A!=null&&A.hasValue())return this.styles[e]=A,A;if(!n){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(r){var l=new pt(this.document,e,"");return this.styles[e]=l,l}return a||pt.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var n=this.getStyle("filter").getDefinition();n&&(this.applyEffects(e),n.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var r=$i.fromElement(this.document,this);r&&r.apply(e);var n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){var a=n.getDefinition();a&&a.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(r=>{r.render(e)})}addChild(e){var r=e instanceof pr?e:this.document.createElement(e);r.parent=this,pr.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(e){var r,{node:n}=this;if(typeof n.matches=="function")return n.matches(e);var a=(r=n.getAttribute)===null||r===void 0?void 0:r.call(n,"class");return!a||a===""?!1:a.split(" ").some(A=>".".concat(A)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:r}=this.document;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var a=e[n],A=r[n];if(a)for(var o in a){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),A>=s&&(this.styles[o]=a[o],this.stylesSpecificity[o]=A)}}}removeStyles(e,r){var n=r.reduce((a,A)=>{var o=e.getStyle(A);if(!o.hasValue())return a;var s=o.getString();return o.setValue(""),[...a,[A,s]]},[]);return n}restoreStyles(e,r){r.forEach(n=>{var[a,A]=n;e.getStyle(a,!0).setValue(A)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}pr.ignoreChildTypes=["title"];class y4 extends pr{constructor(e,r,n){super(e,r,n)}}function WAe(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function XAe(t){return typeof process>"u"?t:t.trim().split(",").map(WAe).join(",")}function qAe(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function YAe(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class Pn{constructor(e,r,n,a,A,o){var s=o?typeof o=="string"?Pn.parse(o):o:{};this.fontFamily=A||s.fontFamily,this.fontSize=a||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=n||s.fontWeight,this.fontVariant=r||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",a="",A="",o="",s="",l=Po(e).trim().split(" "),c={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return l.forEach(u=>{switch(!0){case(!c.fontStyle&&Pn.styles.includes(u)):u!=="inherit"&&(n=u),c.fontStyle=!0;break;case(!c.fontVariant&&Pn.variants.includes(u)):u!=="inherit"&&(a=u),c.fontStyle=!0,c.fontVariant=!0;break;case(!c.fontWeight&&Pn.weights.includes(u)):u!=="inherit"&&(A=u),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0;break;case!c.fontSize:u!=="inherit"&&([o]=u.split("/")),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0,c.fontSize=!0;break;default:u!=="inherit"&&(s+=u)}}),new Pn(n,a,A,o,s,r)}toString(){return[qAe(this.fontStyle),this.fontVariant,YAe(this.fontWeight),this.fontSize,XAe(this.fontFamily)].join(" ").trim()}}Pn.styles="normal|italic|oblique|inherit",Pn.variants="normal|small-caps|inherit",Pn.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Oa{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=n,this.y2=a,this.addPoint(e,r),this.addPoint(n,a)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,r){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:r,y1:n,x2:a,y2:A}=e;this.addPoint(r,n),this.addPoint(a,A)}}sumCubic(e,r,n,a,A){return Math.pow(1-e,3)*r+3*Math.pow(1-e,2)*e*n+3*(1-e)*Math.pow(e,2)*a+Math.pow(e,3)*A}bezierCurveAdd(e,r,n,a,A){var o=6*r-12*n+6*a,s=-3*r+9*n-9*a+3*A,l=3*n-3*r;if(s===0){if(o===0)return;var c=-l/o;0<c&&c<1&&(e?this.addX(this.sumCubic(c,r,n,a,A)):this.addY(this.sumCubic(c,r,n,a,A)));return}var u=Math.pow(o,2)-4*l*s;if(!(u<0)){var p=(-o+Math.sqrt(u))/(2*s);0<p&&p<1&&(e?this.addX(this.sumCubic(p,r,n,a,A)):this.addY(this.sumCubic(p,r,n,a,A)));var h=(-o-Math.sqrt(u))/(2*s);0<h&&h<1&&(e?this.addX(this.sumCubic(h,r,n,a,A)):this.addY(this.sumCubic(h,r,n,a,A)))}}addBezierCurve(e,r,n,a,A,o,s,l){this.addPoint(e,r),this.addPoint(s,l),this.bezierCurveAdd(!0,e,n,A,s),this.bezierCurveAdd(!1,r,a,o,l)}addQuadraticCurve(e,r,n,a,A,o){var s=e+.6666666666666666*(n-e),l=r+2/3*(a-r),c=s+1/3*(A-e),u=l+1/3*(o-r);this.addBezierCurve(e,r,s,c,l,u,A,o)}isPointInBox(e,r){var{x1:n,y1:a,x2:A,y2:o}=this;return n<=e&&e<=A&&a<=r&&r<=o}}class Tt extends je{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Ur(0,0),this.control=new Ur(0,0),this.current=new Ur(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:r}=this;return e>=r.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",n=new Ur(this.command[e],this.command[r]);return this.makeAbsolute(n)}getAsControlPoint(e,r){var n=this.getPoint(e,r);return this.control=n,n}getAsCurrentPoint(e,r){var n=this.getPoint(e,r);return this.current=n,n}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==je.CURVE_TO&&e!==je.SMOOTH_CURVE_TO&&e!==je.QUAD_TO&&e!==je.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:n},control:{x:a,y:A}}=this,o=new Ur(2*r-a,2*n-A);return o}makeAbsolute(e){if(this.command.relative){var{x:r,y:n}=this.current;e.x+=r,e.y+=n}return e}addMarker(e,r,n){var{points:a,angles:A}=this;n&&A.length>0&&!A[A.length-1]&&(A[A.length-1]=a[a.length-1].angleTo(n)),this.addMarkerAngle(e,r?r.angleTo(e):null)}addMarkerAngle(e,r){this.points.push(e),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,r=e.length,n=0;n<r;n++)if(!e[n]){for(var a=n+1;a<r;a++)if(e[a]){e[n]=e[a];break}}return e}}class zi extends pr{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,r=this;r;){var n=r.getStyle("opacity",!1,!0);n.hasValue(!0)&&(e*=n.getNumber()),r=r.parent}return e}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r){var n=this.getStyle("fill"),a=this.getStyle("fill-opacity"),A=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var s=n.getFillStyleDefinition(this,a);s&&(e.fillStyle=s)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var l=n.getColor();l!=="inherit"&&(e.fillStyle=l==="none"?"rgba(0,0,0,0)":l)}if(a.hasValue()){var c=new pt(this.document,"fill",e.fillStyle).addOpacity(a).getColor();e.fillStyle=c}if(A.isUrlDefinition()){var u=A.getFillStyleDefinition(this,o);u&&(e.strokeStyle=u)}else if(A.hasValue()){A.getString()==="currentColor"&&A.setValue(this.getStyle("color").getColor());var p=A.getString();p!=="inherit"&&(e.strokeStyle=p==="none"?"rgba(0,0,0,0)":p)}if(o.hasValue()){var h=new pt(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=h}var d=this.getStyle("stroke-width");if(d.hasValue()){var w=d.getPixels();e.lineWidth=w||Ro}var g=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),F=this.getStyle("stroke-dasharray"),N=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(e.lineCap=g.getString()),y.hasValue()&&(e.lineJoin=y.getString()),m.hasValue()&&(e.miterLimit=m.getNumber()),F.hasValue()&&F.getString()!=="none"){var Q=ia(F.getString());typeof e.setLineDash<"u"?e.setLineDash(Q):typeof e.webkitLineDash<"u"?e.webkitLineDash=Q:typeof e.mozDash<"u"&&!(Q.length===1&&Q[0]===0)&&(e.mozDash=Q);var z=N.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=z:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=z:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=z)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var R=this.getStyle("font"),I=this.getStyle("font-style"),U=this.getStyle("font-variant"),O=this.getStyle("font-weight"),q=this.getStyle("font-size"),T=this.getStyle("font-family"),L=new Pn(I.getString(),U.getString(),O.getString(),q.hasValue()?"".concat(q.getPixels(!0),"px"):"",T.getString(),Pn.parse(R.getString(),e.font));I.setValue(L.fontStyle),U.setValue(L.fontVariant),O.setValue(L.fontWeight),q.setValue(L.fontSize),T.setValue(L.fontFamily),e.font=L.toString(),q.isPixels()&&(this.document.emSize=q.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class tr extends zi{constructor(e,r,n){super(e,r,n),this.type="path",this.pathParser=null,this.pathParser=new Tt(this.getAttribute("d").getString())}path(e){var{pathParser:r}=this,n=new Oa;for(r.reset(),e&&e.beginPath();!r.isEnd();)switch(r.next().type){case Tt.MOVE_TO:this.pathM(e,n);break;case Tt.LINE_TO:this.pathL(e,n);break;case Tt.HORIZ_LINE_TO:this.pathH(e,n);break;case Tt.VERT_LINE_TO:this.pathV(e,n);break;case Tt.CURVE_TO:this.pathC(e,n);break;case Tt.SMOOTH_CURVE_TO:this.pathS(e,n);break;case Tt.QUAD_TO:this.pathQ(e,n);break;case Tt.SMOOTH_QUAD_TO:this.pathT(e,n);break;case Tt.ARC:this.pathA(e,n);break;case Tt.CLOSE_PATH:this.pathZ(e,n);break}return n}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,r=e.getMarkerPoints(),n=e.getMarkerAngles(),a=r.map((A,o)=>[A,n[o]]);return a}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var r=this.getStyle("fill-rule");e.fillStyle!==""&&(r.getString("inherit")!=="inherit"?e.fill(r.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var a=n.length-1,A=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(A.isUrlDefinition()){var l=A.getDefinition(),[c,u]=n[0];l.render(e,c,u)}if(o.isUrlDefinition())for(var p=o.getDefinition(),h=1;h<a;h++){var[d,w]=n[h];p.render(e,d,w)}if(s.isUrlDefinition()){var g=s.getDefinition(),[y,m]=n[a];g.render(e,y,m)}}}static pathM(e){var r=e.getAsCurrentPoint();return e.start=e.current,{point:r}}pathM(e,r){var{pathParser:n}=this,{point:a}=tr.pathM(n),{x:A,y:o}=a;n.addMarker(a),r.addPoint(A,o),e&&e.moveTo(A,o)}static pathL(e){var{current:r}=e,n=e.getAsCurrentPoint();return{current:r,point:n}}pathL(e,r){var{pathParser:n}=this,{current:a,point:A}=tr.pathL(n),{x:o,y:s}=A;n.addMarker(A,a),r.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:r,command:n}=e,a=new Ur((n.relative?r.x:0)+n.x,r.y);return e.current=a,{current:r,point:a}}pathH(e,r){var{pathParser:n}=this,{current:a,point:A}=tr.pathH(n),{x:o,y:s}=A;n.addMarker(A,a),r.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:r,command:n}=e,a=new Ur(r.x,(n.relative?r.y:0)+n.y);return e.current=a,{current:r,point:a}}pathV(e,r){var{pathParser:n}=this,{current:a,point:A}=tr.pathV(n),{x:o,y:s}=A;n.addMarker(A,a),r.addPoint(o,s),e&&e.lineTo(o,s)}static pathC(e){var{current:r}=e,n=e.getPoint("x1","y1"),a=e.getAsControlPoint("x2","y2"),A=e.getAsCurrentPoint();return{current:r,point:n,controlPoint:a,currentPoint:A}}pathC(e,r){var{pathParser:n}=this,{current:a,point:A,controlPoint:o,currentPoint:s}=tr.pathC(n);n.addMarker(s,o,A),r.addBezierCurve(a.x,a.y,A.x,A.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(A.x,A.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:r}=e,n=e.getReflectedControlPoint(),a=e.getAsControlPoint("x2","y2"),A=e.getAsCurrentPoint();return{current:r,point:n,controlPoint:a,currentPoint:A}}pathS(e,r){var{pathParser:n}=this,{current:a,point:A,controlPoint:o,currentPoint:s}=tr.pathS(n);n.addMarker(s,o,A),r.addBezierCurve(a.x,a.y,A.x,A.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(A.x,A.y,o.x,o.y,s.x,s.y)}static pathQ(e){var{current:r}=e,n=e.getAsControlPoint("x1","y1"),a=e.getAsCurrentPoint();return{current:r,controlPoint:n,currentPoint:a}}pathQ(e,r){var{pathParser:n}=this,{current:a,controlPoint:A,currentPoint:o}=tr.pathQ(n);n.addMarker(o,A,A),r.addQuadraticCurve(a.x,a.y,A.x,A.y,o.x,o.y),e&&e.quadraticCurveTo(A.x,A.y,o.x,o.y)}static pathT(e){var{current:r}=e,n=e.getReflectedControlPoint();e.control=n;var a=e.getAsCurrentPoint();return{current:r,controlPoint:n,currentPoint:a}}pathT(e,r){var{pathParser:n}=this,{current:a,controlPoint:A,currentPoint:o}=tr.pathT(n);n.addMarker(o,A,A),r.addQuadraticCurve(a.x,a.y,A.x,A.y,o.x,o.y),e&&e.quadraticCurveTo(A.x,A.y,o.x,o.y)}static pathA(e){var{current:r,command:n}=e,{rX:a,rY:A,xRot:o,lArcFlag:s,sweepFlag:l}=n,c=o*(Math.PI/180),u=e.getAsCurrentPoint(),p=new Ur(Math.cos(c)*(r.x-u.x)/2+Math.sin(c)*(r.y-u.y)/2,-Math.sin(c)*(r.x-u.x)/2+Math.cos(c)*(r.y-u.y)/2),h=Math.pow(p.x,2)/Math.pow(a,2)+Math.pow(p.y,2)/Math.pow(A,2);h>1&&(a*=Math.sqrt(h),A*=Math.sqrt(h));var d=(s===l?-1:1)*Math.sqrt((Math.pow(a,2)*Math.pow(A,2)-Math.pow(a,2)*Math.pow(p.y,2)-Math.pow(A,2)*Math.pow(p.x,2))/(Math.pow(a,2)*Math.pow(p.y,2)+Math.pow(A,2)*Math.pow(p.x,2)));isNaN(d)&&(d=0);var w=new Ur(d*a*p.y/A,d*-A*p.x/a),g=new Ur((r.x+u.x)/2+Math.cos(c)*w.x-Math.sin(c)*w.y,(r.y+u.y)/2+Math.sin(c)*w.x+Math.cos(c)*w.y),y=Jp([1,0],[(p.x-w.x)/a,(p.y-w.y)/A]),m=[(p.x-w.x)/a,(p.y-w.y)/A],F=[(-p.x-w.x)/a,(-p.y-w.y)/A],N=Jp(m,F);return Kf(m,F)<=-1&&(N=Math.PI),Kf(m,F)>=1&&(N=0),{currentPoint:u,rX:a,rY:A,sweepFlag:l,xAxisRotation:c,centp:g,a1:y,ad:N}}pathA(e,r){var{pathParser:n}=this,{currentPoint:a,rX:A,rY:o,sweepFlag:s,xAxisRotation:l,centp:c,a1:u,ad:p}=tr.pathA(n),h=1-s?1:-1,d=u+h*(p/2),w=new Ur(c.x+A*Math.cos(d),c.y+o*Math.sin(d));if(n.addMarkerAngle(w,d-h*Math.PI/2),n.addMarkerAngle(a,d-h*Math.PI),r.addPoint(a.x,a.y),e&&!isNaN(u)&&!isNaN(p)){var g=A>o?A:o,y=A>o?1:A/o,m=A>o?o/A:1;e.translate(c.x,c.y),e.rotate(l),e.scale(y,m),e.arc(0,0,g,u,u+p,!!(1-s)),e.scale(1/y,1/m),e.rotate(-l),e.translate(-c.x,-c.y)}}static pathZ(e){e.current=e.start}pathZ(e,r){tr.pathZ(this.pathParser),e&&r.x1!==r.x2&&r.y1!==r.y2&&e.closePath()}}class sm extends tr{constructor(e,r,n){super(e,r,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class ii extends zi{constructor(e,r,n){super(e,r,new.target===ii?!0:n),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,r);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(e.textBaseline=n)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var r=null;return this.children.forEach((n,a)=>{var A=this.getChildBoundingBox(e,this,this,a);r?r.addBoundingBox(A):r=A}),r}getFontSize(){var{document:e,parent:r}=this,n=Pn.parse(e.ctx.font).fontSize,a=r.getStyle("font-size").getNumber(n);return a}getTElementBoundingBox(e){var r=this.getFontSize();return new Oa(this.x,this.y-r,this.x+this.measureText(e),this.y)}getGlyph(e,r,n){var a=r[n],A=null;if(e.isArabic){var o=r.length,s=r[n-1],l=r[n+1],c="isolated";if((n===0||s===" ")&&n<o-1&&l!==" "&&(c="terminal"),n>0&&s!==" "&&n<o-1&&l!==" "&&(c="medial"),n>0&&s!==" "&&(n===o-1||l===" ")&&(c="initial"),typeof e.glyphs[a]<"u"){var u=e.glyphs[a];A=u instanceof sm?u:u[c]}}else A=e.glyphs[a];return A||(A=e.missingGlyph),A}getText(){return""}getTextFromNode(e){var r=e||this.node,n=Array.from(r.parentNode.childNodes),a=n.indexOf(r),A=n.length-1,o=Po(r.textContent||"");return a===0&&(o=a4(o)),a===A&&(o=A4(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((n,a)=>{this.renderChild(e,this,this,a)});var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:r,parent:n}=this,a=this.getText(),A=n.getStyle("font-family").getDefinition();if(A){for(var{unitsPerEm:o}=A.fontFace,s=Pn.parse(r.ctx.font),l=n.getStyle("font-size").getNumber(s.fontSize),c=n.getStyle("font-style").getString(s.fontStyle),u=l/o,p=A.isRTL?a.split("").reverse().join(""):a,h=ia(n.getAttribute("dx").getString()),d=p.length,w=0;w<d;w++){var g=this.getGlyph(A,p,w);e.translate(this.x,this.y),e.scale(u,-u);var y=e.lineWidth;e.lineWidth=e.lineWidth*o/l,c==="italic"&&e.transform(1,0,.4,1,0,0),g.render(e),c==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=y,e.scale(1/u,-1/u),e.translate(-this.x,-this.y),this.x+=l*(g.horizAdvX||A.horizAdvX)/o,typeof h[w]<"u"&&!isNaN(h[w])&&(this.x+=h[w])}return}var{x:m,y:F}=this;e.fillStyle&&e.fillText(a,m,F),e.strokeStyle&&e.strokeText(a,m,F)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start"),n=!1,a=0;r==="start"&&!n||r==="end"&&n?a=e.x-this.minX:r==="end"&&!n||r==="start"&&n?a=e.x-this.maxX:a=e.x-(this.minX+this.maxX)/2;for(var A=this.textChunkStart;A<this.leafTexts.length;A++)this.leafTexts[A].x+=a;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((r,n)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,n)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,r,n,a){var A=n.children[a];A.children.length>0?A.children.forEach((o,s)=>{r.adjustChildCoordinatesRecursiveCore(e,r,A,s)}):this.adjustChildCoordinates(e,r,n,a)}adjustChildCoordinates(e,r,n,a){var A=n.children[a];if(typeof A.measureText!="function")return A;e.save(),A.setContext(e,!0);var o=A.getAttribute("x"),s=A.getAttribute("y"),l=A.getAttribute("dx"),c=A.getAttribute("dy"),u=A.getStyle("font-family").getDefinition(),p=!!u&&u.isRTL;a===0&&(o.hasValue()||o.setValue(A.getInheritedAttribute("x")),s.hasValue()||s.setValue(A.getInheritedAttribute("y")),l.hasValue()||l.setValue(A.getInheritedAttribute("dx")),c.hasValue()||c.setValue(A.getInheritedAttribute("dy")));var h=A.measureText(e);return p&&(r.x-=h),o.hasValue()?(r.applyAnchoring(),A.x=o.getPixels("x"),l.hasValue()&&(A.x+=l.getPixels("x"))):(l.hasValue()&&(r.x+=l.getPixels("x")),A.x=r.x),r.x=A.x,p||(r.x+=h),s.hasValue()?(A.y=s.getPixels("y"),c.hasValue()&&(A.y+=c.getPixels("y"))):(c.hasValue()&&(r.y+=c.getPixels("y")),A.y=r.y),r.y=A.y,r.leafTexts.push(A),r.minX=Math.min(r.minX,A.x,A.x+h),r.maxX=Math.max(r.maxX,A.x,A.x+h),A.clearContext(e),e.restore(),A}getChildBoundingBox(e,r,n,a){var A=n.children[a];if(typeof A.getBoundingBox!="function")return null;var o=A.getBoundingBox(e);return o?(A.children.forEach((s,l)=>{var c=r.getChildBoundingBox(e,r,A,l);o.addBoundingBox(c)}),o):null}renderChild(e,r,n,a){var A=n.children[a];A.render(e),A.children.forEach((o,s)=>{r.renderChild(e,r,A,s)})}measureText(e){var{measureCache:r}=this;if(~r)return r;var n=this.getText(),a=this.measureTargetText(e,n);return this.measureCache=a,a}measureTargetText(e,r){if(!r.length)return 0;var{parent:n}=this,a=n.getStyle("font-family").getDefinition();if(a){for(var A=this.getFontSize(),o=a.isRTL?r.split("").reverse().join(""):r,s=ia(n.getAttribute("dx").getString()),l=o.length,c=0,u=0;u<l;u++){var p=this.getGlyph(a,o,u);c+=(p.horizAdvX||a.horizAdvX)*A/a.fontFace.unitsPerEm,typeof s[u]<"u"&&!isNaN(s[u])&&(c+=s[u])}return c}if(!e.measureText)return r.length*10;e.save(),this.setContext(e,!0);var{width:h}=e.measureText(r);return this.clearContext(e),e.restore(),h}getInheritedAttribute(e){for(var r=this;r instanceof ii&&r.isFirstChild();){var n=r.parent.getAttribute(e);if(n.hasValue(!0))return n.getValue("0");r=r.parent}return null}}class Lc extends ii{constructor(e,r,n){super(e,r,new.target===Lc?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class JAe extends Lc{constructor(){super(...arguments),this.type="textNode"}}class Xs extends zi{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var r,{document:n}=this,{screen:a,window:A}=n,o=e.canvas;if(a.setDefaults(e),o.style&&typeof e.font<"u"&&A&&typeof A.getComputedStyle<"u"){e.font=A.getComputedStyle(o).getPropertyValue("font");var s=new pt(n,"fontSize",Pn.parse(e.font).fontSize);s.hasValue()&&(n.rootEmSize=s.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:l,height:c}=a.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var u=this.getAttribute("refX"),p=this.getAttribute("refY"),h=this.getAttribute("viewBox"),d=h.hasValue()?ia(h.getString()):null,w=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,y=0,m=0,F=0;d&&(g=d[0],y=d[1]),this.root||(l=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y"),this.type==="marker"&&(m=g,F=y,g=0,y=0)),a.viewPort.setCurrent(l,c),this.node&&(!this.parent||((r=this.node.parentNode)===null||r===void 0?void 0:r.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),d&&(l=d[2],c=d[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a.viewPort.width,desiredWidth:l,height:a.viewPort.height,desiredHeight:c,minX:g,minY:y,refX:u.getValue(),refY:p.getValue(),clip:w,clipX:m,clipY:F}),d&&(a.viewPort.removeCurrent(),a.viewPort.setCurrent(l,c))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.getAttribute("width",!0),A=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),l=a.getNumber(0),c=A.getNumber(0);if(n)if(typeof n=="string")this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(a.setValue(e),A.setValue(r),o.hasValue()||o.setValue("0 0 ".concat(l||e," ").concat(c||r)),s.hasValue()){var p=this.getStyle("width"),h=this.getStyle("height");p.hasValue()&&p.setValue("".concat(e,"px")),h.hasValue()&&h.setValue("".concat(r,"px"))}}}class lm extends tr{constructor(){super(...arguments),this.type="rect"}path(e){var r=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),a=this.getStyle("width",!1,!0).getPixels("x"),A=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),l=o.getPixels("x"),c=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(c=l),s.hasValue()&&!o.hasValue()&&(l=c),l=Math.min(l,a/2),c=Math.min(c,A/2),e){var u=4*((Math.sqrt(2)-1)/3);e.beginPath(),A>0&&a>0&&(e.moveTo(r+l,n),e.lineTo(r+a-l,n),e.bezierCurveTo(r+a-l+u*l,n,r+a,n+c-u*c,r+a,n+c),e.lineTo(r+a,n+A-c),e.bezierCurveTo(r+a,n+A-c+u*c,r+a-l+u*l,n+A,r+a-l,n+A),e.lineTo(r+l,n+A),e.bezierCurveTo(r+l-u*l,n+A,r,n+A-c+u*c,r,n+A-c),e.lineTo(r,n+c),e.bezierCurveTo(r,n+c-u*c,r+l-u*l,n,r+l,n),e.closePath())}return new Oa(r,n,r+a,n+A)}getMarkers(){return null}}class v4 extends tr{constructor(){super(...arguments),this.type="circle"}path(e){var r=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),a=this.getAttribute("r").getPixels();return e&&a>0&&(e.beginPath(),e.arc(r,n,a,0,Math.PI*2,!1),e.closePath()),new Oa(r-a,n-a,r+a,n+a)}getMarkers(){return null}}class w4 extends tr{constructor(){super(...arguments),this.type="ellipse"}path(e){var r=4*((Math.sqrt(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),a=this.getAttribute("ry").getPixels("y"),A=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&n>0&&a>0&&(e.beginPath(),e.moveTo(A+n,o),e.bezierCurveTo(A+n,o+r*a,A+r*n,o+a,A,o+a),e.bezierCurveTo(A-r*n,o+a,A-n,o+r*a,A-n,o),e.bezierCurveTo(A-n,o-r*a,A-r*n,o-a,A,o-a),e.bezierCurveTo(A+r*n,o-a,A+n,o-r*a,A+n,o),e.closePath()),new Oa(A-n,o-a,A+n,o+a)}getMarkers(){return null}}class B4 extends tr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Ur(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ur(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:r,y:n},{x:a,y:A}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(r,n),e.lineTo(a,A)),new Oa(r,n,a,A)}getMarkers(){var[e,r]=this.getPoints(),n=e.angleTo(r);return[[e,n],[r,n]]}}class cm extends tr{constructor(e,r,n){super(e,r,n),this.type="polyline",this.points=[],this.points=Ur.parsePath(this.getAttribute("points").getString())}path(e){var{points:r}=this,[{x:n,y:a}]=r,A=new Oa(n,a);return e&&(e.beginPath(),e.moveTo(n,a)),r.forEach(o=>{var{x:s,y:l}=o;A.addPoint(s,l),e&&e.lineTo(s,l)}),A}getMarkers(){var{points:e}=this,r=e.length-1,n=[];return e.forEach((a,A)=>{A!==r&&n.push([a,a.angleTo(e[A+1])])}),n.length>0&&n.push([e[e.length-1],n[n.length-1][1]]),n}}class x4 extends cm{constructor(){super(...arguments),this.type="polygon"}path(e){var r=super.path(e),[{x:n,y:a}]=this.points;return e&&(e.lineTo(n,a),e.closePath()),r}}class b4 extends pr{constructor(){super(...arguments),this.type="pattern"}createPattern(e,r,n){var a=this.getStyle("width").getPixels("x",!0),A=this.getStyle("height").getPixels("y",!0),o=new Xs(this.document,null);o.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new pt(this.document,"width","".concat(a,"px")),o.attributes.height=new pt(this.document,"height","".concat(A,"px")),o.attributes.transform=new pt(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(a,A),l=s.getContext("2d"),c=this.getAttribute("x"),u=this.getAttribute("y");c.hasValue()&&u.hasValue()&&l.translate(c.getPixels("x",!0),u.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var p=-1;p<=1;p++)for(var h=-1;h<=1;h++)l.save(),o.attributes.x=new pt(this.document,"x",p*s.width),o.attributes.y=new pt(this.document,"y",h*s.height),o.render(l),l.restore();var d=e.createPattern(s,"repeat");return d}}class C4 extends pr{constructor(){super(...arguments),this.type="marker"}render(e,r,n){if(r){var{x:a,y:A}=r,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(a,A),o==="auto"&&e.rotate(n),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var l=new Xs(this.document,null);l.type=this.type,l.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),l.attributes.refX=new pt(this.document,"refX",this.getAttribute("refX").getValue()),l.attributes.refY=new pt(this.document,"refY",this.getAttribute("refY").getValue()),l.attributes.width=new pt(this.document,"width",this.getAttribute("markerWidth").getValue()),l.attributes.height=new pt(this.document,"height",this.getAttribute("markerHeight").getValue()),l.attributes.overflow=new pt(this.document,"overflow",this.getAttribute("overflow").getValue()),l.attributes.fill=new pt(this.document,"fill",this.getAttribute("fill").getColor("black")),l.attributes.stroke=new pt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),l.children=this.children,l.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-n),e.translate(-a,-A)}}}class E4 extends pr{constructor(){super(...arguments),this.type="defs"}render(){}}class jf extends zi{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var r=new Oa;return this.children.forEach(n=>{r.addBoundingBox(n.getBoundingBox(e))}),r}}class um extends pr{constructor(e,r,n){super(e,r,n),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:a,children:A}=this;A.forEach(o=>{o.type==="stop"&&a.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,r,n){var a=this;this.getHrefAttribute().hasValue()&&(a=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(a));var{stops:A}=a,o=this.getGradient(e,r);if(!o)return this.addParentOpacity(n,A[A.length-1].color);if(A.forEach(y=>{o.addColorStop(y.offset,this.addParentOpacity(n,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:l,viewPort:c}=s.screen,[u]=c.viewPorts,p=new lm(s,null);p.attributes.x=new pt(s,"x",-l/3),p.attributes.y=new pt(s,"y",-l/3),p.attributes.width=new pt(s,"width",l),p.attributes.height=new pt(s,"height",l);var h=new jf(s,null);h.attributes.transform=new pt(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[p];var d=new Xs(s,null);d.attributes.x=new pt(s,"x",0),d.attributes.y=new pt(s,"y",0),d.attributes.width=new pt(s,"width",u.width),d.attributes.height=new pt(s,"height",u.height),d.children=[h];var w=s.createCanvas(u.width,u.height),g=w.getContext("2d");return g.fillStyle=o,d.render(g),g.createPattern(w,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(r=>{!this.getAttribute(r).hasValue()&&e.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(e.getAttribute(r).getValue())})}addParentOpacity(e,r){if(e.hasValue()){var n=new pt(this.document,"color",r);return n.addOpacity(e).getColor()}return r}}class _4 extends um{constructor(e,r,n){super(e,r,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,r){var n=this.getGradientUnits()==="objectBoundingBox",a=n?r.getBoundingBox(e):null;if(n&&!a)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var A=n?a.x+a.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=n?a.y+a.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=n?a.x+a.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),l=n?a.y+a.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return A===s&&o===l?null:e.createLinearGradient(A,o,s,l)}}class F4 extends um{constructor(e,r,n){super(e,r,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,r){var n=this.getGradientUnits()==="objectBoundingBox",a=r.getBoundingBox(e);if(n&&!a)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var A=n?a.x+a.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?a.y+a.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=A,l=o;this.getAttribute("fx").hasValue()&&(s=n?a.x+a.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(l=n?a.y+a.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var c=n?(a.width+a.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,l,u,A,o,c)}}class S4 extends pr{constructor(e,r,n){super(e,r,n),this.type="stop";var a=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),A=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),A.hasValue()&&(o=o.addOpacity(A)),this.offset=a,this.color=o.getColor()}}class Wf extends pr{constructor(e,r,n){super(e,r,n),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new pt(e,"values",null);var a=this.getAttribute("values");a.hasValue()&&this.values.setValue(a.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:e}=this,{progress:r,from:n,to:a}=this.getProgress(),A=n.getNumber()+(a.getNumber()-n.getNumber())*r;return e==="%"&&(A*=100),"".concat(A).concat(e)}update(e){var{parent:r}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var a=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(a==="freeze"&&!this.frozen)this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=n.getString();else if(a==="remove"&&!this.removed)return this.removed=!0,n.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var A=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var l=s.getString();o="".concat(l,"(").concat(o,")")}n.setValue(o),A=!0}return A}getProgress(){var{document:e,values:r}=this,n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var a=n.progress*(r.getValue().length-1),A=Math.floor(a),o=Math.ceil(a);n.from=new pt(e,"from",parseFloat(r.getValue()[A])),n.to=new pt(e,"to",parseFloat(r.getValue()[o])),n.progress=(a-A)/(o-A)}else n.from=this.from,n.to=this.to;return n}}class k4 extends Wf{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:r,to:n}=this.getProgress(),a=new Kp(r.getColor()),A=new Kp(n.getColor());if(a.ok&&A.ok){var o=a.r+(A.r-a.r)*e,s=a.g+(A.g-a.g)*e,l=a.b+(A.b-a.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(l),")")}return this.getAttribute("from").getColor()}}class T4 extends Wf{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:r,to:n}=this.getProgress(),a=ia(r.getString()),A=ia(n.getString()),o=a.map((s,l)=>{var c=A[l];return s+(c-s)*e}).join(" ");return o}}class N4 extends pr{constructor(e,r,n){super(e,r,n),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:a}=e,{children:A}=this;for(var o of A)switch(o.type){case"font-face":{this.fontFace=o;var s=o.getStyle("font-family");s.hasValue()&&(a[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var l=o;l.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[l.unicode]>"u"&&(this.glyphs[l.unicode]={}),this.glyphs[l.unicode][l.arabicForm]=l):this.glyphs[l.unicode]=l;break}}}render(){}}class L4 extends pr{constructor(e,r,n){super(e,r,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class U4 extends tr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class I4 extends ii{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var r=e.children[0];if(r)return r.getText()}return""}}class D4 extends ii{constructor(e,r,n){super(e,r,n),this.type="a";var{childNodes:a}=r,A=a[0],o=a.length>0&&Array.from(a).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(A):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:r,x:n,y:a}=this,{mouse:A}=r.screen,o=new pt(r,"fontSize",Pn.parse(r.ctx.font).fontSize);A.isWorking()&&A.checkBoundingBox(this,new Oa(n,a-o.getPixels("y"),n+this.measureText(e),a))}else if(this.children.length>0){var s=new jf(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function Q4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Xf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Q4(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}class O4 extends ii{constructor(e,r,n){super(e,r,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var a=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(a)}getText(){return this.text}path(e){var{dataArray:r}=this;e&&e.beginPath(),r.forEach(n=>{var{type:a,points:A}=n;switch(a){case Tt.LINE_TO:e&&e.lineTo(A[0],A[1]);break;case Tt.MOVE_TO:e&&e.moveTo(A[0],A[1]);break;case Tt.CURVE_TO:e&&e.bezierCurveTo(A[0],A[1],A[2],A[3],A[4],A[5]);break;case Tt.QUAD_TO:e&&e.quadraticCurveTo(A[0],A[1],A[2],A[3]);break;case Tt.ARC:{var[o,s,l,c,u,p,h,d]=A,w=l>c?l:c,g=l>c?1:l/c,y=l>c?c/l:1;e&&(e.translate(o,s),e.rotate(h),e.scale(g,y),e.arc(0,0,w,u,u+p,!!(1-d)),e.scale(1/g,1/y),e.rotate(-h),e.translate(-o,-s));break}case Tt.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var r=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:a}=this,A=e.fillStyle;r==="underline"&&e.beginPath(),a.forEach((o,s)=>{var{p0:l,p1:c,rotation:u,text:p}=o;e.save(),e.translate(l.x,l.y),e.rotate(u),e.fillStyle&&e.fillText(p,0,0),e.strokeStyle&&e.strokeText(p,0,0),e.restore(),r==="underline"&&(s===0&&e.moveTo(l.x,l.y+n/8),e.lineTo(c.x,c.y+n/5))}),r==="underline"&&(e.lineWidth=n/20,e.strokeStyle=A,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,r,n,a,A,o,s,l,c){var u=o,p=this.measureText(e,l);l===" "&&r==="justify"&&n<a&&(p+=(a-n)/A),c>-1&&(u+=this.getLetterSpacingAt(c));var h=this.textHeight/20,d=this.getEquidistantPointOnPath(u,h,0),w=this.getEquidistantPointOnPath(u+p,h,0),g={p0:d,p1:w},y=d&&w?Math.atan2(w.y-d.y,w.x-d.x):0;if(s){var m=Math.cos(Math.PI/2+y)*s,F=Math.cos(-y)*s;g.p0=Xf(Xf({},d),{},{x:d.x+m,y:d.y+F}),g.p1=Xf(Xf({},w),{},{x:w.x+m,y:w.y+F})}return u+=p,{offset:u,segment:g,rotation:y}}measureText(e,r){var{measuresCache:n}=this,a=r||this.getText();if(n.has(a))return n.get(a);var A=this.measureTargetText(e,a);return n.set(a,A),A}setTextData(e){if(!this.glyphInfo){var r=this.getText(),n=r.split(""),a=r.split(" ").length-1,A=this.parent.getAttribute("dx").split().map(Q=>Q.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),l=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing"),u=0;!l.hasValue()||l.getValue()==="inherit"?u=c.getPixels():l.hasValue()&&l.getValue()!=="initial"&&l.getValue()!=="unset"&&(u=l.getPixels());var p=[],h=r.length;this.letterSpacingCache=p;for(var d=0;d<h;d++)p.push(typeof A[d]<"u"?A[d]:u);var w=p.reduce((Q,z,R)=>R===0?0:Q+z||0,0),g=this.measureText(e),y=Math.max(g+w,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];var m=this.getPathLength(),F=this.getStyle("startOffset").getNumber(0)*m,N=0;(s==="middle"||s==="center")&&(N=-y/2),(s==="end"||s==="right")&&(N=-y),N+=F,n.forEach((Q,z)=>{var{offset:R,segment:I,rotation:U}=this.findSegmentToFitChar(e,s,y,m,a,N,o,Q,z);N=R,!(!I.p0||!I.p1)&&this.glyphInfo.push({text:n[z],p0:I.p0,p1:I.p1,rotation:U})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var r=[],{pathParser:n}=e;for(n.reset();!n.isEnd();){var{current:a}=n,A=a?a.x:0,o=a?a.y:0,s=n.next(),l=s.type,c=[];switch(s.type){case Tt.MOVE_TO:this.pathM(n,c);break;case Tt.LINE_TO:l=this.pathL(n,c);break;case Tt.HORIZ_LINE_TO:l=this.pathH(n,c);break;case Tt.VERT_LINE_TO:l=this.pathV(n,c);break;case Tt.CURVE_TO:this.pathC(n,c);break;case Tt.SMOOTH_CURVE_TO:l=this.pathS(n,c);break;case Tt.QUAD_TO:this.pathQ(n,c);break;case Tt.SMOOTH_QUAD_TO:l=this.pathT(n,c);break;case Tt.ARC:c=this.pathA(n);break;case Tt.CLOSE_PATH:tr.pathZ(n);break}s.type!==Tt.CLOSE_PATH?r.push({type:l,points:c,start:{x:A,y:o},pathLength:this.calcLength(A,o,l,c)}):r.push({type:Tt.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(e,r){var{x:n,y:a}=tr.pathM(e).point;r.push(n,a)}pathL(e,r){var{x:n,y:a}=tr.pathL(e).point;return r.push(n,a),Tt.LINE_TO}pathH(e,r){var{x:n,y:a}=tr.pathH(e).point;return r.push(n,a),Tt.LINE_TO}pathV(e,r){var{x:n,y:a}=tr.pathV(e).point;return r.push(n,a),Tt.LINE_TO}pathC(e,r){var{point:n,controlPoint:a,currentPoint:A}=tr.pathC(e);r.push(n.x,n.y,a.x,a.y,A.x,A.y)}pathS(e,r){var{point:n,controlPoint:a,currentPoint:A}=tr.pathS(e);return r.push(n.x,n.y,a.x,a.y,A.x,A.y),Tt.CURVE_TO}pathQ(e,r){var{controlPoint:n,currentPoint:a}=tr.pathQ(e);r.push(n.x,n.y,a.x,a.y)}pathT(e,r){var{controlPoint:n,currentPoint:a}=tr.pathT(e);return r.push(n.x,n.y,a.x,a.y),Tt.QUAD_TO}pathA(e){var{rX:r,rY:n,sweepFlag:a,xAxisRotation:A,centp:o,a1:s,ad:l}=tr.pathA(e);return a===0&&l>0&&(l-=2*Math.PI),a===1&&l<0&&(l+=2*Math.PI),[o.x,o.y,r,n,s,l,A,a]}calcLength(e,r,n,a){var A=0,o=null,s=null,l=0;switch(n){case Tt.LINE_TO:return this.getLineLength(e,r,a[0],a[1]);case Tt.CURVE_TO:for(A=0,o=this.getPointOnCubicBezier(0,e,r,a[0],a[1],a[2],a[3],a[4],a[5]),l=.01;l<=1;l+=.01)s=this.getPointOnCubicBezier(l,e,r,a[0],a[1],a[2],a[3],a[4],a[5]),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return A;case Tt.QUAD_TO:for(A=0,o=this.getPointOnQuadraticBezier(0,e,r,a[0],a[1],a[2],a[3]),l=.01;l<=1;l+=.01)s=this.getPointOnQuadraticBezier(l,e,r,a[0],a[1],a[2],a[3]),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return A;case Tt.ARC:{A=0;var c=a[4],u=a[5],p=a[4]+u,h=Math.PI/180;if(Math.abs(c-p)<h&&(h=Math.abs(c-p)),o=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],c,0),u<0)for(l=c-h;l>p;l-=h)s=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],l,0),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(l=c+h;l<p;l+=h)s=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],l,0),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],p,0),A+=this.getLineLength(o.x,o.y,s.x,s.y),A}}return 0}getPointOnLine(e,r,n,a,A){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:n,l=(A-n)/(a-r+Ro),c=Math.sqrt(e*e/(1+l*l));a<r&&(c*=-1);var u=l*c,p=null;if(a===r)p={x:o,y:s+u};else if((s-n)/(o-r+Ro)===l)p={x:o+c,y:s+u};else{var h=0,d=0,w=this.getLineLength(r,n,a,A);if(w<Ro)return null;var g=(o-r)*(a-r)+(s-n)*(A-n);g/=w*w,h=r+g*(a-r),d=n+g*(A-n);var y=this.getLineLength(o,s,h,d),m=Math.sqrt(e*e-y*y);c=Math.sqrt(m*m/(1+l*l)),a<r&&(c*=-1),u=l*c,p={x:h+c,y:d+u}}return p}getPointOnPath(e){var r=this.getPathLength(),n=0,a=null;if(e<-5e-5||e-5e-5>r)return null;var{dataArray:A}=this;for(var o of A){if(o&&(o.pathLength<5e-5||n+o.pathLength+5e-5<e)){n+=o.pathLength;continue}var s=e-n,l=0;switch(o.type){case Tt.LINE_TO:a=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case Tt.ARC:{var c=o.points[4],u=o.points[5],p=o.points[4]+u;if(l=c+s/o.pathLength*u,u<0&&l<p||u>=0&&l>p)break;a=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],l,o.points[6]);break}case Tt.CURVE_TO:l=s/o.pathLength,l>1&&(l=1),a=this.getPointOnCubicBezier(l,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case Tt.QUAD_TO:l=s/o.pathLength,l>1&&(l=1),a=this.getPointOnQuadraticBezier(l,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(a)return a;break}return null}getLineLength(e,r,n,a){return Math.sqrt((n-e)*(n-e)+(a-r)*(a-r))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,r)=>r.pathLength>0?e+r.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,r,n,a,A,o,s,l,c){var u=l*Zp(e)+o*em(e)+a*tm(e)+r*rm(e),p=c*Zp(e)+s*em(e)+A*tm(e)+n*rm(e);return{x:u,y:p}}getPointOnQuadraticBezier(e,r,n,a,A,o,s){var l=o*nm(e)+a*am(e)+r*Am(e),c=s*nm(e)+A*am(e)+n*Am(e);return{x:l,y:c}}getPointOnEllipticalArc(e,r,n,a,A,o){var s=Math.cos(o),l=Math.sin(o),c={x:n*Math.cos(A),y:a*Math.sin(A)};return{x:e+(c.x*s-c.y*l),y:r+(c.x*l+c.y*s)}}buildEquidistantCache(e,r){var n=this.getPathLength(),a=r||.25,A=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==A||this.equidistantCache.precision!==a){this.equidistantCache={step:A,precision:a,points:[]};for(var o=0,s=0;s<=n;s+=a){var l=this.getPointOnPath(s),c=this.getPointOnPath(s+a);!l||!c||(o+=this.getLineLength(l.x,l.y,c.x,c.y),o>=A&&(this.equidistantCache.points.push({x:l.x,y:l.y,distance:s}),o-=A))}}}getEquidistantPointOnPath(e,r,n){if(this.buildEquidistantCache(r,n),e<0||e-this.getPathLength()>5e-5)return null;var a=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[a]||null}}var ZAe=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class P4 extends zi{constructor(e,r,n){super(e,r,n),this.type="image",this.loaded=!1;var a=this.getHrefAttribute().getString();if(a){var A=a.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(a);e.images.push(this),A?this.loadSvg(a):this.loadImage(a),this.isSvg=A}}loadImage(e){var r=this;return ni(function*(){try{var n=yield r.document.createImage(e);r.image=n}catch(a){console.error('Error while loading image "'.concat(e,'":'),a)}r.loaded=!0})()}loadSvg(e){var r=this;return ni(function*(){var n=ZAe.exec(e);if(n){var a=n[5];n[4]==="base64"?r.image=atob(a):r.image=decodeURIComponent(a)}else try{var A=yield r.document.fetch(e),o=yield A.text();r.image=o}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}r.loaded=!0})()}renderChildren(e){var{document:r,image:n,loaded:a}=this,A=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y");if(!(!a||!n||!s||!l)){if(e.save(),e.translate(A,o),this.isSvg){var c=r.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:l});c.document.documentElement.parent=this,c.render()}else{var u=this.image;r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:u.width,height:l,desiredHeight:u.height}),this.loaded&&(typeof u.complete>"u"||u.complete)&&e.drawImage(u,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");return new Oa(e,r,e+n,r+a)}}class M4 extends zi{constructor(){super(...arguments),this.type="symbol"}render(e){}}class R4{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,r){var n=this;return ni(function*(){try{var{document:a}=n,A=yield a.canvg.parser.load(r),o=A.getElementsByTagName("font");Array.from(o).forEach(s=>{var l=a.createElement(s);a.definitions[e]=l})}catch(s){console.error('Error while loading font "'.concat(r,'":'),s)}n.loaded=!0})()}}class hm extends pr{constructor(e,r,n){super(e,r,n),this.type="style";var a=Po(Array.from(r.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),A=a.split("}");A.forEach(o=>{var s=o.trim();if(s){var l=s.split("{"),c=l[0].split(","),u=l[1].split(";");c.forEach(p=>{var h=p.trim();if(h){var d=e.styles[h]||{};if(u.forEach(y=>{var m=y.indexOf(":"),F=y.substr(0,m).trim(),N=y.substr(m+1,y.length-m).trim();F&&N&&(d[F]=new pt(e,F,N))}),e.styles[h]=d,e.stylesSpecificity[h]=s4(h),h==="@font-face"){var w=d["font-family"].getString().replace(/"|'/g,""),g=d.src.getString().split(",");g.forEach(y=>{if(y.indexOf('format("svg")')>0){var m=qp(y);m&&new R4(e).load(w,m)}})}}})}})}}hm.parseExternalUrl=qp;class H4 extends zi{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var r=this.getAttribute("x"),n=this.getAttribute("y");r.hasValue()&&e.translate(r.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}path(e){var{element:r}=this;r&&r.path(e)}renderChildren(e){var{document:r,element:n}=this;if(n){var a=n;if(n.type==="symbol"&&(a=new Xs(r,null),a.attributes.viewBox=new pt(r,"viewBox",n.getAttribute("viewBox").getString()),a.attributes.preserveAspectRatio=new pt(r,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),a.attributes.overflow=new pt(r,"overflow",n.getAttribute("overflow").getString()),a.children=n.children,n.styles.opacity=new pt(r,"opacity",this.calculateOpacity())),a.type==="svg"){var A=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);A.hasValue()&&(a.attributes.width=new pt(r,"width",A.getString())),o.hasValue()&&(a.attributes.height=new pt(r,"height",o.getString()))}var s=a.parent;a.parent=this,a.render(e),a.parent=s}}getBoundingBox(e){var{element:r}=this;return r?r.getBoundingBox(e):null}elementTransform(){var{document:e,element:r}=this;return $i.fromElement(e,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function qf(t,e,r,n,a,A){return t[r*n*4+e*4+A]}function Yf(t,e,r,n,a,A,o){t[r*n*4+e*4+A]=o}function Yr(t,e,r){var n=t[e];return n*r}function oi(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}class fm extends pr{constructor(e,r,n){super(e,r,n),this.type="feColorMatrix";var a=ia(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var A=a[0];a=[.213+.787*A,.715-.715*A,.072-.072*A,0,0,.213-.213*A,.715+.285*A,.072-.072*A,0,0,.213-.213*A,.715-.715*A,.072+.928*A,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=a[0]*Math.PI/180;a=[oi(o,.213,.787,-.213),oi(o,.715,-.715,-.715),oi(o,.072,-.072,.928),0,0,oi(o,.213,-.213,.143),oi(o,.715,.285,.14),oi(o,.072,-.072,-.283),0,0,oi(o,.213,-.213,-.787),oi(o,.715,-.715,.715),oi(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=a,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,r,n,a,A){for(var{includeOpacity:o,matrix:s}=this,l=e.getImageData(0,0,a,A),c=0;c<A;c++)for(var u=0;u<a;u++){var p=qf(l.data,u,c,a,A,0),h=qf(l.data,u,c,a,A,1),d=qf(l.data,u,c,a,A,2),w=qf(l.data,u,c,a,A,3),g=Yr(s,0,p)+Yr(s,1,h)+Yr(s,2,d)+Yr(s,3,w)+Yr(s,4,1),y=Yr(s,5,p)+Yr(s,6,h)+Yr(s,7,d)+Yr(s,8,w)+Yr(s,9,1),m=Yr(s,10,p)+Yr(s,11,h)+Yr(s,12,d)+Yr(s,13,w)+Yr(s,14,1),F=Yr(s,15,p)+Yr(s,16,h)+Yr(s,17,d)+Yr(s,18,w)+Yr(s,19,1);o&&(g=0,y=0,m=0,F*=w/255),Yf(l.data,u,c,a,A,0,g),Yf(l.data,u,c,a,A,1,y),Yf(l.data,u,c,a,A,2,m),Yf(l.data,u,c,a,A,3,F)}e.clearRect(0,0,a,A),e.putImageData(l,0,0)}}class Uc extends pr{constructor(){super(...arguments),this.type="mask"}apply(e,r){var{document:n}=this,a=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var l=new Oa;this.children.forEach(w=>{l.addBoundingBox(w.getBoundingBox(e))}),a=Math.floor(l.x1),A=Math.floor(l.y1),o=Math.floor(l.width),s=Math.floor(l.height)}var c=this.removeStyles(r,Uc.ignoreStyles),u=n.createCanvas(a+o,A+s),p=u.getContext("2d");n.screen.setDefaults(p),this.renderChildren(p),new fm(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(p,0,0,a+o,A+s);var h=n.createCanvas(a+o,A+s),d=h.getContext("2d");n.screen.setDefaults(d),r.render(d),d.globalCompositeOperation="destination-in",d.fillStyle=p.createPattern(u,"no-repeat"),d.fillRect(0,0,a+o,A+s),e.fillStyle=d.createPattern(h,"no-repeat"),e.fillRect(0,0,a+o,A+s),this.restoreStyles(r,c)}render(e){}}Uc.ignoreStyles=["mask","transform","clip-path"];var V4=()=>{};class $4 extends pr{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:r}=this,n=Reflect.getPrototypeOf(e),{beginPath:a,closePath:A}=e;n&&(n.beginPath=V4,n.closePath=V4),Reflect.apply(a,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=$i.fromElement(r,o)),s&&s.apply(e),o.path(e),n&&(n.closePath=A),s&&s.unapply(e)}}),Reflect.apply(A,e,[]),e.clip(),n&&(n.beginPath=a,n.closePath=A)}render(e){}}class Ic extends pr{constructor(){super(...arguments),this.type="filter"}apply(e,r){var{document:n,children:a}=this,A=r.getBoundingBox(e);if(A){var o=0,s=0;a.forEach(m=>{var F=m.extraFilterDistance||0;o=Math.max(o,F),s=Math.max(s,F)});var l=Math.floor(A.width),c=Math.floor(A.height),u=l+2*o,p=c+2*s;if(!(u<1||p<1)){var h=Math.floor(A.x),d=Math.floor(A.y),w=this.removeStyles(r,Ic.ignoreStyles),g=n.createCanvas(u,p),y=g.getContext("2d");n.screen.setDefaults(y),y.translate(-h+o,-d+s),r.render(y),a.forEach(m=>{typeof m.apply=="function"&&m.apply(y,0,0,u,p)}),e.drawImage(g,0,0,u,p,h-o,d-s,u,p),this.restoreStyles(r,w)}}}render(e){}}Ic.ignoreStyles=["filter","transform","clip-path"];class z4 extends pr{constructor(e,r,n){super(e,r,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,r,n,a,A){}}class K4 extends pr{constructor(){super(...arguments),this.type="feMorphology"}apply(e,r,n,a,A){}}class G4 extends pr{constructor(){super(...arguments),this.type="feComposite"}apply(e,r,n,a,A){}}class j4 extends pr{constructor(e,r,n){super(e,r,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,r,n,a,A){var{document:o,blurRadius:s}=this,l=o.window?o.window.document.body:null,c=e.canvas;c.id=o.getUniqueId(),l&&(c.style.display="none",l.appendChild(c)),NAe(c,r,n,a,A,s),l&&l.removeChild(c)}}class W4 extends pr{constructor(){super(...arguments),this.type="title"}}class X4 extends pr{constructor(){super(...arguments),this.type="desc"}}var eie={svg:Xs,rect:lm,circle:v4,ellipse:w4,line:B4,polyline:cm,polygon:x4,path:tr,pattern:b4,marker:C4,defs:E4,linearGradient:_4,radialGradient:F4,stop:S4,animate:Wf,animateColor:k4,animateTransform:T4,font:N4,"font-face":L4,"missing-glyph":U4,glyph:sm,text:ii,tspan:Lc,tref:I4,a:D4,textPath:O4,image:P4,g:jf,symbol:M4,style:hm,use:H4,mask:Uc,clipPath:$4,filter:Ic,feDropShadow:z4,feMorphology:K4,feComposite:G4,feColorMatrix:fm,feGaussianBlur:j4,title:W4,desc:X4};function q4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function tie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?q4(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rie(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}function nie(t){return dm.apply(this,arguments)}function dm(){return dm=ni(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=document.createElement("img");return e&&(r.crossOrigin="Anonymous"),new Promise((n,a)=>{r.onload=()=>{n(r)},r.onerror=(A,o,s,l,c)=>{a(c)},r.src=t})}),dm.apply(this,arguments)}class si{constructor(e){var{rootEmSize:r=12,emSize:n=12,createCanvas:a=si.createCanvas,createImage:A=si.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=r,this.emSize=n,this.createCanvas=a,this.createImage=this.bindCreateImage(A,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,r){return typeof r=="boolean"?(n,a)=>e(n,typeof a=="boolean"?a:r):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:r}=this;r.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var r=this.createElement(e.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=si.elementTypes[r];return typeof n<"u"?new n(this,e):new y4(this,e)}createTextNode(e){return new JAe(this,e)}setViewBox(e){this.screen.setViewBox(tie({document:this},e))}}si.createCanvas=rie,si.createImage=nie,si.elementTypes=eie;function Y4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ho(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y4(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}class Vo{constructor(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Gf(n),this.screen=new Nc(e,n),this.options=n;var a=new si(this,n),A=a.createDocumentElement(r);this.document=a,this.documentElement=A}static from(e,r){var n=arguments;return ni(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:{},A=new Gf(a),o=yield A.parse(r);return new Vo(e,o,a)})()}static fromString(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=new Gf(n),A=a.parseFromString(r);return new Vo(e,A,n)}fork(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Vo.from(e,r,Ho(Ho({},this.options),n))}forkString(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Vo.fromString(e,r,Ho(Ho({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,r=this;return ni(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};r.start(Ho({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),yield r.ready(),r.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:r,screen:n,options:a}=this;n.start(r,Ho(Ho({enableRedraw:!0},a),e))}stop(){this.screen.stop()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,r,n)}}const aie=Object.freeze(Object.defineProperty({__proto__:null,AElement:D4,AnimateColorElement:k4,AnimateElement:Wf,AnimateTransformElement:T4,BoundingBox:Oa,CB1:Zp,CB2:em,CB3:tm,CB4:rm,Canvg:Vo,CircleElement:v4,ClipPathElement:$4,DefsElement:E4,DescElement:X4,Document:si,Element:pr,EllipseElement:w4,FeColorMatrixElement:fm,FeCompositeElement:G4,FeDropShadowElement:z4,FeGaussianBlurElement:j4,FeMorphologyElement:K4,FilterElement:Ic,Font:Pn,FontElement:N4,FontFaceElement:L4,GElement:jf,GlyphElement:sm,GradientElement:um,ImageElement:P4,LineElement:B4,LinearGradientElement:_4,MarkerElement:C4,MaskElement:Uc,Matrix:im,MissingGlyphElement:U4,Mouse:c4,PSEUDO_ZERO:Ro,Parser:Gf,PathElement:tr,PathParser:Tt,PatternElement:b4,Point:Ur,PolygonElement:x4,PolylineElement:cm,Property:pt,QB1:nm,QB2:am,QB3:Am,RadialGradientElement:F4,RectElement:lm,RenderedElement:zi,Rotate:d4,SVGElement:Xs,SVGFontLoader:R4,Scale:g4,Screen:Nc,Skew:om,SkewX:p4,SkewY:m4,StopElement:S4,StyleElement:hm,SymbolElement:M4,TRefElement:I4,TSpanElement:Lc,TextElement:ii,TextPathElement:O4,TitleElement:W4,Transform:$i,Translate:f4,UnknownElement:y4,UseElement:H4,ViewPort:l4,compressSpaces:Po,default:Vo,getSelectorSpecificity:s4,normalizeAttributeName:i4,normalizeColor:o4,parseExternalUrl:qp,presets:DAe,toNumbers:ia,trimLeft:a4,trimRight:A4,vectorMagnitude:Yp,vectorsAngle:Jp,vectorsRatio:Kf},Symbol.toStringTag,{value:"Module"}));rn.VueUiChestnut=Yz,rn.VueUiDonut=t9,rn.VueUiGauge=u$,rn.VueUiOnion=kK,rn.VueUiQuadrant=IV,rn.VueUiRadar=yH,rn.VueUiRating=TG,rn.VueUiScreenshot=fG,rn.VueUiSkeleton=kj,rn.VueUiTable=hR,rn.VueUiVerticalBar=hG,rn.VueUiWaffle=U9,rn.VueUiXy=H7,Object.defineProperty(rn,Symbol.toStringTag,{value:"Module"})});
407
+ `},ZC=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},hAe=function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return GC(e,t),e.prototype.finish=function(r){if(r===void 0&&(r=[]),this.parse(" ",r),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return r},e.prototype.parse=function(r,n){var a=this;n===void 0&&(n=[]);for(var A=function(p){n.push(p),a.curArgs.length=0,a.canParseCommandOrComma=!0},o=0;o<r.length;o++){var s=r[o],l=!(this.curCommandType!==je.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),c=ZC(s)&&(this.curNumber==="0"&&s==="0"||l);if(!ZC(s)||c)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||l){if(this.curNumber&&this.curCommandType!==-1){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===je.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(u),this.curArgs.length===fAe[this.curCommandType]&&(je.HORIZ_LINE_TO===this.curCommandType?A({type:je.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):je.VERT_LINE_TO===this.curCommandType?A({type:je.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===je.MOVE_TO||this.curCommandType===je.LINE_TO||this.curCommandType===je.SMOOTH_QUAD_TO?(A({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),je.MOVE_TO===this.curCommandType&&(this.curCommandType=je.LINE_TO)):this.curCommandType===je.CURVE_TO?A({type:je.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===je.SMOOTH_CURVE_TO?A({type:je.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.QUAD_TO?A({type:je.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.ARC&&A({type:je.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!uAe(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(c)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=je.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=je.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=je.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=je.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=je.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=je.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=je.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=je.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=je.ARC,this.curCommandRelative=s==="a"}else n.push({type:je.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return n},e.prototype.transform=function(r){return Object.create(this,{parse:{value:function(n,a){a===void 0&&(a=[]);for(var A=0,o=Object.getPrototypeOf(this).parse.call(this,n);A<o.length;A++){var s=o[A],l=r(s);Array.isArray(l)?a.push.apply(a,l):a.push(l)}return a}}})},e}(JC),je=function(t){function e(r){var n=t.call(this)||this;return n.commands=typeof r=="string"?e.parse(r):r,n}return GC(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var r=qr.CALCULATE_BOUNDS();return this.transform(r),r},e.prototype.transform=function(r){for(var n=[],a=0,A=this.commands;a<A.length;a++){var o=r(A[a]);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return this.commands=n,this},e.encode=function(r){return cAe(r)},e.parse=function(r){var n=new hAe,a=[];return n.parse(r,a),n.finish(a),a},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(JC),fAe=((sA={})[je.MOVE_TO]=2,sA[je.LINE_TO]=2,sA[je.HORIZ_LINE_TO]=1,sA[je.VERT_LINE_TO]=1,sA[je.CLOSE_PATH]=0,sA[je.QUAD_TO]=4,sA[je.SMOOTH_QUAD_TO]=2,sA[je.CURVE_TO]=6,sA[je.SMOOTH_CURVE_TO]=4,sA[je.ARC]=7,sA),dAe=_n,gAe=iA,pAe=Af,mAe=S5,e4=RegExp.prototype,yAe=function(t){var e=t.flags;return e===void 0&&!("flags"in e4)&&!gAe(t,"flags")&&pAe(e4,t)?dAe(mAe,t):e},vAe=ff.PROPER,wAe=Lo,BAe=On,t4=UA,xAe=Vr,bAe=yAe,Xp="toString",CAe=RegExp.prototype,r4=CAe[Xp],EAe=xAe(function(){return r4.call({source:"a",flags:"b"})!="/a/b"}),_Ae=vAe&&r4.name!=Xp;(EAe||_Ae)&&wAe(RegExp.prototype,Xp,function(){var e=BAe(this),r=t4(e.source),n=t4(bAe(e));return"/"+r+"/"+n},{unsafe:!0});function zf(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zf=function(e){return typeof e}:zf=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zf(t)}function FAe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var SAe=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],kAe=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function TAe(t,e,r,n,a){if(typeof t=="string"&&(t=document.getElementById(t)),!t||zf(t)!=="object"||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var A=t.getContext("2d");try{return A.getImageData(e,r,n,a)}catch(o){throw new Error("unable to access image data: "+o)}}function NAe(t,e,r,n,a,A){if(!(isNaN(A)||A<1)){A|=0;var o=TAe(t,e,r,n,a);o=LAe(o,e,r,n,a,A),t.getContext("2d").putImageData(o,e,r)}}function LAe(t,e,r,n,a,A){for(var o=t.data,s=2*A+1,l=n-1,c=a-1,u=A+1,p=u*(u+1)/2,h=new n4,d=h,w,g=1;g<s;g++)d=d.next=new n4,g===u&&(w=d);d.next=h;for(var y=null,m=null,F=0,N=0,Q=SAe[A],z=kAe[A],R=0;R<a;R++){d=h;for(var I=o[N],U=o[N+1],O=o[N+2],q=o[N+3],T=0;T<u;T++)d.r=I,d.g=U,d.b=O,d.a=q,d=d.next;for(var L=0,G=0,Y=0,se=0,he=u*I,ge=u*U,re=u*O,le=u*q,fe=p*I,Ue=p*U,b=p*O,_=p*q,B=1;B<u;B++){var x=N+((l<B?l:B)<<2),S=o[x],D=o[x+1],W=o[x+2],ue=o[x+3],Ce=u-B;fe+=(d.r=S)*Ce,Ue+=(d.g=D)*Ce,b+=(d.b=W)*Ce,_+=(d.a=ue)*Ce,L+=S,G+=D,Y+=W,se+=ue,d=d.next}y=h,m=w;for(var de=0;de<n;de++){var ke=_*Q>>z;if(o[N+3]=ke,ke!==0){var ne=255/ke;o[N]=(fe*Q>>z)*ne,o[N+1]=(Ue*Q>>z)*ne,o[N+2]=(b*Q>>z)*ne}else o[N]=o[N+1]=o[N+2]=0;fe-=he,Ue-=ge,b-=re,_-=le,he-=y.r,ge-=y.g,re-=y.b,le-=y.a;var Ee=de+A+1;Ee=F+(Ee<l?Ee:l)<<2,L+=y.r=o[Ee],G+=y.g=o[Ee+1],Y+=y.b=o[Ee+2],se+=y.a=o[Ee+3],fe+=L,Ue+=G,b+=Y,_+=se,y=y.next;var xe=m,te=xe.r,Pe=xe.g,rt=xe.b,Ve=xe.a;he+=te,ge+=Pe,re+=rt,le+=Ve,L-=te,G-=Pe,Y-=rt,se-=Ve,m=m.next,N+=4}F+=n}for(var We=0;We<n;We++){N=We<<2;var Ye=o[N],Je=o[N+1],ot=o[N+2],at=o[N+3],ft=u*Ye,yt=u*Je,kt=u*ot,Nt=u*at,dt=p*Ye,xt=p*Je,tt=p*ot,ir=p*at;d=h;for(var Lt=0;Lt<u;Lt++)d.r=Ye,d.g=Je,d.b=ot,d.a=at,d=d.next;for(var fr=n,Qt=0,Kt=0,Jr=0,Rt=0,_r=1;_r<=A;_r++){N=fr+We<<2;var Yt=u-_r;dt+=(d.r=Ye=o[N])*Yt,xt+=(d.g=Je=o[N+1])*Yt,tt+=(d.b=ot=o[N+2])*Yt,ir+=(d.a=at=o[N+3])*Yt,Rt+=Ye,Qt+=Je,Kt+=ot,Jr+=at,d=d.next,_r<c&&(fr+=n)}N=We,y=h,m=w;for(var on=0;on<a;on++){var _t=N<<2;o[_t+3]=at=ir*Q>>z,at>0?(at=255/at,o[_t]=(dt*Q>>z)*at,o[_t+1]=(xt*Q>>z)*at,o[_t+2]=(tt*Q>>z)*at):o[_t]=o[_t+1]=o[_t+2]=0,dt-=ft,xt-=yt,tt-=kt,ir-=Nt,ft-=y.r,yt-=y.g,kt-=y.b,Nt-=y.a,_t=We+((_t=on+u)<c?_t:c)*n<<2,dt+=Rt+=y.r=o[_t],xt+=Qt+=y.g=o[_t+1],tt+=Kt+=y.b=o[_t+2],ir+=Jr+=y.a=o[_t+3],y=y.next,ft+=Ye=m.r,yt+=Je=m.g,kt+=ot=m.b,Nt+=at=m.a,Rt-=Ye,Qt-=Je,Kt-=ot,Jr-=at,m=m.next,N+=n}}return t}var n4=function t(){FAe(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function UAe(){var{DOMParser:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas(r,n){return new OffscreenCanvas(r,n)},createImage(r){return ni(function*(){var n=yield fetch(r),a=yield n.blob(),A=yield createImageBitmap(a);return A})()}};return(typeof DOMParser<"u"||typeof t>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function IAe(t){var{DOMParser:e,canvas:r,fetch:n}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:r.createCanvas,createImage:r.loadImage}}var DAe=Object.freeze({__proto__:null,offscreen:UAe,node:IAe});function Po(t){return t.replace(/(?!\u3000)\s+/gm," ")}function a4(t){return t.replace(/^[\n \t]+/,"")}function A4(t){return t.replace(/[\n \t]+$/,"")}function ia(t){var e=(t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var QAe=/^[A-Z-]+$/;function i4(t){return QAe.test(t)?t.toLowerCase():t}function qp(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function o4(t){if(!t.startsWith("rgb"))return t;var e=3,r=t.replace(/\d+(\.\d+)?/g,(n,a)=>e--&&a?String(Math.round(parseFloat(n))):n);return r}var OAe=/(\[[^\]]+\])/g,PAe=/(#[^\s+>~.[:]+)/g,MAe=/(\.[^\s+>~.[:]+)/g,RAe=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,HAe=/(:[\w-]+\([^)]*\))/gi,VAe=/(:[^\s+>~.[:]+)/g,$Ae=/([^\s+>~.[:]+)/g;function Mo(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function s4(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[r,n]=Mo(r,OAe),e[1]+=n,[r,n]=Mo(r,PAe),e[0]+=n,[r,n]=Mo(r,MAe),e[1]+=n,[r,n]=Mo(r,RAe),e[2]+=n,[r,n]=Mo(r,HAe),e[1]+=n,[r,n]=Mo(r,VAe),e[1]+=n,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,n]=Mo(r,$Ae),e[2]+=n,e.join("")}var Ro=1e-8;function Yp(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Kf(t,e){return(t[0]*e[0]+t[1]*e[1])/(Yp(t)*Yp(e))}function Jp(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Kf(t,e))}function Zp(t){return t*t*t}function em(t){return 3*t*t*(1-t)}function tm(t){return 3*t*(1-t)*(1-t)}function rm(t){return(1-t)*(1-t)*(1-t)}function nm(t){return t*t}function am(t){return 2*t*(1-t)}function Am(t){return(1-t)*(1-t)}class pt{constructor(e,r,n){this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}static empty(e){return new pt(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:r,name:n}=this;return Po(this.getString()).trim().split(e).map(a=>new pt(r,n,a))}hasValue(e){var{value:r}=this;return r!==null&&r!==""&&(e||r!==0)&&typeof r<"u"}isString(e){var{value:r}=this,n=typeof r=="string";return!n||!e?n:e.test(r)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:r}=this,n=parseFloat(r);return this.isString(/%$/)&&(n/=100),n}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var r=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=o4(r),this.value=r),r}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[n,a]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:A}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(A.computeSize("x"),A.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(A.computeSize("x"),A.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*A.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*A.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&a):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*A.computeSize(n);default:{var o=this.getNumber();return r&&o<1?o*A.computeSize(n):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),r=/#([^)'"]+)/.exec(e);return r&&(r=r[1]),r||(r=e),this.document.definitions[r]}getFillStyleDefinition(e,r){var n=this.getDefinition();if(!n)return null;if(typeof n.createGradient=="function")return n.createGradient(this.document.ctx,e,r);if(typeof n.createPattern=="function"){if(n.getHrefAttribute().hasValue()){var a=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),a.hasValue()&&n.getAttribute("patternTransform",!0).setValue(a.value)}return n.createPattern(this.document.ctx,e,r)}return null}getTextBaseline(){return this.hasValue()?pt.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var r=this.getColor(),n=r.length,a=0,A=0;A<n&&(r[A]===","&&a++,a!==3);A++);if(e.hasValue()&&this.isString()&&a!==3){var o=new Kp(r);o.ok&&(o.alpha=e.getNumber(),r=o.toRGBA())}return new pt(this.document,this.name,r)}}pt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class l4{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,r){this.viewPorts.push({width:e,height:r})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Ur{constructor(e,r){this.x=e,this.y=r}static parse(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[n=r,a=r]=ia(e);return new Ur(n,a)}static parseScale(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=r,a=n]=ia(e);return new Ur(n,a)}static parsePath(e){for(var r=ia(e),n=r.length,a=[],A=0;A<n;A+=2)a.push(new Ur(r[A],r[A+1]));return a}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:r,y:n}=this,a=r*e[0]+n*e[2]+e[4],A=r*e[1]+n*e[3]+e[5];this.x=a,this.y=A}}class c4{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:r,onMouseMove:n}=this,a=e.ctx.canvas;a.onclick=r,a.onmousemove=n,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:r,eventElements:n}=this,{style:a}=e.ctx.canvas;a&&(a.cursor=""),r.forEach((A,o)=>{for(var{run:s}=A,l=n[o];l;)s(l),l=l.parent}),this.events=[],this.eventElements=[]}}checkPath(e,r){if(!(!this.working||!r)){var{events:n,eventElements:a}=this;n.forEach((A,o)=>{var{x:s,y:l}=A;!a[o]&&r.isPointInPath&&r.isPointInPath(s,l)&&(a[o]=e)})}}checkBoundingBox(e,r){if(!(!this.working||!r)){var{events:n,eventElements:a}=this;n.forEach((A,o)=>{var{x:s,y:l}=A;!a[o]&&r.isPointInBox(s,l)&&(a[o]=e)})}}mapXY(e,r){for(var{window:n,ctx:a}=this.screen,A=new Ur(e,r),o=a.canvas;o;)A.x-=o.offsetLeft,A.y-=o.offsetTop,o=o.offsetParent;return n.scrollX&&(A.x+=n.scrollX),n.scrollY&&(A.y+=n.scrollY),A}onClick(e){var{x:r,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:r,y:n,run(a){a.onClick&&a.onClick()}})}onMouseMove(e){var{x:r,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:r,y:n,run(a){a.onMouseMove&&a.onMouseMove()}})}}var u4=typeof window<"u"?window:null,h4=typeof fetch<"u"?fetch.bind(void 0):null;class Nc{constructor(e){var{fetch:r=h4,window:n=u4}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new l4,this.mouse=new c4(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,this.fetch=r}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(r=>r());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:r,ctx:n,aspectRatio:a,width:A,desiredWidth:o,height:s,desiredHeight:l,minX:c=0,minY:u=0,refX:p,refY:h,clip:d=!1,clipX:w=0,clipY:g=0}=e,y=Po(a).replace(/^defer\s/,""),[m,F]=y.split(" "),N=m||"xMidYMid",Q=F||"meet",z=A/o,R=s/l,I=Math.min(z,R),U=Math.max(z,R),O=o,q=l;Q==="meet"&&(O*=I,q*=I),Q==="slice"&&(O*=U,q*=U);var T=new pt(r,"refX",p),L=new pt(r,"refY",h),G=T.hasValue()&&L.hasValue();if(G&&n.translate(-I*T.getPixels("x"),-I*L.getPixels("y")),d){var Y=I*w,se=I*g;n.beginPath(),n.moveTo(Y,se),n.lineTo(A,se),n.lineTo(A,s),n.lineTo(Y,s),n.closePath(),n.clip()}if(!G){var he=Q==="meet"&&I===R,ge=Q==="slice"&&U===R,re=Q==="meet"&&I===z,le=Q==="slice"&&U===z;N.startsWith("xMid")&&(he||ge)&&n.translate(A/2-O/2,0),N.endsWith("YMid")&&(re||le)&&n.translate(0,s/2-q/2),N.startsWith("xMax")&&(he||ge)&&n.translate(A-O,0),N.endsWith("YMax")&&(re||le)&&n.translate(0,s-q)}switch(!0){case N==="none":n.scale(z,R);break;case Q==="meet":n.scale(I,I);break;case Q==="slice":n.scale(U,U);break}n.translate(-c,-u)}start(e){var{enableRedraw:r=!1,ignoreMouse:n=!1,ignoreAnimation:a=!1,ignoreDimensions:A=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:l,scaleHeight:c,offsetX:u,offsetY:p}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:h,mouse:d}=this,w=1e3/h;if(this.frameDuration=w,this.readyPromise=new Promise(N=>{this.resolveReady=N}),this.isReady()&&this.render(e,A,o,l,c,u,p),!!r){var g=Date.now(),y=g,m=0,F=()=>{g=Date.now(),m=g-y,m>=w&&(y=g-m%w,this.shouldUpdate(a,s)&&(this.render(e,A,o,l,c,u,p),d.runEvents())),this.intervalId=Vp(F)};n||d.start(),this.intervalId=Vp(F)}}stop(){this.intervalId&&(Vp.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,r){if(!e){var{frameDuration:n}=this,a=this.animations.reduce((A,o)=>o.update(n)||A,!1);if(a)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,r,n,a,A,o,s){var{CLIENT_WIDTH:l,CLIENT_HEIGHT:c,viewPort:u,ctx:p,isFirstRender:h}=this,d=p.canvas;u.clear(),d.width&&d.height?u.setCurrent(d.width,d.height):u.setCurrent(l,c);var w=e.getStyle("width"),g=e.getStyle("height");!r&&(h||typeof a!="number"&&typeof A!="number")&&(w.hasValue()&&(d.width=w.getPixels("x"),d.style&&(d.style.width="".concat(d.width,"px"))),g.hasValue()&&(d.height=g.getPixels("y"),d.style&&(d.style.height="".concat(d.height,"px"))));var y=d.clientWidth||d.width,m=d.clientHeight||d.height;if(r&&w.hasValue()&&g.hasValue()&&(y=w.getPixels("x"),m=g.getPixels("y")),u.setCurrent(y,m),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof a=="number"||typeof A=="number"){var F=ia(e.getAttribute("viewBox").getString()),N=0,Q=0;if(typeof a=="number"){var z=e.getStyle("width");z.hasValue()?N=z.getPixels("x")/a:isNaN(F[2])||(N=F[2]/a)}if(typeof A=="number"){var R=e.getStyle("height");R.hasValue()?Q=R.getPixels("y")/A:isNaN(F[3])||(Q=F[3]/A)}N||(N=Q),Q||(Q=N),e.getAttribute("width",!0).setValue(a),e.getAttribute("height",!0).setValue(A);var I=e.getStyle("transform",!0,!0);I.setValue("".concat(I.getString()," scale(").concat(1/N,", ").concat(1/Q,")"))}n||p.clearRect(0,0,y,m),e.render(p),h&&(this.isFirstRender=!1)}}Nc.defaultWindow=u4,Nc.defaultFetch=h4;var{defaultFetch:zAe}=Nc,KAe=typeof DOMParser<"u"?DOMParser:null;class Gf{constructor(){var{fetch:e=zAe,DOMParser:r=KAe}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=r}parse(e){var r=this;return ni(function*(){return e.startsWith("<")?r.parseFromString(e):r.load(e)})()}parseFromString(e){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(e,"text/xml"))}}checkDocument(e){var r=e.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return e}load(e){var r=this;return ni(function*(){var n=yield r.fetch(e),a=yield n.text();return r.parseFromString(a)})()}}class f4{constructor(e,r){this.type="translate",this.point=null,this.point=Ur.parse(r)}apply(e){var{x:r,y:n}=this.point;e.translate(r||0,n||0)}unapply(e){var{x:r,y:n}=this.point;e.translate(-1*r||0,-1*n||0)}applyToPoint(e){var{x:r,y:n}=this.point;e.applyTransform([1,0,0,1,r||0,n||0])}}class d4{constructor(e,r,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var a=ia(r);this.angle=new pt(e,"angle",a[0]),this.originX=n[0],this.originY=n[1],this.cx=a[1]||0,this.cy=a[2]||0}apply(e){var{cx:r,cy:n,originX:a,originY:A,angle:o}=this,s=r+a.getPixels("x"),l=n+A.getPixels("y");e.translate(s,l),e.rotate(o.getRadians()),e.translate(-s,-l)}unapply(e){var{cx:r,cy:n,originX:a,originY:A,angle:o}=this,s=r+a.getPixels("x"),l=n+A.getPixels("y");e.translate(s,l),e.rotate(-1*o.getRadians()),e.translate(-s,-l)}applyToPoint(e){var{cx:r,cy:n,angle:a}=this,A=a.getRadians();e.applyTransform([1,0,0,1,r||0,n||0]),e.applyTransform([Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0]),e.applyTransform([1,0,0,1,-r||0,-n||0])}}class g4{constructor(e,r,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var a=Ur.parseScale(r);(a.x===0||a.y===0)&&(a.x=Ro,a.y=Ro),this.scale=a,this.originX=n[0],this.originY=n[1]}apply(e){var{scale:{x:r,y:n},originX:a,originY:A}=this,o=a.getPixels("x"),s=A.getPixels("y");e.translate(o,s),e.scale(r,n||r),e.translate(-o,-s)}unapply(e){var{scale:{x:r,y:n},originX:a,originY:A}=this,o=a.getPixels("x"),s=A.getPixels("y");e.translate(o,s),e.scale(1/r,1/n||r),e.translate(-o,-s)}applyToPoint(e){var{x:r,y:n}=this.scale;e.applyTransform([r||0,0,0,n||0,0,0])}}class im{constructor(e,r,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ia(r),this.originX=n[0],this.originY=n[1]}apply(e){var{originX:r,originY:n,matrix:a}=this,A=r.getPixels("x"),o=n.getPixels("y");e.translate(A,o),e.transform(a[0],a[1],a[2],a[3],a[4],a[5]),e.translate(-A,-o)}unapply(e){var{originX:r,originY:n,matrix:a}=this,A=a[0],o=a[2],s=a[4],l=a[1],c=a[3],u=a[5],p=0,h=0,d=1,w=1/(A*(c*d-u*h)-o*(l*d-u*p)+s*(l*h-c*p)),g=r.getPixels("x"),y=n.getPixels("y");e.translate(g,y),e.transform(w*(c*d-u*h),w*(u*p-l*d),w*(s*h-o*d),w*(A*d-s*p),w*(o*u-s*c),w*(s*l-A*u)),e.translate(-g,-y)}applyToPoint(e){e.applyTransform(this.matrix)}}class om extends im{constructor(e,r,n){super(e,r,n),this.type="skew",this.angle=null,this.angle=new pt(e,"angle",r)}}class p4 extends om{constructor(e,r,n){super(e,r,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class m4 extends om{constructor(e,r,n){super(e,r,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function GAe(t){return Po(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function jAe(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}class $i{constructor(e,r,n){this.document=e,this.transforms=[];var a=GAe(r);a.forEach(A=>{if(A!=="none"){var[o,s]=jAe(A),l=$i.transformTypes[o];typeof l<"u"&&this.transforms.push(new l(this.document,s,n))}})}static fromElement(e,r){var n=r.getStyle("transform",!1,!0),[a,A=a]=r.getStyle("transform-origin",!1,!0).split(),o=[a,A];return n.hasValue()?new $i(e,n.getString(),o):null}apply(e){for(var{transforms:r}=this,n=r.length,a=0;a<n;a++)r[a].apply(e)}unapply(e){for(var{transforms:r}=this,n=r.length,a=n-1;a>=0;a--)r[a].unapply(e)}applyToPoint(e){for(var{transforms:r}=this,n=r.length,a=0;a<n;a++)r[a].applyToPoint(e)}}$i.transformTypes={translate:f4,rotate:d4,scale:g4,matrix:im,skewX:p4,skewY:m4};class pr{constructor(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=r,this.captureTextNodes=n,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!r||r.nodeType!==1)){if(Array.from(r.attributes).forEach(s=>{var l=i4(s.nodeName);this.attributes[l]=new pt(e,l,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map(s=>s.trim());a.forEach(s=>{if(s){var[l,c]=s.split(":").map(u=>u.trim());this.styles[l]=new pt(e,l,c)}})}var{definitions:A}=e,o=this.getAttribute("id");o.hasValue()&&(A[o.getString()]||(A[o.getString()]=this)),Array.from(r.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(n&&(s.nodeType===3||s.nodeType===4)){var l=e.createTextNode(s);l.getText().length>0&&this.addChild(l)}})}}getAttribute(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.attributes[e];if(!n&&r){var a=new pt(this.document,e,"");return this.attributes[e]=a,a}return n||pt.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return pt.empty(this.document)}getStyle(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.styles[e];if(a)return a;var A=this.getAttribute(e);if(A!=null&&A.hasValue())return this.styles[e]=A,A;if(!n){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(r){var l=new pt(this.document,e,"");return this.styles[e]=l,l}return a||pt.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var n=this.getStyle("filter").getDefinition();n&&(this.applyEffects(e),n.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var r=$i.fromElement(this.document,this);r&&r.apply(e);var n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){var a=n.getDefinition();a&&a.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(r=>{r.render(e)})}addChild(e){var r=e instanceof pr?e:this.document.createElement(e);r.parent=this,pr.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(e){var r,{node:n}=this;if(typeof n.matches=="function")return n.matches(e);var a=(r=n.getAttribute)===null||r===void 0?void 0:r.call(n,"class");return!a||a===""?!1:a.split(" ").some(A=>".".concat(A)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:r}=this.document;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var a=e[n],A=r[n];if(a)for(var o in a){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),A>=s&&(this.styles[o]=a[o],this.stylesSpecificity[o]=A)}}}removeStyles(e,r){var n=r.reduce((a,A)=>{var o=e.getStyle(A);if(!o.hasValue())return a;var s=o.getString();return o.setValue(""),[...a,[A,s]]},[]);return n}restoreStyles(e,r){r.forEach(n=>{var[a,A]=n;e.getStyle(a,!0).setValue(A)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}pr.ignoreChildTypes=["title"];class y4 extends pr{constructor(e,r,n){super(e,r,n)}}function WAe(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function XAe(t){return typeof process>"u"?t:t.trim().split(",").map(WAe).join(",")}function qAe(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function YAe(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class Pn{constructor(e,r,n,a,A,o){var s=o?typeof o=="string"?Pn.parse(o):o:{};this.fontFamily=A||s.fontFamily,this.fontSize=a||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=n||s.fontWeight,this.fontVariant=r||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",a="",A="",o="",s="",l=Po(e).trim().split(" "),c={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return l.forEach(u=>{switch(!0){case(!c.fontStyle&&Pn.styles.includes(u)):u!=="inherit"&&(n=u),c.fontStyle=!0;break;case(!c.fontVariant&&Pn.variants.includes(u)):u!=="inherit"&&(a=u),c.fontStyle=!0,c.fontVariant=!0;break;case(!c.fontWeight&&Pn.weights.includes(u)):u!=="inherit"&&(A=u),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0;break;case!c.fontSize:u!=="inherit"&&([o]=u.split("/")),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0,c.fontSize=!0;break;default:u!=="inherit"&&(s+=u)}}),new Pn(n,a,A,o,s,r)}toString(){return[qAe(this.fontStyle),this.fontVariant,YAe(this.fontWeight),this.fontSize,XAe(this.fontFamily)].join(" ").trim()}}Pn.styles="normal|italic|oblique|inherit",Pn.variants="normal|small-caps|inherit",Pn.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Oa{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=n,this.y2=a,this.addPoint(e,r),this.addPoint(n,a)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,r){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:r,y1:n,x2:a,y2:A}=e;this.addPoint(r,n),this.addPoint(a,A)}}sumCubic(e,r,n,a,A){return Math.pow(1-e,3)*r+3*Math.pow(1-e,2)*e*n+3*(1-e)*Math.pow(e,2)*a+Math.pow(e,3)*A}bezierCurveAdd(e,r,n,a,A){var o=6*r-12*n+6*a,s=-3*r+9*n-9*a+3*A,l=3*n-3*r;if(s===0){if(o===0)return;var c=-l/o;0<c&&c<1&&(e?this.addX(this.sumCubic(c,r,n,a,A)):this.addY(this.sumCubic(c,r,n,a,A)));return}var u=Math.pow(o,2)-4*l*s;if(!(u<0)){var p=(-o+Math.sqrt(u))/(2*s);0<p&&p<1&&(e?this.addX(this.sumCubic(p,r,n,a,A)):this.addY(this.sumCubic(p,r,n,a,A)));var h=(-o-Math.sqrt(u))/(2*s);0<h&&h<1&&(e?this.addX(this.sumCubic(h,r,n,a,A)):this.addY(this.sumCubic(h,r,n,a,A)))}}addBezierCurve(e,r,n,a,A,o,s,l){this.addPoint(e,r),this.addPoint(s,l),this.bezierCurveAdd(!0,e,n,A,s),this.bezierCurveAdd(!1,r,a,o,l)}addQuadraticCurve(e,r,n,a,A,o){var s=e+.6666666666666666*(n-e),l=r+2/3*(a-r),c=s+1/3*(A-e),u=l+1/3*(o-r);this.addBezierCurve(e,r,s,c,l,u,A,o)}isPointInBox(e,r){var{x1:n,y1:a,x2:A,y2:o}=this;return n<=e&&e<=A&&a<=r&&r<=o}}class Tt extends je{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Ur(0,0),this.control=new Ur(0,0),this.current=new Ur(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:r}=this;return e>=r.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",n=new Ur(this.command[e],this.command[r]);return this.makeAbsolute(n)}getAsControlPoint(e,r){var n=this.getPoint(e,r);return this.control=n,n}getAsCurrentPoint(e,r){var n=this.getPoint(e,r);return this.current=n,n}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==je.CURVE_TO&&e!==je.SMOOTH_CURVE_TO&&e!==je.QUAD_TO&&e!==je.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:n},control:{x:a,y:A}}=this,o=new Ur(2*r-a,2*n-A);return o}makeAbsolute(e){if(this.command.relative){var{x:r,y:n}=this.current;e.x+=r,e.y+=n}return e}addMarker(e,r,n){var{points:a,angles:A}=this;n&&A.length>0&&!A[A.length-1]&&(A[A.length-1]=a[a.length-1].angleTo(n)),this.addMarkerAngle(e,r?r.angleTo(e):null)}addMarkerAngle(e,r){this.points.push(e),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,r=e.length,n=0;n<r;n++)if(!e[n]){for(var a=n+1;a<r;a++)if(e[a]){e[n]=e[a];break}}return e}}class zi extends pr{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,r=this;r;){var n=r.getStyle("opacity",!1,!0);n.hasValue(!0)&&(e*=n.getNumber()),r=r.parent}return e}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r){var n=this.getStyle("fill"),a=this.getStyle("fill-opacity"),A=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var s=n.getFillStyleDefinition(this,a);s&&(e.fillStyle=s)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var l=n.getColor();l!=="inherit"&&(e.fillStyle=l==="none"?"rgba(0,0,0,0)":l)}if(a.hasValue()){var c=new pt(this.document,"fill",e.fillStyle).addOpacity(a).getColor();e.fillStyle=c}if(A.isUrlDefinition()){var u=A.getFillStyleDefinition(this,o);u&&(e.strokeStyle=u)}else if(A.hasValue()){A.getString()==="currentColor"&&A.setValue(this.getStyle("color").getColor());var p=A.getString();p!=="inherit"&&(e.strokeStyle=p==="none"?"rgba(0,0,0,0)":p)}if(o.hasValue()){var h=new pt(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=h}var d=this.getStyle("stroke-width");if(d.hasValue()){var w=d.getPixels();e.lineWidth=w||Ro}var g=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),F=this.getStyle("stroke-dasharray"),N=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(e.lineCap=g.getString()),y.hasValue()&&(e.lineJoin=y.getString()),m.hasValue()&&(e.miterLimit=m.getNumber()),F.hasValue()&&F.getString()!=="none"){var Q=ia(F.getString());typeof e.setLineDash<"u"?e.setLineDash(Q):typeof e.webkitLineDash<"u"?e.webkitLineDash=Q:typeof e.mozDash<"u"&&!(Q.length===1&&Q[0]===0)&&(e.mozDash=Q);var z=N.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=z:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=z:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=z)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var R=this.getStyle("font"),I=this.getStyle("font-style"),U=this.getStyle("font-variant"),O=this.getStyle("font-weight"),q=this.getStyle("font-size"),T=this.getStyle("font-family"),L=new Pn(I.getString(),U.getString(),O.getString(),q.hasValue()?"".concat(q.getPixels(!0),"px"):"",T.getString(),Pn.parse(R.getString(),e.font));I.setValue(L.fontStyle),U.setValue(L.fontVariant),O.setValue(L.fontWeight),q.setValue(L.fontSize),T.setValue(L.fontFamily),e.font=L.toString(),q.isPixels()&&(this.document.emSize=q.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class tr extends zi{constructor(e,r,n){super(e,r,n),this.type="path",this.pathParser=null,this.pathParser=new Tt(this.getAttribute("d").getString())}path(e){var{pathParser:r}=this,n=new Oa;for(r.reset(),e&&e.beginPath();!r.isEnd();)switch(r.next().type){case Tt.MOVE_TO:this.pathM(e,n);break;case Tt.LINE_TO:this.pathL(e,n);break;case Tt.HORIZ_LINE_TO:this.pathH(e,n);break;case Tt.VERT_LINE_TO:this.pathV(e,n);break;case Tt.CURVE_TO:this.pathC(e,n);break;case Tt.SMOOTH_CURVE_TO:this.pathS(e,n);break;case Tt.QUAD_TO:this.pathQ(e,n);break;case Tt.SMOOTH_QUAD_TO:this.pathT(e,n);break;case Tt.ARC:this.pathA(e,n);break;case Tt.CLOSE_PATH:this.pathZ(e,n);break}return n}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,r=e.getMarkerPoints(),n=e.getMarkerAngles(),a=r.map((A,o)=>[A,n[o]]);return a}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var r=this.getStyle("fill-rule");e.fillStyle!==""&&(r.getString("inherit")!=="inherit"?e.fill(r.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var a=n.length-1,A=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(A.isUrlDefinition()){var l=A.getDefinition(),[c,u]=n[0];l.render(e,c,u)}if(o.isUrlDefinition())for(var p=o.getDefinition(),h=1;h<a;h++){var[d,w]=n[h];p.render(e,d,w)}if(s.isUrlDefinition()){var g=s.getDefinition(),[y,m]=n[a];g.render(e,y,m)}}}static pathM(e){var r=e.getAsCurrentPoint();return e.start=e.current,{point:r}}pathM(e,r){var{pathParser:n}=this,{point:a}=tr.pathM(n),{x:A,y:o}=a;n.addMarker(a),r.addPoint(A,o),e&&e.moveTo(A,o)}static pathL(e){var{current:r}=e,n=e.getAsCurrentPoint();return{current:r,point:n}}pathL(e,r){var{pathParser:n}=this,{current:a,point:A}=tr.pathL(n),{x:o,y:s}=A;n.addMarker(A,a),r.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:r,command:n}=e,a=new Ur((n.relative?r.x:0)+n.x,r.y);return e.current=a,{current:r,point:a}}pathH(e,r){var{pathParser:n}=this,{current:a,point:A}=tr.pathH(n),{x:o,y:s}=A;n.addMarker(A,a),r.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:r,command:n}=e,a=new Ur(r.x,(n.relative?r.y:0)+n.y);return e.current=a,{current:r,point:a}}pathV(e,r){var{pathParser:n}=this,{current:a,point:A}=tr.pathV(n),{x:o,y:s}=A;n.addMarker(A,a),r.addPoint(o,s),e&&e.lineTo(o,s)}static pathC(e){var{current:r}=e,n=e.getPoint("x1","y1"),a=e.getAsControlPoint("x2","y2"),A=e.getAsCurrentPoint();return{current:r,point:n,controlPoint:a,currentPoint:A}}pathC(e,r){var{pathParser:n}=this,{current:a,point:A,controlPoint:o,currentPoint:s}=tr.pathC(n);n.addMarker(s,o,A),r.addBezierCurve(a.x,a.y,A.x,A.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(A.x,A.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:r}=e,n=e.getReflectedControlPoint(),a=e.getAsControlPoint("x2","y2"),A=e.getAsCurrentPoint();return{current:r,point:n,controlPoint:a,currentPoint:A}}pathS(e,r){var{pathParser:n}=this,{current:a,point:A,controlPoint:o,currentPoint:s}=tr.pathS(n);n.addMarker(s,o,A),r.addBezierCurve(a.x,a.y,A.x,A.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(A.x,A.y,o.x,o.y,s.x,s.y)}static pathQ(e){var{current:r}=e,n=e.getAsControlPoint("x1","y1"),a=e.getAsCurrentPoint();return{current:r,controlPoint:n,currentPoint:a}}pathQ(e,r){var{pathParser:n}=this,{current:a,controlPoint:A,currentPoint:o}=tr.pathQ(n);n.addMarker(o,A,A),r.addQuadraticCurve(a.x,a.y,A.x,A.y,o.x,o.y),e&&e.quadraticCurveTo(A.x,A.y,o.x,o.y)}static pathT(e){var{current:r}=e,n=e.getReflectedControlPoint();e.control=n;var a=e.getAsCurrentPoint();return{current:r,controlPoint:n,currentPoint:a}}pathT(e,r){var{pathParser:n}=this,{current:a,controlPoint:A,currentPoint:o}=tr.pathT(n);n.addMarker(o,A,A),r.addQuadraticCurve(a.x,a.y,A.x,A.y,o.x,o.y),e&&e.quadraticCurveTo(A.x,A.y,o.x,o.y)}static pathA(e){var{current:r,command:n}=e,{rX:a,rY:A,xRot:o,lArcFlag:s,sweepFlag:l}=n,c=o*(Math.PI/180),u=e.getAsCurrentPoint(),p=new Ur(Math.cos(c)*(r.x-u.x)/2+Math.sin(c)*(r.y-u.y)/2,-Math.sin(c)*(r.x-u.x)/2+Math.cos(c)*(r.y-u.y)/2),h=Math.pow(p.x,2)/Math.pow(a,2)+Math.pow(p.y,2)/Math.pow(A,2);h>1&&(a*=Math.sqrt(h),A*=Math.sqrt(h));var d=(s===l?-1:1)*Math.sqrt((Math.pow(a,2)*Math.pow(A,2)-Math.pow(a,2)*Math.pow(p.y,2)-Math.pow(A,2)*Math.pow(p.x,2))/(Math.pow(a,2)*Math.pow(p.y,2)+Math.pow(A,2)*Math.pow(p.x,2)));isNaN(d)&&(d=0);var w=new Ur(d*a*p.y/A,d*-A*p.x/a),g=new Ur((r.x+u.x)/2+Math.cos(c)*w.x-Math.sin(c)*w.y,(r.y+u.y)/2+Math.sin(c)*w.x+Math.cos(c)*w.y),y=Jp([1,0],[(p.x-w.x)/a,(p.y-w.y)/A]),m=[(p.x-w.x)/a,(p.y-w.y)/A],F=[(-p.x-w.x)/a,(-p.y-w.y)/A],N=Jp(m,F);return Kf(m,F)<=-1&&(N=Math.PI),Kf(m,F)>=1&&(N=0),{currentPoint:u,rX:a,rY:A,sweepFlag:l,xAxisRotation:c,centp:g,a1:y,ad:N}}pathA(e,r){var{pathParser:n}=this,{currentPoint:a,rX:A,rY:o,sweepFlag:s,xAxisRotation:l,centp:c,a1:u,ad:p}=tr.pathA(n),h=1-s?1:-1,d=u+h*(p/2),w=new Ur(c.x+A*Math.cos(d),c.y+o*Math.sin(d));if(n.addMarkerAngle(w,d-h*Math.PI/2),n.addMarkerAngle(a,d-h*Math.PI),r.addPoint(a.x,a.y),e&&!isNaN(u)&&!isNaN(p)){var g=A>o?A:o,y=A>o?1:A/o,m=A>o?o/A:1;e.translate(c.x,c.y),e.rotate(l),e.scale(y,m),e.arc(0,0,g,u,u+p,!!(1-s)),e.scale(1/y,1/m),e.rotate(-l),e.translate(-c.x,-c.y)}}static pathZ(e){e.current=e.start}pathZ(e,r){tr.pathZ(this.pathParser),e&&r.x1!==r.x2&&r.y1!==r.y2&&e.closePath()}}class sm extends tr{constructor(e,r,n){super(e,r,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class ii extends zi{constructor(e,r,n){super(e,r,new.target===ii?!0:n),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,r);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(e.textBaseline=n)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var r=null;return this.children.forEach((n,a)=>{var A=this.getChildBoundingBox(e,this,this,a);r?r.addBoundingBox(A):r=A}),r}getFontSize(){var{document:e,parent:r}=this,n=Pn.parse(e.ctx.font).fontSize,a=r.getStyle("font-size").getNumber(n);return a}getTElementBoundingBox(e){var r=this.getFontSize();return new Oa(this.x,this.y-r,this.x+this.measureText(e),this.y)}getGlyph(e,r,n){var a=r[n],A=null;if(e.isArabic){var o=r.length,s=r[n-1],l=r[n+1],c="isolated";if((n===0||s===" ")&&n<o-1&&l!==" "&&(c="terminal"),n>0&&s!==" "&&n<o-1&&l!==" "&&(c="medial"),n>0&&s!==" "&&(n===o-1||l===" ")&&(c="initial"),typeof e.glyphs[a]<"u"){var u=e.glyphs[a];A=u instanceof sm?u:u[c]}}else A=e.glyphs[a];return A||(A=e.missingGlyph),A}getText(){return""}getTextFromNode(e){var r=e||this.node,n=Array.from(r.parentNode.childNodes),a=n.indexOf(r),A=n.length-1,o=Po(r.textContent||"");return a===0&&(o=a4(o)),a===A&&(o=A4(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((n,a)=>{this.renderChild(e,this,this,a)});var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:r,parent:n}=this,a=this.getText(),A=n.getStyle("font-family").getDefinition();if(A){for(var{unitsPerEm:o}=A.fontFace,s=Pn.parse(r.ctx.font),l=n.getStyle("font-size").getNumber(s.fontSize),c=n.getStyle("font-style").getString(s.fontStyle),u=l/o,p=A.isRTL?a.split("").reverse().join(""):a,h=ia(n.getAttribute("dx").getString()),d=p.length,w=0;w<d;w++){var g=this.getGlyph(A,p,w);e.translate(this.x,this.y),e.scale(u,-u);var y=e.lineWidth;e.lineWidth=e.lineWidth*o/l,c==="italic"&&e.transform(1,0,.4,1,0,0),g.render(e),c==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=y,e.scale(1/u,-1/u),e.translate(-this.x,-this.y),this.x+=l*(g.horizAdvX||A.horizAdvX)/o,typeof h[w]<"u"&&!isNaN(h[w])&&(this.x+=h[w])}return}var{x:m,y:F}=this;e.fillStyle&&e.fillText(a,m,F),e.strokeStyle&&e.strokeText(a,m,F)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start"),n=!1,a=0;r==="start"&&!n||r==="end"&&n?a=e.x-this.minX:r==="end"&&!n||r==="start"&&n?a=e.x-this.maxX:a=e.x-(this.minX+this.maxX)/2;for(var A=this.textChunkStart;A<this.leafTexts.length;A++)this.leafTexts[A].x+=a;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((r,n)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,n)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,r,n,a){var A=n.children[a];A.children.length>0?A.children.forEach((o,s)=>{r.adjustChildCoordinatesRecursiveCore(e,r,A,s)}):this.adjustChildCoordinates(e,r,n,a)}adjustChildCoordinates(e,r,n,a){var A=n.children[a];if(typeof A.measureText!="function")return A;e.save(),A.setContext(e,!0);var o=A.getAttribute("x"),s=A.getAttribute("y"),l=A.getAttribute("dx"),c=A.getAttribute("dy"),u=A.getStyle("font-family").getDefinition(),p=!!u&&u.isRTL;a===0&&(o.hasValue()||o.setValue(A.getInheritedAttribute("x")),s.hasValue()||s.setValue(A.getInheritedAttribute("y")),l.hasValue()||l.setValue(A.getInheritedAttribute("dx")),c.hasValue()||c.setValue(A.getInheritedAttribute("dy")));var h=A.measureText(e);return p&&(r.x-=h),o.hasValue()?(r.applyAnchoring(),A.x=o.getPixels("x"),l.hasValue()&&(A.x+=l.getPixels("x"))):(l.hasValue()&&(r.x+=l.getPixels("x")),A.x=r.x),r.x=A.x,p||(r.x+=h),s.hasValue()?(A.y=s.getPixels("y"),c.hasValue()&&(A.y+=c.getPixels("y"))):(c.hasValue()&&(r.y+=c.getPixels("y")),A.y=r.y),r.y=A.y,r.leafTexts.push(A),r.minX=Math.min(r.minX,A.x,A.x+h),r.maxX=Math.max(r.maxX,A.x,A.x+h),A.clearContext(e),e.restore(),A}getChildBoundingBox(e,r,n,a){var A=n.children[a];if(typeof A.getBoundingBox!="function")return null;var o=A.getBoundingBox(e);return o?(A.children.forEach((s,l)=>{var c=r.getChildBoundingBox(e,r,A,l);o.addBoundingBox(c)}),o):null}renderChild(e,r,n,a){var A=n.children[a];A.render(e),A.children.forEach((o,s)=>{r.renderChild(e,r,A,s)})}measureText(e){var{measureCache:r}=this;if(~r)return r;var n=this.getText(),a=this.measureTargetText(e,n);return this.measureCache=a,a}measureTargetText(e,r){if(!r.length)return 0;var{parent:n}=this,a=n.getStyle("font-family").getDefinition();if(a){for(var A=this.getFontSize(),o=a.isRTL?r.split("").reverse().join(""):r,s=ia(n.getAttribute("dx").getString()),l=o.length,c=0,u=0;u<l;u++){var p=this.getGlyph(a,o,u);c+=(p.horizAdvX||a.horizAdvX)*A/a.fontFace.unitsPerEm,typeof s[u]<"u"&&!isNaN(s[u])&&(c+=s[u])}return c}if(!e.measureText)return r.length*10;e.save(),this.setContext(e,!0);var{width:h}=e.measureText(r);return this.clearContext(e),e.restore(),h}getInheritedAttribute(e){for(var r=this;r instanceof ii&&r.isFirstChild();){var n=r.parent.getAttribute(e);if(n.hasValue(!0))return n.getValue("0");r=r.parent}return null}}class Lc extends ii{constructor(e,r,n){super(e,r,new.target===Lc?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class JAe extends Lc{constructor(){super(...arguments),this.type="textNode"}}class Xs extends zi{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var r,{document:n}=this,{screen:a,window:A}=n,o=e.canvas;if(a.setDefaults(e),o.style&&typeof e.font<"u"&&A&&typeof A.getComputedStyle<"u"){e.font=A.getComputedStyle(o).getPropertyValue("font");var s=new pt(n,"fontSize",Pn.parse(e.font).fontSize);s.hasValue()&&(n.rootEmSize=s.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:l,height:c}=a.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var u=this.getAttribute("refX"),p=this.getAttribute("refY"),h=this.getAttribute("viewBox"),d=h.hasValue()?ia(h.getString()):null,w=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,y=0,m=0,F=0;d&&(g=d[0],y=d[1]),this.root||(l=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y"),this.type==="marker"&&(m=g,F=y,g=0,y=0)),a.viewPort.setCurrent(l,c),this.node&&(!this.parent||((r=this.node.parentNode)===null||r===void 0?void 0:r.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),d&&(l=d[2],c=d[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a.viewPort.width,desiredWidth:l,height:a.viewPort.height,desiredHeight:c,minX:g,minY:y,refX:u.getValue(),refY:p.getValue(),clip:w,clipX:m,clipY:F}),d&&(a.viewPort.removeCurrent(),a.viewPort.setCurrent(l,c))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.getAttribute("width",!0),A=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),l=a.getNumber(0),c=A.getNumber(0);if(n)if(typeof n=="string")this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(a.setValue(e),A.setValue(r),o.hasValue()||o.setValue("0 0 ".concat(l||e," ").concat(c||r)),s.hasValue()){var p=this.getStyle("width"),h=this.getStyle("height");p.hasValue()&&p.setValue("".concat(e,"px")),h.hasValue()&&h.setValue("".concat(r,"px"))}}}class lm extends tr{constructor(){super(...arguments),this.type="rect"}path(e){var r=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),a=this.getStyle("width",!1,!0).getPixels("x"),A=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),l=o.getPixels("x"),c=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(c=l),s.hasValue()&&!o.hasValue()&&(l=c),l=Math.min(l,a/2),c=Math.min(c,A/2),e){var u=4*((Math.sqrt(2)-1)/3);e.beginPath(),A>0&&a>0&&(e.moveTo(r+l,n),e.lineTo(r+a-l,n),e.bezierCurveTo(r+a-l+u*l,n,r+a,n+c-u*c,r+a,n+c),e.lineTo(r+a,n+A-c),e.bezierCurveTo(r+a,n+A-c+u*c,r+a-l+u*l,n+A,r+a-l,n+A),e.lineTo(r+l,n+A),e.bezierCurveTo(r+l-u*l,n+A,r,n+A-c+u*c,r,n+A-c),e.lineTo(r,n+c),e.bezierCurveTo(r,n+c-u*c,r+l-u*l,n,r+l,n),e.closePath())}return new Oa(r,n,r+a,n+A)}getMarkers(){return null}}class v4 extends tr{constructor(){super(...arguments),this.type="circle"}path(e){var r=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),a=this.getAttribute("r").getPixels();return e&&a>0&&(e.beginPath(),e.arc(r,n,a,0,Math.PI*2,!1),e.closePath()),new Oa(r-a,n-a,r+a,n+a)}getMarkers(){return null}}class w4 extends tr{constructor(){super(...arguments),this.type="ellipse"}path(e){var r=4*((Math.sqrt(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),a=this.getAttribute("ry").getPixels("y"),A=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&n>0&&a>0&&(e.beginPath(),e.moveTo(A+n,o),e.bezierCurveTo(A+n,o+r*a,A+r*n,o+a,A,o+a),e.bezierCurveTo(A-r*n,o+a,A-n,o+r*a,A-n,o),e.bezierCurveTo(A-n,o-r*a,A-r*n,o-a,A,o-a),e.bezierCurveTo(A+r*n,o-a,A+n,o-r*a,A+n,o),e.closePath()),new Oa(A-n,o-a,A+n,o+a)}getMarkers(){return null}}class B4 extends tr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Ur(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ur(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:r,y:n},{x:a,y:A}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(r,n),e.lineTo(a,A)),new Oa(r,n,a,A)}getMarkers(){var[e,r]=this.getPoints(),n=e.angleTo(r);return[[e,n],[r,n]]}}class cm extends tr{constructor(e,r,n){super(e,r,n),this.type="polyline",this.points=[],this.points=Ur.parsePath(this.getAttribute("points").getString())}path(e){var{points:r}=this,[{x:n,y:a}]=r,A=new Oa(n,a);return e&&(e.beginPath(),e.moveTo(n,a)),r.forEach(o=>{var{x:s,y:l}=o;A.addPoint(s,l),e&&e.lineTo(s,l)}),A}getMarkers(){var{points:e}=this,r=e.length-1,n=[];return e.forEach((a,A)=>{A!==r&&n.push([a,a.angleTo(e[A+1])])}),n.length>0&&n.push([e[e.length-1],n[n.length-1][1]]),n}}class x4 extends cm{constructor(){super(...arguments),this.type="polygon"}path(e){var r=super.path(e),[{x:n,y:a}]=this.points;return e&&(e.lineTo(n,a),e.closePath()),r}}class b4 extends pr{constructor(){super(...arguments),this.type="pattern"}createPattern(e,r,n){var a=this.getStyle("width").getPixels("x",!0),A=this.getStyle("height").getPixels("y",!0),o=new Xs(this.document,null);o.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new pt(this.document,"width","".concat(a,"px")),o.attributes.height=new pt(this.document,"height","".concat(A,"px")),o.attributes.transform=new pt(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(a,A),l=s.getContext("2d"),c=this.getAttribute("x"),u=this.getAttribute("y");c.hasValue()&&u.hasValue()&&l.translate(c.getPixels("x",!0),u.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var p=-1;p<=1;p++)for(var h=-1;h<=1;h++)l.save(),o.attributes.x=new pt(this.document,"x",p*s.width),o.attributes.y=new pt(this.document,"y",h*s.height),o.render(l),l.restore();var d=e.createPattern(s,"repeat");return d}}class C4 extends pr{constructor(){super(...arguments),this.type="marker"}render(e,r,n){if(r){var{x:a,y:A}=r,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(a,A),o==="auto"&&e.rotate(n),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var l=new Xs(this.document,null);l.type=this.type,l.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),l.attributes.refX=new pt(this.document,"refX",this.getAttribute("refX").getValue()),l.attributes.refY=new pt(this.document,"refY",this.getAttribute("refY").getValue()),l.attributes.width=new pt(this.document,"width",this.getAttribute("markerWidth").getValue()),l.attributes.height=new pt(this.document,"height",this.getAttribute("markerHeight").getValue()),l.attributes.overflow=new pt(this.document,"overflow",this.getAttribute("overflow").getValue()),l.attributes.fill=new pt(this.document,"fill",this.getAttribute("fill").getColor("black")),l.attributes.stroke=new pt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),l.children=this.children,l.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-n),e.translate(-a,-A)}}}class E4 extends pr{constructor(){super(...arguments),this.type="defs"}render(){}}class jf extends zi{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var r=new Oa;return this.children.forEach(n=>{r.addBoundingBox(n.getBoundingBox(e))}),r}}class um extends pr{constructor(e,r,n){super(e,r,n),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:a,children:A}=this;A.forEach(o=>{o.type==="stop"&&a.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,r,n){var a=this;this.getHrefAttribute().hasValue()&&(a=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(a));var{stops:A}=a,o=this.getGradient(e,r);if(!o)return this.addParentOpacity(n,A[A.length-1].color);if(A.forEach(y=>{o.addColorStop(y.offset,this.addParentOpacity(n,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:l,viewPort:c}=s.screen,[u]=c.viewPorts,p=new lm(s,null);p.attributes.x=new pt(s,"x",-l/3),p.attributes.y=new pt(s,"y",-l/3),p.attributes.width=new pt(s,"width",l),p.attributes.height=new pt(s,"height",l);var h=new jf(s,null);h.attributes.transform=new pt(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[p];var d=new Xs(s,null);d.attributes.x=new pt(s,"x",0),d.attributes.y=new pt(s,"y",0),d.attributes.width=new pt(s,"width",u.width),d.attributes.height=new pt(s,"height",u.height),d.children=[h];var w=s.createCanvas(u.width,u.height),g=w.getContext("2d");return g.fillStyle=o,d.render(g),g.createPattern(w,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(r=>{!this.getAttribute(r).hasValue()&&e.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(e.getAttribute(r).getValue())})}addParentOpacity(e,r){if(e.hasValue()){var n=new pt(this.document,"color",r);return n.addOpacity(e).getColor()}return r}}class _4 extends um{constructor(e,r,n){super(e,r,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,r){var n=this.getGradientUnits()==="objectBoundingBox",a=n?r.getBoundingBox(e):null;if(n&&!a)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var A=n?a.x+a.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=n?a.y+a.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=n?a.x+a.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),l=n?a.y+a.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return A===s&&o===l?null:e.createLinearGradient(A,o,s,l)}}class F4 extends um{constructor(e,r,n){super(e,r,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,r){var n=this.getGradientUnits()==="objectBoundingBox",a=r.getBoundingBox(e);if(n&&!a)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var A=n?a.x+a.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?a.y+a.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=A,l=o;this.getAttribute("fx").hasValue()&&(s=n?a.x+a.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(l=n?a.y+a.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var c=n?(a.width+a.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,l,u,A,o,c)}}class S4 extends pr{constructor(e,r,n){super(e,r,n),this.type="stop";var a=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),A=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),A.hasValue()&&(o=o.addOpacity(A)),this.offset=a,this.color=o.getColor()}}class Wf extends pr{constructor(e,r,n){super(e,r,n),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new pt(e,"values",null);var a=this.getAttribute("values");a.hasValue()&&this.values.setValue(a.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:e}=this,{progress:r,from:n,to:a}=this.getProgress(),A=n.getNumber()+(a.getNumber()-n.getNumber())*r;return e==="%"&&(A*=100),"".concat(A).concat(e)}update(e){var{parent:r}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var a=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(a==="freeze"&&!this.frozen)this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=n.getString();else if(a==="remove"&&!this.removed)return this.removed=!0,n.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var A=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var l=s.getString();o="".concat(l,"(").concat(o,")")}n.setValue(o),A=!0}return A}getProgress(){var{document:e,values:r}=this,n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var a=n.progress*(r.getValue().length-1),A=Math.floor(a),o=Math.ceil(a);n.from=new pt(e,"from",parseFloat(r.getValue()[A])),n.to=new pt(e,"to",parseFloat(r.getValue()[o])),n.progress=(a-A)/(o-A)}else n.from=this.from,n.to=this.to;return n}}class k4 extends Wf{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:r,to:n}=this.getProgress(),a=new Kp(r.getColor()),A=new Kp(n.getColor());if(a.ok&&A.ok){var o=a.r+(A.r-a.r)*e,s=a.g+(A.g-a.g)*e,l=a.b+(A.b-a.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(l),")")}return this.getAttribute("from").getColor()}}class T4 extends Wf{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:r,to:n}=this.getProgress(),a=ia(r.getString()),A=ia(n.getString()),o=a.map((s,l)=>{var c=A[l];return s+(c-s)*e}).join(" ");return o}}class N4 extends pr{constructor(e,r,n){super(e,r,n),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:a}=e,{children:A}=this;for(var o of A)switch(o.type){case"font-face":{this.fontFace=o;var s=o.getStyle("font-family");s.hasValue()&&(a[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var l=o;l.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[l.unicode]>"u"&&(this.glyphs[l.unicode]={}),this.glyphs[l.unicode][l.arabicForm]=l):this.glyphs[l.unicode]=l;break}}}render(){}}class L4 extends pr{constructor(e,r,n){super(e,r,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class U4 extends tr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class I4 extends ii{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var r=e.children[0];if(r)return r.getText()}return""}}class D4 extends ii{constructor(e,r,n){super(e,r,n),this.type="a";var{childNodes:a}=r,A=a[0],o=a.length>0&&Array.from(a).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(A):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:r,x:n,y:a}=this,{mouse:A}=r.screen,o=new pt(r,"fontSize",Pn.parse(r.ctx.font).fontSize);A.isWorking()&&A.checkBoundingBox(this,new Oa(n,a-o.getPixels("y"),n+this.measureText(e),a))}else if(this.children.length>0){var s=new jf(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function Q4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Xf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Q4(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}class O4 extends ii{constructor(e,r,n){super(e,r,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var a=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(a)}getText(){return this.text}path(e){var{dataArray:r}=this;e&&e.beginPath(),r.forEach(n=>{var{type:a,points:A}=n;switch(a){case Tt.LINE_TO:e&&e.lineTo(A[0],A[1]);break;case Tt.MOVE_TO:e&&e.moveTo(A[0],A[1]);break;case Tt.CURVE_TO:e&&e.bezierCurveTo(A[0],A[1],A[2],A[3],A[4],A[5]);break;case Tt.QUAD_TO:e&&e.quadraticCurveTo(A[0],A[1],A[2],A[3]);break;case Tt.ARC:{var[o,s,l,c,u,p,h,d]=A,w=l>c?l:c,g=l>c?1:l/c,y=l>c?c/l:1;e&&(e.translate(o,s),e.rotate(h),e.scale(g,y),e.arc(0,0,w,u,u+p,!!(1-d)),e.scale(1/g,1/y),e.rotate(-h),e.translate(-o,-s));break}case Tt.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var r=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:a}=this,A=e.fillStyle;r==="underline"&&e.beginPath(),a.forEach((o,s)=>{var{p0:l,p1:c,rotation:u,text:p}=o;e.save(),e.translate(l.x,l.y),e.rotate(u),e.fillStyle&&e.fillText(p,0,0),e.strokeStyle&&e.strokeText(p,0,0),e.restore(),r==="underline"&&(s===0&&e.moveTo(l.x,l.y+n/8),e.lineTo(c.x,c.y+n/5))}),r==="underline"&&(e.lineWidth=n/20,e.strokeStyle=A,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,r,n,a,A,o,s,l,c){var u=o,p=this.measureText(e,l);l===" "&&r==="justify"&&n<a&&(p+=(a-n)/A),c>-1&&(u+=this.getLetterSpacingAt(c));var h=this.textHeight/20,d=this.getEquidistantPointOnPath(u,h,0),w=this.getEquidistantPointOnPath(u+p,h,0),g={p0:d,p1:w},y=d&&w?Math.atan2(w.y-d.y,w.x-d.x):0;if(s){var m=Math.cos(Math.PI/2+y)*s,F=Math.cos(-y)*s;g.p0=Xf(Xf({},d),{},{x:d.x+m,y:d.y+F}),g.p1=Xf(Xf({},w),{},{x:w.x+m,y:w.y+F})}return u+=p,{offset:u,segment:g,rotation:y}}measureText(e,r){var{measuresCache:n}=this,a=r||this.getText();if(n.has(a))return n.get(a);var A=this.measureTargetText(e,a);return n.set(a,A),A}setTextData(e){if(!this.glyphInfo){var r=this.getText(),n=r.split(""),a=r.split(" ").length-1,A=this.parent.getAttribute("dx").split().map(Q=>Q.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),l=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing"),u=0;!l.hasValue()||l.getValue()==="inherit"?u=c.getPixels():l.hasValue()&&l.getValue()!=="initial"&&l.getValue()!=="unset"&&(u=l.getPixels());var p=[],h=r.length;this.letterSpacingCache=p;for(var d=0;d<h;d++)p.push(typeof A[d]<"u"?A[d]:u);var w=p.reduce((Q,z,R)=>R===0?0:Q+z||0,0),g=this.measureText(e),y=Math.max(g+w,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];var m=this.getPathLength(),F=this.getStyle("startOffset").getNumber(0)*m,N=0;(s==="middle"||s==="center")&&(N=-y/2),(s==="end"||s==="right")&&(N=-y),N+=F,n.forEach((Q,z)=>{var{offset:R,segment:I,rotation:U}=this.findSegmentToFitChar(e,s,y,m,a,N,o,Q,z);N=R,!(!I.p0||!I.p1)&&this.glyphInfo.push({text:n[z],p0:I.p0,p1:I.p1,rotation:U})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var r=[],{pathParser:n}=e;for(n.reset();!n.isEnd();){var{current:a}=n,A=a?a.x:0,o=a?a.y:0,s=n.next(),l=s.type,c=[];switch(s.type){case Tt.MOVE_TO:this.pathM(n,c);break;case Tt.LINE_TO:l=this.pathL(n,c);break;case Tt.HORIZ_LINE_TO:l=this.pathH(n,c);break;case Tt.VERT_LINE_TO:l=this.pathV(n,c);break;case Tt.CURVE_TO:this.pathC(n,c);break;case Tt.SMOOTH_CURVE_TO:l=this.pathS(n,c);break;case Tt.QUAD_TO:this.pathQ(n,c);break;case Tt.SMOOTH_QUAD_TO:l=this.pathT(n,c);break;case Tt.ARC:c=this.pathA(n);break;case Tt.CLOSE_PATH:tr.pathZ(n);break}s.type!==Tt.CLOSE_PATH?r.push({type:l,points:c,start:{x:A,y:o},pathLength:this.calcLength(A,o,l,c)}):r.push({type:Tt.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(e,r){var{x:n,y:a}=tr.pathM(e).point;r.push(n,a)}pathL(e,r){var{x:n,y:a}=tr.pathL(e).point;return r.push(n,a),Tt.LINE_TO}pathH(e,r){var{x:n,y:a}=tr.pathH(e).point;return r.push(n,a),Tt.LINE_TO}pathV(e,r){var{x:n,y:a}=tr.pathV(e).point;return r.push(n,a),Tt.LINE_TO}pathC(e,r){var{point:n,controlPoint:a,currentPoint:A}=tr.pathC(e);r.push(n.x,n.y,a.x,a.y,A.x,A.y)}pathS(e,r){var{point:n,controlPoint:a,currentPoint:A}=tr.pathS(e);return r.push(n.x,n.y,a.x,a.y,A.x,A.y),Tt.CURVE_TO}pathQ(e,r){var{controlPoint:n,currentPoint:a}=tr.pathQ(e);r.push(n.x,n.y,a.x,a.y)}pathT(e,r){var{controlPoint:n,currentPoint:a}=tr.pathT(e);return r.push(n.x,n.y,a.x,a.y),Tt.QUAD_TO}pathA(e){var{rX:r,rY:n,sweepFlag:a,xAxisRotation:A,centp:o,a1:s,ad:l}=tr.pathA(e);return a===0&&l>0&&(l-=2*Math.PI),a===1&&l<0&&(l+=2*Math.PI),[o.x,o.y,r,n,s,l,A,a]}calcLength(e,r,n,a){var A=0,o=null,s=null,l=0;switch(n){case Tt.LINE_TO:return this.getLineLength(e,r,a[0],a[1]);case Tt.CURVE_TO:for(A=0,o=this.getPointOnCubicBezier(0,e,r,a[0],a[1],a[2],a[3],a[4],a[5]),l=.01;l<=1;l+=.01)s=this.getPointOnCubicBezier(l,e,r,a[0],a[1],a[2],a[3],a[4],a[5]),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return A;case Tt.QUAD_TO:for(A=0,o=this.getPointOnQuadraticBezier(0,e,r,a[0],a[1],a[2],a[3]),l=.01;l<=1;l+=.01)s=this.getPointOnQuadraticBezier(l,e,r,a[0],a[1],a[2],a[3]),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return A;case Tt.ARC:{A=0;var c=a[4],u=a[5],p=a[4]+u,h=Math.PI/180;if(Math.abs(c-p)<h&&(h=Math.abs(c-p)),o=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],c,0),u<0)for(l=c-h;l>p;l-=h)s=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],l,0),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(l=c+h;l<p;l+=h)s=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],l,0),A+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],p,0),A+=this.getLineLength(o.x,o.y,s.x,s.y),A}}return 0}getPointOnLine(e,r,n,a,A){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:n,l=(A-n)/(a-r+Ro),c=Math.sqrt(e*e/(1+l*l));a<r&&(c*=-1);var u=l*c,p=null;if(a===r)p={x:o,y:s+u};else if((s-n)/(o-r+Ro)===l)p={x:o+c,y:s+u};else{var h=0,d=0,w=this.getLineLength(r,n,a,A);if(w<Ro)return null;var g=(o-r)*(a-r)+(s-n)*(A-n);g/=w*w,h=r+g*(a-r),d=n+g*(A-n);var y=this.getLineLength(o,s,h,d),m=Math.sqrt(e*e-y*y);c=Math.sqrt(m*m/(1+l*l)),a<r&&(c*=-1),u=l*c,p={x:h+c,y:d+u}}return p}getPointOnPath(e){var r=this.getPathLength(),n=0,a=null;if(e<-5e-5||e-5e-5>r)return null;var{dataArray:A}=this;for(var o of A){if(o&&(o.pathLength<5e-5||n+o.pathLength+5e-5<e)){n+=o.pathLength;continue}var s=e-n,l=0;switch(o.type){case Tt.LINE_TO:a=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case Tt.ARC:{var c=o.points[4],u=o.points[5],p=o.points[4]+u;if(l=c+s/o.pathLength*u,u<0&&l<p||u>=0&&l>p)break;a=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],l,o.points[6]);break}case Tt.CURVE_TO:l=s/o.pathLength,l>1&&(l=1),a=this.getPointOnCubicBezier(l,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case Tt.QUAD_TO:l=s/o.pathLength,l>1&&(l=1),a=this.getPointOnQuadraticBezier(l,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(a)return a;break}return null}getLineLength(e,r,n,a){return Math.sqrt((n-e)*(n-e)+(a-r)*(a-r))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,r)=>r.pathLength>0?e+r.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,r,n,a,A,o,s,l,c){var u=l*Zp(e)+o*em(e)+a*tm(e)+r*rm(e),p=c*Zp(e)+s*em(e)+A*tm(e)+n*rm(e);return{x:u,y:p}}getPointOnQuadraticBezier(e,r,n,a,A,o,s){var l=o*nm(e)+a*am(e)+r*Am(e),c=s*nm(e)+A*am(e)+n*Am(e);return{x:l,y:c}}getPointOnEllipticalArc(e,r,n,a,A,o){var s=Math.cos(o),l=Math.sin(o),c={x:n*Math.cos(A),y:a*Math.sin(A)};return{x:e+(c.x*s-c.y*l),y:r+(c.x*l+c.y*s)}}buildEquidistantCache(e,r){var n=this.getPathLength(),a=r||.25,A=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==A||this.equidistantCache.precision!==a){this.equidistantCache={step:A,precision:a,points:[]};for(var o=0,s=0;s<=n;s+=a){var l=this.getPointOnPath(s),c=this.getPointOnPath(s+a);!l||!c||(o+=this.getLineLength(l.x,l.y,c.x,c.y),o>=A&&(this.equidistantCache.points.push({x:l.x,y:l.y,distance:s}),o-=A))}}}getEquidistantPointOnPath(e,r,n){if(this.buildEquidistantCache(r,n),e<0||e-this.getPathLength()>5e-5)return null;var a=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[a]||null}}var ZAe=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class P4 extends zi{constructor(e,r,n){super(e,r,n),this.type="image",this.loaded=!1;var a=this.getHrefAttribute().getString();if(a){var A=a.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(a);e.images.push(this),A?this.loadSvg(a):this.loadImage(a),this.isSvg=A}}loadImage(e){var r=this;return ni(function*(){try{var n=yield r.document.createImage(e);r.image=n}catch(a){console.error('Error while loading image "'.concat(e,'":'),a)}r.loaded=!0})()}loadSvg(e){var r=this;return ni(function*(){var n=ZAe.exec(e);if(n){var a=n[5];n[4]==="base64"?r.image=atob(a):r.image=decodeURIComponent(a)}else try{var A=yield r.document.fetch(e),o=yield A.text();r.image=o}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}r.loaded=!0})()}renderChildren(e){var{document:r,image:n,loaded:a}=this,A=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y");if(!(!a||!n||!s||!l)){if(e.save(),e.translate(A,o),this.isSvg){var c=r.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:l});c.document.documentElement.parent=this,c.render()}else{var u=this.image;r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:u.width,height:l,desiredHeight:u.height}),this.loaded&&(typeof u.complete>"u"||u.complete)&&e.drawImage(u,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");return new Oa(e,r,e+n,r+a)}}class M4 extends zi{constructor(){super(...arguments),this.type="symbol"}render(e){}}class R4{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,r){var n=this;return ni(function*(){try{var{document:a}=n,A=yield a.canvg.parser.load(r),o=A.getElementsByTagName("font");Array.from(o).forEach(s=>{var l=a.createElement(s);a.definitions[e]=l})}catch(s){console.error('Error while loading font "'.concat(r,'":'),s)}n.loaded=!0})()}}class hm extends pr{constructor(e,r,n){super(e,r,n),this.type="style";var a=Po(Array.from(r.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),A=a.split("}");A.forEach(o=>{var s=o.trim();if(s){var l=s.split("{"),c=l[0].split(","),u=l[1].split(";");c.forEach(p=>{var h=p.trim();if(h){var d=e.styles[h]||{};if(u.forEach(y=>{var m=y.indexOf(":"),F=y.substr(0,m).trim(),N=y.substr(m+1,y.length-m).trim();F&&N&&(d[F]=new pt(e,F,N))}),e.styles[h]=d,e.stylesSpecificity[h]=s4(h),h==="@font-face"){var w=d["font-family"].getString().replace(/"|'/g,""),g=d.src.getString().split(",");g.forEach(y=>{if(y.indexOf('format("svg")')>0){var m=qp(y);m&&new R4(e).load(w,m)}})}}})}})}}hm.parseExternalUrl=qp;class H4 extends zi{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var r=this.getAttribute("x"),n=this.getAttribute("y");r.hasValue()&&e.translate(r.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}path(e){var{element:r}=this;r&&r.path(e)}renderChildren(e){var{document:r,element:n}=this;if(n){var a=n;if(n.type==="symbol"&&(a=new Xs(r,null),a.attributes.viewBox=new pt(r,"viewBox",n.getAttribute("viewBox").getString()),a.attributes.preserveAspectRatio=new pt(r,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),a.attributes.overflow=new pt(r,"overflow",n.getAttribute("overflow").getString()),a.children=n.children,n.styles.opacity=new pt(r,"opacity",this.calculateOpacity())),a.type==="svg"){var A=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);A.hasValue()&&(a.attributes.width=new pt(r,"width",A.getString())),o.hasValue()&&(a.attributes.height=new pt(r,"height",o.getString()))}var s=a.parent;a.parent=this,a.render(e),a.parent=s}}getBoundingBox(e){var{element:r}=this;return r?r.getBoundingBox(e):null}elementTransform(){var{document:e,element:r}=this;return $i.fromElement(e,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function qf(t,e,r,n,a,A){return t[r*n*4+e*4+A]}function Yf(t,e,r,n,a,A,o){t[r*n*4+e*4+A]=o}function Yr(t,e,r){var n=t[e];return n*r}function oi(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}class fm extends pr{constructor(e,r,n){super(e,r,n),this.type="feColorMatrix";var a=ia(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var A=a[0];a=[.213+.787*A,.715-.715*A,.072-.072*A,0,0,.213-.213*A,.715+.285*A,.072-.072*A,0,0,.213-.213*A,.715-.715*A,.072+.928*A,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=a[0]*Math.PI/180;a=[oi(o,.213,.787,-.213),oi(o,.715,-.715,-.715),oi(o,.072,-.072,.928),0,0,oi(o,.213,-.213,.143),oi(o,.715,.285,.14),oi(o,.072,-.072,-.283),0,0,oi(o,.213,-.213,-.787),oi(o,.715,-.715,.715),oi(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=a,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,r,n,a,A){for(var{includeOpacity:o,matrix:s}=this,l=e.getImageData(0,0,a,A),c=0;c<A;c++)for(var u=0;u<a;u++){var p=qf(l.data,u,c,a,A,0),h=qf(l.data,u,c,a,A,1),d=qf(l.data,u,c,a,A,2),w=qf(l.data,u,c,a,A,3),g=Yr(s,0,p)+Yr(s,1,h)+Yr(s,2,d)+Yr(s,3,w)+Yr(s,4,1),y=Yr(s,5,p)+Yr(s,6,h)+Yr(s,7,d)+Yr(s,8,w)+Yr(s,9,1),m=Yr(s,10,p)+Yr(s,11,h)+Yr(s,12,d)+Yr(s,13,w)+Yr(s,14,1),F=Yr(s,15,p)+Yr(s,16,h)+Yr(s,17,d)+Yr(s,18,w)+Yr(s,19,1);o&&(g=0,y=0,m=0,F*=w/255),Yf(l.data,u,c,a,A,0,g),Yf(l.data,u,c,a,A,1,y),Yf(l.data,u,c,a,A,2,m),Yf(l.data,u,c,a,A,3,F)}e.clearRect(0,0,a,A),e.putImageData(l,0,0)}}class Uc extends pr{constructor(){super(...arguments),this.type="mask"}apply(e,r){var{document:n}=this,a=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var l=new Oa;this.children.forEach(w=>{l.addBoundingBox(w.getBoundingBox(e))}),a=Math.floor(l.x1),A=Math.floor(l.y1),o=Math.floor(l.width),s=Math.floor(l.height)}var c=this.removeStyles(r,Uc.ignoreStyles),u=n.createCanvas(a+o,A+s),p=u.getContext("2d");n.screen.setDefaults(p),this.renderChildren(p),new fm(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(p,0,0,a+o,A+s);var h=n.createCanvas(a+o,A+s),d=h.getContext("2d");n.screen.setDefaults(d),r.render(d),d.globalCompositeOperation="destination-in",d.fillStyle=p.createPattern(u,"no-repeat"),d.fillRect(0,0,a+o,A+s),e.fillStyle=d.createPattern(h,"no-repeat"),e.fillRect(0,0,a+o,A+s),this.restoreStyles(r,c)}render(e){}}Uc.ignoreStyles=["mask","transform","clip-path"];var V4=()=>{};class $4 extends pr{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:r}=this,n=Reflect.getPrototypeOf(e),{beginPath:a,closePath:A}=e;n&&(n.beginPath=V4,n.closePath=V4),Reflect.apply(a,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=$i.fromElement(r,o)),s&&s.apply(e),o.path(e),n&&(n.closePath=A),s&&s.unapply(e)}}),Reflect.apply(A,e,[]),e.clip(),n&&(n.beginPath=a,n.closePath=A)}render(e){}}class Ic extends pr{constructor(){super(...arguments),this.type="filter"}apply(e,r){var{document:n,children:a}=this,A=r.getBoundingBox(e);if(A){var o=0,s=0;a.forEach(m=>{var F=m.extraFilterDistance||0;o=Math.max(o,F),s=Math.max(s,F)});var l=Math.floor(A.width),c=Math.floor(A.height),u=l+2*o,p=c+2*s;if(!(u<1||p<1)){var h=Math.floor(A.x),d=Math.floor(A.y),w=this.removeStyles(r,Ic.ignoreStyles),g=n.createCanvas(u,p),y=g.getContext("2d");n.screen.setDefaults(y),y.translate(-h+o,-d+s),r.render(y),a.forEach(m=>{typeof m.apply=="function"&&m.apply(y,0,0,u,p)}),e.drawImage(g,0,0,u,p,h-o,d-s,u,p),this.restoreStyles(r,w)}}}render(e){}}Ic.ignoreStyles=["filter","transform","clip-path"];class z4 extends pr{constructor(e,r,n){super(e,r,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,r,n,a,A){}}class K4 extends pr{constructor(){super(...arguments),this.type="feMorphology"}apply(e,r,n,a,A){}}class G4 extends pr{constructor(){super(...arguments),this.type="feComposite"}apply(e,r,n,a,A){}}class j4 extends pr{constructor(e,r,n){super(e,r,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,r,n,a,A){var{document:o,blurRadius:s}=this,l=o.window?o.window.document.body:null,c=e.canvas;c.id=o.getUniqueId(),l&&(c.style.display="none",l.appendChild(c)),NAe(c,r,n,a,A,s),l&&l.removeChild(c)}}class W4 extends pr{constructor(){super(...arguments),this.type="title"}}class X4 extends pr{constructor(){super(...arguments),this.type="desc"}}var eie={svg:Xs,rect:lm,circle:v4,ellipse:w4,line:B4,polyline:cm,polygon:x4,path:tr,pattern:b4,marker:C4,defs:E4,linearGradient:_4,radialGradient:F4,stop:S4,animate:Wf,animateColor:k4,animateTransform:T4,font:N4,"font-face":L4,"missing-glyph":U4,glyph:sm,text:ii,tspan:Lc,tref:I4,a:D4,textPath:O4,image:P4,g:jf,symbol:M4,style:hm,use:H4,mask:Uc,clipPath:$4,filter:Ic,feDropShadow:z4,feMorphology:K4,feComposite:G4,feColorMatrix:fm,feGaussianBlur:j4,title:W4,desc:X4};function q4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function tie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?q4(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rie(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}function nie(t){return dm.apply(this,arguments)}function dm(){return dm=ni(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=document.createElement("img");return e&&(r.crossOrigin="Anonymous"),new Promise((n,a)=>{r.onload=()=>{n(r)},r.onerror=(A,o,s,l,c)=>{a(c)},r.src=t})}),dm.apply(this,arguments)}class si{constructor(e){var{rootEmSize:r=12,emSize:n=12,createCanvas:a=si.createCanvas,createImage:A=si.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=r,this.emSize=n,this.createCanvas=a,this.createImage=this.bindCreateImage(A,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,r){return typeof r=="boolean"?(n,a)=>e(n,typeof a=="boolean"?a:r):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:r}=this;r.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var r=this.createElement(e.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=si.elementTypes[r];return typeof n<"u"?new n(this,e):new y4(this,e)}createTextNode(e){return new JAe(this,e)}setViewBox(e){this.screen.setViewBox(tie({document:this},e))}}si.createCanvas=rie,si.createImage=nie,si.elementTypes=eie;function Y4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ho(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y4(Object(r),!0).forEach(function(n){Pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y4(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}class Vo{constructor(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Gf(n),this.screen=new Nc(e,n),this.options=n;var a=new si(this,n),A=a.createDocumentElement(r);this.document=a,this.documentElement=A}static from(e,r){var n=arguments;return ni(function*(){var a=n.length>2&&n[2]!==void 0?n[2]:{},A=new Gf(a),o=yield A.parse(r);return new Vo(e,o,a)})()}static fromString(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=new Gf(n),A=a.parseFromString(r);return new Vo(e,A,n)}fork(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Vo.from(e,r,Ho(Ho({},this.options),n))}forkString(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Vo.fromString(e,r,Ho(Ho({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,r=this;return ni(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};r.start(Ho({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),yield r.ready(),r.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:r,screen:n,options:a}=this;n.start(r,Ho(Ho({enableRedraw:!0},a),e))}stop(){this.screen.stop()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,r,n)}}const aie=Object.freeze(Object.defineProperty({__proto__:null,AElement:D4,AnimateColorElement:k4,AnimateElement:Wf,AnimateTransformElement:T4,BoundingBox:Oa,CB1:Zp,CB2:em,CB3:tm,CB4:rm,Canvg:Vo,CircleElement:v4,ClipPathElement:$4,DefsElement:E4,DescElement:X4,Document:si,Element:pr,EllipseElement:w4,FeColorMatrixElement:fm,FeCompositeElement:G4,FeDropShadowElement:z4,FeGaussianBlurElement:j4,FeMorphologyElement:K4,FilterElement:Ic,Font:Pn,FontElement:N4,FontFaceElement:L4,GElement:jf,GlyphElement:sm,GradientElement:um,ImageElement:P4,LineElement:B4,LinearGradientElement:_4,MarkerElement:C4,MaskElement:Uc,Matrix:im,MissingGlyphElement:U4,Mouse:c4,PSEUDO_ZERO:Ro,Parser:Gf,PathElement:tr,PathParser:Tt,PatternElement:b4,Point:Ur,PolygonElement:x4,PolylineElement:cm,Property:pt,QB1:nm,QB2:am,QB3:Am,RadialGradientElement:F4,RectElement:lm,RenderedElement:zi,Rotate:d4,SVGElement:Xs,SVGFontLoader:R4,Scale:g4,Screen:Nc,Skew:om,SkewX:p4,SkewY:m4,StopElement:S4,StyleElement:hm,SymbolElement:M4,TRefElement:I4,TSpanElement:Lc,TextElement:ii,TextPathElement:O4,TitleElement:W4,Transform:$i,Translate:f4,UnknownElement:y4,UseElement:H4,ViewPort:l4,compressSpaces:Po,default:Vo,getSelectorSpecificity:s4,normalizeAttributeName:i4,normalizeColor:o4,parseExternalUrl:qp,presets:DAe,toNumbers:ia,trimLeft:a4,trimRight:A4,vectorMagnitude:Yp,vectorsAngle:Jp,vectorsRatio:Kf},Symbol.toStringTag,{value:"Module"}));rn.VueUiChestnut=Yz,rn.VueUiDonut=t9,rn.VueUiGauge=u$,rn.VueUiOnion=kK,rn.VueUiQuadrant=IV,rn.VueUiRadar=yH,rn.VueUiRating=TG,rn.VueUiScreenshot=fG,rn.VueUiSkeleton=kj,rn.VueUiTable=hR,rn.VueUiVerticalBar=hG,rn.VueUiWaffle=U9,rn.VueUiXy=H7,Object.defineProperty(rn,Symbol.toStringTag,{value:"Module"})});