import{c as Ln,b as Fr,d as cr,r as YA,x as ge,aT as bn,aU as xn,Y as Sn,X as Dn,w as Tn,g as On,v as Mn,a as E,I as hr,Z as dr,ac as pr,ad as Rn,W as Gn,k as Vn,D as Qr,y as HB,af as Nn,V as vB,A as RA,F as Vt,C as ft,M as Er,z as Pn,ap as Xn,L as _n,a0 as kn,a5 as Ct,aV as Jn,E as Ut,aq as Wn}from"./index-5a763f46.js";import{M as Yn}from"./index-d6ed1881.js";import{g as $A,s as AA}from"./index-49d43d61.js";import{T as Zn}from"./index-7621110b.js";import"./index-89035dfd.js";import"./index-18ed1ff2.js";const[qn,Ae]=Ln("notice-bar"),zn={text:String,mode:String,color:String,delay:Fr(1),speed:Fr(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var jn=cr({name:qn,props:zn,emits:["close","replay"],setup(e,{emit:A,slots:t}){let r=0,B=0,n;const s=YA(),i=YA(),a=ge({show:!0,offset:0,duration:0}),o=()=>{if(t["left-icon"])return t["left-icon"]();if(e.leftIcon)return E(hr,{class:Ae("left-icon"),name:e.leftIcon},null)},c=()=>{if(e.mode==="closeable")return"cross";if(e.mode==="link")return"arrow"},Q=F=>{e.mode==="closeable"&&(a.show=!1,A("close",F))},g=()=>{if(t["right-icon"])return t["right-icon"]();const F=c();if(F)return E(hr,{name:F,class:Ae("right-icon"),onClick:Q},null)},U=()=>{a.offset=r,a.duration=0,Rn(()=>{pr(()=>{a.offset=-B,a.duration=(B+r)/+e.speed,A("replay")})})},l=()=>{const F=e.scrollable===!1&&!e.wrapable,w={transform:a.offset?`translateX(${a.offset}px)`:"",transitionDuration:`${a.duration}s`};return E("div",{ref:s,role:"marquee",class:Ae("wrap")},[E("div",{ref:i,style:w,class:[Ae("content"),{"van-ellipsis":F}],onTransitionend:U},[t.default?t.default():e.text])])},u=()=>{const{delay:F,speed:w,scrollable:f}=e,m=Gn(F)?+F*1e3:0;r=0,B=0,a.offset=0,a.duration=0,clearTimeout(n),n=setTimeout(()=>{if(!s.value||!i.value||f===!1)return;const H=dr(s).width,h=dr(i).width;(f||h>H)&&pr(()=>{r=H,B=h,a.offset=-B,a.duration=B/+w})},m)};return bn(u),xn(u),Sn("pageshow",u),Dn({reset:u}),Tn(()=>[e.text,e.scrollable],u),()=>{const{color:F,wrapable:w,background:f}=e;return On(E("div",{role:"alert",class:Ae({wrapable:w}),style:{color:F,background:f}},[o(),l(),g()]),[[Mn,a.show]])}}});const Hr=Vn(jn),$n="_back_sxu0o_1",As="_container_sxu0o_16",es="_content_sxu0o_22",ts="_opacityBg_sxu0o_27",rs="_leftContent_sxu0o_32",Bs="_leftBg_sxu0o_37",ns="_leftBg2_sxu0o_48",ss="_types_sxu0o_58",as="_type_sxu0o_58",is="_typeActive_sxu0o_78",os="_typeImg_sxu0o_78",cs="_scaleBtn_sxu0o_1",Qs="_typeIcon_sxu0o_92",gs="_center_sxu0o_103",ws="_centerSearch_sxu0o_110",ls="_musicContent_sxu0o_121",us="_searchNotice_sxu0o_132",fs="_searchNoticeShow_sxu0o_141",Cs="_musicItem_sxu0o_144",Us="_disableNotic_sxu0o_157",Fs="_musicActive_sxu0o_161",hs="_musicAvtor_sxu0o_171",ds="_musicInfo_sxu0o_185",ps="_musicName_sxu0o_188",Es="_noticeBar_sxu0o_193",Hs="_musicDes_sxu0o_197",vs="_musicFavitor_sxu0o_202",Is="_musicAuthor_sxu0o_214",ms="_musicIcon_sxu0o_222",ys="_right_sxu0o_226",Ks="_staff_sxu0o_242",Ls="_rightBox_sxu0o_245",bs="_rightBtns_sxu0o_251",xs="_rightBtnsRight_sxu0o_272",Ss="_loadingWrap_sxu0o_298",Ds="_empty_sxu0o_303",Ts="_displayIcon_sxu0o_1",K={back:$n,container:As,content:es,opacityBg:ts,leftContent:rs,leftBg:Bs,leftBg2:ns,types:ss,type:as,typeActive:is,typeImg:os,scaleBtn:cs,typeIcon:Qs,center:gs,centerSearch:ws,musicContent:ls,searchNotice:us,searchNoticeShow:fs,musicItem:Cs,disableNotic:Us,musicActive:Fs,musicAvtor:hs,musicInfo:ds,musicName:ps,noticeBar:Es,musicDes:Hs,musicFavitor:vs,musicAuthor:Is,musicIcon:ms,right:ys,"right-musicName":"_right-musicName_sxu0o_234",staff:Ks,rightBox:Ls,rightBtns:bs,rightBtnsRight:xs,loadingWrap:Ss,empty:Ds,displayIcon:Ts},Os=""+new URL("icon_back-b80c2fc2.svg",import.meta.url).href,Ms=""+new URL("icon_down-27184904.svg",import.meta.url).href,Rs=""+new URL("icon_jianpu-80bd16a8.svg",import.meta.url).href,Gs=""+new URL("icon_jianpuActive-17580202.svg",import.meta.url).href,Vs="data:image/png;base64, ",Ns={icon_start:Vs};/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Nt=function(e,A){return Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var B in r)Object.prototype.hasOwnProperty.call(r,B)&&(t[B]=r[B])},Nt(e,A)};function sA(e,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");Nt(e,A);function t(){this.constructor=e}e.prototype=A===null?Object.create(A):(t.prototype=A.prototype,new t)}var Pt=function(){return Pt=Object.assign||function(A){for(var t,r=1,B=arguments.length;r<B;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(A[n]=t[n])}return A},Pt.apply(this,arguments)};function W(e,A,t,r){function B(n){return n instanceof t?n:new t(function(s){s(n)})}return new(t||(t=Promise))(function(n,s){function i(c){try{o(r.next(c))}catch(Q){s(Q)}}function a(c){try{o(r.throw(c))}catch(Q){s(Q)}}function o(c){c.done?n(c.value):B(c.value).then(i,a)}o((r=r.apply(e,A||[])).next())})}function k(e,A){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,B,n,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(o){return function(c){return a([o,c])}}function a(o){if(r)throw new TypeError("Generator is already executing.");for(;t;)try{if(r=1,B&&(n=o[0]&2?B.return:o[0]?B.throw||((n=B.return)&&n.call(B),0):B.next)&&!(n=n.call(B,o[1])).done)return n;switch(B=0,n&&(o=[o[0]&2,n.value]),o[0]){case 0:case 1:n=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,B=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){t.label=o[1];break}if(o[0]===6&&t.label<n[1]){t.label=n[1],n=o;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(o);break}n[2]&&t.ops.pop(),t.trys.pop();continue}o=A.call(e,t)}catch(c){o=[6,c],B=0}finally{r=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function Ee(e,A,t){if(t||arguments.length===2)for(var r=0,B=A.length,n;r<B;r++)(n||!(r in A))&&(n||(n=Array.prototype.slice.call(A,0,r)),n[r]=A[r]);return e.concat(n||A)}var fA=function(){function e(A,t,r,B){this.left=A,this.top=t,this.width=r,this.height=B}return e.prototype.add=function(A,t,r,B){return new e(this.left+A,this.top+t,this.width+r,this.height+B)},e.fromClientRect=function(A,t){return new e(t.left+A.windowBounds.left,t.top+A.windowBounds.top,t.width,t.height)},e.fromDOMRectList=function(A,t){var r=Array.from(t).find(function(B){return B.width!==0});return r?new e(r.left+A.windowBounds.left,r.top+A.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),st=function(e,A){return fA.fromClientRect(e,A.getBoundingClientRect())},Ps=function(e){var A=e.body,t=e.documentElement;if(!A||!t)throw new Error("Unable to get document size");var r=Math.max(Math.max(A.scrollWidth,t.scrollWidth),Math.max(A.offsetWidth,t.offsetWidth),Math.max(A.clientWidth,t.clientWidth)),B=Math.max(Math.max(A.scrollHeight,t.scrollHeight),Math.max(A.offsetHeight,t.offsetHeight),Math.max(A.clientHeight,t.clientHeight));return new fA(0,0,r,B)},at=function(e){for(var A=[],t=0,r=e.length;t<r;){var B=e.charCodeAt(t++);if(B>=55296&&B<=56319&&t<r){var n=e.charCodeAt(t++);(n&64512)===56320?A.push(((B&1023)<<10)+(n&1023)+65536):(A.push(B),t--)}else A.push(B)}return A},M=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var t=e.length;if(!t)return"";for(var r=[],B=-1,n="";++B<t;){var s=e[B];s<=65535?r.push(s):(s-=65536,r.push((s>>10)+55296,s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var He=0;He<vr.length;He++)Xs[vr.charCodeAt(He)]=He;var Ir="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ne=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ve=0;ve<Ir.length;ve++)ne[Ir.charCodeAt(ve)]=ve;var _s=function(e){var A=e.length*.75,t=e.length,r,B=0,n,s,i,a;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);var o=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(A):new Array(A),c=Array.isArray(o)?o:new Uint8Array(o);for(r=0;r<t;r+=4)n=ne[e.charCodeAt(r)],s=ne[e.charCodeAt(r+1)],i=ne[e.charCodeAt(r+2)],a=ne[e.charCodeAt(r+3)],c[B++]=n<<2|s>>4,c[B++]=(s&15)<<4|i>>2,c[B++]=(i&3)<<6|a&63;return o},ks=function(e){for(var A=e.length,t=[],r=0;r<A;r+=2)t.push(e[r+1]<<8|e[r]);return t},Js=function(e){for(var A=e.length,t=[],r=0;r<A;r+=4)t.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return t},TA=5,gr=6+5,Ft=2,Ws=gr-TA,IB=65536>>TA,Ys=1<<TA,ht=Ys-1,Zs=1024>>TA,qs=IB+Zs,zs=qs,js=32,$s=zs+js,Aa=65536>>gr,ea=1<<Ws,ta=ea-1,mr=function(e,A,t){return e.slice?e.slice(A,t):new Uint16Array(Array.prototype.slice.call(e,A,t))},ra=function(e,A,t){return e.slice?e.slice(A,t):new Uint32Array(Array.prototype.slice.call(e,A,t))},Ba=function(e,A){var t=_s(e),r=Array.isArray(t)?Js(t):new Uint32Array(t),B=Array.isArray(t)?ks(t):new Uint16Array(t),n=24,s=mr(B,n/2,r[4]/2),i=r[5]===2?mr(B,(n+r[4])/2):ra(r,Math.ceil((n+r[4])/4));return new na(r[0],r[1],r[2],r[3],s,i)},na=function(){function e(A,t,r,B,n,s){this.initialValue=A,this.errorValue=t,this.highStart=r,this.highValueIndex=B,this.index=n,this.data=s}return e.prototype.get=function(A){var t;if(A>=0){if(A<55296||A>56319&&A<=65535)return t=this.index[A>>TA],t=(t<<Ft)+(A&ht),this.data[t];if(A<=65535)return t=this.index[IB+(A-55296>>TA)],t=(t<<Ft)+(A&ht),this.data[t];if(A<this.highStart)return t=$s-Aa+(A>>gr),t=this.index[t],t+=A>>TA&ta,t=this.index[t],t=(t<<Ft)+(A&ht),this.data[t];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),yr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ie=0;Ie<yr.length;Ie++)sa[yr.charCodeAt(Ie)]=Ie;var aa=" ",Kr=50,ia=1,mB=2,yB=3,oa=4,ca=5,Lr=7,KB=8,br=9,pA=10,Xt=11,xr=12,_t=13,Qa=14,se=15,kt=16,me=17,ee=18,ga=19,Sr=20,Jt=21,te=22,dt=23,GA=24,$=25,ae=26,ie=27,VA=28,wa=29,SA=30,la=31,ye=32,Ke=33,Wt=34,Yt=35,Zt=36,Ue=37,qt=38,Je=39,We=40,pt=41,LB=42,ua=43,fa=[9001,65288],bB="!",L="×",Le="÷",zt=Ba(aa),wA=[SA,Zt],jt=[ia,mB,yB,ca],xB=[pA,KB],Dr=[ie,ae],Ca=jt.concat(xB),Tr=[qt,Je,We,Wt,Yt],Ua=[se,_t],Fa=function(e,A){A===void 0&&(A="strict");var t=[],r=[],B=[];return e.forEach(function(n,s){var i=zt.get(n);if(i>Kr?(B.push(!0),i-=Kr):B.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(n)!==-1)return r.push(s),t.push(kt);if(i===oa||i===Xt){if(s===0)return r.push(s),t.push(SA);var a=t[s-1];return Ca.indexOf(a)===-1?(r.push(r[s-1]),t.push(a)):(r.push(s),t.push(SA))}if(r.push(s),i===la)return t.push(A==="strict"?Jt:Ue);if(i===LB||i===wa)return t.push(SA);if(i===ua)return n>=131072&&n<=196605||n>=196608&&n<=262141?t.push(Ue):t.push(SA);t.push(i)}),[r,t,B]},Et=function(e,A,t,r){var B=r[t];if(Array.isArray(e)?e.indexOf(B)!==-1:e===B)for(var n=t;n<=r.length;){n++;var s=r[n];if(s===A)return!0;if(s!==pA)break}if(B===pA)for(var n=t;n>0;){n--;var i=r[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var a=t;a<=r.length;){a++;var s=r[a];if(s===A)return!0;if(s!==pA)break}if(i!==pA)break}return!1},Or=function(e,A){for(var t=e;t>=0;){var r=A[t];if(r===pA)t--;else return r}return 0},ha=function(e,A,t,r,B){if(t[r]===0)return L;var n=r-1;if(Array.isArray(B)&&B[n]===!0)return L;var s=n-1,i=n+1,a=A[n],o=s>=0?A[s]:0,c=A[i];if(a===mB&&c===yB)return L;if(jt.indexOf(a)!==-1)return bB;if(jt.indexOf(c)!==-1||xB.indexOf(c)!==-1)return L;if(Or(n,A)===KB)return Le;if(zt.get(e[n])===Xt||(a===ye||a===Ke)&&zt.get(e[i])===Xt||a===Lr||c===Lr||a===br||[pA,_t,se].indexOf(a)===-1&&c===br||[me,ee,ga,GA,VA].indexOf(c)!==-1||Or(n,A)===te||Et(dt,te,n,A)||Et([me,ee],Jt,n,A)||Et(xr,xr,n,A))return L;if(a===pA)return Le;if(a===dt||c===dt)return L;if(c===kt||a===kt)return Le;if([_t,se,Jt].indexOf(c)!==-1||a===Qa||o===Zt&&Ua.indexOf(a)!==-1||a===VA&&c===Zt||c===Sr||wA.indexOf(c)!==-1&&a===$||wA.indexOf(a)!==-1&&c===$||a===ie&&[Ue,ye,Ke].indexOf(c)!==-1||[Ue,ye,Ke].indexOf(a)!==-1&&c===ae||wA.indexOf(a)!==-1&&Dr.indexOf(c)!==-1||Dr.indexOf(a)!==-1&&wA.indexOf(c)!==-1||[ie,ae].indexOf(a)!==-1&&(c===$||[te,se].indexOf(c)!==-1&&A[i+1]===$)||[te,se].indexOf(a)!==-1&&c===$||a===$&&[$,VA,GA].indexOf(c)!==-1)return L;if([$,VA,GA,me,ee].indexOf(c)!==-1)for(var Q=n;Q>=0;){var g=A[Q];if(g===$)return L;if([VA,GA].indexOf(g)!==-1)Q--;else break}if([ie,ae].indexOf(c)!==-1)for(var Q=[me,ee].indexOf(a)!==-1?s:n;Q>=0;){var g=A[Q];if(g===$)return L;if([VA,GA].indexOf(g)!==-1)Q--;else break}if(qt===a&&[qt,Je,Wt,Yt].indexOf(c)!==-1||[Je,Wt].indexOf(a)!==-1&&[Je,We].indexOf(c)!==-1||[We,Yt].indexOf(a)!==-1&&c===We||Tr.indexOf(a)!==-1&&[Sr,ae].indexOf(c)!==-1||Tr.indexOf(c)!==-1&&a===ie||wA.indexOf(a)!==-1&&wA.indexOf(c)!==-1||a===GA&&wA.indexOf(c)!==-1||wA.concat($).indexOf(a)!==-1&&c===te&&fa.indexOf(e[i])===-1||wA.concat($).indexOf(c)!==-1&&a===ee)return L;if(a===pt&&c===pt){for(var U=t[n],l=1;U>0&&(U--,A[U]===pt);)l++;if(l%2!==0)return L}return a===ye&&c===Ke?L:Le},da=function(e,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var t=Fa(e,A.lineBreak),r=t[0],B=t[1],n=t[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(B=B.map(function(i){return[$,SA,LB].indexOf(i)!==-1?Ue:i}));var s=A.wordBreak==="keep-all"?n.map(function(i,a){return i&&e[a]>=19968&&e[a]<=40959}):void 0;return[r,B,s]},pa=function(){function e(A,t,r,B){this.codePoints=A,this.required=t===bB,this.start=r,this.end=B}return e.prototype.slice=function(){return M.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Ea=function(e,A){var t=at(e),r=da(t,A),B=r[0],n=r[1],s=r[2],i=t.length,a=0,o=0;return{next:function(){if(o>=i)return{done:!0,value:null};for(var c=L;o<i&&(c=ha(t,n,B,++o,s))===L;);if(c!==L||o===i){var Q=new pa(t,c,a,o);return a=o,{value:Q,done:!1}}return{done:!0,value:null}}}},Ha=1,va=2,de=4,Mr=8,qe=10,Rr=47,we=92,Ia=9,ma=32,be=34,re=61,ya=35,Ka=36,La=37,xe=39,Se=40,Be=41,ba=95,z=45,xa=33,Sa=60,Da=62,Ta=64,Oa=91,Ma=93,Ra=61,Ga=123,De=63,Va=125,Gr=124,Na=126,Pa=128,Vr=65533,Ht=42,DA=43,Xa=44,_a=58,ka=59,Fe=46,Ja=0,Wa=8,Ya=11,Za=14,qa=31,za=127,iA=-1,SB=48,DB=97,TB=101,ja=102,$a=117,Ai=122,OB=65,MB=69,RB=70,ei=85,ti=90,J=function(e){return e>=SB&&e<=57},ri=function(e){return e>=55296&&e<=57343},NA=function(e){return J(e)||e>=OB&&e<=RB||e>=DB&&e<=ja},Bi=function(e){return e>=DB&&e<=Ai},ni=function(e){return e>=OB&&e<=ti},si=function(e){return Bi(e)||ni(e)},ai=function(e){return e>=Pa},Te=function(e){return e===qe||e===Ia||e===ma},ze=function(e){return si(e)||ai(e)||e===ba},Nr=function(e){return ze(e)||J(e)||e===z},ii=function(e){return e>=Ja&&e<=Wa||e===Ya||e>=Za&&e<=qa||e===za},dA=function(e,A){return e!==we?!1:A!==qe},Oe=function(e,A,t){return e===z?ze(A)||dA(A,t):ze(e)?!0:!!(e===we&&dA(e,A))},vt=function(e,A,t){return e===DA||e===z?J(A)?!0:A===Fe&&J(t):J(e===Fe?A:e)},oi=function(e){var A=0,t=1;(e[A]===DA||e[A]===z)&&(e[A]===z&&(t=-1),A++);for(var r=[];J(e[A]);)r.push(e[A++]);var B=r.length?parseInt(M.apply(void 0,r),10):0;e[A]===Fe&&A++;for(var n=[];J(e[A]);)n.push(e[A++]);var s=n.length,i=s?parseInt(M.apply(void 0,n),10):0;(e[A]===MB||e[A]===TB)&&A++;var a=1;(e[A]===DA||e[A]===z)&&(e[A]===z&&(a=-1),A++);for(var o=[];J(e[A]);)o.push(e[A++]);var c=o.length?parseInt(M.apply(void 0,o),10):0;return t*(B+i*Math.pow(10,-s))*Math.pow(10,a*c)},ci={type:2},Qi={type:3},gi={type:4},wi={type:13},li={type:8},ui={type:21},fi={type:9},Ci={type:10},Ui={type:11},Fi={type:12},hi={type:14},Me={type:23},di={type:1},pi={type:25},Ei={type:24},Hi={type:26},vi={type:27},Ii={type:28},mi={type:29},yi={type:31},$t={type:32},GB=function(){function e(){this._value=[]}return e.prototype.write=function(A){this._value=this._value.concat(at(A))},e.prototype.read=function(){for(var A=[],t=this.consumeToken();t!==$t;)A.push(t),t=this.consumeToken();return A},e.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case be:return this.consumeStringToken(be);case ya:var t=this.peekCodePoint(0),r=this.peekCodePoint(1),B=this.peekCodePoint(2);if(Nr(t)||dA(r,B)){var n=Oe(t,r,B)?va:Ha,s=this.consumeName();return{type:5,value:s,flags:n}}break;case Ka:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),wi;break;case xe:return this.consumeStringToken(xe);case Se:return ci;case Be:return Qi;case Ht:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),hi;break;case DA:if(vt(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Xa:return gi;case z:var i=A,a=this.peekCodePoint(0),o=this.peekCodePoint(1);if(vt(i,a,o))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(Oe(i,a,o))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(a===z&&o===Da)return this.consumeCodePoint(),this.consumeCodePoint(),Ei;break;case Fe:if(vt(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Rr:if(this.peekCodePoint(0)===Ht)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===Ht&&(c=this.consumeCodePoint(),c===Rr))return this.consumeToken();if(c===iA)return this.consumeToken()}break;case _a:return Hi;case ka:return vi;case Sa:if(this.peekCodePoint(0)===xa&&this.peekCodePoint(1)===z&&this.peekCodePoint(2)===z)return this.consumeCodePoint(),this.consumeCodePoint(),pi;break;case Ta:var Q=this.peekCodePoint(0),g=this.peekCodePoint(1),U=this.peekCodePoint(2);if(Oe(Q,g,U)){var s=this.consumeName();return{type:7,value:s}}break;case Oa:return Ii;case we:if(dA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case Ma:return mi;case Ra:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),li;break;case Ga:return Ui;case Va:return Fi;case $a:case ei:var l=this.peekCodePoint(0),u=this.peekCodePoint(1);return l===DA&&(NA(u)||u===De)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Gr:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),fi;if(this.peekCodePoint(0)===Gr)return this.consumeCodePoint(),ui;break;case Na:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),Ci;break;case iA:return $t}return Te(A)?(this.consumeWhiteSpace(),yi):J(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):ze(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:M(A)}},e.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A>"u"?-1:A},e.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},e.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},e.prototype.consumeUnicodeRangeToken=function(){for(var A=[],t=this.consumeCodePoint();NA(t)&&A.length<6;)A.push(t),t=this.consumeCodePoint();for(var r=!1;t===De&&A.length<6;)A.push(t),t=this.consumeCodePoint(),r=!0;if(r){var B=parseInt(M.apply(void 0,A.map(function(a){return a===De?SB:a})),16),n=parseInt(M.apply(void 0,A.map(function(a){return a===De?RB:a})),16);return{type:30,start:B,end:n}}var s=parseInt(M.apply(void 0,A),16);if(this.peekCodePoint(0)===z&&NA(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];NA(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();var n=parseInt(M.apply(void 0,i),16);return{type:30,start:s,end:n}}else return{type:30,start:s,end:s}},e.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===Se?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Se?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},e.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===iA)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===xe||t===be){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===iA||this.peekCodePoint(0)===Be)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),Me)}for(;;){var B=this.consumeCodePoint();if(B===iA||B===Be)return{type:22,value:M.apply(void 0,A)};if(Te(B))return this.consumeWhiteSpace(),this.peekCodePoint(0)===iA||this.peekCodePoint(0)===Be?(this.consumeCodePoint(),{type:22,value:M.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Me);if(B===be||B===xe||B===Se||ii(B))return this.consumeBadUrlRemnants(),Me;if(B===we)if(dA(B,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Me;else A.push(B)}},e.prototype.consumeWhiteSpace=function(){for(;Te(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Be||A===iA)return;dA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(A){for(var t=5e4,r="";A>0;){var B=Math.min(t,A);r+=M.apply(void 0,this._value.splice(0,B)),A-=B}return this._value.shift(),r},e.prototype.consumeStringToken=function(A){var t="",r=0;do{var B=this._value[r];if(B===iA||B===void 0||B===A)return t+=this.consumeStringSlice(r),{type:0,value:t};if(B===qe)return this._value.splice(0,r),di;if(B===we){var n=this._value[r+1];n!==iA&&n!==void 0&&(n===qe?(t+=this.consumeStringSlice(r),r=-1,this._value.shift()):dA(B,n)&&(t+=this.consumeStringSlice(r),t+=M(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},e.prototype.consumeNumber=function(){var A=[],t=de,r=this.peekCodePoint(0);for((r===DA||r===z)&&A.push(this.consumeCodePoint());J(this.peekCodePoint(0));)A.push(this.consumeCodePoint());r=this.peekCodePoint(0);var B=this.peekCodePoint(1);if(r===Fe&&J(B))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Mr;J(this.peekCodePoint(0));)A.push(this.consumeCodePoint());r=this.peekCodePoint(0),B=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((r===MB||r===TB)&&((B===DA||B===z)&&J(n)||J(B)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Mr;J(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[oi(A),t]},e.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),t=A[0],r=A[1],B=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Oe(B,n,s)){var i=this.consumeName();return{type:15,number:t,flags:r,unit:i}}return B===La?(this.consumeCodePoint(),{type:16,number:t,flags:r}):{type:17,number:t,flags:r}},e.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(NA(A)){for(var t=M(A);NA(this.peekCodePoint(0))&&t.length<6;)t+=M(this.consumeCodePoint());Te(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return r===0||ri(r)||r>1114111?Vr:r}return A===iA?Vr:A},e.prototype.consumeName=function(){for(var A="";;){var t=this.consumeCodePoint();if(Nr(t))A+=M(t);else if(dA(t,this.peekCodePoint(0)))A+=M(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),A}},e}(),VB=function(){function e(A){this._tokens=A}return e.create=function(A){var t=new GB;return t.write(A),new e(t.read())},e.parseValue=function(A){return e.create(A).parseComponentValue()},e.parseValues=function(A){return e.create(A).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===31;)A=this.consumeToken();if(A.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var t=this.consumeComponentValue();do A=this.consumeToken();while(A.type===31);if(A.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var A=[];;){var t=this.consumeComponentValue();if(t.type===32)return A;A.push(t),A.push()}},e.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},e.prototype.consumeSimpleBlock=function(A){for(var t={type:A,values:[]},r=this.consumeToken();;){if(r.type===32||Li(r,A))return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue()),r=this.consumeToken()}},e.prototype.consumeFunction=function(A){for(var t={name:A.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A>"u"?$t:A},e.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},e}(),pe=function(e){return e.type===15},zA=function(e){return e.type===17},S=function(e){return e.type===20},Ki=function(e){return e.type===0},Ar=function(e,A){return S(e)&&e.value===A},NB=function(e){return e.type!==31},qA=function(e){return e.type!==31&&e.type!==4},oA=function(e){var A=[],t=[];return e.forEach(function(r){if(r.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");A.push(t),t=[];return}r.type!==31&&t.push(r)}),t.length&&A.push(t),A},Li=function(e,A){return A===11&&e.type===12||A===28&&e.type===29?!0:A===2&&e.type===3},mA=function(e){return e.type===17||e.type===15},G=function(e){return e.type===16||mA(e)},PB=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},_={type:17,number:0,flags:de},wr={type:16,number:50,flags:de},EA={type:16,number:100,flags:de},oe=function(e,A,t){var r=e[0],B=e[1];return[D(r,A),D(typeof B<"u"?B:r,t)]},D=function(e,A){if(e.type===16)return e.number/100*A;if(pe(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},XB="deg",_B="grad",kB="rad",JB="turn",it={name:"angle",parse:function(e,A){if(A.type===15)switch(A.unit){case XB:return Math.PI*A.number/180;case _B:return Math.PI/200*A.number;case kB:return A.number;case JB:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},WB=function(e){return e.type===15&&(e.unit===XB||e.unit===_B||e.unit===kB||e.unit===JB)},YB=function(e){var A=e.filter(S).map(function(t){return t.value}).join(" ");switch(A){case"to bottom right":case"to right bottom":case"left top":case"top left":return[_,_];case"to top":case"bottom":return rA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[_,EA];case"to right":case"left":return rA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[EA,EA];case"to bottom":case"top":return rA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[EA,_];case"to left":case"right":return rA(270)}return 0},rA=function(e){return Math.PI*e/180},vA={name:"color",parse:function(e,A){if(A.type===18){var t=bi[A.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return t(e,A.values)}if(A.type===5){if(A.value.length===3){var r=A.value.substring(0,1),B=A.value.substring(1,2),n=A.value.substring(2,3);return HA(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),1)}if(A.value.length===4){var r=A.value.substring(0,1),B=A.value.substring(1,2),n=A.value.substring(2,3),s=A.value.substring(3,4);return HA(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(A.value.length===6){var r=A.value.substring(0,2),B=A.value.substring(2,4),n=A.value.substring(4,6);return HA(parseInt(r,16),parseInt(B,16),parseInt(n,16),1)}if(A.value.length===8){var r=A.value.substring(0,2),B=A.value.substring(2,4),n=A.value.substring(4,6),s=A.value.substring(6,8);return HA(parseInt(r,16),parseInt(B,16),parseInt(n,16),parseInt(s,16)/255)}}if(A.type===20){var i=uA[A.value.toUpperCase()];if(typeof i<"u")return i}return uA.TRANSPARENT}},IA=function(e){return(255&e)===0},N=function(e){var A=255&e,t=255&e>>8,r=255&e>>16,B=255&e>>24;return A<255?"rgba("+B+","+r+","+t+","+A/255+")":"rgb("+B+","+r+","+t+")"},HA=function(e,A,t,r){return(e<<24|A<<16|t<<8|Math.round(r*255)<<0)>>>0},Pr=function(e,A){if(e.type===17)return e.number;if(e.type===16){var t=A===3?1:255;return A===3?e.number/100*t:Math.round(e.number/100*t)}return 0},Xr=function(e,A){var t=A.filter(qA);if(t.length===3){var r=t.map(Pr),B=r[0],n=r[1],s=r[2];return HA(B,n,s,1)}if(t.length===4){var i=t.map(Pr),B=i[0],n=i[1],s=i[2],a=i[3];return HA(B,n,s,a)}return 0};function It(e,A,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(A-e)*t*6+e:t<1/2?A:t<2/3?(A-e)*6*(2/3-t)+e:e}var _r=function(e,A){var t=A.filter(qA),r=t[0],B=t[1],n=t[2],s=t[3],i=(r.type===17?rA(r.number):it.parse(e,r))/(Math.PI*2),a=G(B)?B.number/100:0,o=G(n)?n.number/100:0,c=typeof s<"u"&&G(s)?D(s,1):1;if(a===0)return HA(o*255,o*255,o*255,1);var Q=o<=.5?o*(a+1):o+a-o*a,g=o*2-Q,U=It(g,Q,i+1/3),l=It(g,Q,i),u=It(g,Q,i-1/3);return HA(U*255,l*255,u*255,c)},bi={hsl:_r,hsla:_r,rgb:Xr,rgba:Xr},le=function(e,A){return vA.parse(e,VB.create(A).parseComponentValue())},uA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},xi={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,A){return A.map(function(t){if(S(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Si={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ot=function(e,A){var t=vA.parse(e,A[0]),r=A[1];return r&&G(r)?{color:t,stop:r}:{color:t,stop:null}},kr=function(e,A){var t=e[0],r=e[e.length-1];t.stop===null&&(t.stop=_),r.stop===null&&(r.stop=EA);for(var B=[],n=0,s=0;s<e.length;s++){var i=e[s].stop;if(i!==null){var a=D(i,A);a>n?B.push(a):B.push(n),n=a}else B.push(null)}for(var o=null,s=0;s<B.length;s++){var c=B[s];if(c===null)o===null&&(o=s);else if(o!==null){for(var Q=s-o,g=B[o-1],U=(c-g)/(Q+1),l=1;l<=Q;l++)B[o+l-1]=U*l;o=null}}return e.map(function(u,F){var w=u.color;return{color:w,stop:Math.max(Math.min(1,B[F]/A),0)}})},Di=function(e,A,t){var r=A/2,B=t/2,n=D(e[0],A)-r,s=B-D(e[1],t);return(Math.atan2(s,n)+Math.PI*2)%(Math.PI*2)},Ti=function(e,A,t){var r=typeof e=="number"?e:Di(e,A,t),B=Math.abs(A*Math.sin(r))+Math.abs(t*Math.cos(r)),n=A/2,s=t/2,i=B/2,a=Math.sin(r-Math.PI/2)*i,o=Math.cos(r-Math.PI/2)*i;return[B,n-o,n+o,s-a,s+a]},nA=function(e,A){return Math.sqrt(e*e+A*A)},Jr=function(e,A,t,r,B){var n=[[0,0],[0,A],[e,0],[e,A]];return n.reduce(function(s,i){var a=i[0],o=i[1],c=nA(t-a,r-o);return(B?c<s.optimumDistance:c>s.optimumDistance)?{optimumCorner:i,optimumDistance:c}:s},{optimumDistance:B?1/0:-1/0,optimumCorner:null}).optimumCorner},Oi=function(e,A,t,r,B){var n=0,s=0;switch(e.size){case 0:e.shape===0?n=s=Math.min(Math.abs(A),Math.abs(A-r),Math.abs(t),Math.abs(t-B)):e.shape===1&&(n=Math.min(Math.abs(A),Math.abs(A-r)),s=Math.min(Math.abs(t),Math.abs(t-B)));break;case 2:if(e.shape===0)n=s=Math.min(nA(A,t),nA(A,t-B),nA(A-r,t),nA(A-r,t-B));else if(e.shape===1){var i=Math.min(Math.abs(t),Math.abs(t-B))/Math.min(Math.abs(A),Math.abs(A-r)),a=Jr(r,B,A,t,!0),o=a[0],c=a[1];n=nA(o-A,(c-t)/i),s=i*n}break;case 1:e.shape===0?n=s=Math.max(Math.abs(A),Math.abs(A-r),Math.abs(t),Math.abs(t-B)):e.shape===1&&(n=Math.max(Math.abs(A),Math.abs(A-r)),s=Math.max(Math.abs(t),Math.abs(t-B)));break;case 3:if(e.shape===0)n=s=Math.max(nA(A,t),nA(A,t-B),nA(A-r,t),nA(A-r,t-B));else if(e.shape===1){var i=Math.max(Math.abs(t),Math.abs(t-B))/Math.max(Math.abs(A),Math.abs(A-r)),Q=Jr(r,B,A,t,!1),o=Q[0],c=Q[1];n=nA(o-A,(c-t)/i),s=i*n}break}return Array.isArray(e.size)&&(n=D(e.size[0],r),s=e.size.length===2?D(e.size[1],B):n),[n,s]},Mi=function(e,A){var t=rA(180),r=[];return oA(A).forEach(function(B,n){if(n===0){var s=B[0];if(s.type===20&&s.value==="to"){t=YB(B);return}else if(WB(s)){t=it.parse(e,s);return}}var i=ot(e,B);r.push(i)}),{angle:t,stops:r,type:1}},Re=function(e,A){var t=rA(180),r=[];return oA(A).forEach(function(B,n){if(n===0){var s=B[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){t=YB(B);return}else if(WB(s)){t=(it.parse(e,s)+rA(270))%rA(360);return}}var i=ot(e,B);r.push(i)}),{angle:t,stops:r,type:1}},Ri=function(e,A){var t=rA(180),r=[],B=1,n=0,s=3,i=[];return oA(A).forEach(function(a,o){var c=a[0];if(o===0){if(S(c)&&c.value==="linear"){B=1;return}else if(S(c)&&c.value==="radial"){B=2;return}}if(c.type===18){if(c.name==="from"){var Q=vA.parse(e,c.values[0]);r.push({stop:_,color:Q})}else if(c.name==="to"){var Q=vA.parse(e,c.values[0]);r.push({stop:EA,color:Q})}else if(c.name==="color-stop"){var g=c.values.filter(qA);if(g.length===2){var Q=vA.parse(e,g[1]),U=g[0];zA(U)&&r.push({stop:{type:16,number:U.number*100,flags:U.flags},color:Q})}}}}),B===1?{angle:(t+rA(180))%rA(360),stops:r,type:B}:{size:s,shape:n,stops:r,position:i,type:B}},ZB="closest-side",qB="farthest-side",zB="closest-corner",jB="farthest-corner",$B="circle",An="ellipse",en="cover",tn="contain",Gi=function(e,A){var t=0,r=3,B=[],n=[];return oA(A).forEach(function(s,i){var a=!0;if(i===0){var o=!1;a=s.reduce(function(Q,g){if(o)if(S(g))switch(g.value){case"center":return n.push(wr),Q;case"top":case"left":return n.push(_),Q;case"right":case"bottom":return n.push(EA),Q}else(G(g)||mA(g))&&n.push(g);else if(S(g))switch(g.value){case $B:return t=0,!1;case An:return t=1,!1;case"at":return o=!0,!1;case ZB:return r=0,!1;case en:case qB:return r=1,!1;case tn:case zB:return r=2,!1;case jB:return r=3,!1}else if(mA(g)||G(g))return Array.isArray(r)||(r=[]),r.push(g),!1;return Q},a)}if(a){var c=ot(e,s);B.push(c)}}),{size:r,shape:t,stops:B,position:n,type:2}},Ge=function(e,A){var t=0,r=3,B=[],n=[];return oA(A).forEach(function(s,i){var a=!0;if(i===0?a=s.reduce(function(c,Q){if(S(Q))switch(Q.value){case"center":return n.push(wr),!1;case"top":case"left":return n.push(_),!1;case"right":case"bottom":return n.push(EA),!1}else if(G(Q)||mA(Q))return n.push(Q),!1;return c},a):i===1&&(a=s.reduce(function(c,Q){if(S(Q))switch(Q.value){case $B:return t=0,!1;case An:return t=1,!1;case tn:case ZB:return r=0,!1;case qB:return r=1,!1;case zB:return r=2,!1;case en:case jB:return r=3,!1}else if(mA(Q)||G(Q))return Array.isArray(r)||(r=[]),r.push(Q),!1;return c},a)),a){var o=ot(e,s);B.push(o)}}),{size:r,shape:t,stops:B,position:n,type:2}},Vi=function(e){return e.type===1},Ni=function(e){return e.type===2},lr={name:"image",parse:function(e,A){if(A.type===22){var t={url:A.value,type:0};return e.cache.addImage(A.value),t}if(A.type===18){var r=rn[A.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return r(e,A.values)}throw new Error("Unsupported image type "+A.type)}};function Pi(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!rn[e.name])}var rn={"linear-gradient":Mi,"-moz-linear-gradient":Re,"-ms-linear-gradient":Re,"-o-linear-gradient":Re,"-webkit-linear-gradient":Re,"radial-gradient":Gi,"-moz-radial-gradient":Ge,"-ms-radial-gradient":Ge,"-o-radial-gradient":Ge,"-webkit-radial-gradient":Ge,"-webkit-gradient":Ri},Xi={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(A.length===0)return[];var t=A[0];return t.type===20&&t.value==="none"?[]:A.filter(function(r){return qA(r)&&Pi(r)}).map(function(r){return lr.parse(e,r)})}},_i={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,A){return A.map(function(t){if(S(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ki={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,A){return oA(A).map(function(t){return t.filter(G)}).map(PB)}},Ji={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,A){return oA(A).map(function(t){return t.filter(S).map(function(r){return r.value}).join(" ")}).map(Wi)}},Wi=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},ZA;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(ZA||(ZA={}));var Yi={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,A){return oA(A).map(function(t){return t.filter(Zi)})}},Zi=function(e){return S(e)||G(e)},ct=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},qi=ct("top"),zi=ct("right"),ji=ct("bottom"),$i=ct("left"),Qt=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(A,t){return PB(t.filter(G))}}},Ao=Qt("top-left"),eo=Qt("top-right"),to=Qt("bottom-right"),ro=Qt("bottom-left"),gt=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Bo=gt("top"),no=gt("right"),so=gt("bottom"),ao=gt("left"),wt=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,t){return pe(t)?t.number:0}}},io=wt("top"),oo=wt("right"),co=wt("bottom"),Qo=wt("left"),go={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},wo={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,A){switch(A){case"rtl":return 1;case"ltr":default:return 0}}},lo={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,A){return A.filter(S).reduce(function(t,r){return t|uo(r.value)},0)}},uo=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},fo={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Co={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},je;(function(e){e.NORMAL="normal",e.STRICT="strict"})(je||(je={}));var Uo={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"strict":return je.STRICT;case"normal":default:return je.NORMAL}}},Fo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Wr=function(e,A){return S(e)&&e.value==="normal"?1.2*A:e.type===17?A*e.number:G(e)?D(e,A):A},ho={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,A){return A.type===20&&A.value==="none"?null:lr.parse(e,A)}},po={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,A){switch(A){case"inside":return 0;case"outside":default:return 1}}},er={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},lt=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Eo=lt("top"),Ho=lt("right"),vo=lt("bottom"),Io=lt("left"),mo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,A){return A.filter(S).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},yo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"break-word":return"break-word";case"normal":default:return"normal"}}},ut=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ko=ut("top"),Lo=ut("right"),bo=ut("bottom"),xo=ut("left"),So={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,A){switch(A){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Do={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},To={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.length===1&&Ar(A[0],"none")?[]:oA(A).map(function(t){for(var r={color:uA.TRANSPARENT,offsetX:_,offsetY:_,blur:_},B=0,n=0;n<t.length;n++){var s=t[n];mA(s)?(B===0?r.offsetX=s:B===1?r.offsetY=s:r.blur=s,B++):r.color=vA.parse(e,s)}return r})}},Oo={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Mo={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,A){if(A.type===20&&A.value==="none")return null;if(A.type===18){var t=Vo[A.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return t(A.values)}return null}},Ro=function(e){var A=e.filter(function(t){return t.type===17}).map(function(t){return t.number});return A.length===6?A:null},Go=function(e){var A=e.filter(function(a){return a.type===17}).map(function(a){return a.number}),t=A[0],r=A[1];A[2],A[3];var B=A[4],n=A[5];A[6],A[7],A[8],A[9],A[10],A[11];var s=A[12],i=A[13];return A[14],A[15],A.length===16?[t,r,B,n,s,i]:null},Vo={matrix:Ro,matrix3d:Go},Yr={type:16,number:50,flags:de},No=[Yr,Yr],Po={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,A){var t=A.filter(G);return t.length!==2?No:[t[0],t[1]]}},Xo={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,A){switch(A){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ue;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(ue||(ue={}));var _o={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"break-all":return ue.BREAK_ALL;case"keep-all":return ue.KEEP_ALL;case"normal":default:return ue.NORMAL}}},ko={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,A){if(A.type===20)return{auto:!0,order:0};if(zA(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},Bn={name:"time",parse:function(e,A){if(A.type===15)switch(A.unit.toLowerCase()){case"s":return 1e3*A.number;case"ms":return A.number}throw new Error("Unsupported time type")}},Jo={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,A){return zA(A)?A.number:1}},Wo={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Yo={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,A){return A.filter(S).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},Zo={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,A){var t=[],r=[];return A.forEach(function(B){switch(B.type){case 20:case 0:t.push(B.value);break;case 17:t.push(B.number.toString());break;case 4:r.push(t.join(" ")),t.length=0;break}}),t.length&&r.push(t.join(" ")),r.map(function(B){return B.indexOf(" ")===-1?B:"'"+B+"'"})}},qo={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},zo={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,A){if(zA(A))return A.number;if(S(A))switch(A.value){case"bold":return 700;case"normal":default:return 400}return 400}},jo={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.filter(S).map(function(t){return t.value})}},$o={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},V=function(e,A){return(e&A)!==0},Ac={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,A){if(A.length===0)return[];var t=A[0];return t.type===20&&t.value==="none"?[]:A}},ec={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return null;var t=A[0];if(t.type===20&&t.value==="none")return null;for(var r=[],B=A.filter(NB),n=0;n<B.length;n++){var s=B[n],i=B[n+1];if(s.type===20){var a=i&&zA(i)?i.number:1;r.push({counter:s.value,increment:a})}}return r}},tc={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return[];for(var t=[],r=A.filter(NB),B=0;B<r.length;B++){var n=r[B],s=r[B+1];if(S(n)&&n.value!=="none"){var i=s&&zA(s)?s.number:0;t.push({counter:n.value,reset:i})}}return t}},rc={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,A){return A.filter(pe).map(function(t){return Bn.parse(e,t)})}},Bc={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,A){if(A.length===0)return null;var t=A[0];if(t.type===20&&t.value==="none")return null;var r=[],B=A.filter(Ki);if(B.length%2!==0)return null;for(var n=0;n<B.length;n+=2){var s=B[n].value,i=B[n+1].value;r.push({open:s,close:i})}return r}},Zr=function(e,A,t){if(!e)return"";var r=e[Math.min(A,e.length-1)];return r?t?r.open:r.close:""},nc={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,A){return A.length===1&&Ar(A[0],"none")?[]:oA(A).map(function(t){for(var r={color:255,offsetX:_,offsetY:_,blur:_,spread:_,inset:!1},B=0,n=0;n<t.length;n++){var s=t[n];Ar(s,"inset")?r.inset=!0:mA(s)?(B===0?r.offsetX=s:B===1?r.offsetY=s:B===2?r.blur=s:r.spread=s,B++):r.color=vA.parse(e,s)}return r})}},sc={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,A){var t=[0,1,2],r=[];return A.filter(S).forEach(function(B){switch(B.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),t.forEach(function(B){r.indexOf(B)===-1&&r.push(B)}),r}},ac={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},ic={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,A){return pe(A)?A.number:0}},oc=function(){function e(A,t){var r,B;this.animationDuration=p(A,rc,t.animationDuration),this.backgroundClip=p(A,xi,t.backgroundClip),this.backgroundColor=p(A,Si,t.backgroundColor),this.backgroundImage=p(A,Xi,t.backgroundImage),this.backgroundOrigin=p(A,_i,t.backgroundOrigin),this.backgroundPosition=p(A,ki,t.backgroundPosition),this.backgroundRepeat=p(A,Ji,t.backgroundRepeat),this.backgroundSize=p(A,Yi,t.backgroundSize),this.borderTopColor=p(A,qi,t.borderTopColor),this.borderRightColor=p(A,zi,t.borderRightColor),this.borderBottomColor=p(A,ji,t.borderBottomColor),this.borderLeftColor=p(A,$i,t.borderLeftColor),this.borderTopLeftRadius=p(A,Ao,t.borderTopLeftRadius),this.borderTopRightRadius=p(A,eo,t.borderTopRightRadius),this.borderBottomRightRadius=p(A,to,t.borderBottomRightRadius),this.borderBottomLeftRadius=p(A,ro,t.borderBottomLeftRadius),this.borderTopStyle=p(A,Bo,t.borderTopStyle),this.borderRightStyle=p(A,no,t.borderRightStyle),this.borderBottomStyle=p(A,so,t.borderBottomStyle),this.borderLeftStyle=p(A,ao,t.borderLeftStyle),this.borderTopWidth=p(A,io,t.borderTopWidth),this.borderRightWidth=p(A,oo,t.borderRightWidth),this.borderBottomWidth=p(A,co,t.borderBottomWidth),this.borderLeftWidth=p(A,Qo,t.borderLeftWidth),this.boxShadow=p(A,nc,t.boxShadow),this.color=p(A,go,t.color),this.direction=p(A,wo,t.direction),this.display=p(A,lo,t.display),this.float=p(A,fo,t.cssFloat),this.fontFamily=p(A,Zo,t.fontFamily),this.fontSize=p(A,qo,t.fontSize),this.fontStyle=p(A,$o,t.fontStyle),this.fontVariant=p(A,jo,t.fontVariant),this.fontWeight=p(A,zo,t.fontWeight),this.letterSpacing=p(A,Co,t.letterSpacing),this.lineBreak=p(A,Uo,t.lineBreak),this.lineHeight=p(A,Fo,t.lineHeight),this.listStyleImage=p(A,ho,t.listStyleImage),this.listStylePosition=p(A,po,t.listStylePosition),this.listStyleType=p(A,er,t.listStyleType),this.marginTop=p(A,Eo,t.marginTop),this.marginRight=p(A,Ho,t.marginRight),this.marginBottom=p(A,vo,t.marginBottom),this.marginLeft=p(A,Io,t.marginLeft),this.opacity=p(A,Jo,t.opacity);var n=p(A,mo,t.overflow);this.overflowX=n[0],this.overflowY=n[n.length>1?1:0],this.overflowWrap=p(A,yo,t.overflowWrap),this.paddingTop=p(A,Ko,t.paddingTop),this.paddingRight=p(A,Lo,t.paddingRight),this.paddingBottom=p(A,bo,t.paddingBottom),this.paddingLeft=p(A,xo,t.paddingLeft),this.paintOrder=p(A,sc,t.paintOrder),this.position=p(A,Do,t.position),this.textAlign=p(A,So,t.textAlign),this.textDecorationColor=p(A,Wo,(r=t.textDecorationColor)!==null&&r!==void 0?r:t.color),this.textDecorationLine=p(A,Yo,(B=t.textDecorationLine)!==null&&B!==void 0?B:t.textDecoration),this.textShadow=p(A,To,t.textShadow),this.textTransform=p(A,Oo,t.textTransform),this.transform=p(A,Mo,t.transform),this.transformOrigin=p(A,Po,t.transformOrigin),this.visibility=p(A,Xo,t.visibility),this.webkitTextStrokeColor=p(A,ac,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=p(A,ic,t.webkitTextStrokeWidth),this.wordBreak=p(A,_o,t.wordBreak),this.zIndex=p(A,ko,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return IA(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return V(this.display,4)||V(this.display,33554432)||V(this.display,268435456)||V(this.display,536870912)||V(this.display,67108864)||V(this.display,134217728)},e}(),cc=function(){function e(A,t){this.content=p(A,Ac,t.content),this.quotes=p(A,Bc,t.quotes)}return e}(),qr=function(){function e(A,t){this.counterIncrement=p(A,ec,t.counterIncrement),this.counterReset=p(A,tc,t.counterReset)}return e}(),p=function(e,A,t){var r=new GB,B=t!==null&&typeof t<"u"?t.toString():A.initialValue;r.write(B);var n=new VB(r.read());switch(A.type){case 2:var s=n.parseComponentValue();return A.parse(e,S(s)?s.value:A.initialValue);case 0:return A.parse(e,n.parseComponentValue());case 1:return A.parse(e,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(A.format){case"angle":return it.parse(e,n.parseComponentValue());case"color":return vA.parse(e,n.parseComponentValue());case"image":return lr.parse(e,n.parseComponentValue());case"length":var i=n.parseComponentValue();return mA(i)?i:_;case"length-percentage":var a=n.parseComponentValue();return G(a)?a:_;case"time":return Bn.parse(e,n.parseComponentValue())}break}},Qc="data-html2canvas-debug",gc=function(e){var A=e.getAttribute(Qc);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},tr=function(e,A){var t=gc(e);return t===1||A===t},cA=function(){function e(A,t){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,tr(t,3))debugger;this.styles=new oc(A,window.getComputedStyle(t,null)),nr(t)&&(this.styles.animationDuration.some(function(r){return r>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=st(this.context,t),tr(t,4)&&(this.flags|=16)}return e}(),wc=" ",zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ve=0;Ve<zr.length;Ve++)ce[zr.charCodeAt(Ve)]=Ve;var lc=function(e){var A=e.length*.75,t=e.length,r,B=0,n,s,i,a;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);var o=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(A):new Array(A),c=Array.isArray(o)?o:new Uint8Array(o);for(r=0;r<t;r+=4)n=ce[e.charCodeAt(r)],s=ce[e.charCodeAt(r+1)],i=ce[e.charCodeAt(r+2)],a=ce[e.charCodeAt(r+3)],c[B++]=n<<2|s>>4,c[B++]=(s&15)<<4|i>>2,c[B++]=(i&3)<<6|a&63;return o},uc=function(e){for(var A=e.length,t=[],r=0;r<A;r+=2)t.push(e[r+1]<<8|e[r]);return t},fc=function(e){for(var A=e.length,t=[],r=0;r<A;r+=4)t.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return t},OA=5,ur=6+5,mt=2,Cc=ur-OA,nn=65536>>OA,Uc=1<<OA,yt=Uc-1,Fc=1024>>OA,hc=nn+Fc,dc=hc,pc=32,Ec=dc+pc,Hc=65536>>ur,vc=1<<Cc,Ic=vc-1,jr=function(e,A,t){return e.slice?e.slice(A,t):new Uint16Array(Array.prototype.slice.call(e,A,t))},mc=function(e,A,t){return e.slice?e.slice(A,t):new Uint32Array(Array.prototype.slice.call(e,A,t))},yc=function(e,A){var t=lc(e),r=Array.isArray(t)?fc(t):new Uint32Array(t),B=Array.isArray(t)?uc(t):new Uint16Array(t),n=24,s=jr(B,n/2,r[4]/2),i=r[5]===2?jr(B,(n+r[4])/2):mc(r,Math.ceil((n+r[4])/4));return new Kc(r[0],r[1],r[2],r[3],s,i)},Kc=function(){function e(A,t,r,B,n,s){this.initialValue=A,this.errorValue=t,this.highStart=r,this.highValueIndex=B,this.index=n,this.data=s}return e.prototype.get=function(A){var t;if(A>=0){if(A<55296||A>56319&&A<=65535)return t=this.index[A>>OA],t=(t<<mt)+(A&yt),this.data[t];if(A<=65535)return t=this.index[nn+(A-55296>>OA)],t=(t<<mt)+(A&yt),this.data[t];if(A<this.highStart)return t=Ec-Hc+(A>>ur),t=this.index[t],t+=A>>OA&Ic,t=this.index[t],t=(t<<mt)+(A&yt),this.data[t];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),$r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ne=0;Ne<$r.length;Ne++)Lc[$r.charCodeAt(Ne)]=Ne;var bc=1,Kt=2,Lt=3,AB=4,eB=5,xc=7,tB=8,bt=9,xt=10,rB=11,BB=12,nB=13,sB=14,St=15,Sc=function(e){for(var A=[],t=0,r=e.length;t<r;){var B=e.charCodeAt(t++);if(B>=55296&&B<=56319&&t<r){var n=e.charCodeAt(t++);(n&64512)===56320?A.push(((B&1023)<<10)+(n&1023)+65536):(A.push(B),t--)}else A.push(B)}return A},Dc=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var t=e.length;if(!t)return"";for(var r=[],B=-1,n="";++B<t;){var s=e[B];s<=65535?r.push(s):(s-=65536,r.push((s>>10)+55296,s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},Tc=yc(wc),eA="×",Dt="÷",Oc=function(e){return Tc.get(e)},Mc=function(e,A,t){var r=t-2,B=A[r],n=A[t-1],s=A[t];if(n===Kt&&s===Lt)return eA;if(n===Kt||n===Lt||n===AB||s===Kt||s===Lt||s===AB)return Dt;if(n===tB&&[tB,bt,rB,BB].indexOf(s)!==-1||(n===rB||n===bt)&&(s===bt||s===xt)||(n===BB||n===xt)&&s===xt||s===nB||s===eB||s===xc||n===bc)return eA;if(n===nB&&s===sB){for(;B===eB;)B=A[--r];if(B===sB)return eA}if(n===St&&s===St){for(var i=0;B===St;)i++,B=A[--r];if(i%2===0)return eA}return Dt},Rc=function(e){var A=Sc(e),t=A.length,r=0,B=0,n=A.map(Oc);return{next:function(){if(r>=t)return{done:!0,value:null};for(var s=eA;r<t&&(s=Mc(A,n,++r))===eA;);if(s!==eA||r===t){var i=Dc.apply(null,A.slice(B,r));return B=r,{value:i,done:!1}}return{done:!0,value:null}}}},Gc=function(e){for(var A=Rc(e),t=[],r;!(r=A.next()).done;)r.value&&t.push(r.value.slice());return t},Vc=function(e){var A=123;if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height=A+"px",r.style.display="block",e.body.appendChild(r),t.selectNode(r);var B=t.getBoundingClientRect(),n=Math.round(B.height);if(e.body.removeChild(r),n===A)return!0}}return!1},Nc=function(e){var A=e.createElement("boundtest");A.style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",e.body.appendChild(A);var t=e.createRange();A.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var r=A.firstChild,B=at(r.data).map(function(a){return M(a)}),n=0,s={},i=B.every(function(a,o){t.setStart(r,n),t.setEnd(r,n+a.length);var c=t.getBoundingClientRect();n+=a.length;var Q=c.x>s.x||c.y>s.y;return s=c,o===0?!0:Q});return e.body.removeChild(A),i},Pc=function(){return typeof new Image().crossOrigin<"u"},Xc=function(){return typeof new XMLHttpRequest().responseType=="string"},_c=function(e){var A=new Image,t=e.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;A.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(A,0,0),t.toDataURL()}catch(B){return!1}return!0},aB=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},kc=function(e){var A=e.createElement("canvas"),t=100;A.width=t,A.height=t;var r=A.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var B=new Image,n=A.toDataURL();B.src=n;var s=rr(t,t,0,0,B);return r.fillStyle="red",r.fillRect(0,0,t,t),iB(s).then(function(i){r.drawImage(i,0,0);var a=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var o=e.createElement("div");return o.style.backgroundImage="url("+n+")",o.style.height=t+"px",aB(a)?iB(rr(t,t,0,0,o)):Promise.reject(!1)}).then(function(i){return r.drawImage(i,0,0),aB(r.getImageData(0,0,t,t).data)}).catch(function(){return!1})},rr=function(e,A,t,r,B){var n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),i=document.createElementNS(n,"foreignObject");return s.setAttributeNS(null,"width",e.toString()),s.setAttributeNS(null,"height",A.toString()),i.setAttributeNS(null,"width","100%"),i.setAttributeNS(null,"height","100%"),i.setAttributeNS(null,"x",t.toString()),i.setAttributeNS(null,"y",r.toString()),i.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(i),i.appendChild(B),s},iB=function(e){return new Promise(function(A,t){var r=new Image;r.onload=function(){return A(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},X={get SUPPORT_RANGE_BOUNDS(){var e=Vc(document);return Object.defineProperty(X,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=X.SUPPORT_RANGE_BOUNDS&&Nc(document);return Object.defineProperty(X,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=_c(document);return Object.defineProperty(X,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?kc(document):Promise.resolve(!1);return Object.defineProperty(X,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Pc();return Object.defineProperty(X,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=Xc();return Object.defineProperty(X,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(X,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(X,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},fe=function(){function e(A,t){this.text=A,this.bounds=t}return e}(),Jc=function(e,A,t,r){var B=Zc(A,t),n=[],s=0;return B.forEach(function(i){if(t.textDecorationLine.length||i.trim().length>0)if(X.SUPPORT_RANGE_BOUNDS){var a=oB(r,s,i.length).getClientRects();if(a.length>1){var o=fr(i),c=0;o.forEach(function(g){n.push(new fe(g,fA.fromDOMRectList(e,oB(r,c+s,g.length).getClientRects()))),c+=g.length})}else n.push(new fe(i,fA.fromDOMRectList(e,a)))}else{var Q=r.splitText(i.length);n.push(new fe(i,Wc(e,r))),r=Q}else X.SUPPORT_RANGE_BOUNDS||(r=r.splitText(i.length));s+=i.length}),n},Wc=function(e,A){var t=A.ownerDocument;if(t){var r=t.createElement("html2canvaswrapper");r.appendChild(A.cloneNode(!0));var B=A.parentNode;if(B){B.replaceChild(r,A);var n=st(e,r);return r.firstChild&&B.replaceChild(r.firstChild,r),n}}return fA.EMPTY},oB=function(e,A,t){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var B=r.createRange();return B.setStart(e,A),B.setEnd(e,A+t),B},fr=function(e){if(X.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(e)).map(function(t){return t.segment})}return Gc(e)},Yc=function(e,A){if(X.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(e)).map(function(r){return r.segment})}return zc(e,A)},Zc=function(e,A){return A.letterSpacing!==0?fr(e):Yc(e,A)},qc=[32,160,4961,65792,65793,4153,4241],zc=function(e,A){for(var t=Ea(e,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),r=[],B,n=function(){if(B.value){var s=B.value.slice(),i=at(s),a="";i.forEach(function(o){qc.indexOf(o)===-1?a+=M(o):(a.length&&r.push(a),r.push(M(o)),a="")}),a.length&&r.push(a)}};!(B=t.next()).done;)n();return r},jc=function(){function e(A,t,r){this.text=$c(t.data,r.textTransform),this.textBounds=Jc(A,this.text,r,t)}return e}(),$c=function(e,A){switch(A){case 1:return e.toLowerCase();case 3:return e.replace(AQ,eQ);case 2:return e.toUpperCase();default:return e}},AQ=/(^|\s|:|-|\(|\))([a-z])/g,eQ=function(e,A,t){return e.length>0?A+t.toUpperCase():e},sn=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B.src=r.currentSrc||r.src,B.intrinsicWidth=r.naturalWidth,B.intrinsicHeight=r.naturalHeight,B.context.cache.addImage(B.src),B}return A}(cA),an=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B.canvas=r,B.intrinsicWidth=r.width,B.intrinsicHeight=r.height,B}return A}(cA),on=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this,n=new XMLSerializer,s=st(t,r);return r.setAttribute("width",s.width+"px"),r.setAttribute("height",s.height+"px"),B.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(r)),B.intrinsicWidth=r.width.baseVal.value,B.intrinsicHeight=r.height.baseVal.value,B.context.cache.addImage(B.svg),B}return A}(cA),cn=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B.value=r.value,B}return A}(cA),Br=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B.start=r.start,B.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,B}return A}(cA),tQ=[{type:15,flags:0,unit:"px",number:3}],rQ=[{type:16,flags:0,number:50}],BQ=function(e){return e.width>e.height?new fA(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new fA(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},nQ=function(e){var A=e.type===sQ?new Array(e.value.length+1).join("•"):e.value;return A.length===0?e.placeholder||"":A},$e="checkbox",At="radio",sQ="password",cB=707406591,Cr=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;switch(B.type=r.type.toLowerCase(),B.checked=r.checked,B.value=nQ(r),(B.type===$e||B.type===At)&&(B.styles.backgroundColor=3739148031,B.styles.borderTopColor=B.styles.borderRightColor=B.styles.borderBottomColor=B.styles.borderLeftColor=2779096575,B.styles.borderTopWidth=B.styles.borderRightWidth=B.styles.borderBottomWidth=B.styles.borderLeftWidth=1,B.styles.borderTopStyle=B.styles.borderRightStyle=B.styles.borderBottomStyle=B.styles.borderLeftStyle=1,B.styles.backgroundClip=[0],B.styles.backgroundOrigin=[0],B.bounds=BQ(B.bounds)),B.type){case $e:B.styles.borderTopRightRadius=B.styles.borderTopLeftRadius=B.styles.borderBottomRightRadius=B.styles.borderBottomLeftRadius=tQ;break;case At:B.styles.borderTopRightRadius=B.styles.borderTopLeftRadius=B.styles.borderBottomRightRadius=B.styles.borderBottomLeftRadius=rQ;break}return B}return A}(cA),Qn=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this,n=r.options[r.selectedIndex||0];return B.value=n&&n.text||"",B}return A}(cA),gn=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B.value=r.value,B}return A}(cA),wn=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;B.src=r.src,B.width=parseInt(r.width,10)||0,B.height=parseInt(r.height,10)||0,B.backgroundColor=B.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){B.tree=un(t,r.contentWindow.document.documentElement);var n=r.contentWindow.document.documentElement?le(t,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):uA.TRANSPARENT,s=r.contentWindow.document.body?le(t,getComputedStyle(r.contentWindow.document.body).backgroundColor):uA.TRANSPARENT;B.backgroundColor=IA(n)?IA(s)?B.styles.backgroundColor:s:n}}catch(i){}return B}return A}(cA),aQ=["OL","UL","MENU"],Ye=function(e,A,t,r){for(var B=A.firstChild,n=void 0;B;B=n)if(n=B.nextSibling,fn(B)&&B.data.trim().length>0)t.textNodes.push(new jc(e,B,t.styles));else if(WA(B))if(hn(B)&&B.assignedNodes)B.assignedNodes().forEach(function(i){return Ye(e,i,t,r)});else{var s=ln(e,B);s.styles.isVisible()&&(iQ(B,s,r)?s.flags|=4:oQ(s.styles)&&(s.flags|=2),aQ.indexOf(B.tagName)!==-1&&(s.flags|=8),t.elements.push(s),B.slot,B.shadowRoot?Ye(e,B.shadowRoot,s,r):!et(B)&&!Cn(B)&&!tt(B)&&Ye(e,B,s,r))}},ln=function(e,A){return sr(A)?new sn(e,A):Un(A)?new an(e,A):Cn(A)?new on(e,A):cQ(A)?new cn(e,A):QQ(A)?new Br(e,A):gQ(A)?new Cr(e,A):tt(A)?new Qn(e,A):et(A)?new gn(e,A):Fn(A)?new wn(e,A):new cA(e,A)},un=function(e,A){var t=ln(e,A);return t.flags|=4,Ye(e,A,t,t),t},iQ=function(e,A,t){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||Ur(e)&&t.styles.isTransparent()},oQ=function(e){return e.isPositioned()||e.isFloating()},fn=function(e){return e.nodeType===Node.TEXT_NODE},WA=function(e){return e.nodeType===Node.ELEMENT_NODE},nr=function(e){return WA(e)&&typeof e.style<"u"&&!Ze(e)},Ze=function(e){return typeof e.className=="object"},cQ=function(e){return e.tagName==="LI"},QQ=function(e){return e.tagName==="OL"},gQ=function(e){return e.tagName==="INPUT"},wQ=function(e){return e.tagName==="HTML"},Cn=function(e){return e.tagName==="svg"},Ur=function(e){return e.tagName==="BODY"},Un=function(e){return e.tagName==="CANVAS"},QB=function(e){return e.tagName==="VIDEO"},sr=function(e){return e.tagName==="IMG"},Fn=function(e){return e.tagName==="IFRAME"},gB=function(e){return e.tagName==="STYLE"},lQ=function(e){return e.tagName==="SCRIPT"},et=function(e){return e.tagName==="TEXTAREA"},tt=function(e){return e.tagName==="SELECT"},hn=function(e){return e.tagName==="SLOT"},wB=function(e){return e.tagName.indexOf("-")>0},uQ=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(A){var t=this.counters[A];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(A){var t=this.counters[A];return t||[]},e.prototype.pop=function(A){var t=this;A.forEach(function(r){return t.counters[r].pop()})},e.prototype.parse=function(A){var t=this,r=A.counterIncrement,B=A.counterReset,n=!0;r!==null&&r.forEach(function(i){var a=t.counters[i.counter];a&&i.increment!==0&&(n=!1,a.length||a.push(1),a[Math.max(0,a.length-1)]+=i.increment)});var s=[];return n&&B.forEach(function(i){var a=t.counters[i.counter];s.push(i.counter),a||(a=t.counters[i.counter]=[]),a.push(i.reset)}),s},e}(),lB={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},uB={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},fQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},CQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},PA=function(e,A,t,r,B,n){return e<A||e>t?he(e,B,n.length>0):r.integers.reduce(function(s,i,a){for(;e>=i;)e-=i,s+=r.values[a];return s},"")+n},dn=function(e,A,t,r){var B="";do t||e--,B=r(e)+B,e/=A;while(e*A>=A);return B},O=function(e,A,t,r,B){var n=t-A+1;return(e<0?"-":"")+(dn(Math.abs(e),n,r,function(s){return M(Math.floor(s%n)+A)})+B)},xA=function(e,A,t){t===void 0&&(t=". ");var r=A.length;return dn(Math.abs(e),r,!1,function(B){return A[Math.floor(B%r)]})+t},kA=1,FA=2,hA=4,Qe=8,lA=function(e,A,t,r,B,n){if(e<-9999||e>9999)return he(e,4,B.length>0);var s=Math.abs(e),i=B;if(s===0)return A[0]+i;for(var a=0;s>0&&a<=4;a++){var o=s%10;o===0&&V(n,kA)&&i!==""?i=A[o]+i:o>1||o===1&&a===0||o===1&&a===1&&V(n,FA)||o===1&&a===1&&V(n,hA)&&e>100||o===1&&a>1&&V(n,Qe)?i=A[o]+(a>0?t[a-1]:"")+i:o===1&&a>0&&(i=t[a-1]+i),s=Math.floor(s/10)}return(e<0?r:"")+i},fB="十百千萬",CB="拾佰仟萬",UB="マイナス",Tt="마이너스",he=function(e,A,t){var r=t?". ":"",B=t?"、":"",n=t?", ":"",s=t?" ":"";switch(A){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var i=O(e,48,57,!0,r);return i.length<4?"0"+i:i;case 4:return xA(e,"〇一二三四五六七八九",B);case 6:return PA(e,1,3999,lB,3,r).toLowerCase();case 7:return PA(e,1,3999,lB,3,r);case 8:return O(e,945,969,!1,r);case 9:return O(e,97,122,!1,r);case 10:return O(e,65,90,!1,r);case 11:return O(e,1632,1641,!0,r);case 12:case 49:return PA(e,1,9999,uB,3,r);case 35:return PA(e,1,9999,uB,3,r).toLowerCase();case 13:return O(e,2534,2543,!0,r);case 14:case 30:return O(e,6112,6121,!0,r);case 15:return xA(e,"子丑寅卯辰巳午未申酉戌亥",B);case 16:return xA(e,"甲乙丙丁戊己庚辛壬癸",B);case 17:case 48:return lA(e,"零一二三四五六七八九",fB,"負",B,FA|hA|Qe);case 47:return lA(e,"零壹貳參肆伍陸柒捌玖",CB,"負",B,kA|FA|hA|Qe);case 42:return lA(e,"零一二三四五六七八九",fB,"负",B,FA|hA|Qe);case 41:return lA(e,"零壹贰叁肆伍陆柒捌玖",CB,"负",B,kA|FA|hA|Qe);case 26:return lA(e,"〇一二三四五六七八九","十百千万",UB,B,0);case 25:return lA(e,"零壱弐参四伍六七八九","拾百千万",UB,B,kA|FA|hA);case 31:return lA(e,"영일이삼사오육칠팔구","십백천만",Tt,n,kA|FA|hA);case 33:return lA(e,"零一二三四五六七八九","十百千萬",Tt,n,0);case 32:return lA(e,"零壹貳參四五六七八九","拾百千",Tt,n,kA|FA|hA);case 18:return O(e,2406,2415,!0,r);case 20:return PA(e,1,19999,CQ,3,r);case 21:return O(e,2790,2799,!0,r);case 22:return O(e,2662,2671,!0,r);case 22:return PA(e,1,10999,fQ,3,r);case 23:return xA(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return xA(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return O(e,3302,3311,!0,r);case 28:return xA(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case 29:return xA(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case 34:return O(e,3792,3801,!0,r);case 37:return O(e,6160,6169,!0,r);case 38:return O(e,4160,4169,!0,r);case 39:return O(e,2918,2927,!0,r);case 40:return O(e,1776,1785,!0,r);case 43:return O(e,3046,3055,!0,r);case 44:return O(e,3174,3183,!0,r);case 45:return O(e,3664,3673,!0,r);case 46:return O(e,3872,3881,!0,r);case 3:default:return O(e,48,57,!0,r)}},pn="data-html2canvas-ignore",FB=function(){function e(A,t,r){if(this.context=A,this.options=r,this.scrolledElements=[],this.referenceElement=t,this.counters=new uQ,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(A,t){var r=this,B=UQ(A,t);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var n=A.defaultView.pageXOffset,s=A.defaultView.pageYOffset,i=B.contentWindow,a=i.document,o=dQ(B).then(function(){return W(r,void 0,void 0,function(){var c,Q;return k(this,function(g){switch(g.label){case 0:return this.scrolledElements.forEach(vQ),i&&(i.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(i.scrollY!==t.top||i.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(i.scrollX-t.left,i.scrollY-t.top,0,0))),c=this.options.onclone,Q=this.clonedReferenceElement,typeof Q>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:g.sent(),g.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,hQ(a)]:[3,4];case 3:g.sent(),g.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(a,Q)}).then(function(){return B})]:[2,B]}})})});return a.open(),a.write(EQ(document.doctype)+"<html></html>"),HQ(this.referenceElement.ownerDocument,n,s),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),o},e.prototype.createElementClone=function(A){if(tr(A,2))debugger;if(Un(A))return this.createCanvasClone(A);if(QB(A))return this.createVideoClone(A);if(gB(A))return this.createStyleClone(A);var t=A.cloneNode(!1);return sr(t)&&(sr(A)&&A.currentSrc&&A.currentSrc!==A.src&&(t.src=A.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),wB(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(A){var t=document.createElement("html2canvascustomelement");return Ot(A.style,t),t},e.prototype.createStyleClone=function(A){try{var t=A.sheet;if(t&&t.cssRules){var r=[].slice.call(t.cssRules,0).reduce(function(n,s){return s&&typeof s.cssText=="string"?n+s.cssText:n},""),B=A.cloneNode(!1);return B.textContent=r,B}}catch(n){if(this.context.logger.error("Unable to access cssRules property",n),n.name!=="SecurityError")throw n}return A.cloneNode(!1)},e.prototype.createCanvasClone=function(A){var t;if(this.options.inlineImages&&A.ownerDocument){var r=A.ownerDocument.createElement("img");try{return r.src=A.toDataURL(),r}catch(o){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var B=A.cloneNode(!1);try{B.width=A.width,B.height=A.height;var n=A.getContext("2d"),s=B.getContext("2d");if(s)if(!this.options.allowTaint&&n)s.putImageData(n.getImageData(0,0,A.width,A.height),0,0);else{var i=(t=A.getContext("webgl2"))!==null&&t!==void 0?t:A.getContext("webgl");if(i){var a=i.getContextAttributes();(a==null?void 0:a.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}s.drawImage(A,0,0)}return B}catch(o){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return B},e.prototype.createVideoClone=function(A){var t=A.ownerDocument.createElement("canvas");t.width=A.offsetWidth,t.height=A.offsetHeight;var r=t.getContext("2d");try{return r&&(r.drawImage(A,0,0,t.width,t.height),this.options.allowTaint||r.getImageData(0,0,t.width,t.height)),t}catch(n){this.context.logger.info("Unable to clone video as it is tainted",A)}var B=A.ownerDocument.createElement("canvas");return B.width=A.offsetWidth,B.height=A.offsetHeight,B},e.prototype.appendChildNode=function(A,t,r){(!WA(t)||!lQ(t)&&!t.hasAttribute(pn)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!WA(t)||!gB(t))&&A.appendChild(this.cloneNode(t,r))},e.prototype.cloneChildNodes=function(A,t,r){for(var B=this,n=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;n;n=n.nextSibling)if(WA(n)&&hn(n)&&typeof n.assignedNodes=="function"){var s=n.assignedNodes();s.length&&s.forEach(function(i){return B.appendChildNode(t,i,r)})}else this.appendChildNode(t,n,r)},e.prototype.cloneNode=function(A,t){if(fn(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var r=A.ownerDocument.defaultView;if(r&&WA(A)&&(nr(A)||Ze(A))){var B=this.createElementClone(A);B.style.transitionProperty="none";var n=r.getComputedStyle(A),s=r.getComputedStyle(A,":before"),i=r.getComputedStyle(A,":after");this.referenceElement===A&&nr(B)&&(this.clonedReferenceElement=B),Ur(B)&&yQ(B);var a=this.counters.parse(new qr(this.context,n)),o=this.resolvePseudoContent(A,B,s,Ce.BEFORE);wB(A)&&(t=!0),QB(A)||this.cloneChildNodes(A,B,t),o&&B.insertBefore(o,B.firstChild);var c=this.resolvePseudoContent(A,B,i,Ce.AFTER);return c&&B.appendChild(c),this.counters.pop(a),(n&&(this.options.copyStyles||Ze(A))&&!Fn(A)||t)&&Ot(n,B),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([B,A.scrollLeft,A.scrollTop]),(et(A)||tt(A))&&(et(B)||tt(B))&&(B.value=A.value),B}return A.cloneNode(!1)},e.prototype.resolvePseudoContent=function(A,t,r,B){var n=this;if(r){var s=r.content,i=t.ownerDocument;if(!(!i||!s||s==="none"||s==="-moz-alt-content"||r.display==="none")){this.counters.parse(new qr(this.context,r));var a=new cc(this.context,r),o=i.createElement("html2canvaspseudoelement");Ot(r,o),a.content.forEach(function(Q){if(Q.type===0)o.appendChild(i.createTextNode(Q.value));else if(Q.type===22){var g=i.createElement("img");g.src=Q.value,g.style.opacity="1",o.appendChild(g)}else if(Q.type===18){if(Q.name==="attr"){var U=Q.values.filter(S);U.length&&o.appendChild(i.createTextNode(A.getAttribute(U[0].value)||""))}else if(Q.name==="counter"){var l=Q.values.filter(qA),u=l[0],F=l[1];if(u&&S(u)){var w=n.counters.getCounterValue(u.value),f=F&&S(F)?er.parse(n.context,F.value):3;o.appendChild(i.createTextNode(he(w,f,!1)))}}else if(Q.name==="counters"){var m=Q.values.filter(qA),u=m[0],H=m[1],F=m[2];if(u&&S(u)){var h=n.counters.getCounterValues(u.value),C=F&&S(F)?er.parse(n.context,F.value):3,I=H&&H.type===0?H.value:"",y=h.map(function(Y){return he(Y,C,!1)}).join(I);o.appendChild(i.createTextNode(y))}}}else if(Q.type===20)switch(Q.value){case"open-quote":o.appendChild(i.createTextNode(Zr(a.quotes,n.quoteDepth++,!0)));break;case"close-quote":o.appendChild(i.createTextNode(Zr(a.quotes,--n.quoteDepth,!1)));break;default:o.appendChild(i.createTextNode(Q.value))}}),o.className=ar+" "+ir;var c=B===Ce.BEFORE?" "+ar:" "+ir;return Ze(t)?t.className.baseValue+=c:t.className+=c,o}}},e.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},e}(),Ce;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(Ce||(Ce={}));var UQ=function(e,A){var t=e.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=A.width.toString(),t.height=A.height.toString(),t.scrolling="no",t.setAttribute(pn,"true"),e.body.appendChild(t),t},FQ=function(e){return new Promise(function(A){if(e.complete){A();return}if(!e.src){A();return}e.onload=A,e.onerror=A})},hQ=function(e){return Promise.all([].slice.call(e.images,0).map(FQ))},dQ=function(e){return new Promise(function(A,t){var r=e.contentWindow;if(!r)return t("No window assigned for iframe");var B=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval(function(){B.body.childNodes.length>0&&B.readyState==="complete"&&(clearInterval(n),A(e))},50)}})},pQ=["all","d","content"],Ot=function(e,A){for(var t=e.length-1;t>=0;t--){var r=e.item(t);pQ.indexOf(r)===-1&&A.style.setProperty(r,e.getPropertyValue(r))}return A},EQ=function(e){var A="";return e&&(A+="<!DOCTYPE ",e.name&&(A+=e.name),e.internalSubset&&(A+=e.internalSubset),e.publicId&&(A+='"'+e.publicId+'"'),e.systemId&&(A+='"'+e.systemId+'"'),A+=">"),A},HQ=function(e,A,t){e&&e.defaultView&&(A!==e.defaultView.pageXOffset||t!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(A,t)},vQ=function(e){var A=e[0],t=e[1],r=e[2];A.scrollLeft=t,A.scrollTop=r},IQ=":before",mQ=":after",ar="___html2canvas___pseudoelement_before",ir="___html2canvas___pseudoelement_after",hB=`{
    content: "" !important;
    display: none !important;
}`,yQ=function(e){KQ(e,"."+ar+IQ+hB+`
         .`+ir+mQ+hB)},KQ=function(e,A){var t=e.ownerDocument;if(t){var r=t.createElement("style");r.textContent=A,e.appendChild(r)}},En=function(){function e(){}return e.getOrigin=function(A){var t=e._link;return t?(t.href=A,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},e.isSameOrigin=function(A){return e.getOrigin(A)===e._origin},e.setContext=function(A){e._link=A.document.createElement("a"),e._origin=e.getOrigin(A.location.href)},e._origin="about:blank",e}(),LQ=function(){function e(A,t){this.context=A,this._options=t,this._cache={}}return e.prototype.addImage=function(A){var t=Promise.resolve();return this.has(A)||(Rt(A)||DQ(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),t},e.prototype.match=function(A){return this._cache[A]},e.prototype.loadImage=function(A){return W(this,void 0,void 0,function(){var t,r,B,n,s=this;return k(this,function(i){switch(i.label){case 0:return t=En.isSameOrigin(A),r=!Mt(A)&&this._options.useCORS===!0&&X.SUPPORT_CORS_IMAGES&&!t,B=!Mt(A)&&!t&&!Rt(A)&&typeof this._options.proxy=="string"&&X.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!Mt(A)&&!Rt(A)&&!B&&!r?[2]:(n=A,B?[4,this.proxy(n)]:[3,2]);case 1:n=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,o){var c=new Image;c.onload=function(){return a(c)},c.onerror=o,(TQ(n)||r)&&(c.crossOrigin="anonymous"),c.src=n,c.complete===!0&&setTimeout(function(){return a(c)},500),s._options.imageTimeout>0&&setTimeout(function(){return o("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,i.sent()]}})})},e.prototype.has=function(A){return typeof this._cache[A]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(A){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var B=A.substring(0,256);return new Promise(function(n,s){var i=X.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(i==="text")n(a.response);else{var Q=new FileReader;Q.addEventListener("load",function(){return n(Q.result)},!1),Q.addEventListener("error",function(g){return s(g)},!1),Q.readAsDataURL(a.response)}else s("Failed to proxy resource "+B+" with status code "+a.status)},a.onerror=s;var o=r.indexOf("?")>-1?"&":"?";if(a.open("GET",""+r+o+"url="+encodeURIComponent(A)+"&responseType="+i),i!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=i),t._options.imageTimeout){var c=t._options.imageTimeout;a.timeout=c,a.ontimeout=function(){return s("Timed out ("+c+"ms) proxying "+B)}}a.send()})},e}(),bQ=/^data:image\/svg\+xml/i,xQ=/^data:image\/.*;base64,/i,SQ=/^data:image\/.*/i,DQ=function(e){return X.SUPPORT_SVG_DRAWING||!OQ(e)},Mt=function(e){return SQ.test(e)},TQ=function(e){return xQ.test(e)},Rt=function(e){return e.substr(0,4)==="blob"},OQ=function(e){return e.substr(-3).toLowerCase()==="svg"||bQ.test(e)},d=function(){function e(A,t){this.type=0,this.x=A,this.y=t}return e.prototype.add=function(A,t){return new e(this.x+A,this.y+t)},e}(),XA=function(e,A,t){return new d(e.x+(A.x-e.x)*t,e.y+(A.y-e.y)*t)},Pe=function(){function e(A,t,r,B){this.type=1,this.start=A,this.startControl=t,this.endControl=r,this.end=B}return e.prototype.subdivide=function(A,t){var r=XA(this.start,this.startControl,A),B=XA(this.startControl,this.endControl,A),n=XA(this.endControl,this.end,A),s=XA(r,B,A),i=XA(B,n,A),a=XA(s,i,A);return t?new e(this.start,r,s,a):new e(a,i,n,this.end)},e.prototype.add=function(A,t){return new e(this.start.add(A,t),this.startControl.add(A,t),this.endControl.add(A,t),this.end.add(A,t))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),tA=function(e){return e.type===1},MQ=function(){function e(A){var t=A.styles,r=A.bounds,B=oe(t.borderTopLeftRadius,r.width,r.height),n=B[0],s=B[1],i=oe(t.borderTopRightRadius,r.width,r.height),a=i[0],o=i[1],c=oe(t.borderBottomRightRadius,r.width,r.height),Q=c[0],g=c[1],U=oe(t.borderBottomLeftRadius,r.width,r.height),l=U[0],u=U[1],F=[];F.push((n+a)/r.width),F.push((l+Q)/r.width),F.push((s+u)/r.height),F.push((o+g)/r.height);var w=Math.max.apply(Math,F);w>1&&(n/=w,s/=w,a/=w,o/=w,Q/=w,g/=w,l/=w,u/=w);var f=r.width-a,m=r.height-g,H=r.width-Q,h=r.height-u,C=t.borderTopWidth,I=t.borderRightWidth,y=t.borderBottomWidth,v=t.borderLeftWidth,R=D(t.paddingTop,A.bounds.width),Y=D(t.paddingRight,A.bounds.width),j=D(t.paddingBottom,A.bounds.width),x=D(t.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||s>0?T(r.left+v/3,r.top+C/3,n-v/3,s-C/3,b.TOP_LEFT):new d(r.left+v/3,r.top+C/3),this.topRightBorderDoubleOuterBox=n>0||s>0?T(r.left+f,r.top+C/3,a-I/3,o-C/3,b.TOP_RIGHT):new d(r.left+r.width-I/3,r.top+C/3),this.bottomRightBorderDoubleOuterBox=Q>0||g>0?T(r.left+H,r.top+m,Q-I/3,g-y/3,b.BOTTOM_RIGHT):new d(r.left+r.width-I/3,r.top+r.height-y/3),this.bottomLeftBorderDoubleOuterBox=l>0||u>0?T(r.left+v/3,r.top+h,l-v/3,u-y/3,b.BOTTOM_LEFT):new d(r.left+v/3,r.top+r.height-y/3),this.topLeftBorderDoubleInnerBox=n>0||s>0?T(r.left+v*2/3,r.top+C*2/3,n-v*2/3,s-C*2/3,b.TOP_LEFT):new d(r.left+v*2/3,r.top+C*2/3),this.topRightBorderDoubleInnerBox=n>0||s>0?T(r.left+f,r.top+C*2/3,a-I*2/3,o-C*2/3,b.TOP_RIGHT):new d(r.left+r.width-I*2/3,r.top+C*2/3),this.bottomRightBorderDoubleInnerBox=Q>0||g>0?T(r.left+H,r.top+m,Q-I*2/3,g-y*2/3,b.BOTTOM_RIGHT):new d(r.left+r.width-I*2/3,r.top+r.height-y*2/3),this.bottomLeftBorderDoubleInnerBox=l>0||u>0?T(r.left+v*2/3,r.top+h,l-v*2/3,u-y*2/3,b.BOTTOM_LEFT):new d(r.left+v*2/3,r.top+r.height-y*2/3),this.topLeftBorderStroke=n>0||s>0?T(r.left+v/2,r.top+C/2,n-v/2,s-C/2,b.TOP_LEFT):new d(r.left+v/2,r.top+C/2),this.topRightBorderStroke=n>0||s>0?T(r.left+f,r.top+C/2,a-I/2,o-C/2,b.TOP_RIGHT):new d(r.left+r.width-I/2,r.top+C/2),this.bottomRightBorderStroke=Q>0||g>0?T(r.left+H,r.top+m,Q-I/2,g-y/2,b.BOTTOM_RIGHT):new d(r.left+r.width-I/2,r.top+r.height-y/2),this.bottomLeftBorderStroke=l>0||u>0?T(r.left+v/2,r.top+h,l-v/2,u-y/2,b.BOTTOM_LEFT):new d(r.left+v/2,r.top+r.height-y/2),this.topLeftBorderBox=n>0||s>0?T(r.left,r.top,n,s,b.TOP_LEFT):new d(r.left,r.top),this.topRightBorderBox=a>0||o>0?T(r.left+f,r.top,a,o,b.TOP_RIGHT):new d(r.left+r.width,r.top),this.bottomRightBorderBox=Q>0||g>0?T(r.left+H,r.top+m,Q,g,b.BOTTOM_RIGHT):new d(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=l>0||u>0?T(r.left,r.top+h,l,u,b.BOTTOM_LEFT):new d(r.left,r.top+r.height),this.topLeftPaddingBox=n>0||s>0?T(r.left+v,r.top+C,Math.max(0,n-v),Math.max(0,s-C),b.TOP_LEFT):new d(r.left+v,r.top+C),this.topRightPaddingBox=a>0||o>0?T(r.left+Math.min(f,r.width-I),r.top+C,f>r.width+I?0:Math.max(0,a-I),Math.max(0,o-C),b.TOP_RIGHT):new d(r.left+r.width-I,r.top+C),this.bottomRightPaddingBox=Q>0||g>0?T(r.left+Math.min(H,r.width-v),r.top+Math.min(m,r.height-y),Math.max(0,Q-I),Math.max(0,g-y),b.BOTTOM_RIGHT):new d(r.left+r.width-I,r.top+r.height-y),this.bottomLeftPaddingBox=l>0||u>0?T(r.left+v,r.top+Math.min(h,r.height-y),Math.max(0,l-v),Math.max(0,u-y),b.BOTTOM_LEFT):new d(r.left+v,r.top+r.height-y),this.topLeftContentBox=n>0||s>0?T(r.left+v+x,r.top+C+R,Math.max(0,n-(v+x)),Math.max(0,s-(C+R)),b.TOP_LEFT):new d(r.left+v+x,r.top+C+R),this.topRightContentBox=a>0||o>0?T(r.left+Math.min(f,r.width+v+x),r.top+C+R,f>r.width+v+x?0:a-v+x,o-(C+R),b.TOP_RIGHT):new d(r.left+r.width-(I+Y),r.top+C+R),this.bottomRightContentBox=Q>0||g>0?T(r.left+Math.min(H,r.width-(v+x)),r.top+Math.min(m,r.height+C+R),Math.max(0,Q-(I+Y)),g-(y+j),b.BOTTOM_RIGHT):new d(r.left+r.width-(I+Y),r.top+r.height-(y+j)),this.bottomLeftContentBox=l>0||u>0?T(r.left+v+x,r.top+h,Math.max(0,l-(v+x)),u-(y+j),b.BOTTOM_LEFT):new d(r.left+v+x,r.top+r.height-(y+j))}return e}(),b;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(b||(b={}));var T=function(e,A,t,r,B){var n=4*((Math.sqrt(2)-1)/3),s=t*n,i=r*n,a=e+t,o=A+r;switch(B){case b.TOP_LEFT:return new Pe(new d(e,o),new d(e,o-i),new d(a-s,A),new d(a,A));case b.TOP_RIGHT:return new Pe(new d(e,A),new d(e+s,A),new d(a,o-i),new d(a,o));case b.BOTTOM_RIGHT:return new Pe(new d(a,A),new d(a,A+i),new d(e+s,o),new d(e,o));case b.BOTTOM_LEFT:default:return new Pe(new d(a,o),new d(a-s,o),new d(e,A+i),new d(e,A))}},rt=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},RQ=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Bt=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},GQ=function(){function e(A,t,r){this.offsetX=A,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}return e}(),Xe=function(){function e(A,t){this.path=A,this.target=t,this.type=1}return e}(),VQ=function(){function e(A){this.opacity=A,this.type=2,this.target=6}return e}(),NQ=function(e){return e.type===0},Hn=function(e){return e.type===1},PQ=function(e){return e.type===2},dB=function(e,A){return e.length===A.length?e.some(function(t,r){return t===A[r]}):!1},XQ=function(e,A,t,r,B){return e.map(function(n,s){switch(s){case 0:return n.add(A,t);case 1:return n.add(A+r,t);case 2:return n.add(A+r,t+B);case 3:return n.add(A,t+B)}return n})},vn=function(){function e(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),In=function(){function e(A,t){if(this.container=A,this.parent=t,this.effects=[],this.curves=new MQ(this.container),this.container.styles.opacity<1&&this.effects.push(new VQ(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,B=this.container.bounds.top+this.container.styles.transformOrigin[1].number,n=this.container.styles.transform;this.effects.push(new GQ(r,B,n))}if(this.container.styles.overflowX!==0){var s=rt(this.curves),i=Bt(this.curves);dB(s,i)?this.effects.push(new Xe(s,6)):(this.effects.push(new Xe(s,2)),this.effects.push(new Xe(i,4)))}}return e.prototype.getEffects=function(A){for(var t=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,B=this.effects.slice(0);r;){var n=r.effects.filter(function(a){return!Hn(a)});if(t||r.container.styles.position!==0||!r.parent){if(B.unshift.apply(B,n),t=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var s=rt(r.curves),i=Bt(r.curves);dB(s,i)||B.unshift(new Xe(i,6))}}else B.unshift.apply(B,n);r=r.parent}return B.filter(function(a){return V(a.target,A)})},e}(),or=function(e,A,t,r){e.container.elements.forEach(function(B){var n=V(B.flags,4),s=V(B.flags,2),i=new In(B,e);V(B.styles.display,2048)&&r.push(i);var a=V(B.flags,8)?[]:r;if(n||s){var o=n||B.styles.isPositioned()?t:A,c=new vn(i);if(B.styles.isPositioned()||B.styles.opacity<1||B.styles.isTransformed()){var Q=B.styles.zIndex.order;if(Q<0){var g=0;o.negativeZIndex.some(function(l,u){return Q>l.element.container.styles.zIndex.order?(g=u,!1):g>0}),o.negativeZIndex.splice(g,0,c)}else if(Q>0){var U=0;o.positiveZIndex.some(function(l,u){return Q>=l.element.container.styles.zIndex.order?(U=u+1,!1):U>0}),o.positiveZIndex.splice(U,0,c)}else o.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else B.styles.isFloating()?o.nonPositionedFloats.push(c):o.nonPositionedInlineLevel.push(c);or(i,c,n?c:t,a)}else B.styles.isInlineLevel()?A.inlineLevel.push(i):A.nonInlineLevel.push(i),or(i,A,t,a);V(B.flags,8)&&mn(B,a)})},mn=function(e,A){for(var t=e instanceof Br?e.start:1,r=e instanceof Br?e.reversed:!1,B=0;B<A.length;B++){var n=A[B];n.container instanceof cn&&typeof n.container.value=="number"&&n.container.value!==0&&(t=n.container.value),n.listValue=he(t,n.container.styles.listStyleType,!0),t+=r?-1:1}},_Q=function(e){var A=new In(e,null),t=new vn(A),r=[];return or(A,t,t,r),mn(A.container,r),t},pB=function(e,A){switch(A){case 0:return BA(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return BA(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return BA(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return BA(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},kQ=function(e,A){switch(A){case 0:return BA(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return BA(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return BA(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return BA(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},JQ=function(e,A){switch(A){case 0:return BA(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return BA(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return BA(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return BA(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},WQ=function(e,A){switch(A){case 0:return _e(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return _e(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return _e(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return _e(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},_e=function(e,A){var t=[];return tA(e)?t.push(e.subdivide(.5,!1)):t.push(e),tA(A)?t.push(A.subdivide(.5,!0)):t.push(A),t},BA=function(e,A,t,r){var B=[];return tA(e)?B.push(e.subdivide(.5,!1)):B.push(e),tA(t)?B.push(t.subdivide(.5,!0)):B.push(t),tA(r)?B.push(r.subdivide(.5,!0).reverse()):B.push(r),tA(A)?B.push(A.subdivide(.5,!1).reverse()):B.push(A),B},yn=function(e){var A=e.bounds,t=e.styles;return A.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},nt=function(e){var A=e.styles,t=e.bounds,r=D(A.paddingLeft,t.width),B=D(A.paddingRight,t.width),n=D(A.paddingTop,t.width),s=D(A.paddingBottom,t.width);return t.add(r+A.borderLeftWidth,n+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+r+B),-(A.borderTopWidth+A.borderBottomWidth+n+s))},YQ=function(e,A){return e===0?A.bounds:e===2?nt(A):yn(A)},ZQ=function(e,A){return e===0?A.bounds:e===2?nt(A):yn(A)},Gt=function(e,A,t){var r=YQ(JA(e.styles.backgroundOrigin,A),e),B=ZQ(JA(e.styles.backgroundClip,A),e),n=qQ(JA(e.styles.backgroundSize,A),t,r),s=n[0],i=n[1],a=oe(JA(e.styles.backgroundPosition,A),r.width-s,r.height-i),o=zQ(JA(e.styles.backgroundRepeat,A),a,n,r,B),c=Math.round(r.left+a[0]),Q=Math.round(r.top+a[1]);return[o,c,Q,s,i]},_A=function(e){return S(e)&&e.value===ZA.AUTO},ke=function(e){return typeof e=="number"},qQ=function(e,A,t){var r=A[0],B=A[1],n=A[2],s=e[0],i=e[1];if(!s)return[0,0];if(G(s)&&i&&G(i))return[D(s,t.width),D(i,t.height)];var a=ke(n);if(S(s)&&(s.value===ZA.CONTAIN||s.value===ZA.COVER)){if(ke(n)){var o=t.width/t.height;return o<n!=(s.value===ZA.COVER)?[t.width,t.width/n]:[t.height*n,t.height]}return[t.width,t.height]}var c=ke(r),Q=ke(B),g=c||Q;if(_A(s)&&(!i||_A(i))){if(c&&Q)return[r,B];if(!a&&!g)return[t.width,t.height];if(g&&a){var U=c?r:B*n,l=Q?B:r/n;return[U,l]}var u=c?r:t.width,F=Q?B:t.height;return[u,F]}if(a){var w=0,f=0;return G(s)?w=D(s,t.width):G(i)&&(f=D(i,t.height)),_A(s)?w=f*n:(!i||_A(i))&&(f=w/n),[w,f]}var m=null,H=null;if(G(s)?m=D(s,t.width):i&&G(i)&&(H=D(i,t.height)),m!==null&&(!i||_A(i))&&(H=c&&Q?m/r*B:t.height),H!==null&&_A(s)&&(m=c&&Q?H/B*r:t.width),m!==null&&H!==null)return[m,H];throw new Error("Unable to calculate background-size for element")},JA=function(e,A){var t=e[A];return typeof t>"u"?e[0]:t},zQ=function(e,A,t,r,B){var n=A[0],s=A[1],i=t[0],a=t[1];switch(e){case 2:return[new d(Math.round(r.left),Math.round(r.top+s)),new d(Math.round(r.left+r.width),Math.round(r.top+s)),new d(Math.round(r.left+r.width),Math.round(a+r.top+s)),new d(Math.round(r.left),Math.round(a+r.top+s))];case 3:return[new d(Math.round(r.left+n),Math.round(r.top)),new d(Math.round(r.left+n+i),Math.round(r.top)),new d(Math.round(r.left+n+i),Math.round(r.height+r.top)),new d(Math.round(r.left+n),Math.round(r.height+r.top))];case 1:return[new d(Math.round(r.left+n),Math.round(r.top+s)),new d(Math.round(r.left+n+i),Math.round(r.top+s)),new d(Math.round(r.left+n+i),Math.round(r.top+s+a)),new d(Math.round(r.left+n),Math.round(r.top+s+a))];default:return[new d(Math.round(B.left),Math.round(B.top)),new d(Math.round(B.left+B.width),Math.round(B.top)),new d(Math.round(B.left+B.width),Math.round(B.height+B.top)),new d(Math.round(B.left),Math.round(B.height+B.top))]}},jQ="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",EB="Hidden Text",$Q=function(){function e(A){this._data={},this._document=A}return e.prototype.parseMetrics=function(A,t){var r=this._document.createElement("div"),B=this._document.createElement("img"),n=this._document.createElement("span"),s=this._document.body;r.style.visibility="hidden",r.style.fontFamily=A,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",s.appendChild(r),B.src=jQ,B.width=1,B.height=1,B.style.margin="0",B.style.padding="0",B.style.verticalAlign="baseline",n.style.fontFamily=A,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode(EB)),r.appendChild(n),r.appendChild(B);var i=B.offsetTop-n.offsetTop+2;r.removeChild(n),r.appendChild(this._document.createTextNode(EB)),r.style.lineHeight="normal",B.style.verticalAlign="super";var a=B.offsetTop-r.offsetTop+2;return s.removeChild(r),{baseline:i,middle:a}},e.prototype.getMetrics=function(A,t){var r=A+" "+t;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(A,t)),this._data[r]},e}(),Kn=function(){function e(A,t){this.context=A,this.options=t}return e}(),Ag=1e4,eg=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B._activeEffects=[],B.canvas=r.canvas?r.canvas:document.createElement("canvas"),B.ctx=B.canvas.getContext("2d"),r.canvas||(B.canvas.width=Math.floor(r.width*r.scale),B.canvas.height=Math.floor(r.height*r.scale),B.canvas.style.width=r.width+"px",B.canvas.style.height=r.height+"px"),B.fontMetrics=new $Q(document),B.ctx.scale(B.options.scale,B.options.scale),B.ctx.translate(-r.x,-r.y),B.ctx.textBaseline="bottom",B._activeEffects=[],B.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),B}return A.prototype.applyEffects=function(t){for(var r=this;this._activeEffects.length;)this.popEffect();t.forEach(function(B){return r.applyEffect(B)})},A.prototype.applyEffect=function(t){this.ctx.save(),PQ(t)&&(this.ctx.globalAlpha=t.opacity),NQ(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Hn(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(t){return W(this,void 0,void 0,function(){var r;return k(this,function(B){switch(B.label){case 0:return r=t.element.container.styles,r.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:B.sent(),B.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(t){return W(this,void 0,void 0,function(){return k(this,function(r){switch(r.label){case 0:if(V(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(t,r,B){var n=this;if(r===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+B);else{var s=fr(t.text);s.reduce(function(i,a){return n.ctx.fillText(a,i,t.bounds.top+B),i+n.ctx.measureText(a).width},t.bounds.left)}},A.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),B=sg(t.fontFamily).join(", "),n=pe(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,r,t.fontWeight,n,B].join(" "),B,n]},A.prototype.renderTextNode=function(t,r){return W(this,void 0,void 0,function(){var B,n,s,i,a,o,c,Q,g=this;return k(this,function(U){return B=this.createFontStyle(r),n=B[0],s=B[1],i=B[2],this.ctx.font=n,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(s,i),o=a.baseline,c=a.middle,Q=r.paintOrder,t.textBounds.forEach(function(l){Q.forEach(function(u){switch(u){case 0:g.ctx.fillStyle=N(r.color),g.renderTextWithLetterSpacing(l,r.letterSpacing,o);var F=r.textShadow;F.length&&l.text.trim().length&&(F.slice(0).reverse().forEach(function(w){g.ctx.shadowColor=N(w.color),g.ctx.shadowOffsetX=w.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=w.offsetY.number*g.options.scale,g.ctx.shadowBlur=w.blur.number,g.renderTextWithLetterSpacing(l,r.letterSpacing,o)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=N(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:g.ctx.fillRect(l.bounds.left,Math.round(l.bounds.top+o),l.bounds.width,1);break;case 2:g.ctx.fillRect(l.bounds.left,Math.round(l.bounds.top),l.bounds.width,1);break;case 3:g.ctx.fillRect(l.bounds.left,Math.ceil(l.bounds.top+c),l.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&l.text.trim().length&&(g.ctx.strokeStyle=N(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(l.text,l.bounds.left,l.bounds.top+o)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(t,r,B){if(B&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var n=nt(t),s=Bt(r);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(B,0,0,t.intrinsicWidth,t.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(t){return W(this,void 0,void 0,function(){var r,B,n,s,i,a,f,f,o,c,Q,g,H,U,l,h,u,F,w,f,m,H,h;return k(this,function(C){switch(C.label){case 0:this.applyEffects(t.getEffects(4)),r=t.container,B=t.curves,n=r.styles,s=0,i=r.textNodes,C.label=1;case 1:return s<i.length?(a=i[s],[4,this.renderTextNode(a,n)]):[3,4];case 2:C.sent(),C.label=3;case 3:return s++,[3,1];case 4:if(!(r instanceof sn))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return f=C.sent(),this.renderReplacedElement(r,B,f),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof an&&this.renderReplacedElement(r,B,r.canvas),!(r instanceof on))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return f=C.sent(),this.renderReplacedElement(r,B,f),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof wn&&r.tree?(o=new A(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,o.render(r.tree)]):[3,14];case 13:c=C.sent(),r.width&&r.height&&this.ctx.drawImage(c,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),C.label=14;case 14:if(r instanceof Cr&&(Q=Math.min(r.bounds.width,r.bounds.height),r.type===$e?r.checked&&(this.ctx.save(),this.path([new d(r.bounds.left+Q*.39363,r.bounds.top+Q*.79),new d(r.bounds.left+Q*.16,r.bounds.top+Q*.5549),new d(r.bounds.left+Q*.27347,r.bounds.top+Q*.44071),new d(r.bounds.left+Q*.39694,r.bounds.top+Q*.5649),new d(r.bounds.left+Q*.72983,r.bounds.top+Q*.23),new d(r.bounds.left+Q*.84,r.bounds.top+Q*.34085),new d(r.bounds.left+Q*.39363,r.bounds.top+Q*.79)]),this.ctx.fillStyle=N(cB),this.ctx.fill(),this.ctx.restore()):r.type===At&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+Q/2,r.bounds.top+Q/2,Q/4,0,Math.PI*2,!0),this.ctx.fillStyle=N(cB),this.ctx.fill(),this.ctx.restore())),tg(r)&&r.value.length){switch(g=this.createFontStyle(n),H=g[0],U=g[1],l=this.fontMetrics.getMetrics(H,U).baseline,this.ctx.font=H,this.ctx.fillStyle=N(n.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bg(r.styles.textAlign),h=nt(r),u=0,r.styles.textAlign){case 1:u+=h.width/2;break;case 2:u+=h.width;break}F=h.add(u,0,0,-h.height/2+1),this.ctx.save(),this.path([new d(h.left,h.top),new d(h.left+h.width,h.top),new d(h.left+h.width,h.top+h.height),new d(h.left,h.top+h.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fe(r.value,F),n.letterSpacing,l),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!V(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];f=void 0,m=w.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return f=C.sent(),this.ctx.drawImage(f,r.bounds.left-(f.width+10),r.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:t.listValue&&r.styles.listStyleType!==-1&&(H=this.createFontStyle(n)[0],this.ctx.font=H,this.ctx.fillStyle=N(n.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",h=new fA(r.bounds.left,r.bounds.top+D(r.styles.paddingTop,r.bounds.width),r.bounds.width,Wr(n.lineHeight,n.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fe(t.listValue,h),n.letterSpacing,Wr(n.lineHeight,n.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(t){return W(this,void 0,void 0,function(){var r,B,w,n,s,w,i,a,w,o,c,w,Q,g,w,U,l,w,u,F,w;return k(this,function(f){switch(f.label){case 0:if(V(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:f.sent(),r=0,B=t.negativeZIndex,f.label=2;case 2:return r<B.length?(w=B[r],[4,this.renderStack(w)]):[3,5];case 3:f.sent(),f.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:f.sent(),n=0,s=t.nonInlineLevel,f.label=7;case 7:return n<s.length?(w=s[n],[4,this.renderNode(w)]):[3,10];case 8:f.sent(),f.label=9;case 9:return n++,[3,7];case 10:i=0,a=t.nonPositionedFloats,f.label=11;case 11:return i<a.length?(w=a[i],[4,this.renderStack(w)]):[3,14];case 12:f.sent(),f.label=13;case 13:return i++,[3,11];case 14:o=0,c=t.nonPositionedInlineLevel,f.label=15;case 15:return o<c.length?(w=c[o],[4,this.renderStack(w)]):[3,18];case 16:f.sent(),f.label=17;case 17:return o++,[3,15];case 18:Q=0,g=t.inlineLevel,f.label=19;case 19:return Q<g.length?(w=g[Q],[4,this.renderNode(w)]):[3,22];case 20:f.sent(),f.label=21;case 21:return Q++,[3,19];case 22:U=0,l=t.zeroOrAutoZIndexOrTransformedOrOpacity,f.label=23;case 23:return U<l.length?(w=l[U],[4,this.renderStack(w)]):[3,26];case 24:f.sent(),f.label=25;case 25:return U++,[3,23];case 26:u=0,F=t.positiveZIndex,f.label=27;case 27:return u<F.length?(w=F[u],[4,this.renderStack(w)]):[3,30];case 28:f.sent(),f.label=29;case 29:return u++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},A.prototype.formatPath=function(t){var r=this;t.forEach(function(B,n){var s=tA(B)?B.start:B;n===0?r.ctx.moveTo(s.x,s.y):r.ctx.lineTo(s.x,s.y),tA(B)&&r.ctx.bezierCurveTo(B.startControl.x,B.startControl.y,B.endControl.x,B.endControl.y,B.end.x,B.end.y)})},A.prototype.renderRepeat=function(t,r,B,n){this.path(t),this.ctx.fillStyle=r,this.ctx.translate(B,n),this.ctx.fill(),this.ctx.translate(-B,-n)},A.prototype.resizeImage=function(t,r,B){var n;if(t.width===r&&t.height===B)return t;var s=(n=this.canvas.ownerDocument)!==null&&n!==void 0?n:document,i=s.createElement("canvas");i.width=Math.max(1,r),i.height=Math.max(1,B);var a=i.getContext("2d");return a.drawImage(t,0,0,t.width,t.height,0,0,r,B),i},A.prototype.renderBackgroundImage=function(t){return W(this,void 0,void 0,function(){var r,B,n,s,i,a;return k(this,function(o){switch(o.label){case 0:r=t.styles.backgroundImage.length-1,B=function(c){var Q,g,U,R,Z,q,x,P,y,l,R,Z,q,x,P,u,F,w,f,m,H,h,C,I,y,v,R,Y,j,x,P,CA,Z,q,yA,aA,UA,KA,LA,QA,bA,gA;return k(this,function(MA){switch(MA.label){case 0:if(c.type!==0)return[3,5];Q=void 0,g=c.url,MA.label=1;case 1:return MA.trys.push([1,3,,4]),[4,n.context.cache.match(g)];case 2:return Q=MA.sent(),[3,4];case 3:return MA.sent(),n.context.logger.error("Error loading background-image "+g),[3,4];case 4:return Q&&(U=Gt(t,r,[Q.width,Q.height,Q.width/Q.height]),R=U[0],Z=U[1],q=U[2],x=U[3],P=U[4],y=n.ctx.createPattern(n.resizeImage(Q,x,P),"repeat"),n.renderRepeat(R,y,Z,q)),[3,6];case 5:Vi(c)?(l=Gt(t,r,[null,null,null]),R=l[0],Z=l[1],q=l[2],x=l[3],P=l[4],u=Ti(c.angle,x,P),F=u[0],w=u[1],f=u[2],m=u[3],H=u[4],h=document.createElement("canvas"),h.width=x,h.height=P,C=h.getContext("2d"),I=C.createLinearGradient(w,m,f,H),kr(c.stops,F).forEach(function(jA){return I.addColorStop(jA.stop,N(jA.color))}),C.fillStyle=I,C.fillRect(0,0,x,P),x>0&&P>0&&(y=n.ctx.createPattern(h,"repeat"),n.renderRepeat(R,y,Z,q))):Ni(c)&&(v=Gt(t,r,[null,null,null]),R=v[0],Y=v[1],j=v[2],x=v[3],P=v[4],CA=c.position.length===0?[wr]:c.position,Z=D(CA[0],x),q=D(CA[CA.length-1],P),yA=Oi(c,Z,q,x,P),aA=yA[0],UA=yA[1],aA>0&&UA>0&&(KA=n.ctx.createRadialGradient(Y+Z,j+q,0,Y+Z,j+q,aA),kr(c.stops,aA*2).forEach(function(jA){return KA.addColorStop(jA.stop,N(jA.color))}),n.path(R),n.ctx.fillStyle=KA,aA!==UA?(LA=t.bounds.left+.5*t.bounds.width,QA=t.bounds.top+.5*t.bounds.height,bA=UA/aA,gA=1/bA,n.ctx.save(),n.ctx.translate(LA,QA),n.ctx.transform(1,0,0,bA,0,0),n.ctx.translate(-LA,-QA),n.ctx.fillRect(Y,gA*(j-QA)+QA,x,P*gA),n.ctx.restore()):n.ctx.fill())),MA.label=6;case 6:return r--,[2]}})},n=this,s=0,i=t.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return s<i.length?(a=i[s],[5,B(a)]):[3,4];case 2:o.sent(),o.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(t,r,B){return W(this,void 0,void 0,function(){return k(this,function(n){return this.path(pB(B,r)),this.ctx.fillStyle=N(t),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(t,r,B,n){return W(this,void 0,void 0,function(){var s,i;return k(this,function(a){switch(a.label){case 0:return r<3?[4,this.renderSolidBorder(t,B,n)]:[3,2];case 1:return a.sent(),[2];case 2:return s=kQ(n,B),this.path(s),this.ctx.fillStyle=N(t),this.ctx.fill(),i=JQ(n,B),this.path(i),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(t){return W(this,void 0,void 0,function(){var r,B,n,s,i,a,o,c,Q=this;return k(this,function(g){switch(g.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,B=!IA(r.backgroundColor)||r.backgroundImage.length,n=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],s=rg(JA(r.backgroundClip,0),t.curves),B||r.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),IA(r.backgroundColor)||(this.ctx.fillStyle=N(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(U){Q.ctx.save();var l=rt(t.curves),u=U.inset?0:Ag,F=XQ(l,-u+(U.inset?1:-1)*U.spread.number,(U.inset?1:-1)*U.spread.number,U.spread.number*(U.inset?-2:2),U.spread.number*(U.inset?-2:2));U.inset?(Q.path(l),Q.ctx.clip(),Q.mask(F)):(Q.mask(l),Q.ctx.clip(),Q.path(F)),Q.ctx.shadowOffsetX=U.offsetX.number+u,Q.ctx.shadowOffsetY=U.offsetY.number,Q.ctx.shadowColor=N(U.color),Q.ctx.shadowBlur=U.blur.number,Q.ctx.fillStyle=U.inset?N(U.color):"rgba(0,0,0,1)",Q.ctx.fill(),Q.ctx.restore()}),g.label=2;case 2:i=0,a=0,o=n,g.label=3;case 3:return a<o.length?(c=o[a],c.style!==0&&!IA(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,i,t.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,i,t.curves,3)];case 6:return g.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,i,t.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,i,t.curves)];case 10:g.sent(),g.label=11;case 11:i++,g.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(t,r,B,n,s){return W(this,void 0,void 0,function(){var i,a,o,c,Q,g,U,l,u,F,w,f,m,H,h,C,h,C;return k(this,function(I){return this.ctx.save(),i=WQ(n,B),a=pB(n,B),s===2&&(this.path(a),this.ctx.clip()),tA(a[0])?(o=a[0].start.x,c=a[0].start.y):(o=a[0].x,c=a[0].y),tA(a[1])?(Q=a[1].end.x,g=a[1].end.y):(Q=a[1].x,g=a[1].y),B===0||B===2?U=Math.abs(o-Q):U=Math.abs(c-g),this.ctx.beginPath(),s===3?this.formatPath(i):this.formatPath(a.slice(0,2)),l=r<3?r*3:r*2,u=r<3?r*2:r,s===3&&(l=r,u=r),F=!0,U<=l*2?F=!1:U<=l*2+u?(w=U/(2*l+u),l*=w,u*=w):(f=Math.floor((U+u)/(l+u)),m=(U-f*l)/(f-1),H=(U-(f+1)*l)/f,u=H<=0||Math.abs(u-m)<Math.abs(u-H)?m:H),F&&(s===3?this.ctx.setLineDash([0,l+u]):this.ctx.setLineDash([l,u])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=N(t),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(tA(a[0])&&(h=a[3],C=a[0],this.ctx.beginPath(),this.formatPath([new d(h.end.x,h.end.y),new d(C.start.x,C.start.y)]),this.ctx.stroke()),tA(a[1])&&(h=a[1],C=a[2],this.ctx.beginPath(),this.formatPath([new d(h.end.x,h.end.y),new d(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(t){return W(this,void 0,void 0,function(){var r;return k(this,function(B){switch(B.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=N(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=_Q(t),[4,this.renderStack(r)];case 1:return B.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(Kn),tg=function(e){return e instanceof gn||e instanceof Qn?!0:e instanceof Cr&&e.type!==At&&e.type!==$e},rg=function(e,A){switch(e){case 0:return rt(A);case 2:return RQ(A);case 1:default:return Bt(A)}},Bg=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},ng=["-apple-system","system-ui"],sg=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(A){return ng.indexOf(A)===-1}):e},ag=function(e){sA(A,e);function A(t,r){var B=e.call(this,t,r)||this;return B.canvas=r.canvas?r.canvas:document.createElement("canvas"),B.ctx=B.canvas.getContext("2d"),B.options=r,B.canvas.width=Math.floor(r.width*r.scale),B.canvas.height=Math.floor(r.height*r.scale),B.canvas.style.width=r.width+"px",B.canvas.style.height=r.height+"px",B.ctx.scale(B.options.scale,B.options.scale),B.ctx.translate(-r.x,-r.y),B.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),B}return A.prototype.render=function(t){return W(this,void 0,void 0,function(){var r,B;return k(this,function(n){switch(n.label){case 0:return r=rr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,ig(r)];case 1:return B=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=N(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(B,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(Kn),ig=function(e){return new Promise(function(A,t){var r=new Image;r.onload=function(){A(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},og=function(){function e(A){var t=A.id,r=A.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ee([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ee([this.id,this.getTime()+"ms"],A))},e.prototype.warn=function(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ee([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.error=function(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ee([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.instances={},e}(),cg=function(){function e(A,t){var r;this.windowBounds=t,this.instanceName="#"+e.instanceCount++,this.logger=new og({id:this.instanceName,enabled:A.logging}),this.cache=(r=A.cache)!==null&&r!==void 0?r:new LQ(this,A)}return e.instanceCount=1,e}(),Qg=function(e,A){return A===void 0&&(A={}),gg(e,A)};typeof window<"u"&&En.setContext(window);var gg=function(e,A){return W(void 0,void 0,void 0,function(){var t,r,B,n,s,i,a,o,c,Q,g,U,l,u,F,w,f,m,H,h,I,C,I,y,v,R,Y,j,x,P,CA,Z,q,yA,aA,UA,KA,LA,QA,bA;return k(this,function(gA){switch(gA.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=e.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(r=t.defaultView,!r)throw new Error("Document is not attached to a Window");return B={allowTaint:(y=A.allowTaint)!==null&&y!==void 0?y:!1,imageTimeout:(v=A.imageTimeout)!==null&&v!==void 0?v:15e3,proxy:A.proxy,useCORS:(R=A.useCORS)!==null&&R!==void 0?R:!1},n=Pt({logging:(Y=A.logging)!==null&&Y!==void 0?Y:!0,cache:A.cache},B),s={windowWidth:(j=A.windowWidth)!==null&&j!==void 0?j:r.innerWidth,windowHeight:(x=A.windowHeight)!==null&&x!==void 0?x:r.innerHeight,scrollX:(P=A.scrollX)!==null&&P!==void 0?P:r.pageXOffset,scrollY:(CA=A.scrollY)!==null&&CA!==void 0?CA:r.pageYOffset},i=new fA(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),a=new cg(n,i),o=(Z=A.foreignObjectRendering)!==null&&Z!==void 0?Z:!1,c={allowTaint:(q=A.allowTaint)!==null&&q!==void 0?q:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:o,copyStyles:o},a.logger.debug("Starting document clone with size "+i.width+"x"+i.height+" scrolled to "+-i.left+","+-i.top),Q=new FB(a,e,c),g=Q.clonedReferenceElement,g?[4,Q.toIFrame(t,i)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return U=gA.sent(),l=Ur(g)||wQ(g)?Ps(g.ownerDocument):st(a,g),u=l.width,F=l.height,w=l.left,f=l.top,m=wg(a,g,A.backgroundColor),H={canvas:A.canvas,backgroundColor:m,scale:(aA=(yA=A.scale)!==null&&yA!==void 0?yA:r.devicePixelRatio)!==null&&aA!==void 0?aA:1,x:((UA=A.x)!==null&&UA!==void 0?UA:0)+w,y:((KA=A.y)!==null&&KA!==void 0?KA:0)+f,width:(LA=A.width)!==null&&LA!==void 0?LA:Math.ceil(u),height:(QA=A.height)!==null&&QA!==void 0?QA:Math.ceil(F)},o?(a.logger.debug("Document cloned, using foreign object rendering"),I=new ag(a,H),[4,I.render(g)]):[3,3];case 2:return h=gA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+w+","+f+" with size "+u+"x"+F+" using computed rendering"),a.logger.debug("Starting DOM parsing"),C=un(a,g),m===C.styles.backgroundColor&&(C.styles.backgroundColor=uA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+H.x+","+H.y+" with size "+H.width+"x"+H.height),I=new eg(a,H),[4,I.render(C)];case 4:h=gA.sent(),gA.label=5;case 5:return(!((bA=A.removeContainer)!==null&&bA!==void 0)||bA)&&(FB.destroy(U)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,h]}})})},wg=function(e,A,t){var r=A.ownerDocument,B=r.documentElement?le(e,getComputedStyle(r.documentElement).backgroundColor):uA.TRANSPARENT,n=r.body?le(e,getComputedStyle(r.body).backgroundColor):uA.TRANSPARENT,s=typeof t=="string"?le(e,t):t===null?uA.TRANSPARENT:4294967295;return A===r.documentElement?IA(B)?IA(n)?s:n:B:s};const lg=e=>Qr.post("/edu-app/musicSheetCategories/page",{data:e}),ug=e=>Qr.post("/edu-app/musicSheet/page",{data:e}),fg=cr({name:"coai-guide",emits:["close"],setup(e,{emit:A}){const t=ge({box:{},show:!1,steps:[{ele:"",eleRect:{},img:$A("coai-1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:"1.5rem",width:"6.55rem",height:"2.76rem"},btnsStyle:{top:"4.7rem",left:"1rem"},boxStyle:{borderRadius:"40px",transform:"scale(1)"}},{ele:"",img:$A("coai-2.png"),handStyle:{top:"-1.39rem",left:"0.15rem",transform:"rotate(180deg)"},imgStyle:{top:"-4rem"},btnsStyle:{top:"-1.3rem",left:"1.3rem"}},{ele:"",img:$A("coai-3.png"),handStyle:{top:"-1.39rem",left:"0.17rem",transform:"rotate(180deg)"},imgStyle:{top:"-4rem"},btnsStyle:{top:"-1.3rem",left:"1.3rem"}},{ele:"",img:$A("coai-4.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{top:"-4rem",left:"-3.7rem",width:"6.00rem",height:"2.53rem"},boxStyle:{borderRadius:"40px",transform:"scale(1.1)"},btnsStyle:{top:"-1.1rem",left:"-3.8rem","justify-content":"center",padding:0}}],step:0}),r=YA(!1),B=localStorage.getItem("guideInfo");B&&JSON.parse(B).coaiGuide?r.value=!1:r.value=!0;const n=()=>{console.log(`coai-${t.step}`);const o=document.getElementById(`coai-${t.step}`);if(o){const c=o.getBoundingClientRect();t.box={left:c.x+"px",top:c.y+"px",width:c.width+"px",height:c.height+"px"}}else i()};HB(()=>{n(),window.addEventListener("resize",s)});const s=()=>{n()};Nn(()=>{window.removeEventListener("resize",s)});const i=()=>{if(t.step>=3){a();return}t.step=t.step+1,n()},a=()=>{let o=JSON.parse(localStorage.getItem("guideInfo")||"{}")||null;o?o.coaiGuide=!0:o={coaiGuide:!0},localStorage.setItem("guideInfo",JSON.stringify(o)),r.value=!1};return()=>E(vB,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",AA.guidePopup],show:r.value,"onUpdate:show":o=>r.value=o},{default:()=>[E("div",{class:AA.content,onClick:()=>i()},[t.step!=t.steps.length-1&&E("div",{class:AA.backBtn,onClick:o=>{o.stopPropagation(),a()}},[RA("跳过")]),E("div",{class:AA.box,style:{...t.box,...t.steps[t.step].boxStyle},id:`modeType-${t.step}`},[t.steps.map((o,c)=>{var Q,g;return E("div",{onClick:U=>U.stopPropagation(),class:AA.item,style:{display:c===t.step?"":"none",left:`${(Q=o.eleRect)==null?void 0:Q.left}px`,top:`${(g=o.eleRect)==null?void 0:g.top}px`}},[E("img",{class:AA.img,style:o.imgStyle,src:o.img},null),E("img",{class:AA.iconHead,style:o.handStyle,src:$A("indexDot.png")},null),E("div",{class:AA.btns,style:o.btnsStyle},[t.step+1==t.steps.length?E(Vt,null,[E(ft,{class:[AA.btn],round:!0,type:"primary",onClick:()=>a()},{default:()=>[RA("完成")]}),E(ft,{class:[AA.btn,AA.endBtn],round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{t.step=0,n()}},{default:()=>[RA("再看一遍")]})]):E(ft,{class:AA.btn,round:!0,type:"primary",onClick:()=>i()},{default:()=>[RA("下一步 ("),t.step+1,RA("/"),t.steps.length,RA(")")]})])])})])])]})}}),Eg=cr({name:"co-ai",setup(){var l,u;const e=ge({page:1,rows:999,subjectId:((l=Er.user.data)==null?void 0:l.subjectId)||""}),A=ge({page:1,rows:20,status:1,keyword:"",musicSheetCategoriesId:""}),t=ge({typeIndex:0,musicIndex:0,isShowJianpu:!0,types:[],musics:[],loading:!0,finshed:!1,searchNoticeShow:!1,searchNotice:{left:"",top:"",width:"",height:""},showVip:!1,vipMember:(u=Er.user.data)==null?void 0:u.vipMember}),r=YA(),B=YA(!1),n=()=>{Ct({api:"goBack"})},s=()=>{var w;if(!t.vipMember){t.showVip=!0;return}let F=`${location.origin}/instrument?id=${(w=t.musics[t.musicIndex])==null?void 0:w.id}&showGuide=true`;console.log(F),Ct({api:"openAccompanyWebView",content:{url:F,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0,c_orientation:0}})},i=async()=>{Jn({message:"正在保存",duration:0});try{Qg(r.value,{backgroundColor:"#fff",allowTaint:!0,useCORS:!0}).then(async F=>{var w=F.toDataURL("image/png",1);setTimeout(()=>{Ut("已保存到相册")},500);const f=await Wn({api:"savePicture",content:{base64:w}})}).catch(()=>{setTimeout(()=>{Ut("保存失败")},500)})}catch(F){setTimeout(()=>{Ut("保存失败")},500)}},a=async()=>{var F;try{const w=await lg({...e});w.code===200&&Array.isArray((F=w==null?void 0:w.data)==null?void 0:F.rows)&&(t.types=w.data.rows,!A.musicSheetCategoriesId&&t.types.length>0&&(A.musicSheetCategoriesId=t.types[0].id))}catch(w){console.log("🚀 ~ error:",w)}},o=async()=>{var F;t.loading=!0;try{const w=await ug({...A});w.code===200&&Array.isArray((F=w==null?void 0:w.data)==null?void 0:F.rows)&&(t.musics=[...t.musics,...w.data.rows],t.finshed=!w.data.next),B.value=!0}catch(w){console.log("🚀 ~ error:",w)}t.loading=!1},c=()=>{A.page=1,t.musics=[],o()},Q=YA(),g=()=>{t.loading||t.finshed||(A.page=A.page+1,o())},U=()=>{const F=document.querySelector(".searchNotice .van-field__control");if(F){const w=F.getBoundingClientRect();t.searchNotice.left=w.x+"px",t.searchNotice.top=w.y+"px",t.searchNotice.width=w.width+"px",t.searchNotice.height=w.height+"px"}};return HB(async()=>{await a(),o();const F=new IntersectionObserver(f=>{f[0].intersectionRatio>0&&g()});Pn(()=>{F.observe(Q.value)});const w=async()=>{const f=await Qr.get("/edu-app/user/getUserInfo",{initRequest:!0,requestType:"form",hideLoading:!0});(f==null?void 0:f.code)===200&&(t.vipMember=f.data.vipMember)};Xn("webViewOnResume",()=>{console.log("页面显示"),w(),t.typeIndex=0,t.musicIndex=0,c()}),U()}),()=>{var F,w,f,m,H;return E("div",{class:K.container},[E("div",{class:K.back,onClick:n},[E("img",{src:Os},null)]),E("div",{class:K.content},[E("div",{class:[K.leftContent]},[E("div",{class:K.leftBg2},null),E("div",{class:K.leftBg},null),E("div",{class:K.types},[t.types.map((h,C)=>E("div",{class:[K.type,A.musicSheetCategoriesId===h.id&&K.typeActive],onClick:()=>{A.musicSheetCategoriesId=h.id,c()}},[E("div",{class:K.typeImg},[E("img",{class:K.typeIcon,src:h.coverImg,onLoad:I=>{I.target.setAttribute("loaded","true")}},null)])]))]),E("div",{class:K.center},[E("div",{class:K.centerSearch},[E("div",{id:"coai-0"},[E(Yn,{class:["searchNotice",t.searchNoticeShow?K.searchNoticeShow:""],shape:"round",background:"transparent",clearable:!1,placeholder:"请输入关键字",onFocus:()=>t.searchNoticeShow=!1,onBlur:h=>{A.keyword=h,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.searchNoticeShow=!0})})},onSearch:h=>{A.keyword=h,c()}},null)])]),E("div",{class:K.musicContent},[t.musics.map((h,C)=>E("div",{class:[K.musicItem,t.musicIndex===C?K.musicActive:K.disableNotic],onClick:()=>t.musicIndex=C},[E("img",{class:K.musicAvtor,src:h.titleImg,onLoad:I=>{I.target.setAttribute("loaded","true")}},null),E("div",{class:K.musicInfo},[E("div",{class:K.musicName},[E(Hr,{text:h.musicSheetName,class:K.noticeBar,background:"none"},null)]),E("div",{class:K.musicDes},[E("div",{class:K.musicFavitor},[h.usedNum]),E("div",{class:[K.musicAuthor,"van-ellipsis"]},[h.composer||"佚名"])])])])),!t.finshed&&E("div",{ref:Q,class:K.loadingWrap},[E(_n,{color:"#259CFE"},null)]),!t.loading&&t.musics.length===0&&E("div",{class:K.empty},[E(kn,{description:"暂无曲谱"},null)])])])]),E("div",{class:[K.opacityBg,K.right]},[E("div",{class:K.rightBox},[E("div",{ref:r},[E("div",{class:K["right-musicName"]},[(F=t.musics[t.musicIndex])==null?void 0:F.musicSheetName]),t.isShowJianpu?E(Vt,null,[(f=(w=t.musics[t.musicIndex])==null?void 0:w.musicSvg)==null?void 0:f.split(",").map((h,C)=>E("img",{class:K.staff,src:h+"?v="+Date.now(),key:h,crossorigin:"anonymous"},null))]):E(Vt,null,[(H=(m=t.musics[t.musicIndex])==null?void 0:m.musicImg)==null?void 0:H.split(",").map((h,C)=>E("img",{class:K.staff,src:h+"?v="+Date.now(),key:h,crossorigin:"anonymous"},null))])])]),E("div",{class:K.rightBtns},[E("img",{id:"coai-1",src:t.isShowJianpu?Gs:Rs,onClick:()=>t.isShowJianpu=!t.isShowJianpu},null),E("img",{id:"coai-2",src:Ms,onClick:i},null),E("div",{class:K.rightBtnsRight,id:"coai-3"},[E("img",{src:Ns.icon_start,onClick:()=>s()},null)])])])]),t.searchNotice.width&&t.searchNoticeShow&&E("div",{class:K.searchNotice,style:{...t.searchNotice}},[E(Hr,{text:A.keyword,color:"#333",background:"none"},null)]),B.value&&E(fg,null,null),E(vB,{class:"popup-custom van-scale",transition:"van-scale",closeOnClickOverlay:!1,show:t.showVip,"onUpdate:show":h=>t.showVip=h},{default:()=>[E(Zn,{onClose:h=>{h&&Ct({api:"openWebView",content:{url:`${location.origin}${location.pathname}#/member-center`,orientation:1}}),t.showVip=!1}},null)]})])}}});export{Eg as default};
