@next2d/player 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/next2d.js +63 -63
  2. package/package.json +14 -14
  3. package/src/index.js +1 -1
package/next2d.js CHANGED
@@ -1,8 +1,8 @@
1
- const es="__next2d__",Ge=Math.min(2,window.devicePixelRatio),Ct=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)},wu=document.createElement("canvas");wu.width=wu.height=1;const pu=wu.getContext("2d");let un=null;const Or=e=>{un=e};let sn=null;const Fr=e=>{sn=e},nn=()=>sn,xt=()=>un,ct=new Float32Array([1,0,0,1,0,0]),dt=new Float32Array([1,0,0,1,0,0]),Q={x:0,y:0,pointer:"",hit:null};let rn=null;const ws=e=>{rn=e},an=()=>rn,Lr=(e,t=1)=>{let u="";u+="-webkit-tap-highlight-color: rgba(0,0,0,0);",u+="backface-visibility: hidden;",u+="touch-action: none;",t>1&&(u+=`transform: scale(${1/t});`),e.width=1,e.height=1,e.setAttribute("style",u)},cn=`(function(){"use strict";let rt=2048;const Cc=t=>{rt=Math.min(4096,t/2)};let Fe=4;const kc=t=>{Fe=t};let c;const Nc=t=>{c=t};let A;const Uc=t=>{A=t},Ht=(t,e,s,n=null)=>{const o=+t;return isNaN(o)&&n!==null?n:Math.min(Math.max(e,isNaN(o)?0:o),s)},$s=[],he=(...t)=>{const e=$s.pop()||[];return t.length&&e.push(...t),e},Pc=(t=null)=>{t&&(t.length&&(t.length=0),$s.push(t))},fe=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t),Es=[],Ts=(t=0,e=0,s=0,n=0)=>{const o=Es.pop()||new Float32Array(4);return o[0]=t,o[1]=e,o[2]=s,o[3]=n,o},As=t=>{Es.push(t)},xs=[],de=(t=0,e=0,s=0,n=0,o=0,r=0,a=0,l=0,h=0)=>{const f=xs.pop()||new Float32Array(9);return f[0]=t,f[1]=e,f[2]=s,f[3]=n,f[4]=o,f[5]=r,f[6]=a,f[7]=l,f[8]=h,f},Dc=t=>{xs.push(t)},vs=[],St=(t=0,e=0,s=0,n=0,o=0,r=0)=>{const a=vs.pop()||new Float32Array(6);return a[0]=t,a[1]=e,a[2]=s,a[3]=n,a[4]=o,a[5]=r,a},Kt=t=>{vs.push(t)},Se=t=>{const e=1/(t[0]*t[4]-t[3]*t[1]),s=t[3]*t[7]-t[4]*t[6],n=t[1]*t[6]-t[0]*t[7];return de(t[4]*e,0-t[1]*e,0,0-t[3]*e,t[0]*e,0,s*e,n*e,1)};let Ms=0,ys=0;const it=()=>Ms,ut=()=>ys,Xc=(t,e)=>{Ms=t,ys=e},_c=t=>{const e=-819.2*t[0]-819.2*t[2]+t[4],s=819.2*t[0]-819.2*t[2]+t[4],n=-819.2*t[0]+819.2*t[2]+t[4],o=-819.2*t[1]-819.2*t[3]+t[5],r=819.2*t[1]-819.2*t[3]+t[5],a=-819.2*t[1]+819.2*t[3]+t[5];let l=n-e,h=a-o;const f=Math.sqrt(l*l+h*h);f?(l=l/f,h=h/f):(l=0,h=0);const i=(s-e)*l+(r-o)*h;return Ts(e+i*l,o+i*h,s,r)};let Rs=1;const Yc=t=>{Rs=t},gt=()=>Rs,Gc=(t,e)=>{const s=t[0],n=t[1],o=t[2],r=t[3],a=t[4],l=t[5],h=e[0],f=e[1],i=e[2],E=e[3],$=e[4],v=e[5];return St(s*h+o*f,n*h+r*f,s*i+o*E,n*i+r*E,s*$+o*v+a,n*$+r*v+l)},Vc=()=>typeof crypto?.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)}),X=he(),Zt=he(),wt=(t=!1)=>{const e=t?4:10;return X.length<e&&(X.length=0),X.length&&(Zt.push(X.slice(0)),X.length=0),Zt},zc=()=>{for(X.length=0;Zt.length;)Pc(Zt.pop())},Bt=(t,e,s)=>{X.push(t,e,s)},Qt=(t,e)=>{const s=X.length,n=+X[s-3],o=+X[s-2];return t===n&&e===o},Wc=(t=!1)=>{const e=t?4:10;if(X.length<e){X.length=0;return}Zt.push(X.slice(0)),X.length=0},be=(t,e)=>{if(!X.length){Bt(t,e,!1);return}Qt(t,e)||(Wc(),Bt(t,e,!1))},jc=(t,e)=>{X.length||be(t,e),!Qt(t,e)&&Bt(t,e,!1)},gs=(t,e,s,n)=>{X.length||be(0,0),!Qt(s,n)&&(Bt(t,e,!0),Bt(s,n,!1))},Hc=()=>{if(X.length<7)return;const t=+X[0],e=+X[1];Qt(t,e)||Bt(t,e,!1)},F=new Float32Array(32),we=(t,e,s,n,o,r,a,l,h,f)=>{const i=(t+3*(s+o)+a)*.125,E=(e+3*(n+r)+l)*.125,$=(a+o-s-t)*.125,v=(l+r-n-e)*.125;F[h]=t,F[h+1]=e,F[h+2]=(t+s)*.5,F[h+3]=(e+n)*.5,F[h+4]=i-$,F[h+5]=E-v,F[h+6]=i,F[h+7]=E,F[f]=i,F[f+1]=E,F[f+2]=i+$,F[f+3]=E+v,F[f+4]=(o+a)*.5,F[f+5]=(r+l)*.5,F[f+6]=a,F[f+7]=l},$e=(t,e,s,n,o,r,a,l,h)=>{const f=(t+3*(s+o)+a)*.125,i=(e+3*(n+r)+l)*.125;F[h]=t*.25+s*.75,F[h+1]=e*.25+n*.75,F[h+2]=f,F[h+3]=i,F[h+4]=o*.75+a*.25,F[h+5]=r*.75+l*.25,F[h+6]=a,F[h+7]=l},Kc=(t,e,s,n,o,r,a,l)=>(we(t,e,s,n,o,r,a,l,0,16),we(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],0,8),we(F[16],F[17],F[18],F[19],F[20],F[21],F[22],F[23],16,24),$e(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],0),$e(F[8],F[9],F[10],F[11],F[12],F[13],F[14],F[15],8),$e(F[16],F[17],F[18],F[19],F[20],F[21],F[22],F[23],16),$e(F[24],F[25],F[26],F[27],F[28],F[29],F[30],F[31],24),F),Jt=(t,e,s,n,o,r)=>{if(X.length||be(0,0),Qt(o,r))return;const a=X.length,l=+X[a-3],h=+X[a-2],f=Kc(l,h,t,e,s,n,o,r);for(let i=0;32>i;)gs(f[i++],f[i++],f[i++],f[i++])},Zc=(t,e,s)=>{const n=s,o=s*.5522847498307936;Jt(t+n,e+o,t+o,e+n,t,e+n),Jt(t-o,e+n,t-n,e+o,t-n,e),Jt(t-n,e-o,t-o,e-n,t,e-n),Jt(t+o,e-n,t+n,e-o,t+n,e)},Qc=(t,e,s,n,o)=>{t.$clearColorR=Ht(e,0,1,0),t.$clearColorG=Ht(s,0,1,0),t.$clearColorB=Ht(n,0,1,0),t.$clearColorA=Ht(o,0,1,0)},Jc=(t,e,s,n)=>{c.clearColor(t,e,s,n),c.clear(c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),c.clearColor(0,0,0,0)},ht=[],ps=t=>{let e=-1,s=ht.length;for(;Math.abs(s-e)>1;){const n=Math.floor((s+e)/2);t<=ht[n].area?s=n:e=n}return s},qc=t=>{if(ht.indexOf(t)>-1)return;const e=ps(t.area);t.dirty=!0,ht.splice(e,0,t)},D=t=>{c.deleteTexture(t.resource)},vt=[],tn=t=>{if(!(vt.indexOf(t)>-1)){if(vt.length>10){c.deleteRenderbuffer(t.resource);return}t.dirty=!0,vt.push(t)}},Be=[];let ft;const en=t=>{ft=t.createFramebuffer()};let ms=null;const sn=t=>{ms=t.createFramebuffer()};let Ee=null;const cn=(t,e)=>{Ee=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,Ee),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e.resource,0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ee)};let Os=null;const Fs=t=>{Os=t},ds=()=>Os;let Ss=!1;const Ie=t=>{Ss=t},ws=()=>Ss;let Bs=null,Is=null,Ls=null,Cs=null;const nn=t=>{Is=t.createFramebuffer(),Bs=t.createFramebuffer(),Ls=t.createFramebuffer(),Cs=t.createBuffer(),t.bindBuffer(t.PIXEL_PACK_BUFFER,Cs)},on=()=>Bs,ks=()=>Is,rn=()=>Ls,z=(t,e=!0)=>{t.msaa?(qc(t.color),t.color=null,t.stencil=null):(e&&D(t.texture),t.texture=null,tn(t.stencil),t.stencil=null),Be.push(t)};let an=0;const ln=()=>({id:an++,width:0,height:0,clipLevel:0,msaa:!1,mask:!1,color:null,texture:null,stencil:null}),un=()=>{const t={id:0,resource:c.createRenderbuffer(),width:0,height:0,area:0,dirty:!1};return{resource:c.createRenderbuffer(),stencil:t,width:0,height:0,area:0,dirty:!1}},hn=t=>{if(!ht.length)return un();const e=ps(t);if(e<ht.length){const n=ht[e];return ht.splice(e,1),n}const s=ht.shift();if(!s)throw new Error("the color buffer is void.");return s},fn=(t,e)=>{t=Math.max(256,fe(t)),e=Math.max(256,fe(e));const s=hn(t*e);return(s.width<t||s.height<e)&&(t=Math.max(t,s.width),e=Math.max(e,s.height),s.width=t,s.height=e,s.area=t*e,c.bindRenderbuffer(c.RENDERBUFFER,s.resource),c.renderbufferStorageMultisample(c.RENDERBUFFER,Fe,c.RGBA8,t,e),c.bindRenderbuffer(c.RENDERBUFFER,s.stencil.resource),c.renderbufferStorageMultisample(c.RENDERBUFFER,Fe,c.STENCIL_INDEX8,t,e)),s.dirty=!0,s};let bn=0;const $n=()=>({id:bn++,resource:c.createRenderbuffer(),width:0,height:0,area:0,dirty:!1}),En=(t,e)=>{if(!vt.length)return $n();for(let s=0;s<vt.length;++s){const n=vt[s];if(!(n.width!==t||n.height!==e))return vt.splice(s,1),n}return vt.shift()},Tn=(t,e)=>{const s=En(t,e);return(s.width!==t||s.height!==e)&&(s.width=t,s.height=e,s.area=t*e,s.dirty=!1,c.bindRenderbuffer(c.RENDERBUFFER,s.resource),c.renderbufferStorage(c.RENDERBUFFER,c.STENCIL_INDEX8,t,e)),s};let An=0;const Ns=(t,e)=>({id:An++,resource:c.createTexture(),width:t,height:e,area:t*e,smooth:!1});let It=-1;const Us=t=>{It=t},Le=[null,null,null],xn=(t,e=!1)=>{It!==c.TEXTURE0&&(Us(c.TEXTURE0),c.activeTexture(c.TEXTURE0)),Le[0]=t,c.bindTexture(c.TEXTURE_2D,t.resource),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,e?c.LINEAR:c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,e?c.LINEAR:c.NEAREST),c.texStorage2D(c.TEXTURE_2D,1,c.RGBA8,t.width,t.height)},qt=(t,e,s=!1)=>{const n=Ns(t,e);return xn(n,s),n},W=(t,e,s=!1)=>{const n=Be.length?Be.shift():ln();return n.width=t,n.height=e,s?(n.msaa=!0,n.texture=null,n.color=fn(t,e),n.stencil=n.color.stencil):(n.msaa=!1,n.texture=qt(t,e),n.color=null,n.stencil=Tn(t,e)),n.mask=!1,n.clipLevel=0,n},vn=()=>{Fs(null),ws()&&(Ie(!1),c.bindFramebuffer(c.FRAMEBUFFER,null))},Mn=()=>{const t=Ns(rt,rt);return c.activeTexture(c.TEXTURE3),c.bindTexture(c.TEXTURE_2D,t.resource),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.NEAREST),c.texStorage2D(c.TEXTURE_2D,1,c.RGBA8,t.width,t.height),c.activeTexture(It!==-1?It:c.TEXTURE0),t};let te=0;const pt=t=>{te=t},Lt=()=>te,Te=[],yn=()=>Te,Rn=t=>{Te[te]=t},gn=()=>(te in Te||Rn(W(rt,rt,!0)),Te[te]),ee=[];let Ce=null;const Ps=()=>(Ce||(Ce=Mn()),Ce),se=[],Ds=t=>(t in se||(se[t]=new Float32Array([Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE])),se[t]),ce=[],Xs=t=>(t in ce||(ce[t]=new Float32Array([Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE])),ce[t]),pn=()=>{for(let t=0;t<se.length;++t){const e=se[t];e&&(e[0]=e[1]=Number.MAX_VALUE,e[2]=e[3]=-Number.MAX_VALUE)}for(let t=0;t<ce.length;++t){const e=ce[t];e&&(e[0]=e[1]=Number.MAX_VALUE,e[2]=e[3]=-Number.MAX_VALUE)}};let _s=0;const Ys=t=>{_s=t},Gs=()=>_s,mn=()=>{ee.length=0,pt(0);const t=yn();for(let e=0;e<t.length;e++)z(t[e]);t.length=0},On=(t,e,s,n=!0)=>{if(t.clearArraysInstanced(),t.$stackAttachmentObject.length)for(let o=0;o<t.$stackAttachmentObject.length;++o){const r=t.$stackAttachmentObject[o];r&&z(r)}else t.$mainAttachmentObject&&z(t.$mainAttachmentObject);n&&mn(),vn(),t.$mainAttachmentObject=W(e,s,!0),t.bind(t.$mainAttachmentObject)},Fn=(t,e,s,n)=>{c.enable(c.SCISSOR_TEST),c.scissor(t,e,s,n),c.clear(c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),c.disable(c.SCISSOR_TEST)},st=(t,e,s=null,n=!1)=>{(It===-1||e!==It)&&(Us(e),c.activeTexture(e));const o=Le[t];o!==null&&s!==null&&o.id===s.id||s===o||(Le[t]=s,c.bindTexture(c.TEXTURE_2D,s?s.resource:null),s&&s.smooth!==n&&(s.smooth=n,c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,n?c.LINEAR:c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,n?c.LINEAR:c.NEAREST)))},V=(t,e=!1)=>{st(2,c.TEXTURE2,null),st(1,c.TEXTURE1,null),st(0,c.TEXTURE0,t,e)},dn=t=>{Fs(t),ws()||(Ie(!0),c.bindFramebuffer(c.FRAMEBUFFER,ft)),t.msaa?(c.bindRenderbuffer(c.RENDERBUFFER,t.color.resource),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.RENDERBUFFER,t.color.resource)):(V(t.texture),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,t.texture.resource,0)),c.bindRenderbuffer(c.RENDERBUFFER,t.stencil.resource),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.STENCIL_ATTACHMENT,c.RENDERBUFFER,t.stencil.resource)},ke=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=t.clipLevel;let s=0;for(let n=0;n<e;++n)s|=(1<<e-n)-1;c.stencilMask(255),c.stencilFunc(c.EQUAL,s&255,s),c.stencilOp(c.KEEP,c.KEEP,c.KEEP),c.colorMask(!0,!0,!0,!0),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.disable(c.SCISSOR_TEST)};let Vs=!1;const Ae=t=>{Vs=t},Ne=()=>Vs,ne=new Map,oe=new Map,Sn=t=>{!t&&Ne()?(Ae(!1),c.disable(c.STENCIL_TEST),c.disable(c.SCISSOR_TEST)):t&&!Ne()&&(Ae(!0),c.enable(c.STENCIL_TEST),ke())},wn=(t,e)=>{const s=ds();if(s&&e.id===s.id)return;dn(e),(!s||s.width!==e.width||s.height!==e.height)&&(Xc(e.width,e.height),c.viewport(0,0,e.width,e.height));const n=e.msaa?e.color:e.stencil;n.dirty&&(n.dirty=!1,t.clearRect(0,0,e.width,e.height)),Sn(e.mask)},Bn=t=>{t.$stack.push(de(...t.$matrix))},In=t=>{if(!t.$stack.length)return;const e=t.$stack.pop();t.$matrix[0]=e[0],t.$matrix[1]=e[1],t.$matrix[3]=e[3],t.$matrix[4]=e[4],t.$matrix[6]=e[6],t.$matrix[7]=e[7],Dc(e)},Ln=(t,e,s,n,o,r,a)=>{t[0]=e,t[1]=s,t[3]=n,t[4]=o,t[6]=r,t[7]=a},Cn=(t,e,s,n,o,r,a)=>{const l=t.$matrix[0],h=t.$matrix[1],f=t.$matrix[3],i=t.$matrix[4],E=t.$matrix[6],$=t.$matrix[7];t.$matrix[0]=e*l+s*f,t.$matrix[1]=e*h+s*i,t.$matrix[3]=n*l+o*f,t.$matrix[4]=n*h+o*i,t.$matrix[6]=r*l+a*f+E,t.$matrix[7]=r*h+a*i+$},kn=t=>{t.globalAlpha=1,t.globalCompositeOperation="normal",t.imageSmoothingEnabled=!1},Nn=t=>{t.$fillStyle.fill(1),t.$strokeStyle.fill(1)},Un=(t,e,s,n)=>{c.enable(c.SCISSOR_TEST),c.scissor(t,e,s+1,n+1),c.clear(c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),c.scissor(t,e,s,n)},Pn=()=>{c.disable(c.SCISSOR_TEST)},Dn=(t,e,s,n,o,r,a,l,h,f,i,E,$)=>{const v=t.length-5;for(let T=3;T<v;T+=3){let u=s*17;t[T+2]?(e[u++]=t[T-3],e[u++]=t[T-2],e[u++]=0,e[u++]=0,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T],e[u++]=t[T+1],e[u++]=.5,e[u++]=0,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T+3],e[u++]=t[T+4],e[u++]=1,e[u++]=1,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0):t[T+5]?(e[u++]=t[0],e[u++]=t[1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T],e[u++]=t[T+1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T+6],e[u++]=t[T+7],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0):(e[u++]=t[0],e[u++]=t[1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T],e[u++]=t[T+1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T+3],e[u++]=t[T+4],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0),s+=3}return s},xe=(t,e="fill")=>{const s=e==="fill"?A.$fillStyle:A.$strokeStyle,n=s[0],o=s[1],r=s[2],a=s[3],l=A.$matrix,h=it(),f=ut(),i=l[0]/h,E=l[3]/h,$=l[6]/h,v=l[1]/f,T=l[4]/f,u=l[7]/f;let g=0;for(let L=0;L<t.length;++L)g+=(t[L].length/3-2)*51;const I=new Float32Array(g);let d=0;for(let L=0;L<t.length;++L)d=Dn(t[L],I,d,i,v,E,T,$,u,n,o,r,a);return{buffer:I,indexCount:d}},Xn=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t);let re=new Float32Array(128),Ct=0;const _n=()=>re,Yn=()=>Ct,kt=t=>{const e=t.length+Ct;if(e>re.length){const s=new Float32Array(Xn(e));s.set(re),s.set(t,Ct),re=s}else re.set(t,Ct);Ct+=t.length},q=[],bt=[],zs=()=>{bt.length=0,Ct=0,q.length=0},Gn=t=>{const e=wt();if(!e.length)return;bt.push(t);const s=xe(e);kt(s.buffer),q.push(s.indexCount)},tt=[],Vn=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=xe(a);kt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},zn=(t,e,s)=>{const n=Math.sqrt(t*t+e*e);return{x:-(e/n)*s,y:t/n*s}},Wn=(t,e,s)=>{const n={x:e.x-t.x,y:e.y-t.y},o=zn(n.x,n.y,s),r={x:t.x+o.x,y:t.y+o.y},a={x:e.x+o.x,y:e.y+o.y},l={x:t.x-o.x,y:t.y-o.y},h={x:e.x-o.x,y:e.y-o.y};return[r.x,r.y,!1,a.x,a.y,!1,h.x,h.y,!1,l.x,l.y,!1,r.x,r.y,!1]},Ue=(t,e,s)=>({x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}),jn=(t,e,s,n=.5)=>{const o=Ue(t,e,n),r=Ue(e,s,n),a=Ue(o,r,n);return[[t,o,a],[a,r,s]]},Hn=(t,e,s,n=4)=>{let o=[[t,e,s]];for(let r=0;r<n;++r){const a=[];for(let l=0;l<o.length;++l){const h=o[l];if(!h)continue;const f=jn(h[0],h[1],h[2],.5);a.push(f[0],f[1])}o=a}return o},Kn=(t,e,s,n)=>({x:(1-t)**2*e.x+2*(1-t)*t*s.x+t**2*n.x,y:(1-t)**2*e.y+2*(1-t)*t*s.y+t**2*n.y}),Zn=(t,e,s,n)=>({x:2*(1-t)*(s.x-e.x)+2*t*(n.x-s.x),y:2*(1-t)*(s.y-e.y)+2*t*(n.y-s.y)}),Qn=t=>{const e=Math.sqrt(t.x*t.x+t.y*t.y);return e===0?{x:0,y:0}:{x:t.x/e,y:t.y/e}},Ws=(t,e,s,n)=>{const o=[0,.5,1],r=[];for(let a=0;a<o.length;++a){const l=o[a],h=Kn(l,t,e,s),f=Zn(l,t,e,s),i=Qn({x:-f.y,y:f.x});r.push({x:h.x+i.x*n,y:h.y+i.y*n})}return r},Jn=(t,e,s,n)=>{const o=Hn(t,e,s,5),r=[],a=[];for(let E=0;E<o.length;++E){const[$,v,T]=o[E];r.push(Ws($,v,T,+n)),a.push(Ws($,v,T,-n))}const l=r[0][0],h=[l.x,l.y,!1];for(let E=0;E<r.length;++E){const $=r[E];h.push($[1].x,$[1].y,!0,$[2].x,$[2].y,!1)}const f=[...a].reverse();for(let E=0;E<f.length;++E){const[$,v,T]=f[E];f[E]=[T,v,$]}const i=f[0][0];h.push(i.x,i.y,!1);for(let E=0;E<f.length;++E){const $=f[E];h.push($[1].x,$[1].y,!0,$[2].x,$[2].y,!1)}return h},Nt=(t,e,s,n)=>{const o=[];for(let r=0;r<n.length;r+=3){if(n[r+2])continue;const a=n[r],l=n[r+1];Math.sqrt(Math.pow(a-t,2)+Math.pow(l-e,2))===s&&o.push(a,l)}return o},Ut=new OffscreenCanvas(1,1).getContext("2d"),Pt=(t,e)=>{Ut.beginPath(),Ut.moveTo(e[0],e[1]);for(let s=3;s<e.length;s+=3)e[s+2]?(Ut.quadraticCurveTo(e[s],e[s+1],e[s+3],e[s+4]),s+=3):Ut.lineTo(e[s],e[s+1]);Ut.closePath();for(let s=0;s<t.length;s+=2){const n=t[s],o=t[s+1];if(!Ut.isPointInPath(n,o))return[n,o]}return null},js=(t,e,s,n,o=!1)=>{const r=o?0:n.length-1,a=o?n.length-1:n.length-2,l=Nt(t,e,s,n[r]),h=Nt(t,e,s,n[a]),f=Pt(l,n[a]);if(!f)return;const i=Pt(h,n[r]);if(!i)return;const E=Math.atan2(f[1]-e,f[0]-t);let v=Math.atan2(i[1]-e,i[0]-t)-E;v>Math.PI?v-=2*Math.PI:v<-Math.PI&&(v+=2*Math.PI);const T=8,u=v/T,g=[t,e,!1];for(let I=0;I<=T;I++){const d=E+I*u,L=t+s*Math.cos(d),O=e+s*Math.sin(d);g.push(L,O,!1)}n.splice(-1,0,g)},Hs=(t,e,s,n,o=!1)=>{const r=o?0:n.length-1,a=o?n.length-1:n.length-2,l=Nt(t,e,s,n[r]),h=Nt(t,e,s,n[a]);if(l[0]===h[0]&&l[1]===h[1]||l[0]===h[2]&&l[1]===h[3])return;const f=Pt(l,n[a]);if(!f)return;const i=Pt(h,n[r]);i&&n.splice(-1,0,[t,e,!1,f[0],f[1],!1,i[0],i[1],!1,t,e,!1])},qn=(t,e,s)=>{for(let n=0;n<2;++n){let o=0,r=0,a=0,l=0;n===0?(o=t[0],r=t[1],a=t[3],l=t[4]):(o=t[t.length-3],r=t[t.length-2],a=t[t.length-6],l=t[t.length-5]);const h=a-o,f=l-r,i=Math.atan2(f,h),E=i+Math.PI/2,$=i-Math.PI/2,v=16,T=($-E)/v,u=[];for(let g=0;g<=v;g++){const I=$+T*g,d=o+e*Math.cos(I),L=r+e*Math.sin(I);u.push(d,L,!1)}n===0?s.unshift(u):s.push(u)}},to=(t,e,s)=>{for(let n=0;n<2;++n){let o=0,r=0,a=0,l=0;n===0?(o=t[0],r=t[1],a=t[3],l=t[4]):(o=t[t.length-3],r=t[t.length-2],a=t[t.length-6],l=t[t.length-5]);const h=-(a-o),f=-(l-r),i=Math.sqrt(h*h+f*f);if(i===0)continue;const E=h/i,$=f/i,v=o+e*E,T=r+e*$,u=-$,g=E,I=[v+e*E+e*u,T+e*$+e*g,!1,v+e*E-e*u,T+e*$-e*g,!1,v-e*E-e*u,T-e*$-e*g,!1,v+e*E+e*u,T+e*$+e*g,!1,v-e*E-e*u,T-e*$-e*g,!1,v-e*E+e*u,T-e*$+e*g,!1];n===0?s.unshift(I):s.push(I)}},Ks=(t,e,s,n,o,r=!1)=>{const a=r?0:o.length-1,l=r?o.length-1:o.length-2,h=Nt(t.x,t.y,n,o[a]),f=Nt(t.x,t.y,n,o[l]);if(h[0]===f[0]&&h[1]===f[1]||h[0]===f[2]&&h[1]===f[3])return;const i=Pt(h,o[l]);if(!i)return;const E=Pt(f,o[a]);if(!E)return;const $=e.x-t.x,v=e.y-t.y,T=Math.hypot($,v),u={x:$/T,y:v/T},g=s.x-t.x,I=s.y-t.y,d=Math.hypot(g,I),L={x:g/d,y:I/d},O=u.x,y=u.y,M=L.x,S=L.y,w=O*S-y*M;w===0&&o.splice(-1,0,[t.x,t.y,!1,i[0],i[1],!1,E[0],E[1],!1]);const m=((E[0]-i[0])*S-(E[1]-i[1])*M)/w,p=i[0]+m*O,R=i[1]+m*y;o.splice(-1,0,[t.x,t.y,!1,i[0],i[1],!1,p,R,!1,t.x,t.y,!1,E[0],E[1],!1,p,R,!1])},eo=(t,e)=>{const s={x:t[0],y:t[1]},n={x:0,y:0},o={x:0,y:0},r={x:0,y:0},a=[];for(let l=3;l<t.length;l+=3){const h=t[l],f=t[l+1];if(t[l+2]){n.x=h,n.y=f;continue}if(o.x=h,o.y=f,t[l-1]?a.push(Jn(s,n,o,e)):a.push(Wn(s,o,e)),a.length>1)switch(A.joints){case 0:Hs(s.x,s.y,e,a);break;case 1:r.x=t[l-6],r.y=t[l-5],Ks(s,o,r,e,a);break;case 2:js(s.x,s.y,e,a);break}s.x=o.x,s.y=o.y}if(t[0]===t[t.length-3]&&t[1]===t[t.length-2])switch(A.joints){case 0:Hs(s.x,s.y,e,a,!0);break;case 1:s.x=t[0],s.y=t[1],o.x=t[3],o.y=t[4],r.x=t[t.length-6],r.y=t[t.length-5],Ks(s,o,r,e,a,!0);break;case 2:js(s.x,s.y,e,a,!0);break}else switch(A.caps){case 1:qn(t,e,a);break;case 2:to(t,e,a);break}return a},Pe=t=>{const e=A.thickness/2,s=[];for(let n=0;n<t.length;++n){const o=eo(t[n],e);s.push(...o)}return xe(s,"stroke")},so=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=Pe(a);kt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},Dt=new Map,Zs=()=>{Dt.clear()},co=t=>{Dt.set(q.length,t)},ve=()=>({id:Vc(),resource:c.createVertexArray(),vertexBuffer:c.createBuffer(),vertexLength:0});let De;const $t=t=>{De&&De.id===t.id||(De=t,c.bindVertexArray(t.resource))},no=()=>{const t=ve();$t(t),c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer);const e=new Float32Array([0,0,1,0,0,1,1,1,0,1,1,0]);return c.bufferData(c.ARRAY_BUFFER,e,c.STATIC_DRAW),c.enableVertexAttribArray(0),c.vertexAttribPointer(0,2,c.FLOAT,!1,0,0),t},Me=[],ct=new Float32Array([0,0,0,1,1,0,1,1]);let Xe;const oo=t=>{Xe=t.createBuffer()};let Qs;const ro=t=>{Qs=t};let _e;const ye=()=>(_e||(_e=no()),_e),ao=()=>{if(Me.length)return Me.pop();const t=ve();return $t(t),c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer),c.enableVertexAttribArray(0),c.enableVertexAttribArray(1),c.enableVertexAttribArray(2),c.enableVertexAttribArray(3),c.enableVertexAttribArray(4),c.enableVertexAttribArray(5),c.vertexAttribPointer(0,2,c.FLOAT,!1,68,0),c.vertexAttribPointer(1,2,c.FLOAT,!1,68,8),c.vertexAttribPointer(2,4,c.FLOAT,!1,68,16),c.vertexAttribPointer(3,3,c.FLOAT,!1,68,32),c.vertexAttribPointer(4,3,c.FLOAT,!1,68,44),c.vertexAttribPointer(5,3,c.FLOAT,!1,68,56),t},Js=()=>{const t=ao();$t(t);const e=_n(),s=Yn();return c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer),t.vertexLength<e.length&&(t.vertexLength=fe(e.length),c.bufferData(c.ARRAY_BUFFER,t.vertexLength*4,c.DYNAMIC_DRAW)),c.bufferSubData(c.ARRAY_BUFFER,0,e.subarray(0,s)),t},qs=t=>{Me.indexOf(t)>-1||Me.push(t)};let lo=0;const io=(t,e)=>{const s=c.createProgram(),n=c.createShader(c.VERTEX_SHADER);c.shaderSource(n,t),c.compileShader(n);const o=c.createShader(c.FRAGMENT_SHADER);return c.shaderSource(o,e),c.compileShader(o),c.attachShader(s,n),c.attachShader(s,o),c.linkProgram(s),c.detachShader(s,n),c.detachShader(s,o),c.deleteShader(n),c.deleteShader(o),{id:lo++,resource:s}},uo=(t,e,s=!1)=>{const n=c.getProgramParameter(t,c.ACTIVE_UNIFORMS);for(let o=0;o<n;++o){const r=c.getActiveUniform(t,o),a=r.name.endsWith("[0]")?r.name.slice(0,-3):r.name,l=c.getUniformLocation(t,a);if(r.type===c.SAMPLER_2D&&r.size===1&&!s)continue;const h={};switch(r.type){case c.FLOAT_VEC4:h.method=c.uniform4fv.bind(c,l),h.array=new Float32Array(4*r.size),h.assign=-1;break;case c.INT_VEC4:h.method=c.uniform4iv.bind(c,l),h.array=new Int32Array(4*r.size),h.assign=-1;break;case c.SAMPLER_2D:h.method=s?c.uniform1i.bind(c,l,3):c.uniform1iv.bind(c,l),h.array=new Int32Array(r.size),h.assign=1;break;case c.FLOAT:case c.FLOAT_VEC2:case c.FLOAT_VEC3:case c.FLOAT_MAT2:case c.FLOAT_MAT3:case c.FLOAT_MAT4:case c.INT:case c.INT_VEC2:case c.INT_VEC3:default:throw new Error("Use gl.FLOAT_VEC4 or gl.INT_VEC4 instead")}e.set(a,h)}};let tc=-1;const ho=t=>{tc!==t.id&&(tc=t.id,c.useProgram(t.resource))},fo=t=>{for(const e of t.values())e.method===void 0||e.assign===void 0||(e.assign<0?e.method(e.array):e.assign>0&&(e.assign--,e.method(e.array)))};class Z{_$programObject;_$uniformMap;constructor(e,s,n=!1){this._$programObject=io(e,s),this._$uniformMap=new Map,uo(this._$programObject.resource,this._$uniformMap,n)}useProgram(){ho(this._$programObject)}bindUniform(){fo(this._$uniformMap)}get highp(){return this._$uniformMap.get("u_highp").array}get mediump(){return this._$uniformMap.get("u_mediump").array}get textures(){return this._$uniformMap.get("u_textures").array}}const Et=new Map,bo=()=>\`
1
+ const es="__next2d__",Ge=Math.min(2,window.devicePixelRatio),Lt=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)},Mu=document.createElement("canvas");Mu.width=Mu.height=1;const pu=Mu.getContext("2d");let un=null;const Or=e=>{un=e};let sn=null;const Fr=e=>{sn=e},nn=()=>sn,xt=()=>un,ct=new Float32Array([1,0,0,1,0,0]),dt=new Float32Array([1,0,0,1,0,0]),Q={x:0,y:0,pointer:"",hit:null};let rn=null;const Ms=e=>{rn=e},an=()=>rn,Cr=(e,t=1)=>{let u="";u+="-webkit-tap-highlight-color: rgba(0,0,0,0);",u+="backface-visibility: hidden;",u+="touch-action: none;",t>1&&(u+=`transform: scale(${1/t});`),e.width=1,e.height=1,e.setAttribute("style",u)},cn=`(function(){"use strict";let rt=2048;const Pc=t=>{rt=Math.min(4096,t/2)};let Se=4;const Uc=t=>{Se=t};let c;const Dc=t=>{c=t};let A;const Xc=t=>{A=t},Zt=(t,e,s,n=null)=>{const o=+t;return isNaN(o)&&n!==null?n:Math.min(Math.max(e,isNaN(o)?0:o),s)},As=[],be=(...t)=>{const e=As.pop()||[];return t.length&&e.push(...t),e},_c=(t=null)=>{t&&(t.length&&(t.length=0),As.push(t))},$e=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t),xs=[],vs=(t=0,e=0,s=0,n=0)=>{const o=xs.pop()||new Float32Array(4);return o[0]=t,o[1]=e,o[2]=s,o[3]=n,o},Ms=t=>{xs.push(t)},ys=[],we=(t=0,e=0,s=0,n=0,o=0,r=0,a=0,l=0,h=0)=>{const f=ys.pop()||new Float32Array(9);return f[0]=t,f[1]=e,f[2]=s,f[3]=n,f[4]=o,f[5]=r,f[6]=a,f[7]=l,f[8]=h,f},Yc=t=>{ys.push(t)},Rs=[],St=(t=0,e=0,s=0,n=0,o=0,r=0)=>{const a=Rs.pop()||new Float32Array(6);return a[0]=t,a[1]=e,a[2]=s,a[3]=n,a[4]=o,a[5]=r,a},Qt=t=>{Rs.push(t)},Be=t=>{const e=1/(t[0]*t[4]-t[3]*t[1]),s=t[3]*t[7]-t[4]*t[6],n=t[1]*t[6]-t[0]*t[7];return we(t[4]*e,0-t[1]*e,0,0-t[3]*e,t[0]*e,0,s*e,n*e,1)};let gs=0,ps=0;const it=()=>gs,ut=()=>ps,Gc=(t,e)=>{gs=t,ps=e},zc=t=>{const e=-819.2*t[0]-819.2*t[2]+t[4],s=819.2*t[0]-819.2*t[2]+t[4],n=-819.2*t[0]+819.2*t[2]+t[4],o=-819.2*t[1]-819.2*t[3]+t[5],r=819.2*t[1]-819.2*t[3]+t[5],a=-819.2*t[1]+819.2*t[3]+t[5];let l=n-e,h=a-o;const f=Math.sqrt(l*l+h*h);f?(l=l/f,h=h/f):(l=0,h=0);const i=(s-e)*l+(r-o)*h;return vs(e+i*l,o+i*h,s,r)};let Os=1;const Vc=t=>{Os=t},gt=()=>Os,Wc=(t,e)=>{const s=t[0],n=t[1],o=t[2],r=t[3],a=t[4],l=t[5],h=e[0],f=e[1],i=e[2],E=e[3],$=e[4],v=e[5];return St(s*h+o*f,n*h+r*f,s*i+o*E,n*i+r*E,s*$+o*v+a,n*$+r*v+l)},jc=()=>typeof crypto?.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)}),X=be(),Jt=be(),wt=(t=!1)=>{const e=t?4:10;return X.length<e&&(X.length=0),X.length&&(Jt.push(X.slice(0)),X.length=0),Jt},Hc=()=>{for(X.length=0;Jt.length;)_c(Jt.pop())},Bt=(t,e,s)=>{X.push(t,e,s)},qt=(t,e)=>{const s=X.length,n=+X[s-3],o=+X[s-2];return t===n&&e===o},Kc=(t=!1)=>{const e=t?4:10;if(X.length<e){X.length=0;return}Jt.push(X.slice(0)),X.length=0},Ee=(t,e)=>{if(!X.length){Bt(t,e,!1);return}qt(t,e)||(Kc(),Bt(t,e,!1))},Zc=(t,e)=>{X.length||Ee(t,e),!qt(t,e)&&Bt(t,e,!1)},ms=(t,e,s,n)=>{X.length||Ee(0,0),!qt(s,n)&&(Bt(t,e,!0),Bt(s,n,!1))},Qc=()=>{if(X.length<7)return;const t=+X[0],e=+X[1];qt(t,e)||Bt(t,e,!1)},F=new Float32Array(32),Ie=(t,e,s,n,o,r,a,l,h,f)=>{const i=(t+3*(s+o)+a)*.125,E=(e+3*(n+r)+l)*.125,$=(a+o-s-t)*.125,v=(l+r-n-e)*.125;F[h]=t,F[h+1]=e,F[h+2]=(t+s)*.5,F[h+3]=(e+n)*.5,F[h+4]=i-$,F[h+5]=E-v,F[h+6]=i,F[h+7]=E,F[f]=i,F[f+1]=E,F[f+2]=i+$,F[f+3]=E+v,F[f+4]=(o+a)*.5,F[f+5]=(r+l)*.5,F[f+6]=a,F[f+7]=l},Te=(t,e,s,n,o,r,a,l,h)=>{const f=(t+3*(s+o)+a)*.125,i=(e+3*(n+r)+l)*.125;F[h]=t*.25+s*.75,F[h+1]=e*.25+n*.75,F[h+2]=f,F[h+3]=i,F[h+4]=o*.75+a*.25,F[h+5]=r*.75+l*.25,F[h+6]=a,F[h+7]=l},Jc=(t,e,s,n,o,r,a,l)=>(Ie(t,e,s,n,o,r,a,l,0,16),Ie(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],0,8),Ie(F[16],F[17],F[18],F[19],F[20],F[21],F[22],F[23],16,24),Te(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],0),Te(F[8],F[9],F[10],F[11],F[12],F[13],F[14],F[15],8),Te(F[16],F[17],F[18],F[19],F[20],F[21],F[22],F[23],16),Te(F[24],F[25],F[26],F[27],F[28],F[29],F[30],F[31],24),F),te=(t,e,s,n,o,r)=>{if(X.length||Ee(0,0),qt(o,r))return;const a=X.length,l=+X[a-3],h=+X[a-2],f=Jc(l,h,t,e,s,n,o,r);for(let i=0;32>i;)ms(f[i++],f[i++],f[i++],f[i++])},qc=(t,e,s)=>{const n=s,o=s*.5522847498307936;te(t+n,e+o,t+o,e+n,t,e+n),te(t-o,e+n,t-n,e+o,t-n,e),te(t-n,e-o,t-o,e-n,t,e-n),te(t+o,e-n,t+n,e-o,t+n,e)},tn=(t,e,s,n,o)=>{t.$clearColorR=Zt(e,0,1,0),t.$clearColorG=Zt(s,0,1,0),t.$clearColorB=Zt(n,0,1,0),t.$clearColorA=Zt(o,0,1,0)},en=(t,e,s,n)=>{c.clearColor(t,e,s,n),c.clear(c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),c.clearColor(0,0,0,0)},ht=[],Fs=t=>{let e=-1,s=ht.length;for(;Math.abs(s-e)>1;){const n=Math.floor((s+e)/2);t<=ht[n].area?s=n:e=n}return s},sn=t=>{if(ht.indexOf(t)>-1)return;const e=Fs(t.area);t.dirty=!0,ht.splice(e,0,t)},D=t=>{c.deleteTexture(t.resource)},vt=[],cn=t=>{if(!(vt.indexOf(t)>-1)){if(vt.length>10){c.deleteRenderbuffer(t.resource);return}t.dirty=!0,vt.push(t)}},Ce=[];let ft;const nn=t=>{ft=t.createFramebuffer()};let ds=null;const on=t=>{ds=t.createFramebuffer()};let Ae=null;const rn=(t,e)=>{Ae=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,Ae),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e.resource,0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ae)};let Ss=null;const ws=t=>{Ss=t},Bs=()=>Ss;let Is=!1;const Le=t=>{Is=t},Cs=()=>Is;let Ls=null,ks=null,Ns=null,Ps=null;const an=t=>{ks=t.createFramebuffer(),Ls=t.createFramebuffer(),Ns=t.createFramebuffer(),Ps=t.createBuffer(),t.bindBuffer(t.PIXEL_PACK_BUFFER,Ps)},ln=()=>Ls,Us=()=>ks,un=()=>Ns,V=(t,e=!0)=>{t.msaa?(sn(t.color),t.color=null,t.stencil=null):(e&&D(t.texture),t.texture=null,cn(t.stencil),t.stencil=null),Ce.push(t)};let hn=0;const fn=()=>({id:hn++,width:0,height:0,clipLevel:0,msaa:!1,mask:!1,color:null,texture:null,stencil:null}),bn=()=>{const t={id:0,resource:c.createRenderbuffer(),width:0,height:0,area:0,dirty:!1};return{resource:c.createRenderbuffer(),stencil:t,width:0,height:0,area:0,dirty:!1}},$n=t=>{if(!ht.length)return bn();const e=Fs(t);if(e<ht.length){const n=ht[e];return ht.splice(e,1),n}const s=ht.shift();if(!s)throw new Error("the color buffer is void.");return s},En=(t,e)=>{t=Math.max(256,$e(t)),e=Math.max(256,$e(e));const s=$n(t*e);return(s.width<t||s.height<e)&&(t=Math.max(t,s.width),e=Math.max(e,s.height),s.width=t,s.height=e,s.area=t*e,c.bindRenderbuffer(c.RENDERBUFFER,s.resource),c.renderbufferStorageMultisample(c.RENDERBUFFER,Se,c.RGBA8,t,e),c.bindRenderbuffer(c.RENDERBUFFER,s.stencil.resource),c.renderbufferStorageMultisample(c.RENDERBUFFER,Se,c.STENCIL_INDEX8,t,e)),s.dirty=!0,s};let Tn=0;const An=()=>({id:Tn++,resource:c.createRenderbuffer(),width:0,height:0,area:0,dirty:!1}),xn=(t,e)=>{if(!vt.length)return An();for(let s=0;s<vt.length;++s){const n=vt[s];if(!(n.width!==t||n.height!==e))return vt.splice(s,1),n}return vt.shift()},vn=(t,e)=>{const s=xn(t,e);return(s.width!==t||s.height!==e)&&(s.width=t,s.height=e,s.area=t*e,s.dirty=!1,c.bindRenderbuffer(c.RENDERBUFFER,s.resource),c.renderbufferStorage(c.RENDERBUFFER,c.STENCIL_INDEX8,t,e)),s};let Mn=0;const Ds=(t,e)=>({id:Mn++,resource:c.createTexture(),width:t,height:e,area:t*e,smooth:!1});let It=-1;const Xs=t=>{It=t},ke=[null,null,null],yn=(t,e=!1)=>{It!==c.TEXTURE0&&(Xs(c.TEXTURE0),c.activeTexture(c.TEXTURE0)),ke[0]=t,c.bindTexture(c.TEXTURE_2D,t.resource),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,e?c.LINEAR:c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,e?c.LINEAR:c.NEAREST),c.texStorage2D(c.TEXTURE_2D,1,c.RGBA8,t.width,t.height)},ee=(t,e,s=!1)=>{const n=Ds(t,e);return yn(n,s),n},W=(t,e,s=!1)=>{const n=Ce.length?Ce.shift():fn();return n.width=t,n.height=e,s?(n.msaa=!0,n.texture=null,n.color=En(t,e),n.stencil=n.color.stencil):(n.msaa=!1,n.texture=ee(t,e),n.color=null,n.stencil=vn(t,e)),n.mask=!1,n.clipLevel=0,n},Rn=()=>{ws(null),Cs()&&(Le(!1),c.bindFramebuffer(c.FRAMEBUFFER,null))},gn=()=>{const t=Ds(rt,rt);return c.activeTexture(c.TEXTURE3),c.bindTexture(c.TEXTURE_2D,t.resource),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.NEAREST),c.texStorage2D(c.TEXTURE_2D,1,c.RGBA8,t.width,t.height),c.activeTexture(It!==-1?It:c.TEXTURE0),t},Ct=Number.MAX_VALUE,Lt=-Number.MAX_VALUE;let se=0;const pt=t=>{se=t},kt=()=>se,xe=[],pn=()=>xe,On=t=>{xe[se]=t},mn=()=>(se in xe||On(W(rt,rt,!0)),xe[se]),ce=[];let Ne=null;const _s=()=>(Ne||(Ne=gn()),Ne),ne=[],Ys=t=>(t in ne||(ne[t]=new Float32Array([Ct,Ct,Lt,Lt])),ne[t]),oe=[],Gs=t=>(t in oe||(oe[t]=new Float32Array([Ct,Ct,Lt,Lt])),oe[t]),Fn=()=>{for(let t=0;t<ne.length;++t){const e=ne[t];e&&(e[0]=e[1]=Ct,e[2]=e[3]=Lt)}for(let t=0;t<oe.length;++t){const e=oe[t];e&&(e[0]=e[1]=Ct,e[2]=e[3]=Lt)}};let zs=0;const Vs=t=>{zs=t},Ws=()=>zs,dn=()=>{ce.length=0,pt(0);const t=pn();for(let e=0;e<t.length;e++)V(t[e]);t.length=0},Sn=(t,e,s,n=!0)=>{if(t.clearArraysInstanced(),t.$stackAttachmentObject.length)for(let o=0;o<t.$stackAttachmentObject.length;++o){const r=t.$stackAttachmentObject[o];r&&V(r)}else t.$mainAttachmentObject&&V(t.$mainAttachmentObject);n&&dn(),Rn(),t.$mainAttachmentObject=W(e,s,!0),t.bind(t.$mainAttachmentObject)},wn=(t,e,s,n)=>{c.enable(c.SCISSOR_TEST),c.scissor(t,e,s,n),c.clear(c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),c.disable(c.SCISSOR_TEST)},st=(t,e,s=null,n=!1)=>{(It===-1||e!==It)&&(Xs(e),c.activeTexture(e));const o=ke[t];o!==null&&s!==null&&o.id===s.id||s===o||(ke[t]=s,c.bindTexture(c.TEXTURE_2D,s?s.resource:null),s&&s.smooth!==n&&(s.smooth=n,c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,n?c.LINEAR:c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,n?c.LINEAR:c.NEAREST)))},z=(t,e=!1)=>{st(2,c.TEXTURE2,null),st(1,c.TEXTURE1,null),st(0,c.TEXTURE0,t,e)},Bn=t=>{ws(t),Cs()||(Le(!0),c.bindFramebuffer(c.FRAMEBUFFER,ft)),t.msaa?(c.bindRenderbuffer(c.RENDERBUFFER,t.color.resource),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.RENDERBUFFER,t.color.resource)):(z(t.texture),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,t.texture.resource,0)),c.bindRenderbuffer(c.RENDERBUFFER,t.stencil.resource),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.STENCIL_ATTACHMENT,c.RENDERBUFFER,t.stencil.resource)},Pe=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=t.clipLevel;let s=0;for(let n=0;n<e;++n)s|=(1<<e-n)-1;c.stencilMask(255),c.stencilFunc(c.EQUAL,s&255,s),c.stencilOp(c.KEEP,c.KEEP,c.KEEP),c.colorMask(!0,!0,!0,!0),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.disable(c.SCISSOR_TEST)};let js=!1;const ve=t=>{js=t},Ue=()=>js,re=new Map,ae=new Map,In=t=>{!t&&Ue()?(ve(!1),c.disable(c.STENCIL_TEST),c.disable(c.SCISSOR_TEST)):t&&!Ue()&&(ve(!0),c.enable(c.STENCIL_TEST),Pe())},Cn=(t,e)=>{const s=Bs();if(s&&e.id===s.id)return;Bn(e),(!s||s.width!==e.width||s.height!==e.height)&&(Gc(e.width,e.height),c.viewport(0,0,e.width,e.height));const n=e.msaa?e.color:e.stencil;n.dirty&&(n.dirty=!1,t.clearRect(0,0,e.width,e.height)),In(e.mask)},Ln=t=>{t.$stack.push(we(...t.$matrix))},kn=t=>{if(!t.$stack.length)return;const e=t.$stack.pop();t.$matrix[0]=e[0],t.$matrix[1]=e[1],t.$matrix[3]=e[3],t.$matrix[4]=e[4],t.$matrix[6]=e[6],t.$matrix[7]=e[7],Yc(e)},Nn=(t,e,s,n,o,r,a)=>{t[0]=e,t[1]=s,t[3]=n,t[4]=o,t[6]=r,t[7]=a},Pn=(t,e,s,n,o,r,a)=>{const l=t.$matrix[0],h=t.$matrix[1],f=t.$matrix[3],i=t.$matrix[4],E=t.$matrix[6],$=t.$matrix[7];t.$matrix[0]=e*l+s*f,t.$matrix[1]=e*h+s*i,t.$matrix[3]=n*l+o*f,t.$matrix[4]=n*h+o*i,t.$matrix[6]=r*l+a*f+E,t.$matrix[7]=r*h+a*i+$},Un=t=>{t.globalAlpha=1,t.globalCompositeOperation="normal",t.imageSmoothingEnabled=!1},Dn=t=>{t.$fillStyle.fill(1),t.$strokeStyle.fill(1)},Xn=(t,e,s,n)=>{c.enable(c.SCISSOR_TEST),c.scissor(t,e,s+1,n+1),c.clear(c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),c.scissor(t,e,s,n)},_n=()=>{c.disable(c.SCISSOR_TEST)},Yn=(t,e,s,n,o,r,a,l,h,f,i,E,$)=>{const v=t.length-5;for(let T=3;T<v;T+=3){let u=s*17;t[T+2]?(e[u++]=t[T-3],e[u++]=t[T-2],e[u++]=0,e[u++]=0,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T],e[u++]=t[T+1],e[u++]=.5,e[u++]=0,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T+3],e[u++]=t[T+4],e[u++]=1,e[u++]=1,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0):t[T+5]?(e[u++]=t[0],e[u++]=t[1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T],e[u++]=t[T+1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T+6],e[u++]=t[T+7],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0):(e[u++]=t[0],e[u++]=t[1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T],e[u++]=t[T+1],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0,e[u++]=t[T+3],e[u++]=t[T+4],e[u++]=.5,e[u++]=.5,e[u++]=f,e[u++]=i,e[u++]=E,e[u++]=$,e[u++]=n,e[u++]=o,e[u++]=0,e[u++]=r,e[u++]=a,e[u++]=0,e[u++]=l,e[u++]=h,e[u++]=0),s+=3}return s},Me=(t,e="fill")=>{const s=e==="fill"?A.$fillStyle:A.$strokeStyle,n=s[0],o=s[1],r=s[2],a=s[3],l=A.$matrix,h=it(),f=ut(),i=l[0]/h,E=l[3]/h,$=l[6]/h,v=l[1]/f,T=l[4]/f,u=l[7]/f;let g=0;for(let C=0;C<t.length;++C)g+=(t[C].length/3-2)*51;const I=new Float32Array(g);let d=0;for(let C=0;C<t.length;++C)d=Yn(t[C],I,d,i,v,E,T,$,u,n,o,r,a);return{buffer:I,indexCount:d}},Gn=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t);let le=new Float32Array(128),Nt=0;const zn=()=>le,Vn=()=>Nt,Pt=t=>{const e=t.length+Nt;if(e>le.length){const s=new Float32Array(Gn(e));s.set(le),s.set(t,Nt),le=s}else le.set(t,Nt);Nt+=t.length},q=[],bt=[],Hs=()=>{bt.length=0,Nt=0,q.length=0},Wn=t=>{const e=wt();if(!e.length)return;bt.push(t);const s=Me(e);Pt(s.buffer),q.push(s.indexCount)},tt=[],jn=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=Me(a);Pt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},Hn=(t,e,s)=>{const n=Math.sqrt(t*t+e*e);return{x:-(e/n)*s,y:t/n*s}},Kn=(t,e,s)=>{const n={x:e.x-t.x,y:e.y-t.y},o=Hn(n.x,n.y,s),r={x:t.x+o.x,y:t.y+o.y},a={x:e.x+o.x,y:e.y+o.y},l={x:t.x-o.x,y:t.y-o.y},h={x:e.x-o.x,y:e.y-o.y};return[r.x,r.y,!1,a.x,a.y,!1,h.x,h.y,!1,l.x,l.y,!1,r.x,r.y,!1]},De=(t,e,s)=>({x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}),Zn=(t,e,s,n=.5)=>{const o=De(t,e,n),r=De(e,s,n),a=De(o,r,n);return[[t,o,a],[a,r,s]]},Qn=(t,e,s,n=4)=>{let o=[[t,e,s]];for(let r=0;r<n;++r){const a=[];for(let l=0;l<o.length;++l){const h=o[l];if(!h)continue;const f=Zn(h[0],h[1],h[2],.5);a.push(f[0],f[1])}o=a}return o},Jn=(t,e,s,n)=>({x:(1-t)**2*e.x+2*(1-t)*t*s.x+t**2*n.x,y:(1-t)**2*e.y+2*(1-t)*t*s.y+t**2*n.y}),qn=(t,e,s,n)=>({x:2*(1-t)*(s.x-e.x)+2*t*(n.x-s.x),y:2*(1-t)*(s.y-e.y)+2*t*(n.y-s.y)}),to=t=>{const e=Math.sqrt(t.x*t.x+t.y*t.y);return e===0?{x:0,y:0}:{x:t.x/e,y:t.y/e}},Ks=(t,e,s,n)=>{const o=[0,.5,1],r=[];for(let a=0;a<o.length;++a){const l=o[a],h=Jn(l,t,e,s),f=qn(l,t,e,s),i=to({x:-f.y,y:f.x});r.push({x:h.x+i.x*n,y:h.y+i.y*n})}return r},eo=(t,e,s,n)=>{const o=Qn(t,e,s,5),r=[],a=[];for(let E=0;E<o.length;++E){const[$,v,T]=o[E];r.push(Ks($,v,T,+n)),a.push(Ks($,v,T,-n))}const l=r[0][0],h=[l.x,l.y,!1];for(let E=0;E<r.length;++E){const $=r[E];h.push($[1].x,$[1].y,!0,$[2].x,$[2].y,!1)}const f=[...a].reverse();for(let E=0;E<f.length;++E){const[$,v,T]=f[E];f[E]=[T,v,$]}const i=f[0][0];h.push(i.x,i.y,!1);for(let E=0;E<f.length;++E){const $=f[E];h.push($[1].x,$[1].y,!0,$[2].x,$[2].y,!1)}return h},Ut=(t,e,s,n)=>{const o=[];for(let r=0;r<n.length;r+=3){if(n[r+2])continue;const a=n[r],l=n[r+1];Math.sqrt(Math.pow(a-t,2)+Math.pow(l-e,2))===s&&o.push(a,l)}return o},Dt=new OffscreenCanvas(1,1).getContext("2d"),Xt=(t,e)=>{Dt.beginPath(),Dt.moveTo(e[0],e[1]);for(let s=3;s<e.length;s+=3)e[s+2]?(Dt.quadraticCurveTo(e[s],e[s+1],e[s+3],e[s+4]),s+=3):Dt.lineTo(e[s],e[s+1]);Dt.closePath();for(let s=0;s<t.length;s+=2){const n=t[s],o=t[s+1];if(!Dt.isPointInPath(n,o))return[n,o]}return null},Zs=(t,e,s,n,o=!1)=>{const r=o?0:n.length-1,a=o?n.length-1:n.length-2,l=Ut(t,e,s,n[r]),h=Ut(t,e,s,n[a]),f=Xt(l,n[a]);if(!f)return;const i=Xt(h,n[r]);if(!i)return;const E=Math.atan2(f[1]-e,f[0]-t);let v=Math.atan2(i[1]-e,i[0]-t)-E;v>Math.PI?v-=2*Math.PI:v<-Math.PI&&(v+=2*Math.PI);const T=8,u=v/T,g=[t,e,!1];for(let I=0;I<=T;I++){const d=E+I*u,C=t+s*Math.cos(d),m=e+s*Math.sin(d);g.push(C,m,!1)}n.splice(-1,0,g)},Qs=(t,e,s,n,o=!1)=>{const r=o?0:n.length-1,a=o?n.length-1:n.length-2,l=Ut(t,e,s,n[r]),h=Ut(t,e,s,n[a]);if(l[0]===h[0]&&l[1]===h[1]||l[0]===h[2]&&l[1]===h[3])return;const f=Xt(l,n[a]);if(!f)return;const i=Xt(h,n[r]);i&&n.splice(-1,0,[t,e,!1,f[0],f[1],!1,i[0],i[1],!1,t,e,!1])},so=(t,e,s)=>{for(let n=0;n<2;++n){let o=0,r=0,a=0,l=0;n===0?(o=t[0],r=t[1],a=t[3],l=t[4]):(o=t[t.length-3],r=t[t.length-2],a=t[t.length-6],l=t[t.length-5]);const h=a-o,f=l-r,i=Math.atan2(f,h),E=i+Math.PI/2,$=i-Math.PI/2,v=16,T=($-E)/v,u=[];for(let g=0;g<=v;g++){const I=$+T*g,d=o+e*Math.cos(I),C=r+e*Math.sin(I);u.push(d,C,!1)}n===0?s.unshift(u):s.push(u)}},co=(t,e,s)=>{for(let n=0;n<2;++n){let o=0,r=0,a=0,l=0;n===0?(o=t[0],r=t[1],a=t[3],l=t[4]):(o=t[t.length-3],r=t[t.length-2],a=t[t.length-6],l=t[t.length-5]);const h=-(a-o),f=-(l-r),i=Math.sqrt(h*h+f*f);if(i===0)continue;const E=h/i,$=f/i,v=o+e*E,T=r+e*$,u=-$,g=E,I=[v+e*E+e*u,T+e*$+e*g,!1,v+e*E-e*u,T+e*$-e*g,!1,v-e*E-e*u,T-e*$-e*g,!1,v+e*E+e*u,T+e*$+e*g,!1,v-e*E-e*u,T-e*$-e*g,!1,v-e*E+e*u,T-e*$+e*g,!1];n===0?s.unshift(I):s.push(I)}},Js=(t,e,s,n,o,r=!1)=>{const a=r?0:o.length-1,l=r?o.length-1:o.length-2,h=Ut(t.x,t.y,n,o[a]),f=Ut(t.x,t.y,n,o[l]);if(h[0]===f[0]&&h[1]===f[1]||h[0]===f[2]&&h[1]===f[3])return;const i=Xt(h,o[l]);if(!i)return;const E=Xt(f,o[a]);if(!E)return;const $=e.x-t.x,v=e.y-t.y,T=Math.hypot($,v),u={x:$/T,y:v/T},g=s.x-t.x,I=s.y-t.y,d=Math.hypot(g,I),C={x:g/d,y:I/d},m=u.x,y=u.y,M=C.x,S=C.y,w=m*S-y*M;w===0&&o.splice(-1,0,[t.x,t.y,!1,i[0],i[1],!1,E[0],E[1],!1]);const O=((E[0]-i[0])*S-(E[1]-i[1])*M)/w,p=i[0]+O*m,R=i[1]+O*y;o.splice(-1,0,[t.x,t.y,!1,i[0],i[1],!1,p,R,!1,t.x,t.y,!1,E[0],E[1],!1,p,R,!1])},no=(t,e)=>{const s={x:t[0],y:t[1]},n={x:0,y:0},o={x:0,y:0},r={x:0,y:0},a=[];for(let l=3;l<t.length;l+=3){const h=t[l],f=t[l+1];if(t[l+2]){n.x=h,n.y=f;continue}if(o.x=h,o.y=f,t[l-1]?a.push(eo(s,n,o,e)):a.push(Kn(s,o,e)),a.length>1)switch(A.joints){case 0:Qs(s.x,s.y,e,a);break;case 1:r.x=t[l-6],r.y=t[l-5],Js(s,o,r,e,a);break;case 2:Zs(s.x,s.y,e,a);break}s.x=o.x,s.y=o.y}if(t[0]===t[t.length-3]&&t[1]===t[t.length-2])switch(A.joints){case 0:Qs(s.x,s.y,e,a,!0);break;case 1:s.x=t[0],s.y=t[1],o.x=t[3],o.y=t[4],r.x=t[t.length-6],r.y=t[t.length-5],Js(s,o,r,e,a,!0);break;case 2:Zs(s.x,s.y,e,a,!0);break}else switch(A.caps){case 1:so(t,e,a);break;case 2:co(t,e,a);break}return a},Xe=t=>{const e=A.thickness/2,s=[];for(let n=0;n<t.length;++n){const o=no(t[n],e);s.push(...o)}return Me(s,"stroke")},oo=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=Xe(a);Pt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},_t=new Map,qs=()=>{_t.clear()},ro=t=>{_t.set(q.length,t)},ye=()=>({id:jc(),resource:c.createVertexArray(),vertexBuffer:c.createBuffer(),vertexLength:0});let _e;const $t=t=>{_e&&_e.id===t.id||(_e=t,c.bindVertexArray(t.resource))},ao=()=>{const t=ye();$t(t),c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer);const e=new Float32Array([0,0,1,0,1,1,0,0,1,1,0,1]);return c.bufferData(c.ARRAY_BUFFER,e,c.STATIC_DRAW),c.enableVertexAttribArray(0),c.vertexAttribPointer(0,2,c.FLOAT,!1,0,0),t},Re=[],ct=new Float32Array([0,0,0,1,1,0,1,1]);let Ye;const lo=t=>{Ye=t.createBuffer()};let tc;const io=t=>{tc=t};let Ge;const ge=()=>(Ge||(Ge=ao()),Ge),uo=()=>{if(Re.length)return Re.pop();const t=ye();return $t(t),c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer),c.enableVertexAttribArray(0),c.enableVertexAttribArray(1),c.enableVertexAttribArray(2),c.enableVertexAttribArray(3),c.enableVertexAttribArray(4),c.enableVertexAttribArray(5),c.vertexAttribPointer(0,2,c.FLOAT,!1,68,0),c.vertexAttribPointer(1,2,c.FLOAT,!1,68,8),c.vertexAttribPointer(2,4,c.FLOAT,!1,68,16),c.vertexAttribPointer(3,3,c.FLOAT,!1,68,32),c.vertexAttribPointer(4,3,c.FLOAT,!1,68,44),c.vertexAttribPointer(5,3,c.FLOAT,!1,68,56),t},ec=()=>{const t=uo();$t(t);const e=zn(),s=Vn();return c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer),t.vertexLength<e.length&&(t.vertexLength=$e(e.length),c.bufferData(c.ARRAY_BUFFER,t.vertexLength*4,c.DYNAMIC_DRAW)),c.bufferSubData(c.ARRAY_BUFFER,0,e.subarray(0,s)),t},sc=t=>{Re.indexOf(t)>-1||Re.push(t)};let ho=0;const fo=(t,e)=>{const s=c.createProgram(),n=c.createShader(c.VERTEX_SHADER);c.shaderSource(n,t),c.compileShader(n);const o=c.createShader(c.FRAGMENT_SHADER);return c.shaderSource(o,e),c.compileShader(o),c.attachShader(s,n),c.attachShader(s,o),c.linkProgram(s),c.detachShader(s,n),c.detachShader(s,o),c.deleteShader(n),c.deleteShader(o),{id:ho++,resource:s}},bo=(t,e,s=!1)=>{const n=c.getProgramParameter(t,c.ACTIVE_UNIFORMS);for(let o=0;o<n;++o){const r=c.getActiveUniform(t,o),a=r.name.endsWith("[0]")?r.name.slice(0,-3):r.name,l=c.getUniformLocation(t,a);if(r.type===c.SAMPLER_2D&&r.size===1&&!s)continue;const h={};switch(r.type){case c.FLOAT_VEC4:h.method=c.uniform4fv.bind(c,l),h.array=new Float32Array(4*r.size),h.assign=-1;break;case c.INT_VEC4:h.method=c.uniform4iv.bind(c,l),h.array=new Int32Array(4*r.size),h.assign=-1;break;case c.SAMPLER_2D:h.method=s?c.uniform1i.bind(c,l,3):c.uniform1iv.bind(c,l),h.array=new Int32Array(r.size),h.assign=1;break;case c.FLOAT:case c.FLOAT_VEC2:case c.FLOAT_VEC3:case c.FLOAT_MAT2:case c.FLOAT_MAT3:case c.FLOAT_MAT4:case c.INT:case c.INT_VEC2:case c.INT_VEC3:default:throw new Error("Use gl.FLOAT_VEC4 or gl.INT_VEC4 instead")}e.set(a,h)}};let cc=-1;const $o=t=>{cc!==t.id&&(cc=t.id,c.useProgram(t.resource))},Eo=t=>{for(const e of t.values())e.method===void 0||e.assign===void 0||(e.assign<0?e.method(e.array):e.assign>0&&(e.assign--,e.method(e.array)))};class Z{_$programObject;_$uniformMap;constructor(e,s,n=!1){this._$programObject=fo(e,s),this._$uniformMap=new Map,bo(this._$programObject.resource,this._$uniformMap,n)}useProgram(){$o(this._$programObject)}bindUniform(){Eo(this._$uniformMap)}get highp(){return this._$uniformMap.get("u_highp").array}get mediump(){return this._$uniformMap.get("u_mediump").array}get textures(){return this._$uniformMap.get("u_textures").array}}const Et=new Map,To=()=>\`
2
2
  vec2 applyMatrix(in vec2 vertex) {
3
3
  mat3 matrix = mat3(a_matrix0, a_matrix1, a_matrix2);
4
4
  return (matrix * vec3(vertex, 1.0)).xy;
5
- }\`,$o=t=>\`
5
+ }\`,Ao=t=>\`
6
6
  vec2 applyMatrix(in vec2 vertex) {
7
7
  mat3 parent_matrix = mat3(
8
8
  u_highp[\${t}].xyz,
@@ -40,9 +40,9 @@ vec2 applyMatrix(in vec2 vertex) {
40
40
 
41
41
  position = position + vec2(u_highp[\${t+8}].x, u_highp[\${t+8}].y);
42
42
  return position / vec2(u_highp[0].w, u_highp[1].w);
43
- }\`,Eo=()=>"layout (location = 1) in vec2 a_bezier;",To=()=>\`layout (location = 3) in vec3 a_matrix0;
43
+ }\`,xo=()=>"layout (location = 1) in vec2 a_bezier;",vo=()=>\`layout (location = 3) in vec3 a_matrix0;
44
44
  layout (location = 4) in vec3 a_matrix1;
45
- layout (location = 5) in vec3 a_matrix2;\`,Ao=()=>"out vec2 v_uv;",xo=()=>"out vec2 v_bezier;",vo=()=>\`
45
+ layout (location = 5) in vec3 a_matrix2;\`,Mo=()=>"out vec2 v_uv;",yo=()=>"out vec2 v_bezier;",Ro=()=>\`
46
46
  mat3 uv_matrix = mat3(
47
47
  u_highp[0].xyz,
48
48
  u_highp[1].xyz,
@@ -53,7 +53,7 @@ layout (location = 5) in vec3 a_matrix2;\`,Ao=()=>"out vec2 v_uv;",xo=()=>"out v
53
53
  u_highp[4].xyz,
54
54
  vec3(u_highp[2].w, u_highp[3].w, u_highp[4].w)
55
55
  );
56
- v_uv = (inverse_matrix * uv_matrix * vec3(a_vertex, 1.0)).xy;\`,Mo=()=>"v_bezier = a_bezier;",yo=()=>"layout (location = 2) in vec4 a_color;",Ro=()=>"out vec4 v_color;",go=()=>"v_color = a_color;",Re=(t,e,s,n)=>{const o=s?Eo():"",r=s?xo():e?Ao():"",a=s?Mo():e?vo():"",l=n?$o(e?5:0):bo(),h=s?"":yo(),f=s?"":Ro(),i=s?"":go(),E=n?"":To(),$=t>1?\`uniform vec4 u_highp[\${t}];\`:"";return\`#version 300 es
56
+ v_uv = (inverse_matrix * uv_matrix * vec3(a_vertex, 1.0)).xy;\`,go=()=>"v_bezier = a_bezier;",po=()=>"layout (location = 2) in vec4 a_color;",Oo=()=>"out vec4 v_color;",mo=()=>"v_color = a_color;",pe=(t,e,s,n)=>{const o=s?xo():"",r=s?yo():e?Mo():"",a=s?go():e?Ro():"",l=n?Ao(e?5:0):To(),h=s?"":po(),f=s?"":Oo(),i=s?"":mo(),E=n?"":vo(),$=t>1?\`uniform vec4 u_highp[\${t}];\`:"";return\`#version 300 es
57
57
 
58
58
  layout (location = 0) in vec2 a_vertex;
59
59
  \${o}
@@ -71,12 +71,12 @@ void main() {
71
71
  vec2 pos = applyMatrix(a_vertex);
72
72
  pos = pos * 2.0 - 1.0;
73
73
  gl_Position = vec4(pos.x, -pos.y, 0.0, 1.0);
74
- }\`},po=()=>\`#version 300 es
74
+ }\`},Fo=()=>\`#version 300 es
75
75
  layout (location = 0) in vec2 a_vertex;
76
76
  void main() {
77
77
  vec2 pos = a_vertex * 2.0 - 1.0;
78
78
  gl_Position = vec4(pos.x, -pos.y, 0.0, 1.0);
79
- }\`,mo=()=>\`#version 300 es
79
+ }\`,So=()=>\`#version 300 es
80
80
  precision mediump float;
81
81
 
82
82
  in vec4 v_color;
@@ -84,7 +84,7 @@ out vec4 o_color;
84
84
 
85
85
  void main() {
86
86
  o_color = vec4(v_color.rgb * v_color.a, v_color.a);
87
- }\`,Oo=()=>\`#version 300 es
87
+ }\`,wo=()=>\`#version 300 es
88
88
  precision mediump float;
89
89
 
90
90
  uniform sampler2D u_texture;
@@ -98,7 +98,7 @@ void main() {
98
98
 
99
99
  vec4 src = texture(u_texture, uv);
100
100
  o_color = src;
101
- }\`,Fo=()=>\`#version 300 es
101
+ }\`,Bo=()=>\`#version 300 es
102
102
  precision mediump float;
103
103
 
104
104
  uniform sampler2D u_texture;
@@ -112,7 +112,7 @@ void main() {
112
112
 
113
113
  vec4 src = texture(u_texture, uv);
114
114
  o_color = src;
115
- }\`,So=()=>\`#version 300 es
115
+ }\`,Io=()=>\`#version 300 es
116
116
  precision mediump float;
117
117
 
118
118
  in vec2 v_bezier;
@@ -130,15 +130,15 @@ void main() {
130
130
  } else {
131
131
  discard;
132
132
  }
133
- }\`,wo=()=>\`#version 300 es
133
+ }\`,Co=()=>\`#version 300 es
134
134
  precision mediump float;
135
135
  out vec4 o_color;
136
136
  void main() {
137
137
  o_color = vec4(1.0);
138
- }\`,ae=t=>{const e=\`m\${t?"y":"n"}\`;if(Et.has(e))return Et.get(e);const s=new Z(Re(t?9:0,!1,!0,t),So());return Et.set(e,s),s},le=(t,e)=>{const s=t.highp;s[0]=e[0],s[1]=e[1],s[2]=0,s[4]=e[2],s[5]=e[3],s[6]=0,s[8]=e[4],s[9]=e[5],s[10]=1,s[12]=e[6],s[13]=e[7],s[14]=0,s[16]=e[8],s[17]=e[9],s[18]=0,s[20]=e[10],s[21]=e[11],s[22]=1,s[3]=it(),s[7]=ut(),s[11]=e[12],s[15]=e[13],s[19]=e[14],s[23]=e[15],s[24]=e[16],s[25]=e[17],s[26]=e[18],s[27]=e[19],s[28]=e[20],s[29]=e[21],s[30]=e[22],s[31]=e[23],s[32]=e[24],s[33]=e[25]};let ec="normal";const sc=t=>{ec=t},cc=()=>ec;let nc=600;const Mt=t=>{nc=t},yt=()=>nc,j=()=>{yt()!==613&&(Mt(613),c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA))},nt=(t,e,s,n)=>{t.useProgram(),t.bindUniform(),j(),$t(e),c.drawArrays(c.TRIANGLES,s,n)},Ye=()=>{const t="rmnn";if(Et.has(t))return Et.get(t);const e=new Z(po(),wo());return Et.set(t,e),e},Bo=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=1<<t.clipLevel-1;c.stencilMask(~e-1),c.stencilFunc(c.LEQUAL,e,255),c.stencilOp(c.ZERO,c.REPLACE,c.REPLACE),nt(Ye(),ye(),0,6),c.stencilMask(1<<t.clipLevel),c.stencilFunc(c.ALWAYS,0,255),c.stencilOp(c.REPLACE,c.REPLACE,c.REPLACE),nt(Ye(),ye(),0,6),c.stencilMask(255),c.stencilOp(c.ZERO,c.INVERT,c.INVERT)},Io=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=ne.get(t.clipLevel),s=e[0],n=e[1],o=e[2],r=e[3],a=Math.ceil(Math.abs(o-s)),l=Math.ceil(Math.abs(r-n));c.enable(c.SCISSOR_TEST),c.scissor(s,t.height-n-l,a,l);const h=Js();let f=oe.get(t.clipLevel),i=0,E=null;const $=q.length;for(let v=0;v<$;v++){c.stencilMask(1<<f-1);const T=q[v];Dt.has(v)&&(E=Dt.get(v));const g=ae(!!E);E&&le(g,E),nt(g,h,i,T),i+=T,++f,f>7&&(Bo(),f=t.clipLevel+1)}oe.set(t.clipLevel,f),qs(h),zs(),Zs(),c.disable(c.SCISSOR_TEST)},Lo=(t,e,s)=>{if(t.used){const r=t.left?.insert(e,s);return r||t.right?.insert(e,s)||null}if(e>t.w||s>t.h)return null;if(e===t.w&&s===t.h)return t.used=!0,t;const n=t.w-e,o=t.h-s;return n>o?(t.left=t.create(t.index,t.x,t.y,e,s),t.right=t.create(t.index,t.x+e+1,t.y,n-1,t.h)):(t.left=t.create(t.index,t.x,t.y,t.w,s),t.right=t.create(t.index,t.x,t.y+s+1,t.w,o-1)),t.used=!0,t.left.insert(e,s)},Co=(t,e,s,n,o)=>t.left?.dispose(e,s,n,o)?(!t.left.used&&!t.right?.used&&(t.left=t.right=null,t.used=!1),!0):t.right?.dispose(e,s,n,o)?(!t.right.used&&!t.left?.used&&(t.left=t.right=null,t.used=!1),!0):e===t.x&&s===t.y&&n===t.w&&o===t.h?(t.used=!1,!0):!1;class Ge{index;x;y;w;h;left;right;used;constructor(e,s,n,o,r){this.index=e,this.x=s,this.y=n,this.w=o,this.h=r,this.left=null,this.right=null,this.used=!1}insert(e,s){return Lo(this,e,s)}dispose(e,s,n,o){return Co(this,e,s,n,o)}create(e,s,n,o,r){return new Ge(e,s,n,o,r)}}class ko{_$root;constructor(e,s,n){this._$root=new Ge(e,0,0,s,n)}insert(e,s){return this._$root.insert(e,s)}dispose(e,s,n,o){return this._$root.dispose(e,s,n,o)}}const oc=(t,e)=>{const s=Lt();ee[s]||(ee[s]=new ko(s,rt,rt));const o=ee[s].insert(t,e);return o||(pt(s+1),oc(t,e))},No=t=>{const e=ee[t.index];e&&e.dispose(t.x,t.y,t.w,t.h)},Ve=()=>\`
138
+ }\`,ie=t=>{const e=\`m\${t?"y":"n"}\`;if(Et.has(e))return Et.get(e);const s=new Z(pe(t?9:0,!1,!0,t),Io());return Et.set(e,s),s},ue=(t,e)=>{const s=t.highp;s[0]=e[0],s[1]=e[1],s[2]=0,s[4]=e[2],s[5]=e[3],s[6]=0,s[8]=e[4],s[9]=e[5],s[10]=1,s[12]=e[6],s[13]=e[7],s[14]=0,s[16]=e[8],s[17]=e[9],s[18]=0,s[20]=e[10],s[21]=e[11],s[22]=1,s[3]=it(),s[7]=ut(),s[11]=e[12],s[15]=e[13],s[19]=e[14],s[23]=e[15],s[24]=e[16],s[25]=e[17],s[26]=e[18],s[27]=e[19],s[28]=e[20],s[29]=e[21],s[30]=e[22],s[31]=e[23],s[32]=e[24],s[33]=e[25]};let nc="normal";const oc=t=>{nc=t},rc=()=>nc;let ac=600;const Mt=t=>{ac=t},yt=()=>ac,j=()=>{yt()!==613&&(Mt(613),c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA))},nt=(t,e,s,n)=>{t.useProgram(),t.bindUniform(),j(),$t(e),c.drawArrays(c.TRIANGLES,s,n)},ze=()=>{const t="rmnn";if(Et.has(t))return Et.get(t);const e=new Z(Fo(),Co());return Et.set(t,e),e},Lo=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=1<<t.clipLevel-1;c.stencilMask(~e-1),c.stencilFunc(c.LEQUAL,e,255),c.stencilOp(c.ZERO,c.REPLACE,c.REPLACE),nt(ze(),ge(),0,6),c.stencilMask(1<<t.clipLevel),c.stencilFunc(c.ALWAYS,0,255),c.stencilOp(c.REPLACE,c.REPLACE,c.REPLACE),nt(ze(),ge(),0,6),c.stencilMask(255),c.stencilOp(c.ZERO,c.INVERT,c.INVERT)},ko=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=re.get(t.clipLevel),s=e[0],n=e[1],o=e[2],r=e[3],a=Math.ceil(Math.abs(o-s)),l=Math.ceil(Math.abs(r-n));c.enable(c.SCISSOR_TEST),c.scissor(s,t.height-n-l,a,l);const h=ec();let f=ae.get(t.clipLevel),i=0,E=null;const $=q.length;for(let v=0;v<$;v++){c.stencilMask(1<<f-1);const T=q[v];_t.has(v)&&(E=_t.get(v));const g=ie(!!E);E&&ue(g,E),nt(g,h,i,T),i+=T,++f,f>7&&(Lo(),f=t.clipLevel+1)}ae.set(t.clipLevel,f),sc(h),Hs(),qs(),c.disable(c.SCISSOR_TEST)},No=(t,e,s)=>{if(t.used){const l=t.left?.insert(e,s);return l||t.right?.insert(e,s)||null}const n=e+1,o=s+1;if(n>t.w||o>t.h)return null;if(n===t.w&&o===t.h)return t.used=!0,t.w=e,t.h=s,t;const r=t.w-n,a=t.h-o;return r>a?(t.left=t.create(t.index,t.x,t.y,n,t.h),t.right=t.create(t.index,t.x+n,t.y,r,t.h)):(t.left=t.create(t.index,t.x,t.y,t.w,o),t.right=t.create(t.index,t.x,t.y+o,t.w,a)),t.used=!0,t.left.insert(e,s)},Po=(t,e,s,n,o)=>t.left?.dispose(e,s,n,o)?(!t.left.used&&!t.right?.used&&(t.left&&t.left.release(),t.right&&t.right.release(),t.left=t.right=null,t.used=!1),!0):t.right?.dispose(e,s,n,o)?(!t.right.used&&!t.left?.used&&(t.left&&t.left.release(),t.right&&t.right.release(),t.left=t.right=null,t.used=!1),!0):e===t.x&&s===t.y&&n===t.w&&o===t.h?(t.used=!1,!0):!1,Ve=[];class We{index;x;y;w;h;left;right;used;constructor(e,s,n,o,r){this.index=e,this.x=s,this.y=n,this.w=o,this.h=r,this.left=null,this.right=null,this.used=!1}insert(e,s){return No(this,e,s)}dispose(e,s,n,o){return Po(this,e,s,n,o)}create(e,s,n,o,r){let a;return Ve.length>0?(a=Ve.pop(),a.index=e,a.x=s,a.y=n,a.w=o,a.h=r,a.left=null,a.right=null,a.used=!1):a=new We(e,s,n,o,r),a}release(){this.left&&(this.left.release(),this.left=null),this.right&&(this.right.release(),this.right=null),this.used=!1,Ve.push(this)}}class Uo{_$root;constructor(e,s,n){this._$root=new We(e,0,0,s,n)}insert(e,s){return this._$root.insert(e,s)}dispose(e,s,n,o){return this._$root.dispose(e,s,n,o)}}const lc=(t,e)=>{const s=kt();ce[s]||(ce[s]=new Uo(s,rt,rt));const o=ce[s].insert(t,e);return o||(pt(s+1),lc(t,e))},Do=t=>{const e=ce[t.index];e&&e.dispose(t.x,t.y,t.w,t.h)},je=()=>\`
139
139
  float isInside(in vec2 uv) {
140
140
  return step(4.0, dot(step(vec4(0.0, uv.x, 0.0, uv.y), vec4(uv.x, 1.0, uv.y, 1.0)), vec4(1.0)));
141
- }\`,rc=t=>\`
141
+ }\`,ic=t=>\`
142
142
  vec4 mul = u_mediump[\${t}];
143
143
  vec4 add = u_mediump[\${t+1}];
144
144
 
@@ -149,7 +149,7 @@ float isInside(in vec2 uv) {
149
149
  src = clamp(src * mul + add, 0.0, 1.0);
150
150
  src.rgb *= src.a;
151
151
  }
152
- \`,ac=t=>{const e=t?"uniform vec4 u_mediump[2];":"",s=t?rc(0):"";return\`#version 300 es
152
+ \`,uc=t=>{const e=t?"uniform vec4 u_mediump[2];":"",s=t?ic(0):"";return\`#version 300 es
153
153
  precision mediump float;
154
154
 
155
155
  uniform sampler2D u_texture;
@@ -162,7 +162,7 @@ void main() {
162
162
  vec4 src = texture(u_texture, v_coord);
163
163
  \${s}
164
164
  o_color = src;
165
- }\`},Uo=()=>\`#version 300 es
165
+ }\`},Xo=()=>\`#version 300 es
166
166
  precision mediump float;
167
167
 
168
168
  uniform sampler2D u_texture;
@@ -184,7 +184,7 @@ void main() {
184
184
  }
185
185
 
186
186
  o_color = src;
187
- }\`,Po=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t);class Do{buffer;offset;constructor(){this.buffer=new Float32Array(256),this.offset=0}push(...e){this.buffer.length<this.offset+e.length&&this.resize(e.length);for(let s=0;s<e.length;s++)this.buffer[this.offset++]=e[s]}set(e){this.buffer.length<this.offset+e.length&&this.resize(e.length),this.buffer.set(e,this.offset),this.offset+=e.length}resize(e){const s=new Float32Array(Po(this.offset+e));this.buffer.length&&s.set(this.buffer),this.buffer=s}}const mt=new Do;class Xo extends Z{count;constructor(e,s,n=!0){super(e,s,n),this.count=0}clear(){this.count=mt.offset=0}}const Ot=()=>\`#version 300 es
187
+ }\`,_o=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t);class Yo{buffer;offset;constructor(){this.buffer=new Float32Array(256),this.offset=0}push(...e){this.buffer.length<this.offset+e.length&&this.resize(e.length);for(let s=0;s<e.length;s++)this.buffer[this.offset++]=e[s]}set(e){this.buffer.length<this.offset+e.length&&this.resize(e.length),this.buffer.set(e,this.offset),this.offset+=e.length}resize(e){const s=new Float32Array(_o(this.offset+e));this.buffer.length&&s.set(this.buffer),this.buffer=s}}const Ot=new Yo;class Go extends Z{count;constructor(e,s,n=!0){super(e,s,n),this.count=0}clear(){this.count=Ot.offset=0}}const mt=()=>\`#version 300 es
188
188
 
189
189
  layout (location = 0) in vec2 a_vertex;
190
190
 
@@ -195,7 +195,7 @@ void main() {
195
195
 
196
196
  vec2 position = a_vertex * 2.0 - 1.0;
197
197
  gl_Position = vec4(position, 0.0, 1.0);
198
- }\`,_o=()=>\`#version 300 es
198
+ }\`,zo=()=>\`#version 300 es
199
199
 
200
200
  layout (location = 0) in vec2 a_vertex;
201
201
  uniform vec4 u_highp[3];
@@ -221,7 +221,7 @@ void main() {
221
221
 
222
222
  position = position * 2.0 - 1.0;
223
223
  gl_Position = vec4(position.x, -position.y, 0.0, 1.0);
224
- }\`,Yo=()=>\`#version 300 es
224
+ }\`,Vo=()=>\`#version 300 es
225
225
 
226
226
  layout (location = 0) in vec2 a_vertex;
227
227
  uniform vec4 u_highp[2];
@@ -241,7 +241,7 @@ void main() {
241
241
 
242
242
  position = position * 2.0 - 1.0;
243
243
  gl_Position = vec4(position.x, -position.y, 0.0, 1.0);
244
- }\`,Go=()=>\`#version 300 es
244
+ }\`,Wo=()=>\`#version 300 es
245
245
 
246
246
  layout (location = 0) in vec2 a_vertex;
247
247
  layout (location = 1) in vec4 a_rect;
@@ -274,10 +274,10 @@ void main() {
274
274
 
275
275
  position = position * 2.0 - 1.0;
276
276
  gl_Position = vec4(position.x, -position.y, 0.0, 1.0);
277
- }\`,ot=new Map,ze=()=>{if(ot.has("i"))return ot.get("i");const e=new Xo(Go(),Uo());return ot.set("i",e),e},Vo=()=>\`
277
+ }\`,ot=new Map,He=()=>{if(ot.has("i"))return ot.get("i");const e=new Go(Wo(),Xo());return ot.set("i",e),e},jo=()=>\`
278
278
  vec4 blend (in vec4 src, in vec4 dst) {
279
279
  return src + dst - dst * src.a;
280
- }\`,zo=()=>\`
280
+ }\`,Ho=()=>\`
281
281
  vec4 blend (in vec4 src, in vec4 dst) {
282
282
  if (src.a == 0.0) { return dst; }
283
283
  if (dst.a == 0.0) { return src; }
@@ -292,14 +292,14 @@ vec4 blend (in vec4 src, in vec4 dst) {
292
292
  c.rgb *= c.a;
293
293
 
294
294
  return a + b + c;
295
- }\`,Wo=()=>\`
295
+ }\`,Ko=()=>\`
296
296
  vec4 blend (in vec4 src, in vec4 dst) {
297
297
  vec4 a = src - src * dst.a;
298
298
  vec4 b = dst - dst * src.a;
299
299
  vec4 c = src * dst;
300
300
 
301
301
  return a + b + c;
302
- }\`,jo=()=>\`
302
+ }\`,Zo=()=>\`
303
303
  vec4 blend (in vec4 src, in vec4 dst) {
304
304
  if (src.a == 0.0) { return dst; }
305
305
  if (dst.a == 0.0) { return src; }
@@ -314,7 +314,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
314
314
  c.rgb *= c.a;
315
315
 
316
316
  return a + b + c;
317
- }\`,Ho=()=>\`
317
+ }\`,Qo=()=>\`
318
318
  vec4 blend (in vec4 src, in vec4 dst) {
319
319
  if (src.a == 0.0) { return dst; }
320
320
  if (dst.a == 0.0) { return src; }
@@ -329,7 +329,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
329
329
  c.rgb *= c.a;
330
330
 
331
331
  return a + b + c;
332
- }\`,Ko=()=>\`
332
+ }\`,Jo=()=>\`
333
333
  vec4 blend (in vec4 src, in vec4 dst) {
334
334
  if (src.a == 0.0) { return dst; }
335
335
  if (dst.a == 0.0) { return src; }
@@ -347,7 +347,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
347
347
  c.rgb *= c.a;
348
348
 
349
349
  return a + b + c;
350
- }\`,Zo=()=>\`
350
+ }\`,qo=()=>\`
351
351
  vec4 blend (in vec4 src, in vec4 dst) {
352
352
  if (src.a == 0.0) { return dst; }
353
353
  if (dst.a == 0.0) { return src; }
@@ -365,7 +365,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
365
365
  c.rgb *= c.a;
366
366
 
367
367
  return a + b + c;
368
- }\`,Qo=()=>\`
368
+ }\`,tr=()=>\`
369
369
  vec4 blend (in vec4 src, in vec4 dst) {
370
370
  if (src.a == 0.0) { return dst; }
371
371
  if (dst.a == 0.0) { return src; }
@@ -380,7 +380,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
380
380
  c.rgb *= c.a;
381
381
 
382
382
  return a + b + c;
383
- }\`,Jo=()=>\`
383
+ }\`,er=()=>\`
384
384
  vec4 blend (in vec4 src, in vec4 dst) {
385
385
  if (src.a == 0.0) { return dst; }
386
386
  if (dst.a == 0.0) { return src; }
@@ -389,7 +389,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
389
389
  vec4 c = vec4(src.a - dst.rgb * src.a, src.a);
390
390
 
391
391
  return b + c;
392
- }\`,qo=(t,e)=>{let s;switch(t){case"subtract":s=zo();break;case"multiply":s=Wo();break;case"lighten":s=jo();break;case"darken":s=Ho();break;case"overlay":s=Ko();break;case"hardlight":s=Zo();break;case"difference":s=Qo();break;case"invert":s=Jo();break;default:s=Vo();break}const n="uniform vec4 u_mediump[2];",o=rc(0);return\`#version 300 es
392
+ }\`,sr=(t,e)=>{let s;switch(t){case"subtract":s=Ho();break;case"multiply":s=Ko();break;case"lighten":s=Zo();break;case"darken":s=Qo();break;case"overlay":s=Jo();break;case"hardlight":s=qo();break;case"difference":s=tr();break;case"invert":s=er();break;default:s=jo();break}const n="uniform vec4 u_mediump[2];",o=ic(0);return\`#version 300 es
393
393
  precision mediump float;
394
394
 
395
395
  uniform sampler2D u_textures[2];
@@ -405,7 +405,7 @@ void main() {
405
405
  vec4 src = texture(u_textures[1], v_coord);
406
406
  \${o}
407
407
  o_color = blend(src, dst);
408
- }\`},lc=(t,e)=>{const s=\`i\${t}y\`;if(ot.has(s))return ot.get(s);const n=new Z(Ot(),qo(t));return ot.set(s,n),n};let ic=0;const uc=()=>{const t=A.currentAttachmentObject,e=A.atlasAttachmentObject;if(A.bind(e),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,Ee),Ie(!1),ic===Lt()){const s=Ds(Lt());s[2]!==-Number.MAX_VALUE&&s[3]!==-Number.MAX_VALUE&&(c.enable(c.SCISSOR_TEST),c.scissor(s[0],s[1],s[2],s[3]),c.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,c.COLOR_BUFFER_BIT,c.NEAREST),c.disable(c.SCISSOR_TEST))}else{const s=Xs(Lt());c.enable(c.SCISSOR_TEST),c.scissor(s[0],s[1],s[2],s[3]),c.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,c.COLOR_BUFFER_BIT,c.NEAREST),c.disable(c.SCISSOR_TEST),ic=Lt()}t&&A.bind(t)},hc=t=>{const e=Lt();pt(t.index),uc();const s=on();c.bindFramebuffer(c.FRAMEBUFFER,s);const n=Ps();c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,n.resource,0);const o=ks();c.bindFramebuffer(c.FRAMEBUFFER,o);const r=qt(t.w,t.h);return c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,r.resource,0),c.bindFramebuffer(c.FRAMEBUFFER,null),c.bindFramebuffer(c.READ_FRAMEBUFFER,s),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,o),c.blitFramebuffer(t.x,t.y,t.x+t.w,t.y+t.h,0,0,t.w,t.h,c.COLOR_BUFFER_BIT,c.NEAREST),pt(e),c.bindFramebuffer(c.READ_FRAMEBUFFER,ft),c.bindFramebuffer(c.FRAMEBUFFER,ft),r},ge=(t,e,s=!1)=>{st(2,c.TEXTURE2,null,s),st(1,c.TEXTURE1,e,s),st(0,c.TEXTURE0,t,s)},Ft=()=>{if(ot.has("p"))return ot.get("p");const e=new Z(Yo(),ac(!1));return ot.set("p",e),e},Tt=(t,e,s)=>{const n=t.highp,o=A.$matrix;n[0]=o[6],n[1]=o[7],n[2]=e,n[3]=s,n[4]=it(),n[5]=ut()},G=t=>{t.useProgram(),t.bindUniform(),$t(ye()),c.drawArrays(c.TRIANGLES,0,6)};let dt=null;const fc=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=A.$mainAttachmentObject;A.bind(r);const a=ks();return c.bindFramebuffer(c.FRAMEBUFFER,a),(!dt||dt.width!==r.width||dt.height!==r.height)&&(dt=qt(r.width,r.height)),V(dt),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,dt.resource,0),c.bindFramebuffer(c.FRAMEBUFFER,null),c.bindFramebuffer(c.READ_FRAMEBUFFER,ft),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,a),c.enable(c.SCISSOR_TEST),c.scissor(t,r.height-e-n,s+1,n+1),c.blitFramebuffer(0,0,r.width,r.height,0,0,r.width,r.height,c.COLOR_BUFFER_BIT,c.NEAREST),c.disable(c.SCISSOR_TEST),c.bindFramebuffer(c.FRAMEBUFFER,ft),o&&A.bind(o),dt},bc=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=fc(t,e,s,n),a=W(s,n,!1);A.bind(a),A.save(),A.setTransform(1,0,0,1,-t,-e);const l=Ft();Tt(l,r.width,r.height),j(),V(r),G(l);const h=a.texture;return A.restore(),z(a,!1),o&&A.bind(o),h},Xt=()=>{yt()!==610&&(Mt(610),c.blendFunc(c.ONE,c.ZERO))},$c=t=>{V(t),Xt();const e=Ft();Tt(e,t.width,t.height),G(e),j()},Ec=(t,e,s,n,o,r,a,l,h)=>{const f=t.textures;f[0]=0,f[1]=1;const i=t.mediump;i[0]=e,i[1]=s,i[2]=n,i[3]=o,i[4]=r,i[5]=a,i[6]=l,i[7]=h},pe=(t=!1)=>{const e=\`m\${t?"y":"n"}\`;if(ot.has(e))return ot.get(e);const s=new Z(_o(),ac(t));return ot.set(e,s),s},me=(t,e,s)=>{const n=t.highp,o=A.$matrix;n[0]=o[0],n[1]=o[1],n[2]=o[3],n[3]=o[4],n[4]=o[6],n[5]=o[7],n[6]=e,n[7]=s,n[8]=it(),n[9]=ut()},tr=(t,e,s,n,o,r)=>{const a=r[0],l=r[1],h=r[2],f=A.globalAlpha,i=r[4]/255,E=r[5]/255,$=r[6]/255,v=0,T=A.$matrix;switch(A.globalCompositeOperation){case"normal":case"layer":case"add":case"screen":case"alpha":case"erase":case"copy":{if(cc()!==A.globalCompositeOperation||Gs()!==t.index){pt(Gs());const g=A.globalCompositeOperation;A.globalCompositeOperation=cc(),A.drawArraysInstanced(),A.globalCompositeOperation=g,sc(A.globalCompositeOperation),Ys(t.index),pt(t.index)}const u=ze();mt.push(t.x/rt,t.y/rt,t.w/rt,t.h/rt,t.w,t.h,it(),ut(),T[6],T[7],T[0],T[1],T[3],T[4],a,l,h,f,i,E,$,v),u.count++}break;default:{const u=A.currentAttachmentObject;A.drawArraysInstanced();const g=Math.ceil(Math.abs(n-e)),I=Math.ceil(Math.abs(o-s));let d=0,L=0,O=hc(t);if(T[0]!==1||T[1]!==0||T[3]!==0||T[4]!==1){const w=W(g,I,!1),m=St(T[0],T[1],T[3],T[4],g/2,I/2),p=St(1,0,0,1,-t.w/2,-t.h/2),R=St(m[0]*p[0]+m[2]*p[1],m[1]*p[0]+m[3]*p[1],m[0]*p[2]+m[2]*p[3],m[1]*p[2]+m[3]*p[3],m[0]*p[4]+m[2]*p[5]+m[4],m[1]*p[4]+m[3]*p[5]+m[5]);A.save(),A.bind(w),A.setTransform(R[0],R[1],R[2],R[3],R[4],R[5]),d=R[4],L=R[5];const B=pe();me(B,O.width,O.height),V(O,!0),G(B),D(O),O=w.texture,z(w,!1),u&&A.bind(u),A.restore()}(d||L)&&(T[6]-=d,T[7]-=L);const y=bc(T[6],T[7],g,I),M=W(g,I,!1);A.bind(M),ge(y,O);const S=lc(A.globalCompositeOperation);Ec(S,a,l,h,f,i,E,$,v),G(S),u&&A.bind(u),$c(M.texture),(d||L)&&(T[6]+=d,T[7]+=L),D(O),D(y),z(M),sc(A.globalCompositeOperation),Ys(t.index),pt(t.index)}break}},er=()=>{ze().clear()};let We=0;const sr=()=>{$t(Qs),c.bindBuffer(c.ARRAY_BUFFER,Xe),mt.buffer.length>We&&(We=mt.buffer.length,c.bufferData(c.ARRAY_BUFFER,We*4,c.DYNAMIC_DRAW)),c.bufferSubData(c.ARRAY_BUFFER,0,mt.buffer.subarray(0,mt.offset))},cr=t=>{t.useProgram(),t.bindUniform(),sr(),c.drawArraysInstanced(c.TRIANGLES,0,6,t.count)},nr=()=>{yt()!==611&&(Mt(611),c.blendFunc(c.ONE,c.ONE))},or=()=>{yt()!==641&&(Mt(641),c.blendFunc(c.ONE_MINUS_DST_COLOR,c.ONE))},rr=()=>{yt()!==606&&(Mt(606),c.blendFunc(c.ZERO,c.SRC_ALPHA))},je=()=>{yt()!==603&&(Mt(603),c.blendFunc(c.ZERO,c.ONE_MINUS_SRC_ALPHA))},Tc=t=>{switch(t){case"add":nr();break;case"screen":or();break;case"alpha":rr();break;case"erase":je();break;case"copy":Xt();break;default:j();break}},ar=()=>{const t=ze();t.count&&(uc(),Tc(A.globalCompositeOperation),cr(t),t.clear())},lr=()=>{const t=ve();return $t(t),c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer),c.bufferData(c.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1,0,1,1,0]),c.STATIC_DRAW),c.enableVertexAttribArray(0),c.vertexAttribPointer(0,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,Xe),c.bufferData(c.ARRAY_BUFFER,mt.buffer.length,c.DYNAMIC_DRAW),c.enableVertexAttribArray(1),c.vertexAttribPointer(1,4,c.FLOAT,!1,88,0),c.vertexAttribDivisor(1,1),c.enableVertexAttribArray(2),c.vertexAttribPointer(2,4,c.FLOAT,!1,88,16),c.vertexAttribDivisor(2,1),c.enableVertexAttribArray(3),c.vertexAttribPointer(3,2,c.FLOAT,!1,88,32),c.vertexAttribDivisor(3,1),c.enableVertexAttribArray(4),c.vertexAttribPointer(4,4,c.FLOAT,!1,88,40),c.vertexAttribDivisor(4,1),c.enableVertexAttribArray(5),c.vertexAttribPointer(5,4,c.FLOAT,!1,88,56),c.vertexAttribDivisor(5,1),c.enableVertexAttribArray(6),c.vertexAttribPointer(6,4,c.FLOAT,!1,88,72),c.vertexAttribDivisor(6,1),t},ir=t=>{oo(t),ro(lr())},ur=()=>{const t=A.$mainAttachmentObject;A.bind(t),c.bindFramebuffer(c.READ_FRAMEBUFFER,ft),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,null);const e=t.width,s=t.height;c.blitFramebuffer(0,0,e,s,0,0,e,s,c.COLOR_BUFFER_BIT,c.NEAREST),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,ms),c.bindFramebuffer(c.FRAMEBUFFER,ft)},hr=()=>{c.enable(c.BLEND),j()},fr=()=>{const t=A.currentAttachmentObject;t&&(t.mask=!0,t.clipLevel++,oe.set(t.clipLevel,t.clipLevel),Ne()||(Ae(!0),c.enable(c.STENCIL_TEST),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.ALWAYS,0,255),c.stencilOp(c.ZERO,c.INVERT,c.INVERT),c.colorMask(!1,!1,!1,!1)))},br=(t,e,s,n)=>{const o=A.currentAttachmentObject;if(!o)return;ne.set(o.clipLevel,Ts(t,e,s,n));const r=Math.ceil(Math.abs(s-t)),a=Math.ceil(Math.abs(n-e));c.enable(c.SCISSOR_TEST),c.scissor(t,o.height-e-a,r,a)},$r=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=t.clipLevel,s=ne.get(e),n=s[0],o=s[1],r=s[2],a=s[3];ne.delete(e),oe.delete(e),As(s);const l=Math.ceil(Math.abs(r-n)),h=Math.ceil(Math.abs(a-o));if(c.enable(c.SCISSOR_TEST),c.scissor(n,t.height-o-h,l,h),--t.clipLevel,!t.clipLevel){t.mask=!1,Ae(!1),c.clear(c.STENCIL_BUFFER_BIT),c.disable(c.STENCIL_TEST),c.disable(c.SCISSOR_TEST),oe.clear(),ne.clear();return}c.stencilMask(1<<t.clipLevel),c.stencilFunc(c.ALWAYS,0,255),c.stencilOp(c.REPLACE,c.REPLACE,c.REPLACE),c.colorMask(!1,!1,!1,!1),nt(Ye(),ye(),0,6),ke()},He=(t,e,s,n=!1)=>{const o=qt(t,e,n);return c.texSubImage2D(c.TEXTURE_2D,0,0,0,t,e,c.RGBA,c.UNSIGNED_BYTE,s),o},Er=(t,e)=>{const s=He(t.w,t.h,e),n=Ft();Tt(n,t.w,t.h),j(),G(n),D(s)},Tr=(t,e,s,n=!1)=>{const o=qt(t,e,n);return c.texSubImage2D(c.TEXTURE_2D,0,0,0,c.RGBA,c.UNSIGNED_BYTE,s),o},Ar=(t,e)=>{const s=Tr(t.w,t.h,e),n=Ft();Tt(n,t.w,t.h),j(),G(n),D(s)},Rt=[],xr=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push("bitmap");const l=xe(a);kt(l.buffer),q.push(l.indexCount),Rt.push(t,e,s,n,o,r)},vr=(t,e,s,n,o,r)=>{const a=wt(!0);if(!a.length)return;bt.push("bitmap");const l=Pe(a);kt(l.buffer),q.push(l.indexCount),Rt.push(t,e,s,n,o,r)},Mr=()=>{const t=wt(!0);if(!t.length)return;bt.push("fill");const e=Pe(t);kt(e.buffer),q.push(e.indexCount)},yr=t=>{const e=t.toFixed(1);return\`#version 300 es
408
+ }\`},hc=(t,e)=>{const s=\`i\${t}y\`;if(ot.has(s))return ot.get(s);const n=new Z(mt(),sr(t));return ot.set(s,n),n};let fc=0;const bc=()=>{const t=A.currentAttachmentObject,e=A.atlasAttachmentObject;if(A.bind(e),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,Ae),Le(!1),fc===kt()){const s=Ys(kt());s[2]!==-Number.MAX_VALUE&&s[3]!==-Number.MAX_VALUE&&(c.enable(c.SCISSOR_TEST),c.scissor(s[0],s[1],s[2],s[3]),c.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,c.COLOR_BUFFER_BIT,c.NEAREST),c.disable(c.SCISSOR_TEST))}else{const s=Gs(kt());c.enable(c.SCISSOR_TEST),c.scissor(s[0],s[1],s[2],s[3]),c.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,c.COLOR_BUFFER_BIT,c.NEAREST),c.disable(c.SCISSOR_TEST),fc=kt()}t&&A.bind(t)},$c=t=>{const e=kt();pt(t.index),bc();const s=ln();c.bindFramebuffer(c.FRAMEBUFFER,s);const n=_s();c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,n.resource,0);const o=Us();c.bindFramebuffer(c.FRAMEBUFFER,o);const r=ee(t.w,t.h);return c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,r.resource,0),c.bindFramebuffer(c.FRAMEBUFFER,null),c.bindFramebuffer(c.READ_FRAMEBUFFER,s),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,o),c.blitFramebuffer(t.x,t.y,t.x+t.w,t.y+t.h,0,0,t.w,t.h,c.COLOR_BUFFER_BIT,c.NEAREST),pt(e),c.bindFramebuffer(c.READ_FRAMEBUFFER,ft),c.bindFramebuffer(c.FRAMEBUFFER,ft),r},Oe=(t,e,s=!1)=>{st(2,c.TEXTURE2,null,s),st(1,c.TEXTURE1,e,s),st(0,c.TEXTURE0,t,s)},Ft=()=>{if(ot.has("p"))return ot.get("p");const e=new Z(Vo(),uc(!1));return ot.set("p",e),e},Tt=(t,e,s)=>{const n=t.highp,o=A.$matrix;n[0]=o[6],n[1]=o[7],n[2]=e,n[3]=s,n[4]=it(),n[5]=ut()},G=t=>{t.useProgram(),t.bindUniform(),$t(ge()),c.drawArrays(c.TRIANGLES,0,6)};let dt=null;const Ec=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=A.$mainAttachmentObject;A.bind(r);const a=Us();return c.bindFramebuffer(c.FRAMEBUFFER,a),(!dt||dt.width!==r.width||dt.height!==r.height)&&(dt=ee(r.width,r.height)),z(dt),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,dt.resource,0),c.bindFramebuffer(c.FRAMEBUFFER,null),c.bindFramebuffer(c.READ_FRAMEBUFFER,ft),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,a),c.enable(c.SCISSOR_TEST),c.scissor(t,r.height-e-n,s+1,n+1),c.blitFramebuffer(0,0,r.width,r.height,0,0,r.width,r.height,c.COLOR_BUFFER_BIT,c.NEAREST),c.disable(c.SCISSOR_TEST),c.bindFramebuffer(c.FRAMEBUFFER,ft),o&&A.bind(o),dt},Tc=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=Ec(t,e,s,n),a=W(s,n,!1);A.bind(a),A.save(),A.setTransform(1,0,0,1,-t,-e);const l=Ft();Tt(l,r.width,r.height),j(),z(r),G(l);const h=a.texture;return A.restore(),V(a,!1),o&&A.bind(o),h},Yt=()=>{yt()!==610&&(Mt(610),c.blendFunc(c.ONE,c.ZERO))},Ac=t=>{z(t),Yt();const e=Ft();Tt(e,t.width,t.height),G(e),j()},xc=(t,e,s,n,o,r,a,l,h)=>{const f=t.textures;f[0]=0,f[1]=1;const i=t.mediump;i[0]=e,i[1]=s,i[2]=n,i[3]=o,i[4]=r,i[5]=a,i[6]=l,i[7]=h},me=(t=!1)=>{const e=\`m\${t?"y":"n"}\`;if(ot.has(e))return ot.get(e);const s=new Z(zo(),uc(t));return ot.set(e,s),s},Fe=(t,e,s)=>{const n=t.highp,o=A.$matrix;n[0]=o[0],n[1]=o[1],n[2]=o[3],n[3]=o[4],n[4]=o[6],n[5]=o[7],n[6]=e,n[7]=s,n[8]=it(),n[9]=ut()},cr=(t,e,s,n,o,r)=>{const a=r[0],l=r[1],h=r[2],f=A.globalAlpha,i=r[4]/255,E=r[5]/255,$=r[6]/255,v=0,T=A.$matrix;switch(A.globalCompositeOperation){case"normal":case"layer":case"add":case"screen":case"alpha":case"erase":case"copy":{if(rc()!==A.globalCompositeOperation||Ws()!==t.index){pt(Ws());const g=A.globalCompositeOperation;A.globalCompositeOperation=rc(),A.drawArraysInstanced(),A.globalCompositeOperation=g,oc(A.globalCompositeOperation),Vs(t.index),pt(t.index)}const u=He();Ot.push(t.x/rt,t.y/rt,t.w/rt,t.h/rt,t.w,t.h,it(),ut(),T[6],T[7],T[0],T[1],T[3],T[4],a,l,h,f,i,E,$,v),u.count++}break;default:{const u=A.currentAttachmentObject;A.drawArraysInstanced();const g=Math.ceil(Math.abs(n-e)),I=Math.ceil(Math.abs(o-s));let d=0,C=0,m=$c(t);if(T[0]!==1||T[1]!==0||T[3]!==0||T[4]!==1){const w=W(g,I,!1),O=St(T[0],T[1],T[3],T[4],g/2,I/2),p=St(1,0,0,1,-t.w/2,-t.h/2),R=St(O[0]*p[0]+O[2]*p[1],O[1]*p[0]+O[3]*p[1],O[0]*p[2]+O[2]*p[3],O[1]*p[2]+O[3]*p[3],O[0]*p[4]+O[2]*p[5]+O[4],O[1]*p[4]+O[3]*p[5]+O[5]);A.save(),A.bind(w),A.setTransform(R[0],R[1],R[2],R[3],R[4],R[5]),d=R[4],C=R[5];const B=me();Fe(B,m.width,m.height),z(m,!0),G(B),D(m),m=w.texture,V(w,!1),u&&A.bind(u),A.restore()}(d||C)&&(T[6]-=d,T[7]-=C);const y=Tc(T[6],T[7],g,I),M=W(g,I,!1);A.bind(M),Oe(y,m);const S=hc(A.globalCompositeOperation);xc(S,a,l,h,f,i,E,$,v),G(S),u&&A.bind(u),Ac(M.texture),(d||C)&&(T[6]+=d,T[7]+=C),D(m),D(y),V(M),oc(A.globalCompositeOperation),Vs(t.index),pt(t.index)}break}},nr=()=>{He().clear()};let Ke=0;const or=()=>{$t(tc),c.bindBuffer(c.ARRAY_BUFFER,Ye),Ot.buffer.length>Ke&&(Ke=Ot.buffer.length,c.bufferData(c.ARRAY_BUFFER,Ke*4,c.DYNAMIC_DRAW)),c.bufferSubData(c.ARRAY_BUFFER,0,Ot.buffer.subarray(0,Ot.offset))},rr=t=>{t.useProgram(),t.bindUniform(),or(),c.drawArraysInstanced(c.TRIANGLES,0,6,t.count)},ar=()=>{yt()!==611&&(Mt(611),c.blendFunc(c.ONE,c.ONE))},lr=()=>{yt()!==641&&(Mt(641),c.blendFunc(c.ONE_MINUS_DST_COLOR,c.ONE))},ir=()=>{yt()!==606&&(Mt(606),c.blendFunc(c.ZERO,c.SRC_ALPHA))},Ze=()=>{yt()!==603&&(Mt(603),c.blendFunc(c.ZERO,c.ONE_MINUS_SRC_ALPHA))},vc=t=>{switch(t){case"add":ar();break;case"screen":lr();break;case"alpha":ir();break;case"erase":Ze();break;case"copy":Yt();break;default:j();break}},ur=()=>{const t=He();t.count&&(bc(),vc(A.globalCompositeOperation),rr(t),t.clear())},hr=()=>{const t=ye();return $t(t),c.bindBuffer(c.ARRAY_BUFFER,t.vertexBuffer),c.bufferData(c.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,0,1,1,0,1]),c.STATIC_DRAW),c.enableVertexAttribArray(0),c.vertexAttribPointer(0,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,Ye),c.bufferData(c.ARRAY_BUFFER,Ot.buffer.length,c.DYNAMIC_DRAW),c.enableVertexAttribArray(1),c.vertexAttribPointer(1,4,c.FLOAT,!1,88,0),c.vertexAttribDivisor(1,1),c.enableVertexAttribArray(2),c.vertexAttribPointer(2,4,c.FLOAT,!1,88,16),c.vertexAttribDivisor(2,1),c.enableVertexAttribArray(3),c.vertexAttribPointer(3,2,c.FLOAT,!1,88,32),c.vertexAttribDivisor(3,1),c.enableVertexAttribArray(4),c.vertexAttribPointer(4,4,c.FLOAT,!1,88,40),c.vertexAttribDivisor(4,1),c.enableVertexAttribArray(5),c.vertexAttribPointer(5,4,c.FLOAT,!1,88,56),c.vertexAttribDivisor(5,1),c.enableVertexAttribArray(6),c.vertexAttribPointer(6,4,c.FLOAT,!1,88,72),c.vertexAttribDivisor(6,1),t},fr=t=>{lo(t),io(hr())},br=()=>{const t=A.$mainAttachmentObject;A.bind(t),c.bindFramebuffer(c.READ_FRAMEBUFFER,ft),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,null);const e=t.width,s=t.height;c.blitFramebuffer(0,0,e,s,0,0,e,s,c.COLOR_BUFFER_BIT,c.NEAREST),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,ds),c.bindFramebuffer(c.FRAMEBUFFER,ft)},$r=()=>{c.enable(c.BLEND),j()},Er=()=>{const t=A.currentAttachmentObject;t&&(t.mask=!0,t.clipLevel++,ae.set(t.clipLevel,t.clipLevel),Ue()||(ve(!0),c.enable(c.STENCIL_TEST),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.ALWAYS,0,255),c.stencilOp(c.ZERO,c.INVERT,c.INVERT),c.colorMask(!1,!1,!1,!1)))},Tr=(t,e,s,n)=>{const o=A.currentAttachmentObject;if(!o)return;re.set(o.clipLevel,vs(t,e,s,n));const r=Math.ceil(Math.abs(s-t)),a=Math.ceil(Math.abs(n-e));c.enable(c.SCISSOR_TEST),c.scissor(t,o.height-e-a,r,a)},Ar=()=>{const t=A.currentAttachmentObject;if(!t)return;const e=t.clipLevel,s=re.get(e),n=s[0],o=s[1],r=s[2],a=s[3];re.delete(e),ae.delete(e),Ms(s);const l=Math.ceil(Math.abs(r-n)),h=Math.ceil(Math.abs(a-o));if(c.enable(c.SCISSOR_TEST),c.scissor(n,t.height-o-h,l,h),--t.clipLevel,!t.clipLevel){t.mask=!1,ve(!1),c.clear(c.STENCIL_BUFFER_BIT),c.disable(c.STENCIL_TEST),c.disable(c.SCISSOR_TEST),ae.clear(),re.clear();return}c.stencilMask(1<<t.clipLevel),c.stencilFunc(c.ALWAYS,0,255),c.stencilOp(c.REPLACE,c.REPLACE,c.REPLACE),c.colorMask(!1,!1,!1,!1),nt(ze(),ge(),0,6),Pe()},Qe=(t,e,s,n=!1)=>{const o=ee(t,e,n);return c.texSubImage2D(c.TEXTURE_2D,0,0,0,t,e,c.RGBA,c.UNSIGNED_BYTE,s),o},xr=(t,e)=>{const s=Qe(t.w,t.h,e),n=Ft();Tt(n,t.w,t.h),j(),G(n),D(s)},vr=(t,e,s,n=!1)=>{const o=ee(t,e,n);return c.texSubImage2D(c.TEXTURE_2D,0,0,0,c.RGBA,c.UNSIGNED_BYTE,s),o},Mr=(t,e)=>{const s=vr(t.w,t.h,e),n=Ft();Tt(n,t.w,t.h),j(),G(n),D(s)},Rt=[],yr=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push("bitmap");const l=Me(a);Pt(l.buffer),q.push(l.indexCount),Rt.push(t,e,s,n,o,r)},Rr=(t,e,s,n,o,r)=>{const a=wt(!0);if(!a.length)return;bt.push("bitmap");const l=Xe(a);Pt(l.buffer),q.push(l.indexCount),Rt.push(t,e,s,n,o,r)},gr=()=>{const t=wt(!0);if(!t.length)return;bt.push("fill");const e=Xe(t);Pt(e.buffer),q.push(e.indexCount)},pr=t=>{const e=t.toFixed(1);return\`#version 300 es
409
409
  precision mediump float;
410
410
 
411
411
  uniform sampler2D u_texture;
@@ -430,7 +430,7 @@ void main() {
430
430
  color /= samples;
431
431
 
432
432
  o_color = color;
433
- }\`},Q=new Map,Rr=t=>{const e=\`b\${t}\`;if(Q.has(e))return Q.get(e);const s=new Z(Ot(),yr(t));return Q.set(e,s),s},gr=(t,e,s,n,o,r)=>{const a=t.mediump;n?(a[0]=1/e,a[1]=0):(a[0]=0,a[1]=1/s),a[2]=o,a[3]=r},Ac=(t,e,s)=>{V(t,!0);const n=Math.ceil(s*.5),o=1-(n-s*.5),r=1+s,a=Rr(n);gr(a,t.width,t.height,e,o,r),G(a)},P={x:0,y:0},_t=(t,e,s)=>(t>>16)*(s?e:1)/255,Yt=(t,e,s)=>(t>>8&255)*(s?e:1)/255,Gt=(t,e,s)=>(t&255)*(s?e:1)/255,pr=[.5,1.05,1.4,1.55,1.75,1.9,2,2.15,2.2,2.3,2.5,3,3,3.5,3.5],Vt=(t,e,s=4,n=4,o=1,r=!0)=>{const a=A.currentAttachmentObject,l=Math.sqrt(e[0]*e[0]+e[1]*e[1]),h=Math.sqrt(e[2]*e[2]+e[3]*e[3]),f=gt(),i=s*(l/f),E=n*(h/f),$=pr[o-1],v=Math.round(i*$),T=Math.round(E*$);P.x+=v,P.y+=T;const u=t.width+v*2,g=t.height+T*2;let I=1,d=1;i>128?I=.0625:i>64?I=.125:i>32?I=.25:i>16&&(I=.5),E>128?d=.0625:E>64?d=.125:E>32?d=.25:E>16&&(d=.5);const L=Math.ceil(u*I),O=Math.ceil(g*d),y=W(L,O,!1),M=W(L,O,!1),S=[y,M];A.bind(y),A.reset(),A.setTransform(I,0,0,d,v*I,T*d),V(t);const w=pe();me(w,t.width,t.height),G(w),r&&D(t);const m=i*I,p=E*d;let R=0,B=y.texture;V(B,!0),Xt();for(let b=0;b<o;++b){if(s>0){R=(R+1)%2;const C=S[R];A.bind(C),Ac(B,!0,m),B=C.texture}if(n>0){R=(R+1)%2;const C=S[R];A.bind(C),Ac(B,!1,p),B=C.texture}}if(j(),I!==1||d!==1){const b=W(u,g,!1);A.bind(b),A.setTransform(1/I,0,0,1/d,0,0),V(B,!0),me(w,B.width,B.height),G(w),B=b.texture,z(S[0]),z(S[1]),z(b,!1)}else R=(R+1)%2,z(S[R]),R=(R+1)%2,z(S[R],!1);return a&&A.bind(a),B},mr=()=>\`#version 300 es
433
+ }\`},Q=new Map,Or=t=>{const e=\`b\${t}\`;if(Q.has(e))return Q.get(e);const s=new Z(mt(),pr(t));return Q.set(e,s),s},mr=(t,e,s,n,o,r)=>{const a=t.mediump;n?(a[0]=1/e,a[1]=0):(a[0]=0,a[1]=1/s),a[2]=o,a[3]=r},Mc=(t,e,s)=>{z(t,!0);const n=Math.ceil(s*.5),o=1-(n-s*.5),r=1+s,a=Or(n);mr(a,t.width,t.height,e,o,r),G(a)},U={x:0,y:0},Gt=(t,e,s)=>(t>>16)*(s?e:1)/255,zt=(t,e,s)=>(t>>8&255)*(s?e:1)/255,Vt=(t,e,s)=>(t&255)*(s?e:1)/255,Fr=[.5,1.05,1.4,1.55,1.75,1.9,2,2.15,2.2,2.3,2.5,3,3,3.5,3.5],Wt=(t,e,s=4,n=4,o=1,r=!0)=>{const a=A.currentAttachmentObject,l=Math.sqrt(e[0]*e[0]+e[1]*e[1]),h=Math.sqrt(e[2]*e[2]+e[3]*e[3]),f=gt(),i=s*(l/f),E=n*(h/f),$=Fr[o-1],v=Math.round(i*$),T=Math.round(E*$);U.x+=v,U.y+=T;const u=t.width+v*2,g=t.height+T*2;let I=1,d=1;i>128?I=.0625:i>64?I=.125:i>32?I=.25:i>16&&(I=.5),E>128?d=.0625:E>64?d=.125:E>32?d=.25:E>16&&(d=.5);const C=Math.ceil(u*I),m=Math.ceil(g*d),y=W(C,m,!1),M=W(C,m,!1),S=[y,M];A.bind(y),A.reset(),A.setTransform(I,0,0,d,v*I,T*d),z(t);const w=me();Fe(w,t.width,t.height),G(w),r&&D(t);const O=i*I,p=E*d;let R=0,B=y.texture;z(B,!0),Yt();for(let b=0;b<o;++b){if(s>0){R=(R+1)%2;const L=S[R];A.bind(L),Mc(B,!0,O),B=L.texture}if(n>0){R=(R+1)%2;const L=S[R];A.bind(L),Mc(B,!1,p),B=L.texture}}if(j(),I!==1||d!==1){const b=W(u,g,!1);A.bind(b),A.setTransform(1/I,0,0,1/d,0,0),z(B,!0),Fe(w,B.width,B.height),G(w),B=b.texture,V(S[0]),V(S[1]),V(b,!1)}else R=(R+1)%2,V(S[R]),R=(R+1)%2,V(S[R],!1);return a&&A.bind(a),B},dr=()=>\`#version 300 es
434
434
  precision mediump float;
435
435
 
436
436
  uniform sampler2D u_texture;
@@ -450,51 +450,51 @@ void main() {
450
450
  color.rgb *= color.a;
451
451
 
452
452
  o_color = color;
453
- }\`,Or=()=>{if(Q.has("m"))return Q.get("m");const e=new Z(Ot(),mr());return Q.set("m",e),e},Fr=(t,e)=>{const s=t.mediump;s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[5],s[5]=e[6],s[6]=e[7],s[7]=e[8],s[8]=e[10],s[9]=e[11],s[10]=e[12],s[11]=e[13],s[12]=e[15],s[13]=e[16],s[14]=e[17],s[15]=e[18],s[16]=e[4]/255,s[17]=e[9]/255,s[18]=e[14]/255,s[19]=e[19]/255},dr=(t,e)=>{const s=A.currentAttachmentObject,n=W(t.width,t.height,!1);A.bind(n),A.reset(),A.setTransform(1,0,0,1,0,0),V(t),j();const o=Or();Fr(o,e),G(o);const r=n.texture;return D(t),z(n,!1),s&&A.bind(s),r},Sr=(t,e,s=!1)=>{st(2,c.TEXTURE2,e,s),st(1,c.TEXTURE1,null),st(0,c.TEXTURE0,t,s)},wr=(t,e,s,n=!1)=>{st(2,c.TEXTURE2,s,n),st(1,c.TEXTURE1,e,n),st(0,c.TEXTURE0,t,n)},Br=()=>{yt()!==670&&(Mt(670),c.blendFunc(c.DST_ALPHA,c.ZERO))},Ir=()=>{yt()!==673&&(Mt(673),c.blendFunc(c.DST_ALPHA,c.ONE_MINUS_SRC_ALPHA))},Lr=t=>\`
453
+ }\`,Sr=()=>{if(Q.has("m"))return Q.get("m");const e=new Z(mt(),dr());return Q.set("m",e),e},wr=(t,e)=>{const s=t.mediump;s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[5],s[5]=e[6],s[6]=e[7],s[7]=e[8],s[8]=e[10],s[9]=e[11],s[10]=e[12],s[11]=e[13],s[12]=e[15],s[13]=e[16],s[14]=e[17],s[15]=e[18],s[16]=e[4]/255,s[17]=e[9]/255,s[18]=e[14]/255,s[19]=e[19]/255},Br=(t,e)=>{const s=A.currentAttachmentObject,n=W(t.width,t.height,!1);A.bind(n),A.reset(),A.setTransform(1,0,0,1,0,0),z(t),j();const o=Sr();wr(o,e),G(o);const r=n.texture;return D(t),V(n,!1),s&&A.bind(s),r},Ir=(t,e,s=!1)=>{st(2,c.TEXTURE2,e,s),st(1,c.TEXTURE1,null),st(0,c.TEXTURE0,t,s)},Cr=(t,e,s,n=!1)=>{st(2,c.TEXTURE2,s,n),st(1,c.TEXTURE1,e,n),st(0,c.TEXTURE0,t,n)},Lr=()=>{yt()!==670&&(Mt(670),c.blendFunc(c.DST_ALPHA,c.ZERO))},kr=()=>{yt()!==673&&(Mt(673),c.blendFunc(c.DST_ALPHA,c.ONE_MINUS_SRC_ALPHA))},Nr=t=>\`
454
454
  vec2 base_scale = u_mediump[\${t}].xy;
455
455
  vec2 base_offset = u_mediump[\${t}].zw;
456
456
 
457
457
  vec2 uv = v_coord * base_scale - base_offset;
458
458
  vec4 base = mix(vec4(0.0), texture(u_textures[1], uv), isInside(uv));
459
- \`,Cr=()=>\`
459
+ \`,Pr=()=>\`
460
460
  vec4 blur = texture(u_textures[0], v_coord);
461
- \`,kr=t=>\`
461
+ \`,Ur=t=>\`
462
462
  vec2 blur_scale = u_mediump[\${t}].xy;
463
463
  vec2 blur_offset = u_mediump[\${t}].zw;
464
464
 
465
465
  vec2 st = v_coord * blur_scale - blur_offset;
466
466
  vec4 blur = mix(vec4(0.0), texture(u_textures[0], st), isInside(st));
467
- \`,Nr=t=>{const e=Math.floor(t/4),s=t%4;return\`
467
+ \`,Dr=t=>{const e=Math.floor(t/4),s=t%4;return\`
468
468
  float strength = u_mediump[\${e}][\${s}];
469
469
  blur.a = clamp(blur.a * strength, 0.0, 1.0);
470
- \`},Ur=t=>\`
470
+ \`},Xr=t=>\`
471
471
  vec4 color = u_mediump[\${t}];
472
472
  blur = color * blur.a;
473
- \`,Pr=t=>\`
473
+ \`,_r=t=>\`
474
474
  blur = texture(u_textures[\${t?2:1}], vec2(blur.a, 0.5));
475
- \`,xc=(t,e,s,n,o,r)=>{const a=t?"blur.a = 1.0 - blur.a;":"",l=s?Nr(r):"",h=n?Pr(e):Ur(o);return\`
475
+ \`,yc=(t,e,s,n,o,r)=>{const a=t?"blur.a = 1.0 - blur.a;":"",l=s?Dr(r):"",h=n?_r(e):Xr(o);return\`
476
476
  \${a}
477
477
  \${l}
478
478
  \${h}
479
- \`},Dr=()=>\`
479
+ \`},Yr=()=>\`
480
480
  vec4 blur2 = texture(u_textures[0], 1.0 - v_coord);
481
- \`,Xr=()=>\`
481
+ \`,Gr=()=>\`
482
482
  vec2 pq = (1.0 - v_coord) * blur_scale - blur_offset;
483
483
  vec4 blur2 = mix(vec4(0.0), texture(u_textures[0], pq), isInside(pq));
484
- \`,_r=t=>{const e=Math.floor(t/4),s=t%4;return\`
484
+ \`,zr=t=>{const e=Math.floor(t/4),s=t%4;return\`
485
485
  float strength = u_mediump[\${e}][\${s}];
486
486
  highlight_alpha *= strength;
487
487
  shadow_alpha *= strength;
488
- \`},Yr=t=>\`
488
+ \`},Vr=t=>\`
489
489
  vec4 highlight_color = u_mediump[\${t}];
490
490
  vec4 shadow_color = u_mediump[\${t+1}];
491
491
  blur = highlight_color * highlight_alpha + shadow_color * shadow_alpha;
492
- \`,Gr=t=>\`
492
+ \`,Wr=t=>\`
493
493
  blur = texture(u_textures[\${t?2:1}], vec2(
494
494
  0.5019607843137255 - 0.5019607843137255 * shadow_alpha + 0.4980392156862745 * highlight_alpha,
495
495
  0.5
496
496
  ));
497
- \`,Vr=(t,e,s,n,o,r,a,l,h)=>{let f=0;const i=s?Lr(f++):"",E=n?kr(f++):Cr(),$=r==="inner",v=f;let T=f*4,u;h?u=o?xc(!1,s,l,h,v,T):vc(s,n,l,h,v,T):o?(T+=4,u=xc($,s,l,h,v,T)):(T+=8,u=vc(s,n,l,h,v,T));let g;switch(r){case"outer":g=a?"blur - blur * base.a":"base + blur - blur * base.a";break;case"full":g=a?"blur":"base - base * blur.a + blur";break;case"inner":default:g="blur";break}return\`#version 300 es
497
+ \`,jr=(t,e,s,n,o,r,a,l,h)=>{let f=0;const i=s?Nr(f++):"",E=n?Ur(f++):Pr(),$=r==="inner",v=f;let T=f*4,u;h?u=o?yc(!1,s,l,h,v,T):Rc(s,n,l,h,v,T):o?(T+=4,u=yc($,s,l,h,v,T)):(T+=8,u=Rc(s,n,l,h,v,T));let g;switch(r){case"outer":g=a?"blur - blur * base.a":"base + blur - blur * base.a";break;case"full":g=a?"blur":"base - base * blur.a + blur";break;case"inner":default:g="blur";break}return\`#version 300 es
498
498
  precision mediump float;
499
499
 
500
500
  uniform sampler2D u_textures[\${t}];
@@ -503,14 +503,14 @@ uniform vec4 u_mediump[\${e}];
503
503
  in vec2 v_coord;
504
504
  out vec4 o_color;
505
505
 
506
- \${Ve()}
506
+ \${je()}
507
507
 
508
508
  void main() {
509
509
  \${i}
510
510
  \${E}
511
511
  \${u}
512
512
  o_color = \${g};
513
- }\`},vc=(t,e,s,n,o,r)=>{const a=e?Xr():Dr(),l=s?_r(r):"",h=n?Gr(t):Yr(o);return\`
513
+ }\`},Rc=(t,e,s,n,o,r)=>{const a=e?Gr():Yr(),l=s?zr(r):"",h=n?Wr(t):Vr(o);return\`
514
514
  \${a}
515
515
  float highlight_alpha = blur.a - blur2.a;
516
516
  float shadow_alpha = blur2.a - blur.a;
@@ -518,7 +518,7 @@ void main() {
518
518
  highlight_alpha = clamp(highlight_alpha, 0.0, 1.0);
519
519
  shadow_alpha = clamp(shadow_alpha, 0.0, 1.0);
520
520
  \${h}
521
- \`},zr=(t,e,s,n,o,r,a)=>{const $=\`f\${t?"y":"n"}\${e?"y":"n"}\${s?"y":"n"}\${n}\${o?"y":"n"}\${r?"y":"n"}\`;if(Q.has($))return Q.get($);let v=1;t&&v++,a&&v++;let T=(t?4:0)+(e?4:0)+(r?1:0);a||(T+=s?4:8),T=Math.ceil(T/4);const u=new Z(Ot(),Vr(v,T,t,e,s,n,o,r,a));return Q.set($,u),u},Wr=(t,e,s,n,o,r,a,l,h,f,i,E,$,v,T,u,g,I,d,L,O,y,M,S,w)=>{let m;y?(m=t.textures,m[0]=0,m[1]=1,w&&(m[2]=2)):w&&(m=t.textures,m[0]=0,m[1]=2);const p=t.mediump;let R=0;y&&(p[R++]=e/n,p[R++]=s/o,p[R++]=r/n,p[R++]=(s-o-a)/o),M&&(p[R++]=e/l,p[R++]=s/h,p[R++]=f/l,p[R++]=(s-h-i)/h),w||(E?(p[R++]=v,p[R++]=T,p[R++]=u,p[R++]=g):(p[R++]=v,p[R++]=T,p[R++]=u,p[R++]=g,p[R++]=I,p[R++]=d,p[R++]=L,p[R++]=O)),S&&(p[R]=$)},Ke=new Map,jr=(t,e,s)=>{let n="";for(let r=1;r<e;++r){const a=r-1,l=r,h=\`u_mediump[\${e+Math.floor(a/4)}][\${a%4}]\`,f=\`u_mediump[\${e+Math.floor(l/4)}][\${l%4}]\`,i=\`u_mediump[\${a}]\`,E=\`u_mediump[\${l}]\`;n+=\`
521
+ \`},Hr=(t,e,s,n,o,r,a)=>{const $=\`f\${t?"y":"n"}\${e?"y":"n"}\${s?"y":"n"}\${n}\${o?"y":"n"}\${r?"y":"n"}\`;if(Q.has($))return Q.get($);let v=1;t&&v++,a&&v++;let T=(t?4:0)+(e?4:0)+(r?1:0);a||(T+=s?4:8),T=Math.ceil(T/4);const u=new Z(mt(),jr(v,T,t,e,s,n,o,r,a));return Q.set($,u),u},Kr=(t,e,s,n,o,r,a,l,h,f,i,E,$,v,T,u,g,I,d,C,m,y,M,S,w)=>{let O;y?(O=t.textures,O[0]=0,O[1]=1,w&&(O[2]=2)):w&&(O=t.textures,O[0]=0,O[1]=2);const p=t.mediump;let R=0;y&&(p[R++]=e/n,p[R++]=s/o,p[R++]=r/n,p[R++]=(s-o-a)/o),M&&(p[R++]=e/l,p[R++]=s/h,p[R++]=f/l,p[R++]=(s-h-i)/h),w||(E?(p[R++]=v,p[R++]=T,p[R++]=u,p[R++]=g):(p[R++]=v,p[R++]=T,p[R++]=u,p[R++]=g,p[R++]=I,p[R++]=d,p[R++]=C,p[R++]=m)),S&&(p[R]=$)},Je=new Map,Zr=(t,e,s)=>{let n="";for(let r=1;r<e;++r){const a=r-1,l=r,h=\`u_mediump[\${e+Math.floor(a/4)}][\${a%4}]\`,f=\`u_mediump[\${e+Math.floor(l/4)}][\${l%4}]\`,i=\`u_mediump[\${a}]\`,E=\`u_mediump[\${l}]\`;n+=\`
522
522
  if (t <= \${f}) {
523
523
  return mix(\${i}, \${E}, (t - \${h}) / (\${f} - \${h}));
524
524
  }
@@ -544,7 +544,7 @@ void main() {
544
544
  color.rgb *= color.a;
545
545
 
546
546
  o_color = color;
547
- }\`},Mc=(t,e)=>{const o=\`l\${("00"+t).slice(-3)}\${e?"y":"n"}\`;if(Ke.has(o))return Ke.get(o);const r=Math.ceil(t*5/4),a=new Z(Ot(),jr(r,t,e));return Ke.set(o,a),a},Hr=(t,e,s,n,o,r)=>{const a=t.mediump;let l=0;for(let h=o;h<r;h++){const f=s[h];a[l++]=(f>>16)/255,a[l++]=(f>>8&255)/255,a[l++]=(f&255)/255,a[l++]=n[h]}for(let h=o;h<r;h++)a[l++]=e[h]/255},Kr=(t,e)=>{const s=ve();return $t(s),c.bindBuffer(c.ARRAY_BUFFER,s.vertexBuffer),ct[0]=t,ct[2]=t,ct[4]=e,ct[6]=e,c.bufferData(c.ARRAY_BUFFER,ct,c.STATIC_DRAW),c.enableVertexAttribArray(0),c.vertexAttribPointer(0,2,c.FLOAT,!1,0,0),s};let Ze;const Zr=(t,e)=>(Ze?(ct[0]!==t||ct[4]!==e)&&(ct[0]=t,ct[2]=t,ct[4]=e,ct[6]=e,c.bufferSubData(c.ARRAY_BUFFER,0,ct)):Ze=Kr(t,e),Ze),yc=(t,e,s)=>{t.useProgram(),t.bindUniform(),$t(Zr(e,s)),c.drawArrays(c.TRIANGLE_STRIP,0,4)};let Qe=null;const Rc=()=>(Qe||(Qe=W(512,1,!1)),Qe);let gc=0;const pc=()=>gc,Qr=t=>{gc=Math.floor(t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)*.75)},mc=new Float32Array(256),Oc=new Float32Array(256);for(let t=0;t<256;++t){const e=t/255;mc[t]=Math.pow(e,2.23333333),Oc[t]=e}const Jr=(t,e,s)=>{const n=A.currentAttachmentObject,o=Rc();A.bind(o);const r=t.length;Xt();const a=pc();for(let l=0;l<r;l+=a-1){const h=Math.min(l+a,r),f=Mc(h-l,!1);Hr(f,t,e,s,l,h),yc(f,t[l]/255,t[h-1]/255)}return j(),n&&A.bind(n),o.texture},ie=(t,e,s,n,o,r,a,l,h,f,i,E,$,v,T,u,g=null,I=null,d=null,L=0,O=0,y=0,M=0,S=0,w=0,m=0,p=0)=>{const R=A.currentAttachmentObject,B=W(s,n,!1);A.bind(B);const b=v==="inner",C=g!==null&&I!==null&&d!==null;let N=null;if(C&&(N=Jr(g,I,d)),b){A.reset(),A.setTransform(1,0,0,1,0,0),V(t,!0);const et=Ft();Tt(et,t.width,t.height),G(et),C&&N?Sr(e,N,!0):V(e,!0)}else C&&N?wr(e,t,N,!0):ge(e,t,!0);const U=!(b||v==="full"&&T),k=!(s===h&&n===f&&i===0&&E===0),Y=u!==1;b?T?Br():Ir():Xt();const H=zr(U,k,$,v,T,Y,C);Wr(H,s,n,o,r,a,l,h,f,i,E,$,u,L,O,y,M,S,w,m,p,U,k,Y,C),G(H);const K=B.texture;return z(B,!1),j(),R&&A.bind(R),K},qr=(t,e,s=0,n=1,o=4,r=4,a=1,l=1,h=!1,f=!1)=>{const i=A.currentAttachmentObject,E=t.width,$=t.height,v=P.x,T=P.y,u=Vt(t,e,o,r,l,!1),g=u.width,I=u.height,d=P.x,L=P.y,O=h?E:g,y=h?$:I,M=d-v,S=L-T,w=h?0:M,m=h?0:S,p=h?-M:0,R=h?-S:0,b=ie(t,u,O,y,E,$,w,m,g,I,p,R,!0,h?"inner":"outer",f,a,null,null,null,_t(s,n,!0),Yt(s,n,!0),Gt(s,n,!0),n,0,0,0,0);return D(t),D(u),i&&A.bind(i),b},ta=Math.PI/180,ea=(t,e,s=4,n=45,o=0,r=1,a=4,l=4,h=1,f=1,i=!1,E=!1,$=!1)=>{const v=A.currentAttachmentObject,T=t.width,u=t.height,g=P.x,I=P.y,d=Vt(t,e,a,l,f,!1),L=d.width,O=d.height,y=P.x,M=P.y,S=y-g,w=M-I,m=Math.sqrt(e[0]*e[0]+e[1]*e[1]),p=Math.sqrt(e[2]*e[2]+e[3]*e[3]),R=gt(),B=n*ta,b=Math.cos(B)*s*(m/R),C=Math.sin(B)*s*(p/R),N=i?T:L+Math.max(0,Math.abs(b)-S),U=i?u:O+Math.max(0,Math.abs(C)-w),k=Math.ceil(N),Y=Math.ceil(U),H=(k-N)/2,K=(Y-U)/2,et=i?0:Math.max(0,S-b)+H,lt=i?0:Math.max(0,w-C)+K,At=i?b-y:(b>0?Math.max(0,b-S):0)+H,xt=i?C-M:(C>0?Math.max(0,C-w):0)+K;let J="",at;i?(J="inner",at=E||$):!E&&$?(J="full",at=!0):(J="outer",at=E);const ue=ie(t,d,k,Y,T,u,et,lt,L,O,At,xt,!0,J,at,h,null,null,null,_t(o,r,!0),Yt(o,r,!0),Gt(o,r,!0),r,0,0,0,0);return D(t),D(d),v&&A.bind(v),ue},sa=Math.PI/180,ca=(t,e,s=4,n=45,o=16777215,r=1,a=0,l=1,h=4,f=4,i=1,E=1,$=0,v=!1)=>{const T=t.width,u=t.height,g=P.x,I=P.y,d=Math.sqrt(e[0]*e[0]+e[1]*e[1]),L=Math.sqrt(e[2]*e[2]+e[3]*e[3]),O=gt(),y=n*sa,M=Math.cos(y)*s*(d/O),S=Math.sin(y)*s*(L/O),w=A.currentAttachmentObject,m=W(T,u,!1);A.bind(m),A.reset(),A.setTransform(1,0,0,1,0,0),V(t);const p=Ft();Tt(p,t.width,t.height),G(p),A.setTransform(1,0,0,1,M*2,S*2),je(),Tt(p,t.width,t.height),G(p),j();const R=m.texture;w&&A.bind(w);const B=Vt(R,e,h,f,E,!1);z(m);const b=B.width,C=B.height,N=Math.ceil(b+Math.abs(M)*2),U=Math.ceil(C+Math.abs(S)*2);let k="";switch($){case 0:k="full";break;case 1:k="inner";break;case 2:k="outer";break}const Y=k==="inner",H=Y?T:N,K=Y?u:U,et=Math.abs(M),lt=Math.abs(S),At=(b-T)/2,xt=(C-u)/2,J=Y?0:et+At,at=Y?0:lt+xt,ue=Y?-At-M:et-M,bs=Y?-xt-S:lt-S,Bl=ie(t,B,H,K,T,u,J,at,b,C,ue,bs,!1,k,v,i,null,null,null,_t(o,r,!0),Yt(o,r,!0),Gt(o,r,!0),r,_t(a,l,!0),Yt(a,l,!0),Gt(a,l,!0),l);return P.x=g+J,P.y=I+at,D(t),D(B),Bl},na=Math.PI/180,oa=(t,e,s=4,n=45,o,r,a,l=4,h=4,f=1,i=1,E=0,$=!1)=>{const v=t.width,T=t.height,u=P.x,g=P.y,I=Math.sqrt(e[0]*e[0]+e[1]*e[1]),d=Math.sqrt(e[2]*e[2]+e[3]*e[3]),L=gt(),O=n*na,y=Math.cos(O)*s*(I/L),M=Math.sin(O)*s*(d/L),S=A.currentAttachmentObject,w=W(v,T,!1);A.bind(w),A.reset(),A.setTransform(1,0,0,1,0,0),V(t);const m=Ft();Tt(m,t.width,t.height),G(m),A.setTransform(1,0,0,1,y*2,M*2),je(),Tt(m,t.width,t.height),G(m),j();const p=w.texture;S&&A.bind(S);const R=Vt(p,e,l,h,i,!1);z(w);const B=R.width,b=R.height,C=Math.ceil(B+Math.abs(y)*2),N=Math.ceil(b+Math.abs(M)*2);let U="";switch(E){case 0:U="full";break;case 1:U="inner";break;case 2:U="outer";break}const k=U==="inner",Y=k?v:C,H=k?T:N,K=Math.abs(y),et=Math.abs(M),lt=(B-v)/2,At=(b-T)/2,xt=k?0:K+lt,J=k?0:et+At,at=k?-lt-y:K-y,ue=k?-At-M:et-M,bs=ie(t,R,Y,H,v,T,xt,J,B,b,at,ue,!1,U,$,f,a,o,r,0,0,0,0,0,0,0,0);return P.x=u+xt,P.y=g+J,D(t),D(R),bs},ra=Math.PI/180,aa=(t,e,s=4,n=45,o,r,a,l=4,h=4,f=1,i=1,E=0,$=!1)=>{const v=t.width,T=t.height,u=P.x,g=P.y,I=Vt(t,e,l,h,i,!1),d=I.width,L=I.height,O=P.x,y=P.y,M=O-u,S=y-g,w=Math.sqrt(e[0]*e[0]+e[1]*e[1]),m=Math.sqrt(e[2]*e[2]+e[3]*e[3]),p=gt(),R=n*ra,B=Math.cos(R)*s*(w/p),b=Math.sin(R)*s*(m/p),C=E===1,N=C?v:d+Math.max(0,Math.abs(B)-M),U=C?T:L+Math.max(0,Math.abs(b)-S),k=Math.ceil(N),Y=Math.ceil(U),H=(k-N)/2,K=(Y-U)/2,et=C?0:Math.max(0,M-B)+H,lt=C?0:Math.max(0,S-b)+K,At=C?B-O:(B>0?Math.max(0,B-M):0)+H,xt=C?b-y:(b>0?Math.max(0,b-S):0)+K;let J="";switch(E){case 0:J="full";break;case 1:J="inner";break;case 2:J="outer";break}const at=ie(t,I,k,Y,v,T,et,lt,d,L,At,xt,!0,J,$,f,a,o,r,0,0,0,0,0,0,0,0);return P.x=u+et,P.y=g+lt,D(t),D(I),at},la=(t,e,s,n,o)=>{const r=Math.floor(e*.5),a=Math.floor(s*.5),l=e*s;let h="";const f=o?1:2;for(let $=0;$<l;++$){const v=f+Math.floor($/4),T=$%4;h+=\`
547
+ }\`},gc=(t,e)=>{const o=\`l\${("00"+t).slice(-3)}\${e?"y":"n"}\`;if(Je.has(o))return Je.get(o);const r=Math.ceil(t*5/4),a=new Z(mt(),Zr(r,t,e));return Je.set(o,a),a},Qr=(t,e,s,n,o,r)=>{const a=t.mediump;let l=0;for(let h=o;h<r;h++){const f=s[h];a[l++]=(f>>16)/255,a[l++]=(f>>8&255)/255,a[l++]=(f&255)/255,a[l++]=n[h]}for(let h=o;h<r;h++)a[l++]=e[h]/255},Jr=(t,e)=>{const s=ye();return $t(s),c.bindBuffer(c.ARRAY_BUFFER,s.vertexBuffer),ct[0]=t,ct[2]=t,ct[4]=e,ct[6]=e,c.bufferData(c.ARRAY_BUFFER,ct,c.STATIC_DRAW),c.enableVertexAttribArray(0),c.vertexAttribPointer(0,2,c.FLOAT,!1,0,0),s};let qe;const qr=(t,e)=>(qe?(ct[0]!==t||ct[4]!==e)&&(ct[0]=t,ct[2]=t,ct[4]=e,ct[6]=e,c.bufferSubData(c.ARRAY_BUFFER,0,ct)):qe=Jr(t,e),qe),pc=(t,e,s)=>{t.useProgram(),t.bindUniform(),$t(qr(e,s)),c.drawArrays(c.TRIANGLE_STRIP,0,4)};let ts=null;const Oc=()=>(ts||(ts=W(512,1,!1)),ts);let mc=0;const Fc=()=>mc,ta=t=>{mc=Math.floor(t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)*.75)},dc=new Float32Array(256),Sc=new Float32Array(256);for(let t=0;t<256;++t){const e=t/255;dc[t]=Math.pow(e,2.23333333),Sc[t]=e}const ea=(t,e,s)=>{const n=A.currentAttachmentObject,o=Oc();A.bind(o);const r=t.length;Yt();const a=Fc();for(let l=0;l<r;l+=a-1){const h=Math.min(l+a,r),f=gc(h-l,!1);Qr(f,t,e,s,l,h),pc(f,t[l]/255,t[h-1]/255)}return j(),n&&A.bind(n),o.texture},he=(t,e,s,n,o,r,a,l,h,f,i,E,$,v,T,u,g=null,I=null,d=null,C=0,m=0,y=0,M=0,S=0,w=0,O=0,p=0)=>{const R=A.currentAttachmentObject,B=W(s,n,!1);A.bind(B);const b=v==="inner",L=g!==null&&I!==null&&d!==null;let N=null;if(L&&(N=ea(g,I,d)),b){A.reset(),A.setTransform(1,0,0,1,0,0),z(t,!0);const et=Ft();Tt(et,t.width,t.height),G(et),L&&N?Ir(e,N,!0):z(e,!0)}else L&&N?Cr(e,t,N,!0):Oe(e,t,!0);const P=!(b||v==="full"&&T),k=!(s===h&&n===f&&i===0&&E===0),Y=u!==1;b?T?Lr():kr():Yt();const H=Hr(P,k,$,v,T,Y,L);Kr(H,s,n,o,r,a,l,h,f,i,E,$,u,C,m,y,M,S,w,O,p,P,k,Y,L),G(H);const K=B.texture;return V(B,!1),j(),R&&A.bind(R),K},sa=(t,e,s=0,n=1,o=4,r=4,a=1,l=1,h=!1,f=!1)=>{const i=A.currentAttachmentObject,E=t.width,$=t.height,v=U.x,T=U.y,u=Wt(t,e,o,r,l,!1),g=u.width,I=u.height,d=U.x,C=U.y,m=h?E:g,y=h?$:I,M=d-v,S=C-T,w=h?0:M,O=h?0:S,p=h?-M:0,R=h?-S:0,b=he(t,u,m,y,E,$,w,O,g,I,p,R,!0,h?"inner":"outer",f,a,null,null,null,Gt(s,n,!0),zt(s,n,!0),Vt(s,n,!0),n,0,0,0,0);return D(t),D(u),i&&A.bind(i),b},ca=Math.PI/180,na=(t,e,s=4,n=45,o=0,r=1,a=4,l=4,h=1,f=1,i=!1,E=!1,$=!1)=>{const v=A.currentAttachmentObject,T=t.width,u=t.height,g=U.x,I=U.y,d=Wt(t,e,a,l,f,!1),C=d.width,m=d.height,y=U.x,M=U.y,S=y-g,w=M-I,O=Math.sqrt(e[0]*e[0]+e[1]*e[1]),p=Math.sqrt(e[2]*e[2]+e[3]*e[3]),R=gt(),B=n*ca,b=Math.cos(B)*s*(O/R),L=Math.sin(B)*s*(p/R),N=i?T:C+Math.max(0,Math.abs(b)-S),P=i?u:m+Math.max(0,Math.abs(L)-w),k=Math.ceil(N),Y=Math.ceil(P),H=(k-N)/2,K=(Y-P)/2,et=i?0:Math.max(0,S-b)+H,lt=i?0:Math.max(0,w-L)+K,At=i?b-y:(b>0?Math.max(0,b-S):0)+H,xt=i?L-M:(L>0?Math.max(0,L-w):0)+K;let J="",at;i?(J="inner",at=E||$):!E&&$?(J="full",at=!0):(J="outer",at=E);const fe=he(t,d,k,Y,T,u,et,lt,C,m,At,xt,!0,J,at,h,null,null,null,Gt(o,r,!0),zt(o,r,!0),Vt(o,r,!0),r,0,0,0,0);return D(t),D(d),v&&A.bind(v),fe},oa=Math.PI/180,ra=(t,e,s=4,n=45,o=16777215,r=1,a=0,l=1,h=4,f=4,i=1,E=1,$=0,v=!1)=>{const T=t.width,u=t.height,g=U.x,I=U.y,d=Math.sqrt(e[0]*e[0]+e[1]*e[1]),C=Math.sqrt(e[2]*e[2]+e[3]*e[3]),m=gt(),y=n*oa,M=Math.cos(y)*s*(d/m),S=Math.sin(y)*s*(C/m),w=A.currentAttachmentObject,O=W(T,u,!1);A.bind(O),A.reset(),A.setTransform(1,0,0,1,0,0),z(t);const p=Ft();Tt(p,t.width,t.height),G(p),A.setTransform(1,0,0,1,M*2,S*2),Ze(),Tt(p,t.width,t.height),G(p),j();const R=O.texture;w&&A.bind(w);const B=Wt(R,e,h,f,E,!1);V(O);const b=B.width,L=B.height,N=Math.ceil(b+Math.abs(M)*2),P=Math.ceil(L+Math.abs(S)*2);let k="";switch($){case 0:k="full";break;case 1:k="inner";break;case 2:k="outer";break}const Y=k==="inner",H=Y?T:N,K=Y?u:P,et=Math.abs(M),lt=Math.abs(S),At=(b-T)/2,xt=(L-u)/2,J=Y?0:et+At,at=Y?0:lt+xt,fe=Y?-At-M:et-M,Ts=Y?-xt-S:lt-S,Ll=he(t,B,H,K,T,u,J,at,b,L,fe,Ts,!1,k,v,i,null,null,null,Gt(o,r,!0),zt(o,r,!0),Vt(o,r,!0),r,Gt(a,l,!0),zt(a,l,!0),Vt(a,l,!0),l);return U.x=g+J,U.y=I+at,D(t),D(B),Ll},aa=Math.PI/180,la=(t,e,s=4,n=45,o,r,a,l=4,h=4,f=1,i=1,E=0,$=!1)=>{const v=t.width,T=t.height,u=U.x,g=U.y,I=Math.sqrt(e[0]*e[0]+e[1]*e[1]),d=Math.sqrt(e[2]*e[2]+e[3]*e[3]),C=gt(),m=n*aa,y=Math.cos(m)*s*(I/C),M=Math.sin(m)*s*(d/C),S=A.currentAttachmentObject,w=W(v,T,!1);A.bind(w),A.reset(),A.setTransform(1,0,0,1,0,0),z(t);const O=Ft();Tt(O,t.width,t.height),G(O),A.setTransform(1,0,0,1,y*2,M*2),Ze(),Tt(O,t.width,t.height),G(O),j();const p=w.texture;S&&A.bind(S);const R=Wt(p,e,l,h,i,!1);V(w);const B=R.width,b=R.height,L=Math.ceil(B+Math.abs(y)*2),N=Math.ceil(b+Math.abs(M)*2);let P="";switch(E){case 0:P="full";break;case 1:P="inner";break;case 2:P="outer";break}const k=P==="inner",Y=k?v:L,H=k?T:N,K=Math.abs(y),et=Math.abs(M),lt=(B-v)/2,At=(b-T)/2,xt=k?0:K+lt,J=k?0:et+At,at=k?-lt-y:K-y,fe=k?-At-M:et-M,Ts=he(t,R,Y,H,v,T,xt,J,B,b,at,fe,!1,P,$,f,a,o,r,0,0,0,0,0,0,0,0);return U.x=u+xt,U.y=g+J,D(t),D(R),Ts},ia=Math.PI/180,ua=(t,e,s=4,n=45,o,r,a,l=4,h=4,f=1,i=1,E=0,$=!1)=>{const v=t.width,T=t.height,u=U.x,g=U.y,I=Wt(t,e,l,h,i,!1),d=I.width,C=I.height,m=U.x,y=U.y,M=m-u,S=y-g,w=Math.sqrt(e[0]*e[0]+e[1]*e[1]),O=Math.sqrt(e[2]*e[2]+e[3]*e[3]),p=gt(),R=n*ia,B=Math.cos(R)*s*(w/p),b=Math.sin(R)*s*(O/p),L=E===1,N=L?v:d+Math.max(0,Math.abs(B)-M),P=L?T:C+Math.max(0,Math.abs(b)-S),k=Math.ceil(N),Y=Math.ceil(P),H=(k-N)/2,K=(Y-P)/2,et=L?0:Math.max(0,M-B)+H,lt=L?0:Math.max(0,S-b)+K,At=L?B-m:(B>0?Math.max(0,B-M):0)+H,xt=L?b-y:(b>0?Math.max(0,b-S):0)+K;let J="";switch(E){case 0:J="full";break;case 1:J="inner";break;case 2:J="outer";break}const at=he(t,I,k,Y,v,T,et,lt,d,C,At,xt,!0,J,$,f,a,o,r,0,0,0,0,0,0,0,0);return U.x=u+et,U.y=g+lt,D(t),D(I),at},ha=(t,e,s,n,o)=>{const r=Math.floor(e*.5),a=Math.floor(s*.5),l=e*s;let h="";const f=o?1:2;for(let $=0;$<l;++$){const v=f+Math.floor($/4),T=$%4;h+=\`
548
548
  result += getWeightedColor(\${$}, u_mediump[\${v}][\${T}]);
549
549
  \`}const i=n?"result.a = texture(u_texture, v_coord).a;":"",E=o?"":\`
550
550
  vec4 substitute_color = u_mediump[1];
@@ -558,7 +558,7 @@ uniform vec4 u_mediump[\${t}];
558
558
  in vec2 v_coord;
559
559
  out vec4 o_color;
560
560
 
561
- \${Ve()}
561
+ \${je()}
562
562
 
563
563
  vec4 getWeightedColor (in int i, in float weight) {
564
564
  vec2 rcp_size = u_mediump[0].xy;
@@ -586,7 +586,7 @@ void main() {
586
586
 
587
587
  result.rgb *= result.a;
588
588
  o_color = result;
589
- }\`},ia=(t,e,s,n)=>{const o=("0"+t).slice(-2),r=("0"+e).slice(-2),h=\`c\${o}\${r}\${s?"y":"n"}\${n?"y":"n"}\`;if(Q.has(h))return Q.get(h);const f=(n?1:2)+Math.ceil(t*e/4),i=new Z(Ot(),la(f,t,e,s,n));return Q.set(h,i),i},ua=(t,e,s,n,o,r,a,l,h,f,i)=>{const E=t.mediump;E[0]=1/e,E[1]=1/s,E[2]=1/o,E[3]=r/255;let $=4;a||(E[$++]=l,E[$++]=h,E[$++]=f,E[$++]=i);const v=n.length;for(let T=0;T<v;T++)E[$++]=n[T]},ha=(t,e=0,s=0,n,o=1,r=0,a=!0,l=!0,h=0,f=0)=>{const i=A.currentAttachmentObject,E=t.width,$=t.height,v=W(E,$,!1);A.bind(v),A.reset(),A.setTransform(1,0,0,1,0,0),V(t,!0),j();const T=ia(e,s,a,l);ua(T,E,$,n,o,r,l,_t(h,f,!1),Yt(h,f,!1),Gt(h,f,!1),f),G(T);const u=v.texture;return D(t),z(v,!1),i&&A.bind(i),u},fa=(t,e,s,n)=>{let o,r,a;switch(e){case 1:o="map_color.r";break;case 2:o="map_color.g";break;case 4:o="map_color.b";break;case 8:o="map_color.a";break;default:o="0.5";break}switch(s){case 1:r="map_color.r";break;case 2:r="map_color.g";break;case 4:r="map_color.b";break;case 8:r="map_color.a";break;default:r="0.5";break}switch(n){case 0:a=\`
589
+ }\`},fa=(t,e,s,n)=>{const o=("0"+t).slice(-2),r=("0"+e).slice(-2),h=\`c\${o}\${r}\${s?"y":"n"}\${n?"y":"n"}\`;if(Q.has(h))return Q.get(h);const f=(n?1:2)+Math.ceil(t*e/4),i=new Z(mt(),ha(f,t,e,s,n));return Q.set(h,i),i},ba=(t,e,s,n,o,r,a,l,h,f,i)=>{const E=t.mediump;E[0]=1/e,E[1]=1/s,E[2]=1/o,E[3]=r/255;let $=4;a||(E[$++]=l,E[$++]=h,E[$++]=f,E[$++]=i);const v=n.length;for(let T=0;T<v;T++)E[$++]=n[T]},$a=(t,e=0,s=0,n,o=1,r=0,a=!0,l=!0,h=0,f=0)=>{const i=A.currentAttachmentObject,E=t.width,$=t.height,v=W(E,$,!1);A.bind(v),A.reset(),A.setTransform(1,0,0,1,0,0),z(t,!0),j();const T=fa(e,s,a,l);ba(T,E,$,n,o,r,l,Gt(h,f,!1),zt(h,f,!1),Vt(h,f,!1),f),G(T);const u=v.texture;return D(t),V(v,!1),i&&A.bind(i),u},Ea=(t,e,s,n)=>{let o,r,a;switch(e){case 1:o="map_color.r";break;case 2:o="map_color.g";break;case 4:o="map_color.b";break;case 8:o="map_color.a";break;default:o="0.5";break}switch(s){case 1:r="map_color.r";break;case 2:r="map_color.g";break;case 4:r="map_color.b";break;case 8:r="map_color.a";break;default:r="0.5";break}switch(n){case 0:a=\`
590
590
  vec4 source_color = texture(u_textures[0], uv);
591
591
  \`;break;case 3:a=\`
592
592
  vec4 source_color =texture(u_textures[0], mix(v_coord, uv, step(abs(uv - vec2(0.5)), vec2(0.5))));
@@ -604,7 +604,7 @@ uniform vec4 u_mediump[\${t}];
604
604
  in vec2 v_coord;
605
605
  out vec4 o_color;
606
606
 
607
- \${Ve()}
607
+ \${je()}
608
608
 
609
609
  void main() {
610
610
  vec2 uv_to_st_scale = u_mediump[0].xy;
@@ -619,7 +619,7 @@ void main() {
619
619
  \${a}
620
620
 
621
621
  o_color = mix(texture(u_textures[0], v_coord), source_color, isInside(st));
622
- }\`},ba=(t,e,s)=>{const n=\`d\${t}\${e}\${s}\`;if(Q.has(n))return Q.get(n);const o=s===1?3:2,r=new Z(Ot(),fa(o,t,e,s));return Q.set(n,r),r},$a=(t,e,s,n,o,r,a,l,h,f,i,E,$,v)=>{const T=t.textures;T[0]=0,T[1]=1;const u=t.mediump;u[0]=n/e,u[1]=o/s,u[2]=r/e,u[3]=(o-s-a)/s,u[4]=l/n,u[5]=-h/o,f===1&&(u[8]=i,u[9]=E,u[10]=$,u[11]=v)},Ea=(t,e,s,n=0,o=0,r=0,a=0,l=0,h=0,f=0,i=0,E=2,$=0,v=0)=>{const T=A.currentAttachmentObject,u=gt(),g=Math.sqrt(e[0]*e[0]+e[1]*e[1])/u,I=Math.sqrt(e[2]*e[2]+e[3]*e[3])/u,d=t.width,L=t.height,O=d/g,y=L/I,M=W(d,L,!1);A.bind(M);const S=He(n,o,s);ge(t,S);const w=ba(l,h,E);$a(w,d,L,O,y,r,a,f,i,E,_t($,v,!0),Yt($,v,!0),Gt($,v,!0),v),j(),G(w);const m=M.texture;return T&&A.bind(T),D(t),D(S),z(M,!1),m},Ta=(t,e,s,n)=>{const o=t.highp,r=A.$matrix;o[0]=r[0],o[1]=r[1],o[2]=r[3],o[3]=r[4],o[4]=r[6],o[5]=r[7],o[6]=s,o[7]=n,o[8]=it(),o[9]=ut();const a=t.mediump;a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=e[3],a[4]=e[4],a[5]=e[5],a[6]=e[6],a[7]=e[7]},Aa=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=t.width,a=t.height;switch(A.globalCompositeOperation){case"normal":case"layer":case"add":case"screen":case"alpha":case"erase":case"copy":{A.bind(A.$mainAttachmentObject),A.setTransform(1,0,0,1,s,n);const l=pe(!0);Ta(l,e,r,a),V(t),Tc(A.globalCompositeOperation),G(l)}break;default:{const l=bc(s,n,r,a),h=W(r,a,!1);A.bind(h),ge(l,t);const f=lc(A.globalCompositeOperation);Ec(f,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),G(f),A.bind(A.$mainAttachmentObject),A.reset(),A.setTransform(1,0,0,1,s,n),$c(h.texture),D(l),z(h)}break}o&&A.bind(o),j()},Fc=[],Oe=t=>{t.size&&t.clear(),Fc.push(t)},xa=()=>Fc.pop()||new Map,va=(t,e,s)=>{s.clear(),t.$timerId!==null&&clearTimeout(t.$timerId);for(const n of e.values()){for(const o of n.values())o&&t.destroy(o);Oe(n)}e.clear()},Ma=(t,e)=>{if(!(!e||typeof e!="object")&&"canvas"in e){const s=e.canvas,n=s.width,o=s.height;e.clearRect(0,0,n+1,o+1),s.width=s.height=1,t.push(s)}},ya=(t,e,s)=>{if(!t.has(e))return;const n=t.get(e);n.has(s)&&(n.delete(s),n.size||(Oe(n),t.delete(e)))},Ra=(t,e,s)=>{if(!e.has(s))return;const n=e.get(s);for(const o of n.values())t.destroy(o);e.delete(s),Oe(n)},ga=(t,e,s)=>{const n=t.get(e)||null;return n?(n.delete("trash"),n.get(s)||null):null},pa=(t,e,s,n,o=null)=>{e.has(s)||e.set(s,xa());const r=e.get(s);if(o===null){if(!r.has(n))return;t.destroy(r.get(n)),r.delete(n),r.size||(e.delete(s),Oe(r));return}r.set(n,o)},ma=(t,e,s="")=>s?t.has(e)?t.get(e).has(s):!1:t.has(e),Oa=(t,e,s)=>{const n=[t*100,e*100];s&&n.push(s*100);let o=2166136261;for(let r=0;r<n.length;++r){let a=n[r]|0;for(let l=0;l<4;l++){const h=a&255;o^=h,o=Math.imul(o,16777619),a>>>=8}}return(o>>>0)%16777216},Fa=(t,e,s,n)=>\`\${t}\${e}\${s}\${n}\`,da=(t,e,s,n)=>{if(s.has(n))return;const o=e.get(n);o&&(o.set("trash",!0),s.set(n,o),t.$timerId!==null&&clearTimeout(t.$timerId),t.$removeCache=!1,t.$timerId=setTimeout(()=>{t.$removeCache=!0,t.$timerId=null},1e3))},Sa=(t,e)=>{if(e.size){for(const[s,n]of e)n.has("trash")&&(t.removeById(s),t.$removeIds.push(+s));e.clear(),t.$removeCache=!1}};class wa{_$pool;_$store;_$trash;$timerId;$removeCache;$removeIds;constructor(){this._$pool=[],this._$store=new Map,this._$trash=new Map,this.$timerId=null,this.$removeIds=[],this.$removeCache=!1}reset(){va(this,this._$store,this._$trash)}destroy(e=null){Ma(this._$pool,e)}getCanvas(){return this._$pool.pop()||document.createElement("canvas")}remove(e,s){ya(this._$store,e,s)}removeTimer(e){da(this,this._$store,this._$trash,e)}removeTimerScheduledCache(){Sa(this,this._$trash)}removeById(e){Ra(this,this._$store,e)}getById(e){return this._$store.get(e)}get(e,s){return ga(this._$store,e,s)}set(e,s,n=null){pa(this,this._$store,e,s,n)}has(e,s=""){return ma(this._$store,e,s)}generateKeys(e,s,n){return Oa(e,s,n)}generateFilterKeys(e,s,n,o){return Fa(e,s,n,o)}}const _=new wa,Ba=(t,e,s,n,o,r,a,l,h,f,i)=>{const E=A.currentAttachmentObject;let $=null;const v=Math.sqrt(a[0]*a[0]+a[1]*a[1]),T=Math.sqrt(a[2]*a[2]+a[3]*a[3]),u=_.generateFilterKeys(a[0],a[1],a[2],a[3]);let g=!1;if(_.get(e,"fKey")===u){const O=_.get(e,"fTexture");s?D(O):(g=!0,$=O)}let d=0,L=0;if(g)d=_.get(e,"offsetX"),L=_.get(e,"offsetY");else{$=hc(t);const O=Math.atan2(a[1],a[0]),y=Math.atan2(-a[2],a[3]),M=r?v*Math.cos(O):Math.cos(O),S=r?v*Math.sin(O):Math.sin(O),w=r?-T*Math.sin(y):-Math.sin(y),m=r?T*Math.cos(y):Math.cos(y),p=St(M,S,w,m,n/2,o/2),R=St(1,0,0,1,-t.w/2,-t.h/2),B=Gc(p,R);if(Kt(p),Kt(R),B[0]!==1||B[1]!==0||B[2]!==0||B[3]!==1){const b=W(n,o,!1);A.bind(b),A.reset(),A.setTransform(B[0],B[1],B[2],B[3],B[4],B[5]),d=B[4],L=B[5],V($);const C=pe();me(C,$.width,$.height),G(C),D($),$=b.texture,z(b,!1),E&&A.bind(E)}Kt(B),P.x=0,P.y=0;for(let b=0;i.length>b;)switch(i[b++]){case 0:$=ca($,a,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++]);break;case 1:$=Vt($,a,i[b++],i[b++],i[b++]);break;case 2:$=dr($,new Float32Array([i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++]]));break;case 3:{const N=i[b++],U=i[b++],k=N*U,Y=i.subarray(b,b+k);b+=k,$=ha($,N,U,Y,i[b++],i[b++],!!i[b++],!!i[b++],i[b++],i[b++])}break;case 4:{const N=i[b++],U=new Uint8Array(N);U.set(i.subarray(b,b+N)),b+=N,$=Ea($,a,U,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++])}break;case 5:$=ea($,a,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++],!!i[b++],!!i[b++]);break;case 6:$=qr($,a,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++],!!i[b++]);break;case 7:{const N=i[b++],U=i[b++];let k=i[b++];const Y=i.subarray(b,b+k);b+=k,k=i[b++];const H=i.subarray(b,b+k);b+=k,k=i[b++];const K=i.subarray(b,b+k);b+=k,$=oa($,a,N,U,Y,H,K,i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++])}break;case 8:{const N=i[b++],U=i[b++];let k=i[b++];const Y=i.subarray(b,b+k);b+=k,k=i[b++];const H=i.subarray(b,b+k);b+=k,k=i[b++];const K=i.subarray(b,b+k);b+=k,$=aa($,a,N,U,Y,H,K,i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++])}break}}if($){const O=gt(),y=f[0]*(v/O),M=f[1]*(T/O);A.reset(),A.setTransform(1,0,0,1,0,0),A.globalCompositeOperation=h,Aa($,l,-d+y+a[4],-L+M+a[5])}g||(_.set(e,"fKey",u),_.set(e,"fTexture",$),_.set(e,"offsetX",d),_.set(e,"offsetY",L)),E&&A.bind(E)},Ia=t=>{const e=Ds(t.index),s=e[0],n=e[1],o=e[2],r=e[3];e[0]=Math.min(t.x,s),e[1]=Math.min(t.y,n),e[2]=Math.max(t.x+t.w,o),e[3]=Math.max(t.y+t.h,r)},La=t=>{const e=Xs(t.index),s=e[0],n=e[1],o=e[2],r=e[3];e[0]=Math.min(t.x,s),e[1]=Math.min(t.y,n),e[2]=Math.max(t.x+t.w,o),e[3]=Math.max(t.y+t.h,r)},Ca=t=>{const e=\`s\${t?"y":"n"}\`;if(Et.has(e))return Et.get(e);const s=new Z(Re(t?9:0,!1,!1,t),mo());return Et.set(e,s),s},ka=(t,e)=>{const s=t.highp;s[0]=e[0],s[1]=e[1],s[2]=0,s[4]=e[2],s[5]=e[3],s[6]=0,s[8]=e[4],s[9]=e[5],s[10]=1,s[12]=e[6],s[13]=e[7],s[14]=0,s[16]=e[8],s[17]=e[9],s[18]=0,s[20]=e[10],s[21]=e[11],s[22]=1,s[3]=it(),s[7]=ut(),s[11]=e[12],s[15]=e[13],s[19]=e[14],s[23]=e[15],s[24]=e[16],s[25]=e[17],s[26]=e[18],s[27]=e[19],s[28]=e[20],s[29]=e[21],s[30]=e[22],s[31]=e[23],s[32]=e[24],s[33]=e[25]},Na=(t,e,s,n)=>{c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const o=!!n,r=ae(o);n&&le(r,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(r,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0);const a=Ca(o);n&&ka(a,n),nt(a,t,e,s)},Ua=(t,e,s,n,o)=>{const r=t.mediump;let a=0;for(let l=s;l<n;++l){const h=l*5;r[a++]=o[e[h+1]],r[a++]=o[e[h+2]],r[a++]=o[e[h+3]],r[a++]=o[e[h+4]]}for(let l=s;l<n;++l)r[a++]=e[l*5]},dc=(t,e)=>{const s=A.currentAttachmentObject,n=c.getParameter(c.SCISSOR_BOX);c.disable(c.SCISSOR_TEST);const o=Rc();A.bind(o);const r=e===0,a=t.length/5,l=r?mc:Oc;Xt();const h=pc();for(let f=0;f<a;f+=h-1){const i=Math.min(f+h,a),E=Mc(i-f,r);Ua(E,t,f,i,l),yc(E,t[0],t[t.length-5])}return j(),s&&A.bind(s),c.enable(c.SCISSOR_TEST),c.scissor(n[0],n[1],n[2],n[3]),o.texture},Je=new Map,Pa=(t,e,s,n)=>{const o=t?"y":"n",r=e?"y":"n",a=e&&s?"y":"n",l=\`\${n}\`;return\`\${o}\${r}\${a}\${l}\`},Da=t=>\`
622
+ }\`},Ta=(t,e,s)=>{const n=\`d\${t}\${e}\${s}\`;if(Q.has(n))return Q.get(n);const o=s===1?3:2,r=new Z(mt(),Ea(o,t,e,s));return Q.set(n,r),r},Aa=(t,e,s,n,o,r,a,l,h,f,i,E,$,v)=>{const T=t.textures;T[0]=0,T[1]=1;const u=t.mediump;u[0]=n/e,u[1]=o/s,u[2]=r/e,u[3]=(o-s-a)/s,u[4]=l/n,u[5]=-h/o,f===1&&(u[8]=i,u[9]=E,u[10]=$,u[11]=v)},xa=(t,e,s,n=0,o=0,r=0,a=0,l=0,h=0,f=0,i=0,E=2,$=0,v=0)=>{const T=A.currentAttachmentObject,u=gt(),g=Math.sqrt(e[0]*e[0]+e[1]*e[1])/u,I=Math.sqrt(e[2]*e[2]+e[3]*e[3])/u,d=t.width,C=t.height,m=d/g,y=C/I,M=W(d,C,!1);A.bind(M);const S=Qe(n,o,s);Oe(t,S);const w=Ta(l,h,E);Aa(w,d,C,m,y,r,a,f,i,E,Gt($,v,!0),zt($,v,!0),Vt($,v,!0),v),j(),G(w);const O=M.texture;return T&&A.bind(T),D(t),D(S),V(M,!1),O},va=(t,e,s,n)=>{const o=t.highp,r=A.$matrix;o[0]=r[0],o[1]=r[1],o[2]=r[3],o[3]=r[4],o[4]=r[6],o[5]=r[7],o[6]=s,o[7]=n,o[8]=it(),o[9]=ut();const a=t.mediump;a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=e[3],a[4]=e[4],a[5]=e[5],a[6]=e[6],a[7]=e[7]},Ma=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=t.width,a=t.height;switch(A.globalCompositeOperation){case"normal":case"layer":case"add":case"screen":case"alpha":case"erase":case"copy":{A.bind(A.$mainAttachmentObject),A.setTransform(1,0,0,1,s,n);const l=me(!0);va(l,e,r,a),z(t),vc(A.globalCompositeOperation),G(l)}break;default:{const l=Tc(s,n,r,a),h=W(r,a,!1);A.bind(h),Oe(l,t);const f=hc(A.globalCompositeOperation);xc(f,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),G(f),A.bind(A.$mainAttachmentObject),A.reset(),A.setTransform(1,0,0,1,s,n),Ac(h.texture),D(l),V(h)}break}o&&A.bind(o),j()},wc=[],de=t=>{t.size&&t.clear(),wc.push(t)},ya=()=>wc.pop()||new Map,Ra=(t,e,s)=>{s.clear(),t.$timerId!==null&&clearTimeout(t.$timerId);for(const n of e.values()){for(const o of n.values())o&&t.destroy(o);de(n)}e.clear()},ga=(t,e)=>{if(!(!e||typeof e!="object")&&"canvas"in e){const s=e.canvas,n=s.width,o=s.height;e.clearRect(0,0,n+1,o+1),s.width=s.height=1,t.push(s)}},pa=(t,e,s)=>{if(!t.has(e))return;const n=t.get(e);n.has(s)&&(n.delete(s),n.size||(de(n),t.delete(e)))},Oa=(t,e,s)=>{if(!e.has(s))return;const n=e.get(s);for(const o of n.values())t.destroy(o);e.delete(s),de(n)},ma=(t,e,s)=>{const n=t.get(e)||null;return n?(n.delete("trash"),n.get(s)||null):null},Fa=(t,e,s,n,o=null)=>{e.has(s)||e.set(s,ya());const r=e.get(s);if(o===null){if(!r.has(n))return;t.destroy(r.get(n)),r.delete(n),r.size||(e.delete(s),de(r));return}r.set(n,o)},da=(t,e,s="")=>s?t.has(e)?t.get(e).has(s):!1:t.has(e),Sa=(t,e,s)=>{const n=[t*100,e*100];s&&n.push(s*100);let o=2166136261;for(let r=0;r<n.length;++r){let a=n[r]|0;for(let l=0;l<4;l++){const h=a&255;o^=h,o=Math.imul(o,16777619),a>>>=8}}return(o>>>0)%16777216},wa=(t,e,s,n)=>\`\${t}\${e}\${s}\${n}\`,Ba=(t,e,s,n)=>{if(s.has(n))return;const o=e.get(n);o&&(o.set("trash",!0),s.set(n,o),t.$timerId!==null&&clearTimeout(t.$timerId),t.$removeCache=!1,t.$timerId=setTimeout(()=>{t.$removeCache=!0,t.$timerId=null},1e3))},Ia=(t,e)=>{if(e.size){for(const[s,n]of e)n.has("trash")&&(t.removeById(s),t.$removeIds.push(+s));e.clear(),t.$removeCache=!1}};class Ca{_$pool;_$store;_$trash;$timerId;$removeCache;$removeIds;constructor(){this._$pool=[],this._$store=new Map,this._$trash=new Map,this.$timerId=null,this.$removeIds=[],this.$removeCache=!1}reset(){Ra(this,this._$store,this._$trash)}destroy(e=null){ga(this._$pool,e)}getCanvas(){return this._$pool.pop()||document.createElement("canvas")}remove(e,s){pa(this._$store,e,s)}removeTimer(e){Ba(this,this._$store,this._$trash,e)}removeTimerScheduledCache(){Ia(this,this._$trash)}removeById(e){Oa(this,this._$store,e)}getById(e){return this._$store.get(e)}get(e,s){return ma(this._$store,e,s)}set(e,s,n=null){Fa(this,this._$store,e,s,n)}has(e,s=""){return da(this._$store,e,s)}generateKeys(e,s,n){return Sa(e,s,n)}generateFilterKeys(e,s,n,o){return wa(e,s,n,o)}}const _=new Ca,La=(t,e,s,n,o,r,a,l,h,f,i)=>{const E=A.currentAttachmentObject;let $=null;const v=Math.sqrt(a[0]*a[0]+a[1]*a[1]),T=Math.sqrt(a[2]*a[2]+a[3]*a[3]),u=_.generateFilterKeys(a[0],a[1],a[2],a[3]);let g=!1;if(_.get(e,"fKey")===u){const m=_.get(e,"fTexture");s?D(m):(g=!0,$=m)}let d=0,C=0;if(g)d=_.get(e,"offsetX"),C=_.get(e,"offsetY");else{$=$c(t);const m=Math.atan2(a[1],a[0]),y=Math.atan2(-a[2],a[3]),M=r?v*Math.cos(m):Math.cos(m),S=r?v*Math.sin(m):Math.sin(m),w=r?-T*Math.sin(y):-Math.sin(y),O=r?T*Math.cos(y):Math.cos(y),p=St(M,S,w,O,n/2,o/2),R=St(1,0,0,1,-t.w/2,-t.h/2),B=Wc(p,R);if(Qt(p),Qt(R),B[0]!==1||B[1]!==0||B[2]!==0||B[3]!==1){const b=W(n,o,!1);A.bind(b),A.reset(),A.setTransform(B[0],B[1],B[2],B[3],B[4],B[5]),d=B[4],C=B[5],z($);const L=me();Fe(L,$.width,$.height),G(L),D($),$=b.texture,V(b,!1),E&&A.bind(E)}Qt(B),U.x=0,U.y=0;for(let b=0;i.length>b;)switch(i[b++]){case 0:$=ra($,a,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++]);break;case 1:$=Wt($,a,i[b++],i[b++],i[b++]);break;case 2:$=Br($,new Float32Array([i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++]]));break;case 3:{const N=i[b++],P=i[b++],k=N*P,Y=i.subarray(b,b+k);b+=k,$=$a($,N,P,Y,i[b++],i[b++],!!i[b++],!!i[b++],i[b++],i[b++])}break;case 4:{const N=i[b++],P=new Uint8Array(N);P.set(i.subarray(b,b+N)),b+=N,$=xa($,a,P,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++])}break;case 5:$=na($,a,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++],!!i[b++],!!i[b++]);break;case 6:$=sa($,a,i[b++],i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++],!!i[b++]);break;case 7:{const N=i[b++],P=i[b++];let k=i[b++];const Y=i.subarray(b,b+k);b+=k,k=i[b++];const H=i.subarray(b,b+k);b+=k,k=i[b++];const K=i.subarray(b,b+k);b+=k,$=la($,a,N,P,Y,H,K,i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++])}break;case 8:{const N=i[b++],P=i[b++];let k=i[b++];const Y=i.subarray(b,b+k);b+=k,k=i[b++];const H=i.subarray(b,b+k);b+=k,k=i[b++];const K=i.subarray(b,b+k);b+=k,$=ua($,a,N,P,Y,H,K,i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++])}break}}if($){const m=gt(),y=f[0]*(v/m),M=f[1]*(T/m);A.reset(),A.setTransform(1,0,0,1,0,0),A.globalCompositeOperation=h,Ma($,l,-d+y+a[4],-C+M+a[5])}g||(_.set(e,"fKey",u),_.set(e,"fTexture",$),_.set(e,"offsetX",d),_.set(e,"offsetY",C)),E&&A.bind(E)},ka=t=>{const e=Ys(t.index),s=e[0],n=e[1],o=e[2],r=e[3];e[0]=Math.min(t.x,s),e[1]=Math.min(t.y,n),e[2]=Math.max(t.x+t.w,o),e[3]=Math.max(t.y+t.h,r)},Na=t=>{const e=Gs(t.index),s=e[0],n=e[1],o=e[2],r=e[3];e[0]=Math.min(t.x,s),e[1]=Math.min(t.y,n),e[2]=Math.max(t.x+t.w,o),e[3]=Math.max(t.y+t.h,r)},Pa=t=>{const e=\`s\${t?"y":"n"}\`;if(Et.has(e))return Et.get(e);const s=new Z(pe(t?9:0,!1,!1,t),So());return Et.set(e,s),s},Ua=(t,e)=>{const s=t.highp;s[0]=e[0],s[1]=e[1],s[2]=0,s[4]=e[2],s[5]=e[3],s[6]=0,s[8]=e[4],s[9]=e[5],s[10]=1,s[12]=e[6],s[13]=e[7],s[14]=0,s[16]=e[8],s[17]=e[9],s[18]=0,s[20]=e[10],s[21]=e[11],s[22]=1,s[3]=it(),s[7]=ut(),s[11]=e[12],s[15]=e[13],s[19]=e[14],s[23]=e[15],s[24]=e[16],s[25]=e[17],s[26]=e[18],s[27]=e[19],s[28]=e[20],s[29]=e[21],s[30]=e[22],s[31]=e[23],s[32]=e[24],s[33]=e[25]},Da=(t,e,s,n)=>{c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const o=!!n,r=ie(o);n&&ue(r,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(r,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0);const a=Pa(o);n&&Ua(a,n),nt(a,t,e,s)},Xa=(t,e,s,n,o)=>{const r=t.mediump;let a=0;for(let l=s;l<n;++l){const h=l*5;r[a++]=o[e[h+1]],r[a++]=o[e[h+2]],r[a++]=o[e[h+3]],r[a++]=o[e[h+4]]}for(let l=s;l<n;++l)r[a++]=e[l*5]},Bc=(t,e)=>{const s=A.currentAttachmentObject,n=c.getParameter(c.SCISSOR_BOX);c.disable(c.SCISSOR_TEST);const o=Oc();A.bind(o);const r=e===0,a=t.length/5,l=r?dc:Sc;Yt();const h=Fc();for(let f=0;f<a;f+=h-1){const i=Math.min(f+h,a),E=gc(i-f,r);Xa(E,t,f,i,l),pc(E,t[0],t[t.length-5])}return j(),s&&A.bind(s),c.enable(c.SCISSOR_TEST),c.scissor(n[0],n[1],n[2],n[3]),o.texture},es=new Map,_a=(t,e,s,n)=>{const o=t?"y":"n",r=e?"y":"n",a=e&&s?"y":"n",l=\`\${n}\`;return\`\${o}\${r}\${a}\${l}\`},Ya=t=>\`
623
623
  vec2 focal = vec2(u_highp[\${t}][1], 0.0);
624
624
 
625
625
  vec2 dir = normalize(coord - focal);
@@ -629,18 +629,18 @@ void main() {
629
629
  float c = dot(focal, focal) - 1.0;
630
630
  float x = (-b + sqrt(b * b - 4.0 * a * c)) / (2.0 * a);
631
631
 
632
- float t = distance(focal, coord) / distance(focal, focal + dir * x);\`,Xa=()=>"float t = length(coord);",_a=(t,e)=>{const s=e?Da(t):Xa();return\`
632
+ float t = distance(focal, coord) / distance(focal, focal + dir * x);\`,Ga=()=>"float t = length(coord);",za=(t,e)=>{const s=e?Ya(t):Ga();return\`
633
633
  float radius = u_highp[\${t}][0];
634
634
  vec2 coord = p / radius;
635
635
  \${s}
636
- \`},Ya=t=>\`
636
+ \`},Va=t=>\`
637
637
  vec2 a = u_highp[\${t}].xy;
638
638
  vec2 b = u_highp[\${t}].zw;
639
639
 
640
640
  vec2 ab = b - a;
641
641
  vec2 ap = p - a;
642
642
 
643
- float t = dot(ab, ap) / dot(ab, ab);\`,Ga=(t,e,s,n,o)=>{const r=s?_a(e,n):Ya(e);let a;switch(o){case 0:a="1.0 - abs(fract(t * 0.5) * 2.0 - 1.0)";break;case 1:a="fract(t)";break;default:a="clamp(t, 0.0, 1.0)";break}return\`#version 300 es
643
+ float t = dot(ab, ap) / dot(ab, ab);\`,Wa=(t,e,s,n,o)=>{const r=s?za(e,n):Va(e);let a;switch(o){case 0:a="1.0 - abs(fract(t * 0.5) * 2.0 - 1.0)";break;case 1:a="fract(t)";break;default:a="clamp(t, 0.0, 1.0)";break}return\`#version 300 es
644
644
  precision highp float;
645
645
 
646
646
  uniform sampler2D u_texture;
@@ -654,15 +654,15 @@ void main() {
654
654
  \${r}
655
655
  t = \${a};
656
656
  o_color = texture(u_texture, vec2(t, 0.5));
657
- }\`},Sc=(t,e,s,n)=>{const o=Pa(n,t,e,s);if(Je.has(o))return Je.get(o);const r=(n?14:5)+1,a=r-1,l=new Z(Re(r,!0,!1,n),Ga(r,a,t,e,s));return Je.set(o,l),l},wc=(t,e,s,n,o=0,r=null,a=null)=>{const l=t.highp;l[0]=s[0],l[1]=s[1],l[2]=s[2],l[4]=s[3],l[5]=s[4],l[6]=s[5],l[8]=s[6],l[9]=s[7],l[10]=s[8],l[12]=n[0],l[13]=n[1],l[14]=n[2],l[16]=n[3],l[17]=n[4],l[18]=n[5],l[11]=n[6],l[15]=n[7],l[19]=n[8],l[3]=it(),l[7]=ut();let h=20;a&&(l[20]=a[0],l[21]=a[1],l[22]=0,l[24]=a[2],l[25]=a[3],l[26]=0,l[28]=a[4],l[29]=a[5],l[30]=1,l[32]=a[6],l[33]=a[7],l[34]=0,l[36]=a[8],l[37]=a[9],l[38]=0,l[40]=a[10],l[41]=a[11],l[42]=1,l[31]=a[12],l[35]=a[13],l[39]=a[14],l[43]=a[15],l[44]=a[16],l[45]=a[17],l[46]=a[18],l[47]=a[19],l[48]=a[20],l[49]=a[21],l[50]=a[22],l[51]=a[23],l[52]=a[24],l[53]=a[25],h=56),e===0?(l[h++]=r[0],l[h++]=r[1],l[h++]=r[2],l[h]=r[3]):(l[h++]=819.2,l[h]=Ht(o,-.975,.975,0))},Va=(t,e,s,n)=>{const o=tt.shift(),r=tt.shift(),a=tt.shift(),l=tt.shift();c.disable(c.STENCIL_TEST);const h=dc(o,l);V(h),c.enable(c.STENCIL_TEST),c.frontFace(c.CCW),c.stencilMask(255),c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const f=!!n,i=ae(f);n&&le(i,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(i,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0);const E=Sc(!1,!1,a,f),$=_c(r),v=Se(A.$matrix);wc(E,0,A.$matrix,v,0,$,n),As($),Kt(v),nt(E,t,e,s)},za=(t,e,s,n)=>{const o=tt.shift(),r=tt.shift(),a=tt.shift(),l=tt.shift(),h=tt.shift();c.disable(c.STENCIL_TEST);const f=dc(o,l);V(f),c.enable(c.STENCIL_TEST),c.frontFace(c.CCW),c.stencilMask(255),c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const i=!!n,E=ae(i);n&&le(E,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(E,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0),A.save(),A.transform(r[0],r[1],r[2],r[3],r[4],r[5]);const $=A.$stack[A.$stack.length-1],v=Se(A.$matrix),T=Sc(!0,!!h,a,i);wc(T,1,$,v,h,n),A.restore(),Kt(v),nt(T,t,e,s)},qe=new Map,Wa=(t,e)=>{const s=\`b\${t?"y":"n"}\${e?"y":"n"}\`;if(qe.has(s))return qe.get(s);const n=t?Fo():Oo(),o=new Z(Re(e?14:5,!0,!1,e),n);return qe.set(s,o),o},ja=(t,e,s,n)=>{const o=t.highp,r=A.$stack[A.$stack.length-1];o[0]=r[0],o[1]=r[1],o[2]=r[2],o[4]=r[3],o[5]=r[4],o[6]=r[5],o[8]=r[6],o[9]=r[7],o[10]=r[8];const a=Se(A.$matrix);o[12]=a[0],o[13]=a[1],o[14]=a[2],o[16]=a[3],o[17]=a[4],o[18]=a[5],o[11]=a[6],o[15]=a[7],o[19]=a[8],o[3]=it(),o[7]=ut(),n&&(o[20]=n[0],o[21]=n[1],o[22]=0,o[24]=n[2],o[25]=n[3],o[26]=0,o[28]=n[4],o[29]=n[5],o[30]=1,o[32]=n[6],o[33]=n[7],o[34]=0,o[36]=n[8],o[37]=n[9],o[38]=0,o[40]=n[10],o[41]=n[11],o[42]=1,o[31]=n[12],o[35]=n[13],o[39]=n[14],o[43]=n[15],o[44]=n[16],o[45]=n[17],o[46]=n[18],o[47]=n[19],o[48]=n[20],o[49]=n[21],o[50]=n[22],o[51]=n[23],o[52]=n[24],o[53]=n[25]);const l=t.mediump;l[0]=e,l[1]=s},Ha=(t,e,s,n)=>{c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const o=!!n,r=ae(o);n&&le(r,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(r,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE);const a=Rt.shift(),l=Rt.shift(),h=Rt.shift(),f=Rt.shift(),i=Rt.shift(),E=Rt.shift(),$=He(h,f,a,E);A.save(),A.transform(l[0],l[1],l[2],l[3],l[4],l[5]),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0);const v=Wa(i,o);ja(v,h,f,n),nt(v,t,e,s),A.restore(),D($)},Ka=()=>{const t=Js();c.enable(c.STENCIL_TEST),c.frontFace(c.CCW),c.stencilMask(255);let e=0,s=null;for(let n=0;n<bt.length;n++)switch(Dt.has(n)&&(s=Dt.get(n)),bt[n]){case"fill":{const r=q.shift();Na(t,e,r,s),e+=r}break;case"linear":{const r=q.shift();Va(t,e,r,s),e+=r}break;case"radial":{const r=q.shift();za(t,e,r,s),e+=r}break;case"bitmap":{const r=q.shift();Ha(t,e,r,s),e+=r}break}c.disable(c.STENCIL_TEST),qs(t),zs(),Zs()};let ts=0;const Bc=new Float32Array(256);for(let t=1;t<256;t++)Bc[t]=255/t;const Za=async(t,e)=>{const s=fc(0,0,t,e);V(s),c.bindFramebuffer(c.FRAMEBUFFER,rn()),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,s.resource,0);const n=new Uint8Array(t*e*4),o=A.$mainAttachmentObject;n.byteLength>ts&&(ts=fe(n.byteLength),c.bufferData(c.PIXEL_PACK_BUFFER,ts,c.STREAM_READ)),c.readPixels(0,o.height-e,t,e,c.RGBA,c.UNSIGNED_BYTE,0);const r=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);await new Promise(a=>{const l=()=>{if(c.clientWaitSync(r,c.SYNC_FLUSH_COMMANDS_BIT,0)===c.TIMEOUT_EXPIRED){requestAnimationFrame(l);return}return c.deleteSync(r),c.getBufferSubData(c.PIXEL_PACK_BUFFER,0,n),a()};l()}),c.bindFramebuffer(c.FRAMEBUFFER,ft);for(let a=0;a<n.length;a+=4){const l=n[a+3];if(l===0||l===255)continue;const h=Bc[l];n[a]=Math.min(255,Math.round(n[a]*h)),n[a+1]=Math.min(255,Math.round(n[a+1]*h)),n[a+2]=Math.min(255,Math.round(n[a+2]*h))}return await createImageBitmap(new ImageData(new Uint8ClampedArray(n),t,e),{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"})};class Qa{$stack;$matrix;$clearColorR;$clearColorG;$clearColorB;$clearColorA;$mainAttachmentObject;$stackAttachmentObject;globalAlpha;globalCompositeOperation;imageSmoothingEnabled;$fillStyle;$strokeStyle;maskBounds;thickness;caps;joints;miterLimit;constructor(e,s,n=1){Nc(e),Cc(e.getParameter(e.MAX_TEXTURE_SIZE)),kc(s),Yc(n),this.$stack=he(),this.$stackAttachmentObject=he(),this.$matrix=de(1,0,0,0,1,0,0,0,1),this.$clearColorR=0,this.$clearColorG=0,this.$clearColorB=0,this.$clearColorA=0,this.thickness=1,this.caps=1,this.joints=2,this.miterLimit=0,this.$mainAttachmentObject=null,this.globalAlpha=1,this.globalCompositeOperation="normal",this.imageSmoothingEnabled=!1,this.$fillStyle=new Float32Array([1,1,1,1]),this.$strokeStyle=new Float32Array([1,1,1,1]),this.maskBounds={xMin:0,yMin:0,xMax:0,yMax:0},e.pixelStorei(e.UNPACK_ALIGNMENT,1),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),en(e),sn(e),cn(e,Ps()),nn(e),ir(e),hr(),Qr(e),Uc(this)}clearTransferBounds(){pn()}updateBackgroundColor(e,s,n,o){Qc(this,e,s,n,o)}fillBackgroundColor(){Jc(this.$clearColorR,this.$clearColorG,this.$clearColorB,this.$clearColorA)}resize(e,s,n=!0){On(this,e,s,n)}clearRect(e,s,n,o){Fn(e,s,n,o)}bind(e){wn(this,e)}save(){Bn(this)}restore(){In(this)}setTransform(e,s,n,o,r,a){Ln(this.$matrix,e,s,n,o,r,a)}transform(e,s,n,o,r,a){Cn(this,e,s,n,o,r,a)}reset(){kn(this)}beginPath(){Nn(this),zc()}moveTo(e,s){be(e,s)}lineTo(e,s){jc(e,s)}quadraticCurveTo(e,s,n,o){gs(e,s,n,o)}fillStyle(e,s,n,o){this.$fillStyle[0]=e,this.$fillStyle[1]=s,this.$fillStyle[2]=n,this.$fillStyle[3]=o}strokeStyle(e,s,n,o){this.$strokeStyle[0]=e,this.$strokeStyle[1]=s,this.$strokeStyle[2]=n,this.$strokeStyle[3]=o}closePath(){Hc()}arc(e,s,n){Zc(e,s,n)}bezierCurveTo(e,s,n,o,r,a){Jt(e,s,n,o,r,a)}fill(){Gn("fill")}gradientFill(e,s,n,o,r,a){Vn(e,s,n,o,r,a)}bitmapFill(e,s,n,o,r,a){xr(e,s,n,o,r,a)}stroke(){Mr()}gradientStroke(e,s,n,o,r,a){so(e,s,n,o,r,a)}bitmapStroke(e,s,n,o,r,a){vr(e,s,n,o,r,a)}clip(){Io()}get currentAttachmentObject(){return ds()}get atlasAttachmentObject(){return gn()}createNode(e,s){return oc(e,s)}removeNode(e){No(e)}beginNodeRendering(e){Ia(e),Un(e.x,e.y,e.w,e.h)}endNodeRendering(){Pn()}drawFill(){Ka()}drawDisplayObject(e,s,n,o,r,a){La(e),tr(e,s,n,o,r,a)}drawArraysInstanced(){ar()}clearArraysInstanced(){er()}transferMainCanvas(){ur()}drawPixels(e,s){Er(e,s)}drawElement(e,s){Ar(e,s)}beginMask(){fr()}setMaskBounds(e,s,n,o){br(e,s,n,o)}endMask(){ke()}leaveMask(){this.drawArraysInstanced(),$r()}useGrid(e){co(e)}applyFilter(e,s,n,o,r,a,l,h,f,i,E){this.drawArraysInstanced(),Ba(e,s,n,o,r,a,l,h,f,i,E)}async createImageBitmap(e,s){return await Za(e,s)}}const Ja=4;let x;const qa=t=>{x=t};let es;const tl=t=>{es=t};let ss=0;const el=()=>ss;let cs=0;const sl=()=>cs;let ns=!1;const cl=(t,e)=>{ns=!0,ss=t,cs=e},nl=()=>ns,ol=()=>{es.width=ss,es.height=cs,ns=!1},rl=[],Ic=(...t)=>{const e=rl.pop()||[];return t.length&&e.push(...t),e},zt=(t,e=1)=>({R:(t&16711680)>>16,G:(t&65280)>>8,B:t&255,A:e*255}),al=(t,e)=>{tl(t);const s=t.getContext("webgl2",{stencil:!0,premultipliedAlpha:!0,antialias:!1,depth:!1});if(!s)throw new Error("webgl2 is not supported.");qa(new Qa(s,Ja,e))},ll=(t,e,s=!0)=>{el()===t&&sl()===e||(cl(t,e),x.resize(t,e,s),s&&_.reset())},il=0,ul=1,hl=2,fl=3,bl=4,$l=5,El=6,Tl=7,Al=8,xl=9,vl=10,Ml=11,yl=12,Rl=13,gl=14,os=(t,e=!1)=>{let s=0;for(;t.length>s;)switch(t[s++]){case xl:x.beginPath();break;case il:x.moveTo(t[s++],t[s++]);break;case hl:x.lineTo(t[s++],t[s++]);break;case ul:x.quadraticCurveTo(t[s++],t[s++],t[s++],t[s++]);break;case $l:if(e){s+=4;break}x.fillStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case Tl:x.fill();break;case El:if(e){s+=8;break}x.thickness=t[s++],x.caps=t[s++],x.joints=t[s++],x.miterLimit=t[s++],x.strokeStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case Al:if(e)break;x.stroke();break;case yl:x.closePath();break;case bl:x.arc(t[s++],t[s++],t[s++]);break;case fl:x.bezierCurveTo(t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]);break;case vl:{if(e){s+=1;const i=t[s++];s+=i*5,s+=9,x.fill();break}const n=t[s++],o=Ic(),r=t[s++];for(let i=0;i<r;++i)o.push(t[s++],t[s++],t[s++],t[s++],t[s++]);const a=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]),l=t[s++],h=t[s++],f=t[s++];x.gradientFill(n,o,a,l,h,f)}break;case Rl:{if(e){s+=2;const h=t[s++];s+=h,s+=8,x.fill();break}const n=t[s++],o=t[s++],r=t[s++],a=new Uint8Array(t.subarray(s,s+r));s+=r;const l=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]);x.bitmapFill(a,l,n,o,!!t[s++],!!t[s++])}break;case Ml:{if(e){s+=20,x.fill();break}x.thickness=t[s++],x.caps=t[s++],x.joints=t[s++],x.miterLimit=t[s++];const n=t[s++],o=Ic(),r=t[s++];for(let i=0;i<r;++i)o.push(t[s++],t[s++],t[s++],t[s++],t[s++]);const a=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]),l=t[s++],h=t[s++],f=t[s++];x.gradientStroke(n,o,a,l,h,f)}break;case gl:{if(e){s+=6;const h=t[s++];s+=h,s+=8,x.fill();break}x.thickness=t[s++],x.caps=t[s++],x.joints=t[s++],x.miterLimit=t[s++];const n=t[s++],o=t[s++],r=t[s++],a=new Uint8Array(t.subarray(s,s+r));s+=r;const l=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]);x.bitmapStroke(a,l,n,o,!!t[s++],!!t[s++])}break}},Wt=t=>{switch(t){case 0:return"copy";case 1:return"add";case 2:return"alpha";case 3:return"darken";case 4:return"difference";case 5:return"erase";case 6:return"hardlight";case 7:return"invert";case 8:return"layer";case 9:return"lighten";case 10:return"multiply";case 11:return"normal";case 12:return"overlay";case 13:return"screen";case 14:return"subtract";default:return"normal"}},rs=(t,e)=>{const s=t.subarray(e,e+6);e+=6;const n=t.subarray(e,e+8);e+=8;const o=t.subarray(e,e+4);e+=4;const r=t[e++],a=t[e++],l=t[e++],h=t[e++],f=!!t[e++],i=!!t[e++],E=!!t[e++],$=\`\${t[e++]}\`,v=t[e++],T=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(s[2]*s[2]+s[3]*s[3]);let g;if(t[e++]){if(g=_.get($,\`\${v}\`),!g)return e}else{const O=f?new Float32Array(28):null;O&&(O.set(t.subarray(e,e+24)),e+=24),x.useGrid(O);const y=t[e++],M=t.subarray(e,e+y);if(E&&!f){const S=Math.ceil(Math.abs(l-r)),w=Math.ceil(Math.abs(h-a));g=x.createNode(S,w),_.set($,\`\${v}\`,g);const m=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(g);const p=x.atlasAttachmentObject.height-g.y-w;x.setTransform(1,0,0,1,g.x,p),i?(os(M),x.drawFill()):x.drawPixels(g,new Uint8Array(M)),x.endNodeRendering(),m&&x.bind(m)}else{const S=Math.ceil(Math.abs(l-r)*T),w=Math.ceil(Math.abs(h-a)*u);g=x.createNode(S,w),_.set($,\`\${v}\`,g);const m=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(g);const p=x.atlasAttachmentObject.height-g.y-w;x.setTransform(T,0,0,u,-r*T+g.x,-a*u+p),O&&(O[24]=g.x,O[25]=p),os(M),x.drawFill(),x.endNodeRendering(),m&&x.bind(m)}e+=y}const d=t[e++];if(!!t[e++]){const O=!!t[e++],y=t.subarray(e,e+4);e+=4;const M=t[e++],S=t.subarray(e,e+M),w=Math.ceil(Math.abs(o[2]-o[0])),m=Math.ceil(Math.abs(o[3]-o[1]));return x.applyFilter(g,$,O,w,m,E,s,n,Wt(d),y,S),e+=M,e}if(x.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),x.imageSmoothingEnabled=!0,x.globalCompositeOperation=Wt(d),E&&!f)x.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),x.drawDisplayObject(g,o[0],o[1],o[2],o[3],n);else{const O=Math.atan2(s[1],s[0]),y=Math.atan2(-s[2],s[3]);if(O||y){const M=r*T,S=a*u,w=Math.cos(O),m=Math.sin(O),p=Math.cos(y),R=Math.sin(y);x.setTransform(w,m,-R,p,M*w-S*R+s[4],M*m+S*p+s[5])}else x.setTransform(1,0,0,1,o[0],o[1]);x.drawDisplayObject(g,o[0],o[1],o[2],o[3],n)}return e},as=(t,e)=>{const s=t.subarray(e,e+6);e+=6,x.reset(),x.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]);const o=!!t[e++]?new Float32Array(28):null;x.useGrid(o),o&&(o.set(t.subarray(e,e+24)),e+=24);const r=t[e++],a=t.subarray(e,e+r);return os(a,!0),e+=r,x.clip(),e},Lc=(t,e,s)=>{const n=t.widthTable[e.line]||0,o=e.textFormat,r=o.leftMargin||0;if(!s.wordWrap&&n>s.rawWidth)return Math.max(0,r);const a=o.rightMargin||0;return o.align==="center"||s.autoSize==="center"?Math.max(0,s.rawWidth/2-r-a-n/2-2):o.align==="right"||s.autoSize==="right"?Math.max(0,s.rawWidth-r-n-a-4):Math.max(0,r)},pl=t=>{let e="";return t.italic&&(e+="italic "),t.bold&&(e+="bold "),\`\${e}\${t.size}px '\${t.font}','sans-serif'\`},ml=(t,e,s,n)=>{const o=new OffscreenCanvas(e.width,e.height),r=o.getContext("2d");if(!r)return o;const a=Math.min(1,Math.max(s,n));if(e.background||e.border){if(r.beginPath(),r.moveTo(0,0),r.lineTo(e.width,0),r.lineTo(e.width,e.height),r.lineTo(0,e.height),r.lineTo(0,0),e.background){const y=zt(e.backgroundColor);r.fillStyle=\`rgba(\${y.R},\${y.G},\${y.B},\${y.A})\`,r.fill()}if(e.border){const y=zt(e.borderColor);r.lineWidth=a,r.strokeStyle=\`rgba(\${y.R},\${y.G},\${y.B},\${y.A})\`,r.stroke()}}if(!t)return o;r.save(),r.beginPath(),r.moveTo(2,2),r.lineTo(e.width-2,2),r.lineTo(e.width-2,e.height-2),r.lineTo(2,e.height-2),r.lineTo(2,2),r.clip();let l=2;if(e.scrollX>0){const y=(e.textWidth+4-e.rawWidth)/e.rawWidth;l+=-e.scrollX*y}let h=2;if(e.scrollY>0){const y=(e.textHeight+2-e.rawHeight)/e.rawHeight;h+=-e.scrollY*y}if(r.setTransform(s,0,0,n,l*s,h*n),r.beginPath(),e.selectIndex>-1&&e.focusIndex>-1){const y=t.textTable.length-1;let M=0,S=0;e.focusIndex<=e.selectIndex?(M=Math.min(e.focusIndex,y),S=Math.min(e.selectIndex,y)):(M=Math.min(e.selectIndex,y),S=Math.min(e.focusIndex-1,y));const w=t.textTable[M],m=t.lineTable[w.line],p=Lc(t,m,e);let R=0;if(M&&w.mode==="text"){let b=M;for(;b;){const C=t.textTable[--b];if(C.mode!=="text")break;R+=C.w}}r.fillStyle="#b4d7ff";let B=0;for(let b=M;b<=S;++b){const C=t.textTable[b];if(C.mode==="text"&&(B+=C.w,b!==S))continue;let N=0;const U=C.mode==="text"?C.line:C.line-1;for(let k=0;k<U;++k)N+=t.heightTable[k];r.beginPath(),r.rect(R,N,B+p,t.heightTable[U]),r.fill(),R=0,B=0}}const f=e.rawWidth;let i=0;if(e.scrollX>0){const y=(e.textWidth-f)/f;i=e.scrollX*y}const E=f+i,$=e.rawHeight;let v=0;if(e.scrollY>0){const y=(e.textHeight-$)/$;v=e.scrollY*y}const T=$+v;let u=0,g=0,I=0,d=0,L=!1,O=-1;for(let y=0;y<t.textTable.length;++y){const M=t.textTable[y];if(!M)continue;if((M.mode==="text"||M.mode==="break")&&(O++,e.stopIndex>-1&&O>e.stopIndex))break;if(L&&M.mode==="text")continue;const S=M.textFormat;if(e.autoSize==="none"){if(g>T)break;if(M.mode==="text"&&(i>u+M.w||u>E)){u+=M.w;continue}}const w=zt(S.color||0);if(r.fillStyle=\`rgba(\${w.R},\${w.G},\${w.B},\${w.A})\`,e.focusVisible&&e.focusIndex===y){const p=u+I+.1;let R=M.line,B=M.y,b=t.ascentTable[R];M.mode!=="text"&&(B=M.mode==="break"?M.h:t.ascentTable[R-1],R>0?(R=M.line-1,b=t.ascentTable[R]):b=M.h),R>0&&t.ascentTable[R]===0&&R++;for(let C=0;C<R;++C)b+=t.heightTable[C];r.strokeStyle=\`rgba(\${w.R},\${w.G},\${w.B},\${w.A})\`,r.beginPath(),r.moveTo(p,b),r.lineTo(p,b-B),r.stroke()}if(e.thickness){const p=zt(e.thicknessColor);r.lineWidth=e.thickness,r.strokeStyle=\`rgba(\${p.R},\${p.G},\${p.B},\${p.A})\`}const m=M.line|0;switch(M.mode){case"break":case"wrap":if(u=0,m&&(g+=t.heightTable[m-1]),v>g+t.heightTable[m]){L=!0;continue}d=t.ascentTable[m],I=Lc(t,M,e),L=!1;break;case"text":{r.beginPath(),r.font=pl(S);const p=u+I,R=g+d;if(S.underline){const B=zt(S.color||0);r.lineWidth=a,r.strokeStyle=\`rgba(\${B.R},\${B.G},\${B.B},\${B.A})\`,r.beginPath(),r.moveTo(p,R+2),r.lineTo(p+M.w,R+2),r.stroke()}e.thickness&&r.strokeText(M.text,p,R),r.fillText(M.text,p,R),u+=M.w}break}}if(e.focusVisible&&e.focusIndex>=t.textTable.length){const y=t.textTable[e.focusIndex-1];if(y){const M=zt(y.textFormat.color||0);r.strokeStyle=\`rgba(\${M.R},\${M.G},\${M.B},\${M.A})\`;const S=u+I+.1,w=g+d;r.beginPath(),y.mode==="text"?r.moveTo(S,w-y.y):r.moveTo(S,w+y.h),r.lineTo(S,w),r.stroke()}}return r.restore(),o},Ol=new TextDecoder,ls=(t,e)=>{const s=t.subarray(e,e+6);e+=6;const n=t.subarray(e,e+8);e+=8;const o=t.subarray(e,e+4);e+=4;const r=t[e++],a=t[e++],l=t[e++],h=t[e++],f=\`\${t[e++]}\`,i=t[e++],E=!!t[e++],$=Math.sqrt(s[0]*s[0]+s[1]*s[1]),v=Math.sqrt(s[2]*s[2]+s[3]*s[3]);let T;if(t[e++]){if(T=_.get(f,\`\${i}\`),!T)return e}else{const O=Math.ceil(Math.abs(l-r)*$),y=Math.ceil(Math.abs(h-a)*v),M=!!t[e++];T=M?_.get(f,\`\${i}\`):x.createNode(O,y),M||_.set(f,\`\${i}\`,T);const S=t[e++],w=new Uint8Array(t.subarray(e,e+S));e+=S;let m="none";switch(t[e++]){case 0:m="center";break;case 1:m="left";break;case 2:m="none";break;case 3:m="right";break}const p={width:O,height:y,autoSize:m,stopIndex:t[e++],scrollX:t[e++],scrollY:t[e++],textWidth:t[e++],textHeight:t[e++],rawWidth:t[e++],rawHeight:t[e++],focusIndex:t[e++],selectIndex:t[e++],focusVisible:!!t[e++],thickness:t[e++],thicknessColor:t[e++],wordWrap:!!t[e++],border:!!t[e++],borderColor:t[e++],background:!!t[e++],backgroundColor:t[e++],defaultColor:t[e++],defaultSize:t[e++]},R=ml(JSON.parse(Ol.decode(w)),p,$,v),B=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(T);const b=x.atlasAttachmentObject.height-T.y-y;x.setTransform(1,0,0,1,T.x,b),x.drawElement(T,R),x.endNodeRendering(),B&&x.bind(B)}const g=t[e++];if(!!t[e++]){const O=!!t[e++],y=t.subarray(e,e+4);e+=4;const M=t[e++],S=t.subarray(e,e+M),w=Math.ceil(Math.abs(o[2]-o[0])),m=Math.ceil(Math.abs(o[3]-o[1]));return x.applyFilter(T,f,!!Math.max(+E,+O),w,m,!1,s,n,Wt(g),y,S),e+=M,e}x.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),x.imageSmoothingEnabled=!0,x.globalCompositeOperation=Wt(g);const d=Math.atan2(s[1],s[0]),L=Math.atan2(-s[2],s[3]);if(d||L){const O=r*$,y=a*v,M=Math.cos(d),S=Math.sin(d),w=Math.cos(L),m=Math.sin(L);x.setTransform(M,S,-m,w,O*M-y*m+s[4],O*S+y*w+s[5])}else x.setTransform(1,0,0,1,o[0],o[1]);return x.drawDisplayObject(T,o[0],o[1],o[2],o[3],n),e},is=(t,e,s)=>{const n=t.subarray(e,e+6);e+=6;const o=t.subarray(e,e+8);e+=8;const r=t.subarray(e,e+4);e+=4;const a=t[e++],l=t[e++],h=t[e++],f=t[e++],i=\`\${t[e++]}\`,E="0",$=!!t[e++];let v;if(t[e++]){if(v=_.get(i,\`\${E}\`),!v)return e}else{const I=Math.abs(h-a),d=Math.abs(f-l),L=!!t[e++];if(v=L?_.get(i,\`\${E}\`):x.createNode(I,d),L||_.set(i,\`\${E}\`,v),s&&s.length){const O=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(v);const y=x.atlasAttachmentObject.height-v.y-d;x.setTransform(1,0,0,1,v.x,y);const M=s.shift();x.drawElement(v,M),x.endNodeRendering(),O&&x.bind(O)}}const u=t[e++];if(!!t[e++]){const I=!!t[e++],d=t.subarray(e,e+4);e+=4;const L=t[e++],O=t.subarray(e,e+L),y=Math.ceil(Math.abs(r[2]-r[0])),M=Math.ceil(Math.abs(r[3]-r[1]));return x.applyFilter(v,i,!!Math.max(+$,+I),y,M,!0,n,o,Wt(u),d,O),e+=L,e}return x.globalAlpha=Math.min(Math.max(0,o[3]+o[7]/255),1),x.imageSmoothingEnabled=!0,x.globalCompositeOperation=Wt(u),x.setTransform(n[0],n[1],n[2],n[3],n[4],n[5]),x.drawDisplayObject(v,r[0],r[1],r[2],r[3],o),e},us=(t,e)=>{const s=t[e++];for(let n=0;n<s;++n)switch(t[e++]){case 0:e=us(t,e);break;case 1:e=as(t,e);break}return e},hs=(t,e,s)=>{const n=!!t[e++];if(n){switch(x.drawArraysInstanced(),x.save(),x.beginMask(),x.setMaskBounds(t[e++],t[e++],t[e++],t[e++]),t[e++]){case 0:e=us(t,e);break;case 1:e=as(t,e);break}x.endMask()}let o=0,r=!0;const a=t[e++];for(let l=0;a>l;l++){const h=t[e++],f=t[e++];if(o&&h>o&&(r&&(x.restore(),x.leaveMask()),o=0,r=!0),!r)continue;if(f){if(o=f,r=!!t[e++],!r)continue;switch(x.drawArraysInstanced(),x.save(),x.beginMask(),x.setMaskBounds(t[e++],t[e++],t[e++],t[e++]),t[e++]){case 0:e=us(t,e);break;case 1:e=as(t,e);break}x.endMask();continue}if(!t[e++])continue;const i=t[e++];switch(i){case 0:e=hs(t,e,s);break;case 1:e=rs(t,e);break;case 2:e=ls(t,e);break;case 3:e=is(t,e,s);break;default:console.error("unknown type",i);break}}return(o||n)&&(x.restore(),x.leaveMask()),e};let jt=-1;const Fl=(t,e)=>{x.clearTransferBounds();let s=0;const n=t[s++];for(jt!==n&&(jt=n,jt===-1?x.updateBackgroundColor(0,0,0,0):x.updateBackgroundColor((jt>>16&255)/255,(jt>>8&255)/255,(jt&255)/255,1)),x.reset(),x.setTransform(1,0,0,1,0,0),x.fillBackgroundColor();t.length>s;){if(!t[s++])continue;const o=t[s++];switch(o){case 0:s=hs(t,s,e);break;case 1:s=rs(t,s);break;case 2:s=ls(t,s);break;case 3:s=is(t,s,e);break;default:console.error("unknown type",o);break}}x.drawArraysInstanced(),nl()&&ol(),x.transferMainCanvas()},dl=t=>{for(let e=0;e<t.length;++e){const s=\`\${t[e]}\`;if(!_.has(s))continue;const n=_.getById(s);for(const o of n.values())x.removeNode(o);_.removeById(s)}},Sl=async(t,e,s,n=0,o=0,r)=>{x.clearTransferBounds();let a=1;for(x.reset(),x.setTransform(1,0,0,1,0,0),x.updateBackgroundColor((n>>16&255)/255,(n>>8&255)/255,(n&255)/255,o),x.fillBackgroundColor();t.length>a;){if(!t[a++])continue;const l=t[a++];switch(l){case 0:a=hs(t,a,r);break;case 1:a=rs(t,a);break;case 2:a=ls(t,a);break;case 3:a=is(t,a,r);break;default:console.error("unknown type",l);break}}return x.drawArraysInstanced(),await x.createImageBitmap(e,s)};class wl{state;queue;constructor(){this.state="deactivate",this.queue=[]}async execute(){for(this.state="active";this.queue.length;){const e=this.queue.shift();if(e)switch(e.command){case"render":Fl(e.buffer.subarray(0,e.length),e.imageBitmaps),globalThis.postMessage({message:"render",buffer:e.buffer},[e.buffer.buffer]);break;case"resize":ll(e.buffer[0],e.buffer[1],!!e.buffer[2]);break;case"initialize":al(e.canvas,e.devicePixelRatio);break;case"removeCache":dl(e.buffer);break;case"cacheClear":_.reset();break;case"capture":{const s=await Sl(e.buffer.subarray(0,e.length),e.width,e.height,e.bgColor,e.bgAlpha,e.imageBitmaps);globalThis.postMessage({message:"capture",buffer:e.buffer,imageBitmap:s},[e.buffer.buffer,s])}break}}this.state="deactivate"}}const fs=new wl;self.addEventListener("message",async t=>{fs.queue.push(t.data),fs.state==="deactivate"&&await fs.execute()})})();
658
- `,As=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",cn],{type:"text/javascript;charset=utf-8"});function Cr(e){let t;try{if(t=As&&(self.URL||self.webkitURL).createObjectURL(As),!t)throw"";const u=new Worker(t,{name:e?.name});return u.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),u}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(cn),{name:e?.name})}}const we=new Cr,Nr=e=>{const t=e.transferControlToOffscreen();we.postMessage({command:"initialize",canvas:t,devicePixelRatio:window.devicePixelRatio},[t])};class We{static get AT_TARGET(){return 2}static get BUBBLING_PHASE(){return 3}static get CAPTURING_PHASE(){return 1}}let m=class{type;bubbles;listener;target;currentTarget;eventPhase;_$stopImmediatePropagation;_$stopPropagation;constructor(t,u=!1){this.type=`${t}`,this.bubbles=u,this.target=null,this.currentTarget=null,this.eventPhase=We.AT_TARGET,this.listener=null,this._$stopImmediatePropagation=!1,this._$stopPropagation=!1}static get ADDED(){return"added"}static get ADDED_TO_STAGE(){return"addedToStage"}static get CHANGE(){return"change"}static get COMPLETE(){return"complete"}static get ENDED(){return"ended"}static get ENTER_FRAME(){return"enterFrame"}static get FRAME_LABEL(){return"frameLabel"}static get INPUT(){return"input"}static get OPEN(){return"open"}static get REMOVED(){return"removed"}static get REMOVED_FROM_STAGE(){return"removedFromStage"}static get RESIZE(){return"resize"}static get SCROLL(){return"scroll"}stopImmediatePropagation(){this._$stopImmediatePropagation=!0}stopPropagation(){this._$stopPropagation=!0}};const W=new Map,Nt=[],Pt=()=>Nt.length?Nt.pop():[],Ie=e=>{10>Nt.length&&(e.length=0,Nt.push(e))};let on=null;const Ue=e=>{on=e},Yt=()=>on;class B extends m{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Yt();if(r)switch(r.type){case B.KEY_DOWN:case B.KEY_UP:return n in r?$event[n]:void 0;default:return}}})}static get KEY_DOWN(){return"keydown"}static get KEY_UP(){return"keyup"}}const Pr=(e,t,u,s=!1,n=0)=>{let r;switch(t){case m.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:(!W.size||!W.has(t))&&W.set(t,Pt()),r=W.get(t);break;default:e._$events||(e._$events=new Map),(!e._$events.size||!e._$events.has(t))&&e._$events.set(t,Pt()),r=e._$events.get(t);break}const a=r.length;let i=0;for(;i<a;++i){const c=r[i];if(s===c.useCapture&&c.target===e&&c.listener===u)break}if(a===i)r.push({listener:u,priority:n,useCapture:s,target:e});else{const c=r[i];c.listener=u,c.priority=n,c.useCapture=s,c.target=e}r.length>1&&r.sort((c,o)=>{switch(!0){case c.priority>o.priority:return-1;case c.priority<o.priority:return 1;default:return 0}})},Br=(e,t)=>{switch(t){case m.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:return!!(W.size&&W.has(t));default:return!!(e._$events&&e._$events.size&&e._$events.has(t))}},Dr=(e,t,u,s=!1)=>{let n;switch(t){case m.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:if(!W.size||!W.has(t))return;n=W.get(t);break;default:if(!e._$events||!e._$events.size||!e._$events.has(t))return;n=e._$events.get(t);break}if(n){for(let r=0;r<n.length;++r){const a=n[r];if(s===a.useCapture&&a.listener===u){n.splice(r,1);break}}if(!n.length){W.has(t)&&W.delete(t),e._$events&&e._$events.has(t)&&(e._$events.delete(t),e._$events.size||(e._$events=null)),Ie(n);return}n.length>1&&n.sort((r,a)=>{switch(!0){case r.priority>a.priority:return-1;case r.priority<a.priority:return 1;default:return 0}})}},_r=(e,t,u=!1)=>{let s;switch(t){case m.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:if(!W.size||!W.has(t))return;s=W.get(t);break;default:if(!e._$events||!e._$events.size||!e._$events.has(t))return;s=e._$events.get(t);break}if(!s)return;const n=Pt();for(let r=0;r<s.length;++r){const a=s[r];u!==a.useCapture&&n.push(a)}if(!n.length){W.has(t)&&W.delete(t),e._$events&&e._$events.has(t)&&(e._$events.delete(t),e._$events.size||(e._$events=null)),Ie(n),Ie(s);return}n.length>1&&n.sort((r,a)=>{switch(!0){case r.priority>a.priority:return-1;case r.priority<a.priority:return 1;default:return 0}}),W.has(t)?W.set(t,n):e._$events?.set(t,n),Ie(s)},Ur=(e,t)=>{if(e.hasEventListener(t))return!0;if("parent"in e){let u=e.parent;for(;u;){if(u.hasEventListener(t))return!0;if(!("parent"in u))break;u=u.parent}}return!1},qr=(e,t)=>{switch(t.type){case m.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:{if(!W.size||!W.has(t.type))return!1;const u=W.get(t.type);if(!u.length)return!1;for(let s=0;s<u.length;++s){const n=u[s];t.eventPhase=We.AT_TARGET,t.target=t.currentTarget=n.target;try{t.listener=n.listener,n.listener(t)}catch(r){return console.error(r),!1}}}return!0;default:{t.target=e;let u=null;if(e._$events&&e._$events.size&&e._$events.has(t.type)){const n=e._$events.get(t.type);n&&(u=n.slice(0))}const s=Pt();if("parent"in e){let n=e.parent;for(;n;){if(n.hasEventListener(t.type)){const r=n._$events&&n._$events.has(t.type)?n._$events.get(t.type):null;r&&s.push(r)}if(!("parent"in n))break;n=n.parent}}if(!u&&!s.length)return u&&Ie(u),Ie(s),!1;if(s.length)switch(t.eventPhase=We.CAPTURING_PHASE,!0){case t._$stopImmediatePropagation:case t._$stopPropagation:break;default:for(let n=s.length-1;n>-1;--n){const r=s[n];for(let a=0;a<r.length;++a){const i=r[a];if(i.useCapture){t.currentTarget=i.target;try{t.listener=i.listener,i.listener.call(null,t)}catch(c){return console.error(c),!1}if(t._$stopImmediatePropagation)break}}if(t._$stopImmediatePropagation)break}break}if(u&&!t._$stopImmediatePropagation&&!t._$stopPropagation){t.eventPhase=We.AT_TARGET;for(let n=0;n<u.length;++n){const r=u[n];if(!r.useCapture){t.currentTarget=r.target;try{t.listener=r.listener,r.listener.call(null,t)}catch(a){return console.error(a),!1}if(t._$stopImmediatePropagation)break}}Ie(u)}if(s.length){switch(t.eventPhase=We.BUBBLING_PHASE,!0){case t._$stopImmediatePropagation:case t._$stopPropagation:case!t.bubbles:break;default:for(let n=0;n<s.length;++n){const r=s[n];for(let a=0;a<r.length;++a){const i=r[a];if(!i.useCapture){t.currentTarget=i.target;try{t.listener=i.listener,i.listener.call(null,t)}catch(c){return console.error(c),!1}if(t._$stopImmediatePropagation)break}}if(t._$stopImmediatePropagation)break}break}Ie(s)}}return!0}};class je{_$events;constructor(){this._$events=null}addEventListener(t,u,s=!1,n=0){this._$events||(this._$events=new Map),Pr(this,t,u,s,n)}dispatchEvent(t){return qr(this,t)}hasEventListener(t){return Br(this,t)}removeEventListener(t,u,s=!1){Dr(this,t,u,s)}removeAllEventListener(t,u=!1){_r(this,t,u)}willTrigger(t){return Ur(this,t)}}class De extends m{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Yt();if(r)switch(r.type){case De.FOCUS_IN:case De.FOCUS_OUT:return n in r?$event[n]:void 0;default:return}}})}static get FOCUS_IN(){return"focusin"}static get FOCUS_OUT(){return"focusout"}}class St extends m{status;responseHeaders;responseURL;constructor(t,u=!1,s=0,n="",r=[]){super(t,u),this.status=s|0,this.responseHeaders=r,this.responseURL=n}static get HTTP_STATUS(){return"httpStatus"}}class Re extends m{text;constructor(t,u=!1,s=""){super(t,u),this.text=`${s}`}static get IO_ERROR(){return"ioError"}}class w extends m{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Yt();if(r)switch(r.type){case w.POINTER_DOWN:case w.POINTER_MOVE:case w.POINTER_UP:case w.POINTER_LEAVE:case w.POINTER_OVER:case w.POINTER_OUT:return n in r?$event[n]:void 0;default:return}}})}static get DOUBLE_CLICK(){return"dblclick"}static get POINTER_DOWN(){return"pointerdown"}static get POINTER_LEAVE(){return"pointerleave"}static get POINTER_MOVE(){return"pointermove"}static get POINTER_OUT(){return"pointerout"}static get POINTER_OVER(){return"pointerover"}static get POINTER_UP(){return"pointerup"}static get POINTER_CANCEL(){return"pointercancel"}}class X extends m{bytesLoaded;bytesTotal;constructor(t,u=!1,s=0,n=0){super(t,u),this.bytesLoaded=s|0,this.bytesTotal=n|0}static get PROGRESS(){return"progress"}}class oe extends m{static get PLAY(){return"play"}static get PLAYING(){return"playing"}static get PAUSE(){return"pause"}static get SEEK(){return"seek"}}class xe extends m{static get UPDATE(){return"jobupdate"}static get STOP(){return"jobstop"}}class Ke extends m{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Yt();if(r&&r.type===Ke.WHEEL)return n in r?$event[n]:void 0}})}static get WHEEL(){return"wheel"}}const ln=[],Wt=e=>{e.size&&e.clear(),ln.push(e)},Xr=()=>ln.pop()||new Map,Vr=(e,t,u)=>{u.clear(),e.$timerId!==null&&clearTimeout(e.$timerId);for(const s of t.values()){for(const n of s.values())n&&e.destroy(n);Wt(s)}t.clear()},Yr=(e,t)=>{if(!(!t||typeof t!="object")&&"canvas"in t){const u=t.canvas,s=u.width,n=u.height;t.clearRect(0,0,s+1,n+1),u.width=u.height=1,e.push(u)}},Wr=(e,t,u)=>{if(!e.has(t))return;const s=e.get(t);s.has(u)&&(s.delete(u),s.size||(Wt(s),e.delete(t)))},Hr=(e,t,u)=>{if(!t.has(u))return;const s=t.get(u);for(const n of s.values())e.destroy(n);t.delete(u),Wt(s)},zr=(e,t,u)=>{const s=e.get(t)||null;return s?(s.delete("trash"),s.get(u)||null):null},Gr=(e,t,u,s,n=null)=>{t.has(u)||t.set(u,Xr());const r=t.get(u);if(n===null){if(!r.has(s))return;e.destroy(r.get(s)),r.delete(s),r.size||(t.delete(u),Wt(r));return}r.set(s,n)},Kr=(e,t,u="")=>u?e.has(t)?e.get(t).has(u):!1:e.has(t),Qr=(e,t,u)=>{const s=[e*100,t*100];u&&s.push(u*100);let n=2166136261;for(let r=0;r<s.length;++r){let a=s[r]|0;for(let i=0;i<4;i++){const c=a&255;n^=c,n=Math.imul(n,16777619),a>>>=8}}return(n>>>0)%16777216},Zr=(e,t,u,s)=>`${e}${t}${u}${s}`,Jr=(e,t,u,s)=>{if(u.has(s))return;const n=t.get(s);n&&(n.set("trash",!0),u.set(s,n),e.$timerId!==null&&clearTimeout(e.$timerId),e.$removeCache=!1,e.$timerId=setTimeout(()=>{e.$removeCache=!0,e.$timerId=null},1e3))},jr=(e,t)=>{if(t.size){for(const[u,s]of t)s.has("trash")&&(e.removeById(u),e.$removeIds.push(+u));t.clear(),e.$removeCache=!1}};class ea{_$pool;_$store;_$trash;$timerId;$removeCache;$removeIds;constructor(){this._$pool=[],this._$store=new Map,this._$trash=new Map,this.$timerId=null,this.$removeIds=[],this.$removeCache=!1}reset(){Vr(this,this._$store,this._$trash)}destroy(t=null){Yr(this._$pool,t)}getCanvas(){return this._$pool.pop()||document.createElement("canvas")}remove(t,u){Wr(this._$store,t,u)}removeTimer(t){Jr(this,this._$store,this._$trash,t)}removeTimerScheduledCache(){jr(this,this._$trash)}removeById(t){Hr(this,this._$store,t)}getById(t){return this._$store.get(t)}get(t,u){return zr(this._$store,t,u)}set(t,u,s=null){Gr(this,this._$store,t,u,s)}has(t,u=""){return Kr(this._$store,t,u)}generateKeys(t,u,s){return Qr(t,u,s)}generateFilterKeys(t,u,s,n){return Zr(t,u,s,n)}}const O=new ea,ta=e=>{const t=O.getCanvas();t.width=e.width,t.height=e.height;const u=t.getContext("2d",{willReadFrequently:!0});u.drawImage(e,0,0);const s=u.getImageData(0,0,e.width,e.height),n=new Uint8Array(s.data.buffer);return O.destroy(u),n},ua=e=>{const t=O.getCanvas();t.width=e.width,t.height=e.height;const u=t.getContext("2d");u.setTransform(1,0,0,1,0,0),u.drawImage(e,0,0);const s=u.getImageData(0,0,e.width,e.height),n=new Uint8Array(s.data.buffer);return O.destroy(u),n};class Ne{width;height;buffer;constructor(t=0,u=0){this.width=t|0,this.height=u|0,this.buffer=null}set image(t){if(!t){this.width=0,this.height=0,this.buffer=null;return}this.buffer=ta(t),this.width=t.width,this.height=t.height}set canvas(t){if(!t){this.width=0,this.height=0,this.buffer=null;return}this.buffer=ua(t),this.width=t.width,this.height=t.height}clone(){const t=new Ne(this.width,this.height);return this.buffer!==null&&(t.buffer=this.buffer.slice()),t}}class sa{static get ADD(){return"add"}static get ALPHA(){return"alpha"}static get DARKEN(){return"darken"}static get DIFFERENCE(){return"difference"}static get ERASE(){return"erase"}static get HARDLIGHT(){return"hardlight"}static get INVERT(){return"invert"}static get LAYER(){return"layer"}static get LIGHTEN(){return"lighten"}static get MULTIPLY(){return"multiply"}static get NORMAL(){return"normal"}static get OVERLAY(){return"overlay"}static get SCREEN(){return"screen"}static get SUBTRACT(){return"subtract"}}const V=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&V(t)},na=(e,t)=>{const u=L.multiply(e._$colorTransform,t._$colorTransform);e._$colorTransform[0]=u[0],e._$colorTransform[1]=u[1],e._$colorTransform[2]=u[2],e._$colorTransform[3]=u[3],e._$colorTransform[4]=u[4],e._$colorTransform[5]=u[5],e._$colorTransform[6]=u[6],e._$colorTransform[7]=u[7],L.release(u)},hn=[],vs=(e=1,t=0,u=0,s=1,n=0,r=0)=>{const a=hn.pop()||new Float32Array(6);return a[0]=e,a[1]=t,a[2]=u,a[3]=s,a[4]=n,a[5]=r,a},ra=e=>{hn.push(e)},dn=[],Is=(e=1,t=1,u=1,s=1,n=0,r=0,a=0,i=0)=>{const c=dn.pop()||new Float32Array(8);return c[0]=e,c[1]=t,c[2]=u,c[3]=s,c[4]=n,c[5]=r,c[6]=a,c[7]=i,c},aa=e=>{dn.push(e)},ve=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)};class L{_$colorTransform;constructor(t=1,u=1,s=1,n=1,r=0,a=0,i=0,c=0){this._$colorTransform=Is(t,u,s,n,r,a,i,c)}get rawData(){return this._$colorTransform}get alphaMultiplier(){return this._$colorTransform[3]}set alphaMultiplier(t){this._$colorTransform[3]=ve(t,0,1,1)}get alphaOffset(){return this._$colorTransform[7]}set alphaOffset(t){this._$colorTransform[7]=ve(t,-255,255,0)}get blueMultiplier(){return this._$colorTransform[2]}set blueMultiplier(t){this._$colorTransform[2]=ve(t,0,1,1)}get blueOffset(){return this._$colorTransform[6]}set blueOffset(t){this._$colorTransform[6]=ve(t,-255,255,0)}get greenMultiplier(){return this._$colorTransform[1]}set greenMultiplier(t){this._$colorTransform[1]=ve(t,0,1,1)}get greenOffset(){return this._$colorTransform[5]}set greenOffset(t){this._$colorTransform[5]=ve(t,-255,255,0)}get redMultiplier(){return this._$colorTransform[0]}set redMultiplier(t){this._$colorTransform[0]=ve(t,0,1,1)}get redOffset(){return this._$colorTransform[4]}set redOffset(t){this._$colorTransform[4]=ve(t,-255,255,0)}clone(){return new L(...this._$colorTransform)}concat(t){na(this,t)}static multiply(t,u){return Is(t[0]*u[0],t[1]*u[1],t[2]*u[2],t[3]*u[3],t[0]*u[4]+t[4],t[1]*u[5]+t[5],t[2]*u[6]+t[6],t[3]*u[7]+t[7])}static release(t){aa(t)}}const ia=e=>new A(e._$matrix[0],e._$matrix[1],e._$matrix[2],e._$matrix[3],e._$matrix[4],e._$matrix[5]),ca=(e,t)=>{const u=e._$matrix,s=t._$matrix;let n=u[0]*s[0],r=0,a=0,i=u[3]*s[3],c=u[4]*s[0]+s[4],o=u[5]*s[3]+s[5];(u[1]||u[2]||s[1]||s[2])&&(n+=u[1]*s[2],i+=u[2]*s[1],r+=u[0]*s[1]+u[1]*s[3],a+=u[2]*s[0]+u[3]*s[2],c+=u[5]*s[2],o+=u[4]*s[1]),u[0]=n,u[1]=r,u[2]=a,u[3]=i,u[4]=c,u[5]=o},oa=(e,t)=>{e._$matrix[0]=t._$matrix[0],e._$matrix[1]=t._$matrix[1],e._$matrix[2]=t._$matrix[2],e._$matrix[3]=t._$matrix[3],e._$matrix[4]=t._$matrix[4],e._$matrix[5]=t._$matrix[5]},la=(e,t,u,s=0,n=0,r=0)=>{e.identity(),e.rotate(s),e.scale(t,u),e.translate(n,r)},ha=(e,t,u,s=0,n=0,r=0)=>{const a=e._$matrix;if(a[0]=t/1638.4,a[3]=u/1638.4,s){const i=Math.cos(s),c=Math.sin(s);a[1]=c*a[3],a[2]=-c*a[0],a[0]*=i,a[3]*=i}else a[1]=0,a[2]=0;a[4]=n+t/2,a[5]=r+u/2},da=(e,t)=>new J(e.x+t.x,e.y+t.y),fa=e=>new J(e.x,e.y),ba=(e,t)=>{e.x=t.x,e.y=t.y},$a=(e,t)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),xa=(e,t)=>e.x===t.x&&e.y===t.y,ma=(e,t,u)=>new J(e.x+(t.x-e.x)*(1-u),e.y+(t.y-e.y)*(1-u)),ga=(e,t)=>{const u=t/e.length;e.x*=u,e.y*=u},pa=(e,t,u)=>{e.x+=t,e.y+=u},Ta=(e,t)=>new J(e*Math.cos(t),e*Math.sin(t)),Ea=(e,t,u)=>{e.x=t,e.y=u},ya=(e,t)=>new J(e.x-t.x,e.y-t.y);class J{x;y;constructor(t=0,u=0){this.x=t,this.y=u}get length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}add(t){return da(this,t)}clone(){return fa(this)}copyFrom(t){ba(this,t)}static distance(t,u){return $a(t,u)}equals(t){return xa(this,t)}static interpolate(t,u,s){return ma(t,u,s)}normalize(t){ga(this,t)}offset(t,u){pa(this,t,u)}static polar(t,u){return Ta(t,u)}setTo(t,u){Ea(this,t,u)}subtract(t){return ya(this,t)}}const Ma=(e,t)=>new J(t.x*e._$matrix[0]+t.y*e._$matrix[2],t.x*e._$matrix[1]+t.y*e._$matrix[3]),wa=e=>{e._$matrix[0]=1,e._$matrix[1]=0,e._$matrix[2]=0,e._$matrix[3]=1,e._$matrix[4]=0,e._$matrix[5]=0},Aa=e=>{const t=e._$matrix[0],u=e._$matrix[1],s=e._$matrix[2],n=e._$matrix[3],r=e._$matrix[4],a=e._$matrix[5];if(u===0&&s===0)e._$matrix[0]=1/t,e._$matrix[1]=0,e._$matrix[2]=0,e._$matrix[3]=1/n,e._$matrix[4]=-e._$matrix[0]*r,e._$matrix[5]=-e._$matrix[3]*a;else{const i=t*n-u*s;if(i){const c=1/i;e._$matrix[0]=n*c,e._$matrix[1]=-u*c,e._$matrix[2]=-s*c,e._$matrix[3]=t*c,e._$matrix[4]=-(e._$matrix[0]*r+e._$matrix[2]*a),e._$matrix[5]=-(e._$matrix[1]*r+e._$matrix[3]*a)}}},va=(e,t)=>{const u=e._$matrix,s=u[0],n=u[1],r=u[2],a=u[3],i=u[4],c=u[5];u[0]=s*Math.cos(t)-n*Math.sin(t),u[1]=s*Math.sin(t)+n*Math.cos(t),u[2]=r*Math.cos(t)-a*Math.sin(t),u[3]=r*Math.sin(t)+a*Math.cos(t),u[4]=i*Math.cos(t)-c*Math.sin(t),u[5]=i*Math.sin(t)+c*Math.cos(t)},Ia=(e,t,u)=>{const s=e._$matrix;s[0]*=t,s[2]*=t,s[4]*=t,s[1]*=u,s[3]*=u,s[5]*=u},Sa=(e,t,u,s,n,r,a)=>{const i=e._$matrix;i[0]=t,i[1]=u,i[2]=s,i[3]=n,i[4]=r,i[5]=a},Ra=(e,t)=>{const u=t.x,s=t.y,n=e._$matrix;return new J(u*n[0]+s*n[2]+n[4],u*n[1]+s*n[3]+n[5])},ka=(e,t,u)=>{e.tx+=t,e.ty+=u};class A{_$matrix;constructor(t=1,u=0,s=0,n=1,r=0,a=0){this._$matrix=vs(t,u,s,n,r,a)}get a(){return this._$matrix[0]}set a(t){this._$matrix[0]=t}get b(){return this._$matrix[1]}set b(t){this._$matrix[1]=t}get c(){return this._$matrix[2]}set c(t){this._$matrix[2]=t}get d(){return this._$matrix[3]}set d(t){this._$matrix[3]=t}get tx(){return this._$matrix[4]}set tx(t){this._$matrix[4]=t}get ty(){return this._$matrix[5]}set ty(t){this._$matrix[5]=t}get rawData(){return this._$matrix}clone(){return ia(this)}concat(t){ca(this,t)}copyFrom(t){oa(this,t)}createBox(t,u,s=0,n=0,r=0){la(this,t,u,s,n,r)}createGradientBox(t,u,s=0,n=0,r=0){ha(this,t,u,s,n,r)}deltaTransformPoint(t){return Ma(this,t)}identity(){wa(this)}invert(){Aa(this)}rotate(t){va(this,t)}scale(t,u){Ia(this,t,u)}setTo(t,u,s,n,r,a){Sa(this,t,u,s,n,r,a)}transformPoint(t){return Ra(this,t)}translate(t,u){ka(this,t,u)}static multiply(t,u){const s=t[0],n=t[1],r=t[2],a=t[3],i=t[4],c=t[5],o=u[0],d=u[1],l=u[2],h=u[3],b=u[4],f=u[5];return vs(s*o+r*d,n*o+a*d,s*l+r*h,n*l+a*h,s*b+r*f+i,n*b+a*f+c)}static release(t){ra(t)}}const Oa=e=>new be(e.x,e.y,e.width,e.height),Fa=(e,t,u)=>e.x<=t&&e.y<=u&&e.right>t&&e.bottom>u,La=(e,t)=>e.x<=t.x&&e.y<=t.y&&e.right>t.x&&e.bottom>t.y,Ca=(e,t)=>e.x<=t.x&&e.y<=t.y&&e.right>=t.right&&e.bottom>=t.bottom,Na=(e,t)=>{e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},Pa=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,Ba=(e,t,u)=>{e.x-=t,e.width+=2*t,e.y-=u,e.height+=2*u},Da=(e,t)=>{e.x-=t.x,e.width+=2*t.x,e.y-=t.y,e.height+=2*t.y},_a=(e,t)=>{const u=Math.max(e.x,t.x),s=Math.max(e.y,t.y),n=Math.min(e.right,t.right),r=Math.min(e.bottom,t.bottom),a=n-u,i=r-s;return a>0&&i>0?new be(u,s,a,i):new be(0,0,0,0)},Ua=(e,t)=>{const u=Math.max(e.x,t.x),s=Math.max(e.y,t.y),n=Math.min(e.right,t.right),r=Math.min(e.bottom,t.bottom);return n-u>0&&r-s>0},qa=e=>e.width<=0||e.height<=0,Xa=(e,t,u)=>{e.x+=t,e.y+=u},Va=(e,t)=>{e.x+=t.x,e.y+=t.y},Ya=e=>{e.x=e.y=e.width=e.height=0},Wa=(e,t,u,s,n)=>{e.x=t,e.y=u,e.width=s,e.height=n},Ha=(e,t)=>e.isEmpty()?t.clone():t.isEmpty()?e.clone():new be(Math.min(e.x,t.x),Math.min(e.y,t.y),Math.max(e.right-t.left,t.right-e.left),Math.max(e.bottom-t.top,t.bottom-e.top));class be{x;y;width;height;constructor(t=0,u=0,s=0,n=0){this.x=t,this.y=u,this.width=s,this.height=n}get bottom(){return this.y+this.height}set bottom(t){this.height=t-this.y}get bottomRight(){return new J(this.right,this.bottom)}set bottomRight(t){this.right=t.x,this.bottom=t.y}get left(){return this.x}set left(t){this.width=this.right-t,this.x=t}get right(){return this.x+this.width}set right(t){this.width=t-this.x}get size(){return new J(this.width,this.height)}set size(t){this.width=t.x,this.height=t.y}get top(){return this.y}set top(t){this.height=this.bottom-t,this.y=t}get topLeft(){return new J(this.x,this.y)}set topLeft(t){this.left=t.x,this.top=t.y}clone(){return Oa(this)}contains(t,u){return Fa(this,t,u)}containsPoint(t){return La(this,t)}containsRect(t){return Ca(this,t)}copyFrom(t){Na(this,t)}equals(t){return Pa(this,t)}inflate(t,u){Ba(this,t,u)}inflatePoint(t){Da(this,t)}intersection(t){return _a(this,t)}intersects(t){return Ua(this,t)}isEmpty(){return qa(this)}offset(t,u){Xa(this,t,u)}offsetPoint(t){Va(this,t)}setEmpty(){Ya(this)}setTo(t,u,s,n){Wa(this,t,u,s,n)}union(t){return Ha(this,t)}}const Ht=e=>{if(e.placeObject)return e.placeObject;const t=e.placeId;if(t===-1)return null;const u=e.parent;if(!u)return null;const s=u.loaderInfo;if(!s||!s.data)return null;const n=s.data.characters[u.characterId],r=u.isTimelineEnabled?u.currentFrame:1,a=n.placeMap[r];if(!a||!(t in a))return null;const i=a[t],c=n.placeObjects[i];return c?(e.placeObject=c,c):null},ft=new J,fn=0,bn=1,za=2,Ga=3,bt=new Float32Array([1,0,0,1,0,0]);let Ka=0;const $n=()=>Ka++,xn=[],Au=[],mn=[],Qa=[],vu=(e=0,t=0,u=0,s=0,n=0,r=0)=>{const a=mn.pop()||new Float32Array(6);return a[0]=e,a[1]=t,a[2]=u,a[3]=s,a[4]=n,a[5]=r,a},Et=e=>{mn.push(e)},Za=(e=1,t=1,u=1,s=1,n=0,r=0,a=0,i=0)=>{const c=Qa.pop()||new Float32Array(8);return c[0]=e,c[1]=t,c[2]=u,c[3]=s,c[4]=n,c[5]=r,c[6]=a,c[7]=i,c},gn=[],Ja=()=>gn.pop()||new Map,ja=e=>{e.clear(),gn.push(e)},U=(...e)=>{const t=xn.pop()||[];return e.length&&t.push(...e),t},ee=e=>{e.length&&(e.length=0),xn.push(e)},he=(e,t,u,s)=>{const n=Au.length?Au.pop():new Float32Array(4);return n[0]=e,n[1]=t,n[2]=u,n[3]=s,n},F=e=>{Au.push(e)},ei=e=>{let t=null;switch(e.method.toUpperCase()){case"GET":if(e.data){const s=e.url.split("?");s[1]=s.length===1?e.data.toString():`${s[1]}&${e.data.toString()}`,e.url=s.join("?")}break;case"PUT":case"POST":e.data&&(t=e.data.toString());break}const u=new XMLHttpRequest;if(u.open(e.method,e.url,!0),u.responseType=e.format,u.withCredentials=e.withCredentials,e.event){const s=Object.keys(e.event);for(let n=0;n<s.length;++n){const r=s[n];u.addEventListener(r,e.event[r])}}for(let s=0;s<e.headers.length;++s){const n=e.headers[s];n&&u.setRequestHeader(n.name,n.value)}u.send(t)},ti=e=>{const t=U();if(e){const u=e.trim().split(`
659
- `);for(let s=0;s<u.length;++s){const n=u[s].split(":");t.push({name:n[0].trim(),value:n[1].trim()})}}return t},Rt=new WeakMap,ke=new WeakMap,fe=new Set,ui=new WeakMap,Iu=document.createElement("canvas");Iu.width=Iu.height=1;const Me=Iu.getContext("2d"),Su=e=>Me?(Me.fillStyle=e,+`0x${Me.fillStyle.slice(1)}`):0,de=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)},Ru=[],ku=[],Le=new Map;let pn=null;const Tn=e=>{pn=e},si=()=>pn,N=e=>{if(e.$matrix)return e.$matrix.rawData;const t=Ht(e);if(!t||!t.matrix)return null;if(!t.typedMatrix){const u=t.matrix;t.typedMatrix=vu(u[0],u[1],u[2],u[3],u[4],u[5])}return t.typedMatrix},ni=e=>{const t=N(e);let u=t||bt,s=e.parent;for(;s;){const n=N(s);n&&(u=A.multiply(n,u)),s=s.parent}return new A(u[0],u[1],u[2],u[3],u[4],u[5])},qe=e=>{if(e.$colorTransform)return e.$colorTransform.rawData;const t=Ht(e);if(!t||!t.colorTransform)return null;if(!t.typedColorTransform){const u=t.colorTransform;t.typedColorTransform=Za(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7])}return t.typedColorTransform},ri=e=>{if(e.$alpha!==null)return e.$alpha;if(e.$colorTransform){const u=e.$colorTransform.rawData;return u[3]+u[7]/255}const t=qe(e);return t?t[3]+t[7]/255:1},ai=(e,t)=>{if(t=de(t,0,1),e.$alpha===t)return;e.$alpha=t;let u=e.$colorTransform;if(!u){const s=qe(e);u=s?new L(...s):new L}u.alphaMultiplier=t,u.alphaOffset=0,e.$colorTransform=u,V(e)};class Ae{$updated;constructor(){this.$updated=!0}canApplyFilter(){return!0}getBounds(t){return t}}const v=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)},Ou=document.createElement("canvas");Ou.width=Ou.height=1;const Tu=Ou.getContext("2d"),Oe=e=>Tu?(Tu.fillStyle=e,+`0x${Tu.fillStyle.slice(1)}`):0,ts=Math.PI/180,us=e=>{switch(e){case"full":return 0;case"inner":return 1;case"outer":return 2;default:return 0}},En=e=>e.strength>0&&e.distance!==0&&e.blurX>0&&e.blurY>0&&e.quality>0,yn=e=>e.blurX>0&&e.blurY>0&&e.quality>0,ii=[.5,1.05,1.4,1.55,1.75,1.9,2,2.15,2.2,2.3,2.5,3,3,3.5,3.5],et=(e,t)=>{if(!yn(e))return t;const u=ii[e.quality-1],s=Math.round(e.blurX*u),n=Math.round(e.blurY*u);return t[0]-=s,t[2]+=s,t[1]-=n,t[3]+=n,t},ci=(e,t)=>{if(!En(e)||e.type==="inner")return t;et(e,t);const u=e.angle*ts,s=e.distance,n=Math.abs(Math.cos(u)*s),r=Math.abs(Math.sin(u)*s);return t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r,t},oi=e=>[e.$filterType,e.distance,e.angle,e.highlightColor,e.highlightAlpha,e.shadowColor,e.shadowAlpha,e.blurX,e.blurY,e.strength,e.quality,e.type,e.knockout],li=e=>new Float32Array([e.$filterType,e.distance,e.angle,e.highlightColor,e.highlightAlpha,e.shadowColor,e.shadowAlpha,e.blurX,e.blurY,e.strength,e.quality,us(e.type),+e.knockout]);class zt extends Ae{$filterType=0;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$highlightColor;_$highlightAlpha;_$shadowColor;_$shadowAlpha;_$strength;_$type;_$knockout;constructor(t=4,u=45,s=16777215,n=1,r=0,a=1,i=4,c=4,o=1,d=1,l="inner",h=!1){super(),this._$distance=4,this._$angle=45,this._$highlightColor=16777215,this._$highlightAlpha=1,this._$blurX=4,this._$blurY=4,this._$quality=1,this._$shadowColor=0,this._$shadowAlpha=1,this._$strength=1,this._$type="inner",this._$knockout=!1,this.blurX=i,this.blurY=c,this.quality=d,this.distance=t,this.angle=u,this.highlightColor=s,this.highlightAlpha=n,this.shadowColor=r,this.shadowAlpha=a,this.strength=o,this.type=l,this.knockout=h}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get highlightAlpha(){return this._$highlightAlpha}set highlightAlpha(t){t=v(+t,0,1,0),t!==this._$highlightAlpha&&(this._$highlightAlpha=t,this.$updated=!0)}get highlightColor(){return this._$highlightColor}set highlightColor(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,16777215),t!==this._$highlightColor&&(this._$highlightColor=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get shadowAlpha(){return this._$shadowAlpha}set shadowAlpha(t){t=v(t,0,1,0),t!==this._$shadowAlpha&&(this._$shadowAlpha=t,this.$updated=!0)}get shadowColor(){return this._$shadowColor}set shadowColor(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$shadowColor&&(this._$shadowColor=t,this.$updated=!0)}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}get type(){return this._$type}set type(t){if(t=`${t}`.toLowerCase(),t!==this._$type){switch(t){case"inner":case"outer":case"full":break;default:return}this._$type=t,this.$updated=!0}}clone(){return new zt(this._$distance,this._$angle,this._$highlightColor,this._$highlightAlpha,this._$shadowColor,this._$shadowAlpha,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$type,this._$knockout)}toArray(){return oi(this)}toNumberArray(){return li(this)}canApplyFilter(){return En(this)}getBounds(t){return ci(this,t)}}const hi=e=>[e.$filterType,e.blurX,e.blurY,e.quality],di=e=>new Float32Array([e.$filterType,e.blurX,e.blurY,e.quality]);class Gt extends Ae{$filterType=1;_$blurX;_$blurY;_$quality;constructor(t=4,u=4,s=1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this.blurX=t,this.blurY=u,this.quality=s}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}clone(){return new Gt(this._$blurX,this._$blurY,this._$quality)}toArray(){return hi(this)}toNumberArray(){return di(this)}canApplyFilter(){return yn(this)}getBounds(t){return et(this,t)}}const fi=e=>[e.$filterType,e.matrix],bi=e=>new Float32Array([e.$filterType,...e.matrix]);class Kt extends Ae{$filterType=2;_$matrix;constructor(t=null){super(),this._$matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],t&&t.length===20&&(this.matrix=t)}get matrix(){return this._$matrix}set matrix(t){if(this._$matrix!==t&&!(!Array.isArray(t)||t.length!==20)){for(let u=0;u<20;u++)if(t[u]!==this._$matrix[u]){this.$updated=!0;break}this.$updated&&(this._$matrix=t)}}clone(){return new Kt(this._$matrix)}toArray(){return fi(this)}toNumberArray(){return bi(this)}}const $i=e=>e.matrix!==null&&e.matrixX*e.matrixY===e.matrix.length,xi=e=>[e.$filterType,e.matrixX,e.matrixY,e.matrix,e.divisor,e.bias,e.preserveAlpha,e.clamp,e.color,e.alpha],mi=e=>{const t=e.matrix||[];return new Float32Array([e.$filterType,e.matrixX,e.matrixY,...t,e.divisor,e.bias,+e.preserveAlpha,+e.clamp,e.color,e.alpha])};class Qt extends Ae{$filterType=3;_$matrixX;_$matrixY;_$matrix;_$divisor;_$bias;_$preserveAlpha;_$clamp;_$color;_$alpha;constructor(t=0,u=0,s=null,n=1,r=0,a=!0,i=!0,c=0,o=0){super(),this._$matrixX=0,this._$matrixY=0,this._$matrix=null,this._$divisor=1,this._$bias=0,this._$preserveAlpha=!0,this._$clamp=!0,this._$color=0,this._$alpha=0,this.matrixX=t,this.matrixY=u,this.matrix=s,this.divisor=n,this.bias=r,this.preserveAlpha=a,this.clamp=i,this.color=c,this.alpha=o}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get bias(){return this._$bias}set bias(t){t|=0,t!==this._$bias&&(this._$bias=t,this.$updated=!0)}get clamp(){return this._$clamp}set clamp(t){t=!!t,t!==this._$clamp&&(this._$clamp=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$color&&(this._$color=t,this.$updated=!0)}get divisor(){return this._$divisor}set divisor(t){t|=0,t!==this._$divisor&&(this._$divisor=t,this.$updated=!0)}get matrix(){return this._$matrix}set matrix(t){this._$matrix!==t&&(this._$matrix=t,this.$updated=!0)}get matrixX(){return this._$matrixX}set matrixX(t){t=v(t|0,0,15,0)|0,t!==this._$matrixX&&(this._$matrixX=t,this.$updated=!0)}get matrixY(){return this._$matrixY}set matrixY(t){t=v(t|0,0,15,0)|0,t!==this._$matrixY&&(this._$matrixY=t,this.$updated=!0)}get preserveAlpha(){return this._$preserveAlpha}set preserveAlpha(t){t=!!t,t!==this._$preserveAlpha&&(this._$preserveAlpha=t,this.$updated=!0)}clone(){return new Qt(this._$matrixX,this._$matrixY,this._$matrix?this._$matrix.slice():null,this._$divisor,this._$bias,this._$preserveAlpha,this._$clamp,this._$color,this._$alpha)}toArray(){return xi(this)}toNumberArray(){return mi(this)}canApplyFilter(){return $i(this)}}const gi=e=>e.bitmapBuffer!==null&&e.componentX>0&&e.componentY>0&&e.scaleX!==0&&e.scaleY!==0,pi=e=>[e.$filterType,e.bitmapBuffer?Array.from(e.bitmapBuffer):null,e.bitmapWidth,e.bitmapHeight,e.mapPointX,e.mapPointY,e.componentX,e.componentY,e.scaleX,e.scaleY,e.mode,e.color,e.alpha],Ti=e=>{let t=2;switch(e.mode){case"clamp":t=0;break;case"color":t=1;break;case"wrap":t=2;break;case"ignore":t=3;break;default:t=2;break}const u=e.bitmapBuffer||new Uint8Array,s=[e.$filterType,u.length];for(let n=0;n<u.length;n+=4096)s.push(...u.subarray(n,n+4096));return s.push(e.bitmapWidth,e.bitmapHeight,e.mapPointX,e.mapPointY,e.componentX,e.componentY,e.scaleX,e.scaleY,t,e.color,e.alpha),new Float32Array(s)};class Zt extends Ae{$filterType=4;_$bitmapBuffer;_$bitmapWidth;_$bitmapHeight;_$mapPointX;_$mapPointY;_$componentX;_$componentY;_$scaleX;_$scaleY;_$mode;_$color;_$alpha;constructor(t=null,u=0,s=0,n=0,r=0,a=0,i=0,c=0,o=0,d="wrap",l=0,h=0){super(),this._$bitmapBuffer=null,this._$bitmapWidth=0,this._$bitmapHeight=0,this._$mapPointX=0,this._$mapPointY=0,this._$componentX=0,this._$componentY=0,this._$scaleX=0,this._$scaleY=0,this._$mode="wrap",this._$color=0,this._$alpha=0,this.bitmapBuffer=t,this.bitmapWidth=u,this.bitmapHeight=s,this.mapPointX=n,this.mapPointY=r,this.componentX=a,this.componentY=i,this.scaleX=c,this.scaleY=o,this.mode=d,this.color=l,this.alpha=h}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$color&&(this._$color=t,this.$updated=!0)}get componentX(){return this._$componentX}set componentX(t){t!==this._$componentX&&(this._$componentX=t,this.$updated=!0)}get componentY(){return this._$componentY}set componentY(t){t!==this._$componentY&&(this._$componentY=t,this.$updated=!0)}get bitmapBuffer(){return this._$bitmapBuffer}set bitmapBuffer(t){t!==this._$bitmapBuffer&&(this._$bitmapBuffer=t,this.$updated=!0)}get bitmapWidth(){return this._$bitmapWidth}set bitmapWidth(t){t!==this._$bitmapWidth&&(this._$bitmapWidth=t,this.$updated=!0)}get bitmapHeight(){return this._$bitmapHeight}set bitmapHeight(t){t!==this._$bitmapHeight&&(this._$bitmapHeight=t,this.$updated=!0)}get mapPointX(){return this._$mapPointX}set mapPointX(t){t!==this._$mapPointX&&(this._$mapPointX=t,this.$updated=!0)}get mapPointY(){return this._$mapPointY}set mapPointY(t){t!==this._$mapPointY&&(this._$mapPointY=t,this.$updated=!0)}get mode(){return this._$mode}set mode(t){t!==this._$mode&&(this._$mode=t,this.$updated=!0)}get scaleX(){return this._$scaleX}set scaleX(t){t=v(+t,-65535,65535,0),t!==this._$scaleX&&(this._$scaleX=t,this.$updated=!0)}get scaleY(){return this._$scaleY}set scaleY(t){t=v(+t,-65535,65535,0),t!==this._$scaleY&&(this._$scaleY=t,this.$updated=!0)}clone(){return new Zt(this._$bitmapBuffer?this._$bitmapBuffer.slice():null,this._$bitmapWidth,this._$bitmapHeight,this._$mapPointX,this._$mapPointX,this._$componentX,this._$componentY,this._$scaleX,this._$scaleY,this._$mode,this._$color,this._$alpha)}toArray(){return pi(this)}toNumberArray(){return Ti(this)}canApplyFilter(){return gi(this)}}const Ei=e=>[e.$filterType,e.distance,e.angle,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,e.inner,e.knockout,e.hideObject],yi=e=>new Float32Array([e.$filterType,e.distance,e.angle,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,+e.inner,+e.knockout,+e.hideObject]),Mn=e=>e.alpha>0&&e.strength!==0&&e.blurX>0&&e.blurY>0&&e.quality>0,Mi=(e,t)=>{if(!Mn(e)||e.inner)return t;et(e,t);const u=e.angle*ts,s=e.distance,n=Math.cos(u)*s,r=Math.sin(u)*s;return t[0]=Math.min(t[0],n),n>0&&(t[2]+=n),t[1]=Math.min(t[1],r),r>0&&(t[3]+=r),t};class Jt extends Ae{$filterType=5;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$color;_$alpha;_$strength;_$inner;_$knockout;_$hideObject;constructor(t=4,u=45,s=0,n=1,r=4,a=4,i=1,c=1,o=!1,d=!1,l=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$distance=4,this._$angle=45,this._$color=0,this._$alpha=1,this._$strength=1,this._$inner=!1,this._$knockout=!1,this._$hideObject=!1,this.blurX=r,this.blurY=a,this.quality=c,this.distance=t,this.angle=u,this.color=s,this.alpha=n,this.strength=i,this.inner=o,this.knockout=d,this.hideObject=l}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$color&&(this._$color=t,this.$updated=!0)}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get hideObject(){return this._$hideObject}set hideObject(t){t=!!t,t!==this._$hideObject&&(this._$hideObject=t,this.$updated=!0)}get inner(){return this._$inner}set inner(t){t=!!t,t!==this._$inner&&(this._$inner=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}clone(){return new Jt(this._$distance,this._$angle,this._$color,this._$alpha,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$inner,this._$knockout,this._$hideObject)}toArray(){return Ei(this)}toNumberArray(){return yi(this)}canApplyFilter(){return Mn(this)}getBounds(t){return Mi(this,t)}}const wi=e=>[e.$filterType,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,e.inner,e.knockout],Ai=e=>new Float32Array([e.$filterType,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,+e.inner,+e.knockout]),wn=e=>e.alpha>0&&e.strength!==0&&e.blurX>0&&e.blurY>0&&e.quality>0,vi=(e,t)=>!wn(e)||e.inner?t:et(e,t);class jt extends Ae{$filterType=6;_$blurX;_$blurY;_$quality;_$color;_$alpha;_$strength;_$inner;_$knockout;constructor(t=0,u=1,s=4,n=4,r=1,a=1,i=!1,c=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$color=0,this._$alpha=1,this._$strength=1,this._$inner=!1,this._$knockout=!1,this.blurX=s,this.blurY=n,this.quality=a,this.color=t,this.alpha=u,this.strength=r,this.inner=i,this.knockout=c}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,4),t!==this._$color&&(this._$color=t,this.$updated=!0)}get inner(){return this._$inner}set inner(t){t=!!t,t!==this._$inner&&(this._$inner=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}clone(){return new jt(this._$color,this._$alpha,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$inner,this._$knockout)}toArray(){return wi(this)}toNumberArray(){return Ai(this)}canApplyFilter(){return wn(this)}getBounds(t){return vi(this,t)}}const An=e=>e.strength>0&&e.distance>0&&e.alphas!==null&&e.ratios!==null&&e.colors!==null&&e.blurX>0&&e.blurY>0&&e.quality>0,Ii=e=>[e.$filterType,e.distance,e.angle,e.colors,e.alphas,e.ratios,e.blurX,e.blurY,e.strength,e.quality,e.type,e.knockout],Si=e=>{const t=e.colors?e.colors:[],u=e.alphas?e.alphas:[],s=e.ratios?e.ratios:[];return new Float32Array([e.$filterType,e.distance,e.angle,t.length,...t,u.length,...u,s.length,...s,e.blurX,e.blurY,e.strength,e.quality,us(e.type),+e.knockout])},Ri=(e,t)=>{if(!An(e)||e.type==="inner")return t;et(e,t);const u=e.angle*ts,s=e.distance,n=Math.abs(Math.cos(u)*s),r=Math.abs(Math.sin(u)*s);return t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r,t};class eu extends Ae{$filterType=7;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$colors;_$alphas;_$ratios;_$strength;_$type;_$knockout;constructor(t=4,u=45,s=null,n=null,r=null,a=4,i=4,c=1,o=1,d="inner",l=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$distance=4,this._$angle=45,this._$colors=null,this._$alphas=null,this._$ratios=null,this._$strength=1,this._$type="inner",this._$knockout=!1,this.blurX=a,this.blurY=i,this.quality=o,this.distance=t,this.angle=u,this.colors=s,this.alphas=n,this.ratios=r,this.strength=c,this.type=d,this.knockout=l}get alphas(){return this._$alphas}set alphas(t){if(t!==this._$alphas){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(+s,0,1,0)}this._$alphas=t,this.$updated=!0}}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get colors(){return this._$colors}set colors(t){if(this._$colors!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(typeof s=="string"?Oe(s):s,0,16777215,0)}this._$colors=t,this.$updated=!0}}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get ratios(){return this._$ratios}set ratios(t){if(this._$ratios!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(+s,0,255,0)}this._$ratios=t,this.$updated=!0}}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}get type(){return this._$type}set type(t){t!==this._$type&&(this._$type=t,this.$updated=!0)}clone(){return new eu(this._$distance,this._$angle,this._$colors?this._$colors.slice():null,this._$alphas?this._$alphas.slice():null,this._$ratios?this._$ratios.slice():null,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$type,this._$knockout)}toArray(){return Ii(this)}toNumberArray(){return Si(this)}canApplyFilter(){return An(this)}getBounds(t){return Ri(this,t)}}const ki=e=>[e.$filterType,e.distance,e.angle,e.colors,e.alphas,e.ratios,e.blurX,e.blurY,e.strength,e.quality,e.type,e.knockout],vn=e=>e.strength>0&&e.distance>0&&e.alphas!==null&&e.ratios!==null&&e.colors!==null&&e.blurX>0&&e.blurY>0&&e.quality>0,Oi=e=>{const t=e.colors?e.colors:[],u=e.alphas?e.alphas:[],s=e.ratios?e.ratios:[];return new Float32Array([e.$filterType,e.distance,e.angle,t.length,...t,u.length,...u,s.length,...s,e.blurX,e.blurY,e.strength,e.quality,us(e.type),+e.knockout])},Fi=(e,t)=>!vn(e)||e.type==="inner"?t:et(e,t);class tu extends Ae{$filterType=8;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$colors;_$alphas;_$ratios;_$strength;_$type;_$knockout;constructor(t=4,u=45,s=null,n=null,r=null,a=4,i=4,c=1,o=1,d="outer",l=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$distance=4,this._$angle=45,this._$colors=null,this._$alphas=null,this._$ratios=null,this._$strength=1,this._$type="outer",this._$knockout=!1,this.blurX=a,this.blurY=i,this.quality=o,this.distance=t,this.angle=u,this.colors=s,this.alphas=n,this.ratios=r,this.strength=c,this.type=d,this.knockout=l}get alphas(){return this._$alphas}set alphas(t){if(t!==this._$alphas){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(+s,0,1,0)}this._$alphas=t,this.$updated=!0}}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get colors(){return this._$colors}set colors(t){if(this._$colors!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(typeof s=="string"?Oe(s):s,0,16777215,0)}this._$colors=t,this.$updated=!0}}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get ratios(){return this._$ratios}set ratios(t){if(this._$ratios!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u)t[u]=v(+t[u],0,255,0);this._$ratios=t,this.$updated=!0}}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}get type(){return this._$type}set type(t){t!==this._$type&&(this._$type=t,this.$updated=!0)}clone(){return new tu(this._$distance,this._$angle,this._$colors,this._$alphas,this._$ratios,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$type,this._$knockout)}toArray(){return ki(this)}toNumberArray(){return Oi(this)}canApplyFilter(){return vn(this)}getBounds(t){return Fi(this,t)}}const Li=e=>{const t=U();for(let u=0;u<e.length;++u){const s=e[u];if(s)switch(s.params[0]===null&&s.params.shift(),s.class){case"BevelFilter":t.push(new zt(...s.params));break;case"BlurFilter":t.push(new Gt(...s.params));break;case"ColorMatrixFilter":t.push(new Kt(...s.params));break;case"ConvolutionFilter":t.push(new Qt(...s.params));break;case"DisplacementMapFilter":t.push(new Zt(...s.params));break;case"DropShadowFilter":t.push(new Jt(...s.params));break;case"GlowFilter":t.push(new jt(...s.params));break;case"GradientBevelFilter":t.push(new eu(...s.params));break;case"GradientGlowFilter":t.push(new tu(...s.params));break}}return t},Ci=e=>{if(e.$filters)return e.$filters;const t=Ht(e);return t&&t.surfaceFilterList?(t.filters||(t.filters=Li(t.surfaceFilterList)),t.filters):null},Ni=(e,t)=>{e.$filters=t,V(e)},Pi=e=>{if(e.$blendMode)return e.$blendMode;const t=Ht(e);return t&&t.blendMode?t.blendMode:"normal"},Bi=(e,t)=>{e.$blendMode!==t&&(e.$blendMode=t,V(e))},Di=180/Math.PI,_i=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?Math.atan2(t[1],t[0])*Di:0},Ui=Math.PI/180,qi=(e,t)=>{if(t=de(t%360,-360,360,0),e.$rotation===t)return;let u=e.$matrix;if(!u){const r=N(e);e.$matrix=u=r?new A(...r):new A}const s=Math.sqrt(u.a*u.a+u.b*u.b),n=Math.sqrt(u.c*u.c+u.d*u.d);if(t===0)u.a=s,u.b=0,u.c=0,u.d=n;else{let r=Math.atan2(u.b,u.a),a=Math.atan2(-u.c,u.d);const i=t*Ui;a=a+i-r,r=i,u.b=s*Math.sin(r),u.b===1||u.b===-1?u.a=0:u.a=s*Math.cos(r),u.c=-n*Math.sin(a),u.c===1||u.c===-1?u.d=0:u.d=n*Math.cos(a)}e.$scaleX=null,e.$scaleY=null,e.$rotation=t,V(e)},Xi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);if(!t)return 1;const s=(Math.abs(t[0])>=1e-12?Math.sign(t[0]):Math.sign(t[1]))||1,n=Math.hypot(t[0],t[1]);return Math.round(n*s*1e4)/1e4},In=(e,t)=>{t=de(t,-Number.MAX_VALUE,Number.MAX_VALUE,1);const u=Math.round(t*1e4)/1e4;if(e.$scaleX===u)return;let s=e.$matrix;if(!s){const n=N(e);e.$matrix=s=n?new A(...n):new A}if(s.b===0||isNaN(s.b))s.a=u;else{const r=Math.atan2(s.b,s.a),a=Math.hypot(s.a,s.b),i=(Math.abs(s.a)>=1e-12?Math.sign(s.a):Math.sign(s.b))||1,d=(a*i>=0?r:r-Math.PI)+(u<0?Math.PI:0),l=Math.abs(u);s.a=l*Math.cos(d),s.b=l*Math.sin(d)}e.$scaleX=u,e.$rotation=null,V(e)},Vi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);if(!t)return 1;const u=1e-12,s=Math.hypot(t[0],t[1]),n=(Math.abs(t[0])>=u?Math.sign(t[0]):Math.sign(t[1]))||1;return Math.round((t[0]*t[3]-t[1]*t[2])/(s*n)*1e4)/1e4},Sn=(e,t)=>{t=de(t,-Number.MAX_VALUE,Number.MAX_VALUE,1);const u=Math.round(t*1e4)/1e4;if(e.$scaleY===u)return;let s=e.$matrix;if(!s){const n=N(e);e.$matrix=s=n?new A(...n):new A}if(s.c===0||isNaN(s.c))s.d=u;else{const n=Math.max(0,Math.abs(u)),r=1e-12;let a=Math.atan2(s.b,s.a);(s.a<0||Math.abs(s.a)<r&&s.b<0)&&(a-=Math.PI),a<=-Math.PI&&(a+=2*Math.PI),a>Math.PI&&(a-=2*Math.PI);const i=a+(u<0?Math.PI:0);s.c=-n*Math.sin(i),s.d=n*Math.cos(i)}e.$scaleY=u,e.$rotation=null,V(e)},Yi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?t[4]:0},Wi=(e,t)=>{let u=e.$matrix;if(!u){const s=N(e);e.$matrix=u=s?new A(...s):new A}e.$x!==t&&(e.$x=u.tx=t,V(e))},Hi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?t[5]:0},zi=(e,t)=>{let u=e.$matrix;if(!u){const s=N(e);e.$matrix=u=s?new A(...s):new A}e.$y!==t&&(e.$y=u.ty=t,V(e))},ne=(e,t,u,s,n)=>{const r=n[0],a=n[1],i=n[2],c=n[3],o=n[4],d=n[5],l=u*r+s*i+o,h=u*r+t*i+o,b=e*r+s*i+o,f=e*r+t*i+o,p=u*a+s*c+d,$=u*a+t*c+d,g=e*a+s*c+d,R=e*a+t*c+d;return he(Math.min(l,h,b,f),Math.min(p,$,g,R),Math.max(l,h,b,f),Math.max(p,$,g,R))},Rn=e=>{const t=e.graphics;return he(t.xMin,t.yMin,t.xMax,t.yMax)},uu=(e,t=null)=>{const u=Rn(e),s=N(e);if(!s){if(t){const r=ne(u[0],u[1],u[2],u[3],t);return F(u),r}return u}const n=ne(u[0],u[1],u[2],u[3],t?A.multiply(t,s):s);return F(u),n},kn=e=>he(0,0,e.videoWidth,e.videoHeight),su=(e,t=null)=>{const u=kn(e),s=N(e);if(!s){if(t){const r=ne(u[0],u[1],u[2],u[3],t);return F(u),r}return u}const n=ne(u[0],u[1],u[2],u[3],t?A.multiply(t,s):s);return F(u),n},On=e=>he(e.xMin,e.yMin,e.xMax,e.yMax),nu=(e,t=null)=>{const u=On(e),s=N(e);if(!s){if(t){const r=ne(u[0],u[1],u[2],u[3],t);return F(u),r}return u}const n=ne(u[0],u[1],u[2],u[3],t?A.multiply(t,s):s);return F(u),n},ss=(e,t=null)=>{const u=e.children;if(!u.length)return he(0,0,0,0);const s=N(e),n=s?t?A.multiply(t,s):s:t,r=Number.MAX_VALUE;let a=r,i=-r,c=r,o=-r;for(let d=0;d<u.length;d++){const l=u[d];if(!l.visible)continue;let h=null;switch(!0){case l.isContainerEnabled:h=ss(l,n);break;case l.isShape:h=uu(l,n);break;case l.isText:h=nu(l,n);break;case l.isVideo:h=su(l,n);break}h&&(a=Math.min(a,h[0]),c=Math.min(c,h[1]),i=Math.max(i,h[2]),o=Math.max(o,h[3]),F(h))}return he(a,c,i,o)},Fn=e=>{switch(!0){case e.isContainerEnabled:return ss(e);case e.isShape:return uu(e);case e.isText:return nu(e);case e.isVideo:return su(e);default:return he(0,0,0,0)}},Gi=e=>{const t=Fn(e),u=Math.abs(t[2]-t[0]);switch(F(t),!0){case u===0:case u===1/0:case u===-1/0:return 0;default:return Math.round(u*100)/100}},Ln=(e,t=null)=>{const u=e.children;if(!u.length)return he(0,0,0,0);const s=N(e);let n=t;s&&(n=t?A.multiply(t,s):s);const r=Number.MAX_VALUE;let a=r,i=-r,c=r,o=-r;for(let d=0;d<u.length;d++){const l=u[d];if(!l.visible)continue;let h=null;switch(!0){case l.isContainerEnabled:h=Ln(l,n);break;case l.isShape:h=uu(l,n);break;case l.isText:h=nu(l,n);break;case l.isVideo:h=su(l,n);break}h&&(a=Math.min(a,h[0]),c=Math.min(c,h[1]),i=Math.max(i,h[2]),o=Math.max(o,h[3]),F(h))}return he(a,c,i,o)},Ze=e=>{switch(!0){case e.isContainerEnabled:return Ln(e);case e.isShape:return Rn(e);case e.isText:return On(e);case e.isVideo:return kn(e);default:return he(0,0,0,0)}},Ki=(e,t)=>{if(t=+t,isNaN(t)||0>t)return;const u=Ze(e);let s=Math.abs(u[2]-u[0]);switch(!0){case s===0:case s===1/0:case s===-1/0:return;default:s=Math.round(s*100)/100;break}In(e,t/s)},Qi=(e,t)=>{const u=e.concatenatedMatrix,s=new J(t.x*u.a+t.y*u.c+u.tx,t.x*u.b+t.y*u.d+u.ty);return A.release(u.rawData),s},Zi=(e,t)=>{const u=e.concatenatedMatrix;u.invert();const s=new J(t.x*u.a+t.y*u.c+u.tx,t.x*u.b+t.y*u.d+u.ty);return A.release(u.rawData),s},Ji=e=>{const t=Fn(e),u=Math.abs(t[3]-t[1]);switch(F(t),!0){case u===0:case u===1/0:case u===-1/0:return 0;default:return Math.round(u*100)/100}},ji=(e,t)=>{if(t=+t,isNaN(t)||0>t)return;const u=Ze(e);let s=Math.abs(u[3]-u[1]);switch(!0){case s===0:case s===1/0:case s===-1/0:return;default:s=Math.round(s*100)/100;break}Sn(e,t/s)},ec=e=>{const t=e.parent;t&&t.removeChild(e)},tc=(e,t=null)=>{const u=e.concatenatedMatrix,s=Ze(e),n=ne(s[0],s[1],s[2],s[3],u.rawData);if(F(s),A.release(u.rawData),!t){const c=new be(n[0],n[1],Math.abs(n[2]-n[0]),Math.abs(n[3]-n[1]));return F(n),c}const r=t.concatenatedMatrix;r.invert();const a=ne(n[0],n[1],n[2],n[3],r.rawData);F(n),A.release(r.rawData);const i=new be(a[0],a[1],Math.abs(a[2]-a[0]),Math.abs(a[3]-a[1]));return F(a),i},uc=(e,t)=>{const u=Ze(e),s=e.concatenatedMatrix,n=ne(u[0],u[1],u[2],u[3],s.rawData);F(u),A.release(s.rawData);const r=Ze(t),a=t.concatenatedMatrix,i=ne(r[0],r[1],r[2],r[3],a.rawData);F(r),A.release(a.rawData);const c=Math.max(n[0],i[0]),o=Math.max(n[1],i[1]),d=Math.min(n[2],i[2]),l=Math.min(n[3],i[3]);return F(n),F(i),d-c>=0&&l-o>=0};class Bt{_$bitmapData;_$matrix;_$repeat;_$smooth;constructor(t,u=null,s=!0,n=!1){this._$bitmapData=t,this._$matrix=u,this._$repeat=s,this._$smooth=n}clone(){return new Bt(this._$bitmapData.clone(),this._$matrix?this._$matrix.clone():null,this._$repeat,this._$smooth)}toArray(){return U(this._$bitmapData,this._$matrix,this._$repeat,this._$smooth)}}class Dt{_$type;_$colors;_$alphas;_$ratios;_$matrix;_$spreadMethod;_$interpolationMethod;_$focalPointRatio;_$colorStops;constructor(t,u,s,n,r=null,a="pad",i="rgb",c=0){this._$type=t,this._$colors=u,this._$alphas=s,this._$ratios=n,this._$matrix=r,this._$spreadMethod=a,this._$interpolationMethod=i,this._$focalPointRatio=c,this._$colorStops=U()}get colorStops(){if(!this._$colorStops.length){const t=Math.min(Math.min(this._$alphas.length,this._$colors.length),this._$ratios.length);for(let u=0;u<t;++u){const s=this._$colors[u],n=typeof s=="string"?Su(s):s;this._$colorStops[u]={ratio:this._$ratios[u]/255,R:n>>>16&255,G:n>>>8&255,B:n&255,A:this._$alphas[u]*255&255}}}return this._$colorStops}toArray(){return U(this._$type,this.colorStops,this._$matrix?this._$matrix.rawData:bt,this._$spreadMethod,this._$interpolationMethod,this._$focalPointRatio)}clone(){return new Dt(this._$type,this._$colors.slice(),this._$alphas.slice(),this._$ratios.slice(),this._$matrix?this._$matrix.clone():null,this._$spreadMethod,this._$interpolationMethod,this._$focalPointRatio)}}const sc=(e,t=0,u=0)=>{e.xMin=Math.min(e.xMin,t),e.xMax=Math.max(e.xMax,t),e.yMin=Math.min(e.yMin,u),e.yMax=Math.max(e.yMax,u)},Ss=(e,t=0,u=0,s=0,n=0,r=0,a="none")=>{e.xMin=Math.min(e.xMin,Math.min(t,s)),e.xMax=Math.max(e.xMax,Math.max(t,s)),e.yMin=Math.min(e.yMin,Math.min(u,n)),e.yMax=Math.max(e.yMax,Math.max(u,n));const i=s-t,c=n-u,o=Math.sqrt(i*i+c*c);if(!o)return;const d=i/o,l=c/o,h=-l,b=d,f=r/2,p=Math.min(t+h*f,t-h*f,s+h*f,s-h*f),$=Math.max(t+h*f,t-h*f,s+h*f,s-h*f),g=Math.min(u+b*f,u-b*f,n+b*f,n-b*f),R=Math.max(u+b*f,u-b*f,n+b*f,n-b*f);if(e.xMin=Math.min(e.xMin,p),e.xMax=Math.max(e.xMax,$),e.yMin=Math.min(e.yMin,g),e.yMax=Math.max(e.yMax,R),a==="round"||a==="square"){const S=t+f*-d,k=u+f*-l,D=Math.min(S+f*d+f*h,S-f*d+f*h,S+f*d-f*h,S-f*d-f*h),re=Math.max(S+f*d+f*h,S-f*d+f*h,S+f*d-f*h,S-f*d-f*h),ce=Math.min(k+f*l+f*b,k+f*l-f*b,k-f*l-f*b,k-f*l+f*b),H=Math.max(k+f*l+f*b,k+f*l-f*b,k-f*l-f*b,k-f*l+f*b);e.xMin=Math.min(e.xMin,D),e.xMax=Math.max(e.xMax,re),e.yMin=Math.min(e.yMin,ce),e.yMax=Math.max(e.yMax,H)}},st=(e,t,u=0,s=0,n=0,r="none",...a)=>{for(let i=0;i<a.length;){const c=a[i++],o=a[i++];sc(e,c,o),t&&(Ss(e,c,o,u,s,n,r),Ss(e,u,s,c,o,n,r))}},nt=(e,t,u,s,n,...r)=>{e.isConfirmed=!1,t&&s&&s.push(...r),u&&n&&n.push(...r)},nc=(e,t,u,s,n)=>{t=+t||0,u=+u||0,s=+s||0,n=+n||0,s=Math.round(s),n=Math.round(n);const r=s/2,a=n/2,i=t+r,c=u+a,o=t+s,d=u+n,l=4/3*(Math.SQRT2-1),h=l*r,b=l*a;return e.moveTo(i,u).cubicCurveTo(i+h,u,o,c-b,o,c).cubicCurveTo(o,c+b,i+h,d,i,d).cubicCurveTo(i-h,d,t,c+b,t,c).cubicCurveTo(t,c-b,i-h,u,i,u)},rc=(e,t,u,s,n)=>{t=+t||0,u=+u||0,s=+s||0,n=+n||0;const r=Math.round(t+s),a=Math.round(u+n);return e.moveTo(t,u).lineTo(t,a).lineTo(r,a).lineTo(r,u).lineTo(t,u)},ac=(e,t,u,s,n,r,a=NaN)=>{t=+t||0,u=+u||0,s=+s||0,n=+n||0,r=+r||0,a=+a||r,s=Math.round(s),n=Math.round(n),r=Math.round(r),a=Math.round(a);const i=r/2,c=a/2,o=4/3*(Math.SQRT2-1),d=o*i,l=o*c,h=t+i,b=t+s,f=b-i,p=u+c,$=u+n,g=$-c;return e.moveTo(h,u).lineTo(f,u).cubicCurveTo(f+d,u,b,p-l,b,p).lineTo(b,g).cubicCurveTo(b,g+l,f+d,$,f,$).lineTo(h,$).cubicCurveTo(h-d,$,t,g+l,t,g).lineTo(t,p).cubicCurveTo(t,p-l,h-d,u,h,u)},kt=e=>{if(!e)return[];const t=U();for(let u=0;u<e.length;){const s=e[u++];switch(t.push(s),s){case y.BEGIN_PATH:case y.END_FILL:case y.END_STROKE:case y.CLOSE_PATH:break;case y.MOVE_TO:case y.LINE_TO:t.push(e[u++],e[u++]);break;case y.CURVE_TO:case y.FILL_STYLE:t.push(e[u++],e[u++],e[u++],e[u++]);break;case y.CUBIC:t.push(e[u++],e[u++],e[u++],e[u++],e[u++],e[u++]);break;case y.STROKE_STYLE:{switch(t.push(e[u++]),e[u++]){case"none":t.push(0);break;case"round":t.push(1);break;case"square":t.push(2);break}switch(e[u++]){case"bevel":t.push(0);break;case"miter":t.push(1);break;case"round":t.push(2);break}t.push(e[u++],e[u++],e[u++],e[u++],e[u++])}break;case y.ARC:t.push(e[u++],e[u++],e[u++]);break;case y.GRADIENT_FILL:{const n=e[u++],r=e[u++],a=e[u++],i=e[u++],c=e[u++],o=e[u++];t.push(n==="linear"?0:1),t.push(r.length);const d=r.sort((l,h)=>l.ratio-h.ratio);for(let l=0;l<d.length;++l){const h=d[l];t.push(h.ratio,h.R,h.G,h.B,h.A)}switch(t.push(...a),i){case"reflect":t.push(0);break;case"repeat":t.push(1);break;default:t.push(2);break}t.push(c==="linearRGB"?0:1),t.push(o)}break;case y.GRADIENT_STROKE:{switch(t.push(e[u++]),e[u++]){case"none":t.push(0);break;case"round":t.push(1);break;case"square":t.push(2);break}switch(e[u++]){case"bevel":t.push(0);break;case"miter":t.push(1);break;case"round":t.push(2);break}t.push(e[u++]);const a=e[u++],i=e[u++],c=e[u++],o=e[u++],d=e[u++],l=e[u++];t.push(a==="linear"?0:1),t.push(i.length);for(let h=0;h<i.length;++h){const b=i[h];t.push(b.ratio,b.R,b.G,b.B,b.A)}switch(t.push(...c),o){case"reflect":t.push(0);break;case"repeat":t.push(1);break;default:t.push(2);break}t.push(d==="linearRGB"?0:1),t.push(l)}break;case y.BITMAP_FILL:{const n=e[u++],r=n.buffer;if(!r){u+=3;break}t.push(n.width,n.height,r.length);for(let o=0;o<r.length;o+=4096)t.push(...r.subarray(o,o+4096));const a=e[u++];a?t.push(...a.rawData):t.push(1,0,0,1,0,0);const i=e[u++];t.push(i?1:0);const c=e[u++];t.push(c?1:0)}break;case y.BITMAP_STROKE:{switch(t.push(e[u++]),e[u++]){case"none":t.push(0);break;case"round":t.push(1);break;case"square":t.push(2);break}switch(e[u++]){case"bevel":t.push(0);break;case"miter":t.push(1);break;case"round":t.push(2);break}t.push(e[u++]);const a=e[u++],i=a.buffer;if(!i){u+=3;break}t.push(a.width,a.height,i.length);for(let l=0;l<i.length;l+=4096)t.push(...i.subarray(l,l+4096));const c=e[u++];c?t.push(...c):t.push(1,0,0,1,0,0);const o=e[u++];t.push(o?1:0);const d=e[u++];t.push(d?1:0)}break}}return t};class y{isConfirmed;xMin;yMin;xMax;yMax;$recodes;_$buffer;_$maxAlpha;_$isBeginning;_$positionX;_$positionY;_$hasFillEnabled;_$fillType;_$fillColor;_$fillGradient;_$fillBitmap;_$fills;_$hasLineEnabled;_$lineType;_$lineColor;_$lineGradient;_$joints;_$miterLimit;_$caps;_$lineWidth;_$lines;constructor(){this.isConfirmed=!1,this.xMin=Number.MAX_VALUE,this.yMin=Number.MAX_VALUE,this.xMax=-Number.MAX_VALUE,this.yMax=-Number.MAX_VALUE,this.$recodes=null,this._$buffer=null,this._$positionX=0,this._$positionY=0,this._$maxAlpha=0,this._$isBeginning=!1,this._$fills=null,this._$hasFillEnabled=!1,this._$fillType=0,this._$fillGradient=null,this._$fillBitmap=null,this._$fillColor=0,this._$caps="none",this._$lineWidth=1,this._$lines=null,this._$hasLineEnabled=!1,this._$lineType=0,this._$lineGradient=null,this._$joints="round",this._$miterLimit=0,this._$lineColor=0}static get MOVE_TO(){return 0}static get CURVE_TO(){return 1}static get LINE_TO(){return 2}static get CUBIC(){return 3}static get ARC(){return 4}static get FILL_STYLE(){return 5}static get STROKE_STYLE(){return 6}static get END_FILL(){return 7}static get END_STROKE(){return 8}static get BEGIN_PATH(){return 9}static get GRADIENT_FILL(){return 10}static get GRADIENT_STROKE(){return 11}static get CLOSE_PATH(){return 12}static get BITMAP_FILL(){return 13}static get BITMAP_STROKE(){return 14}get isDrawable(){if(!this._$isBeginning||!this._$maxAlpha)return!1;const t=Math.abs(this.xMax-this.xMin),u=Math.abs(this.yMax-this.yMin);return t>0&&u>0}beginBitmapFill(t,u=null,s=!0,n=!1){return this._$hasFillEnabled&&this.endFill(),this._$fills||(this._$fills=U()),this._$maxAlpha=1,this._$hasFillEnabled=!0,this._$isBeginning=!0,this._$fills.push(y.BEGIN_PATH),this._$fillType=y.BITMAP_FILL,this._$fillBitmap=new Bt(t,u,s,n),this}beginFill(t=0,u=1){this._$hasFillEnabled&&this.endFill(),this._$fills||(this._$fills=U()),typeof t=="string"&&(t=Su(t)),t=de(t,0,16777215,0),u=de(u,0,1,1),this._$maxAlpha=Math.max(this._$maxAlpha,u),this._$hasFillEnabled=!0,this._$isBeginning=!0,this._$fills.push(y.BEGIN_PATH),this._$fillType=y.FILL_STYLE;const s=t>>>16&255,n=t>>>8&255,r=t&255;return this._$fillColor=s<<24|n<<16|r<<8|u*255,this}beginGradientFill(t,u,s,n,r=null,a="pad",i="rgb",c=0){this._$hasFillEnabled&&this.endFill(),this._$fills||(this._$fills=U());for(let o=0;o<s.length;++o)this._$maxAlpha=Math.max(this._$maxAlpha,s[o]);return this._$hasFillEnabled=!0,this._$isBeginning=!0,this._$fills.push(y.BEGIN_PATH),this._$fillType=y.GRADIENT_FILL,this._$fillGradient=new Dt(t,u,s,n,r,a,i,c),this}clear(){return this._$maxAlpha=0,this._$isBeginning=!1,this._$positionX=0,this._$positionY=0,this._$fillType=0,this._$fillGradient=null,this._$fillBitmap=null,this._$fillColor=0,this._$hasFillEnabled=!1,this._$caps="none",this._$lineWidth=1,this._$lineType=0,this._$lineGradient=null,this._$joints="round",this._$miterLimit=0,this._$lineColor=0,this._$hasLineEnabled=!1,this.xMin=Number.MAX_VALUE,this.xMax=-Number.MAX_VALUE,this.yMin=Number.MAX_VALUE,this.yMax=-Number.MAX_VALUE,this.$recodes&&ee(this.$recodes),this._$fills&&ee(this._$fills),this._$lines&&ee(this._$lines),this._$buffer=null,this.$recodes=null,this._$fills=null,this._$lines=null,this}clone(){const t=new y;return t.copyFrom(this),t}copyFrom(t){t._$fillGradient&&(this._$fillGradient=t._$fillGradient.clone()),t._$fillBitmap&&(this._$fillBitmap=t._$fillBitmap.clone()),this._$hasFillEnabled=t._$hasFillEnabled,this._$fillType=t._$fillType,this._$fillColor=t._$fillColor,t._$lineGradient&&(this._$lineGradient=t._$lineGradient.clone()),this._$hasLineEnabled=t._$hasLineEnabled,this._$lineType=t._$lineType,this._$caps=t._$caps,this._$joints=t._$joints,this._$miterLimit=t._$miterLimit,this._$lineWidth=t._$lineWidth,this._$lineColor=t._$lineColor,this.xMin=t.xMin,this.xMax=t.xMax,this.yMin=t.yMin,this.yMax=t.yMax,this._$maxAlpha=t._$maxAlpha,this._$positionX=t._$positionX,this._$positionY=t._$positionY,this._$isBeginning=t._$isBeginning,t._$fills&&(this._$fills=t._$fills.slice(0)),t._$lines&&(this._$lines=t._$lines.slice(0)),t.$recodes&&(this.$recodes=t.$recodes.slice(0)),this._$buffer=null}cubicCurveTo(t,u,s,n,r,a){return r=+r||0,a=+a||0,this._$positionX===r&&this._$positionY===a?this:(t=+t||0,u=+u||0,s=+s||0,n=+n||0,st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u,s,n,r,a),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.CUBIC,t,u,s,n,r,a),this._$positionX=r,this._$positionY=a,this)}curveTo(t,u,s,n){return s=+s||0,n=+n||0,this._$positionX===s&&this._$positionY===n?this:(t=+t||0,u=+u||0,st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u,s,n),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.CURVE_TO,t,u,s,n),this._$positionX=s,this._$positionY=n,this)}drawCircle(t,u,s){return t=+t||0,u=+u||0,s=+s||0,s=Math.round(s),st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t-s,u-s,t+s,u+s),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.MOVE_TO,t+s,u,y.ARC,t,u,s),this._$positionX=t,this._$positionY=u,this}drawEllipse(t,u,s,n){return nc(this,t,u,s,n)}drawRect(t,u,s,n){return rc(this,t,u,s,n)}drawRoundRect(t,u,s,n,r,a=NaN){return ac(this,t,u,s,n,r,a)}endFill(){if(!this._$hasFillEnabled||!this._$fills||8>this._$fills.length)return this;switch(this.$recodes||(this.$recodes=U()),(this._$fills[2]!==this._$fills[this._$fills.length-2]||this._$fills[3]!==this._$fills[this._$fills.length-1])&&this._$fills.push(y.LINE_TO,this._$fills[2],this._$fills[3]),this.$recodes.push(...this._$fills),ee(this._$fills),this._$fills=null,this._$fillType){case y.FILL_STYLE:this.$recodes.push(this._$fillType,this._$fillColor>>>24&255,this._$fillColor>>>16&255,this._$fillColor>>>8&255,this._$fillColor&255,y.END_FILL);break;case y.GRADIENT_FILL:this._$fillGradient&&this.$recodes.push(this._$fillType,...this._$fillGradient.toArray());break;case y.BITMAP_FILL:this._$fillBitmap&&this.$recodes.push(this._$fillType,...this._$fillBitmap.toArray());break}return this._$fillType=0,this._$fillColor=0,this._$fillGradient=null,this._$fillBitmap=null,this._$hasFillEnabled=!1,this}endLine(){if(!this._$hasLineEnabled||!this._$lines)return this;switch(this.$recodes||(this.$recodes=U()),this.$recodes.push(...this._$lines),ee(this._$lines),this._$lines=null,this._$lineType){case y.STROKE_STYLE:this.$recodes.push(this._$lineType,this._$lineWidth,this._$caps,this._$joints,this._$miterLimit,this._$lineColor>>>24&255,this._$lineColor>>>16&255,this._$lineColor>>>8&255,this._$lineColor&255,y.END_STROKE);break;case y.GRADIENT_STROKE:this._$lineGradient&&this.$recodes.push(this._$lineType,this._$lineWidth,this._$caps,this._$joints,this._$miterLimit,...this._$lineGradient.toArray());break;case y.BITMAP_STROKE:this._$fillBitmap&&this.$recodes.push(this._$lineType,this._$lineWidth,this._$caps,this._$joints,this._$miterLimit,...this._$fillBitmap.toArray());break}return this._$lineType=0,this._$lineWidth=0,this._$lineGradient=null,this._$lineColor=0,this._$caps="none",this._$joints="round",this._$miterLimit=0,this._$hasLineEnabled=!1,this}lineBitmapStyle(t,u=null,s=!0,n=!1){return this._$hasLineEnabled?(this._$lines||(this._$lines=U()),this._$maxAlpha=1,this._$hasLineEnabled=!0,this._$isBeginning=!0,this._$lines.push(y.BEGIN_PATH),this._$lineType=y.BITMAP_STROKE,this._$fillBitmap=new Bt(t,u,s,n),this):this}lineGradientStyle(t,u,s,n,r=null,a="pad",i="rgb",c=0){if(!this._$hasLineEnabled)return this;this._$lines||(this._$lines=U());for(let o=0;o<s.length;++o)this._$maxAlpha=Math.max(this._$maxAlpha,s[o]);return this._$lines.push(y.BEGIN_PATH),this._$lineType=y.GRADIENT_STROKE,this._$lineGradient=new Dt(t,u,s,n,r,a,i,c),this}lineStyle(t=1,u=0,s=1,n="round",r="round",a=3){this._$hasLineEnabled&&this.endLine(),this._$lines||(this._$lines=U()),this._$maxAlpha=Math.max(this._$maxAlpha,s),this._$hasLineEnabled=!0,this._$isBeginning=!0,this._$positionX||this._$positionY?this._$lines.push(y.BEGIN_PATH,y.MOVE_TO,this._$positionX,this._$positionY):this._$lines.push(y.BEGIN_PATH),this._$lineType=y.STROKE_STYLE,typeof u=="string"&&(u=Su(u)),u=de(u,0,16777215,0),s=de(s,0,1,1);const i=u>>>16&255,c=u>>>8&255,o=u&255;return this._$lineColor=i<<24|c<<16|o<<8|s*255,this._$lineWidth=t,this._$caps=`${n}`,this._$joints=`${r}`,this._$joints==="miter"&&(this._$miterLimit=a),this}lineTo(t,u){return t=+t||0,u=+u||0,this._$positionX===t&&this._$positionY===u?this:(st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.LINE_TO,t,u),this._$positionX=t,this._$positionY=u,this)}moveTo(t,u){t=+t||0,u=+u||0,this._$positionX=t,this._$positionY=u,st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u);let s=!1;return this._$hasFillEnabled&&this._$fills&&this._$fills[this._$fills.length-3]===y.MOVE_TO&&(s=!0,this._$fills[this._$fills.length-2]=t,this._$fills[this._$fills.length-1]=u),this._$hasLineEnabled&&this._$lines&&this._$lines[this._$lines.length-3]===y.MOVE_TO&&(s=!0,this._$lines[this._$lines.length-2]=t,this._$lines[this._$lines.length-1]=u),s||nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.MOVE_TO,t,u),this}get buffer(){if(this.isConfirmed&&this._$buffer)return this._$buffer;this._$hasLineEnabled&&this.endLine(),this._$hasFillEnabled&&this.endFill();const t=kt(this.$recodes);return this._$buffer=new Float32Array(t),ee(t),this.isConfirmed=!0,this._$buffer}set buffer(t){this._$buffer=t,this.isConfirmed=!0,this._$isBeginning=!0,this._$maxAlpha=1}}const ic=(e,t,u)=>{for(let s=0;s<t.length;)switch(t[s++]){case y.BEGIN_PATH:e.beginPath();break;case y.MOVE_TO:e.moveTo(t[s++],t[s++]);break;case y.LINE_TO:e.lineTo(t[s++],t[s++]);break;case y.CURVE_TO:e.quadraticCurveTo(t[s++],t[s++],t[s++],t[s++]);break;case y.FILL_STYLE:s+=4;continue;case y.END_FILL:if(e.isPointInPath(u.x,u.y))return!0;break;case y.STROKE_STYLE:s+=8;continue;case y.END_STROKE:break;case y.CLOSE_PATH:e.closePath();break;case y.CUBIC:e.bezierCurveTo(t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]);break;case y.ARC:e.arc(t[s++],t[s++],t[s++],0,2*Math.PI);break;case y.GRADIENT_FILL:if(e.isPointInPath(u.x,u.y))return!0;s+=6;continue;case y.GRADIENT_STROKE:s+=12;continue;case y.BITMAP_FILL:if(e.isPointInPath(u.x,u.y))return!0;s+=6;continue;case y.BITMAP_STROKE:s+=9;continue}return!1},Ot=(e,t,u,s)=>{const n=e.graphics,r=n.xMax-n.xMin,a=n.yMax-n.yMin;if(r<=0||a<=0)return!1;const i=N(e),c=i?A.multiply(u,i):u;t.beginPath(),t.setTransform(c[0],c[1],c[2],c[3],c[4],c[5]);let o=!1;return n.buffer.length?o=ic(t,n.buffer,s):(t.moveTo(0,0),t.lineTo(r,0),t.lineTo(r,a),t.lineTo(0,a),t.lineTo(0,0),o=t.isPointInPath(s.x,s.y)),c!==u&&A.release(c),o},Ft=(e,t,u,s)=>{const n=Math.ceil(Math.abs(e.xMax-e.xMin)),r=Math.ceil(Math.abs(e.yMax-e.yMin));if(n<=0||r<=0)return!1;const a=N(e),i=a?A.multiply(u,a):u;return t.setTransform(i[0],i[1],i[2],i[3],i[4],i[5]),t.beginPath(),t.moveTo(0,0),t.lineTo(n,0),t.lineTo(n,r),t.lineTo(0,r),t.lineTo(0,0),i!==u&&A.release(i),t.isPointInPath(s.x,s.y)},Lt=(e,t,u,s)=>{const n=e.videoWidth,r=e.videoHeight;if(n<=0||r<=0)return!1;const a=N(e),i=a?A.multiply(u,a):u;return t.beginPath(),t.setTransform(i[0],i[1],i[2],i[3],i[4],i[5]),t.beginPath(),t.moveTo(0,0),t.lineTo(n,0),t.lineTo(n,r),t.lineTo(0,r),t.lineTo(0,0),i!==u&&A.release(i),t.isPointInPath(s.x,s.y)},He=(e,t,u,s,n=!0)=>{const r=e.children;if(!r.length)return!1;const a=N(e),i=a?A.multiply(u,a):u,c=U(),o=U(),d=Ja();let l=0,h=0;for(let $=0;$<r.length;++$){const g=r[$];if(g&&!g.isMask){if(g.clipDepth){h=c.length,l=g.clipDepth,c.push(g);continue}g.visible&&(l&&g.placeId>l&&(h=0,l=0),h&&d.set(g.instanceId,h),o.push(g))}}const b=e.mouseChildren&&n;if(e.isSprite&&e.hitArea){const $=He(e.hitArea,t,i,s,b);return $&&b&&e.mouseEnabled&&(e.buttonMode&&e.useHandCursor&&(s.pointer="pointer"),s.hit||(s.hit=e)),$}let f=!1;const p=e.mask;if(p){let $=!1;switch(!0){case p.isContainerEnabled:$=He(p,t,i,s,b);break;case p.isShape:$=Ot(p,t,i,s);break;case p.isText:$=Ft(p,t,i,s);break;case p.isVideo:$=Lt(p,t,i,s);break}if(!$)return!1}for(;o.length;){const $=o.pop();if(!$||$.isMask)continue;if(d.has($.instanceId)){const R=d.get($.instanceId);if(!R)continue;const S=c[R];if(!S)continue;let k=!1;switch(!0){case S.isContainerEnabled:k=He(S,t,i,s,b);break;case S.isShape:k=Ot(S,t,i,s);break;case S.isText:k=Ft(S,t,i,s);break;case S.isVideo:k=Lt(S,t,i,s);break}if(!k)continue}let g=!1;switch(!0){case $.isContainerEnabled:g=He($,t,i,s,b);break;case $.isShape:g=Ot($,t,i,s);break;case $.isText:g=Ft($,t,i,s);break;case $.isVideo:g=Lt($,t,i,s);break}if(g){if(f=!0,!b)break;if($.isInteractive&&$.mouseEnabled){if(s.pointer==="auto")switch(!0){case $.isText:$.type==="input"&&(s.pointer="text");break;case $.isSprite:$.buttonMode&&$.useHandCursor&&(s.pointer="pointer");break;default:s.pointer="pointer";break}s.hit||(s.hit=$);break}}}return ee(c),ee(o),ja(d),i!==u&&A.release(i),f},Ce={x:0,y:0,pointer:"",hit:null},cc=(e,t,u,s=!1)=>{if(s){const d=e.parent,l=d?d.concatenatedMatrix.rawData:bt;switch(Me.setTransform(1,0,0,1,0,0),Me.beginPath(),Ce.x=t,Ce.y=u,Ce.hit=null,!0){case e.isContainerEnabled:return He(e,Me,l,Ce);case e.isShape:return Ot(e,Me,l,Ce);case e.isText:return Ft(e,Me,l,Ce);case e.isVideo:return Lt(e,Me,l,Ce);default:return!1}}const n=Ze(e),r=N(e),a=ne(n[0],n[1],n[2],n[3],r||bt);F(n);const i=new be(a[0],a[1],Math.abs(a[2]-a[0]),Math.abs(a[3]-a[1]));F(a);const c=e.parent,o=c?c.globalToLocal(new J(t,u)):new J(t,u);return i.containsPoint(o)},oc=e=>{const t=N(e);return t?new A(t[0],t[1],t[2],t[3],t[4],t[5]):new A},lc=e=>{const t=qe(e);return t?new L(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):new L};class ru extends je{instanceId;dictionaryId;isSprite;isInteractive;isContainerEnabled;isTimelineEnabled;isShape;isVideo;isText;placeId;placeObject;characterId;clipDepth;name;startFrame;endFrame;changed;$added;$addedToStage;uniqueKey;$matrix;$colorTransform;$filters;$blendMode;$scaleX;$scaleY;$rotation;$x;$y;$alpha;$cache;_$scale9Grid;_$visible;_$variables;isMask;parent;constructor(){super(),this.instanceId=$n(),this.dictionaryId=-1,this.uniqueKey="",this.isSprite=!1,this.isContainerEnabled=!1,this.isTimelineEnabled=!1,this.isShape=!1,this.isVideo=!1,this.isText=!1,this.isInteractive=!1,this.placeId=-1,this.placeObject=null,this.characterId=-1,this.clipDepth=0,this.name="",this.startFrame=1,this.endFrame=0,this.parent=null,this.isMask=!1,this.changed=!0,this.$added=!1,this.$addedToStage=!1,this.$matrix=null,this.$colorTransform=null,this.$filters=null,this.$blendMode=null,this._$visible=!0,this._$scale9Grid=null,this._$variables=null,this.$x=null,this.$y=null,this.$alpha=null,this.$scaleX=null,this.$scaleY=null,this.$rotation=null,this.$cache=null}get concatenatedMatrix(){return ni(this)}get alpha(){return ri(this)}set alpha(t){ai(this,t)}get blendMode(){return Pi(this)}set blendMode(t){Bi(this,t)}get filters(){return Ci(this)}set filters(t){Ni(this,t)}get dropTarget(){return si()}get height(){return Ji(this)}set height(t){ji(this,t)}get loaderInfo(){return Rt.has(this)?Rt.get(this):null}get colorTransform(){return lc(this)}set colorTransform(t){this.$colorTransform=t}get matrix(){return oc(this)}set matrix(t){this.$matrix=t}get mouseX(){return this.globalToLocal(ft).x}get mouseY(){return this.globalToLocal(ft).y}get root(){return ke.has(this)?ke.get(this):null}get rotation(){return this.$rotation===null?_i(this):this.$rotation}set rotation(t){qi(this,t)}get scale9Grid(){return this._$scale9Grid}set scale9Grid(t){this._$scale9Grid!==t&&(this._$scale9Grid=t,V(this))}get scaleX(){return this.$scaleX===null?Xi(this):this.$scaleX}set scaleX(t){In(this,t)}get scaleY(){return this.$scaleY===null?Vi(this):this.$scaleY}set scaleY(t){Sn(this,t)}get visible(){return this._$visible}set visible(t){this._$visible!==t&&(this._$visible=!!t,V(this))}get width(){return Gi(this)}set width(t){Ki(this,t)}get x(){return this.$x===null?Yi(this):this.$x}set x(t){Wi(this,t)}get y(){return this.$y===null?Hi(this):this.$y}set y(t){zi(this,t)}getBounds(t=null){return tc(this,t)}globalToLocal(t){return Zi(this,t)}hitTestObject(t){return uc(this,t)}hitTestPoint(t,u,s=!1){return cc(this,t,u,s)}localToGlobal(t){return Qi(this,t)}getLocalVariable(t){if(!this._$variables)return null;if(this._$variables.has(t))return this._$variables.get(t)}setLocalVariable(t,u){this._$variables||(this._$variables=new Map),this._$variables.set(t,u)}hasLocalVariable(t){return this._$variables?this._$variables.has(t):!1}deleteLocalVariable(t){this._$variables&&this._$variables.has(t)&&(this._$variables.delete(t),this._$variables.size||(this._$variables=null))}getGlobalVariable(t){return Le.has(t)?Le.get(t):null}setGlobalVariable(t,u){Le.set(t,u)}hasGlobalVariable(t){return Le.has(t)}deleteGlobalVariable(t){Le.has(t)&&Le.delete(t)}clearGlobalVariable(){return Le.clear()}remove(){ec(this)}$syncLoaderInfo(t){Rt.set(this,t)}}const Cn=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(ke.set(s,e.root),fe.add(s.instanceId),s.isContainerEnabled&&Cn(s))}},Nn=e=>{e.$addedToStage||!fe.has(e.instanceId)||(e.$addedToStage=!0,e.willTrigger(m.ADDED_TO_STAGE)&&e.dispatchEvent(new m(m.ADDED_TO_STAGE)))},Pn=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(Nn(s),s.isContainerEnabled&&Pn(s))}},hc=e=>{e.$added||(e.$added=!0,e.willTrigger(m.ADDED)&&e.dispatchEvent(new m(m.ADDED,!0)))},Rs=(e,t,u=-1)=>{const s=t.parent;s&&s.removeChild(t);const n=e.children;return 0>u?n.push(t):n.splice(u,0,t),e.$container=null,t.parent=e,fe.has(e.instanceId)&&(ke.set(t,e.root),fe.add(t.instanceId),t.isContainerEnabled&&Cn(t)),hc(t),fe.has(e.instanceId)&&(Nn(t),t.isContainerEnabled&&Pn(t)),V(t),t},Bn=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(ke.delete(s),fe.delete(s.instanceId),s.isVideo&&s.pause(),s.isContainerEnabled&&Bn(s))}},dc=e=>{e.$added&&(e.$added=!1,e.willTrigger(m.REMOVED)&&e.dispatchEvent(new m(m.REMOVED,!0)))},Dn=e=>{!e.$addedToStage||!fe.has(e.instanceId)||(e.$addedToStage=!1,e.willTrigger(m.REMOVED_FROM_STAGE)&&e.dispatchEvent(new m(m.REMOVED_FROM_STAGE)),e.uniqueKey&&O.has(e.uniqueKey)&&O.removeTimer(e.uniqueKey))},ns=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(Dn(s),s.isContainerEnabled&&ns(s))}},rs=(e,t)=>{const u=t.parent;if(u&&u.instanceId!==e.instanceId)return;const s=e.children,n=s.indexOf(t);n>-1&&s.splice(n,1),e.$container=null,t.hasEventListener(m.ENTER_FRAME)&&t.removeAllEventListener(m.ENTER_FRAME),t.hasEventListener(B.KEY_DOWN)&&t.removeAllEventListener(B.KEY_DOWN),t.hasEventListener(B.KEY_UP)&&t.removeAllEventListener(B.KEY_UP),dc(t),fe.has(e.instanceId)&&(Dn(t),t.isContainerEnabled&&ns(t)),fe.has(e.instanceId)&&(ke.delete(t),fe.delete(t.instanceId),t.isVideo&&t.pause(),t.isContainerEnabled&&Bn(t)),t.parent=null,V(e)},_n=(e,t)=>{const u=e.children;return t in u?u[t]:null},fc=(e,t)=>{const u=_n(e,t);u&&rs(e,u)},bc=(e,t)=>{if(e.instanceId===t.instanceId)return!0;const u=e.children;for(let s=0;s<u.length;++s){const n=u[s];if(n){if(n.instanceId===t.instanceId)return!0;if(n.isContainerEnabled&&n.contains(t))return!0}}return!1},$c=(e,t)=>{if(!t)return null;const u=e.children;for(let s=0;s<u.length;++s){const n=u[s];if(!(!n.name||n.name!==t))return n}return null},xc=(e,t)=>{const u=e.children.slice();if(u.length)for(let s=0;s<t.length;s++){const n=t[s],r=u[n];r&&rs(e,r)}},mc=(e,t,u)=>{const s=e.getChildIndex(t);if(s===-1||s===u)return;const n=e.children;n.splice(s,1),n.splice(u,0,t),V(e)},gc=(e,t,u)=>{const s=e.getChildIndex(t),n=e.getChildIndex(u);if(s===-1||n===-1)return;const r=e.children;r[s]=u,r[n]=t,V(e)},pc=(e,t,u)=>{const s=e.children,n=s[t],r=s[u];!n||!r||(s[t]=r,s[u]=n,V(e))};class as extends ru{mouseEnabled;isInteractive;constructor(){super(),this.isInteractive=!0,this.mouseEnabled=!0}}class is extends as{_$children;_$mask;mouseChildren;$container;isContainerEnabled;constructor(){super(),this.isContainerEnabled=!0,this.mouseChildren=!0,this._$mask=null,this._$children=U(),this.$container=null}get children(){return this._$children}get numChildren(){return this.children.length}get mask(){return this._$mask}set mask(t){t!==this._$mask&&(this._$mask&&(this._$mask.isMask=!1,this._$mask=null),t&&(t.isMask=!0,this._$mask=t),V(this))}addChild(t){return Rs(this,t)}addChildAt(t,u){return Rs(this,t,u)}contains(t){return bc(this,t)}getChildAt(t){return _n(this,t)}getChildByName(t){return $c(this,t)}getChildIndex(t){return this.children.indexOf(t)}removeChild(t){rs(this,t)}removeChildAt(t){fc(this,t)}removeChildren(...t){xc(this,t)}setChildIndex(t,u){mc(this,t,u)}swapChildren(t,u){gc(this,t,u)}swapChildrenAt(t,u){pc(this,t,u)}}class Un extends je{name;frame;constructor(t,u){super(),this.name=`${t}`,this.frame=u|0}}class Tc extends je{id;content;data;url;format;constructor(){super(),this.id=$n(),this.url="",this.content=null,this.data=null,this.format="json"}}const Ec=(e,t=!1,u=null)=>{const s=e.parent?e.parent.globalToLocal(ft):e.globalToLocal(ft);e.$lockCenter=t,e.$offsetX=e.x-s.x,e.$offsetY=e.y-s.y,e.$boundedRect=u,Tn(e)},yc=e=>{e.$lockCenter=!1,e.$offsetX=0,e.$offsetY=0,e.$boundedRect=null,Tn(null)};class cs extends is{buttonMode;useHandCursor;isSprite;hitArea;_$soundTransform;$offsetX=0;$offsetY=0;$lockCenter=!1;$boundedRect=null;constructor(){super(),this.isSprite=!0,this.buttonMode=!1,this.useHandCursor=!0,this.hitArea=null,this.$offsetX=0,this.$offsetY=0,this.$lockCenter=!1,this.$boundedRect=null,this._$soundTransform=null}get soundTransform(){return this._$soundTransform}set soundTransform(t){this._$soundTransform=t}startDrag(t=!1,u=null){Ec(this,t,u)}stopDrag(){yc(this)}}const qn=e=>{e.isBitmap=!1,e.$bitmapBuffer=null,e.graphics.clear(),e.uniqueKey!==""&&O.has(e.uniqueKey)&&(O.removeById(e.uniqueKey),O.$removeIds.push(+e.uniqueKey)),V(e)},Xn=(e,t,u,s)=>{qn(e),e.isBitmap=!0,e.$bitmapBuffer=s,e.graphics.xMin=0,e.graphics.yMin=0,e.graphics.xMax=t,e.graphics.yMax=u},Mc=(e,t)=>{const u=new Image;u.crossOrigin="anonymous",u.addEventListener("load",()=>{const s=u.width,n=u.height,r=O.getCanvas();r.width=s,r.height=n;const a=r.getContext("2d",{willReadFrequently:!0});a.drawImage(u,0,0,s,n),Xn(e,s,n,new Uint8Array(a.getImageData(0,0,s,n).data)),O.destroy(a),e.hasEventListener(m.COMPLETE)&&e.dispatchEvent(new m(m.COMPLETE))}),u.src=t},wc=(e,t)=>{const u=e.graphics,s=Math.ceil(Math.abs(t.bounds.xMax-t.bounds.xMin)),n=Math.ceil(Math.abs(t.bounds.yMax-t.bounds.yMin));switch(!0){case t.bitmapId>0:{const a=e.loaderInfo.data?.characters[t.bitmapId];if(!a)break;e.isBitmap=!0,a.imageBuffer||(a.imageBuffer=new Uint8Array(a.buffer),a.buffer=null);const i=Math.ceil(Math.abs(a.bounds.xMax-a.bounds.xMin)),c=Math.ceil(Math.abs(a.bounds.yMax-a.bounds.yMin));if(t.grid){if(t.recodes){const o=t.recodes.slice(0);o.splice(-6,6);const d=new Ne(i,c);d.buffer=a.imageBuffer,o.push(y.BITMAP_FILL,d,null,!0,!1,9);const l=kt(o);u.buffer=new Float32Array(l),ee(o),ee(l)}}else if(s===i&&n===c)e.setBitmapBuffer(Math.ceil(Math.abs(a.bounds.xMax-a.bounds.xMin)),Math.ceil(Math.abs(a.bounds.yMax-a.bounds.yMin)),a.imageBuffer);else{const o=new Ne(i,c);if(o.buffer=a.imageBuffer,t.recodes)if(t.recodes[t.recodes.length-10]===y.BITMAP_STROKE){const l=t.recodes.slice(0);l.splice(-5,5),l.push(o,null,!0,!1);const h=kt(l);u.buffer=new Float32Array(h),ee(l),ee(h)}else u.beginBitmapFill(o).drawRect(0,0,s,n)}}break;case t.inBitmap:{e.isBitmap=!0;const r=t.recodes,a=r[r.length-4];if(s===a.width&&n===a.height)e.setBitmapBuffer(a.width,a.height,a.buffer);else{const i=new Ne(a.width,a.height);i.buffer=a.buffer,u.beginBitmapFill(i).drawRect(0,0,s,n)}}break;case"buffer"in t:t.imageBuffer||(t.imageBuffer=new Uint8Array(t.buffer),t.buffer=null),e.setBitmapBuffer(Math.ceil(Math.abs(u.xMax-u.xMin)),Math.ceil(Math.abs(u.yMax-u.yMin)),t.imageBuffer);break;default:t.recodes&&(t.recodeBuffer=new Float32Array(kt(t.recodes)),ee(t.recodes),t.recodes=null),t.recodeBuffer&&(u.buffer=t.recodeBuffer);break}u.xMin=t.bounds.xMin,u.xMax=t.bounds.xMax,u.yMin=t.bounds.yMin,u.yMax=t.bounds.yMax,t.grid&&(e.scale9Grid=new be(t.grid.x,t.grid.y,t.grid.w,t.grid.h))};class $t extends ru{_$graphics;_$src;isShape;cacheKey;cacheParams;isBitmap;$bitmapBuffer;constructor(){super(),this.isShape=!0,this.cacheKey=0,this.cacheParams=U(0,0,0),this._$graphics=null,this._$src="",this.$bitmapBuffer=null,this.isBitmap=!1}static get namespace(){return"next2d.display.Shape"}get namespace(){return"next2d.display.Shape"}get graphics(){return this._$graphics||(this._$graphics=new y,ui.set(this._$graphics,this)),this._$graphics}get src(){return this._$src}set src(t){this._$src!==t&&(this._$src=t,Mc(this,t))}get bitmapData(){const t=new Ne(this.width,this.height);return this.$bitmapBuffer&&(t.buffer=this.$bitmapBuffer),t}clearBitmapBuffer(){qn(this)}setBitmapBuffer(t,u,s){Xn(this,t,u,s)}$sync(t,u=null){u&&super.$syncLoaderInfo(u),wc(this,t)}}let Vn=null;const ks=e=>{Vn=e},Fe=()=>Vn,ie=document.createElement("textarea");ie.tabIndex=-1;let pe="";pe+="position: fixed;";pe+="top: 0;";pe+="left: 0;";pe+="font-size: 16px;";pe+="border: 0;";pe+="resize: none;";pe+="opacity: 0;";pe+="z-index: -1;";pe+="pointer-events: none;";ie.setAttribute("style",pe);const Fu=document.createElement("canvas");Fu.width=Fu.height=1;const Pe=Fu.getContext("2d");let Yn=0;const yt=()=>Yn,ot=e=>{Yn=e},Ac=e=>Pe?(Pe.fillStyle=e,+`0x${Pe.fillStyle.slice(1)}`):0,Qe=e=>isNaN(+e)?Ac(`${e}`):+e,vc=(e,t=1)=>({R:(e&16711680)>>16,G:(e&65280)>>8,B:e&255,A:t*255}),ht=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)};let Wn;const _t=()=>Wn,Hn=e=>{Wn=e},ze={x:0,y:0};class se{align;bold;color;font;italic;leading;leftMargin;letterSpacing;rightMargin;size;underline;constructor(t=null,u=null,s=null,n=null,r=null,a=null,i=null,c=null,o=null,d=null,l=null){this.font=t,this.size=u,this.color=s,this.bold=n,this.italic=r,this.underline=a,this.align=i,this.leftMargin=c,this.rightMargin=o,this.leading=d,this.letterSpacing=l}clone(){return new se(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.align,this.leftMargin,this.rightMargin,this.leading,this.letterSpacing)}toObject(){return{font:this.font,size:this.size,color:Qe(this.color),bold:this.bold,italic:this.italic,underline:this.underline,align:this.align,leftMargin:this.leftMargin,rightMargin:this.rightMargin,leading:this.leading,letterSpacing:this.letterSpacing}}}const Ic=e=>{e.align="left",e.bold=!1,e.color=0,e.font="Times New Roman",e.italic=!1,e.leading=0,e.leftMargin=0,e.letterSpacing=0,e.rightMargin=0,e.size=12,e.underline=!1},Sc=e=>{let t="";if(e.font&&(t+=`font-family: ${e.font};`),e.size&&(t+=`font-size: ${e.size}px;`),e.color){const u=vc(Qe(e.color)),s=u.R.toString(16).padStart(2,"0"),n=u.G.toString(16).padStart(2,"0"),r=u.B.toString(16).padStart(2,"0");t+=`color: #${s}${n}${r};`}return e.bold&&(t+="font-weight: bold;"),e.italic&&(t+="font-style: italic;"),e.underline&&(t+="text-decoration: underline;"),e.align&&(t+=`text-align: ${e.align};`),e.leftMargin&&(t+=`margin-left: ${e.leftMargin}px;`),e.rightMargin&&(t+=`margin-right: ${e.rightMargin}px;`),e.leading&&(t+=`margin-bottom: ${e.leading}px;`),e.letterSpacing&&(t+=`letter-spacing: ${e.letterSpacing}px;`),t};class Rc{_$textWidth;_$textHeight;heightTable;ascentTable;widthTable;textTable;lineTable;constructor(){this._$textWidth=-1,this._$textHeight=-1,this.widthTable=[],this.heightTable=[],this.ascentTable=[],this.textTable=[],this.lineTable=[]}get textWidth(){if(this._$textWidth!==-1)return this._$textWidth;this._$textWidth=0;for(let t=0;t<this.widthTable.length;++t)this._$textWidth=Math.max(this._$textWidth,this.widthTable[t]);return this._$textWidth}get textHeight(){if(this._$textHeight!==-1)return this._$textHeight;this._$textHeight=0;for(let t=0;t<this.heightTable.length;++t)this._$textHeight+=this.heightTable[t];return this._$textHeight}getLineWidth(t){return t in this.widthTable?this.widthTable[t]:0}getLineHeight(t){return t in this.heightTable?this.heightTable[t]:0}clear(){this._$textWidth=-1,this._$textHeight=-1,this.widthTable.length=0,this.heightTable.length=0,this.ascentTable.length=0,this.textTable.length=0,this.lineTable.length=0}}const kc=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Oc=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Eu;const Fc=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Os=(Eu=String.fromCodePoint)!==null&&Eu!==void 0?Eu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Lc(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Fc.get(e))!==null&&t!==void 0?t:e}var Z;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Z||(Z={}));const Cc=32;var Se;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Se||(Se={}));function Lu(e){return e>=Z.ZERO&&e<=Z.NINE}function Nc(e){return e>=Z.UPPER_A&&e<=Z.UPPER_F||e>=Z.LOWER_A&&e<=Z.LOWER_F}function Pc(e){return e>=Z.UPPER_A&&e<=Z.UPPER_Z||e>=Z.LOWER_A&&e<=Z.LOWER_Z||Lu(e)}function Bc(e){return e===Z.EQUALS||Pc(e)}var K;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(K||(K={}));var me;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(me||(me={}));class Dc{constructor(t,u,s){this.decodeTree=t,this.emitCodePoint=u,this.errors=s,this.state=K.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=me.Strict}startEntity(t){this.decodeMode=t,this.state=K.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,u){switch(this.state){case K.EntityStart:return t.charCodeAt(u)===Z.NUM?(this.state=K.NumericStart,this.consumed+=1,this.stateNumericStart(t,u+1)):(this.state=K.NamedEntity,this.stateNamedEntity(t,u));case K.NumericStart:return this.stateNumericStart(t,u);case K.NumericDecimal:return this.stateNumericDecimal(t,u);case K.NumericHex:return this.stateNumericHex(t,u);case K.NamedEntity:return this.stateNamedEntity(t,u)}}stateNumericStart(t,u){return u>=t.length?-1:(t.charCodeAt(u)|Cc)===Z.LOWER_X?(this.state=K.NumericHex,this.consumed+=1,this.stateNumericHex(t,u+1)):(this.state=K.NumericDecimal,this.stateNumericDecimal(t,u))}addToNumericResult(t,u,s,n){if(u!==s){const r=s-u;this.result=this.result*Math.pow(n,r)+Number.parseInt(t.substr(u,r),n),this.consumed+=r}}stateNumericHex(t,u){const s=u;for(;u<t.length;){const n=t.charCodeAt(u);if(Lu(n)||Nc(n))u+=1;else return this.addToNumericResult(t,s,u,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,s,u,16),-1}stateNumericDecimal(t,u){const s=u;for(;u<t.length;){const n=t.charCodeAt(u);if(Lu(n))u+=1;else return this.addToNumericResult(t,s,u,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,s,u,10),-1}emitNumericEntity(t,u){var s;if(this.consumed<=u)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Z.SEMI)this.consumed+=1;else if(this.decodeMode===me.Strict)return 0;return this.emitCodePoint(Lc(this.result),this.consumed),this.errors&&(t!==Z.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,u){const{decodeTree:s}=this;let n=s[this.treeIndex],r=(n&Se.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const a=t.charCodeAt(u);if(this.treeIndex=_c(s,n,this.treeIndex+Math.max(1,r),a),this.treeIndex<0)return this.result===0||this.decodeMode===me.Attribute&&(r===0||Bc(a))?0:this.emitNotTerminatedNamedEntity();if(n=s[this.treeIndex],r=(n&Se.VALUE_LENGTH)>>14,r!==0){if(a===Z.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==me.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:u,decodeTree:s}=this,n=(s[u]&Se.VALUE_LENGTH)>>14;return this.emitNamedEntityData(u,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,u,s){const{decodeTree:n}=this;return this.emitCodePoint(u===1?n[t]&~Se.VALUE_LENGTH:n[t+1],s),u===3&&this.emitCodePoint(n[t+2],s),s}end(){var t;switch(this.state){case K.NamedEntity:return this.result!==0&&(this.decodeMode!==me.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case K.NumericDecimal:return this.emitNumericEntity(0,2);case K.NumericHex:return this.emitNumericEntity(0,3);case K.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case K.EntityStart:return 0}}}function _c(e,t,u,s){const n=(t&Se.BRANCH_LENGTH)>>7,r=t&Se.JUMP_TABLE;if(n===0)return r!==0&&s===r?u:-1;if(r){const c=s-r;return c<0||c>=n?-1:e[u+c]-1}let a=u,i=a+n-1;for(;a<=i;){const c=a+i>>>1,o=e[c];if(o<s)a=c+1;else if(o>s)i=c-1;else return e[c+n]}return-1}var I;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(I||(I={}));var x;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(x||(x={}));function ye(e){return e===I.Space||e===I.NewLine||e===I.Tab||e===I.FormFeed||e===I.CarriageReturn}function Mt(e){return e===I.Slash||e===I.Gt||ye(e)}function Uc(e){return e>=I.LowerA&&e<=I.LowerZ||e>=I.UpperA&&e<=I.UpperZ}var ge;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(ge||(ge={}));const z={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};class qc{constructor({xmlMode:t=!1,decodeEntities:u=!0},s){this.cbs=s,this.state=x.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=x.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=u,this.entityDecoder=new Dc(t?Oc:kc,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=x.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=x.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===I.Lt||!this.decodeEntities&&this.fastForwardTo(I.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=x.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateSpecialStartSequence(t){const u=this.sequenceIndex===this.currentSequence.length;if(!(u?Mt(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!u){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=x.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===I.Gt||ye(t)){const u=this.index-this.currentSequence.length;if(this.sectionStart<u){const s=this.index;this.index=u,this.cbs.ontext(this.sectionStart,u),this.index=s}this.isSpecial=!1,this.sectionStart=u+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===z.TitleEnd?this.decodeEntities&&t===I.Amp&&this.startEntity():this.fastForwardTo(I.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===I.Lt)}stateCDATASequence(t){t===z.Cdata[this.sequenceIndex]?++this.sequenceIndex===z.Cdata.length&&(this.state=x.InCommentLike,this.currentSequence=z.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=x.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===z.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=x.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Mt(t):Uc(t)}startSpecial(t,u){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=u,this.state=x.SpecialStartSequence}stateBeforeTagName(t){if(t===I.ExclamationMark)this.state=x.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===I.Questionmark)this.state=x.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const u=t|32;this.sectionStart=this.index,this.xmlMode?this.state=x.InTagName:u===z.ScriptEnd[2]?this.state=x.BeforeSpecialS:u===z.TitleEnd[2]||u===z.XmpEnd[2]?this.state=x.BeforeSpecialT:this.state=x.InTagName}else t===I.Slash?this.state=x.BeforeClosingTagName:(this.state=x.Text,this.stateText(t))}stateInTagName(t){Mt(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){ye(t)||(t===I.Gt?this.state=x.Text:(this.state=this.isTagStartChar(t)?x.InClosingTagName:x.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===I.Gt||ye(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=x.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.state=x.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===I.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=x.InSpecialTag,this.sequenceIndex=0):this.state=x.Text,this.sectionStart=this.index+1):t===I.Slash?this.state=x.InSelfClosingTag:ye(t)||(this.state=x.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===I.Gt?(this.cbs.onselfclosingtag(this.index),this.state=x.Text,this.sectionStart=this.index+1,this.isSpecial=!1):ye(t)||(this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===I.Eq||Mt(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=x.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===I.Eq?this.state=x.BeforeAttributeValue:t===I.Slash||t===I.Gt?(this.cbs.onattribend(ge.NoValue,this.sectionStart),this.sectionStart=-1,this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t)):ye(t)||(this.cbs.onattribend(ge.NoValue,this.sectionStart),this.state=x.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===I.DoubleQuote?(this.state=x.InAttributeValueDq,this.sectionStart=this.index+1):t===I.SingleQuote?(this.state=x.InAttributeValueSq,this.sectionStart=this.index+1):ye(t)||(this.sectionStart=this.index,this.state=x.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,u){t===u||!this.decodeEntities&&this.fastForwardTo(u)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(u===I.DoubleQuote?ge.Double:ge.Single,this.index+1),this.state=x.BeforeAttributeName):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,I.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,I.SingleQuote)}stateInAttributeValueNoQuotes(t){ye(t)||t===I.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(ge.Unquoted,this.index),this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===I.OpeningSquareBracket?(this.state=x.CDATASequence,this.sequenceIndex=0):this.state=t===I.Dash?x.BeforeComment:x.InDeclaration}stateInDeclaration(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=x.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=x.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===I.Dash?(this.state=x.InCommentLike,this.currentSequence=z.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=x.InDeclaration}stateInSpecialComment(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=x.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const u=t|32;u===z.ScriptEnd[3]?this.startSpecial(z.ScriptEnd,4):u===z.StyleEnd[3]?this.startSpecial(z.StyleEnd,4):(this.state=x.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){switch(t|32){case z.TitleEnd[3]:{this.startSpecial(z.TitleEnd,4);break}case z.TextareaEnd[3]:{this.startSpecial(z.TextareaEnd,4);break}case z.XmpEnd[3]:{this.startSpecial(z.XmpEnd,4);break}default:this.state=x.InTagName,this.stateInTagName(t)}}startEntity(){this.baseState=this.state,this.state=x.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?me.Strict:this.baseState===x.Text||this.baseState===x.InSpecialTag?me.Legacy:me.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===x.Text||this.state===x.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===x.InAttributeValueDq||this.state===x.InAttributeValueSq||this.state===x.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case x.Text:{this.stateText(t);break}case x.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case x.InSpecialTag:{this.stateInSpecialTag(t);break}case x.CDATASequence:{this.stateCDATASequence(t);break}case x.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case x.InAttributeName:{this.stateInAttributeName(t);break}case x.InCommentLike:{this.stateInCommentLike(t);break}case x.InSpecialComment:{this.stateInSpecialComment(t);break}case x.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case x.InTagName:{this.stateInTagName(t);break}case x.InClosingTagName:{this.stateInClosingTagName(t);break}case x.BeforeTagName:{this.stateBeforeTagName(t);break}case x.AfterAttributeName:{this.stateAfterAttributeName(t);break}case x.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case x.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case x.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case x.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case x.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case x.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case x.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case x.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case x.InDeclaration:{this.stateInDeclaration(t);break}case x.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case x.BeforeComment:{this.stateBeforeComment(t);break}case x.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case x.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===x.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===x.InCommentLike?this.currentSequence===z.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===x.InTagName||this.state===x.BeforeAttributeName||this.state===x.BeforeAttributeValue||this.state===x.AfterAttributeName||this.state===x.InAttributeName||this.state===x.InAttributeValueSq||this.state===x.InAttributeValueDq||this.state===x.InAttributeValueNq||this.state===x.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,u){this.baseState!==x.Text&&this.baseState!==x.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+u,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+u,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const Ye=new Set(["input","option","optgroup","select","button","datalist","textarea"]),P=new Set(["p"]),Fs=new Set(["thead","tbody"]),Ls=new Set(["dd","dt"]),Cs=new Set(["rt","rp"]),Xc=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",P],["h1",P],["h2",P],["h3",P],["h4",P],["h5",P],["h6",P],["select",Ye],["input",Ye],["output",Ye],["button",Ye],["datalist",Ye],["textarea",Ye],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Ls],["dt",Ls],["address",P],["article",P],["aside",P],["blockquote",P],["details",P],["div",P],["dl",P],["fieldset",P],["figcaption",P],["figure",P],["footer",P],["form",P],["header",P],["hr",P],["main",P],["nav",P],["ol",P],["pre",P],["section",P],["table",P],["ul",P],["rt",Cs],["rp",Cs],["tbody",Fs],["tfoot",Fs]]),Vc=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Ns=new Set(["math","svg"]),Ps=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),Yc=/\s|\//;class Wc{constructor(t,u={}){var s,n,r,a,i,c;this.options=u,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(s=u.lowerCaseTags)!==null&&s!==void 0?s:this.htmlMode,this.lowerCaseAttributeNames=(n=u.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=u.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((a=u.Tokenizer)!==null&&a!==void 0?a:qc)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(i=this.cbs).onparserinit)===null||c===void 0||c.call(i,this)}ontext(t,u){var s,n;const r=this.getSlice(t,u);this.endIndex=u-1,(n=(s=this.cbs).ontext)===null||n===void 0||n.call(s,r),this.startIndex=u}ontextentity(t,u){var s,n;this.endIndex=u-1,(n=(s=this.cbs).ontext)===null||n===void 0||n.call(s,Os(t)),this.startIndex=u}isVoidElement(t){return this.htmlMode&&Vc.has(t)}onopentagname(t,u){this.endIndex=u;let s=this.getSlice(t,u);this.lowerCaseTagNames&&(s=s.toLowerCase()),this.emitOpenTag(s)}emitOpenTag(t){var u,s,n,r;this.openTagStart=this.startIndex,this.tagname=t;const a=this.htmlMode&&Xc.get(t);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){const i=this.stack.shift();(s=(u=this.cbs).onclosetag)===null||s===void 0||s.call(u,i,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(Ns.has(t)?this.foreignContext.unshift(!0):Ps.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var u,s;this.startIndex=this.openTagStart,this.attribs&&((s=(u=this.cbs).onopentag)===null||s===void 0||s.call(u,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,u){var s,n,r,a,i,c,o,d;this.endIndex=u;let l=this.getSlice(t,u);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),this.htmlMode&&(Ns.has(l)||Ps.has(l))&&this.foreignContext.shift(),this.isVoidElement(l))this.htmlMode&&l==="br"&&((a=(r=this.cbs).onopentagname)===null||a===void 0||a.call(r,"br"),(c=(i=this.cbs).onopentag)===null||c===void 0||c.call(i,"br",{},!0),(d=(o=this.cbs).onclosetag)===null||d===void 0||d.call(o,"br",!1));else{const h=this.stack.indexOf(l);if(h!==-1)for(let b=0;b<=h;b++){const f=this.stack.shift();(n=(s=this.cbs).onclosetag)===null||n===void 0||n.call(s,f,b!==h)}else this.htmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=u+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var u,s;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((s=(u=this.cbs).onclosetag)===null||s===void 0||s.call(u,n,!t),this.stack.shift())}onattribname(t,u){this.startIndex=t;const s=this.getSlice(t,u);this.attribname=this.lowerCaseAttributeNames?s.toLowerCase():s}onattribdata(t,u){this.attribvalue+=this.getSlice(t,u)}onattribentity(t){this.attribvalue+=Os(t)}onattribend(t,u){var s,n;this.endIndex=u,(n=(s=this.cbs).onattribute)===null||n===void 0||n.call(s,this.attribname,this.attribvalue,t===ge.Double?'"':t===ge.Single?"'":t===ge.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const u=t.search(Yc);let s=u<0?t:t.substr(0,u);return this.lowerCaseTagNames&&(s=s.toLowerCase()),s}ondeclaration(t,u){this.endIndex=u;const s=this.getSlice(t,u);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(s);this.cbs.onprocessinginstruction(`!${n}`,`!${s}`)}this.startIndex=u+1}onprocessinginstruction(t,u){this.endIndex=u;const s=this.getSlice(t,u);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(s);this.cbs.onprocessinginstruction(`?${n}`,`?${s}`)}this.startIndex=u+1}oncomment(t,u,s){var n,r,a,i;this.endIndex=u,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,u-s)),(i=(a=this.cbs).oncommentend)===null||i===void 0||i.call(a),this.startIndex=u+1}oncdata(t,u,s){var n,r,a,i,c,o,d,l,h,b;this.endIndex=u;const f=this.getSlice(t,u-s);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(i=(a=this.cbs).ontext)===null||i===void 0||i.call(a,f),(o=(c=this.cbs).oncdataend)===null||o===void 0||o.call(c)):((l=(d=this.cbs).oncomment)===null||l===void 0||l.call(d,`[CDATA[${f}]]`),(b=(h=this.cbs).oncommentend)===null||b===void 0||b.call(h)),this.startIndex=u+1}onend(){var t,u;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let s=0;s<this.stack.length;s++)this.cbs.onclosetag(this.stack[s],!0)}(u=(t=this.cbs).onend)===null||u===void 0||u.call(t)}reset(){var t,u,s,n;(u=(t=this.cbs).onreset)===null||u===void 0||u.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(s=this.cbs).onparserinit)===null||n===void 0||n.call(s,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,u){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let s=this.buffers[0].slice(t-this.bufferOffset,u-this.bufferOffset);for(;u-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),s+=this.buffers[0].slice(0,u-this.bufferOffset);return s}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var u,s;if(this.ended){(s=(u=this.cbs).onerror)===null||s===void 0||s.call(u,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var u,s;if(this.ended){(s=(u=this.cbs).onerror)===null||s===void 0||s.call(u,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}var C;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(C||(C={}));function Hc(e){return e.type===C.Tag||e.type===C.Script||e.type===C.Style}C.Root;C.Text;C.Directive;C.Comment;C.Script;C.Style;C.Tag;C.CDATA;C.Doctype;class zn{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Jn(this,t)}}class os extends zn{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Cu extends os{constructor(){super(...arguments),this.type=C.Text}get nodeType(){return 3}}class Gn extends os{constructor(){super(...arguments),this.type=C.Comment}get nodeType(){return 8}}class Kn extends os{constructor(t,u){super(u),this.name=t,this.type=C.Directive}get nodeType(){return 1}}class ls extends zn{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Qn extends ls{constructor(){super(...arguments),this.type=C.CDATA}get nodeType(){return 4}}class Nu extends ls{constructor(){super(...arguments),this.type=C.Root}get nodeType(){return 9}}class Zn extends ls{constructor(t,u,s=[],n=t==="script"?C.Script:t==="style"?C.Style:C.Tag){super(s),this.name=t,this.attribs=u,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var u,s;return{name:t,value:this.attribs[t],namespace:(u=this["x-attribsNamespace"])===null||u===void 0?void 0:u[t],prefix:(s=this["x-attribsPrefix"])===null||s===void 0?void 0:s[t]}})}}function zc(e){return Hc(e)}function Gc(e){return e.type===C.CDATA}function Kc(e){return e.type===C.Text}function Qc(e){return e.type===C.Comment}function Zc(e){return e.type===C.Directive}function Jc(e){return e.type===C.Root}function Jn(e,t=!1){let u;if(Kc(e))u=new Cu(e.data);else if(Qc(e))u=new Gn(e.data);else if(zc(e)){const s=t?yu(e.children):[],n=new Zn(e.name,{...e.attribs},s);s.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),u=n}else if(Gc(e)){const s=t?yu(e.children):[],n=new Qn(s);s.forEach(r=>r.parent=n),u=n}else if(Jc(e)){const s=t?yu(e.children):[],n=new Nu(s);s.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),u=n}else if(Zc(e)){const s=new Kn(e.name,e.data);e["x-name"]!=null&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),u=s}else throw new Error(`Not implemented yet: ${e.type}`);return u.startIndex=e.startIndex,u.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(u.sourceCodeLocation=e.sourceCodeLocation),u}function yu(e){const t=e.map(u=>Jn(u,!0));for(let u=1;u<t.length;u++)t[u].prev=t[u-1],t[u-1].next=t[u];return t}const Bs={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class jc{constructor(t,u,s){this.dom=[],this.root=new Nu(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(s=u,u=Bs),typeof t=="object"&&(u=t,t=void 0),this.callback=t??null,this.options=u??Bs,this.elementCB=s??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Nu(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,u){const s=this.options.xmlMode?C.Tag:void 0,n=new Zn(t,u,void 0,s);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:u}=this;if(u&&u.type===C.Text)u.data+=t,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{const s=new Cu(t);this.addNode(s),this.lastNode=s}}oncomment(t){if(this.lastNode&&this.lastNode.type===C.Comment){this.lastNode.data+=t;return}const u=new Gn(t);this.addNode(u),this.lastNode=u}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Cu(""),u=new Qn([t]);this.addNode(u),t.parent=u,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,u){const s=new Kn(t,u);this.addNode(s)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const u=this.tagStack[this.tagStack.length-1],s=u.children[u.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),u.children.push(t),s&&(t.prev=s,s.next=t),t.parent=u,this.lastNode=null}}function eo(e,t){const u=new jc(void 0,t);return new Wc(u,t).end(e),u.root}const jn=e=>{let t="";return e.italic&&(t="italic "),e.bold&&(t+="bold "),`${t}${e.size}px '${e.font}',sans-serif`},Pu=(e,t)=>{ot(0);const u=e.lineTable.length;Pe.font=jn(t);const s=Pe.measureText(""),n={mode:"break",text:"",x:0,y:0,w:0,h:s.fontBoundingBoxAscent+s.fontBoundingBoxDescent,line:u,textFormat:t.toObject()};e.heightTable[u]=0,e.ascentTable[u]=0,e.widthTable[u]=0,e.lineTable.push(n),e.textTable.push(n)},to=e=>{const t=e.heightTable.length-1;for(let u=1;u<t;++u){if(e.heightTable[u]>0)continue;const n=e.lineTable[u];n&&(e.heightTable[u]=n.h=e.heightTable[u-1])}},er=e=>{let t=0;return e.leftMargin&&(t+=e.leftMargin),e.rightMargin&&(t+=e.rightMargin),t},uo=(e,t,u,s)=>{let n=u.lineTable.length-1;const r=s.width-er(t)-4;for(let a=0;a<e.length;++a){const i=s.textFormats?s.textFormats.shift():t,c=e[a],o={mode:"text",text:c,x:0,y:0,w:0,h:0,line:n,textFormat:i.toObject()};Pe.font=jn(i);const d=Pe.measureText(c||""),l=i.letterSpacing?d.width+i.letterSpacing:d.width,h=i.leading?d.fontBoundingBoxAscent+d.fontBoundingBoxDescent+i.leading:d.fontBoundingBoxAscent+d.fontBoundingBoxDescent;if(o.x=0,o.y=d.fontBoundingBoxAscent,o.w=l,o.h=h,ot(yt()+l),s.wordWrap&&yt()>r){ot(l),n++,o.line=n;const b={mode:"wrap",text:"",x:0,y:0,w:0,h:0,line:n,textFormat:i.toObject()};let f=1,p=!0;const $=/[0-9a-zA-Z?!;:.,?!。、;:〜]/g;for(;;){const g=u.textTable.length-f;if(0>=g){p=!1,f=0;break}const R=u.textTable[g];if(!R){p=!1,f=0;break}if(R.mode!=="text"){p=!1;break}if(R.text===" "){f--;break}if(!R.text.match($)){f--;break}f++}if(u.widthTable[n]=0,u.heightTable[n]=0,u.ascentTable[n]=0,f>0&&p){const g=u.textTable.length-f;u.textTable.splice(g,0,b),u.lineTable.push(b);const R=n-1;u.widthTable[R]=0,u.heightTable[R]=0,u.ascentTable[R]=0;for(let S=0;S<g;++S){const k=u.textTable[S];k&&k.line===R&&k.mode==="text"&&(u.widthTable[R]+=k.w,u.heightTable[R]=Math.max(u.heightTable[R],k.h),u.ascentTable[R]=Math.max(u.ascentTable[R],k.y))}ot(0);for(let S=g+1;S<u.textTable.length;++S){const k=u.textTable[S];k.line=n,ot(yt()+k.w)}}else u.textTable.push(b),u.lineTable.push(b)}u.widthTable[n]=yt(),u.heightTable[n]=Math.max(u.heightTable[n],h),u.ascentTable[n]=Math.max(u.ascentTable[n],o.y),u.textTable.push(o)}},so=e=>{const t=e.trim().split(";"),u=[];for(let s=0;s<t.length;++s){const n=t[s];if(!n)continue;const r=n.split(":"),a=r[0].trim(),i=r[1].trim();switch(a){case"font-size":u.push({name:"size",value:parseInt(i)});break;case"font-family":u.push({name:"face",value:i.replace(/'|"/g,"")});break;case"letter-spacing":u.push({name:"letterSpacing",value:parseInt(i)});break;case"margin-bottom":u.push({name:"leading",value:parseInt(i)});break;case"margin-left":u.push({name:"leftMargin",value:parseInt(i)});break;case"margin-right":u.push({name:"rightMargin",value:parseInt(i)});break;case"color":case"align":u.push({name:a,value:i});break;case"text-decoration":case"font-weight":case"font-style":u.push({name:i,value:!0});break}}return u},Bu=(e,t,u)=>{for(let s=0;s<e.length;++s){const n=e[s];switch(n.name){case"style":Bu(so(n.value),t,u);break;case"align":t.align=n.value;break;case"face":t.font=n.value;break;case"size":t.size=+n.value,u.subFontSize&&(t.size-=u.subFontSize,1>t.size&&(t.size=1));break;case"color":t.color=Qe(n.value);break;case"letterSpacing":t.letterSpacing=parseInt(n.value);break;case"leading":t.leading=parseInt(n.value);break;case"leftMargin":t.leftMargin=parseInt(n.value);break;case"rightMargin":t.rightMargin=parseInt(n.value);break;case"underline":t.underline=!0;break;case"bold":t.bold=!0;break;case"italic":t.italic=!0;break}}},Du=(e,t,u,s)=>{for(let n=0;n<e.children.length;++n){const r=e.children[n];if(r.nodeType===3){uo(r.nodeValue||"",t,u,s);continue}const a=t.clone();switch(r.name.toUpperCase()){case"DIV":case"P":Bu(r.attributes,a,s),s.multiline&&Pu(u,a),Du(r,a,u,s);continue;case"U":a.underline=!0;break;case"B":a.bold=!0;break;case"I":a.italic=!0;break;case"FONT":case"SPAN":Bu(r.attributes,a,s);break;case"BR":if(!s.multiline)continue;Pu(u,a);break}Du(r,a,u,s)}},no=(e,t,u)=>{const s=new Rc;if(!e)return s;const n=e.trim().replace(/\r?\n/g,"").replace(/\t/g,""),r=t.clone();return u.subFontSize&&u.subFontSize>0&&r.size&&(r.size-=u.subFontSize,1>r.size&&(r.size=1)),Pu(s,r),Du(eo(n),r,s,u),to(s),s},q=(e,t=0)=>(e.$textData||(e.$textData=no(e.htmlText,e.defaultTextFormat,{width:e.width,multiline:e.multiline,wordWrap:e.wordWrap,subFontSize:t,textFormats:e.$textFormats})),e.$textData),_=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&_(t)},_u=e=>{e.$textData=null,_(e),e.uniqueKey!==""&&O.has(e.uniqueKey)&&(O.removeById(e.uniqueKey),O.$removeIds.push(+e.uniqueKey))},ro=e=>{if(_(e),e.autoSize==="none"){e.xMin=e.bounds.xMin,e.yMin=e.bounds.yMin,e.xMax=e.bounds.xMax,e.yMax=e.bounds.yMax;return}const t=e.defaultTextFormat,u=e.textWidth+4+er(t);if(e.wordWrap)e.xMin=e.bounds.xMin,e.xMax=e.bounds.xMax;else switch(e.autoSize){case"left":e.xMax=u+e.xMin;break;case"center":e.xMax=u+e.xMin;break;case"right":e.xMax=e.bounds.xMax-(e.bounds.xMax-e.bounds.xMin-(u-e.bounds.xMin));break}e.yMax=e.textHeight+e.bounds.yMin+4},ao=e=>{let t=0;const u=q(e);for(let n=0;n<u.textTable.length;++n){const r=u.textTable[n];t=Math.max(t,r.textFormat.size||0)}let s=1;if(e.width&&e.textWidth)for(;t>s&&e.textWidth+4>e.width;)_u(e),q(e,s++);if(e.height&&e.textHeight)for(;t>s&&e.textHeight+4>e.height;)_u(e),q(e,s++);_(e)},Te=e=>{_u(e),q(e),e.autoSize==="none"&&e.autoFontSize&&ao(e),ro(e)},io=(e,t)=>{const u=q(e);if(2>u.textTable.length)return;let s=2,n=0;for(let h=1;h<u.textTable.length;++h){const b=u.textTable[h];if(!b)continue;let f=!1;if(b.mode==="text"&&(f=!0,s+=b.w),n>=t){n=h;break}b.mode==="break"&&(f=!0,s=2),f&&n++}const r=u.textTable[n];if(!r)return;e.$scrollX=e.$scrollY=0;const a=r.line;let i=0;for(let h=0;h<=a;++h)i+=u.heightTable[h];const c=Math.abs(e.yMax-e.yMin);let o=0;for(let h=a;h>-1;--h){const b=u.heightTable[h];if(c<o+b)break;o+=b}if(i>c){const h=(e.textHeight-c)/c;e.$scrollY=Math.max(0,Math.min((i-o)/h,c))}const d=Math.abs(e.xMax-e.xMin);let l=0;for(let h=n;h>0;--h){const b=u.textTable[h];if(b.mode==="text"){if(d<l+b.w)break;l+=b.w}}if(s>d){const h=(e.textWidth-d)/d;e.$scrollX=Math.max(0,Math.min((s-l)/h,d+.5))}_(e)},ae=()=>{const e=_t();e!==void 0&&clearTimeout(e),Hn(void 0)},co=window.devicePixelRatio,oo=e=>{const t=e.localToGlobal(new J),u=e.$textData;if(u){const n=u.textTable[e.focusIndex];if(n){for(let a=e.focusIndex-1;a>-1;--a){const i=u.textTable[a];if(!i||i.line!==n.line)break;t.x+=i.w}const r=n.mode==="break"?n.line-1:n.line;for(let a=0;a<r;++a)t.y+=u.heightTable[a]}}const s=T.rendererScale/co;ie.style.left=`${ze.x+t.x*s}px`,ie.style.top=`${ze.y+t.y*s}px`},le=e=>{e.focusVisible=!e.focusVisible,_(e),Hn(setTimeout(()=>le(e),500)),oo(e)},lo=(e,t)=>{e.willTrigger(t)&&e.dispatchEvent(new De(t)),ie.value="",e.focus?(setTimeout(()=>{ie.focus()},300),_t()===void 0&&(e.focusIndex===-1&&(e.focusIndex=1,e.selectIndex=-1),le(e))):(e.focusIndex=-1,e.selectIndex=-1,e.focusVisible=!1,ae(),ie.blur()),_(e)},ho=(e,t,u,s)=>e/s*u+t,fo=(e,t,u,s)=>(e/=s)*e*u+t,bo=(e,t,u,s)=>-(e/=s)*(e-2)*u+t,$o=(e,t,u,s)=>(e/=s/2)<1?e*e*u/2+t:-((e-=1)*(e-2)-1)*u/2+t,xo=(e,t,u,s)=>(e/=s)*e*e*u+t,mo=(e,t,u,s)=>(e/=s,(--e*e*e+1)*u+t),go=(e,t,u,s)=>(e/=s/2)<1?e*e*e*u/2+t:((e-=2)*e*e+2)*u/2+t,po=(e,t,u,s)=>(e/=s)*e*e*e*u+t,To=(e,t,u,s)=>(e/=s,(--e*e*e*e-1)*-u+t),Eo=(e,t,u,s)=>(e/=s/2)<1?e*e*e*e*u/2+t:((e-=2)*e*e*e-2)*-u/2+t,yo=(e,t,u,s)=>(e/=s)*e*e*e*e*u+t,Mo=(e,t,u,s)=>(e/=s,(--e*e*e*e*e+1)*u+t),wo=(e,t,u,s)=>(e/=s/2)<1?e*e*e*e*e*u/2+t:((e-=2)*e*e*e*e+2)*u/2+t,Ao=(e,t,u,s)=>-u*Math.cos(e/s*(Math.PI/2))+u+t,vo=(e,t,u,s)=>u*Math.sin(e/s*(Math.PI/2))+t,Io=(e,t,u,s)=>-u/2*(Math.cos(Math.PI*e/s)-1)+t,So=(e,t,u,s)=>u*Math.pow(2,10*(e/s-1))+t,Ro=(e,t,u,s)=>u*(-Math.pow(2,-10*e/s)+1)+t,ko=(e,t,u,s)=>(e/=s/2)<1?u/2*Math.pow(2,10*(e-1))+t:u/2*(-Math.pow(2,-10*(e-1))+2)+t,Oo=(e,t,u,s)=>(1-Math.sqrt(1-(e/=s)*e))*u+t,Fo=(e,t,u,s)=>(e/=s,Math.sqrt(1- --e*e)*u+t),Lo=(e,t,u,s)=>(e/=s*2)<1?(Math.sqrt(1-e*e)-1)/-2*u+t:(Math.sqrt(1-(e-=2)*e)+1)/2*u+t,Co=(e,t,u,s)=>(2.70158*(e/=s)*e*e-1.70158*e*e)*u+t,No=(e,t,u,s)=>(1+2.70158*Math.pow((e/=s)-1,3)+1.70158*Math.pow(e-1,2))*u+t,Po=(e,t,u,s)=>{let n=1.70158;return(e/=s/2)<1?e*e*(((n*=1.525)+1)*e-n)*u/2+t:((e-=2)*e*(((n*=1.525)+1)*e+n)+2)*u/2+t},Bo=(e,t,u,s)=>(e/=s)===0?t:e===1?u+t:-Math.pow(2,(e*=10)-10)*Math.sin((e-10.75)*(2*Math.PI/3))*u+t,Do=(e,t,u,s)=>(e/=s)===0?t:e===1?u+t:(Math.pow(2,-10*e)*Math.sin((e*10-.75)*(2*Math.PI/3))+1)*u+t,_o=(e,t,u,s)=>(e/=s)===0?t:e===1?u+t:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5)))/2*u+t:(Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1)*u+t,Uo=(e,t,u,s)=>(e/=s)<1/2.75?7.5625*e*e*u+t:e<2/2.75?(7.5625*(e-=1.5/2.75)*e+.75)*u+t:e<2.5/2.75?(7.5625*(e-=2.25/2.75)*e+.9375)*u+t:(7.5625*(e-=2.625/2.75)*e+.984375)*u+t,qo=(e,t,u,s)=>u-_e.outBounce(s-e,0,u,s)+t,Xo=(e,t,u,s)=>e<s/2?_e.inBounce(e*2,t,u/2,s):_e.outBounce(e*2-s,t+u/2,u/2,s);class _e{static linear(t,u,s,n){return ho(t,u,s,n)}static inQuad(t,u,s,n){return fo(t,u,s,n)}static outQuad(t,u,s,n){return bo(t,u,s,n)}static inOutQuad(t,u,s,n){return $o(t,u,s,n)}static inCubic(t,u,s,n){return xo(t,u,s,n)}static outCubic(t,u,s,n){return mo(t,u,s,n)}static inOutCubic(t,u,s,n){return go(t,u,s,n)}static inQuart(t,u,s,n){return po(t,u,s,n)}static outQuart(t,u,s,n){return To(t,u,s,n)}static inOutQuart(t,u,s,n){return Eo(t,u,s,n)}static inQuint(t,u,s,n){return yo(t,u,s,n)}static outQuint(t,u,s,n){return Mo(t,u,s,n)}static inOutQuint(t,u,s,n){return wo(t,u,s,n)}static inSine(t,u,s,n){return Ao(t,u,s,n)}static outSine(t,u,s,n){return vo(t,u,s,n)}static inOutSine(t,u,s,n){return Io(t,u,s,n)}static inExpo(t,u,s,n){return So(t,u,s,n)}static outExpo(t,u,s,n){return Ro(t,u,s,n)}static inOutExpo(t,u,s,n){return ko(t,u,s,n)}static inCirc(t,u,s,n){return Oo(t,u,s,n)}static outCirc(t,u,s,n){return Fo(t,u,s,n)}static inOutCirc(t,u,s,n){return Lo(t,u,s,n)}static inBack(t,u,s,n){return Co(t,u,s,n)}static outBack(t,u,s,n){return No(t,u,s,n)}static inOutBack(t,u,s,n){return Po(t,u,s,n)}static inElastic(t,u,s,n){return Bo(t,u,s,n)}static outElastic(t,u,s,n){return Do(t,u,s,n)}static inOutElastic(t,u,s,n){return _o(t,u,s,n)}static outBounce(t,u,s,n){return Uo(t,u,s,n)}static inBounce(t,u,s,n){return qo(t,u,s,n)}static inOutBounce(t,u,s,n){return Xo(t,u,s,n)}}const Vo=e=>{cancelAnimationFrame(e.$timerId),e.hasEventListener(xe.STOP)&&e.dispatchEvent(new xe(xe.STOP)),e.entries=null,e.stopFlag=!0},tr=e=>{const t=[];for(const[u,s]of Object.entries(e))t.push({name:u,value:typeof s=="number"?s:tr(s)});return t},ur=(e,t,u,s,n)=>{for(let r=0;r<n.length;++r){const a=n[r];if(!a)continue;const i=a.name;if(!(i in t)||!(i in s))continue;if(typeof a.value!="number"){ur(e,t[i],u[i],s[i],a.value);continue}const c=u[i];e.duration>e.currentTime?t[i]=e.ease(e.currentTime,c,s[i]-c,e.duration):t[i]=s[i]}},sr=(e,t)=>e.stopFlag||!e.entries?-1:(e.currentTime=(t-e.startTime)/1e3,ur(e,e.target,e.from,e.to,e.entries),e.hasEventListener(xe.UPDATE)&&e.dispatchEvent(new xe(xe.UPDATE)),e.currentTime>=e.duration?(e.hasEventListener(xe.COMPLETE)&&e.dispatchEvent(new xe(xe.COMPLETE)),e.nextJob&&e.nextJob.start(),-1):requestAnimationFrame(u=>{sr(e,u)})),Ds=e=>{e.stopFlag||(e.entries=tr(e.from),e.entries&&(e.startTime=performance.now(),e.$timerId=sr(e,e.startTime)))},Yo=e=>{cancelAnimationFrame(e.$timerId),e.stopFlag=!1,e.delay?setTimeout(()=>{Ds(e)},e.delay*1e3):Ds(e)};class Wo extends je{target;entries;startTime;stopFlag;$timerId;delay;duration;ease;from;to;currentTime;nextJob;constructor(t,u,s,n=0,r=1,a=null){super(),this.target=t,this.from=u,this.to=s,this.delay=n,this.duration=r,this.ease=a||_e.linear,this.currentTime=0,this.nextJob=null,this.entries=null,this.startTime=0,this.stopFlag=!1,this.$timerId=-1}chain(t){return this.nextJob=t,t}start(){Yo(this)}stop(){Vo(this)}}class hs{static add(t,u,s,n=0,r=1,a=null){return new Wo(t,u,s,n,r,a)}}const Ho=(e,t)=>{if(!e.scrollEnabled||e.autoSize!=="none"||e.yScrollShape.hasLocalVariable("job"))return;const u=e.width;if(t=ht(t,0,u,0),e.scrollX!==t){if(e.textWidth>u){_(e);const s=e.xScrollShape;s.width=u*u/e.textWidth;const n=e.parent;if(n){s.hasLocalVariable("job")&&s.getLocalVariable("job").stop(),s.alpha=.9,s.x=e.x+1+(u-1-s.width)/(u-1)*(t-1),s.y=e.y+e.height-s.height-.5,n.addChildAt(s,n.getChildIndex(e)+1);const r=hs.add(s,{alpha:.9},{alpha:0},.5,.2,_e.outQuad);r.addEventListener(m.COMPLETE,a=>{const i=a.target.target;i.deleteLocalVariable("job"),i.parent&&i.parent.removeChild(i)}),r.start(),s.setLocalVariable("job",r)}e.$scrollX=t}e.willTrigger(m.SCROLL)&&e.dispatchEvent(new m(m.SCROLL,!0))}},zo=(e,t)=>{if(!e.scrollEnabled||e.autoSize!=="none"||!e.multiline&&!e.wordWrap||e.xScrollShape.hasLocalVariable("job"))return;const u=e.height;if(t=ht(t,0,u,0),e.scrollY!==t){if(e.textHeight>u){_(e);const s=e.yScrollShape;s.height=u*u/e.textHeight;const n=e.parent;if(n){s.hasLocalVariable("job")&&s.getLocalVariable("job").stop(),s.alpha=.9,s.x=e.x+e.width-s.width-.5,s.y=e.y+.5+(u-1-s.height)/(u-1)*(t-1),n.addChildAt(s,n.getChildIndex(e)+1);const r=hs.add(s,{alpha:.9},{alpha:0},.5,.2,_e.outQuad);r.addEventListener(m.COMPLETE,a=>{const i=a.target.target;i.deleteLocalVariable("job"),i.parent&&i.parent.removeChild(i)}),r.start(),s.setLocalVariable("job",r),e.$scrollY=t}}e.willTrigger(m.SCROLL)&&e.dispatchEvent(new m(m.SCROLL,!0))}},Go=e=>{let t="";const u=q(e);for(let s=1;s<u.textTable.length;++s){const n=u.textTable[s];if(n)switch(n.mode){case"text":t+=n.text;break;case"break":t+="\r";break;default:continue}}return t},Ko=(e,t)=>{let u="";const s=q(e);for(let n=1;n<s.textTable.length;n++){const r=s.textTable[n];if(r){if(r.line>t)break;r.line===t&&r.mode==="text"&&(u+=r.text)}}return u},Qo=(e,t,u,s)=>{if(0>u||u>s)return;const n=e.text,r=u?n.slice(0,u):"";e.text=r+t+n.slice(s,n.length)},Zo=async e=>{if(e.focusIndex===-1||e.selectIndex===-1)return;let t="";const u=Math.min(e.focusIndex,e.selectIndex),s=Math.max(e.focusIndex,e.selectIndex)+1,n=q(e);for(let r=u;r<s;++r){const a=n.textTable[r];if(a)switch(a.mode){case"text":t+=a.text;break;case"break":t+=`
657
+ }\`},Ic=(t,e,s,n)=>{const o=_a(n,t,e,s);if(es.has(o))return es.get(o);const r=(n?14:5)+1,a=r-1,l=new Z(pe(r,!0,!1,n),Wa(r,a,t,e,s));return es.set(o,l),l},Cc=(t,e,s,n,o=0,r=null,a=null)=>{const l=t.highp;l[0]=s[0],l[1]=s[1],l[2]=s[2],l[4]=s[3],l[5]=s[4],l[6]=s[5],l[8]=s[6],l[9]=s[7],l[10]=s[8],l[12]=n[0],l[13]=n[1],l[14]=n[2],l[16]=n[3],l[17]=n[4],l[18]=n[5],l[11]=n[6],l[15]=n[7],l[19]=n[8],l[3]=it(),l[7]=ut();let h=20;a&&(l[20]=a[0],l[21]=a[1],l[22]=0,l[24]=a[2],l[25]=a[3],l[26]=0,l[28]=a[4],l[29]=a[5],l[30]=1,l[32]=a[6],l[33]=a[7],l[34]=0,l[36]=a[8],l[37]=a[9],l[38]=0,l[40]=a[10],l[41]=a[11],l[42]=1,l[31]=a[12],l[35]=a[13],l[39]=a[14],l[43]=a[15],l[44]=a[16],l[45]=a[17],l[46]=a[18],l[47]=a[19],l[48]=a[20],l[49]=a[21],l[50]=a[22],l[51]=a[23],l[52]=a[24],l[53]=a[25],h=56),e===0?(l[h++]=r[0],l[h++]=r[1],l[h++]=r[2],l[h]=r[3]):(l[h++]=819.2,l[h]=Zt(o,-.975,.975,0))},ja=(t,e,s,n)=>{const o=tt.shift(),r=tt.shift(),a=tt.shift(),l=tt.shift();c.disable(c.STENCIL_TEST);const h=Bc(o,l);z(h),c.enable(c.STENCIL_TEST),c.frontFace(c.CCW),c.stencilMask(255),c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const f=!!n,i=ie(f);n&&ue(i,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(i,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0);const E=Ic(!1,!1,a,f),$=zc(r),v=Be(A.$matrix);Cc(E,0,A.$matrix,v,0,$,n),Ms($),Qt(v),nt(E,t,e,s)},Ha=(t,e,s,n)=>{const o=tt.shift(),r=tt.shift(),a=tt.shift(),l=tt.shift(),h=tt.shift();c.disable(c.STENCIL_TEST);const f=Bc(o,l);z(f),c.enable(c.STENCIL_TEST),c.frontFace(c.CCW),c.stencilMask(255),c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const i=!!n,E=ie(i);n&&ue(E,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(E,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0),A.save(),A.transform(r[0],r[1],r[2],r[3],r[4],r[5]);const $=A.$stack[A.$stack.length-1],v=Be(A.$matrix),T=Ic(!0,!!h,a,i);Cc(T,1,$,v,h,n),A.restore(),Qt(v),nt(T,t,e,s)},ss=new Map,Ka=(t,e)=>{const s=\`b\${t?"y":"n"}\${e?"y":"n"}\`;if(ss.has(s))return ss.get(s);const n=t?Bo():wo(),o=new Z(pe(e?14:5,!0,!1,e),n);return ss.set(s,o),o},Za=(t,e,s,n)=>{const o=t.highp,r=A.$stack[A.$stack.length-1];o[0]=r[0],o[1]=r[1],o[2]=r[2],o[4]=r[3],o[5]=r[4],o[6]=r[5],o[8]=r[6],o[9]=r[7],o[10]=r[8];const a=Be(A.$matrix);o[12]=a[0],o[13]=a[1],o[14]=a[2],o[16]=a[3],o[17]=a[4],o[18]=a[5],o[11]=a[6],o[15]=a[7],o[19]=a[8],o[3]=it(),o[7]=ut(),n&&(o[20]=n[0],o[21]=n[1],o[22]=0,o[24]=n[2],o[25]=n[3],o[26]=0,o[28]=n[4],o[29]=n[5],o[30]=1,o[32]=n[6],o[33]=n[7],o[34]=0,o[36]=n[8],o[37]=n[9],o[38]=0,o[40]=n[10],o[41]=n[11],o[42]=1,o[31]=n[12],o[35]=n[13],o[39]=n[14],o[43]=n[15],o[44]=n[16],o[45]=n[17],o[46]=n[18],o[47]=n[19],o[48]=n[20],o[49]=n[21],o[50]=n[22],o[51]=n[23],o[52]=n[24],o[53]=n[25]);const l=t.mediump;l[0]=e,l[1]=s},Qa=(t,e,s,n)=>{c.stencilFunc(c.ALWAYS,0,255),c.stencilOpSeparate(c.FRONT,c.KEEP,c.KEEP,c.INCR_WRAP),c.stencilOpSeparate(c.BACK,c.KEEP,c.KEEP,c.DECR_WRAP),c.colorMask(!1,!1,!1,!1);const o=!!n,r=ie(o);n&&ue(r,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(r,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE);const a=Rt.shift(),l=Rt.shift(),h=Rt.shift(),f=Rt.shift(),i=Rt.shift(),E=Rt.shift(),$=Qe(h,f,a,E);A.save(),A.transform(l[0],l[1],l[2],l[3],l[4],l[5]),c.stencilFunc(c.NOTEQUAL,0,255),c.stencilOp(c.KEEP,c.ZERO,c.ZERO),c.colorMask(!0,!0,!0,!0);const v=Ka(i,o);Za(v,h,f,n),nt(v,t,e,s),A.restore(),D($)},Ja=()=>{const t=ec();c.enable(c.STENCIL_TEST),c.frontFace(c.CCW),c.stencilMask(255);let e=0,s=null;for(let n=0;n<bt.length;n++)switch(_t.has(n)&&(s=_t.get(n)),bt[n]){case"fill":{const r=q.shift();Da(t,e,r,s),e+=r}break;case"linear":{const r=q.shift();ja(t,e,r,s),e+=r}break;case"radial":{const r=q.shift();Ha(t,e,r,s),e+=r}break;case"bitmap":{const r=q.shift();Qa(t,e,r,s),e+=r}break}c.disable(c.STENCIL_TEST),sc(t),Hs(),qs()};let cs=0;const Lc=new Float32Array(256);for(let t=1;t<256;t++)Lc[t]=255/t;const qa=async(t,e)=>{const s=Ec(0,0,t,e);z(s),c.bindFramebuffer(c.FRAMEBUFFER,un()),c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,s.resource,0);const n=new Uint8Array(t*e*4),o=A.$mainAttachmentObject;n.byteLength>cs&&(cs=$e(n.byteLength),c.bufferData(c.PIXEL_PACK_BUFFER,cs,c.STREAM_READ)),c.readPixels(0,o.height-e,t,e,c.RGBA,c.UNSIGNED_BYTE,0);const r=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);await new Promise(a=>{const l=()=>{if(c.clientWaitSync(r,c.SYNC_FLUSH_COMMANDS_BIT,0)===c.TIMEOUT_EXPIRED){requestAnimationFrame(l);return}return c.deleteSync(r),c.getBufferSubData(c.PIXEL_PACK_BUFFER,0,n),a()};l()}),c.bindFramebuffer(c.FRAMEBUFFER,ft);for(let a=0;a<n.length;a+=4){const l=n[a+3];if(l===0||l===255)continue;const h=Lc[l];n[a]=Math.min(255,Math.round(n[a]*h)),n[a+1]=Math.min(255,Math.round(n[a+1]*h)),n[a+2]=Math.min(255,Math.round(n[a+2]*h))}return await createImageBitmap(new ImageData(new Uint8ClampedArray(n),t,e),{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"})};class tl{$stack;$matrix;$clearColorR;$clearColorG;$clearColorB;$clearColorA;$mainAttachmentObject;$stackAttachmentObject;globalAlpha;globalCompositeOperation;imageSmoothingEnabled;$fillStyle;$strokeStyle;maskBounds;thickness;caps;joints;miterLimit;constructor(e,s,n=1){Dc(e),Pc(e.getParameter(e.MAX_TEXTURE_SIZE)),Uc(s),Vc(n),this.$stack=be(),this.$stackAttachmentObject=be(),this.$matrix=we(1,0,0,0,1,0,0,0,1),this.$clearColorR=0,this.$clearColorG=0,this.$clearColorB=0,this.$clearColorA=0,this.thickness=1,this.caps=1,this.joints=2,this.miterLimit=0,this.$mainAttachmentObject=null,this.globalAlpha=1,this.globalCompositeOperation="normal",this.imageSmoothingEnabled=!1,this.$fillStyle=new Float32Array([1,1,1,1]),this.$strokeStyle=new Float32Array([1,1,1,1]),this.maskBounds={xMin:0,yMin:0,xMax:0,yMax:0},e.pixelStorei(e.UNPACK_ALIGNMENT,1),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),nn(e),on(e),rn(e,_s()),an(e),fr(e),$r(),ta(e),Xc(this)}clearTransferBounds(){Fn()}updateBackgroundColor(e,s,n,o){tn(this,e,s,n,o)}fillBackgroundColor(){en(this.$clearColorR,this.$clearColorG,this.$clearColorB,this.$clearColorA)}resize(e,s,n=!0){Sn(this,e,s,n)}clearRect(e,s,n,o){wn(e,s,n,o)}bind(e){Cn(this,e)}save(){Ln(this)}restore(){kn(this)}setTransform(e,s,n,o,r,a){Nn(this.$matrix,e,s,n,o,r,a)}transform(e,s,n,o,r,a){Pn(this,e,s,n,o,r,a)}reset(){Un(this)}beginPath(){Dn(this),Hc()}moveTo(e,s){Ee(e,s)}lineTo(e,s){Zc(e,s)}quadraticCurveTo(e,s,n,o){ms(e,s,n,o)}fillStyle(e,s,n,o){this.$fillStyle[0]=e,this.$fillStyle[1]=s,this.$fillStyle[2]=n,this.$fillStyle[3]=o}strokeStyle(e,s,n,o){this.$strokeStyle[0]=e,this.$strokeStyle[1]=s,this.$strokeStyle[2]=n,this.$strokeStyle[3]=o}closePath(){Qc()}arc(e,s,n){qc(e,s,n)}bezierCurveTo(e,s,n,o,r,a){te(e,s,n,o,r,a)}fill(){Wn("fill")}gradientFill(e,s,n,o,r,a){jn(e,s,n,o,r,a)}bitmapFill(e,s,n,o,r,a){yr(e,s,n,o,r,a)}stroke(){gr()}gradientStroke(e,s,n,o,r,a){oo(e,s,n,o,r,a)}bitmapStroke(e,s,n,o,r,a){Rr(e,s,n,o,r,a)}clip(){ko()}get currentAttachmentObject(){return Bs()}get atlasAttachmentObject(){return mn()}createNode(e,s){return lc(e,s)}removeNode(e){Do(e)}beginNodeRendering(e){ka(e),Xn(e.x,e.y,e.w,e.h)}endNodeRendering(){_n()}drawFill(){Ja()}drawDisplayObject(e,s,n,o,r,a){Na(e),cr(e,s,n,o,r,a)}drawArraysInstanced(){ur()}clearArraysInstanced(){nr()}transferMainCanvas(){br()}drawPixels(e,s){xr(e,s)}drawElement(e,s){Mr(e,s)}beginMask(){Er()}setMaskBounds(e,s,n,o){Tr(e,s,n,o)}endMask(){Pe()}leaveMask(){this.drawArraysInstanced(),Ar()}useGrid(e){ro(e)}applyFilter(e,s,n,o,r,a,l,h,f,i,E){this.drawArraysInstanced(),La(e,s,n,o,r,a,l,h,f,i,E)}async createImageBitmap(e,s){return await qa(e,s)}}const el=4;let x;const sl=t=>{x=t};let ns;const cl=t=>{ns=t};let os=0;const nl=()=>os;let rs=0;const ol=()=>rs;let as=!1;const rl=(t,e)=>{as=!0,os=t,rs=e},al=()=>as,ll=()=>{ns.width=os,ns.height=rs,as=!1},il=[],kc=(...t)=>{const e=il.pop()||[];return t.length&&e.push(...t),e},jt=(t,e=1)=>({R:(t&16711680)>>16,G:(t&65280)>>8,B:t&255,A:e*255}),ul=(t,e)=>{cl(t);const s=t.getContext("webgl2",{stencil:!0,premultipliedAlpha:!0,antialias:!1,depth:!1});if(!s)throw new Error("webgl2 is not supported.");sl(new tl(s,el,e))},hl=(t,e,s=!0)=>{nl()===t&&ol()===e||(rl(t,e),x.resize(t,e,s),s&&_.reset())},fl=0,bl=1,$l=2,El=3,Tl=4,Al=5,xl=6,vl=7,Ml=8,yl=9,Rl=10,gl=11,pl=12,Ol=13,ml=14,ls=(t,e=!1)=>{let s=0;for(;t.length>s;)switch(t[s++]){case yl:x.beginPath();break;case fl:x.moveTo(t[s++],t[s++]);break;case $l:x.lineTo(t[s++],t[s++]);break;case bl:x.quadraticCurveTo(t[s++],t[s++],t[s++],t[s++]);break;case Al:if(e){s+=4;break}x.fillStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case vl:x.fill();break;case xl:if(e){s+=8;break}x.thickness=t[s++],x.caps=t[s++],x.joints=t[s++],x.miterLimit=t[s++],x.strokeStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case Ml:if(e)break;x.stroke();break;case pl:x.closePath();break;case Tl:x.arc(t[s++],t[s++],t[s++]);break;case El:x.bezierCurveTo(t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]);break;case Rl:{if(e){s+=1;const i=t[s++];s+=i*5,s+=9,x.fill();break}const n=t[s++],o=kc(),r=t[s++];for(let i=0;i<r;++i)o.push(t[s++],t[s++],t[s++],t[s++],t[s++]);const a=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]),l=t[s++],h=t[s++],f=t[s++];x.gradientFill(n,o,a,l,h,f)}break;case Ol:{if(e){s+=2;const h=t[s++];s+=h,s+=8,x.fill();break}const n=t[s++],o=t[s++],r=t[s++],a=new Uint8Array(t.subarray(s,s+r));s+=r;const l=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]);x.bitmapFill(a,l,n,o,!!t[s++],!!t[s++])}break;case gl:{if(e){s+=20,x.fill();break}x.thickness=t[s++],x.caps=t[s++],x.joints=t[s++],x.miterLimit=t[s++];const n=t[s++],o=kc(),r=t[s++];for(let i=0;i<r;++i)o.push(t[s++],t[s++],t[s++],t[s++],t[s++]);const a=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]),l=t[s++],h=t[s++],f=t[s++];x.gradientStroke(n,o,a,l,h,f)}break;case ml:{if(e){s+=6;const h=t[s++];s+=h,s+=8,x.fill();break}x.thickness=t[s++],x.caps=t[s++],x.joints=t[s++],x.miterLimit=t[s++];const n=t[s++],o=t[s++],r=t[s++],a=new Uint8Array(t.subarray(s,s+r));s+=r;const l=new Float32Array([t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]]);x.bitmapStroke(a,l,n,o,!!t[s++],!!t[s++])}break}},Ht=t=>{switch(t){case 0:return"copy";case 1:return"add";case 2:return"alpha";case 3:return"darken";case 4:return"difference";case 5:return"erase";case 6:return"hardlight";case 7:return"invert";case 8:return"layer";case 9:return"lighten";case 10:return"multiply";case 11:return"normal";case 12:return"overlay";case 13:return"screen";case 14:return"subtract";default:return"normal"}},is=(t,e)=>{const s=t.subarray(e,e+6);e+=6;const n=t.subarray(e,e+8);e+=8;const o=t.subarray(e,e+4);e+=4;const r=t[e++],a=t[e++],l=t[e++],h=t[e++],f=!!t[e++],i=!!t[e++],E=!!t[e++],$=\`\${t[e++]}\`,v=t[e++],T=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(s[2]*s[2]+s[3]*s[3]);let g;if(t[e++]){if(g=_.get($,\`\${v}\`),!g)return e}else{const m=f?new Float32Array(28):null;m&&(m.set(t.subarray(e,e+24)),e+=24),x.useGrid(m);const y=t[e++],M=t.subarray(e,e+y);if(E&&!f){const S=Math.ceil(Math.abs(l-r)),w=Math.ceil(Math.abs(h-a));g=x.createNode(S,w),_.set($,\`\${v}\`,g);const O=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(g);const p=x.atlasAttachmentObject.height-g.y-w;x.setTransform(1,0,0,1,g.x,p),i?(ls(M),x.drawFill()):x.drawPixels(g,new Uint8Array(M)),x.endNodeRendering(),O&&x.bind(O)}else{const S=Math.ceil(Math.abs(l-r)*T),w=Math.ceil(Math.abs(h-a)*u);g=x.createNode(S,w),_.set($,\`\${v}\`,g);const O=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(g);const p=x.atlasAttachmentObject.height-g.y-w;x.setTransform(T,0,0,u,-r*T+g.x,-a*u+p),m&&(m[24]=g.x,m[25]=p),ls(M),x.drawFill(),x.endNodeRendering(),O&&x.bind(O)}e+=y}const d=t[e++];if(!!t[e++]){const m=!!t[e++],y=t.subarray(e,e+4);e+=4;const M=t[e++],S=t.subarray(e,e+M),w=Math.ceil(Math.abs(o[2]-o[0])),O=Math.ceil(Math.abs(o[3]-o[1]));return x.applyFilter(g,$,m,w,O,E,s,n,Ht(d),y,S),e+=M,e}if(x.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),x.imageSmoothingEnabled=!0,x.globalCompositeOperation=Ht(d),E&&!f)x.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),x.drawDisplayObject(g,o[0],o[1],o[2],o[3],n);else{const m=Math.atan2(s[1],s[0]),y=Math.atan2(-s[2],s[3]);if(m||y){const M=r*T,S=a*u,w=Math.cos(m),O=Math.sin(m),p=Math.cos(y),R=Math.sin(y);x.setTransform(w,O,-R,p,M*w-S*R+s[4],M*O+S*p+s[5])}else x.setTransform(1,0,0,1,o[0],o[1]);x.drawDisplayObject(g,o[0],o[1],o[2],o[3],n)}return e},us=(t,e)=>{const s=t.subarray(e,e+6);e+=6,x.reset(),x.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]);const o=!!t[e++]?new Float32Array(28):null;x.useGrid(o),o&&(o.set(t.subarray(e,e+24)),e+=24);const r=t[e++],a=t.subarray(e,e+r);return ls(a,!0),e+=r,x.clip(),e},Nc=(t,e,s)=>{const n=t.widthTable[e.line]||0,o=e.textFormat,r=o.leftMargin||0;if(!s.wordWrap&&n>s.rawWidth)return Math.max(0,r);const a=o.rightMargin||0;return o.align==="center"||s.autoSize==="center"?Math.max(0,s.rawWidth/2-r-a-n/2-2):o.align==="right"||s.autoSize==="right"?Math.max(0,s.rawWidth-r-n-a-4):Math.max(0,r)},Fl=t=>{let e="";return t.italic&&(e+="italic "),t.bold&&(e+="bold "),\`\${e}\${t.size}px '\${t.font}','sans-serif'\`},dl=(t,e,s,n)=>{const o=new OffscreenCanvas(e.width,e.height),r=o.getContext("2d");if(!r)return o;const a=Math.min(1,Math.max(s,n));if(e.background||e.border){if(r.beginPath(),r.moveTo(0,0),r.lineTo(e.width,0),r.lineTo(e.width,e.height),r.lineTo(0,e.height),r.lineTo(0,0),e.background){const y=jt(e.backgroundColor);r.fillStyle=\`rgba(\${y.R},\${y.G},\${y.B},\${y.A})\`,r.fill()}if(e.border){const y=jt(e.borderColor);r.lineWidth=a,r.strokeStyle=\`rgba(\${y.R},\${y.G},\${y.B},\${y.A})\`,r.stroke()}}if(!t)return o;r.save(),r.beginPath(),r.moveTo(2,2),r.lineTo(e.width-2,2),r.lineTo(e.width-2,e.height-2),r.lineTo(2,e.height-2),r.lineTo(2,2),r.clip();let l=2;if(e.scrollX>0){const y=(e.textWidth+4-e.rawWidth)/e.rawWidth;l+=-e.scrollX*y}let h=2;if(e.scrollY>0){const y=(e.textHeight+2-e.rawHeight)/e.rawHeight;h+=-e.scrollY*y}if(r.setTransform(s,0,0,n,l*s,h*n),r.beginPath(),e.selectIndex>-1&&e.focusIndex>-1){const y=t.textTable.length-1;let M=0,S=0;e.focusIndex<=e.selectIndex?(M=Math.min(e.focusIndex,y),S=Math.min(e.selectIndex,y)):(M=Math.min(e.selectIndex,y),S=Math.min(e.focusIndex-1,y));const w=t.textTable[M],O=t.lineTable[w.line],p=Nc(t,O,e);let R=0;if(M&&w.mode==="text"){let b=M;for(;b;){const L=t.textTable[--b];if(L.mode!=="text")break;R+=L.w}}r.fillStyle="#b4d7ff";let B=0;for(let b=M;b<=S;++b){const L=t.textTable[b];if(L.mode==="text"&&(B+=L.w,b!==S))continue;let N=0;const P=L.mode==="text"?L.line:L.line-1;for(let k=0;k<P;++k)N+=t.heightTable[k];r.beginPath(),r.rect(R,N,B+p,t.heightTable[P]),r.fill(),R=0,B=0}}const f=e.rawWidth;let i=0;if(e.scrollX>0){const y=(e.textWidth-f)/f;i=e.scrollX*y}const E=f+i,$=e.rawHeight;let v=0;if(e.scrollY>0){const y=(e.textHeight-$)/$;v=e.scrollY*y}const T=$+v;let u=0,g=0,I=0,d=0,C=!1,m=-1;for(let y=0;y<t.textTable.length;++y){const M=t.textTable[y];if(!M)continue;if((M.mode==="text"||M.mode==="break")&&(m++,e.stopIndex>-1&&m>e.stopIndex))break;if(C&&M.mode==="text")continue;const S=M.textFormat;if(e.autoSize==="none"){if(g>T)break;if(M.mode==="text"&&(i>u+M.w||u>E)){u+=M.w;continue}}const w=jt(S.color||0);if(r.fillStyle=\`rgba(\${w.R},\${w.G},\${w.B},\${w.A})\`,e.focusVisible&&e.focusIndex===y){const p=u+I+.1;let R=M.line,B=M.y,b=t.ascentTable[R];M.mode!=="text"&&(B=M.mode==="break"?M.h:t.ascentTable[R-1],R>0?(R=M.line-1,b=t.ascentTable[R]):b=M.h),R>0&&t.ascentTable[R]===0&&R++;for(let L=0;L<R;++L)b+=t.heightTable[L];r.strokeStyle=\`rgba(\${w.R},\${w.G},\${w.B},\${w.A})\`,r.beginPath(),r.moveTo(p,b),r.lineTo(p,b-B),r.stroke()}if(e.thickness){const p=jt(e.thicknessColor);r.lineWidth=e.thickness,r.strokeStyle=\`rgba(\${p.R},\${p.G},\${p.B},\${p.A})\`}const O=M.line|0;switch(M.mode){case"break":case"wrap":if(u=0,O&&(g+=t.heightTable[O-1]),v>g+t.heightTable[O]){C=!0;continue}d=t.ascentTable[O],I=Nc(t,M,e),C=!1;break;case"text":{r.beginPath(),r.font=Fl(S);const p=u+I,R=g+d;if(S.underline){const B=jt(S.color||0);r.lineWidth=a,r.strokeStyle=\`rgba(\${B.R},\${B.G},\${B.B},\${B.A})\`,r.beginPath(),r.moveTo(p,R+2),r.lineTo(p+M.w,R+2),r.stroke()}e.thickness&&r.strokeText(M.text,p,R),r.fillText(M.text,p,R),u+=M.w}break}}if(e.focusVisible&&e.focusIndex>=t.textTable.length){const y=t.textTable[e.focusIndex-1];if(y){const M=jt(y.textFormat.color||0);r.strokeStyle=\`rgba(\${M.R},\${M.G},\${M.B},\${M.A})\`;const S=u+I+.1,w=g+d;r.beginPath(),y.mode==="text"?r.moveTo(S,w-y.y):r.moveTo(S,w+y.h),r.lineTo(S,w),r.stroke()}}return r.restore(),o},Sl=new TextDecoder,hs=(t,e)=>{const s=t.subarray(e,e+6);e+=6;const n=t.subarray(e,e+8);e+=8;const o=t.subarray(e,e+4);e+=4;const r=t[e++],a=t[e++],l=t[e++],h=t[e++],f=\`\${t[e++]}\`,i=t[e++],E=!!t[e++],$=Math.sqrt(s[0]*s[0]+s[1]*s[1]),v=Math.sqrt(s[2]*s[2]+s[3]*s[3]);let T;if(t[e++]){if(T=_.get(f,\`\${i}\`),!T)return e}else{const m=Math.ceil(Math.abs(l-r)*$),y=Math.ceil(Math.abs(h-a)*v),M=!!t[e++];T=M?_.get(f,\`\${i}\`):x.createNode(m,y),M||_.set(f,\`\${i}\`,T);const S=t[e++],w=new Uint8Array(t.subarray(e,e+S));e+=S;let O="none";switch(t[e++]){case 0:O="center";break;case 1:O="left";break;case 2:O="none";break;case 3:O="right";break}const p={width:m,height:y,autoSize:O,stopIndex:t[e++],scrollX:t[e++],scrollY:t[e++],textWidth:t[e++],textHeight:t[e++],rawWidth:t[e++],rawHeight:t[e++],focusIndex:t[e++],selectIndex:t[e++],focusVisible:!!t[e++],thickness:t[e++],thicknessColor:t[e++],wordWrap:!!t[e++],border:!!t[e++],borderColor:t[e++],background:!!t[e++],backgroundColor:t[e++],defaultColor:t[e++],defaultSize:t[e++]},R=dl(JSON.parse(Sl.decode(w)),p,$,v),B=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(T);const b=x.atlasAttachmentObject.height-T.y-y;x.setTransform(1,0,0,1,T.x,b),x.drawElement(T,R),x.endNodeRendering(),B&&x.bind(B)}const g=t[e++];if(!!t[e++]){const m=!!t[e++],y=t.subarray(e,e+4);e+=4;const M=t[e++],S=t.subarray(e,e+M),w=Math.ceil(Math.abs(o[2]-o[0])),O=Math.ceil(Math.abs(o[3]-o[1]));return x.applyFilter(T,f,!!Math.max(+E,+m),w,O,!1,s,n,Ht(g),y,S),e+=M,e}x.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),x.imageSmoothingEnabled=!0,x.globalCompositeOperation=Ht(g);const d=Math.atan2(s[1],s[0]),C=Math.atan2(-s[2],s[3]);if(d||C){const m=r*$,y=a*v,M=Math.cos(d),S=Math.sin(d),w=Math.cos(C),O=Math.sin(C);x.setTransform(M,S,-O,w,m*M-y*O+s[4],m*S+y*w+s[5])}else x.setTransform(1,0,0,1,o[0],o[1]);return x.drawDisplayObject(T,o[0],o[1],o[2],o[3],n),e},fs=(t,e,s)=>{const n=t.subarray(e,e+6);e+=6;const o=t.subarray(e,e+8);e+=8;const r=t.subarray(e,e+4);e+=4;const a=t[e++],l=t[e++],h=t[e++],f=t[e++],i=\`\${t[e++]}\`,E="0",$=!!t[e++];let v;if(t[e++]){if(v=_.get(i,\`\${E}\`),!v)return e}else{const I=Math.abs(h-a),d=Math.abs(f-l),C=!!t[e++];if(v=C?_.get(i,\`\${E}\`):x.createNode(I,d),C||_.set(i,\`\${E}\`,v),s&&s.length){const m=x.currentAttachmentObject;x.bind(x.atlasAttachmentObject),x.reset(),x.beginNodeRendering(v);const y=x.atlasAttachmentObject.height-v.y-d;x.setTransform(1,0,0,1,v.x,y);const M=s.shift();x.drawElement(v,M),x.endNodeRendering(),m&&x.bind(m)}}const u=t[e++];if(!!t[e++]){const I=!!t[e++],d=t.subarray(e,e+4);e+=4;const C=t[e++],m=t.subarray(e,e+C),y=Math.ceil(Math.abs(r[2]-r[0])),M=Math.ceil(Math.abs(r[3]-r[1]));return x.applyFilter(v,i,!!Math.max(+$,+I),y,M,!0,n,o,Ht(u),d,m),e+=C,e}return x.globalAlpha=Math.min(Math.max(0,o[3]+o[7]/255),1),x.imageSmoothingEnabled=!0,x.globalCompositeOperation=Ht(u),x.setTransform(n[0],n[1],n[2],n[3],n[4],n[5]),x.drawDisplayObject(v,r[0],r[1],r[2],r[3],o),e},bs=(t,e)=>{const s=t[e++];for(let n=0;n<s;++n)switch(t[e++]){case 0:e=bs(t,e);break;case 1:e=us(t,e);break}return e},$s=(t,e,s)=>{const n=!!t[e++];if(n){switch(x.drawArraysInstanced(),x.save(),x.beginMask(),x.setMaskBounds(t[e++],t[e++],t[e++],t[e++]),t[e++]){case 0:e=bs(t,e);break;case 1:e=us(t,e);break}x.endMask()}let o=0,r=!0;const a=t[e++];for(let l=0;a>l;l++){const h=t[e++],f=t[e++];if(o&&h>o&&(r&&(x.restore(),x.leaveMask()),o=0,r=!0),!r)continue;if(f){if(o=f,r=!!t[e++],!r)continue;switch(x.drawArraysInstanced(),x.save(),x.beginMask(),x.setMaskBounds(t[e++],t[e++],t[e++],t[e++]),t[e++]){case 0:e=bs(t,e);break;case 1:e=us(t,e);break}x.endMask();continue}if(!t[e++])continue;const i=t[e++];switch(i){case 0:e=$s(t,e,s);break;case 1:e=is(t,e);break;case 2:e=hs(t,e);break;case 3:e=fs(t,e,s);break;default:console.error("unknown type",i);break}}return(o||n)&&(x.restore(),x.leaveMask()),e};let Kt=-1;const wl=(t,e)=>{x.clearTransferBounds();let s=0;const n=t[s++];for(Kt!==n&&(Kt=n,Kt===-1?x.updateBackgroundColor(0,0,0,0):x.updateBackgroundColor((Kt>>16&255)/255,(Kt>>8&255)/255,(Kt&255)/255,1)),x.reset(),x.setTransform(1,0,0,1,0,0),x.fillBackgroundColor();t.length>s;){if(!t[s++])continue;const o=t[s++];switch(o){case 0:s=$s(t,s,e);break;case 1:s=is(t,s);break;case 2:s=hs(t,s);break;case 3:s=fs(t,s,e);break;default:console.error("unknown type",o);break}}x.drawArraysInstanced(),al()&&ll(),x.transferMainCanvas()},Bl=t=>{for(let e=0;e<t.length;++e){const s=\`\${t[e]}\`;if(!_.has(s))continue;const n=_.getById(s);for(const o of n.values())x.removeNode(o);_.removeById(s)}},Il=async(t,e,s,n=0,o=0,r)=>{x.clearTransferBounds();let a=1;for(x.reset(),x.setTransform(1,0,0,1,0,0),x.updateBackgroundColor((n>>16&255)/255,(n>>8&255)/255,(n&255)/255,o),x.fillBackgroundColor();t.length>a;){if(!t[a++])continue;const l=t[a++];switch(l){case 0:a=$s(t,a,r);break;case 1:a=is(t,a);break;case 2:a=hs(t,a);break;case 3:a=fs(t,a,r);break;default:console.error("unknown type",l);break}}return x.drawArraysInstanced(),await x.createImageBitmap(e,s)};class Cl{state;queue;constructor(){this.state="deactivate",this.queue=[]}async execute(){for(this.state="active";this.queue.length;){const e=this.queue.shift();if(e)switch(e.command){case"render":wl(e.buffer.subarray(0,e.length),e.imageBitmaps),globalThis.postMessage({message:"render",buffer:e.buffer},[e.buffer.buffer]);break;case"resize":hl(e.buffer[0],e.buffer[1],!!e.buffer[2]);break;case"initialize":ul(e.canvas,e.devicePixelRatio);break;case"removeCache":Bl(e.buffer);break;case"cacheClear":_.reset();break;case"capture":{const s=await Il(e.buffer.subarray(0,e.length),e.width,e.height,e.bgColor,e.bgAlpha,e.imageBitmaps);globalThis.postMessage({message:"capture",buffer:e.buffer,imageBitmap:s},[e.buffer.buffer,s])}break}}this.state="deactivate"}}const Es=new Cl;self.addEventListener("message",async t=>{Es.queue.push(t.data),Es.state==="deactivate"&&await Es.execute()})})();
658
+ `,As=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",cn],{type:"text/javascript;charset=utf-8"});function Lr(e){let t;try{if(t=As&&(self.URL||self.webkitURL).createObjectURL(As),!t)throw"";const u=new Worker(t,{name:e?.name});return u.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),u}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(cn),{name:e?.name})}}const Me=new Lr,Nr=e=>{const t=e.transferControlToOffscreen();Me.postMessage({command:"initialize",canvas:t,devicePixelRatio:window.devicePixelRatio},[t])};class We{static get AT_TARGET(){return 2}static get BUBBLING_PHASE(){return 3}static get CAPTURING_PHASE(){return 1}}let g=class{type;bubbles;listener;target;currentTarget;eventPhase;_$stopImmediatePropagation;_$stopPropagation;constructor(t,u=!1){this.type=`${t}`,this.bubbles=u,this.target=null,this.currentTarget=null,this.eventPhase=We.AT_TARGET,this.listener=null,this._$stopImmediatePropagation=!1,this._$stopPropagation=!1}static get ADDED(){return"added"}static get ADDED_TO_STAGE(){return"addedToStage"}static get CHANGE(){return"change"}static get COMPLETE(){return"complete"}static get ENDED(){return"ended"}static get ENTER_FRAME(){return"enterFrame"}static get FRAME_LABEL(){return"frameLabel"}static get INPUT(){return"input"}static get OPEN(){return"open"}static get REMOVED(){return"removed"}static get REMOVED_FROM_STAGE(){return"removedFromStage"}static get RESIZE(){return"resize"}static get SCROLL(){return"scroll"}stopImmediatePropagation(){this._$stopImmediatePropagation=!0}stopPropagation(){this._$stopPropagation=!0}};const W=new Map,Nt=[],Pt=()=>Nt.length?Nt.pop():[],Ie=e=>{10>Nt.length&&(e.length=0,Nt.push(e))};let on=null;const Ue=e=>{on=e},Vt=()=>on;class B extends g{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Vt();if(r)switch(r.type){case B.KEY_DOWN:case B.KEY_UP:return n in r?$event[n]:void 0;default:return}}})}static get KEY_DOWN(){return"keydown"}static get KEY_UP(){return"keyup"}}const Pr=(e,t,u,s=!1,n=0)=>{let r;switch(t){case g.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:(!W.size||!W.has(t))&&W.set(t,Pt()),r=W.get(t);break;default:e._$events||(e._$events=new Map),(!e._$events.size||!e._$events.has(t))&&e._$events.set(t,Pt()),r=e._$events.get(t);break}const a=r.length;let i=0;for(;i<a;++i){const c=r[i];if(s===c.useCapture&&c.target===e&&c.listener===u)break}if(a===i)r.push({listener:u,priority:n,useCapture:s,target:e});else{const c=r[i];c.listener=u,c.priority=n,c.useCapture=s,c.target=e}r.length>1&&r.sort((c,o)=>{switch(!0){case c.priority>o.priority:return-1;case c.priority<o.priority:return 1;default:return 0}})},Br=(e,t)=>{switch(t){case g.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:return!!(W.size&&W.has(t));default:return!!(e._$events&&e._$events.size&&e._$events.has(t))}},Dr=(e,t,u,s=!1)=>{let n;switch(t){case g.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:if(!W.size||!W.has(t))return;n=W.get(t);break;default:if(!e._$events||!e._$events.size||!e._$events.has(t))return;n=e._$events.get(t);break}if(n){for(let r=0;r<n.length;++r){const a=n[r];if(s===a.useCapture&&a.listener===u){n.splice(r,1);break}}if(!n.length){W.has(t)&&W.delete(t),e._$events&&e._$events.has(t)&&(e._$events.delete(t),e._$events.size||(e._$events=null)),Ie(n);return}n.length>1&&n.sort((r,a)=>{switch(!0){case r.priority>a.priority:return-1;case r.priority<a.priority:return 1;default:return 0}})}},_r=(e,t,u=!1)=>{let s;switch(t){case g.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:if(!W.size||!W.has(t))return;s=W.get(t);break;default:if(!e._$events||!e._$events.size||!e._$events.has(t))return;s=e._$events.get(t);break}if(!s)return;const n=Pt();for(let r=0;r<s.length;++r){const a=s[r];u!==a.useCapture&&n.push(a)}if(!n.length){W.has(t)&&W.delete(t),e._$events&&e._$events.has(t)&&(e._$events.delete(t),e._$events.size||(e._$events=null)),Ie(n),Ie(s);return}n.length>1&&n.sort((r,a)=>{switch(!0){case r.priority>a.priority:return-1;case r.priority<a.priority:return 1;default:return 0}}),W.has(t)?W.set(t,n):e._$events?.set(t,n),Ie(s)},Ur=(e,t)=>{if(e.hasEventListener(t))return!0;if("parent"in e){let u=e.parent;for(;u;){if(u.hasEventListener(t))return!0;if(!("parent"in u))break;u=u.parent}}return!1},qr=(e,t)=>{switch(t.type){case g.ENTER_FRAME:case B.KEY_DOWN:case B.KEY_UP:{if(!W.size||!W.has(t.type))return!1;const u=W.get(t.type);if(!u.length)return!1;for(let s=0;s<u.length;++s){const n=u[s];t.eventPhase=We.AT_TARGET,t.target=t.currentTarget=n.target;try{t.listener=n.listener,n.listener(t)}catch(r){return console.error(r),!1}}}return!0;default:{t.target=e;let u=null;if(e._$events&&e._$events.size&&e._$events.has(t.type)){const n=e._$events.get(t.type);n&&(u=n.slice(0))}const s=Pt();if("parent"in e){let n=e.parent;for(;n;){if(n.hasEventListener(t.type)){const r=n._$events&&n._$events.has(t.type)?n._$events.get(t.type):null;r&&s.push(r)}if(!("parent"in n))break;n=n.parent}}if(!u&&!s.length)return u&&Ie(u),Ie(s),!1;if(s.length)switch(t.eventPhase=We.CAPTURING_PHASE,!0){case t._$stopImmediatePropagation:case t._$stopPropagation:break;default:for(let n=s.length-1;n>-1;--n){const r=s[n];for(let a=0;a<r.length;++a){const i=r[a];if(i.useCapture){t.currentTarget=i.target;try{t.listener=i.listener,i.listener.call(null,t)}catch(c){return console.error(c),!1}if(t._$stopImmediatePropagation)break}}if(t._$stopImmediatePropagation)break}break}if(u&&!t._$stopImmediatePropagation&&!t._$stopPropagation){t.eventPhase=We.AT_TARGET;for(let n=0;n<u.length;++n){const r=u[n];if(!r.useCapture){t.currentTarget=r.target;try{t.listener=r.listener,r.listener.call(null,t)}catch(a){return console.error(a),!1}if(t._$stopImmediatePropagation)break}}Ie(u)}if(s.length){switch(t.eventPhase=We.BUBBLING_PHASE,!0){case t._$stopImmediatePropagation:case t._$stopPropagation:case!t.bubbles:break;default:for(let n=0;n<s.length;++n){const r=s[n];for(let a=0;a<r.length;++a){const i=r[a];if(!i.useCapture){t.currentTarget=i.target;try{t.listener=i.listener,i.listener.call(null,t)}catch(c){return console.error(c),!1}if(t._$stopImmediatePropagation)break}}if(t._$stopImmediatePropagation)break}break}Ie(s)}}return!0}};class je{_$events;constructor(){this._$events=null}addEventListener(t,u,s=!1,n=0){this._$events||(this._$events=new Map),Pr(this,t,u,s,n)}dispatchEvent(t){return qr(this,t)}hasEventListener(t){return Br(this,t)}removeEventListener(t,u,s=!1){Dr(this,t,u,s)}removeAllEventListener(t,u=!1){_r(this,t,u)}willTrigger(t){return Ur(this,t)}}class De extends g{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Vt();if(r)switch(r.type){case De.FOCUS_IN:case De.FOCUS_OUT:return n in r?$event[n]:void 0;default:return}}})}static get FOCUS_IN(){return"focusin"}static get FOCUS_OUT(){return"focusout"}}class St extends g{status;responseHeaders;responseURL;constructor(t,u=!1,s=0,n="",r=[]){super(t,u),this.status=s|0,this.responseHeaders=r,this.responseURL=n}static get HTTP_STATUS(){return"httpStatus"}}class Re extends g{text;constructor(t,u=!1,s=""){super(t,u),this.text=`${s}`}static get IO_ERROR(){return"ioError"}}class M extends g{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Vt();if(r)switch(r.type){case M.POINTER_DOWN:case M.POINTER_MOVE:case M.POINTER_UP:case M.POINTER_LEAVE:case M.POINTER_OVER:case M.POINTER_OUT:return n in r?$event[n]:void 0;default:return}}})}static get DOUBLE_CLICK(){return"dblclick"}static get POINTER_DOWN(){return"pointerdown"}static get POINTER_LEAVE(){return"pointerleave"}static get POINTER_MOVE(){return"pointermove"}static get POINTER_OUT(){return"pointerout"}static get POINTER_OVER(){return"pointerover"}static get POINTER_UP(){return"pointerup"}static get POINTER_CANCEL(){return"pointercancel"}}class X extends g{bytesLoaded;bytesTotal;constructor(t,u=!1,s=0,n=0){super(t,u),this.bytesLoaded=s|0,this.bytesTotal=n|0}static get PROGRESS(){return"progress"}}class oe extends g{static get PLAY(){return"play"}static get PLAYING(){return"playing"}static get PAUSE(){return"pause"}static get SEEK(){return"seek"}}class xe extends g{static get UPDATE(){return"jobupdate"}static get STOP(){return"jobstop"}}class Ke extends g{constructor(t,u=!0){return super(t,u),new Proxy(this,{get:(s,n)=>{if(n in s)return s[n];const r=Vt();if(r&&r.type===Ke.WHEEL)return n in r?$event[n]:void 0}})}static get WHEEL(){return"wheel"}}const ln=[],Wt=e=>{e.size&&e.clear(),ln.push(e)},Xr=()=>ln.pop()||new Map,Yr=(e,t,u)=>{u.clear(),e.$timerId!==null&&clearTimeout(e.$timerId);for(const s of t.values()){for(const n of s.values())n&&e.destroy(n);Wt(s)}t.clear()},Vr=(e,t)=>{if(!(!t||typeof t!="object")&&"canvas"in t){const u=t.canvas,s=u.width,n=u.height;t.clearRect(0,0,s+1,n+1),u.width=u.height=1,e.push(u)}},Wr=(e,t,u)=>{if(!e.has(t))return;const s=e.get(t);s.has(u)&&(s.delete(u),s.size||(Wt(s),e.delete(t)))},Hr=(e,t,u)=>{if(!t.has(u))return;const s=t.get(u);for(const n of s.values())e.destroy(n);t.delete(u),Wt(s)},zr=(e,t,u)=>{const s=e.get(t)||null;return s?(s.delete("trash"),s.get(u)||null):null},Gr=(e,t,u,s,n=null)=>{t.has(u)||t.set(u,Xr());const r=t.get(u);if(n===null){if(!r.has(s))return;e.destroy(r.get(s)),r.delete(s),r.size||(t.delete(u),Wt(r));return}r.set(s,n)},Kr=(e,t,u="")=>u?e.has(t)?e.get(t).has(u):!1:e.has(t),Qr=(e,t,u)=>{const s=[e*100,t*100];u&&s.push(u*100);let n=2166136261;for(let r=0;r<s.length;++r){let a=s[r]|0;for(let i=0;i<4;i++){const c=a&255;n^=c,n=Math.imul(n,16777619),a>>>=8}}return(n>>>0)%16777216},Zr=(e,t,u,s)=>`${e}${t}${u}${s}`,Jr=(e,t,u,s)=>{if(u.has(s))return;const n=t.get(s);n&&(n.set("trash",!0),u.set(s,n),e.$timerId!==null&&clearTimeout(e.$timerId),e.$removeCache=!1,e.$timerId=setTimeout(()=>{e.$removeCache=!0,e.$timerId=null},1e3))},jr=(e,t)=>{if(t.size){for(const[u,s]of t)s.has("trash")&&(e.removeById(u),e.$removeIds.push(+u));t.clear(),e.$removeCache=!1}};class ea{_$pool;_$store;_$trash;$timerId;$removeCache;$removeIds;constructor(){this._$pool=[],this._$store=new Map,this._$trash=new Map,this.$timerId=null,this.$removeIds=[],this.$removeCache=!1}reset(){Yr(this,this._$store,this._$trash)}destroy(t=null){Vr(this._$pool,t)}getCanvas(){return this._$pool.pop()||document.createElement("canvas")}remove(t,u){Wr(this._$store,t,u)}removeTimer(t){Jr(this,this._$store,this._$trash,t)}removeTimerScheduledCache(){jr(this,this._$trash)}removeById(t){Hr(this,this._$store,t)}getById(t){return this._$store.get(t)}get(t,u){return zr(this._$store,t,u)}set(t,u,s=null){Gr(this,this._$store,t,u,s)}has(t,u=""){return Kr(this._$store,t,u)}generateKeys(t,u,s){return Qr(t,u,s)}generateFilterKeys(t,u,s,n){return Zr(t,u,s,n)}}const O=new ea,ta=e=>{const t=O.getCanvas();t.width=e.width,t.height=e.height;const u=t.getContext("2d",{willReadFrequently:!0});u.drawImage(e,0,0);const s=u.getImageData(0,0,e.width,e.height),n=new Uint8Array(s.data.buffer);return O.destroy(u),n},ua=e=>{const t=O.getCanvas();t.width=e.width,t.height=e.height;const u=t.getContext("2d");u.setTransform(1,0,0,1,0,0),u.drawImage(e,0,0);const s=u.getImageData(0,0,e.width,e.height),n=new Uint8Array(s.data.buffer);return O.destroy(u),n};class Ne{width;height;buffer;constructor(t=0,u=0){this.width=t|0,this.height=u|0,this.buffer=null}set image(t){if(!t){this.width=0,this.height=0,this.buffer=null;return}this.buffer=ta(t),this.width=t.width,this.height=t.height}set canvas(t){if(!t){this.width=0,this.height=0,this.buffer=null;return}this.buffer=ua(t),this.width=t.width,this.height=t.height}clone(){const t=new Ne(this.width,this.height);return this.buffer!==null&&(t.buffer=this.buffer.slice()),t}}class sa{static get ADD(){return"add"}static get ALPHA(){return"alpha"}static get DARKEN(){return"darken"}static get DIFFERENCE(){return"difference"}static get ERASE(){return"erase"}static get HARDLIGHT(){return"hardlight"}static get INVERT(){return"invert"}static get LAYER(){return"layer"}static get LIGHTEN(){return"lighten"}static get MULTIPLY(){return"multiply"}static get NORMAL(){return"normal"}static get OVERLAY(){return"overlay"}static get SCREEN(){return"screen"}static get SUBTRACT(){return"subtract"}}const Y=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&Y(t)},na=(e,t)=>{const u=C.multiply(e._$colorTransform,t._$colorTransform);e._$colorTransform[0]=u[0],e._$colorTransform[1]=u[1],e._$colorTransform[2]=u[2],e._$colorTransform[3]=u[3],e._$colorTransform[4]=u[4],e._$colorTransform[5]=u[5],e._$colorTransform[6]=u[6],e._$colorTransform[7]=u[7],C.release(u)},hn=[],vs=(e=1,t=0,u=0,s=1,n=0,r=0)=>{const a=hn.pop()||new Float32Array(6);return a[0]=e,a[1]=t,a[2]=u,a[3]=s,a[4]=n,a[5]=r,a},ra=e=>{hn.push(e)},dn=[],Is=(e=1,t=1,u=1,s=1,n=0,r=0,a=0,i=0)=>{const c=dn.pop()||new Float32Array(8);return c[0]=e,c[1]=t,c[2]=u,c[3]=s,c[4]=n,c[5]=r,c[6]=a,c[7]=i,c},aa=e=>{dn.push(e)},ve=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)};class C{_$colorTransform;constructor(t=1,u=1,s=1,n=1,r=0,a=0,i=0,c=0){this._$colorTransform=Is(t,u,s,n,r,a,i,c)}get rawData(){return this._$colorTransform}get alphaMultiplier(){return this._$colorTransform[3]}set alphaMultiplier(t){this._$colorTransform[3]=ve(t,0,1,1)}get alphaOffset(){return this._$colorTransform[7]}set alphaOffset(t){this._$colorTransform[7]=ve(t,-255,255,0)}get blueMultiplier(){return this._$colorTransform[2]}set blueMultiplier(t){this._$colorTransform[2]=ve(t,0,1,1)}get blueOffset(){return this._$colorTransform[6]}set blueOffset(t){this._$colorTransform[6]=ve(t,-255,255,0)}get greenMultiplier(){return this._$colorTransform[1]}set greenMultiplier(t){this._$colorTransform[1]=ve(t,0,1,1)}get greenOffset(){return this._$colorTransform[5]}set greenOffset(t){this._$colorTransform[5]=ve(t,-255,255,0)}get redMultiplier(){return this._$colorTransform[0]}set redMultiplier(t){this._$colorTransform[0]=ve(t,0,1,1)}get redOffset(){return this._$colorTransform[4]}set redOffset(t){this._$colorTransform[4]=ve(t,-255,255,0)}clone(){return new C(...this._$colorTransform)}concat(t){na(this,t)}static multiply(t,u){return Is(t[0]*u[0],t[1]*u[1],t[2]*u[2],t[3]*u[3],t[0]*u[4]+t[4],t[1]*u[5]+t[5],t[2]*u[6]+t[6],t[3]*u[7]+t[7])}static release(t){aa(t)}}const ia=e=>new A(e._$matrix[0],e._$matrix[1],e._$matrix[2],e._$matrix[3],e._$matrix[4],e._$matrix[5]),ca=(e,t)=>{const u=e._$matrix,s=t._$matrix;let n=u[0]*s[0],r=0,a=0,i=u[3]*s[3],c=u[4]*s[0]+s[4],o=u[5]*s[3]+s[5];(u[1]||u[2]||s[1]||s[2])&&(n+=u[1]*s[2],i+=u[2]*s[1],r+=u[0]*s[1]+u[1]*s[3],a+=u[2]*s[0]+u[3]*s[2],c+=u[5]*s[2],o+=u[4]*s[1]),u[0]=n,u[1]=r,u[2]=a,u[3]=i,u[4]=c,u[5]=o},oa=(e,t)=>{e._$matrix[0]=t._$matrix[0],e._$matrix[1]=t._$matrix[1],e._$matrix[2]=t._$matrix[2],e._$matrix[3]=t._$matrix[3],e._$matrix[4]=t._$matrix[4],e._$matrix[5]=t._$matrix[5]},la=(e,t,u,s=0,n=0,r=0)=>{e.identity(),e.rotate(s),e.scale(t,u),e.translate(n,r)},ha=(e,t,u,s=0,n=0,r=0)=>{const a=e._$matrix;if(a[0]=t/1638.4,a[3]=u/1638.4,s){const i=Math.cos(s),c=Math.sin(s);a[1]=c*a[3],a[2]=-c*a[0],a[0]*=i,a[3]*=i}else a[1]=0,a[2]=0;a[4]=n+t/2,a[5]=r+u/2},da=(e,t)=>new J(e.x+t.x,e.y+t.y),fa=e=>new J(e.x,e.y),ba=(e,t)=>{e.x=t.x,e.y=t.y},$a=(e,t)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),xa=(e,t)=>e.x===t.x&&e.y===t.y,ga=(e,t,u)=>new J(e.x+(t.x-e.x)*(1-u),e.y+(t.y-e.y)*(1-u)),ma=(e,t)=>{const u=t/e.length;e.x*=u,e.y*=u},pa=(e,t,u)=>{e.x+=t,e.y+=u},Ta=(e,t)=>new J(e*Math.cos(t),e*Math.sin(t)),Ea=(e,t,u)=>{e.x=t,e.y=u},ya=(e,t)=>new J(e.x-t.x,e.y-t.y);class J{x;y;constructor(t=0,u=0){this.x=t,this.y=u}get length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}add(t){return da(this,t)}clone(){return fa(this)}copyFrom(t){ba(this,t)}static distance(t,u){return $a(t,u)}equals(t){return xa(this,t)}static interpolate(t,u,s){return ga(t,u,s)}normalize(t){ma(this,t)}offset(t,u){pa(this,t,u)}static polar(t,u){return Ta(t,u)}setTo(t,u){Ea(this,t,u)}subtract(t){return ya(this,t)}}const wa=(e,t)=>new J(t.x*e._$matrix[0]+t.y*e._$matrix[2],t.x*e._$matrix[1]+t.y*e._$matrix[3]),Ma=e=>{e._$matrix[0]=1,e._$matrix[1]=0,e._$matrix[2]=0,e._$matrix[3]=1,e._$matrix[4]=0,e._$matrix[5]=0},Aa=e=>{const t=e._$matrix[0],u=e._$matrix[1],s=e._$matrix[2],n=e._$matrix[3],r=e._$matrix[4],a=e._$matrix[5];if(u===0&&s===0)e._$matrix[0]=1/t,e._$matrix[1]=0,e._$matrix[2]=0,e._$matrix[3]=1/n,e._$matrix[4]=-e._$matrix[0]*r,e._$matrix[5]=-e._$matrix[3]*a;else{const i=t*n-u*s;if(i){const c=1/i;e._$matrix[0]=n*c,e._$matrix[1]=-u*c,e._$matrix[2]=-s*c,e._$matrix[3]=t*c,e._$matrix[4]=-(e._$matrix[0]*r+e._$matrix[2]*a),e._$matrix[5]=-(e._$matrix[1]*r+e._$matrix[3]*a)}}},va=(e,t)=>{const u=e._$matrix,s=u[0],n=u[1],r=u[2],a=u[3],i=u[4],c=u[5];u[0]=s*Math.cos(t)-n*Math.sin(t),u[1]=s*Math.sin(t)+n*Math.cos(t),u[2]=r*Math.cos(t)-a*Math.sin(t),u[3]=r*Math.sin(t)+a*Math.cos(t),u[4]=i*Math.cos(t)-c*Math.sin(t),u[5]=i*Math.sin(t)+c*Math.cos(t)},Ia=(e,t,u)=>{const s=e._$matrix;s[0]*=t,s[2]*=t,s[4]*=t,s[1]*=u,s[3]*=u,s[5]*=u},Sa=(e,t,u,s,n,r,a)=>{const i=e._$matrix;i[0]=t,i[1]=u,i[2]=s,i[3]=n,i[4]=r,i[5]=a},Ra=(e,t)=>{const u=t.x,s=t.y,n=e._$matrix;return new J(u*n[0]+s*n[2]+n[4],u*n[1]+s*n[3]+n[5])},ka=(e,t,u)=>{e.tx+=t,e.ty+=u};class A{_$matrix;constructor(t=1,u=0,s=0,n=1,r=0,a=0){this._$matrix=vs(t,u,s,n,r,a)}get a(){return this._$matrix[0]}set a(t){this._$matrix[0]=t}get b(){return this._$matrix[1]}set b(t){this._$matrix[1]=t}get c(){return this._$matrix[2]}set c(t){this._$matrix[2]=t}get d(){return this._$matrix[3]}set d(t){this._$matrix[3]=t}get tx(){return this._$matrix[4]}set tx(t){this._$matrix[4]=t}get ty(){return this._$matrix[5]}set ty(t){this._$matrix[5]=t}get rawData(){return this._$matrix}clone(){return ia(this)}concat(t){ca(this,t)}copyFrom(t){oa(this,t)}createBox(t,u,s=0,n=0,r=0){la(this,t,u,s,n,r)}createGradientBox(t,u,s=0,n=0,r=0){ha(this,t,u,s,n,r)}deltaTransformPoint(t){return wa(this,t)}identity(){Ma(this)}invert(){Aa(this)}rotate(t){va(this,t)}scale(t,u){Ia(this,t,u)}setTo(t,u,s,n,r,a){Sa(this,t,u,s,n,r,a)}transformPoint(t){return Ra(this,t)}translate(t,u){ka(this,t,u)}static multiply(t,u){const s=t[0],n=t[1],r=t[2],a=t[3],i=t[4],c=t[5],o=u[0],d=u[1],l=u[2],h=u[3],b=u[4],f=u[5];return vs(s*o+r*d,n*o+a*d,s*l+r*h,n*l+a*h,s*b+r*f+i,n*b+a*f+c)}static release(t){ra(t)}}const Oa=e=>new be(e.x,e.y,e.width,e.height),Fa=(e,t,u)=>e.x<=t&&e.y<=u&&e.right>t&&e.bottom>u,Ca=(e,t)=>e.x<=t.x&&e.y<=t.y&&e.right>t.x&&e.bottom>t.y,La=(e,t)=>e.x<=t.x&&e.y<=t.y&&e.right>=t.right&&e.bottom>=t.bottom,Na=(e,t)=>{e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},Pa=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,Ba=(e,t,u)=>{e.x-=t,e.width+=2*t,e.y-=u,e.height+=2*u},Da=(e,t)=>{e.x-=t.x,e.width+=2*t.x,e.y-=t.y,e.height+=2*t.y},_a=(e,t)=>{const u=Math.max(e.x,t.x),s=Math.max(e.y,t.y),n=Math.min(e.right,t.right),r=Math.min(e.bottom,t.bottom),a=n-u,i=r-s;return a>0&&i>0?new be(u,s,a,i):new be(0,0,0,0)},Ua=(e,t)=>{const u=Math.max(e.x,t.x),s=Math.max(e.y,t.y),n=Math.min(e.right,t.right),r=Math.min(e.bottom,t.bottom);return n-u>0&&r-s>0},qa=e=>e.width<=0||e.height<=0,Xa=(e,t,u)=>{e.x+=t,e.y+=u},Ya=(e,t)=>{e.x+=t.x,e.y+=t.y},Va=e=>{e.x=e.y=e.width=e.height=0},Wa=(e,t,u,s,n)=>{e.x=t,e.y=u,e.width=s,e.height=n},Ha=(e,t)=>e.isEmpty()?t.clone():t.isEmpty()?e.clone():new be(Math.min(e.x,t.x),Math.min(e.y,t.y),Math.max(e.right-t.left,t.right-e.left),Math.max(e.bottom-t.top,t.bottom-e.top));class be{x;y;width;height;constructor(t=0,u=0,s=0,n=0){this.x=t,this.y=u,this.width=s,this.height=n}get bottom(){return this.y+this.height}set bottom(t){this.height=t-this.y}get bottomRight(){return new J(this.right,this.bottom)}set bottomRight(t){this.right=t.x,this.bottom=t.y}get left(){return this.x}set left(t){this.width=this.right-t,this.x=t}get right(){return this.x+this.width}set right(t){this.width=t-this.x}get size(){return new J(this.width,this.height)}set size(t){this.width=t.x,this.height=t.y}get top(){return this.y}set top(t){this.height=this.bottom-t,this.y=t}get topLeft(){return new J(this.x,this.y)}set topLeft(t){this.left=t.x,this.top=t.y}clone(){return Oa(this)}contains(t,u){return Fa(this,t,u)}containsPoint(t){return Ca(this,t)}containsRect(t){return La(this,t)}copyFrom(t){Na(this,t)}equals(t){return Pa(this,t)}inflate(t,u){Ba(this,t,u)}inflatePoint(t){Da(this,t)}intersection(t){return _a(this,t)}intersects(t){return Ua(this,t)}isEmpty(){return qa(this)}offset(t,u){Xa(this,t,u)}offsetPoint(t){Ya(this,t)}setEmpty(){Va(this)}setTo(t,u,s,n){Wa(this,t,u,s,n)}union(t){return Ha(this,t)}}const Ht=e=>{if(e.placeObject)return e.placeObject;const t=e.placeId;if(t===-1)return null;const u=e.parent;if(!u)return null;const s=u.loaderInfo;if(!s||!s.data)return null;const n=s.data.characters[u.characterId],r=u.isTimelineEnabled?u.currentFrame:1,a=n.placeMap[r];if(!a||!(t in a))return null;const i=a[t],c=n.placeObjects[i];return c?(e.placeObject=c,c):null},ft=new J,fn=0,bn=1,za=2,Ga=3,bt=new Float32Array([1,0,0,1,0,0]);let Ka=0;const $n=()=>Ka++,xn=[],Au=[],gn=[],Qa=[],vu=(e=0,t=0,u=0,s=0,n=0,r=0)=>{const a=gn.pop()||new Float32Array(6);return a[0]=e,a[1]=t,a[2]=u,a[3]=s,a[4]=n,a[5]=r,a},Et=e=>{gn.push(e)},Za=(e=1,t=1,u=1,s=1,n=0,r=0,a=0,i=0)=>{const c=Qa.pop()||new Float32Array(8);return c[0]=e,c[1]=t,c[2]=u,c[3]=s,c[4]=n,c[5]=r,c[6]=a,c[7]=i,c},mn=[],Ja=()=>mn.pop()||new Map,ja=e=>{e.clear(),mn.push(e)},U=(...e)=>{const t=xn.pop()||[];return e.length&&t.push(...e),t},ee=e=>{e.length&&(e.length=0),xn.push(e)},he=(e,t,u,s)=>{const n=Au.length?Au.pop():new Float32Array(4);return n[0]=e,n[1]=t,n[2]=u,n[3]=s,n},F=e=>{Au.push(e)},ei=e=>{let t=null;switch(e.method.toUpperCase()){case"GET":if(e.data){const s=e.url.split("?");s[1]=s.length===1?e.data.toString():`${s[1]}&${e.data.toString()}`,e.url=s.join("?")}break;case"PUT":case"POST":e.data&&(t=e.data.toString());break}const u=new XMLHttpRequest;if(u.open(e.method,e.url,!0),u.responseType=e.format,u.withCredentials=e.withCredentials,e.event){const s=Object.keys(e.event);for(let n=0;n<s.length;++n){const r=s[n];u.addEventListener(r,e.event[r])}}for(let s=0;s<e.headers.length;++s){const n=e.headers[s];n&&u.setRequestHeader(n.name,n.value)}u.send(t)},ti=e=>{const t=U();if(e){const u=e.trim().split(`
659
+ `);for(let s=0;s<u.length;++s){const n=u[s].split(":");t.push({name:n[0].trim(),value:n[1].trim()})}}return t},Rt=new WeakMap,ke=new WeakMap,fe=new Set,ui=new WeakMap,Iu=document.createElement("canvas");Iu.width=Iu.height=1;const we=Iu.getContext("2d"),Su=e=>we?(we.fillStyle=e,+`0x${we.fillStyle.slice(1)}`):0,de=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)},Ru=[],ku=[],Ce=new Map;let pn=null;const Tn=e=>{pn=e},si=()=>pn,N=e=>{if(e.$matrix)return e.$matrix.rawData;const t=Ht(e);if(!t||!t.matrix)return null;if(!t.typedMatrix){const u=t.matrix;t.typedMatrix=vu(u[0],u[1],u[2],u[3],u[4],u[5])}return t.typedMatrix},ni=e=>{const t=N(e);let u=t||bt,s=e.parent;for(;s;){const n=N(s);n&&(u=A.multiply(n,u)),s=s.parent}return new A(u[0],u[1],u[2],u[3],u[4],u[5])},qe=e=>{if(e.$colorTransform)return e.$colorTransform.rawData;const t=Ht(e);if(!t||!t.colorTransform)return null;if(!t.typedColorTransform){const u=t.colorTransform;t.typedColorTransform=Za(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7])}return t.typedColorTransform},ri=e=>{if(e.$alpha!==null)return e.$alpha;if(e.$colorTransform){const u=e.$colorTransform.rawData;return u[3]+u[7]/255}const t=qe(e);return t?t[3]+t[7]/255:1},ai=(e,t)=>{if(t=de(t,0,1),e.$alpha===t)return;e.$alpha=t;let u=e.$colorTransform;if(!u){const s=qe(e);u=s?new C(...s):new C}u.alphaMultiplier=t,u.alphaOffset=0,e.$colorTransform=u,Y(e)};class Ae{$updated;constructor(){this.$updated=!0}canApplyFilter(){return!0}getBounds(t){return t}}const v=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)},Ou=document.createElement("canvas");Ou.width=Ou.height=1;const Tu=Ou.getContext("2d"),Oe=e=>Tu?(Tu.fillStyle=e,+`0x${Tu.fillStyle.slice(1)}`):0,ts=Math.PI/180,us=e=>{switch(e){case"full":return 0;case"inner":return 1;case"outer":return 2;default:return 0}},En=e=>e.strength>0&&e.distance!==0&&e.blurX>0&&e.blurY>0&&e.quality>0,yn=e=>e.blurX>0&&e.blurY>0&&e.quality>0,ii=[.5,1.05,1.4,1.55,1.75,1.9,2,2.15,2.2,2.3,2.5,3,3,3.5,3.5],et=(e,t)=>{if(!yn(e))return t;const u=ii[e.quality-1],s=Math.round(e.blurX*u),n=Math.round(e.blurY*u);return t[0]-=s,t[2]+=s,t[1]-=n,t[3]+=n,t},ci=(e,t)=>{if(!En(e)||e.type==="inner")return t;et(e,t);const u=e.angle*ts,s=e.distance,n=Math.abs(Math.cos(u)*s),r=Math.abs(Math.sin(u)*s);return t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r,t},oi=e=>[e.$filterType,e.distance,e.angle,e.highlightColor,e.highlightAlpha,e.shadowColor,e.shadowAlpha,e.blurX,e.blurY,e.strength,e.quality,e.type,e.knockout],li=e=>new Float32Array([e.$filterType,e.distance,e.angle,e.highlightColor,e.highlightAlpha,e.shadowColor,e.shadowAlpha,e.blurX,e.blurY,e.strength,e.quality,us(e.type),+e.knockout]);class zt extends Ae{$filterType=0;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$highlightColor;_$highlightAlpha;_$shadowColor;_$shadowAlpha;_$strength;_$type;_$knockout;constructor(t=4,u=45,s=16777215,n=1,r=0,a=1,i=4,c=4,o=1,d=1,l="inner",h=!1){super(),this._$distance=4,this._$angle=45,this._$highlightColor=16777215,this._$highlightAlpha=1,this._$blurX=4,this._$blurY=4,this._$quality=1,this._$shadowColor=0,this._$shadowAlpha=1,this._$strength=1,this._$type="inner",this._$knockout=!1,this.blurX=i,this.blurY=c,this.quality=d,this.distance=t,this.angle=u,this.highlightColor=s,this.highlightAlpha=n,this.shadowColor=r,this.shadowAlpha=a,this.strength=o,this.type=l,this.knockout=h}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get highlightAlpha(){return this._$highlightAlpha}set highlightAlpha(t){t=v(+t,0,1,0),t!==this._$highlightAlpha&&(this._$highlightAlpha=t,this.$updated=!0)}get highlightColor(){return this._$highlightColor}set highlightColor(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,16777215),t!==this._$highlightColor&&(this._$highlightColor=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get shadowAlpha(){return this._$shadowAlpha}set shadowAlpha(t){t=v(t,0,1,0),t!==this._$shadowAlpha&&(this._$shadowAlpha=t,this.$updated=!0)}get shadowColor(){return this._$shadowColor}set shadowColor(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$shadowColor&&(this._$shadowColor=t,this.$updated=!0)}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}get type(){return this._$type}set type(t){if(t=`${t}`.toLowerCase(),t!==this._$type){switch(t){case"inner":case"outer":case"full":break;default:return}this._$type=t,this.$updated=!0}}clone(){return new zt(this._$distance,this._$angle,this._$highlightColor,this._$highlightAlpha,this._$shadowColor,this._$shadowAlpha,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$type,this._$knockout)}toArray(){return oi(this)}toNumberArray(){return li(this)}canApplyFilter(){return En(this)}getBounds(t){return ci(this,t)}}const hi=e=>[e.$filterType,e.blurX,e.blurY,e.quality],di=e=>new Float32Array([e.$filterType,e.blurX,e.blurY,e.quality]);class Gt extends Ae{$filterType=1;_$blurX;_$blurY;_$quality;constructor(t=4,u=4,s=1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this.blurX=t,this.blurY=u,this.quality=s}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}clone(){return new Gt(this._$blurX,this._$blurY,this._$quality)}toArray(){return hi(this)}toNumberArray(){return di(this)}canApplyFilter(){return yn(this)}getBounds(t){return et(this,t)}}const fi=e=>[e.$filterType,e.matrix],bi=e=>new Float32Array([e.$filterType,...e.matrix]);class Kt extends Ae{$filterType=2;_$matrix;constructor(t=null){super(),this._$matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],t&&t.length===20&&(this.matrix=t)}get matrix(){return this._$matrix}set matrix(t){if(this._$matrix!==t&&!(!Array.isArray(t)||t.length!==20)){for(let u=0;u<20;u++)if(t[u]!==this._$matrix[u]){this.$updated=!0;break}this.$updated&&(this._$matrix=t)}}clone(){return new Kt(this._$matrix)}toArray(){return fi(this)}toNumberArray(){return bi(this)}}const $i=e=>e.matrix!==null&&e.matrixX*e.matrixY===e.matrix.length,xi=e=>[e.$filterType,e.matrixX,e.matrixY,e.matrix,e.divisor,e.bias,e.preserveAlpha,e.clamp,e.color,e.alpha],gi=e=>{const t=e.matrix||[];return new Float32Array([e.$filterType,e.matrixX,e.matrixY,...t,e.divisor,e.bias,+e.preserveAlpha,+e.clamp,e.color,e.alpha])};class Qt extends Ae{$filterType=3;_$matrixX;_$matrixY;_$matrix;_$divisor;_$bias;_$preserveAlpha;_$clamp;_$color;_$alpha;constructor(t=0,u=0,s=null,n=1,r=0,a=!0,i=!0,c=0,o=0){super(),this._$matrixX=0,this._$matrixY=0,this._$matrix=null,this._$divisor=1,this._$bias=0,this._$preserveAlpha=!0,this._$clamp=!0,this._$color=0,this._$alpha=0,this.matrixX=t,this.matrixY=u,this.matrix=s,this.divisor=n,this.bias=r,this.preserveAlpha=a,this.clamp=i,this.color=c,this.alpha=o}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get bias(){return this._$bias}set bias(t){t|=0,t!==this._$bias&&(this._$bias=t,this.$updated=!0)}get clamp(){return this._$clamp}set clamp(t){t=!!t,t!==this._$clamp&&(this._$clamp=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$color&&(this._$color=t,this.$updated=!0)}get divisor(){return this._$divisor}set divisor(t){t|=0,t!==this._$divisor&&(this._$divisor=t,this.$updated=!0)}get matrix(){return this._$matrix}set matrix(t){this._$matrix!==t&&(this._$matrix=t,this.$updated=!0)}get matrixX(){return this._$matrixX}set matrixX(t){t=v(t|0,0,15,0)|0,t!==this._$matrixX&&(this._$matrixX=t,this.$updated=!0)}get matrixY(){return this._$matrixY}set matrixY(t){t=v(t|0,0,15,0)|0,t!==this._$matrixY&&(this._$matrixY=t,this.$updated=!0)}get preserveAlpha(){return this._$preserveAlpha}set preserveAlpha(t){t=!!t,t!==this._$preserveAlpha&&(this._$preserveAlpha=t,this.$updated=!0)}clone(){return new Qt(this._$matrixX,this._$matrixY,this._$matrix?this._$matrix.slice():null,this._$divisor,this._$bias,this._$preserveAlpha,this._$clamp,this._$color,this._$alpha)}toArray(){return xi(this)}toNumberArray(){return gi(this)}canApplyFilter(){return $i(this)}}const mi=e=>e.bitmapBuffer!==null&&e.componentX>0&&e.componentY>0&&e.scaleX!==0&&e.scaleY!==0,pi=e=>[e.$filterType,e.bitmapBuffer?Array.from(e.bitmapBuffer):null,e.bitmapWidth,e.bitmapHeight,e.mapPointX,e.mapPointY,e.componentX,e.componentY,e.scaleX,e.scaleY,e.mode,e.color,e.alpha],Ti=e=>{let t=2;switch(e.mode){case"clamp":t=0;break;case"color":t=1;break;case"wrap":t=2;break;case"ignore":t=3;break;default:t=2;break}const u=e.bitmapBuffer||new Uint8Array,s=[e.$filterType,u.length];for(let n=0;n<u.length;n+=4096)s.push(...u.subarray(n,n+4096));return s.push(e.bitmapWidth,e.bitmapHeight,e.mapPointX,e.mapPointY,e.componentX,e.componentY,e.scaleX,e.scaleY,t,e.color,e.alpha),new Float32Array(s)};class Zt extends Ae{$filterType=4;_$bitmapBuffer;_$bitmapWidth;_$bitmapHeight;_$mapPointX;_$mapPointY;_$componentX;_$componentY;_$scaleX;_$scaleY;_$mode;_$color;_$alpha;constructor(t=null,u=0,s=0,n=0,r=0,a=0,i=0,c=0,o=0,d="wrap",l=0,h=0){super(),this._$bitmapBuffer=null,this._$bitmapWidth=0,this._$bitmapHeight=0,this._$mapPointX=0,this._$mapPointY=0,this._$componentX=0,this._$componentY=0,this._$scaleX=0,this._$scaleY=0,this._$mode="wrap",this._$color=0,this._$alpha=0,this.bitmapBuffer=t,this.bitmapWidth=u,this.bitmapHeight=s,this.mapPointX=n,this.mapPointY=r,this.componentX=a,this.componentY=i,this.scaleX=c,this.scaleY=o,this.mode=d,this.color=l,this.alpha=h}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$color&&(this._$color=t,this.$updated=!0)}get componentX(){return this._$componentX}set componentX(t){t!==this._$componentX&&(this._$componentX=t,this.$updated=!0)}get componentY(){return this._$componentY}set componentY(t){t!==this._$componentY&&(this._$componentY=t,this.$updated=!0)}get bitmapBuffer(){return this._$bitmapBuffer}set bitmapBuffer(t){t!==this._$bitmapBuffer&&(this._$bitmapBuffer=t,this.$updated=!0)}get bitmapWidth(){return this._$bitmapWidth}set bitmapWidth(t){t!==this._$bitmapWidth&&(this._$bitmapWidth=t,this.$updated=!0)}get bitmapHeight(){return this._$bitmapHeight}set bitmapHeight(t){t!==this._$bitmapHeight&&(this._$bitmapHeight=t,this.$updated=!0)}get mapPointX(){return this._$mapPointX}set mapPointX(t){t!==this._$mapPointX&&(this._$mapPointX=t,this.$updated=!0)}get mapPointY(){return this._$mapPointY}set mapPointY(t){t!==this._$mapPointY&&(this._$mapPointY=t,this.$updated=!0)}get mode(){return this._$mode}set mode(t){t!==this._$mode&&(this._$mode=t,this.$updated=!0)}get scaleX(){return this._$scaleX}set scaleX(t){t=v(+t,-65535,65535,0),t!==this._$scaleX&&(this._$scaleX=t,this.$updated=!0)}get scaleY(){return this._$scaleY}set scaleY(t){t=v(+t,-65535,65535,0),t!==this._$scaleY&&(this._$scaleY=t,this.$updated=!0)}clone(){return new Zt(this._$bitmapBuffer?this._$bitmapBuffer.slice():null,this._$bitmapWidth,this._$bitmapHeight,this._$mapPointX,this._$mapPointX,this._$componentX,this._$componentY,this._$scaleX,this._$scaleY,this._$mode,this._$color,this._$alpha)}toArray(){return pi(this)}toNumberArray(){return Ti(this)}canApplyFilter(){return mi(this)}}const Ei=e=>[e.$filterType,e.distance,e.angle,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,e.inner,e.knockout,e.hideObject],yi=e=>new Float32Array([e.$filterType,e.distance,e.angle,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,+e.inner,+e.knockout,+e.hideObject]),wn=e=>e.alpha>0&&e.strength!==0&&e.blurX>0&&e.blurY>0&&e.quality>0,wi=(e,t)=>{if(!wn(e)||e.inner)return t;et(e,t);const u=e.angle*ts,s=e.distance,n=Math.cos(u)*s,r=Math.sin(u)*s;return t[0]=Math.min(t[0],n),n>0&&(t[2]+=n),t[1]=Math.min(t[1],r),r>0&&(t[3]+=r),t};class Jt extends Ae{$filterType=5;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$color;_$alpha;_$strength;_$inner;_$knockout;_$hideObject;constructor(t=4,u=45,s=0,n=1,r=4,a=4,i=1,c=1,o=!1,d=!1,l=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$distance=4,this._$angle=45,this._$color=0,this._$alpha=1,this._$strength=1,this._$inner=!1,this._$knockout=!1,this._$hideObject=!1,this.blurX=r,this.blurY=a,this.quality=c,this.distance=t,this.angle=u,this.color=s,this.alpha=n,this.strength=i,this.inner=o,this.knockout=d,this.hideObject=l}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,0),t!==this._$color&&(this._$color=t,this.$updated=!0)}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get hideObject(){return this._$hideObject}set hideObject(t){t=!!t,t!==this._$hideObject&&(this._$hideObject=t,this.$updated=!0)}get inner(){return this._$inner}set inner(t){t=!!t,t!==this._$inner&&(this._$inner=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}clone(){return new Jt(this._$distance,this._$angle,this._$color,this._$alpha,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$inner,this._$knockout,this._$hideObject)}toArray(){return Ei(this)}toNumberArray(){return yi(this)}canApplyFilter(){return wn(this)}getBounds(t){return wi(this,t)}}const Mi=e=>[e.$filterType,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,e.inner,e.knockout],Ai=e=>new Float32Array([e.$filterType,e.color,e.alpha,e.blurX,e.blurY,e.strength,e.quality,+e.inner,+e.knockout]),Mn=e=>e.alpha>0&&e.strength!==0&&e.blurX>0&&e.blurY>0&&e.quality>0,vi=(e,t)=>!Mn(e)||e.inner?t:et(e,t);class jt extends Ae{$filterType=6;_$blurX;_$blurY;_$quality;_$color;_$alpha;_$strength;_$inner;_$knockout;constructor(t=0,u=1,s=4,n=4,r=1,a=1,i=!1,c=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$color=0,this._$alpha=1,this._$strength=1,this._$inner=!1,this._$knockout=!1,this.blurX=s,this.blurY=n,this.quality=a,this.color=t,this.alpha=u,this.strength=r,this.inner=i,this.knockout=c}get alpha(){return this._$alpha}set alpha(t){t=v(+t,0,1,0),t!==this._$alpha&&(this._$alpha=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get color(){return this._$color}set color(t){t=v(typeof t=="string"?Oe(t):t,0,16777215,4),t!==this._$color&&(this._$color=t,this.$updated=!0)}get inner(){return this._$inner}set inner(t){t=!!t,t!==this._$inner&&(this._$inner=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}clone(){return new jt(this._$color,this._$alpha,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$inner,this._$knockout)}toArray(){return Mi(this)}toNumberArray(){return Ai(this)}canApplyFilter(){return Mn(this)}getBounds(t){return vi(this,t)}}const An=e=>e.strength>0&&e.distance>0&&e.alphas!==null&&e.ratios!==null&&e.colors!==null&&e.blurX>0&&e.blurY>0&&e.quality>0,Ii=e=>[e.$filterType,e.distance,e.angle,e.colors,e.alphas,e.ratios,e.blurX,e.blurY,e.strength,e.quality,e.type,e.knockout],Si=e=>{const t=e.colors?e.colors:[],u=e.alphas?e.alphas:[],s=e.ratios?e.ratios:[];return new Float32Array([e.$filterType,e.distance,e.angle,t.length,...t,u.length,...u,s.length,...s,e.blurX,e.blurY,e.strength,e.quality,us(e.type),+e.knockout])},Ri=(e,t)=>{if(!An(e)||e.type==="inner")return t;et(e,t);const u=e.angle*ts,s=e.distance,n=Math.abs(Math.cos(u)*s),r=Math.abs(Math.sin(u)*s);return t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r,t};class eu extends Ae{$filterType=7;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$colors;_$alphas;_$ratios;_$strength;_$type;_$knockout;constructor(t=4,u=45,s=null,n=null,r=null,a=4,i=4,c=1,o=1,d="inner",l=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$distance=4,this._$angle=45,this._$colors=null,this._$alphas=null,this._$ratios=null,this._$strength=1,this._$type="inner",this._$knockout=!1,this.blurX=a,this.blurY=i,this.quality=o,this.distance=t,this.angle=u,this.colors=s,this.alphas=n,this.ratios=r,this.strength=c,this.type=d,this.knockout=l}get alphas(){return this._$alphas}set alphas(t){if(t!==this._$alphas){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(+s,0,1,0)}this._$alphas=t,this.$updated=!0}}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get colors(){return this._$colors}set colors(t){if(this._$colors!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(typeof s=="string"?Oe(s):s,0,16777215,0)}this._$colors=t,this.$updated=!0}}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get ratios(){return this._$ratios}set ratios(t){if(this._$ratios!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(+s,0,255,0)}this._$ratios=t,this.$updated=!0}}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}get type(){return this._$type}set type(t){t!==this._$type&&(this._$type=t,this.$updated=!0)}clone(){return new eu(this._$distance,this._$angle,this._$colors?this._$colors.slice():null,this._$alphas?this._$alphas.slice():null,this._$ratios?this._$ratios.slice():null,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$type,this._$knockout)}toArray(){return Ii(this)}toNumberArray(){return Si(this)}canApplyFilter(){return An(this)}getBounds(t){return Ri(this,t)}}const ki=e=>[e.$filterType,e.distance,e.angle,e.colors,e.alphas,e.ratios,e.blurX,e.blurY,e.strength,e.quality,e.type,e.knockout],vn=e=>e.strength>0&&e.distance>0&&e.alphas!==null&&e.ratios!==null&&e.colors!==null&&e.blurX>0&&e.blurY>0&&e.quality>0,Oi=e=>{const t=e.colors?e.colors:[],u=e.alphas?e.alphas:[],s=e.ratios?e.ratios:[];return new Float32Array([e.$filterType,e.distance,e.angle,t.length,...t,u.length,...u,s.length,...s,e.blurX,e.blurY,e.strength,e.quality,us(e.type),+e.knockout])},Fi=(e,t)=>!vn(e)||e.type==="inner"?t:et(e,t);class tu extends Ae{$filterType=8;_$blurX;_$blurY;_$quality;_$distance;_$angle;_$colors;_$alphas;_$ratios;_$strength;_$type;_$knockout;constructor(t=4,u=45,s=null,n=null,r=null,a=4,i=4,c=1,o=1,d="outer",l=!1){super(),this._$blurX=4,this._$blurY=4,this._$quality=1,this._$distance=4,this._$angle=45,this._$colors=null,this._$alphas=null,this._$ratios=null,this._$strength=1,this._$type="outer",this._$knockout=!1,this.blurX=a,this.blurY=i,this.quality=o,this.distance=t,this.angle=u,this.colors=s,this.alphas=n,this.ratios=r,this.strength=c,this.type=d,this.knockout=l}get alphas(){return this._$alphas}set alphas(t){if(t!==this._$alphas){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(+s,0,1,0)}this._$alphas=t,this.$updated=!0}}get angle(){return this._$angle}set angle(t){t=v(t%360,-360,360,45),t!==this._$angle&&(this._$angle=t,this.$updated=!0)}get blurX(){return this._$blurX}set blurX(t){t=v(+t,0,255,0),t!==this._$blurX&&(this._$blurX=t,this.$updated=!0)}get blurY(){return this._$blurY}set blurY(t){t=v(+t,0,255,0),t!==this._$blurY&&(this._$blurY=t,this.$updated=!0)}get colors(){return this._$colors}set colors(t){if(this._$colors!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u){const s=t[u];t[u]=v(typeof s=="string"?Oe(s):s,0,16777215,0)}this._$colors=t,this.$updated=!0}}get distance(){return this._$distance}set distance(t){t=v(+t,-255,255,4),t!==this._$distance&&(this._$distance=t,this.$updated=!0)}get knockout(){return this._$knockout}set knockout(t){t=!!t,t!==this._$knockout&&(this._$knockout=t,this.$updated=!0)}get quality(){return this._$quality}set quality(t){t=v(t|0,0,15,1),t!==this._$quality&&(this._$quality=t,this.$updated=!0)}get ratios(){return this._$ratios}set ratios(t){if(this._$ratios!==t){if(Array.isArray(t))for(let u=0;u<t.length;++u)t[u]=v(+t[u],0,255,0);this._$ratios=t,this.$updated=!0}}get strength(){return this._$strength}set strength(t){t=v(t|0,0,255,0),t!==this._$strength&&(this._$strength=t,this.$updated=!0)}get type(){return this._$type}set type(t){t!==this._$type&&(this._$type=t,this.$updated=!0)}clone(){return new tu(this._$distance,this._$angle,this._$colors,this._$alphas,this._$ratios,this._$blurX,this._$blurY,this._$strength,this._$quality,this._$type,this._$knockout)}toArray(){return ki(this)}toNumberArray(){return Oi(this)}canApplyFilter(){return vn(this)}getBounds(t){return Fi(this,t)}}const Ci=e=>{const t=U();for(let u=0;u<e.length;++u){const s=e[u];if(s)switch(s.params[0]===null&&s.params.shift(),s.class){case"BevelFilter":t.push(new zt(...s.params));break;case"BlurFilter":t.push(new Gt(...s.params));break;case"ColorMatrixFilter":t.push(new Kt(...s.params));break;case"ConvolutionFilter":t.push(new Qt(...s.params));break;case"DisplacementMapFilter":t.push(new Zt(...s.params));break;case"DropShadowFilter":t.push(new Jt(...s.params));break;case"GlowFilter":t.push(new jt(...s.params));break;case"GradientBevelFilter":t.push(new eu(...s.params));break;case"GradientGlowFilter":t.push(new tu(...s.params));break}}return t},Li=e=>{if(e.$filters)return e.$filters;const t=Ht(e);return t&&t.surfaceFilterList?(t.filters||(t.filters=Ci(t.surfaceFilterList)),t.filters):null},Ni=(e,t)=>{e.$filters=t,Y(e)},Pi=e=>{if(e.$blendMode)return e.$blendMode;const t=Ht(e);return t&&t.blendMode?t.blendMode:"normal"},Bi=(e,t)=>{e.$blendMode!==t&&(e.$blendMode=t,Y(e))},Di=180/Math.PI,_i=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?Math.atan2(t[1],t[0])*Di:0},Ui=Math.PI/180,qi=(e,t)=>{if(t=de(t%360,-360,360,0),e.$rotation===t)return;let u=e.$matrix;if(!u){const r=N(e);e.$matrix=u=r?new A(...r):new A}const s=Math.sqrt(u.a*u.a+u.b*u.b),n=Math.sqrt(u.c*u.c+u.d*u.d);if(t===0)u.a=s,u.b=0,u.c=0,u.d=n;else{let r=Math.atan2(u.b,u.a),a=Math.atan2(-u.c,u.d);const i=t*Ui;a=a+i-r,r=i,u.b=s*Math.sin(r),u.b===1||u.b===-1?u.a=0:u.a=s*Math.cos(r),u.c=-n*Math.sin(a),u.c===1||u.c===-1?u.d=0:u.d=n*Math.cos(a)}e.$scaleX=null,e.$scaleY=null,e.$rotation=t,Y(e)},Xi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);if(!t)return 1;const s=(Math.abs(t[0])>=1e-12?Math.sign(t[0]):Math.sign(t[1]))||1,n=Math.hypot(t[0],t[1]);return Math.round(n*s*1e4)/1e4},In=(e,t)=>{t=de(t,-Number.MAX_VALUE,Number.MAX_VALUE,1);const u=Math.round(t*1e4)/1e4;if(e.$scaleX===u)return;let s=e.$matrix;if(!s){const n=N(e);e.$matrix=s=n?new A(...n):new A}if(s.b===0||isNaN(s.b))s.a=u;else{const r=Math.atan2(s.b,s.a),a=Math.hypot(s.a,s.b),i=(Math.abs(s.a)>=1e-12?Math.sign(s.a):Math.sign(s.b))||1,d=(a*i>=0?r:r-Math.PI)+(u<0?Math.PI:0),l=Math.abs(u);s.a=l*Math.cos(d),s.b=l*Math.sin(d)}e.$scaleX=u,e.$rotation=null,Y(e)},Yi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);if(!t)return 1;const u=1e-12,s=Math.hypot(t[0],t[1]),n=(Math.abs(t[0])>=u?Math.sign(t[0]):Math.sign(t[1]))||1;return Math.round((t[0]*t[3]-t[1]*t[2])/(s*n)*1e4)/1e4},Sn=(e,t)=>{t=de(t,-Number.MAX_VALUE,Number.MAX_VALUE,1);const u=Math.round(t*1e4)/1e4;if(e.$scaleY===u)return;let s=e.$matrix;if(!s){const n=N(e);e.$matrix=s=n?new A(...n):new A}if(s.c===0||isNaN(s.c))s.d=u;else{const n=Math.max(0,Math.abs(u)),r=1e-12;let a=Math.atan2(s.b,s.a);(s.a<0||Math.abs(s.a)<r&&s.b<0)&&(a-=Math.PI),a<=-Math.PI&&(a+=2*Math.PI),a>Math.PI&&(a-=2*Math.PI);const i=a+(u<0?Math.PI:0);s.c=-n*Math.sin(i),s.d=n*Math.cos(i)}e.$scaleY=u,e.$rotation=null,Y(e)},Vi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?t[4]:0},Wi=(e,t)=>{let u=e.$matrix;if(!u){const s=N(e);e.$matrix=u=s?new A(...s):new A}e.$x!==t&&(e.$x=u.tx=t,Y(e))},Hi=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?t[5]:0},zi=(e,t)=>{let u=e.$matrix;if(!u){const s=N(e);e.$matrix=u=s?new A(...s):new A}e.$y!==t&&(e.$y=u.ty=t,Y(e))},ne=(e,t,u,s,n)=>{const r=n[0],a=n[1],i=n[2],c=n[3],o=n[4],d=n[5],l=u*r+s*i+o,h=u*r+t*i+o,b=e*r+s*i+o,f=e*r+t*i+o,p=u*a+s*c+d,$=u*a+t*c+d,m=e*a+s*c+d,R=e*a+t*c+d;return he(Math.min(l,h,b,f),Math.min(p,$,m,R),Math.max(l,h,b,f),Math.max(p,$,m,R))},Rn=e=>{const t=e.graphics;return he(t.xMin,t.yMin,t.xMax,t.yMax)},uu=(e,t=null)=>{const u=Rn(e),s=N(e);if(!s){if(t){const r=ne(u[0],u[1],u[2],u[3],t);return F(u),r}return u}const n=ne(u[0],u[1],u[2],u[3],t?A.multiply(t,s):s);return F(u),n},kn=e=>he(0,0,e.videoWidth,e.videoHeight),su=(e,t=null)=>{const u=kn(e),s=N(e);if(!s){if(t){const r=ne(u[0],u[1],u[2],u[3],t);return F(u),r}return u}const n=ne(u[0],u[1],u[2],u[3],t?A.multiply(t,s):s);return F(u),n},On=e=>he(e.xMin,e.yMin,e.xMax,e.yMax),nu=(e,t=null)=>{const u=On(e),s=N(e);if(!s){if(t){const r=ne(u[0],u[1],u[2],u[3],t);return F(u),r}return u}const n=ne(u[0],u[1],u[2],u[3],t?A.multiply(t,s):s);return F(u),n},ss=(e,t=null)=>{const u=e.children;if(!u.length)return he(0,0,0,0);const s=N(e),n=s?t?A.multiply(t,s):s:t,r=Number.MAX_VALUE;let a=r,i=-r,c=r,o=-r;for(let d=0;d<u.length;d++){const l=u[d];if(!l.visible)continue;let h=null;switch(!0){case l.isContainerEnabled:h=ss(l,n);break;case l.isShape:h=uu(l,n);break;case l.isText:h=nu(l,n);break;case l.isVideo:h=su(l,n);break}h&&(a=Math.min(a,h[0]),c=Math.min(c,h[1]),i=Math.max(i,h[2]),o=Math.max(o,h[3]),F(h))}return he(a,c,i,o)},Fn=e=>{switch(!0){case e.isContainerEnabled:return ss(e);case e.isShape:return uu(e);case e.isText:return nu(e);case e.isVideo:return su(e);default:return he(0,0,0,0)}},Gi=e=>{const t=Fn(e),u=Math.abs(t[2]-t[0]);switch(F(t),!0){case u===0:case u===1/0:case u===-1/0:return 0;default:return Math.round(u*100)/100}},Cn=(e,t=null)=>{const u=e.children;if(!u.length)return he(0,0,0,0);const s=N(e);let n=t;s&&(n=t?A.multiply(t,s):s);const r=Number.MAX_VALUE;let a=r,i=-r,c=r,o=-r;for(let d=0;d<u.length;d++){const l=u[d];if(!l.visible)continue;let h=null;switch(!0){case l.isContainerEnabled:h=Cn(l,n);break;case l.isShape:h=uu(l,n);break;case l.isText:h=nu(l,n);break;case l.isVideo:h=su(l,n);break}h&&(a=Math.min(a,h[0]),c=Math.min(c,h[1]),i=Math.max(i,h[2]),o=Math.max(o,h[3]),F(h))}return he(a,c,i,o)},Ze=e=>{switch(!0){case e.isContainerEnabled:return Cn(e);case e.isShape:return Rn(e);case e.isText:return On(e);case e.isVideo:return kn(e);default:return he(0,0,0,0)}},Ki=(e,t)=>{if(t=+t,isNaN(t)||0>t)return;const u=Ze(e);let s=Math.abs(u[2]-u[0]);switch(!0){case s===0:case s===1/0:case s===-1/0:return;default:s=Math.round(s*100)/100;break}In(e,t/s)},Qi=(e,t)=>{const u=e.concatenatedMatrix,s=new J(t.x*u.a+t.y*u.c+u.tx,t.x*u.b+t.y*u.d+u.ty);return A.release(u.rawData),s},Zi=(e,t)=>{const u=e.concatenatedMatrix;u.invert();const s=new J(t.x*u.a+t.y*u.c+u.tx,t.x*u.b+t.y*u.d+u.ty);return A.release(u.rawData),s},Ji=e=>{const t=Fn(e),u=Math.abs(t[3]-t[1]);switch(F(t),!0){case u===0:case u===1/0:case u===-1/0:return 0;default:return Math.round(u*100)/100}},ji=(e,t)=>{if(t=+t,isNaN(t)||0>t)return;const u=Ze(e);let s=Math.abs(u[3]-u[1]);switch(!0){case s===0:case s===1/0:case s===-1/0:return;default:s=Math.round(s*100)/100;break}Sn(e,t/s)},ec=e=>{const t=e.parent;t&&t.removeChild(e)},tc=(e,t=null)=>{const u=e.concatenatedMatrix,s=Ze(e),n=ne(s[0],s[1],s[2],s[3],u.rawData);if(F(s),A.release(u.rawData),!t){const c=new be(n[0],n[1],Math.abs(n[2]-n[0]),Math.abs(n[3]-n[1]));return F(n),c}const r=t.concatenatedMatrix;r.invert();const a=ne(n[0],n[1],n[2],n[3],r.rawData);F(n),A.release(r.rawData);const i=new be(a[0],a[1],Math.abs(a[2]-a[0]),Math.abs(a[3]-a[1]));return F(a),i},uc=(e,t)=>{const u=Ze(e),s=e.concatenatedMatrix,n=ne(u[0],u[1],u[2],u[3],s.rawData);F(u),A.release(s.rawData);const r=Ze(t),a=t.concatenatedMatrix,i=ne(r[0],r[1],r[2],r[3],a.rawData);F(r),A.release(a.rawData);const c=Math.max(n[0],i[0]),o=Math.max(n[1],i[1]),d=Math.min(n[2],i[2]),l=Math.min(n[3],i[3]);return F(n),F(i),d-c>=0&&l-o>=0};class Bt{_$bitmapData;_$matrix;_$repeat;_$smooth;constructor(t,u=null,s=!0,n=!1){this._$bitmapData=t,this._$matrix=u,this._$repeat=s,this._$smooth=n}clone(){return new Bt(this._$bitmapData.clone(),this._$matrix?this._$matrix.clone():null,this._$repeat,this._$smooth)}toArray(){return U(this._$bitmapData,this._$matrix,this._$repeat,this._$smooth)}}class Dt{_$type;_$colors;_$alphas;_$ratios;_$matrix;_$spreadMethod;_$interpolationMethod;_$focalPointRatio;_$colorStops;constructor(t,u,s,n,r=null,a="pad",i="rgb",c=0){this._$type=t,this._$colors=u,this._$alphas=s,this._$ratios=n,this._$matrix=r,this._$spreadMethod=a,this._$interpolationMethod=i,this._$focalPointRatio=c,this._$colorStops=U()}get colorStops(){if(!this._$colorStops.length){const t=Math.min(Math.min(this._$alphas.length,this._$colors.length),this._$ratios.length);for(let u=0;u<t;++u){const s=this._$colors[u],n=typeof s=="string"?Su(s):s;this._$colorStops[u]={ratio:this._$ratios[u]/255,R:n>>>16&255,G:n>>>8&255,B:n&255,A:this._$alphas[u]*255&255}}}return this._$colorStops}toArray(){return U(this._$type,this.colorStops,this._$matrix?this._$matrix.rawData:bt,this._$spreadMethod,this._$interpolationMethod,this._$focalPointRatio)}clone(){return new Dt(this._$type,this._$colors.slice(),this._$alphas.slice(),this._$ratios.slice(),this._$matrix?this._$matrix.clone():null,this._$spreadMethod,this._$interpolationMethod,this._$focalPointRatio)}}const sc=(e,t=0,u=0)=>{e.xMin=Math.min(e.xMin,t),e.xMax=Math.max(e.xMax,t),e.yMin=Math.min(e.yMin,u),e.yMax=Math.max(e.yMax,u)},Ss=(e,t=0,u=0,s=0,n=0,r=0,a="none")=>{e.xMin=Math.min(e.xMin,Math.min(t,s)),e.xMax=Math.max(e.xMax,Math.max(t,s)),e.yMin=Math.min(e.yMin,Math.min(u,n)),e.yMax=Math.max(e.yMax,Math.max(u,n));const i=s-t,c=n-u,o=Math.sqrt(i*i+c*c);if(!o)return;const d=i/o,l=c/o,h=-l,b=d,f=r/2,p=Math.min(t+h*f,t-h*f,s+h*f,s-h*f),$=Math.max(t+h*f,t-h*f,s+h*f,s-h*f),m=Math.min(u+b*f,u-b*f,n+b*f,n-b*f),R=Math.max(u+b*f,u-b*f,n+b*f,n-b*f);if(e.xMin=Math.min(e.xMin,p),e.xMax=Math.max(e.xMax,$),e.yMin=Math.min(e.yMin,m),e.yMax=Math.max(e.yMax,R),a==="round"||a==="square"){const S=t+f*-d,k=u+f*-l,D=Math.min(S+f*d+f*h,S-f*d+f*h,S+f*d-f*h,S-f*d-f*h),re=Math.max(S+f*d+f*h,S-f*d+f*h,S+f*d-f*h,S-f*d-f*h),ce=Math.min(k+f*l+f*b,k+f*l-f*b,k-f*l-f*b,k-f*l+f*b),H=Math.max(k+f*l+f*b,k+f*l-f*b,k-f*l-f*b,k-f*l+f*b);e.xMin=Math.min(e.xMin,D),e.xMax=Math.max(e.xMax,re),e.yMin=Math.min(e.yMin,ce),e.yMax=Math.max(e.yMax,H)}},st=(e,t,u=0,s=0,n=0,r="none",...a)=>{for(let i=0;i<a.length;){const c=a[i++],o=a[i++];sc(e,c,o),t&&(Ss(e,c,o,u,s,n,r),Ss(e,u,s,c,o,n,r))}},nt=(e,t,u,s,n,...r)=>{e.isConfirmed=!1,t&&s&&s.push(...r),u&&n&&n.push(...r)},nc=(e,t,u,s,n)=>{t=+t||0,u=+u||0,s=+s||0,n=+n||0,s=Math.round(s),n=Math.round(n);const r=s/2,a=n/2,i=t+r,c=u+a,o=t+s,d=u+n,l=4/3*(Math.SQRT2-1),h=l*r,b=l*a;return e.moveTo(i,u).cubicCurveTo(i+h,u,o,c-b,o,c).cubicCurveTo(o,c+b,i+h,d,i,d).cubicCurveTo(i-h,d,t,c+b,t,c).cubicCurveTo(t,c-b,i-h,u,i,u)},rc=(e,t,u,s,n)=>{t=+t||0,u=+u||0,s=+s||0,n=+n||0;const r=Math.round(t+s),a=Math.round(u+n);return e.moveTo(t,u).lineTo(t,a).lineTo(r,a).lineTo(r,u).lineTo(t,u)},ac=(e,t,u,s,n,r,a=NaN)=>{t=+t||0,u=+u||0,s=+s||0,n=+n||0,r=+r||0,a=+a||r,s=Math.round(s),n=Math.round(n),r=Math.round(r),a=Math.round(a);const i=r/2,c=a/2,o=4/3*(Math.SQRT2-1),d=o*i,l=o*c,h=t+i,b=t+s,f=b-i,p=u+c,$=u+n,m=$-c;return e.moveTo(h,u).lineTo(f,u).cubicCurveTo(f+d,u,b,p-l,b,p).lineTo(b,m).cubicCurveTo(b,m+l,f+d,$,f,$).lineTo(h,$).cubicCurveTo(h-d,$,t,m+l,t,m).lineTo(t,p).cubicCurveTo(t,p-l,h-d,u,h,u)},kt=e=>{if(!e)return[];const t=U();for(let u=0;u<e.length;){const s=e[u++];switch(t.push(s),s){case y.BEGIN_PATH:case y.END_FILL:case y.END_STROKE:case y.CLOSE_PATH:break;case y.MOVE_TO:case y.LINE_TO:t.push(e[u++],e[u++]);break;case y.CURVE_TO:case y.FILL_STYLE:t.push(e[u++],e[u++],e[u++],e[u++]);break;case y.CUBIC:t.push(e[u++],e[u++],e[u++],e[u++],e[u++],e[u++]);break;case y.STROKE_STYLE:{switch(t.push(e[u++]),e[u++]){case"none":t.push(0);break;case"round":t.push(1);break;case"square":t.push(2);break}switch(e[u++]){case"bevel":t.push(0);break;case"miter":t.push(1);break;case"round":t.push(2);break}t.push(e[u++],e[u++],e[u++],e[u++],e[u++])}break;case y.ARC:t.push(e[u++],e[u++],e[u++]);break;case y.GRADIENT_FILL:{const n=e[u++],r=e[u++],a=e[u++],i=e[u++],c=e[u++],o=e[u++];t.push(n==="linear"?0:1),t.push(r.length);const d=r.sort((l,h)=>l.ratio-h.ratio);for(let l=0;l<d.length;++l){const h=d[l];t.push(h.ratio,h.R,h.G,h.B,h.A)}switch(t.push(...a),i){case"reflect":t.push(0);break;case"repeat":t.push(1);break;default:t.push(2);break}t.push(c==="linearRGB"?0:1),t.push(o)}break;case y.GRADIENT_STROKE:{switch(t.push(e[u++]),e[u++]){case"none":t.push(0);break;case"round":t.push(1);break;case"square":t.push(2);break}switch(e[u++]){case"bevel":t.push(0);break;case"miter":t.push(1);break;case"round":t.push(2);break}t.push(e[u++]);const a=e[u++],i=e[u++],c=e[u++],o=e[u++],d=e[u++],l=e[u++];t.push(a==="linear"?0:1),t.push(i.length);for(let h=0;h<i.length;++h){const b=i[h];t.push(b.ratio,b.R,b.G,b.B,b.A)}switch(t.push(...c),o){case"reflect":t.push(0);break;case"repeat":t.push(1);break;default:t.push(2);break}t.push(d==="linearRGB"?0:1),t.push(l)}break;case y.BITMAP_FILL:{const n=e[u++],r=n.buffer;if(!r){u+=3;break}t.push(n.width,n.height,r.length);for(let o=0;o<r.length;o+=4096)t.push(...r.subarray(o,o+4096));const a=e[u++];a?t.push(...a.rawData):t.push(1,0,0,1,0,0);const i=e[u++];t.push(i?1:0);const c=e[u++];t.push(c?1:0)}break;case y.BITMAP_STROKE:{switch(t.push(e[u++]),e[u++]){case"none":t.push(0);break;case"round":t.push(1);break;case"square":t.push(2);break}switch(e[u++]){case"bevel":t.push(0);break;case"miter":t.push(1);break;case"round":t.push(2);break}t.push(e[u++]);const a=e[u++],i=a.buffer;if(!i){u+=3;break}t.push(a.width,a.height,i.length);for(let l=0;l<i.length;l+=4096)t.push(...i.subarray(l,l+4096));const c=e[u++];c?t.push(...c):t.push(1,0,0,1,0,0);const o=e[u++];t.push(o?1:0);const d=e[u++];t.push(d?1:0)}break}}return t};class y{isConfirmed;xMin;yMin;xMax;yMax;$recodes;_$buffer;_$maxAlpha;_$isBeginning;_$positionX;_$positionY;_$hasFillEnabled;_$fillType;_$fillColor;_$fillGradient;_$fillBitmap;_$fills;_$hasLineEnabled;_$lineType;_$lineColor;_$lineGradient;_$joints;_$miterLimit;_$caps;_$lineWidth;_$lines;constructor(){this.isConfirmed=!1,this.xMin=Number.MAX_VALUE,this.yMin=Number.MAX_VALUE,this.xMax=-Number.MAX_VALUE,this.yMax=-Number.MAX_VALUE,this.$recodes=null,this._$buffer=null,this._$positionX=0,this._$positionY=0,this._$maxAlpha=0,this._$isBeginning=!1,this._$fills=null,this._$hasFillEnabled=!1,this._$fillType=0,this._$fillGradient=null,this._$fillBitmap=null,this._$fillColor=0,this._$caps="none",this._$lineWidth=1,this._$lines=null,this._$hasLineEnabled=!1,this._$lineType=0,this._$lineGradient=null,this._$joints="round",this._$miterLimit=0,this._$lineColor=0}static get MOVE_TO(){return 0}static get CURVE_TO(){return 1}static get LINE_TO(){return 2}static get CUBIC(){return 3}static get ARC(){return 4}static get FILL_STYLE(){return 5}static get STROKE_STYLE(){return 6}static get END_FILL(){return 7}static get END_STROKE(){return 8}static get BEGIN_PATH(){return 9}static get GRADIENT_FILL(){return 10}static get GRADIENT_STROKE(){return 11}static get CLOSE_PATH(){return 12}static get BITMAP_FILL(){return 13}static get BITMAP_STROKE(){return 14}get isDrawable(){if(!this._$isBeginning||!this._$maxAlpha)return!1;const t=Math.abs(this.xMax-this.xMin),u=Math.abs(this.yMax-this.yMin);return t>0&&u>0}beginBitmapFill(t,u=null,s=!0,n=!1){return this._$hasFillEnabled&&this.endFill(),this._$fills||(this._$fills=U()),this._$maxAlpha=1,this._$hasFillEnabled=!0,this._$isBeginning=!0,this._$fills.push(y.BEGIN_PATH),this._$fillType=y.BITMAP_FILL,this._$fillBitmap=new Bt(t,u,s,n),this}beginFill(t=0,u=1){this._$hasFillEnabled&&this.endFill(),this._$fills||(this._$fills=U()),typeof t=="string"&&(t=Su(t)),t=de(t,0,16777215,0),u=de(u,0,1,1),this._$maxAlpha=Math.max(this._$maxAlpha,u),this._$hasFillEnabled=!0,this._$isBeginning=!0,this._$fills.push(y.BEGIN_PATH),this._$fillType=y.FILL_STYLE;const s=t>>>16&255,n=t>>>8&255,r=t&255;return this._$fillColor=s<<24|n<<16|r<<8|u*255,this}beginGradientFill(t,u,s,n,r=null,a="pad",i="rgb",c=0){this._$hasFillEnabled&&this.endFill(),this._$fills||(this._$fills=U());for(let o=0;o<s.length;++o)this._$maxAlpha=Math.max(this._$maxAlpha,s[o]);return this._$hasFillEnabled=!0,this._$isBeginning=!0,this._$fills.push(y.BEGIN_PATH),this._$fillType=y.GRADIENT_FILL,this._$fillGradient=new Dt(t,u,s,n,r,a,i,c),this}clear(){return this._$maxAlpha=0,this._$isBeginning=!1,this._$positionX=0,this._$positionY=0,this._$fillType=0,this._$fillGradient=null,this._$fillBitmap=null,this._$fillColor=0,this._$hasFillEnabled=!1,this._$caps="none",this._$lineWidth=1,this._$lineType=0,this._$lineGradient=null,this._$joints="round",this._$miterLimit=0,this._$lineColor=0,this._$hasLineEnabled=!1,this.xMin=Number.MAX_VALUE,this.xMax=-Number.MAX_VALUE,this.yMin=Number.MAX_VALUE,this.yMax=-Number.MAX_VALUE,this.$recodes&&ee(this.$recodes),this._$fills&&ee(this._$fills),this._$lines&&ee(this._$lines),this._$buffer=null,this.$recodes=null,this._$fills=null,this._$lines=null,this}clone(){const t=new y;return t.copyFrom(this),t}copyFrom(t){t._$fillGradient&&(this._$fillGradient=t._$fillGradient.clone()),t._$fillBitmap&&(this._$fillBitmap=t._$fillBitmap.clone()),this._$hasFillEnabled=t._$hasFillEnabled,this._$fillType=t._$fillType,this._$fillColor=t._$fillColor,t._$lineGradient&&(this._$lineGradient=t._$lineGradient.clone()),this._$hasLineEnabled=t._$hasLineEnabled,this._$lineType=t._$lineType,this._$caps=t._$caps,this._$joints=t._$joints,this._$miterLimit=t._$miterLimit,this._$lineWidth=t._$lineWidth,this._$lineColor=t._$lineColor,this.xMin=t.xMin,this.xMax=t.xMax,this.yMin=t.yMin,this.yMax=t.yMax,this._$maxAlpha=t._$maxAlpha,this._$positionX=t._$positionX,this._$positionY=t._$positionY,this._$isBeginning=t._$isBeginning,t._$fills&&(this._$fills=t._$fills.slice(0)),t._$lines&&(this._$lines=t._$lines.slice(0)),t.$recodes&&(this.$recodes=t.$recodes.slice(0)),this._$buffer=null}cubicCurveTo(t,u,s,n,r,a){return r=+r||0,a=+a||0,this._$positionX===r&&this._$positionY===a?this:(t=+t||0,u=+u||0,s=+s||0,n=+n||0,st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u,s,n,r,a),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.CUBIC,t,u,s,n,r,a),this._$positionX=r,this._$positionY=a,this)}curveTo(t,u,s,n){return s=+s||0,n=+n||0,this._$positionX===s&&this._$positionY===n?this:(t=+t||0,u=+u||0,st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u,s,n),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.CURVE_TO,t,u,s,n),this._$positionX=s,this._$positionY=n,this)}drawCircle(t,u,s){return t=+t||0,u=+u||0,s=+s||0,s=Math.round(s),st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t-s,u-s,t+s,u+s),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.MOVE_TO,t+s,u,y.ARC,t,u,s),this._$positionX=t,this._$positionY=u,this}drawEllipse(t,u,s,n){return nc(this,t,u,s,n)}drawRect(t,u,s,n){return rc(this,t,u,s,n)}drawRoundRect(t,u,s,n,r,a=NaN){return ac(this,t,u,s,n,r,a)}endFill(){if(!this._$hasFillEnabled||!this._$fills||8>this._$fills.length)return this;switch(this.$recodes||(this.$recodes=U()),(this._$fills[2]!==this._$fills[this._$fills.length-2]||this._$fills[3]!==this._$fills[this._$fills.length-1])&&this._$fills.push(y.LINE_TO,this._$fills[2],this._$fills[3]),this.$recodes.push(...this._$fills),ee(this._$fills),this._$fills=null,this._$fillType){case y.FILL_STYLE:this.$recodes.push(this._$fillType,this._$fillColor>>>24&255,this._$fillColor>>>16&255,this._$fillColor>>>8&255,this._$fillColor&255,y.END_FILL);break;case y.GRADIENT_FILL:this._$fillGradient&&this.$recodes.push(this._$fillType,...this._$fillGradient.toArray());break;case y.BITMAP_FILL:this._$fillBitmap&&this.$recodes.push(this._$fillType,...this._$fillBitmap.toArray());break}return this._$fillType=0,this._$fillColor=0,this._$fillGradient=null,this._$fillBitmap=null,this._$hasFillEnabled=!1,this}endLine(){if(!this._$hasLineEnabled||!this._$lines)return this;switch(this.$recodes||(this.$recodes=U()),this.$recodes.push(...this._$lines),ee(this._$lines),this._$lines=null,this._$lineType){case y.STROKE_STYLE:this.$recodes.push(this._$lineType,this._$lineWidth,this._$caps,this._$joints,this._$miterLimit,this._$lineColor>>>24&255,this._$lineColor>>>16&255,this._$lineColor>>>8&255,this._$lineColor&255,y.END_STROKE);break;case y.GRADIENT_STROKE:this._$lineGradient&&this.$recodes.push(this._$lineType,this._$lineWidth,this._$caps,this._$joints,this._$miterLimit,...this._$lineGradient.toArray());break;case y.BITMAP_STROKE:this._$fillBitmap&&this.$recodes.push(this._$lineType,this._$lineWidth,this._$caps,this._$joints,this._$miterLimit,...this._$fillBitmap.toArray());break}return this._$lineType=0,this._$lineWidth=0,this._$lineGradient=null,this._$lineColor=0,this._$caps="none",this._$joints="round",this._$miterLimit=0,this._$hasLineEnabled=!1,this}lineBitmapStyle(t,u=null,s=!0,n=!1){return this._$hasLineEnabled?(this._$lines||(this._$lines=U()),this._$maxAlpha=1,this._$hasLineEnabled=!0,this._$isBeginning=!0,this._$lines.push(y.BEGIN_PATH),this._$lineType=y.BITMAP_STROKE,this._$fillBitmap=new Bt(t,u,s,n),this):this}lineGradientStyle(t,u,s,n,r=null,a="pad",i="rgb",c=0){if(!this._$hasLineEnabled)return this;this._$lines||(this._$lines=U());for(let o=0;o<s.length;++o)this._$maxAlpha=Math.max(this._$maxAlpha,s[o]);return this._$lines.push(y.BEGIN_PATH),this._$lineType=y.GRADIENT_STROKE,this._$lineGradient=new Dt(t,u,s,n,r,a,i,c),this}lineStyle(t=1,u=0,s=1,n="round",r="round",a=3){this._$hasLineEnabled&&this.endLine(),this._$lines||(this._$lines=U()),this._$maxAlpha=Math.max(this._$maxAlpha,s),this._$hasLineEnabled=!0,this._$isBeginning=!0,this._$positionX||this._$positionY?this._$lines.push(y.BEGIN_PATH,y.MOVE_TO,this._$positionX,this._$positionY):this._$lines.push(y.BEGIN_PATH),this._$lineType=y.STROKE_STYLE,typeof u=="string"&&(u=Su(u)),u=de(u,0,16777215,0),s=de(s,0,1,1);const i=u>>>16&255,c=u>>>8&255,o=u&255;return this._$lineColor=i<<24|c<<16|o<<8|s*255,this._$lineWidth=t,this._$caps=`${n}`,this._$joints=`${r}`,this._$joints==="miter"&&(this._$miterLimit=a),this}lineTo(t,u){return t=+t||0,u=+u||0,this._$positionX===t&&this._$positionY===u?this:(st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u),nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.LINE_TO,t,u),this._$positionX=t,this._$positionY=u,this)}moveTo(t,u){t=+t||0,u=+u||0,this._$positionX=t,this._$positionY=u,st(this,this._$hasLineEnabled,this._$positionX,this._$positionY,this._$lineWidth,this._$caps,t,u);let s=!1;return this._$hasFillEnabled&&this._$fills&&this._$fills[this._$fills.length-3]===y.MOVE_TO&&(s=!0,this._$fills[this._$fills.length-2]=t,this._$fills[this._$fills.length-1]=u),this._$hasLineEnabled&&this._$lines&&this._$lines[this._$lines.length-3]===y.MOVE_TO&&(s=!0,this._$lines[this._$lines.length-2]=t,this._$lines[this._$lines.length-1]=u),s||nt(this,this._$hasFillEnabled,this._$hasLineEnabled,this._$fills,this._$lines,y.MOVE_TO,t,u),this}get buffer(){if(this.isConfirmed&&this._$buffer)return this._$buffer;this._$hasLineEnabled&&this.endLine(),this._$hasFillEnabled&&this.endFill();const t=kt(this.$recodes);return this._$buffer=new Float32Array(t),ee(t),this.isConfirmed=!0,this._$buffer}set buffer(t){this._$buffer=t,this.isConfirmed=!0,this._$isBeginning=!0,this._$maxAlpha=1}}const ic=(e,t,u)=>{for(let s=0;s<t.length;)switch(t[s++]){case y.BEGIN_PATH:e.beginPath();break;case y.MOVE_TO:e.moveTo(t[s++],t[s++]);break;case y.LINE_TO:e.lineTo(t[s++],t[s++]);break;case y.CURVE_TO:e.quadraticCurveTo(t[s++],t[s++],t[s++],t[s++]);break;case y.FILL_STYLE:s+=4;continue;case y.END_FILL:if(e.isPointInPath(u.x,u.y))return!0;break;case y.STROKE_STYLE:s+=8;continue;case y.END_STROKE:break;case y.CLOSE_PATH:e.closePath();break;case y.CUBIC:e.bezierCurveTo(t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]);break;case y.ARC:e.arc(t[s++],t[s++],t[s++],0,2*Math.PI);break;case y.GRADIENT_FILL:if(e.isPointInPath(u.x,u.y))return!0;s+=6;continue;case y.GRADIENT_STROKE:s+=12;continue;case y.BITMAP_FILL:if(e.isPointInPath(u.x,u.y))return!0;s+=6;continue;case y.BITMAP_STROKE:s+=9;continue}return!1},Ot=(e,t,u,s)=>{const n=e.graphics,r=n.xMax-n.xMin,a=n.yMax-n.yMin;if(r<=0||a<=0)return!1;const i=N(e),c=i?A.multiply(u,i):u;t.beginPath(),t.setTransform(c[0],c[1],c[2],c[3],c[4],c[5]);let o=!1;return n.buffer.length?o=ic(t,n.buffer,s):(t.moveTo(0,0),t.lineTo(r,0),t.lineTo(r,a),t.lineTo(0,a),t.lineTo(0,0),o=t.isPointInPath(s.x,s.y)),c!==u&&A.release(c),o},Ft=(e,t,u,s)=>{const n=Math.ceil(Math.abs(e.xMax-e.xMin)),r=Math.ceil(Math.abs(e.yMax-e.yMin));if(n<=0||r<=0)return!1;const a=N(e),i=a?A.multiply(u,a):u;return t.setTransform(i[0],i[1],i[2],i[3],i[4],i[5]),t.beginPath(),t.moveTo(0,0),t.lineTo(n,0),t.lineTo(n,r),t.lineTo(0,r),t.lineTo(0,0),i!==u&&A.release(i),t.isPointInPath(s.x,s.y)},Ct=(e,t,u,s)=>{const n=e.videoWidth,r=e.videoHeight;if(n<=0||r<=0)return!1;const a=N(e),i=a?A.multiply(u,a):u;return t.beginPath(),t.setTransform(i[0],i[1],i[2],i[3],i[4],i[5]),t.beginPath(),t.moveTo(0,0),t.lineTo(n,0),t.lineTo(n,r),t.lineTo(0,r),t.lineTo(0,0),i!==u&&A.release(i),t.isPointInPath(s.x,s.y)},He=(e,t,u,s,n=!0)=>{const r=e.children;if(!r.length)return!1;const a=N(e),i=a?A.multiply(u,a):u,c=U(),o=U(),d=Ja();let l=0,h=0;for(let $=0;$<r.length;++$){const m=r[$];if(m&&!m.isMask){if(m.clipDepth){h=c.length,l=m.clipDepth,c.push(m);continue}m.visible&&(l&&m.placeId>l&&(h=0,l=0),h&&d.set(m.instanceId,h),o.push(m))}}const b=e.mouseChildren&&n;if(e.isSprite&&e.hitArea){const $=He(e.hitArea,t,i,s,b);return $&&b&&e.mouseEnabled&&(e.buttonMode&&e.useHandCursor&&(s.pointer="pointer"),s.hit||(s.hit=e)),$}let f=!1;const p=e.mask;if(p){let $=!1;switch(!0){case p.isContainerEnabled:$=He(p,t,i,s,b);break;case p.isShape:$=Ot(p,t,i,s);break;case p.isText:$=Ft(p,t,i,s);break;case p.isVideo:$=Ct(p,t,i,s);break}if(!$)return!1}for(;o.length;){const $=o.pop();if(!$||$.isMask)continue;if(d.has($.instanceId)){const R=d.get($.instanceId);if(!R)continue;const S=c[R];if(!S)continue;let k=!1;switch(!0){case S.isContainerEnabled:k=He(S,t,i,s,b);break;case S.isShape:k=Ot(S,t,i,s);break;case S.isText:k=Ft(S,t,i,s);break;case S.isVideo:k=Ct(S,t,i,s);break}if(!k)continue}let m=!1;switch(!0){case $.isContainerEnabled:m=He($,t,i,s,b);break;case $.isShape:m=Ot($,t,i,s);break;case $.isText:m=Ft($,t,i,s);break;case $.isVideo:m=Ct($,t,i,s);break}if(m){if(f=!0,!b)break;if($.isInteractive&&$.mouseEnabled){if(s.pointer==="auto")switch(!0){case $.isText:$.type==="input"&&(s.pointer="text");break;case $.isSprite:$.buttonMode&&$.useHandCursor&&(s.pointer="pointer");break;default:s.pointer="pointer";break}s.hit||(s.hit=$);break}}}return ee(c),ee(o),ja(d),i!==u&&A.release(i),f},Le={x:0,y:0,pointer:"",hit:null},cc=(e,t,u,s=!1)=>{if(s){const d=e.parent,l=d?d.concatenatedMatrix.rawData:bt;switch(we.setTransform(1,0,0,1,0,0),we.beginPath(),Le.x=t,Le.y=u,Le.hit=null,!0){case e.isContainerEnabled:return He(e,we,l,Le);case e.isShape:return Ot(e,we,l,Le);case e.isText:return Ft(e,we,l,Le);case e.isVideo:return Ct(e,we,l,Le);default:return!1}}const n=Ze(e),r=N(e),a=ne(n[0],n[1],n[2],n[3],r||bt);F(n);const i=new be(a[0],a[1],Math.abs(a[2]-a[0]),Math.abs(a[3]-a[1]));F(a);const c=e.parent,o=c?c.globalToLocal(new J(t,u)):new J(t,u);return i.containsPoint(o)},oc=e=>{const t=N(e);return t?new A(t[0],t[1],t[2],t[3],t[4],t[5]):new A},lc=e=>{const t=qe(e);return t?new C(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):new C};class ru extends je{instanceId;dictionaryId;isSprite;isInteractive;isContainerEnabled;isTimelineEnabled;isShape;isVideo;isText;placeId;placeObject;characterId;clipDepth;name;startFrame;endFrame;changed;$added;$addedToStage;uniqueKey;$matrix;$colorTransform;$filters;$blendMode;$scaleX;$scaleY;$rotation;$x;$y;$alpha;$cache;_$scale9Grid;_$visible;_$variables;isMask;parent;constructor(){super(),this.instanceId=$n(),this.dictionaryId=-1,this.uniqueKey="",this.isSprite=!1,this.isContainerEnabled=!1,this.isTimelineEnabled=!1,this.isShape=!1,this.isVideo=!1,this.isText=!1,this.isInteractive=!1,this.placeId=-1,this.placeObject=null,this.characterId=-1,this.clipDepth=0,this.name="",this.startFrame=1,this.endFrame=0,this.parent=null,this.isMask=!1,this.changed=!0,this.$added=!1,this.$addedToStage=!1,this.$matrix=null,this.$colorTransform=null,this.$filters=null,this.$blendMode=null,this._$visible=!0,this._$scale9Grid=null,this._$variables=null,this.$x=null,this.$y=null,this.$alpha=null,this.$scaleX=null,this.$scaleY=null,this.$rotation=null,this.$cache=null}get concatenatedMatrix(){return ni(this)}get alpha(){return ri(this)}set alpha(t){ai(this,t)}get blendMode(){return Pi(this)}set blendMode(t){Bi(this,t)}get filters(){return Li(this)}set filters(t){Ni(this,t)}get dropTarget(){return si()}get height(){return Ji(this)}set height(t){ji(this,t)}get loaderInfo(){return Rt.has(this)?Rt.get(this):null}get colorTransform(){return lc(this)}set colorTransform(t){this.$colorTransform=t}get matrix(){return oc(this)}set matrix(t){this.$matrix=t}get mouseX(){return this.globalToLocal(ft).x}get mouseY(){return this.globalToLocal(ft).y}get root(){return ke.has(this)?ke.get(this):null}get rotation(){return this.$rotation===null?_i(this):this.$rotation}set rotation(t){qi(this,t)}get scale9Grid(){return this._$scale9Grid}set scale9Grid(t){this._$scale9Grid!==t&&(this._$scale9Grid=t,Y(this))}get scaleX(){return this.$scaleX===null?Xi(this):this.$scaleX}set scaleX(t){In(this,t)}get scaleY(){return this.$scaleY===null?Yi(this):this.$scaleY}set scaleY(t){Sn(this,t)}get visible(){return this._$visible}set visible(t){this._$visible!==t&&(this._$visible=!!t,Y(this))}get width(){return Gi(this)}set width(t){Ki(this,t)}get x(){return this.$x===null?Vi(this):this.$x}set x(t){Wi(this,t)}get y(){return this.$y===null?Hi(this):this.$y}set y(t){zi(this,t)}getBounds(t=null){return tc(this,t)}globalToLocal(t){return Zi(this,t)}hitTestObject(t){return uc(this,t)}hitTestPoint(t,u,s=!1){return cc(this,t,u,s)}localToGlobal(t){return Qi(this,t)}getLocalVariable(t){if(!this._$variables)return null;if(this._$variables.has(t))return this._$variables.get(t)}setLocalVariable(t,u){this._$variables||(this._$variables=new Map),this._$variables.set(t,u)}hasLocalVariable(t){return this._$variables?this._$variables.has(t):!1}deleteLocalVariable(t){this._$variables&&this._$variables.has(t)&&(this._$variables.delete(t),this._$variables.size||(this._$variables=null))}getGlobalVariable(t){return Ce.has(t)?Ce.get(t):null}setGlobalVariable(t,u){Ce.set(t,u)}hasGlobalVariable(t){return Ce.has(t)}deleteGlobalVariable(t){Ce.has(t)&&Ce.delete(t)}clearGlobalVariable(){return Ce.clear()}remove(){ec(this)}$syncLoaderInfo(t){Rt.set(this,t)}}const Ln=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(ke.set(s,e.root),fe.add(s.instanceId),s.isContainerEnabled&&Ln(s))}},Nn=e=>{e.$addedToStage||!fe.has(e.instanceId)||(e.$addedToStage=!0,e.willTrigger(g.ADDED_TO_STAGE)&&e.dispatchEvent(new g(g.ADDED_TO_STAGE)))},Pn=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(Nn(s),s.isContainerEnabled&&Pn(s))}},hc=e=>{e.$added||(e.$added=!0,e.willTrigger(g.ADDED)&&e.dispatchEvent(new g(g.ADDED,!0)))},Rs=(e,t,u=-1)=>{const s=t.parent;s&&s.removeChild(t);const n=e.children;return 0>u?n.push(t):n.splice(u,0,t),e.$container=null,t.parent=e,fe.has(e.instanceId)&&(ke.set(t,e.root),fe.add(t.instanceId),t.isContainerEnabled&&Ln(t)),hc(t),fe.has(e.instanceId)&&(Nn(t),t.isContainerEnabled&&Pn(t)),Y(t),t},Bn=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(ke.delete(s),fe.delete(s.instanceId),s.isVideo&&s.pause(),s.isContainerEnabled&&Bn(s))}},dc=e=>{e.$added&&(e.$added=!1,e.willTrigger(g.REMOVED)&&e.dispatchEvent(new g(g.REMOVED,!0)))},Dn=e=>{!e.$addedToStage||!fe.has(e.instanceId)||(e.$addedToStage=!1,e.willTrigger(g.REMOVED_FROM_STAGE)&&e.dispatchEvent(new g(g.REMOVED_FROM_STAGE)),e.uniqueKey&&O.has(e.uniqueKey)&&O.removeTimer(e.uniqueKey))},ns=e=>{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(Dn(s),s.isContainerEnabled&&ns(s))}},rs=(e,t)=>{const u=t.parent;if(u&&u.instanceId!==e.instanceId)return;const s=e.children,n=s.indexOf(t);n>-1&&s.splice(n,1),e.$container=null,t.hasEventListener(g.ENTER_FRAME)&&t.removeAllEventListener(g.ENTER_FRAME),t.hasEventListener(B.KEY_DOWN)&&t.removeAllEventListener(B.KEY_DOWN),t.hasEventListener(B.KEY_UP)&&t.removeAllEventListener(B.KEY_UP),dc(t),fe.has(e.instanceId)&&(Dn(t),t.isContainerEnabled&&ns(t)),fe.has(e.instanceId)&&(ke.delete(t),fe.delete(t.instanceId),t.isVideo&&t.pause(),t.isContainerEnabled&&Bn(t)),t.parent=null,Y(e)},_n=(e,t)=>{const u=e.children;return t in u?u[t]:null},fc=(e,t)=>{const u=_n(e,t);u&&rs(e,u)},bc=(e,t)=>{if(e.instanceId===t.instanceId)return!0;const u=e.children;for(let s=0;s<u.length;++s){const n=u[s];if(n){if(n.instanceId===t.instanceId)return!0;if(n.isContainerEnabled&&n.contains(t))return!0}}return!1},$c=(e,t)=>{if(!t)return null;const u=e.children;for(let s=0;s<u.length;++s){const n=u[s];if(!(!n.name||n.name!==t))return n}return null},xc=(e,t)=>{const u=e.children.slice();if(u.length)for(let s=0;s<t.length;s++){const n=t[s],r=u[n];r&&rs(e,r)}},gc=(e,t,u)=>{const s=e.getChildIndex(t);if(s===-1||s===u)return;const n=e.children;n.splice(s,1),n.splice(u,0,t),Y(e)},mc=(e,t,u)=>{const s=e.getChildIndex(t),n=e.getChildIndex(u);if(s===-1||n===-1)return;const r=e.children;r[s]=u,r[n]=t,Y(e)},pc=(e,t,u)=>{const s=e.children,n=s[t],r=s[u];!n||!r||(s[t]=r,s[u]=n,Y(e))};class as extends ru{mouseEnabled;isInteractive;constructor(){super(),this.isInteractive=!0,this.mouseEnabled=!0}}class is extends as{_$children;_$mask;mouseChildren;$container;isContainerEnabled;constructor(){super(),this.isContainerEnabled=!0,this.mouseChildren=!0,this._$mask=null,this._$children=U(),this.$container=null}get children(){return this._$children}get numChildren(){return this.children.length}get mask(){return this._$mask}set mask(t){t!==this._$mask&&(this._$mask&&(this._$mask.isMask=!1,this._$mask=null),t&&(t.isMask=!0,this._$mask=t),Y(this))}addChild(t){return Rs(this,t)}addChildAt(t,u){return Rs(this,t,u)}contains(t){return bc(this,t)}getChildAt(t){return _n(this,t)}getChildByName(t){return $c(this,t)}getChildIndex(t){return this.children.indexOf(t)}removeChild(t){rs(this,t)}removeChildAt(t){fc(this,t)}removeChildren(...t){xc(this,t)}setChildIndex(t,u){gc(this,t,u)}swapChildren(t,u){mc(this,t,u)}swapChildrenAt(t,u){pc(this,t,u)}}class Un extends je{name;frame;constructor(t,u){super(),this.name=`${t}`,this.frame=u|0}}class Tc extends je{id;content;data;url;format;constructor(){super(),this.id=$n(),this.url="",this.content=null,this.data=null,this.format="json"}}const Ec=(e,t=!1,u=null)=>{const s=e.parent?e.parent.globalToLocal(ft):e.globalToLocal(ft);e.$lockCenter=t,e.$offsetX=e.x-s.x,e.$offsetY=e.y-s.y,e.$boundedRect=u,Tn(e)},yc=e=>{e.$lockCenter=!1,e.$offsetX=0,e.$offsetY=0,e.$boundedRect=null,Tn(null)};class cs extends is{buttonMode;useHandCursor;isSprite;hitArea;_$soundTransform;$offsetX=0;$offsetY=0;$lockCenter=!1;$boundedRect=null;constructor(){super(),this.isSprite=!0,this.buttonMode=!1,this.useHandCursor=!0,this.hitArea=null,this.$offsetX=0,this.$offsetY=0,this.$lockCenter=!1,this.$boundedRect=null,this._$soundTransform=null}get soundTransform(){return this._$soundTransform}set soundTransform(t){this._$soundTransform=t}startDrag(t=!1,u=null){Ec(this,t,u)}stopDrag(){yc(this)}}const qn=e=>{e.isBitmap=!1,e.$bitmapBuffer=null,e.graphics.clear(),e.uniqueKey!==""&&O.has(e.uniqueKey)&&(O.removeById(e.uniqueKey),O.$removeIds.push(+e.uniqueKey)),Y(e)},Xn=(e,t,u,s)=>{qn(e),e.isBitmap=!0,e.$bitmapBuffer=s,e.graphics.xMin=0,e.graphics.yMin=0,e.graphics.xMax=t,e.graphics.yMax=u},wc=(e,t)=>{const u=new Image;u.crossOrigin="anonymous",u.addEventListener("load",()=>{const s=u.width,n=u.height,r=O.getCanvas();r.width=s,r.height=n;const a=r.getContext("2d",{willReadFrequently:!0});a.drawImage(u,0,0,s,n),Xn(e,s,n,new Uint8Array(a.getImageData(0,0,s,n).data)),O.destroy(a),e.hasEventListener(g.COMPLETE)&&e.dispatchEvent(new g(g.COMPLETE))}),u.src=t},Mc=(e,t)=>{const u=e.graphics,s=Math.ceil(Math.abs(t.bounds.xMax-t.bounds.xMin)),n=Math.ceil(Math.abs(t.bounds.yMax-t.bounds.yMin));switch(!0){case t.bitmapId>0:{const a=e.loaderInfo.data?.characters[t.bitmapId];if(!a)break;e.isBitmap=!0,a.imageBuffer||(a.imageBuffer=new Uint8Array(a.buffer),a.buffer=null);const i=Math.ceil(Math.abs(a.bounds.xMax-a.bounds.xMin)),c=Math.ceil(Math.abs(a.bounds.yMax-a.bounds.yMin));if(t.grid){if(t.recodes){const o=t.recodes.slice(0);o.splice(-6,6);const d=new Ne(i,c);d.buffer=a.imageBuffer,o.push(y.BITMAP_FILL,d,null,!0,!1,9);const l=kt(o);u.buffer=new Float32Array(l),ee(o),ee(l)}}else if(s===i&&n===c)e.setBitmapBuffer(Math.ceil(Math.abs(a.bounds.xMax-a.bounds.xMin)),Math.ceil(Math.abs(a.bounds.yMax-a.bounds.yMin)),a.imageBuffer);else{const o=new Ne(i,c);if(o.buffer=a.imageBuffer,t.recodes)if(t.recodes[t.recodes.length-10]===y.BITMAP_STROKE){const l=t.recodes.slice(0);l.splice(-5,5),l.push(o,null,!0,!1);const h=kt(l);u.buffer=new Float32Array(h),ee(l),ee(h)}else u.beginBitmapFill(o).drawRect(0,0,s,n)}}break;case t.inBitmap:{e.isBitmap=!0;const r=t.recodes,a=r[r.length-4];if(s===a.width&&n===a.height)e.setBitmapBuffer(a.width,a.height,a.buffer);else{const i=new Ne(a.width,a.height);i.buffer=a.buffer,u.beginBitmapFill(i).drawRect(0,0,s,n)}}break;case"buffer"in t:t.imageBuffer||(t.imageBuffer=new Uint8Array(t.buffer),t.buffer=null),e.setBitmapBuffer(Math.ceil(Math.abs(u.xMax-u.xMin)),Math.ceil(Math.abs(u.yMax-u.yMin)),t.imageBuffer);break;default:t.recodes&&(t.recodeBuffer=new Float32Array(kt(t.recodes)),ee(t.recodes),t.recodes=null),t.recodeBuffer&&(u.buffer=t.recodeBuffer);break}u.xMin=t.bounds.xMin,u.xMax=t.bounds.xMax,u.yMin=t.bounds.yMin,u.yMax=t.bounds.yMax,t.grid&&(e.scale9Grid=new be(t.grid.x,t.grid.y,t.grid.w,t.grid.h))};class $t extends ru{_$graphics;_$src;isShape;cacheKey;cacheParams;isBitmap;$bitmapBuffer;constructor(){super(),this.isShape=!0,this.cacheKey=0,this.cacheParams=U(0,0,0),this._$graphics=null,this._$src="",this.$bitmapBuffer=null,this.isBitmap=!1}static get namespace(){return"next2d.display.Shape"}get namespace(){return"next2d.display.Shape"}get graphics(){return this._$graphics||(this._$graphics=new y,ui.set(this._$graphics,this)),this._$graphics}get src(){return this._$src}set src(t){this._$src!==t&&(this._$src=t,wc(this,t))}get bitmapData(){const t=new Ne(this.width,this.height);return this.$bitmapBuffer&&(t.buffer=this.$bitmapBuffer),t}clearBitmapBuffer(){qn(this)}setBitmapBuffer(t,u,s){Xn(this,t,u,s)}$sync(t,u=null){u&&super.$syncLoaderInfo(u),Mc(this,t)}}let Yn=null;const ks=e=>{Yn=e},Fe=()=>Yn,ie=document.createElement("textarea");ie.tabIndex=-1;let pe="";pe+="position: fixed;";pe+="top: 0;";pe+="left: 0;";pe+="font-size: 16px;";pe+="border: 0;";pe+="resize: none;";pe+="opacity: 0;";pe+="z-index: -1;";pe+="pointer-events: none;";ie.setAttribute("style",pe);const Fu=document.createElement("canvas");Fu.width=Fu.height=1;const Pe=Fu.getContext("2d");let Vn=0;const yt=()=>Vn,ot=e=>{Vn=e},Ac=e=>Pe?(Pe.fillStyle=e,+`0x${Pe.fillStyle.slice(1)}`):0,Qe=e=>isNaN(+e)?Ac(`${e}`):+e,vc=(e,t=1)=>({R:(e&16711680)>>16,G:(e&65280)>>8,B:e&255,A:t*255}),ht=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)};let Wn;const _t=()=>Wn,Hn=e=>{Wn=e},ze={x:0,y:0};class se{align;bold;color;font;italic;leading;leftMargin;letterSpacing;rightMargin;size;underline;constructor(t=null,u=null,s=null,n=null,r=null,a=null,i=null,c=null,o=null,d=null,l=null){this.font=t,this.size=u,this.color=s,this.bold=n,this.italic=r,this.underline=a,this.align=i,this.leftMargin=c,this.rightMargin=o,this.leading=d,this.letterSpacing=l}clone(){return new se(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.align,this.leftMargin,this.rightMargin,this.leading,this.letterSpacing)}toObject(){return{font:this.font,size:this.size,color:Qe(this.color),bold:this.bold,italic:this.italic,underline:this.underline,align:this.align,leftMargin:this.leftMargin,rightMargin:this.rightMargin,leading:this.leading,letterSpacing:this.letterSpacing}}}const Ic=e=>{e.align="left",e.bold=!1,e.color=0,e.font="Times New Roman",e.italic=!1,e.leading=0,e.leftMargin=0,e.letterSpacing=0,e.rightMargin=0,e.size=12,e.underline=!1},Sc=e=>{let t="";if(e.font&&(t+=`font-family: ${e.font};`),e.size&&(t+=`font-size: ${e.size}px;`),e.color){const u=vc(Qe(e.color)),s=u.R.toString(16).padStart(2,"0"),n=u.G.toString(16).padStart(2,"0"),r=u.B.toString(16).padStart(2,"0");t+=`color: #${s}${n}${r};`}return e.bold&&(t+="font-weight: bold;"),e.italic&&(t+="font-style: italic;"),e.underline&&(t+="text-decoration: underline;"),e.align&&(t+=`text-align: ${e.align};`),e.leftMargin&&(t+=`margin-left: ${e.leftMargin}px;`),e.rightMargin&&(t+=`margin-right: ${e.rightMargin}px;`),e.leading&&(t+=`margin-bottom: ${e.leading}px;`),e.letterSpacing&&(t+=`letter-spacing: ${e.letterSpacing}px;`),t};class Rc{_$textWidth;_$textHeight;heightTable;ascentTable;widthTable;textTable;lineTable;constructor(){this._$textWidth=-1,this._$textHeight=-1,this.widthTable=[],this.heightTable=[],this.ascentTable=[],this.textTable=[],this.lineTable=[]}get textWidth(){if(this._$textWidth!==-1)return this._$textWidth;this._$textWidth=0;for(let t=0;t<this.widthTable.length;++t)this._$textWidth=Math.max(this._$textWidth,this.widthTable[t]);return this._$textWidth}get textHeight(){if(this._$textHeight!==-1)return this._$textHeight;this._$textHeight=0;for(let t=0;t<this.heightTable.length;++t)this._$textHeight+=this.heightTable[t];return this._$textHeight}getLineWidth(t){return t in this.widthTable?this.widthTable[t]:0}getLineHeight(t){return t in this.heightTable?this.heightTable[t]:0}clear(){this._$textWidth=-1,this._$textHeight=-1,this.widthTable.length=0,this.heightTable.length=0,this.ascentTable.length=0,this.textTable.length=0,this.lineTable.length=0}}const kc=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Oc=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Eu;const Fc=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Os=(Eu=String.fromCodePoint)!==null&&Eu!==void 0?Eu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Cc(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Fc.get(e))!==null&&t!==void 0?t:e}var Z;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Z||(Z={}));const Lc=32;var Se;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Se||(Se={}));function Cu(e){return e>=Z.ZERO&&e<=Z.NINE}function Nc(e){return e>=Z.UPPER_A&&e<=Z.UPPER_F||e>=Z.LOWER_A&&e<=Z.LOWER_F}function Pc(e){return e>=Z.UPPER_A&&e<=Z.UPPER_Z||e>=Z.LOWER_A&&e<=Z.LOWER_Z||Cu(e)}function Bc(e){return e===Z.EQUALS||Pc(e)}var K;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(K||(K={}));var ge;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ge||(ge={}));class Dc{constructor(t,u,s){this.decodeTree=t,this.emitCodePoint=u,this.errors=s,this.state=K.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ge.Strict}startEntity(t){this.decodeMode=t,this.state=K.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,u){switch(this.state){case K.EntityStart:return t.charCodeAt(u)===Z.NUM?(this.state=K.NumericStart,this.consumed+=1,this.stateNumericStart(t,u+1)):(this.state=K.NamedEntity,this.stateNamedEntity(t,u));case K.NumericStart:return this.stateNumericStart(t,u);case K.NumericDecimal:return this.stateNumericDecimal(t,u);case K.NumericHex:return this.stateNumericHex(t,u);case K.NamedEntity:return this.stateNamedEntity(t,u)}}stateNumericStart(t,u){return u>=t.length?-1:(t.charCodeAt(u)|Lc)===Z.LOWER_X?(this.state=K.NumericHex,this.consumed+=1,this.stateNumericHex(t,u+1)):(this.state=K.NumericDecimal,this.stateNumericDecimal(t,u))}addToNumericResult(t,u,s,n){if(u!==s){const r=s-u;this.result=this.result*Math.pow(n,r)+Number.parseInt(t.substr(u,r),n),this.consumed+=r}}stateNumericHex(t,u){const s=u;for(;u<t.length;){const n=t.charCodeAt(u);if(Cu(n)||Nc(n))u+=1;else return this.addToNumericResult(t,s,u,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,s,u,16),-1}stateNumericDecimal(t,u){const s=u;for(;u<t.length;){const n=t.charCodeAt(u);if(Cu(n))u+=1;else return this.addToNumericResult(t,s,u,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,s,u,10),-1}emitNumericEntity(t,u){var s;if(this.consumed<=u)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Z.SEMI)this.consumed+=1;else if(this.decodeMode===ge.Strict)return 0;return this.emitCodePoint(Cc(this.result),this.consumed),this.errors&&(t!==Z.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,u){const{decodeTree:s}=this;let n=s[this.treeIndex],r=(n&Se.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const a=t.charCodeAt(u);if(this.treeIndex=_c(s,n,this.treeIndex+Math.max(1,r),a),this.treeIndex<0)return this.result===0||this.decodeMode===ge.Attribute&&(r===0||Bc(a))?0:this.emitNotTerminatedNamedEntity();if(n=s[this.treeIndex],r=(n&Se.VALUE_LENGTH)>>14,r!==0){if(a===Z.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==ge.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:u,decodeTree:s}=this,n=(s[u]&Se.VALUE_LENGTH)>>14;return this.emitNamedEntityData(u,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,u,s){const{decodeTree:n}=this;return this.emitCodePoint(u===1?n[t]&~Se.VALUE_LENGTH:n[t+1],s),u===3&&this.emitCodePoint(n[t+2],s),s}end(){var t;switch(this.state){case K.NamedEntity:return this.result!==0&&(this.decodeMode!==ge.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case K.NumericDecimal:return this.emitNumericEntity(0,2);case K.NumericHex:return this.emitNumericEntity(0,3);case K.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case K.EntityStart:return 0}}}function _c(e,t,u,s){const n=(t&Se.BRANCH_LENGTH)>>7,r=t&Se.JUMP_TABLE;if(n===0)return r!==0&&s===r?u:-1;if(r){const c=s-r;return c<0||c>=n?-1:e[u+c]-1}let a=u,i=a+n-1;for(;a<=i;){const c=a+i>>>1,o=e[c];if(o<s)a=c+1;else if(o>s)i=c-1;else return e[c+n]}return-1}var I;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(I||(I={}));var x;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(x||(x={}));function ye(e){return e===I.Space||e===I.NewLine||e===I.Tab||e===I.FormFeed||e===I.CarriageReturn}function wt(e){return e===I.Slash||e===I.Gt||ye(e)}function Uc(e){return e>=I.LowerA&&e<=I.LowerZ||e>=I.UpperA&&e<=I.UpperZ}var me;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(me||(me={}));const z={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};class qc{constructor({xmlMode:t=!1,decodeEntities:u=!0},s){this.cbs=s,this.state=x.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=x.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=u,this.entityDecoder=new Dc(t?Oc:kc,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=x.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=x.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===I.Lt||!this.decodeEntities&&this.fastForwardTo(I.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=x.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateSpecialStartSequence(t){const u=this.sequenceIndex===this.currentSequence.length;if(!(u?wt(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!u){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=x.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===I.Gt||ye(t)){const u=this.index-this.currentSequence.length;if(this.sectionStart<u){const s=this.index;this.index=u,this.cbs.ontext(this.sectionStart,u),this.index=s}this.isSpecial=!1,this.sectionStart=u+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===z.TitleEnd?this.decodeEntities&&t===I.Amp&&this.startEntity():this.fastForwardTo(I.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===I.Lt)}stateCDATASequence(t){t===z.Cdata[this.sequenceIndex]?++this.sequenceIndex===z.Cdata.length&&(this.state=x.InCommentLike,this.currentSequence=z.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=x.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===z.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=x.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!wt(t):Uc(t)}startSpecial(t,u){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=u,this.state=x.SpecialStartSequence}stateBeforeTagName(t){if(t===I.ExclamationMark)this.state=x.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===I.Questionmark)this.state=x.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const u=t|32;this.sectionStart=this.index,this.xmlMode?this.state=x.InTagName:u===z.ScriptEnd[2]?this.state=x.BeforeSpecialS:u===z.TitleEnd[2]||u===z.XmpEnd[2]?this.state=x.BeforeSpecialT:this.state=x.InTagName}else t===I.Slash?this.state=x.BeforeClosingTagName:(this.state=x.Text,this.stateText(t))}stateInTagName(t){wt(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){ye(t)||(t===I.Gt?this.state=x.Text:(this.state=this.isTagStartChar(t)?x.InClosingTagName:x.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===I.Gt||ye(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=x.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.state=x.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===I.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=x.InSpecialTag,this.sequenceIndex=0):this.state=x.Text,this.sectionStart=this.index+1):t===I.Slash?this.state=x.InSelfClosingTag:ye(t)||(this.state=x.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===I.Gt?(this.cbs.onselfclosingtag(this.index),this.state=x.Text,this.sectionStart=this.index+1,this.isSpecial=!1):ye(t)||(this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===I.Eq||wt(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=x.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===I.Eq?this.state=x.BeforeAttributeValue:t===I.Slash||t===I.Gt?(this.cbs.onattribend(me.NoValue,this.sectionStart),this.sectionStart=-1,this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t)):ye(t)||(this.cbs.onattribend(me.NoValue,this.sectionStart),this.state=x.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===I.DoubleQuote?(this.state=x.InAttributeValueDq,this.sectionStart=this.index+1):t===I.SingleQuote?(this.state=x.InAttributeValueSq,this.sectionStart=this.index+1):ye(t)||(this.sectionStart=this.index,this.state=x.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,u){t===u||!this.decodeEntities&&this.fastForwardTo(u)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(u===I.DoubleQuote?me.Double:me.Single,this.index+1),this.state=x.BeforeAttributeName):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,I.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,I.SingleQuote)}stateInAttributeValueNoQuotes(t){ye(t)||t===I.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(me.Unquoted,this.index),this.state=x.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===I.OpeningSquareBracket?(this.state=x.CDATASequence,this.sequenceIndex=0):this.state=t===I.Dash?x.BeforeComment:x.InDeclaration}stateInDeclaration(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=x.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=x.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===I.Dash?(this.state=x.InCommentLike,this.currentSequence=z.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=x.InDeclaration}stateInSpecialComment(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=x.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const u=t|32;u===z.ScriptEnd[3]?this.startSpecial(z.ScriptEnd,4):u===z.StyleEnd[3]?this.startSpecial(z.StyleEnd,4):(this.state=x.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){switch(t|32){case z.TitleEnd[3]:{this.startSpecial(z.TitleEnd,4);break}case z.TextareaEnd[3]:{this.startSpecial(z.TextareaEnd,4);break}case z.XmpEnd[3]:{this.startSpecial(z.XmpEnd,4);break}default:this.state=x.InTagName,this.stateInTagName(t)}}startEntity(){this.baseState=this.state,this.state=x.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?ge.Strict:this.baseState===x.Text||this.baseState===x.InSpecialTag?ge.Legacy:ge.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===x.Text||this.state===x.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===x.InAttributeValueDq||this.state===x.InAttributeValueSq||this.state===x.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case x.Text:{this.stateText(t);break}case x.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case x.InSpecialTag:{this.stateInSpecialTag(t);break}case x.CDATASequence:{this.stateCDATASequence(t);break}case x.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case x.InAttributeName:{this.stateInAttributeName(t);break}case x.InCommentLike:{this.stateInCommentLike(t);break}case x.InSpecialComment:{this.stateInSpecialComment(t);break}case x.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case x.InTagName:{this.stateInTagName(t);break}case x.InClosingTagName:{this.stateInClosingTagName(t);break}case x.BeforeTagName:{this.stateBeforeTagName(t);break}case x.AfterAttributeName:{this.stateAfterAttributeName(t);break}case x.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case x.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case x.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case x.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case x.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case x.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case x.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case x.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case x.InDeclaration:{this.stateInDeclaration(t);break}case x.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case x.BeforeComment:{this.stateBeforeComment(t);break}case x.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case x.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===x.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===x.InCommentLike?this.currentSequence===z.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===x.InTagName||this.state===x.BeforeAttributeName||this.state===x.BeforeAttributeValue||this.state===x.AfterAttributeName||this.state===x.InAttributeName||this.state===x.InAttributeValueSq||this.state===x.InAttributeValueDq||this.state===x.InAttributeValueNq||this.state===x.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,u){this.baseState!==x.Text&&this.baseState!==x.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+u,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+u,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const Ve=new Set(["input","option","optgroup","select","button","datalist","textarea"]),P=new Set(["p"]),Fs=new Set(["thead","tbody"]),Cs=new Set(["dd","dt"]),Ls=new Set(["rt","rp"]),Xc=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",P],["h1",P],["h2",P],["h3",P],["h4",P],["h5",P],["h6",P],["select",Ve],["input",Ve],["output",Ve],["button",Ve],["datalist",Ve],["textarea",Ve],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Cs],["dt",Cs],["address",P],["article",P],["aside",P],["blockquote",P],["details",P],["div",P],["dl",P],["fieldset",P],["figcaption",P],["figure",P],["footer",P],["form",P],["header",P],["hr",P],["main",P],["nav",P],["ol",P],["pre",P],["section",P],["table",P],["ul",P],["rt",Ls],["rp",Ls],["tbody",Fs],["tfoot",Fs]]),Yc=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Ns=new Set(["math","svg"]),Ps=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),Vc=/\s|\//;class Wc{constructor(t,u={}){var s,n,r,a,i,c;this.options=u,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(s=u.lowerCaseTags)!==null&&s!==void 0?s:this.htmlMode,this.lowerCaseAttributeNames=(n=u.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=u.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((a=u.Tokenizer)!==null&&a!==void 0?a:qc)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(i=this.cbs).onparserinit)===null||c===void 0||c.call(i,this)}ontext(t,u){var s,n;const r=this.getSlice(t,u);this.endIndex=u-1,(n=(s=this.cbs).ontext)===null||n===void 0||n.call(s,r),this.startIndex=u}ontextentity(t,u){var s,n;this.endIndex=u-1,(n=(s=this.cbs).ontext)===null||n===void 0||n.call(s,Os(t)),this.startIndex=u}isVoidElement(t){return this.htmlMode&&Yc.has(t)}onopentagname(t,u){this.endIndex=u;let s=this.getSlice(t,u);this.lowerCaseTagNames&&(s=s.toLowerCase()),this.emitOpenTag(s)}emitOpenTag(t){var u,s,n,r;this.openTagStart=this.startIndex,this.tagname=t;const a=this.htmlMode&&Xc.get(t);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){const i=this.stack.shift();(s=(u=this.cbs).onclosetag)===null||s===void 0||s.call(u,i,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(Ns.has(t)?this.foreignContext.unshift(!0):Ps.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var u,s;this.startIndex=this.openTagStart,this.attribs&&((s=(u=this.cbs).onopentag)===null||s===void 0||s.call(u,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,u){var s,n,r,a,i,c,o,d;this.endIndex=u;let l=this.getSlice(t,u);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),this.htmlMode&&(Ns.has(l)||Ps.has(l))&&this.foreignContext.shift(),this.isVoidElement(l))this.htmlMode&&l==="br"&&((a=(r=this.cbs).onopentagname)===null||a===void 0||a.call(r,"br"),(c=(i=this.cbs).onopentag)===null||c===void 0||c.call(i,"br",{},!0),(d=(o=this.cbs).onclosetag)===null||d===void 0||d.call(o,"br",!1));else{const h=this.stack.indexOf(l);if(h!==-1)for(let b=0;b<=h;b++){const f=this.stack.shift();(n=(s=this.cbs).onclosetag)===null||n===void 0||n.call(s,f,b!==h)}else this.htmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=u+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var u,s;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((s=(u=this.cbs).onclosetag)===null||s===void 0||s.call(u,n,!t),this.stack.shift())}onattribname(t,u){this.startIndex=t;const s=this.getSlice(t,u);this.attribname=this.lowerCaseAttributeNames?s.toLowerCase():s}onattribdata(t,u){this.attribvalue+=this.getSlice(t,u)}onattribentity(t){this.attribvalue+=Os(t)}onattribend(t,u){var s,n;this.endIndex=u,(n=(s=this.cbs).onattribute)===null||n===void 0||n.call(s,this.attribname,this.attribvalue,t===me.Double?'"':t===me.Single?"'":t===me.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const u=t.search(Vc);let s=u<0?t:t.substr(0,u);return this.lowerCaseTagNames&&(s=s.toLowerCase()),s}ondeclaration(t,u){this.endIndex=u;const s=this.getSlice(t,u);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(s);this.cbs.onprocessinginstruction(`!${n}`,`!${s}`)}this.startIndex=u+1}onprocessinginstruction(t,u){this.endIndex=u;const s=this.getSlice(t,u);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(s);this.cbs.onprocessinginstruction(`?${n}`,`?${s}`)}this.startIndex=u+1}oncomment(t,u,s){var n,r,a,i;this.endIndex=u,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,u-s)),(i=(a=this.cbs).oncommentend)===null||i===void 0||i.call(a),this.startIndex=u+1}oncdata(t,u,s){var n,r,a,i,c,o,d,l,h,b;this.endIndex=u;const f=this.getSlice(t,u-s);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(i=(a=this.cbs).ontext)===null||i===void 0||i.call(a,f),(o=(c=this.cbs).oncdataend)===null||o===void 0||o.call(c)):((l=(d=this.cbs).oncomment)===null||l===void 0||l.call(d,`[CDATA[${f}]]`),(b=(h=this.cbs).oncommentend)===null||b===void 0||b.call(h)),this.startIndex=u+1}onend(){var t,u;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let s=0;s<this.stack.length;s++)this.cbs.onclosetag(this.stack[s],!0)}(u=(t=this.cbs).onend)===null||u===void 0||u.call(t)}reset(){var t,u,s,n;(u=(t=this.cbs).onreset)===null||u===void 0||u.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(s=this.cbs).onparserinit)===null||n===void 0||n.call(s,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,u){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let s=this.buffers[0].slice(t-this.bufferOffset,u-this.bufferOffset);for(;u-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),s+=this.buffers[0].slice(0,u-this.bufferOffset);return s}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var u,s;if(this.ended){(s=(u=this.cbs).onerror)===null||s===void 0||s.call(u,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var u,s;if(this.ended){(s=(u=this.cbs).onerror)===null||s===void 0||s.call(u,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}var L;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(L||(L={}));function Hc(e){return e.type===L.Tag||e.type===L.Script||e.type===L.Style}L.Root;L.Text;L.Directive;L.Comment;L.Script;L.Style;L.Tag;L.CDATA;L.Doctype;class zn{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Jn(this,t)}}class os extends zn{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Lu extends os{constructor(){super(...arguments),this.type=L.Text}get nodeType(){return 3}}class Gn extends os{constructor(){super(...arguments),this.type=L.Comment}get nodeType(){return 8}}class Kn extends os{constructor(t,u){super(u),this.name=t,this.type=L.Directive}get nodeType(){return 1}}class ls extends zn{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Qn extends ls{constructor(){super(...arguments),this.type=L.CDATA}get nodeType(){return 4}}class Nu extends ls{constructor(){super(...arguments),this.type=L.Root}get nodeType(){return 9}}class Zn extends ls{constructor(t,u,s=[],n=t==="script"?L.Script:t==="style"?L.Style:L.Tag){super(s),this.name=t,this.attribs=u,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var u,s;return{name:t,value:this.attribs[t],namespace:(u=this["x-attribsNamespace"])===null||u===void 0?void 0:u[t],prefix:(s=this["x-attribsPrefix"])===null||s===void 0?void 0:s[t]}})}}function zc(e){return Hc(e)}function Gc(e){return e.type===L.CDATA}function Kc(e){return e.type===L.Text}function Qc(e){return e.type===L.Comment}function Zc(e){return e.type===L.Directive}function Jc(e){return e.type===L.Root}function Jn(e,t=!1){let u;if(Kc(e))u=new Lu(e.data);else if(Qc(e))u=new Gn(e.data);else if(zc(e)){const s=t?yu(e.children):[],n=new Zn(e.name,{...e.attribs},s);s.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),u=n}else if(Gc(e)){const s=t?yu(e.children):[],n=new Qn(s);s.forEach(r=>r.parent=n),u=n}else if(Jc(e)){const s=t?yu(e.children):[],n=new Nu(s);s.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),u=n}else if(Zc(e)){const s=new Kn(e.name,e.data);e["x-name"]!=null&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),u=s}else throw new Error(`Not implemented yet: ${e.type}`);return u.startIndex=e.startIndex,u.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(u.sourceCodeLocation=e.sourceCodeLocation),u}function yu(e){const t=e.map(u=>Jn(u,!0));for(let u=1;u<t.length;u++)t[u].prev=t[u-1],t[u-1].next=t[u];return t}const Bs={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class jc{constructor(t,u,s){this.dom=[],this.root=new Nu(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(s=u,u=Bs),typeof t=="object"&&(u=t,t=void 0),this.callback=t??null,this.options=u??Bs,this.elementCB=s??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Nu(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,u){const s=this.options.xmlMode?L.Tag:void 0,n=new Zn(t,u,void 0,s);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:u}=this;if(u&&u.type===L.Text)u.data+=t,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{const s=new Lu(t);this.addNode(s),this.lastNode=s}}oncomment(t){if(this.lastNode&&this.lastNode.type===L.Comment){this.lastNode.data+=t;return}const u=new Gn(t);this.addNode(u),this.lastNode=u}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Lu(""),u=new Qn([t]);this.addNode(u),t.parent=u,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,u){const s=new Kn(t,u);this.addNode(s)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const u=this.tagStack[this.tagStack.length-1],s=u.children[u.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),u.children.push(t),s&&(t.prev=s,s.next=t),t.parent=u,this.lastNode=null}}function eo(e,t){const u=new jc(void 0,t);return new Wc(u,t).end(e),u.root}const jn=e=>{let t="";return e.italic&&(t="italic "),e.bold&&(t+="bold "),`${t}${e.size}px '${e.font}',sans-serif`},Pu=(e,t)=>{ot(0);const u=e.lineTable.length;Pe.font=jn(t);const s=Pe.measureText(""),n={mode:"break",text:"",x:0,y:0,w:0,h:s.fontBoundingBoxAscent+s.fontBoundingBoxDescent,line:u,textFormat:t.toObject()};e.heightTable[u]=0,e.ascentTable[u]=0,e.widthTable[u]=0,e.lineTable.push(n),e.textTable.push(n)},to=e=>{const t=e.heightTable.length-1;for(let u=1;u<t;++u){if(e.heightTable[u]>0)continue;const n=e.lineTable[u];n&&(e.heightTable[u]=n.h=e.heightTable[u-1])}},er=e=>{let t=0;return e.leftMargin&&(t+=e.leftMargin),e.rightMargin&&(t+=e.rightMargin),t},uo=(e,t,u,s)=>{let n=u.lineTable.length-1;const r=s.width-er(t)-4;for(let a=0;a<e.length;++a){const i=s.textFormats?s.textFormats.shift():t,c=e[a],o={mode:"text",text:c,x:0,y:0,w:0,h:0,line:n,textFormat:i.toObject()};Pe.font=jn(i);const d=Pe.measureText(c||""),l=i.letterSpacing?d.width+i.letterSpacing:d.width,h=i.leading?d.fontBoundingBoxAscent+d.fontBoundingBoxDescent+i.leading:d.fontBoundingBoxAscent+d.fontBoundingBoxDescent;if(o.x=0,o.y=d.fontBoundingBoxAscent,o.w=l,o.h=h,ot(yt()+l),s.wordWrap&&yt()>r){ot(l),n++,o.line=n;const b={mode:"wrap",text:"",x:0,y:0,w:0,h:0,line:n,textFormat:i.toObject()};let f=1,p=!0;const $=/[0-9a-zA-Z?!;:.,?!。、;:〜]/g;for(;;){const m=u.textTable.length-f;if(0>=m){p=!1,f=0;break}const R=u.textTable[m];if(!R){p=!1,f=0;break}if(R.mode!=="text"){p=!1;break}if(R.text===" "){f--;break}if(!R.text.match($)){f--;break}f++}if(u.widthTable[n]=0,u.heightTable[n]=0,u.ascentTable[n]=0,f>0&&p){const m=u.textTable.length-f;u.textTable.splice(m,0,b),u.lineTable.push(b);const R=n-1;u.widthTable[R]=0,u.heightTable[R]=0,u.ascentTable[R]=0;for(let S=0;S<m;++S){const k=u.textTable[S];k&&k.line===R&&k.mode==="text"&&(u.widthTable[R]+=k.w,u.heightTable[R]=Math.max(u.heightTable[R],k.h),u.ascentTable[R]=Math.max(u.ascentTable[R],k.y))}ot(0);for(let S=m+1;S<u.textTable.length;++S){const k=u.textTable[S];k.line=n,ot(yt()+k.w)}}else u.textTable.push(b),u.lineTable.push(b)}u.widthTable[n]=yt(),u.heightTable[n]=Math.max(u.heightTable[n],h),u.ascentTable[n]=Math.max(u.ascentTable[n],o.y),u.textTable.push(o)}},so=e=>{const t=e.trim().split(";"),u=[];for(let s=0;s<t.length;++s){const n=t[s];if(!n)continue;const r=n.split(":"),a=r[0].trim(),i=r[1].trim();switch(a){case"font-size":u.push({name:"size",value:parseInt(i)});break;case"font-family":u.push({name:"face",value:i.replace(/'|"/g,"")});break;case"letter-spacing":u.push({name:"letterSpacing",value:parseInt(i)});break;case"margin-bottom":u.push({name:"leading",value:parseInt(i)});break;case"margin-left":u.push({name:"leftMargin",value:parseInt(i)});break;case"margin-right":u.push({name:"rightMargin",value:parseInt(i)});break;case"color":case"align":u.push({name:a,value:i});break;case"text-decoration":case"font-weight":case"font-style":u.push({name:i,value:!0});break}}return u},Bu=(e,t,u)=>{for(let s=0;s<e.length;++s){const n=e[s];switch(n.name){case"style":Bu(so(n.value),t,u);break;case"align":t.align=n.value;break;case"face":t.font=n.value;break;case"size":t.size=+n.value,u.subFontSize&&(t.size-=u.subFontSize,1>t.size&&(t.size=1));break;case"color":t.color=Qe(n.value);break;case"letterSpacing":t.letterSpacing=parseInt(n.value);break;case"leading":t.leading=parseInt(n.value);break;case"leftMargin":t.leftMargin=parseInt(n.value);break;case"rightMargin":t.rightMargin=parseInt(n.value);break;case"underline":t.underline=!0;break;case"bold":t.bold=!0;break;case"italic":t.italic=!0;break}}},Du=(e,t,u,s)=>{for(let n=0;n<e.children.length;++n){const r=e.children[n];if(r.nodeType===3){uo(r.nodeValue||"",t,u,s);continue}const a=t.clone();switch(r.name.toUpperCase()){case"DIV":case"P":Bu(r.attributes,a,s),s.multiline&&Pu(u,a),Du(r,a,u,s);continue;case"U":a.underline=!0;break;case"B":a.bold=!0;break;case"I":a.italic=!0;break;case"FONT":case"SPAN":Bu(r.attributes,a,s);break;case"BR":if(!s.multiline)continue;Pu(u,a);break}Du(r,a,u,s)}},no=(e,t,u)=>{const s=new Rc;if(!e)return s;const n=e.trim().replace(/\r?\n/g,"").replace(/\t/g,""),r=t.clone();return u.subFontSize&&u.subFontSize>0&&r.size&&(r.size-=u.subFontSize,1>r.size&&(r.size=1)),Pu(s,r),Du(eo(n),r,s,u),to(s),s},q=(e,t=0)=>(e.$textData||(e.$textData=no(e.htmlText,e.defaultTextFormat,{width:e.width,multiline:e.multiline,wordWrap:e.wordWrap,subFontSize:t,textFormats:e.$textFormats})),e.$textData),_=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&_(t)},_u=e=>{e.$textData=null,_(e),e.uniqueKey!==""&&O.has(e.uniqueKey)&&(O.removeById(e.uniqueKey),O.$removeIds.push(+e.uniqueKey))},ro=e=>{if(_(e),e.autoSize==="none"){e.xMin=e.bounds.xMin,e.yMin=e.bounds.yMin,e.xMax=e.bounds.xMax,e.yMax=e.bounds.yMax;return}const t=e.defaultTextFormat,u=e.textWidth+4+er(t);if(e.wordWrap)e.xMin=e.bounds.xMin,e.xMax=e.bounds.xMax;else switch(e.autoSize){case"left":e.xMax=u+e.xMin;break;case"center":e.xMax=u+e.xMin;break;case"right":e.xMax=e.bounds.xMax-(e.bounds.xMax-e.bounds.xMin-(u-e.bounds.xMin));break}e.yMax=e.textHeight+e.bounds.yMin+4},ao=e=>{let t=0;const u=q(e);for(let n=0;n<u.textTable.length;++n){const r=u.textTable[n];t=Math.max(t,r.textFormat.size||0)}let s=1;if(e.width&&e.textWidth)for(;t>s&&e.textWidth+4>e.width;)_u(e),q(e,s++);if(e.height&&e.textHeight)for(;t>s&&e.textHeight+4>e.height;)_u(e),q(e,s++);_(e)},Te=e=>{_u(e),q(e),e.autoSize==="none"&&e.autoFontSize&&ao(e),ro(e)},io=(e,t)=>{const u=q(e);if(2>u.textTable.length)return;let s=2,n=0;for(let h=1;h<u.textTable.length;++h){const b=u.textTable[h];if(!b)continue;let f=!1;if(b.mode==="text"&&(f=!0,s+=b.w),n>=t){n=h;break}b.mode==="break"&&(f=!0,s=2),f&&n++}const r=u.textTable[n];if(!r)return;e.$scrollX=e.$scrollY=0;const a=r.line;let i=0;for(let h=0;h<=a;++h)i+=u.heightTable[h];const c=Math.abs(e.yMax-e.yMin);let o=0;for(let h=a;h>-1;--h){const b=u.heightTable[h];if(c<o+b)break;o+=b}if(i>c){const h=(e.textHeight-c)/c;e.$scrollY=Math.max(0,Math.min((i-o)/h,c))}const d=Math.abs(e.xMax-e.xMin);let l=0;for(let h=n;h>0;--h){const b=u.textTable[h];if(b.mode==="text"){if(d<l+b.w)break;l+=b.w}}if(s>d){const h=(e.textWidth-d)/d;e.$scrollX=Math.max(0,Math.min((s-l)/h,d+.5))}_(e)},ae=()=>{const e=_t();e!==void 0&&clearTimeout(e),Hn(void 0)},co=window.devicePixelRatio,oo=e=>{const t=e.localToGlobal(new J),u=e.$textData;if(u){const n=u.textTable[e.focusIndex];if(n){for(let a=e.focusIndex-1;a>-1;--a){const i=u.textTable[a];if(!i||i.line!==n.line)break;t.x+=i.w}const r=n.mode==="break"?n.line-1:n.line;for(let a=0;a<r;++a)t.y+=u.heightTable[a]}}const s=T.rendererScale/co;ie.style.left=`${ze.x+t.x*s}px`,ie.style.top=`${ze.y+t.y*s}px`},le=e=>{e.focusVisible=!e.focusVisible,_(e),Hn(setTimeout(()=>le(e),500)),oo(e)},lo=(e,t)=>{e.willTrigger(t)&&e.dispatchEvent(new De(t)),ie.value="",e.focus?(setTimeout(()=>{ie.focus()},300),_t()===void 0&&(e.focusIndex===-1&&(e.focusIndex=1,e.selectIndex=-1),le(e))):(e.focusIndex=-1,e.selectIndex=-1,e.focusVisible=!1,ae(),ie.blur()),_(e)},ho=(e,t,u,s)=>e/s*u+t,fo=(e,t,u,s)=>(e/=s)*e*u+t,bo=(e,t,u,s)=>-(e/=s)*(e-2)*u+t,$o=(e,t,u,s)=>(e/=s/2)<1?e*e*u/2+t:-((e-=1)*(e-2)-1)*u/2+t,xo=(e,t,u,s)=>(e/=s)*e*e*u+t,go=(e,t,u,s)=>(e/=s,(--e*e*e+1)*u+t),mo=(e,t,u,s)=>(e/=s/2)<1?e*e*e*u/2+t:((e-=2)*e*e+2)*u/2+t,po=(e,t,u,s)=>(e/=s)*e*e*e*u+t,To=(e,t,u,s)=>(e/=s,(--e*e*e*e-1)*-u+t),Eo=(e,t,u,s)=>(e/=s/2)<1?e*e*e*e*u/2+t:((e-=2)*e*e*e-2)*-u/2+t,yo=(e,t,u,s)=>(e/=s)*e*e*e*e*u+t,wo=(e,t,u,s)=>(e/=s,(--e*e*e*e*e+1)*u+t),Mo=(e,t,u,s)=>(e/=s/2)<1?e*e*e*e*e*u/2+t:((e-=2)*e*e*e*e+2)*u/2+t,Ao=(e,t,u,s)=>-u*Math.cos(e/s*(Math.PI/2))+u+t,vo=(e,t,u,s)=>u*Math.sin(e/s*(Math.PI/2))+t,Io=(e,t,u,s)=>-u/2*(Math.cos(Math.PI*e/s)-1)+t,So=(e,t,u,s)=>u*Math.pow(2,10*(e/s-1))+t,Ro=(e,t,u,s)=>u*(-Math.pow(2,-10*e/s)+1)+t,ko=(e,t,u,s)=>(e/=s/2)<1?u/2*Math.pow(2,10*(e-1))+t:u/2*(-Math.pow(2,-10*(e-1))+2)+t,Oo=(e,t,u,s)=>(1-Math.sqrt(1-(e/=s)*e))*u+t,Fo=(e,t,u,s)=>(e/=s,Math.sqrt(1- --e*e)*u+t),Co=(e,t,u,s)=>(e/=s*2)<1?(Math.sqrt(1-e*e)-1)/-2*u+t:(Math.sqrt(1-(e-=2)*e)+1)/2*u+t,Lo=(e,t,u,s)=>(2.70158*(e/=s)*e*e-1.70158*e*e)*u+t,No=(e,t,u,s)=>(1+2.70158*Math.pow((e/=s)-1,3)+1.70158*Math.pow(e-1,2))*u+t,Po=(e,t,u,s)=>{let n=1.70158;return(e/=s/2)<1?e*e*(((n*=1.525)+1)*e-n)*u/2+t:((e-=2)*e*(((n*=1.525)+1)*e+n)+2)*u/2+t},Bo=(e,t,u,s)=>(e/=s)===0?t:e===1?u+t:-Math.pow(2,(e*=10)-10)*Math.sin((e-10.75)*(2*Math.PI/3))*u+t,Do=(e,t,u,s)=>(e/=s)===0?t:e===1?u+t:(Math.pow(2,-10*e)*Math.sin((e*10-.75)*(2*Math.PI/3))+1)*u+t,_o=(e,t,u,s)=>(e/=s)===0?t:e===1?u+t:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5)))/2*u+t:(Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1)*u+t,Uo=(e,t,u,s)=>(e/=s)<1/2.75?7.5625*e*e*u+t:e<2/2.75?(7.5625*(e-=1.5/2.75)*e+.75)*u+t:e<2.5/2.75?(7.5625*(e-=2.25/2.75)*e+.9375)*u+t:(7.5625*(e-=2.625/2.75)*e+.984375)*u+t,qo=(e,t,u,s)=>u-_e.outBounce(s-e,0,u,s)+t,Xo=(e,t,u,s)=>e<s/2?_e.inBounce(e*2,t,u/2,s):_e.outBounce(e*2-s,t+u/2,u/2,s);class _e{static linear(t,u,s,n){return ho(t,u,s,n)}static inQuad(t,u,s,n){return fo(t,u,s,n)}static outQuad(t,u,s,n){return bo(t,u,s,n)}static inOutQuad(t,u,s,n){return $o(t,u,s,n)}static inCubic(t,u,s,n){return xo(t,u,s,n)}static outCubic(t,u,s,n){return go(t,u,s,n)}static inOutCubic(t,u,s,n){return mo(t,u,s,n)}static inQuart(t,u,s,n){return po(t,u,s,n)}static outQuart(t,u,s,n){return To(t,u,s,n)}static inOutQuart(t,u,s,n){return Eo(t,u,s,n)}static inQuint(t,u,s,n){return yo(t,u,s,n)}static outQuint(t,u,s,n){return wo(t,u,s,n)}static inOutQuint(t,u,s,n){return Mo(t,u,s,n)}static inSine(t,u,s,n){return Ao(t,u,s,n)}static outSine(t,u,s,n){return vo(t,u,s,n)}static inOutSine(t,u,s,n){return Io(t,u,s,n)}static inExpo(t,u,s,n){return So(t,u,s,n)}static outExpo(t,u,s,n){return Ro(t,u,s,n)}static inOutExpo(t,u,s,n){return ko(t,u,s,n)}static inCirc(t,u,s,n){return Oo(t,u,s,n)}static outCirc(t,u,s,n){return Fo(t,u,s,n)}static inOutCirc(t,u,s,n){return Co(t,u,s,n)}static inBack(t,u,s,n){return Lo(t,u,s,n)}static outBack(t,u,s,n){return No(t,u,s,n)}static inOutBack(t,u,s,n){return Po(t,u,s,n)}static inElastic(t,u,s,n){return Bo(t,u,s,n)}static outElastic(t,u,s,n){return Do(t,u,s,n)}static inOutElastic(t,u,s,n){return _o(t,u,s,n)}static outBounce(t,u,s,n){return Uo(t,u,s,n)}static inBounce(t,u,s,n){return qo(t,u,s,n)}static inOutBounce(t,u,s,n){return Xo(t,u,s,n)}}const Yo=e=>{cancelAnimationFrame(e.$timerId),e.hasEventListener(xe.STOP)&&e.dispatchEvent(new xe(xe.STOP)),e.entries=null,e.stopFlag=!0},tr=e=>{const t=[];for(const[u,s]of Object.entries(e))t.push({name:u,value:typeof s=="number"?s:tr(s)});return t},ur=(e,t,u,s,n)=>{for(let r=0;r<n.length;++r){const a=n[r];if(!a)continue;const i=a.name;if(!(i in t)||!(i in s))continue;if(typeof a.value!="number"){ur(e,t[i],u[i],s[i],a.value);continue}const c=u[i];e.duration>e.currentTime?t[i]=e.ease(e.currentTime,c,s[i]-c,e.duration):t[i]=s[i]}},sr=(e,t)=>e.stopFlag||!e.entries?-1:(e.currentTime=(t-e.startTime)/1e3,ur(e,e.target,e.from,e.to,e.entries),e.hasEventListener(xe.UPDATE)&&e.dispatchEvent(new xe(xe.UPDATE)),e.currentTime>=e.duration?(e.hasEventListener(xe.COMPLETE)&&e.dispatchEvent(new xe(xe.COMPLETE)),e.nextJob&&e.nextJob.start(),-1):requestAnimationFrame(u=>{sr(e,u)})),Ds=e=>{e.stopFlag||(e.entries=tr(e.from),e.entries&&(e.startTime=performance.now(),e.$timerId=sr(e,e.startTime)))},Vo=e=>{cancelAnimationFrame(e.$timerId),e.stopFlag=!1,e.delay?setTimeout(()=>{Ds(e)},e.delay*1e3):Ds(e)};class Wo extends je{target;entries;startTime;stopFlag;$timerId;delay;duration;ease;from;to;currentTime;nextJob;constructor(t,u,s,n=0,r=1,a=null){super(),this.target=t,this.from=u,this.to=s,this.delay=n,this.duration=r,this.ease=a||_e.linear,this.currentTime=0,this.nextJob=null,this.entries=null,this.startTime=0,this.stopFlag=!1,this.$timerId=-1}chain(t){return this.nextJob=t,t}start(){Vo(this)}stop(){Yo(this)}}class hs{static add(t,u,s,n=0,r=1,a=null){return new Wo(t,u,s,n,r,a)}}const Ho=(e,t)=>{if(!e.scrollEnabled||e.autoSize!=="none"||e.yScrollShape.hasLocalVariable("job"))return;const u=e.width;if(t=ht(t,0,u,0),e.scrollX!==t){if(e.textWidth>u){_(e);const s=e.xScrollShape;s.width=u*u/e.textWidth;const n=e.parent;if(n){s.hasLocalVariable("job")&&s.getLocalVariable("job").stop(),s.alpha=.9,s.x=e.x+1+(u-1-s.width)/(u-1)*(t-1),s.y=e.y+e.height-s.height-.5,n.addChildAt(s,n.getChildIndex(e)+1);const r=hs.add(s,{alpha:.9},{alpha:0},.5,.2,_e.outQuad);r.addEventListener(g.COMPLETE,a=>{const i=a.target.target;i.deleteLocalVariable("job"),i.parent&&i.parent.removeChild(i)}),r.start(),s.setLocalVariable("job",r)}e.$scrollX=t}e.willTrigger(g.SCROLL)&&e.dispatchEvent(new g(g.SCROLL,!0))}},zo=(e,t)=>{if(!e.scrollEnabled||e.autoSize!=="none"||!e.multiline&&!e.wordWrap||e.xScrollShape.hasLocalVariable("job"))return;const u=e.height;if(t=ht(t,0,u,0),e.scrollY!==t){if(e.textHeight>u){_(e);const s=e.yScrollShape;s.height=u*u/e.textHeight;const n=e.parent;if(n){s.hasLocalVariable("job")&&s.getLocalVariable("job").stop(),s.alpha=.9,s.x=e.x+e.width-s.width-.5,s.y=e.y+.5+(u-1-s.height)/(u-1)*(t-1),n.addChildAt(s,n.getChildIndex(e)+1);const r=hs.add(s,{alpha:.9},{alpha:0},.5,.2,_e.outQuad);r.addEventListener(g.COMPLETE,a=>{const i=a.target.target;i.deleteLocalVariable("job"),i.parent&&i.parent.removeChild(i)}),r.start(),s.setLocalVariable("job",r),e.$scrollY=t}}e.willTrigger(g.SCROLL)&&e.dispatchEvent(new g(g.SCROLL,!0))}},Go=e=>{let t="";const u=q(e);for(let s=1;s<u.textTable.length;++s){const n=u.textTable[s];if(n)switch(n.mode){case"text":t+=n.text;break;case"break":t+="\r";break;default:continue}}return t},Ko=(e,t)=>{let u="";const s=q(e);for(let n=1;n<s.textTable.length;n++){const r=s.textTable[n];if(r){if(r.line>t)break;r.line===t&&r.mode==="text"&&(u+=r.text)}}return u},Qo=(e,t,u,s)=>{if(0>u||u>s)return;const n=e.text,r=u?n.slice(0,u):"";e.text=r+t+n.slice(s,n.length)},Zo=async e=>{if(e.focusIndex===-1||e.selectIndex===-1)return;let t="";const u=Math.min(e.focusIndex,e.selectIndex),s=Math.max(e.focusIndex,e.selectIndex)+1,n=q(e);for(let r=u;r<s;++r){const a=n.textTable[r];if(a)switch(a.mode){case"text":t+=a.text;break;case"break":t+=`
660
660
  `;break}}await navigator.clipboard.writeText(t)},Jo=async e=>{const t=await navigator.clipboard.readText();t===""||e.focusIndex===-1||e.insertText(t)},ds=e=>{if(e.compositionStartIndex>-1)return;let t=0,u=0;if(e.selectIndex>-1)t=Math.min(e.focusIndex,e.selectIndex),u=Math.max(e.focusIndex,e.selectIndex)+1,e.focusIndex=t;else{if(2>e.focusIndex)return;e.focusIndex--}const s=q(e),n=s.textTable[e.focusIndex];n&&n.mode==="wrap"&&e.focusIndex--;const r=[];let a="";for(let i=1;i<s.textTable.length;++i){const c=s.textTable[i];if(c&&!(e.focusIndex===i||t<=i&&u>i))switch(c.mode){case"break":r.push(new se(...Object.values(c.textFormat))),a+=`
661
661
  `;break;case"text":r.push(new se(...Object.values(c.textFormat))),a+=c.text;break;default:continue}}if(s.textTable.length===e.focusIndex&&(r.pop(),a=a.slice(0,-1)),e.selectIndex=-1,!a)e.text="",e.focusIndex=1;else{const i=e.textWidth,c=e.textHeight;if(e.$textFormats=r,e.text=a,e.scrollX>0){const o=e.textWidth,d=e.width;switch(!0){case d>o:e.$scrollX=0;break;case i!==o:e.$scrollX-=(i-o)/(o/d);break}}if(e.scrollY>0){const o=e.textHeight,d=e.height;switch(!0){case d>o:e.$scrollY=0;break;case c!==o:e.$scrollY-=(c-o)/(o/d);break}}e.$textFormats=null}},nr=(e,t)=>{if(e.focusIndex===-1||e.compositionStartIndex>-1)return;e.selectIndex>-1&&ds(e);const u=q(e);if(2>u.textTable.length){e.focusIndex=2,e.appendText(t);return}const s=[];let n="";for(let r=1;r<u.textTable.length;++r){const a=u.textTable[r];if(a){if(e.focusIndex===r)for(let i=0;i<t.length;++i)s.push(new se(...Object.values(a.textFormat))),n+=t[i];switch(a.mode){case"break":s.push(new se(...Object.values(a.textFormat))),n+=`
662
- `;break;case"text":s.push(new se(...Object.values(a.textFormat))),n+=a.text;break;default:continue}}}if(u.textTable.length===e.focusIndex){let r;if(u.textTable.length){const a=u.textTable[u.textTable.length-1];r=new se(...Object.values(a.textFormat))}else r=e.defaultTextFormat,e.focusIndex++;for(let a=0;a<t.length;++a)s.push(new se(...Object.values(r.toObject()))),n+=t[a]}e.$textFormats=s,e.text=n,e.$textFormats=null,e.focusIndex+=t.length,e.selectIndex=-1,ie.value=""},_s=e=>{if(e.selectIndex===-1)return;const t=q(e);if(2>t.textTable.length)return;const u=t.textTable[e.selectIndex];if(!u)return;const s=u.mode==="text"?u.line:u.line-1,n=e.height,r=(e.textHeight-n)/n;let a=-e.scrollY*r-2,i=0;for(let f=0;f<t.heightTable.length&&(a+=t.heightTable[f],!(a>n));++f)i++;a=-e.scrollY*r-2;let c=0;for(let f=0;f<t.heightTable.length&&(a+=t.heightTable[f],!(a>0));++f)c++;c>=u.line&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=t.heightTable[u.line]/r),u.line>=i&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=t.heightTable[u.line]/r);const o=e.width,d=(e.textWidth-o)/o;let l=2,h=e.scrollX*d-2+o;for(let f=1;e.selectIndex>=f;++f){const p=t.textTable[f];if(!p||p.line>s)break;if(p.line===s&&(e.selectIndex!==f&&(l+=p.w),h-=p.w,!(h>0))){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX+=p.w/d;break}}e.scrollX*d-2>l&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((l-2)/e.textWidth))},jo=(e,t,u,s=!1)=>{if(e.type!=="input")return;const n=q(e);if(2>n.textTable.length){e.focusIndex=1,e.selectIndex=-1,_t()===void 0&&le(e);return}const r=e.width,a=e.height;let i=0;e.scrollX>0&&(i+=e.scrollX*(e.textWidth-r)/r);let c=0;e.scrollY>0&&(c+=e.scrollY*(e.textHeight-a)/a);const o=e.globalToLocal(new J(t,u)),d=o.x+i,l=o.y+c;let h=2,b=2,f=b+n.heightTable[0];for(let p=1;p<n.textTable.length;++p){const $=n.textTable[p];if($){switch($.mode){case"break":case"wrap":if(d>h&&l>b&&f>l&&r>d){const g=p;s?e.selectIndex!==g&&(e.selectIndex=g,e.focusVisible&&(e.focusVisible=!1,ae()),_s(e),_(e)):(e.focusIndex!==g||e.selectIndex>-1)&&(e.focusIndex=g,e.selectIndex=-1,_(e));return}h=2,b+=n.heightTable[$.line-1],f=b+n.heightTable[$.line];break;case"text":if(d>h&&l>b&&f>l&&h+$.w>d){let g=p;if(s)e.focusIndex>g?e.focusIndex===g+1?h+$.w/2<d&&(g=-1):h+$.w/2<d&&(g+=1):e.focusIndex===g?h+$.w/2>d&&(g=-1):h+$.w/2>d&&(g-=1),e.selectIndex!==g&&(e.selectIndex=g,e.selectIndex>-1&&(e.focusVisible=!1,ae()),_s(e),_(e));else{if(h+$.w/2<d){const R=n.textTable[g+1];(!R||R.mode==="text")&&(g+=1)}(e.focusIndex!==g||e.selectIndex>-1)&&(e.focusIndex=g,e.selectIndex=-1,_(e))}return}if(p===n.textTable.length-1&&d>h&&l>b&&f>l&&r>d){const g=n.textTable.length;s?e.selectIndex!==g&&(e.selectIndex=g,e.focusVisible&&(e.focusVisible=!1,ae()),_(e)):(e.focusIndex!==g||e.selectIndex>-1)&&(e.focusIndex=g,e.selectIndex=-1,_(e));return}h+=$.w;break}if(!s)e.focusIndex=n.textTable.length,e.selectIndex=-1,_t()===void 0?le(e):_(e);else{let g=0;for(let R=0;n.heightTable.length>R;++R)g+=n.heightTable[R];(l>g||2>l)&&(e.selectIndex=2>l?1:n.textTable.length,e.focusVisible&&(e.focusVisible=!1,ae()),_(e))}}}},e0=(e,t)=>{if(e.focusIndex===-1)return;const u=q(e);if(2>u.textTable.length)return;const s=u.textTable[e.focusIndex];if(!s)return;const n=s.mode==="text"?s.line:s.line-1;if(n===u.lineTable.length-1){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,e.focusVisible=!1,e.focusIndex=u.textTable.length;const h=e.width,b=(e.textWidth-h)/h;let f=0;for(let p=1;e.focusIndex>=p;++p){const $=u.textTable[p];if(!$||$.line>n)break;$.line===n&&(f+=$.w)}e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=(f-h)/b,ae(),le(e);return}const r=e.height,a=(e.textHeight-r)/r;let i=-e.scrollY*a-2,c=0;for(let h=0;h<u.heightTable.length&&(i+=u.heightTable[h],!(i>r));++h)c++;let o=2;for(let h=1;h<u.textTable.length;++h){const b=u.textTable[h];if(b){if(e.focusIndex===h){b.mode==="text"&&(o+=b.w/2);break}if(b.line>n)break;b.line!==n||b.mode!=="text"||(o+=b.w)}}let d=2;const l=n+1;for(let h=1;h<u.textTable.length;++h){const b=u.textTable[h];if(b){if(b.line>l){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,b.line>=c&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=u.heightTable[b.line]/a),e.focusVisible=!1,e.focusIndex=b.mode==="text"?h-1:h,e.scrollX&&d<o&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((d-2)/e.textWidth)),ae(),le(e);return}if(!(b.line!==l||b.mode!=="text")&&(d+=b.w,d>o)){if(t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===h-1&&(e.selectIndex=-1):e.selectIndex=-1,b.line>=c&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=u.heightTable[b.line]/a),e.scrollX){const f=e.width,p=(e.textWidth-f)/f;e.scrollX*p-2>d&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((d-2)/e.textWidth))}e.focusVisible=!1,e.focusIndex=h,ae(),le(e);return}}}t?e.selectIndex===-1&&(e.selectIndex=e.focusIndex):e.selectIndex=-1,e.focusVisible=!1,e.focusIndex=u.textTable.length,ae(),le(e)},t0=(e,t)=>{if(e.focusIndex===-1)return;const u=q(e);if(2>u.textTable.length)return;const s=u.textTable.length===e.focusIndex?e.focusIndex-1:e.focusIndex,n=u.textTable[s];if(!n||!n.line){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.focusVisible=!1,e.focusIndex=1,e.scrollX=0,ae(),le(e);return}const r=n.mode==="text"?n.line:n.line-1,a=e.height,i=(e.textHeight-a)/a;let c=0,o=-e.scrollY*i-2;for(let b=0;b<u.heightTable.length&&(o+=u.heightTable[b],!(o>0));++b)c++;let d=2;for(let b=1;b<u.textTable.length;++b){const f=u.textTable[b];if(f){if(e.focusIndex===b){f.mode==="text"&&(d+=f.w/2);break}if(f.line>r)break;f.line!==r||f.mode!=="text"||(d+=f.w)}}let l=2;const h=r-1;for(let b=1;b<u.textTable.length;++b){const f=u.textTable[b];if(f){if(f.line>h){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,c>=f.line&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=u.heightTable[f.line]/i),e.scrollX&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((l-2)/e.textWidth)),e.focusVisible=!1,e.focusIndex=f.mode==="text"?b-1:b,ae(),le(e);return}if(!(f.line!==h||f.mode!=="text")&&(l+=f.w,l>d)){t?e.selectIndex===-1?e.selectIndex=e.focusIndex-1:e.selectIndex===b+1&&(e.selectIndex=-1):e.selectIndex=-1,c>f.line&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=u.heightTable[f.line]/i),e.focusVisible=!1,e.focusIndex=b,ae(),le(e);return}}}},u0=(e,t)=>{if(!e.focusIndex)return;const u=q(e);if(u.textTable.length&&e.focusIndex<2){e.focusIndex=1;return}e.focusIndex--,t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1;const s=u.textTable[e.focusIndex];if(s){const n=s.mode==="text"?s.line:s.line-1,r=e.height,a=(e.textHeight-r)/r;let i=-e.scrollY*a-2,c=0;for(let d=0;d<u.heightTable.length&&(i+=u.heightTable[d],!(i>0));++d)c++;c>n&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=u.heightTable[s.line]/a);const o=u.textTable[e.focusIndex+1];if(o){const d=o.mode==="text"?o.line:o.line-1;let l=2;for(let p=1;e.focusIndex>p;++p){const $=u.textTable[p];if(!$||$.line>n)break;$.line===n&&(l+=$.w)}const h=e.width,b=(e.textWidth-h)/h,f=e.scrollX*b-2;if(l>h&&o&&n<d){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width;return}if(f>l){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((l-2)/e.textWidth);return}}}e.focusVisible=!1,ae(),le(e)},s0=(e,t)=>{const u=q(e);if(u.textTable.length===e.focusIndex)return;t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,e.focusVisible=!1,e.focusIndex++,ae(),le(e);const s=u.textTable[e.focusIndex];if(s){const n=s.mode==="text"?s.line:s.line-1,r=e.height,a=(e.textHeight-r)/r;let i=-e.scrollY*a-2,c=0;for(let f=0;f<u.heightTable.length&&(i+=u.heightTable[f],!(i>r));++f)c++;n>=c&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=u.heightTable[n]/a);const o=u.textTable[e.focusIndex-1],d=o.mode==="text"?o.line:o.line-1;if(o&&n>d){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=0;return}const l=e.width,h=(e.textWidth-l)/l;let b=e.scrollX*h-2+l;for(let f=1;e.focusIndex>=f;++f){const p=u.textTable[f];if(!p||p.line>n)break;if(p.line===n&&(b-=p.w,!(b>0))){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX+=p.w/h;break}}}},n0=(e,t)=>{if(e.focusIndex!==-1)switch(t.key){case"Backspace":case"Delete":e.deleteText();break;case"Enter":e.insertText(`
663
- `);break;case"ArrowLeft":u0(e,t.shiftKey);break;case"ArrowRight":s0(e,t.shiftKey);break;case"ArrowUp":t0(e,t.shiftKey);break;case"ArrowDown":e0(e,t.shiftKey);break;case"a":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.selectAll());break;case"c":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.copy());break;case"v":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.paste());break}},r0=e=>{const t=q(e);2>t.textTable.length||(e.selectIndex=1,e.focusIndex=t.textTable.length,_(e))},a0=(e,t)=>{const u=e.defaultTextFormat;switch(u.font=t.font,u.size=t.size,u.align=t.align,u.color=t.color,u.leading=t.leading,u.letterSpacing=t.letterSpacing,u.leftMargin=t.leftMargin,u.rightMargin=t.rightMargin,t.fontType){case 1:u.bold=!0;break;case 2:u.italic=!0;break;case 3:u.bold=!0,u.italic=!0;break}switch(e.defaultTextFormat=u,e.type=t.inputType,e.multiline=t.multiline,e.wordWrap=t.wordWrap,e.border=t.border,e.scrollEnabled=t.scroll,e.thickness=t.thickness,e.thicknessColor=t.thicknessColor,t.autoSize){case 1:e.autoSize=t.align;break;case 2:e.autoFontSize=!0;break}e.xMin=e.bounds.xMin=t.bounds.xMin,e.xMax=e.bounds.xMax=t.bounds.xMax,e.yMin=e.bounds.yMin=t.bounds.yMin,e.yMax=e.bounds.yMax=t.bounds.yMax+4,e.text=t.text};class Uu extends as{isText;$textData;_$isHTML;xMin;yMin;xMax;yMax;bounds;scrollEnabled;xScrollShape;yScrollShape;focusVisible;focusIndex;selectIndex;maxChars;restrict;type;compositionStartIndex;compositionEndIndex;$textFormats;$scrollX;$scrollY;cacheKey;cacheParams;_$background;_$backgroundColor;_$border;_$borderColor;_$htmlText;_$multiline;_$text;_$wordWrap;_$defaultTextFormat;_$rawHtmlText;_$autoSize;_$autoFontSize;_$focus;_$thickness;_$thicknessColor;_$stopIndex;constructor(){super(),this.isText=!0,this.$textData=null,this._$background=!1,this._$backgroundColor=16777215,this._$border=!1,this._$borderColor=0,this._$htmlText="",this._$multiline=!1,this._$text="",this._$wordWrap=!1,this.$scrollX=0,this.$scrollY=0,this.$textFormats=null,this.maxChars=0,this._$stopIndex=-1,this.compositionStartIndex=-1,this.compositionEndIndex=-1;const t=new se;Ic(t),this._$defaultTextFormat=t,this._$rawHtmlText="",this.xMin=0,this.yMin=0,this.xMax=100,this.yMax=100,this.bounds={xMin:0,xMax:this.xMax,yMin:0,yMax:this.yMax},this.restrict="",this._$isHTML=!1,this._$autoSize="none",this._$autoFontSize=!1,this.focusVisible=!1,this.focusIndex=-1,this.selectIndex=-1,this.scrollEnabled=!0,this.xScrollShape=new $t,this.xScrollShape.graphics.beginFill("#000",.3).drawRoundRect(0,0,3,3,3),this.xScrollShape.scale9Grid=new be(1.5,1.5,.1,.1),this.yScrollShape=new $t,this.yScrollShape.graphics.beginFill("#000",.3).drawRoundRect(0,0,3,3,3),this.yScrollShape.scale9Grid=new be(1.5,1.5,.1,.1),this.type="static",this._$focus=!1,this._$thickness=0,this._$thicknessColor=0,this.cacheKey=0,this.cacheParams=[0,0,0]}static get namespace(){return"next2d.display.TextField"}get namespace(){return"next2d.display.TextField"}get autoFontSize(){return this._$autoFontSize}set autoFontSize(t){t!==this._$autoFontSize&&(this._$autoFontSize=!!t,Te(this))}get autoSize(){return this._$autoSize}set autoSize(t){t!==this._$autoSize&&(this._$autoSize=t,Te(this))}get background(){return this._$background}set background(t){t!==this._$background&&(this._$background=!!t,_(this))}get backgroundColor(){return this._$backgroundColor}set backgroundColor(t){t=ht(Qe(t),0,16777215,16777215),t!==this._$backgroundColor&&(this._$backgroundColor=t,_(this))}get border(){return this._$border}set border(t){t!==this._$border&&(this._$border=!!t,_(this))}get borderColor(){return this._$borderColor}set borderColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$borderColor&&(this._$borderColor=t,_(this))}get stopIndex(){return this._$stopIndex}set stopIndex(t){t|=0,this._$stopIndex!==t&&(this._$stopIndex=t,io(this,t))}get defaultTextFormat(){return this._$defaultTextFormat.clone()}set defaultTextFormat(t){this._$rawHtmlText="",this._$isHTML?this._$text="":this._$htmlText="",this._$defaultTextFormat=t,Te(this)}get focus(){return this._$focus}set focus(t){this._$focus!==t&&this.type==="input"&&(this._$focus=!!t,lo(this,this._$focus?De.FOCUS_IN:De.FOCUS_OUT))}get htmlText(){if(this._$htmlText)return this._$htmlText;const t=Sc(this.defaultTextFormat);return this._$htmlText=`<span style="${t}">${this._$text.replace(/\n/g,"<br>")}</span>`,this._$htmlText}set htmlText(t){this._$htmlText!==t&&(this._$htmlText=`${t}`,this._$rawHtmlText="",this._$text="",this._$isHTML=!0,Te(this),this.hasEventListener(m.CHANGE)&&this.dispatchEvent(new m(m.CHANGE)))}get length(){return this.text.length}get multiline(){return this._$multiline}set multiline(t){t!==this._$multiline&&(this._$multiline=!!t,Te(this))}get numLines(){return q(this).lineTable.length}get scrollX(){return this.$scrollX}set scrollX(t){Ho(this,t)}get scrollY(){return this.$scrollY}set scrollY(t){zo(this,t)}get text(){return this._$isHTML?(this._$rawHtmlText||(this._$rawHtmlText=Go(this)),this._$rawHtmlText):this._$text}set text(t){t=`${t}`,t===""&&(this.scrollX&&(this.scrollX=0),this.scrollY&&(this.scrollY=0)),t!==this._$text&&(this._$htmlText="",this._$rawHtmlText="",this._$isHTML=!1,this._$text=t,Te(this),this.hasEventListener(m.CHANGE)&&this.dispatchEvent(new m(m.CHANGE)))}get textHeight(){return q(this).textHeight}get textWidth(){return q(this).textWidth}get thickness(){return this._$thickness}set thickness(t){t|=0,t!==this._$thickness&&(this._$thickness=t,_(this))}get thicknessColor(){return this._$thicknessColor}set thicknessColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$thicknessColor&&(this._$thicknessColor=t,_(this))}get wordWrap(){return this._$wordWrap}set wordWrap(t){this._$wordWrap!==t&&(this._$wordWrap=!!t,Te(this))}get width(){return super.width}set width(t){if(t=+t,!isNaN(t)&&0>t)return;const u=t+this.bounds.xMin;u!==this.bounds.xMax&&(this.bounds.xMax=u,Te(this))}get height(){return super.height}set height(t){if(t=+t,!isNaN(t)&&0>t)return;const u=t+this.bounds.yMin;u!==this.bounds.yMax&&(this.bounds.yMax=u,Te(this))}appendText(t){const u=this.text;this.text=u+`${t}`}insertText(t){nr(this,t)}deleteText(){ds(this)}getLineText(t){return this._$text||this._$htmlText?Ko(this,t|0):""}replaceText(t,u,s){Qo(this,t,u|0,s|0)}selectAll(){r0(this)}copy(){Zo(this)}paste(){Jo(this)}setFocusIndex(t,u,s=!1){jo(this,t,u,s)}keyDown(t){n0(this,t)}$sync(t,u=null){u&&super.$syncLoaderInfo(u),a0(this,t)}}const i0=e=>{e.compositionStartIndex=e.focusIndex},c0=()=>{const e=Fe();e&&i0(e)},o0=(e,t)=>{if(e.compositionEndIndex>-1){const i=e.compositionStartIndex;e.focusIndex=e.compositionStartIndex,e.selectIndex=e.compositionEndIndex-1,e.compositionStartIndex=-1,ds(e),e.compositionStartIndex=i,e.selectIndex=-1}let u=q(e);const s=[],n=t.length;let r="";if(2>u.textTable.length)r=t,e.focusIndex=1,e.compositionStartIndex=1;else{for(let i=1;i<u.textTable.length;++i){const c=u.textTable[i];if(c){if(e.compositionStartIndex===i)for(let o=0;o<n;++o)s.push(new se(...Object.values(c.textFormat))),r+=t[o];switch(c.mode){case"break":s.push(new se(...Object.values(c.textFormat))),r+=`
664
- `;break;case"text":s.push(new se(...Object.values(c.textFormat))),r+=c.text;break;default:continue}}}if(e.compositionStartIndex===u.textTable.length){const i=u.textTable[e.compositionStartIndex-1];if(!i)return;for(let c=0;c<n;++c)s.push(new se(...Object.values(i.textFormat))),r+=t[c]}}s.length&&(e.$textFormats=s),e.text=r,e.$textFormats=null,u=q(e);let a=e.compositionStartIndex+n;for(let i=e.compositionStartIndex;i<a;++i){const c=u.textTable[i];if(!c)break;if(c.textFormat.underline=!0,c.mode==="wrap"){if(i===e.compositionStartIndex){let o=1;for(;;){const d=u.textTable[i-o];if(!d)break;if(d.mode==="text"){d.textFormat.underline=!0;break}o++}}i>e.compositionStartIndex&&a++}}e.compositionEndIndex=e.focusIndex=a},l0=e=>{const t=Fe();t&&o0(t,e.data)},h0=e=>{if(e.compositionEndIndex>-1){const t=q(e);for(let u=e.compositionStartIndex;u<e.compositionEndIndex;++u){const s=t.textTable[u];s&&(s.textFormat.underline=!1)}e.focusIndex=e.compositionEndIndex}ie.blur(),ie.value="",e.focus&&ie.focus(),e.selectIndex=-1,e.compositionStartIndex=-1,e.compositionEndIndex=-1},d0=()=>{const e=Fe();e&&h0(e)},f0=e=>{if(!e.data)return;const t=Fe();t&&(nr(t,e.data),t.hasEventListener(m.INPUT)&&t.dispatchEvent(new m(m.INPUT)))},b0=e=>{e.addEventListener("compositionstart",c0),e.addEventListener("compositionupdate",l0),e.addEventListener("compositionend",d0),e.addEventListener("input",f0)};b0(ie);const rr=[],$0=()=>rr,x0=e=>{rr.push(e)};let Be=null;const m0=()=>!!Be,g0=()=>{Be||(Be=new AudioContext),Be.resume()},ar=()=>(Be||(Be=new AudioContext),Be),p0=e=>{let t=null;switch(e.method.toUpperCase()){case"GET":if(e.data){const s=e.url.split("?");s[1]=s.length===1?e.data.toString():`${s[1]}&${e.data.toString()}`,e.url=s.join("?")}break;case"PUT":case"POST":e.data&&(t=e.data.toString());break}const u=new XMLHttpRequest;if(u.open(e.method,e.url,!0),u.responseType=e.format,u.withCredentials=e.withCredentials,e.event){const s=Object.keys(e.event);for(let n=0;n<s.length;++n){const r=s[n];u.addEventListener(r,e.event[r])}}for(let s=0;s<e.headers.length;++s){const n=e.headers[s];n&&u.setRequestHeader(n.name,n.value)}u.send(t)},fs=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)};let ir=1;const T0=()=>ir,E0=e=>{ir=fs(e,0,1,1)},y0=[],Ut=()=>y0,M0=[],au=()=>M0,w0=e=>{E0(e);const t=Ut();for(let s=0;s<t.length;++s){const n=t[s];n&&(n.volume=e)}const u=au();for(let s=0;s<u.length;++s){const n=u[s];n&&(n.volume=e)}},A0=()=>{const e=Ut();for(let u=0;u<e.length;++u){const s=e[u];s&&s.stop()}const t=au();for(let u=0;u<t.length;++u){const s=t[u];s&&s.pause()}e.length=0,t.length=0};class Je{static get volume(){return T0()}static set volume(t){w0(t)}static stopAll(){A0()}}const v0=e=>{e.canLoop?e.play():(e.stop(),e.willTrigger(m.COMPLETE)&&e.dispatchEvent(new m(m.COMPLETE)))},I0=(e,t)=>{e.willTrigger(m.OPEN)&&e.dispatchEvent(new m(m.OPEN)),e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},S0=(e,t)=>{e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},bs=async e=>{if(e.byteLength)try{return await ar().decodeAudioData(e)}catch{const t=new Uint8Array(e);let u=0;for(;u>t.byteLength&&(u=t.indexOf(255,u),!(u===-1||(t[u+1]&224)===224));)++u;return await bs(t.subarray(u).buffer)}},R0=async(e,t)=>{const u=t.target;if(u)if(e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total)),199<u.status&&400>u.status){const s=await bs(u.response);s&&(e.audioBuffer=s,e.willTrigger(m.COMPLETE)&&e.dispatchEvent(new m(m.COMPLETE)))}else e.willTrigger(Re.IO_ERROR)&&e.dispatchEvent(new Re(Re.IO_ERROR,!1,u.statusText))},k0=async(e,t)=>{await new Promise(u=>{p0({format:"arraybuffer",url:t.url,method:t.method,data:t.data,headers:t.headers,withCredentials:t.withCredentials,event:{loadstart:s=>{I0(e,s)},progress:s=>{S0(e,s)},loadend:async s=>{await R0(e,s),u()}}})})},O0=async(e,t)=>{if(!t.audioBuffer){const u=new Uint8Array(t.buffer),s=await bs(u.buffer);if(!s)return;t.audioBuffer=s}e.audioBuffer=t.audioBuffer};class iu extends je{_$source;_$gainNode;_$stopFlag;_$currentCount;_$volume;audioBuffer;loopCount;constructor(){super(),this.loopCount=0,this.audioBuffer=null,this._$volume=1,this._$currentCount=0,this._$stopFlag=!0,this._$source=null,this._$gainNode=null}get volume(){return this._$volume}set volume(t){this._$volume=fs(Math.min(Je.volume,t),0,1,1),this._$gainNode&&(this._$gainNode.gain.value=this._$volume)}get canLoop(){return!this._$stopFlag&&this.loopCount>=this._$currentCount}clone(){const t=new iu;return t.volume=this._$volume,t.loopCount=this.loopCount,t.audioBuffer=this.audioBuffer,t}async load(t){await k0(this,t)}play(t=0){if(!this._$stopFlag||!this.audioBuffer)return;this.stop();const u=ar();this._$gainNode=u.createGain(),this._$gainNode.connect(u.destination),this._$gainNode.gain.value=Math.min(Je.volume,this._$volume),this._$source=u.createBufferSource(),this._$source.addEventListener("ended",()=>{v0(this)}),this._$source.buffer=this.audioBuffer,this._$source.connect(this._$gainNode),this._$source.start(t),this._$stopFlag=!1,this._$currentCount++,Ut().push(this)}stop(){if(this._$stopFlag)return;this._$stopFlag=!0,this._$currentCount=0,this._$source&&(this._$source.disconnect(),this._$source=null),this._$gainNode&&(this._$gainNode.gain.value=0,this._$gainNode.disconnect(),this._$gainNode=null);const t=Ut(),u=t.indexOf(this);u>-1&&t.splice(u,1)}async $build(t){await O0(this,t)}}class F0{volume;loopCount;constructor(t=1,u=0){this.volume=t,this.loopCount=u}}const L0=()=>{const e=document.createElement("video");return e.autoplay=!1,e.crossOrigin="anonymous",e.setAttribute("playsinline",""),e},$s=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&$s(t)},C0=async e=>{e.autoPlay&&(m0()||(e.muted=!0,x0(e)),await e.play()),e.loaded=!0,$s(e),e.willTrigger(m.COMPLETE)&&e.dispatchEvent(new m(m.COMPLETE))},N0=(e,t)=>{t.currentTime=0,t.duration=e.duration,t.videoWidth=e.videoWidth,t.videoHeight=e.videoHeight;const u=new OffscreenCanvas(t.videoWidth,t.videoHeight);t.$context=u.getContext("2d"),t.$offscreenCanvas=u},P0=(e,t)=>{e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},B0=e=>{if(e.willTrigger(oe.ENDED)&&e.dispatchEvent(new oe(oe.ENDED)),e.loop){e.currentTime=0;return}e.ended=!0,e.changed=!1,e.pause()},D0=(e,t)=>{e.addEventListener("loadedmetadata",()=>{N0(e,t)},{once:!0}),e.addEventListener("progress",u=>{P0(t,u)}),e.addEventListener("canplaythrough",async()=>{await C0(t),e.volume=t.volume},{once:!0}),e.addEventListener("ended",()=>{B0(t)})},cr=e=>{if(e.paused||!e.loaded)return 0;e.willTrigger(oe.PLAY)&&e.dispatchEvent(new oe(oe.PLAY)),$s(e);const t=au();return t.indexOf(e)===-1&&t.push(e),e.$context&&e.$videoElement&&e.$context.drawImage(e.$videoElement,0,0,e.videoWidth,e.videoHeight),requestAnimationFrame(()=>{cr(e)})},_0=(e,t)=>{t.videoData||(t.videoData=new Uint8Array(t.buffer),t.buffer=null),e.loop=t.loop,e.autoPlay=t.autoPlay,e.videoWidth=t.bounds.xMax,e.videoHeight=t.bounds.yMax,e.volume=t.volume,e.src=URL.createObjectURL(new Blob([t.videoData.buffer],{type:"video/mp4"}))};class qu extends ru{duration;smoothing;loop;autoPlay;currentTime;videoWidth;videoHeight;loaded;ended;isVideo;$videoElement;$offscreenCanvas;$context;paused;_$timerId;_$volume;_$src;constructor(t=0,u=0){super(),this.videoWidth=t,this.videoHeight=u,this.isVideo=!0,this.duration=0,this.smoothing=!0,this.loop=!1,this.loaded=!1,this.ended=!1,this.paused=!0,this.autoPlay=!0,this.currentTime=0,this._$src="",this._$timerId=-1,this._$volume=1,this.$videoElement=null,this.$offscreenCanvas=null,this.$context=null}static get namespace(){return"next2d.media.Video"}get namespace(){return"next2d.media.Video"}get src(){return this._$src}set src(t){this._$src!==t&&(this.loaded=!1,this.currentTime=0,this.$videoElement=null,this.$offscreenCanvas=null,this.$context=null,this.$videoElement=L0(),D0(this.$videoElement,this),this._$src=this.$videoElement.src=t,this.$videoElement.load())}get muted(){return this.$videoElement?this.$videoElement.muted:!1}set muted(t){this.$videoElement&&(this.$videoElement.muted=t)}get volume(){return this._$volume}set volume(t){this._$volume=fs(Math.min(Je.volume,t),0,1,1),this.$videoElement&&(this.$videoElement.volume=this._$volume)}pause(){if(!this.$videoElement||this.paused)return;this.paused=!0,this.$videoElement.pause(),cancelAnimationFrame(this._$timerId),this.willTrigger(oe.PAUSE)&&this.dispatchEvent(new oe(oe.PAUSE));const t=au(),u=t.indexOf(this);u>-1&&t.splice(u,1)}async play(){!this.$videoElement||!this.paused||(this.paused=!1,this.ended=!1,this.$videoElement.volume=this._$volume,await this.$videoElement.play(),this._$timerId=cr(this))}seek(t){this.$videoElement&&(this.currentTime=this.$videoElement.currentTime=Math.min(this.duration,t),this.willTrigger(oe.SEEK)&&this.dispatchEvent(new oe(oe.SEEK)))}$sync(t,u=null){u&&super.$syncLoaderInfo(u),_0(this,t)}}const lt=(e,t,u,s,n=-1)=>{const r=s.loaderInfo;if(!r)throw new Error("the loaderInfo or data is null.");e.parent=s,ke.set(e,s.root),Rt.set(e,r),e.dictionaryId=t,e.characterId=u.characterId,e.clipDepth=u.clipDepth,e.startFrame=u.startFrame,e.endFrame=u.endFrame,e.name=u.name||"",e.placeId=n},Us=(e,t,u,s,n=-1)=>{switch(u.extends){case Xt.namespace:{const r=new Xt;return lt(r,e,t,s,n),r.$sync(u),r}case $t.namespace:{const r=new $t;return lt(r,e,t,s,n),r.$sync(u),r}case Uu.namespace:{const r=new Uu;return lt(r,e,t,s,n),r.$sync(u),r}case qu.namespace:{const r=new qu;return lt(r,e,t,s,n),r.$sync(u),r}default:throw new Error(`Character extends not found: ${u.extends}`)}},wt=new Map,U0=(e,t)=>{const u=e.loaderInfo;if(!u||!u.data)return t;const s=u.data.characters[e.characterId];if(!s)return t;const n=e.currentFrame,r=s.controller[n];if(!r)return t;const a=[],i=s.dictionary;if(!t.length){for(let c=0;c<r.length;++c){if(!(c in r))continue;const o=r[c];if(typeof o!="number")continue;const d=i[o];if(!d)continue;const l=u.data.characters[d.characterId];if(!l)continue;const h=Us(o,d,l,e,c);h&&(t.push(h),h.isContainerEnabled&&a.push(h))}return e.$container=a,t}for(let c=0;c<t.length;++c){const o=t[c];if(!o)continue;const d=o.startFrame,l=o.endFrame;if(d===1&&l===0||d<=n&&l>n){wt.set(o.dictionaryId,o);continue}o.uniqueKey&&O.has(o.uniqueKey)&&O.removeTimer(o.uniqueKey),o.willTrigger(m.REMOVED)&&o.dispatchEvent(new m(m.REMOVED,!0)),o.willTrigger(m.REMOVED_FROM_STAGE)&&o.dispatchEvent(new m(m.REMOVED_FROM_STAGE,!0)),o.isVideo&&o.pause(),o.isContainerEnabled&&ns(o)}t.length=0;for(let c=0;c<r.length;++c){if(!(c in r))continue;const o=r[c];if(typeof o!="number")continue;if(wt.has(o)){const b=wt.get(o);b.placeId=c,b.placeObject=null,t.push(b);continue}const d=i[o];if(!d)continue;const l=u.data.characters[d.characterId];if(!l)continue;const h=Us(o,d,l,e,c);h&&(t.push(h),h.isContainerEnabled&&a.push(h))}return e.$container=a,wt.clear(),t},q0=(e,t)=>{e.$labels||(e.$labels=new Map),e.$labels.set(t.frame,t)},X0=e=>{if(!e.$labels)return null;const t=e.currentFrame;return e.$labels.has(t)&&e.$labels.get(t)||null},V0=e=>!e.$labels||!e.$labels.size?null:Array.from(e.$labels.values()),Y0=(e,t)=>{if(!e.$labels||!e.$labels.size)return 0;for(const[u,s]of e.$labels)if(s.name===t)return u;return 0},W0=(e,t=null)=>{if(!t||!t.size)return;const u=e.currentFrame;if(!t.has(u))return;const s=t.get(u);s.willTrigger(m.FRAME_LABEL)&&s.dispatchEvent(new m(m.FRAME_LABEL))},H0=(e,t=null)=>{if(!t||!t.size)return;const u=e.currentFrame;t.has(u)&&Ru.push(e)},qt=e=>{e.$canAction&&(e.$canAction=!1,W0(e,e.$labels),H0(e,e.$actions))},cu=(e,t)=>{if(e.totalFrames===1)return;let u=+t;if(isNaN(u)&&(u=Y0(e,`${t}`)),1>u&&(u=1),e.currentFrame!==u){if(u>e.totalFrames){if(e.currentFrame===e.totalFrames)return;e.$wait=!0,e.$canSound=!0,e.$canAction=!0,e.$hasTimelineHeadMoved=!0,e.currentFrame=e.totalFrames,qt(e),V(e);return}e.currentFrame=u,e.$wait=!0,e.$canSound=!0,e.$canAction=!0,e.$hasTimelineHeadMoved=!0,V(e),qt(e)}},z0=(e,t)=>{e.play(),cu(e,t)},G0=(e,t)=>{e.stop(),cu(e,t),e.$wait=!1},K0=e=>{e.totalFrames<=e.currentFrame||(e.stop(),cu(e,e.currentFrame+1))},Q0=e=>{2>e.currentFrame||(e.stop(),cu(e,e.currentFrame-1))},Z0=(e,t)=>{for(let u=0;u<t.length;++u){const s=t[u];if(!s)continue;s.script||(s.script=Function(s.action));const n=s.frame;e.has(n)||e.set(n,U()),e.get(n)?.push(s.script)}},J0=(e,t)=>{for(let u=0;u<t.length;++u){const s=t[u];s&&e.set(s.frame,new Un(s.name,s.frame))}},j0=async(e,t,u)=>{const s=e.loaderInfo;if(!s)return;const n=s.data;if(!n)return;const r=n.characters;for(let a=0;a<u.length;++a){const i=u[a];if(!i)continue;const c=U();for(let o=0;o<i.sound.length;++o){const d=i.sound[o];if(!d)continue;const l=r[d.characterId];if(!l)continue;const h=new iu;h.loopCount=d.loopCount|0,h.volume=Math.min(Je.volume,d.volume),await h.$build(l),c.push(h)}t.set(i.frame,c)}},el=(e,t)=>{t.actions&&(e.$actions||(e.$actions=new Map),Z0(e.$actions,t.actions)),t.sounds&&(e.$sounds||(e.$sounds=new Map),j0(e,e.$sounds,t.sounds)),t.labels&&(e.$labels||(e.$labels=new Map),J0(e.$labels,t.labels)),e.totalFrames=t.totalFrame||1};class Xt extends cs{$labels;$actions;$sounds;$canAction;$wait;totalFrames;currentFrame;_$stopFlag;$canSound;$hasTimelineHeadMoved;isTimelineEnabled;constructor(){super(),this.currentFrame=1,this.totalFrames=1,this.isTimelineEnabled=!0,this.$actions=null,this.$labels=null,this.$sounds=null,this.$canAction=!0,this.$wait=!1,this.$canSound=!0,this.$hasTimelineHeadMoved=!0,this._$stopFlag=!1}static get namespace(){return"next2d.display.MovieClip"}get namespace(){return"next2d.display.MovieClip"}get children(){return!this.$hasTimelineHeadMoved||this.characterId===-1?this._$children:(this.$hasTimelineHeadMoved=!1,U0(this,this._$children))}get currentFrameLabel(){return X0(this)}get currentLabels(){return V0(this)}get isPlaying(){return!this._$stopFlag}gotoAndPlay(t){z0(this,t)}gotoAndStop(t){G0(this,t)}nextFrame(){K0(this)}play(){this._$stopFlag=!1,V(this)}prevFrame(){Q0(this)}stop(){this._$stopFlag=!0}addFrameLabel(t){q0(this,t)}$sync(t,u=null){u&&super.$syncLoaderInfo(u),el(this,t)}}const qs=async(e,t)=>{const u=new Map;if(t.symbols.length)for(let a=0;a<t.symbols.length;++a){const i=t.symbols[a];u.set(i[0],i[1])}const s=e.contentLoaderInfo;s.data={stage:t.stage,characters:t.characters,symbols:u};const n=new Xt,r=t.characters[0];lt(n,-1,{characterId:0,name:"main",clipDepth:0,endFrame:r.controller.length,startFrame:1},e),n.$sync(r,s),n.parent=null,s.content=n,s.willTrigger(m.COMPLETE)&&s.dispatchEvent(new m(m.COMPLETE))},or=`(function(){"use strict";var l=Uint8Array,k=Uint16Array,tr=Int32Array,W=new l([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),X=new l([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ur=new l([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Y=function(r,e){for(var n=new k(31),i=0;i<31;++i)n[i]=e+=1<<r[i-1];for(var f=new tr(n[30]),i=1;i<30;++i)for(var g=n[i];g<n[i+1];++g)f[g]=g-n[i]<<5|i;return{b:n,r:f}},Z=Y(W,2),$=Z.b,cr=Z.r;$[28]=258,cr[258]=28;for(var wr=Y(X,0),gr=wr.b,O=new k(32768),v=0;v<32768;++v){var b=(v&43690)>>1|(v&21845)<<1;b=(b&52428)>>2|(b&13107)<<2,b=(b&61680)>>4|(b&3855)<<4,O[v]=((b&65280)>>8|(b&255)<<8)>>1}for(var m=(function(r,e,n){for(var i=r.length,f=0,g=new k(e);f<i;++f)r[f]&&++g[r[f]-1];var s=new k(e);for(f=1;f<e;++f)s[f]=s[f-1]+g[f-1]<<1;var h;if(n){h=new k(1<<e);var p=15-e;for(f=0;f<i;++f)if(r[f])for(var C=f<<4|r[f],y=e-r[f],a=s[r[f]-1]++<<y,o=a|(1<<y)-1;a<=o;++a)h[O[a]>>p]=C}else for(h=new k(i),f=0;f<i;++f)r[f]&&(h[f]=O[s[r[f]-1]++]>>15-r[f]);return h}),A=new l(288),v=0;v<144;++v)A[v]=8;for(var v=144;v<256;++v)A[v]=9;for(var v=256;v<280;++v)A[v]=7;for(var v=280;v<288;++v)A[v]=8;for(var j=new l(32),v=0;v<32;++v)j[v]=5;var hr=m(A,9,1),br=m(j,5,1),B=function(r){for(var e=r[0],n=1;n<r.length;++n)r[n]>e&&(e=r[n]);return e},c=function(r,e,n){var i=e/8|0;return(r[i]|r[i+1]<<8)>>(e&7)&n},J=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},sr=function(r){return(r+7)/8|0},yr=function(r,e,n){return(n==null||n>r.length)&&(n=r.length),new l(r.subarray(e,n))},zr=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],t=function(r,e,n){var i=new Error(e||zr[r]);if(i.code=r,Error.captureStackTrace&&Error.captureStackTrace(i,t),!n)throw i;return i},N=function(r,e,n,i){var f=r.length,g=0;if(!f||e.f&&!e.l)return n||new l(0);var s=!n,h=s||e.i!=2,p=e.i;s&&(n=new l(f*3));var C=function(vr){var or=n.length;if(vr>or){var lr=new l(Math.max(or*2,vr));lr.set(n),n=lr}},y=e.f||0,a=e.p||0,o=e.b||0,F=e.l,D=e.d,E=e.m,T=e.n,R=f*8;do{if(!F){y=c(r,a,1);var _=c(r,a+1,3);if(a+=3,_)if(_==1)F=hr,D=br,E=9,T=5;else if(_==2){var H=c(r,a,31)+257,L=c(r,a+10,15)+4,d=H+c(r,a+5,31)+1;a+=14;for(var M=new l(d),K=new l(19),u=0;u<L;++u)K[ur[u]]=c(r,a+u*3,7);a+=L*3;for(var rr=B(K),Mr=(1<<rr)-1,Ur=m(K,rr,1),u=0;u<d;){var er=Ur[c(r,a,Mr)];a+=er&15;var w=er>>4;if(w<16)M[u++]=w;else{var x=0,I=0;for(w==16?(I=3+c(r,a,3),a+=2,x=M[u-1]):w==17?(I=3+c(r,a,7),a+=3):w==18&&(I=11+c(r,a,127),a+=7);I--;)M[u++]=x}}var nr=M.subarray(0,H),z=M.subarray(H);E=B(nr),T=B(z),F=m(nr,E,1),D=m(z,T,1)}else t(1);else{var w=sr(a)+4,q=r[w-4]|r[w-3]<<8,G=w+q;if(G>f){p&&t(0);break}h&&C(o+q),n.set(r.subarray(w,G),o),e.b=o+=q,e.p=a=G*8,e.f=y;continue}if(a>R){p&&t(0);break}}h&&C(o+131072);for(var Dr=(1<<E)-1,Ir=(1<<T)-1,P=a;;P=a){var x=F[J(r,a)&Dr],S=x>>4;if(a+=x&15,a>R){p&&t(0);break}if(x||t(2),S<256)n[o++]=S;else if(S==256){P=a,F=null;break}else{var ar=S-254;if(S>264){var u=S-257,U=W[u];ar=c(r,a,(1<<U)-1)+$[u],a+=U}var Q=D[J(r,a)&Ir],V=Q>>4;Q||t(3),a+=Q&15;var z=gr[V];if(V>3){var U=X[V];z+=J(r,a)&(1<<U)-1,a+=U}if(a>R){p&&t(0);break}h&&C(o+131072);var ir=o+ar;if(o<z){var fr=g-z,Or=Math.min(z,ir);for(fr+o<0&&t(3);o<Or;++o)n[o]=i[fr+o]}for(;o<ir;++o)n[o]=n[o-z]}}e.l=F,e.p=P,e.b=o,e.f=y,F&&(y=1,e.m=E,e.d=D,e.n=T)}while(!y);return o!=n.length&&s?yr(n,0,o):n.subarray(0,o)},Fr=new l(0),kr=function(r){(r[0]!=31||r[1]!=139||r[2]!=8)&&t(6,"invalid gzip data");var e=r[3],n=10;e&4&&(n+=(r[10]|r[11]<<8)+2);for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!r[n++]);return n+(e&2)},pr=function(r){var e=r.length;return(r[e-4]|r[e-3]<<8|r[e-2]<<16|r[e-1]<<24)>>>0},xr=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&t(6,"invalid zlib data"),(r[1]>>5&1)==1&&t(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Sr(r,e){return N(r,{i:2},e,e)}function mr(r,e){var n=kr(r);return n+8>r.length&&t(6,"invalid gzip data"),N(r.subarray(n,-8),{i:2},new l(pr(r)),e)}function Ar(r,e){return N(r.subarray(xr(r),-4),{i:2},e,e)}function Cr(r,e){return r[0]==31&&r[1]==139&&r[2]==8?mr(r,e):(r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31?Sr(r,e):Ar(r,e)}var Er=typeof TextDecoder<"u"&&new TextDecoder,Tr=0;try{Er.decode(Fr,{stream:!0}),Tr=1}catch{}self.addEventListener("message",r=>{const e=Cr(r.data);let n="";for(let i=0;i<e.length;i+=4096)n+=String.fromCharCode(...e.subarray(i,i+4096));self.postMessage(JSON.parse(decodeURIComponent(n)))})})();
665
- `,Xs=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",or],{type:"text/javascript;charset=utf-8"});function tl(e){let t;try{if(t=Xs&&(self.URL||self.webkitURL).createObjectURL(Xs),!t)throw"";const u=new Worker(t,{name:e?.name});return u.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),u}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(or),{name:e?.name})}}const Vs=new tl,lr=async(e,t)=>{t.type==="zlib"?await new Promise(u=>{Vs.onmessage=n=>{qs(e,n.data),u()};const s=new Uint8Array(t.buffer);Vs.postMessage(s,[s.buffer])}):qs(e,t)},ul=(e,t)=>{e.willTrigger(m.OPEN)&&e.dispatchEvent(new m(m.OPEN)),e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},sl=(e,t)=>{e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},nl=async(e,t)=>{const u=t.target;if(!u)return;const s=e.contentLoaderInfo;if(s.willTrigger(X.PROGRESS)&&s.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total)),s.willTrigger(St.HTTP_STATUS)){const n=ti(u.getAllResponseHeaders());s.dispatchEvent(new St(St.HTTP_STATUS,!1,u.status,u.responseURL,n))}199<u.status&&400>u.status?(await lr(e,u.response),s.willTrigger(m.COMPLETE)&&s.dispatchEvent(new m(m.COMPLETE))):s.willTrigger(Re.IO_ERROR)&&s.dispatchEvent(new Re(Re.IO_ERROR,!1,u.statusText))},rl=async(e,t)=>{await new Promise(u=>{ei({format:t.responseDataFormat,url:t.url,method:t.method,data:t.data,headers:t.headers,withCredentials:t.withCredentials,event:{loadstart:s=>{ul(e.contentLoaderInfo,s)},progress:s=>{sl(e.contentLoaderInfo,s)},loadend:async s=>{await nl(e,s),u()}}})})};class hr{contentLoaderInfo;root;constructor(){this.root=null,this.contentLoaderInfo=new Tc}get content(){return this.contentLoaderInfo.content}get loaderInfo(){return this.contentLoaderInfo}async load(t){if(t.responseDataFormat!=="json")throw new Error("The only format that can be loaded by this function is `json` format.");this.contentLoaderInfo.url=t.url,this.contentLoaderInfo.format=t.responseDataFormat,await rl(this,t)}async loadJSON(t){await lr(this,t)}}const dr=()=>{for(;Ru.length;){const e=Ru.pop(),t=e.$actions;if(!t)continue;const u=e.currentFrame;if(!t.has(u))continue;const s=t.get(u);if(s)for(let n=0;n<s.length;n++)try{s[n].apply(e)}catch(r){console.error(r)}}},fr=()=>{for(;ku.length;){const e=ku.pop(),t=e.$sounds;if(!t)continue;const u=e.currentFrame;if(!t.has(u))continue;const s=t.get(u),n=e.soundTransform;for(let r=0;r<s.length;r++){const a=s[r];a&&(n&&(a.volume=n.volume,a.loopCount=n.loopCount),a.play())}}},al=(e,t=null)=>{if(!t||!t.size)return;const u=e.currentFrame;t.has(u)&&ku.push(e)},br=e=>{e.$canSound&&(e.$canSound=!1,al(e,e.$sounds))},$r=e=>{const t=e.children;for(let u=t.length-1;u>-1;--u){const s=t[u];s&&s.isContainerEnabled&&($r(s),s.isTimelineEnabled&&(br(s),qt(s)))}},il=e=>{$r(e),fr(),dr()},cl=e=>(e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e);class ol{buffer;offset;constructor(){this.buffer=new Float32Array(256),this.offset=0}push(...t){this.buffer.length<this.offset+t.length&&this.resize(t.length);for(let u=0;u<t.length;u++)this.buffer[this.offset++]=t[u]}set(t){this.buffer.length<this.offset+t.length&&this.resize(t.length),this.buffer.set(t,this.offset),this.offset+=t.length}resize(t){const u=new Float32Array(cl(this.offset+t));this.buffer.length&&u.set(this.buffer),this.buffer=u}}const E=new ol,Vt=e=>{let t=2166136261;for(let u=0;u<e.length;++u){let s=e[u]|0;for(let n=0;n<4;n++){const r=s&255;t^=r,t=Math.imul(t,16777619),s>>>=8}}return(t>>>0)%16777216},xs=e=>{switch(e){case"copy":return 0;case"add":return 1;case"alpha":return 2;case"darken":return 3;case"difference":return 4;case"erase":return 5;case"hardlight":return 6;case"invert":return 7;case"layer":return 8;case"lighten":return 9;case"multiply":return 10;case"normal":return 11;case"overlay":return 12;case"screen":return 13;case"subtract":return 14;default:return 11}},xr=(e,t,u,s,n)=>{if(!e.visible){E.push(0);return}const r=e.graphics,a=r.isDrawable;if(!a&&!e.isBitmap){E.push(0);return}const i=qe(e),c=i?L.multiply(u,i):u;if(!de(c[3]+c[7]/255,0,1,0)){c!==u&&L.release(c),E.push(0);return}const d=N(e),l=d?A.multiply(t,d):t,h=ne(r.xMin,r.yMin,r.xMax,r.yMax,l),b=h[0],f=h[1],p=h[2],$=h[3];F(h);const g=Math.ceil(Math.abs(p-b)),R=Math.ceil(Math.abs($-f));switch(!0){case g===0:case R===0:case g===-1/0:case R===-1/0:case g===1/0:case R===1/0:c!==u&&L.release(c),l!==t&&A.release(l),F(h),E.push(0);return}if(0>b+g||0>f+R||b>s||f>n){c!==u&&L.release(c),l!==t&&A.release(l),F(h),E.push(0);return}const S=d&&e.scale9Grid?Math.abs(d[1])<.001&&Math.abs(d[2])<1e-4:!1;if(!e.uniqueKey)if(e.characterId&&e.loaderInfo){const H=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Vt(new Float32Array(H))}`,ee(H)}else e.uniqueKey=e.isBitmap?`${e.instanceId}`:`${Vt(r.buffer)}`;const k=Math.round(Math.sqrt(l[0]*l[0]+l[1]*l[1])*100)/100,D=Math.round(Math.sqrt(l[2]*l[2]+l[3]*l[3])*100)/100;(!e.isBitmap&&!e.cacheKey||e.cacheParams[0]!==k||e.cacheParams[1]!==D||e.cacheParams[2]!==c[7])&&(e.cacheKey=O.generateKeys(k,D,c[7]),e.cacheParams[0]=k,e.cacheParams[1]=D,e.cacheParams[2]=c[7]);const re=e.isBitmap?0:e.cacheKey;if(E.push(1,bn,l[0],l[1],l[2],l[3],l[4],l[5],c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],b,f,p,$,r.xMin,r.yMin,r.xMax,r.yMax,+S,+a,+e.isBitmap,+e.uniqueKey,re),e.$cache&&!e.$cache.has(e.uniqueKey)&&(e.$cache=null),e.$cache?e.$cache.get(`${re}`):O.get(e.uniqueKey,`${re}`))e.$cache||(e.$cache=O.getById(e.uniqueKey),e.$cache.set(e.uniqueKey,!0)),E.push(1);else{if(E.push(0),S){const G=T.rendererScale,Y=vu(G,0,0,G,0,0),te=A.multiply(Y,d||bt);Et(Y);const j=e.parent.concatenatedMatrix.rawData,ue=vu(j[0],j[1],j[2],j[3],j[4]*G-b,j[5]*G-f);A.release(j);const Xe=A.multiply(ue,te),Ve=Xe[4]-(l[4]-b),Sr=Xe[5]-(l[5]-f);Et(Xe);const tt=ne(r.xMin,r.yMin,r.xMax,r.yMax,te),Ts=tt[0],Es=tt[1],Rr=tt[2],kr=tt[3];F(tt);const mt=Math.ceil(Math.abs(Rr-Ts)),gt=Math.ceil(Math.abs(kr-Es)),$e=e.scale9Grid,hu=Math.abs(r.xMax-r.xMin),du=Math.abs(r.yMax-r.yMin),pt=$e.width>0?($e.x-r.xMin)/hu:1e-5,Tt=$e.height>0?($e.y-r.yMin)/du:1e-5,fu=$e.width>0?($e.x+$e.width-r.xMin)/hu:.99999,bu=$e.height>0?($e.y+$e.height-r.yMin)/du:.99999,ys=Math.ceil(hu*G),Ms=Math.ceil(du*G);let $u=ys*pt/mt,xu=Ms*Tt/gt,mu=(mt-ys*(1-fu))/mt,gu=(gt-Ms*(1-bu))/gt;if($u>=mu){const ut=pt/(pt+(1-fu));$u=Math.max(ut-1e-5,0),mu=Math.min(ut+1e-5,1)}if(xu>=gu){const ut=Tt/(Tt+(1-bu));xu=Math.max(ut-1e-5,0),gu=Math.min(ut+1e-5,1)}E.push(te[0],te[1],te[2],te[3],te[4],te[5],ue[0],ue[1],ue[2],ue[3],ue[4]-Ve,ue[5]-Sr,Ts,Es,mt,gt,pt,Tt,$u,xu,fu,bu,mu,gu),Et(ue),Et(te)}const H=a||S?r.buffer:e.$bitmapBuffer;E.push(H.length),E.set(H),O.set(e.uniqueKey,`${re}`,!0),e.$cache&&(e.$cache=null)}if(E.push(xs(e.blendMode)),e.filters?.length){let H=!1;const G=[],Y=he(0,0,0,0);for(let j=0;j<e.filters.length;j++){const ue=e.filters[j];if(!ue||!ue.canApplyFilter())continue;ue.$updated&&(H=!0),ue.$updated=!1,ue.getBounds(Y);const Xe=ue.toNumberArray();for(let Ve=0;Ve<Xe.length;Ve+=4096)G.push(...Xe.subarray(Ve,Ve+4096))}const te=G.length>0;te&&(E.push(+te,+H,Y[0],Y[1],Y[2],Y[3],G.length),E.set(new Float32Array(G))),F(Y)}else E.push(0);c!==u&&L.release(c),l!==t&&A.release(l)},Xu=(e,t)=>{const u=N(e),s=u?A.multiply(t,u):t;s!==t&&A.release(s);const n=u&&e.scale9Grid?Math.abs(u[1])<.001&&Math.abs(u[2])<1e-4:!1,r=e.graphics.buffer;E.push(bn,s[0],s[1],s[2],s[3],s[4],s[5],+n,r.length),E.set(r)},ll=new TextEncoder,mr=(e,t,u,s,n)=>{if(!e.visible){E.push(0);return}const r=qe(e),a=r?L.multiply(u,r):u;if(!de(a[3]+a[7]/255,0,1,0)){a!==u&&L.release(a),E.push(0);return}const c=N(e),o=c?A.multiply(t,c):t,d=ne(e.xMin,e.yMin,e.xMax,e.yMax,o),l=d[0],h=d[1],b=d[2],f=d[3];F(d);const p=Math.ceil(Math.abs(b-l)),$=Math.ceil(Math.abs(f-h));switch(!0){case p===0:case $===0:case p===-1/0:case $===-1/0:case p===1/0:case $===1/0:a!==u&&L.release(a),o!==t&&A.release(o),F(d),E.push(0);return}if(0>l+p||0>h+$||l>s||h>n){a!==u&&L.release(a),o!==t&&A.release(o),F(d),E.push(0);return}if(!e.uniqueKey)if(e.characterId&&e.loaderInfo){const D=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Vt(new Float32Array(D))}`,ee(D)}else e.uniqueKey=`${e.instanceId}`;const g=Math.round(Math.sqrt(o[0]*o[0]+o[1]*o[1])*100)/100,R=Math.round(Math.sqrt(o[2]*o[2]+o[3]*o[3])*100)/100;(e.changed&&!e.cacheKey||e.cacheParams[0]!==g||e.cacheParams[1]!==R||e.cacheParams[2]!==a[7])&&(e.cacheKey=O.generateKeys(g,R,a[7]),e.cacheParams[0]=g,e.cacheParams[1]=R,e.cacheParams[2]=a[7]);const S=e.cacheKey;E.push(1,za,o[0],o[1],o[2],o[3],o[4],o[5],a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],l,h,b,f,e.xMin,e.yMin,e.xMax,e.yMax,+e.uniqueKey,S,+e.changed),e.$cache&&!e.$cache.has(e.uniqueKey)&&(e.$cache=null);const k=e.$cache?e.$cache.get(`${S}`):O.get(e.uniqueKey,`${S}`);if(!k||e.changed){E.push(0,+k);const D=ll.encode(JSON.stringify(e.$textData));switch(E.push(D.length),E.set(D),e.autoSize){case"center":E.push(0);break;case"left":E.push(1);break;case"none":E.push(2);break;case"right":E.push(3);break}E.push(e.stopIndex,e.scrollX,e.scrollY,e.textWidth,e.textHeight,Math.abs(e.xMax-e.xMin),Math.abs(e.yMax-e.yMin),e.focusIndex,e.selectIndex,+e.focusVisible,e.thickness,e.thicknessColor,+e.wordWrap,+e.border,e.borderColor,+e.background,e.backgroundColor,e.defaultTextFormat.color||0,e.defaultTextFormat.size||0),k||O.set(e.uniqueKey,`${S}`,!0),e.$cache&&(e.$cache=null)}else e.$cache||(e.$cache=O.getById(e.uniqueKey),e.$cache.set(e.uniqueKey,!0)),E.push(1);if(E.push(xs(e.blendMode)),e.filters?.length){let D=!1;const re=[],ce=he(0,0,0,0);for(let G=0;G<e.filters.length;G++){const Y=e.filters[G];if(!Y||!Y.canApplyFilter())continue;Y.$updated&&(D=!0),Y.$updated=!1,Y.getBounds(ce);const te=Y.toNumberArray();for(let j=0;j<te.length;j+=4096)re.push(...te.subarray(j,j+4096))}const H=re.length>0;H&&(E.push(+H,+D,ce[0],ce[1],ce[2],ce[3],re.length),E.set(new Float32Array(re))),F(ce)}else E.push(0);a!==u&&L.release(a),o!==t&&A.release(o)},gr=(e,t,u,s,n,r)=>{if(!e.visible||!e.$videoElement||!e.$offscreenCanvas||!e.loaded){E.push(0);return}const a=qe(e),i=a?L.multiply(s,a):s;if(!de(i[3]+i[7]/255,0,1,0)){i!==s&&L.release(i),E.push(0);return}const o=N(e),d=o?A.multiply(u,o):u,l=ne(0,0,e.videoWidth,e.videoHeight,d),h=l[0],b=l[1],f=l[2],p=l[3];F(l);const $=Math.ceil(Math.abs(f-h)),g=Math.ceil(Math.abs(p-b));switch(!0){case $===0:case g===0:case $===-1/0:case g===-1/0:case $===1/0:case g===1/0:i!==s&&L.release(i),d!==u&&A.release(d),E.push(0);return}if(0>h+$||0>b+g||h>n||b>r){i!==s&&L.release(i),d!==u&&A.release(d),E.push(0);return}if(!e.uniqueKey)if(e.characterId&&e.loaderInfo){const S=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Vt(new Float32Array(S))}`,ee(S)}else e.uniqueKey=`${e.instanceId}`;E.push(1,Ga,d[0],d[1],d[2],d[3],d[4],d[5],i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],h,b,f,p,0,0,e.videoWidth,e.videoHeight,+e.uniqueKey,+e.changed),e.$cache&&!e.$cache.has(e.uniqueKey)&&(e.$cache=null);const R=e.$cache?e.$cache.get("0"):O.get(e.uniqueKey,"0");if(!R||e.changed){E.push(0,+R);const S=e.$context;if(S){const k=e.videoWidth/2,D=e.videoHeight/2;S.save(),S.translate(k,D),S.rotate(Math.PI),S.scale(-1,1),S.drawImage(e.$videoElement,-k,-D,e.videoWidth,e.videoHeight),S.restore(),t.push(e.$offscreenCanvas.transferToImageBitmap())}R||O.set(e.uniqueKey,"0",!0),e.$cache&&(e.$cache=null)}else e.$cache||(e.$cache=O.getById(e.uniqueKey),e.$cache.set(e.uniqueKey,!0)),E.push(1);if(E.push(xs(e.blendMode)),e.filters?.length){let S=!1;const k=[],D=he(0,0,0,0);for(let ce=0;ce<e.filters.length;ce++){const H=e.filters[ce];if(!H||!H.canApplyFilter())continue;H.$updated&&(S=!0),H.$updated=!1,H.getBounds(D);const G=H.toNumberArray();for(let Y=0;Y<G.length;Y+=4096)k.push(...G.subarray(Y,Y+4096))}const re=k.length>0;re&&(E.push(+re,+S,D[0],D[1],D[2],D[3],k.length),E.set(new Float32Array(k))),F(D)}else E.push(0);i!==s&&L.release(i),d!==u&&A.release(d)},Ys=(e,t,u,s)=>{let n=null;switch(!0){case e.isContainerEnabled:n=ss(e,t);break;case e.isShape:n=uu(e,t);break;case e.isText:n=nu(e,t);break;case e.isVideo:n=su(e,t);break}if(!n)return null;const r=n[0],a=n[2],i=Math.abs(a-r);if(!i)return null;const c=n[1],o=n[3],d=Math.abs(o-c);return!d||0>r+i||0>c+d||r>u||c>s?null:n},Vu=(e,t)=>{const u=N(e),s=u?A.multiply(t,u):t,n=e.children;E.push(fn,n.length);for(let r=0;r<n.length;r++){const a=n[r];if(a&&!a.isMask)switch(!0){case a.isContainerEnabled:Vu(a,s);break;case a.isShape:Xu(a,s);break}}s!==t&&A.release(s)},pr=(e,t,u,s,n,r)=>{if(!e.visible){E.push(0);return}const a=qe(e),i=a?L.multiply(s,a):s;if(!de(i[3]+i[7]/255,0,1,0)){i!==s&&L.release(i),E.push(0);return}const o=e.children;if(!o.length){i!==s&&L.release(i),E.push(0);return}const d=N(e),l=d?A.multiply(u,d):u;if(!l[0]&&!l[1]||!l[2]&&!l[3]){i!==s&&L.release(i),l!==u&&A.release(l),E.push(0);return}E.push(1,fn);const h=e.mask;if(h){const p=Ys(h,l,n,r);if(!p)E.push(0);else switch(E.push(1,p[0],p[1],p[2],p[3]),!0){case h.isContainerEnabled:Vu(h,l);break;case h.isShape:Xu(h,l);break}h.changed=!1}else E.push(0);E.push(o.length);let b=0,f=!0;for(let p=0;p<o.length;++p){const $=o[p];if(!$.isMask){if(E.push($.placeId,$.clipDepth),b&&$.placeId>b&&(b=0,f=!0),!f){$.changed=!1;continue}if($.clipDepth){b=$.clipDepth;const g=Ys($,l,n,r);if(f=!!g,E.push(+f),!g){$.changed=!1;continue}switch(E.push(g[0],g[1],g[2],g[3]),!0){case $.isContainerEnabled:Vu($,l);break;case $.isShape:Xu($,l);break}$.changed=!1;continue}switch(!0){case $.isContainerEnabled:pr($,t,l,i,n,r);break;case $.isShape:xr($,l,i,n,r);break;case $.isText:mr($,l,i,n,r);break;case $.isVideo:gr($,t,l,i,n,r);break}$.changed=!1}}i!==s&&L.release(i),l!==u&&A.release(l)},hl=(e,t,u,s,n,r)=>{switch(E.push(T.backgroundColor),!0){case e.isContainerEnabled:pr(e,t,u,s,n,r);break;case e.isShape:xr(e,u,s,n,r);break;case e.isText:mr(e,u,s,n,r);break;case e.isVideo:gr(e,t,u,s,n,r);break}e.changed=!1},Ws=e=>{e.totalFrames===1||!e.isPlaying||(e.$wait||(++e.currentFrame,e.currentFrame>e.totalFrames&&(e.currentFrame=1)),e.$wait=!1,e.$canSound=!0,e.$canAction=!0,e.$hasTimelineHeadMoved=!0,e.$container=null,br(e),qt(e),V(e))},Yu=e=>{const t=e.$container;if(t)for(let u=0;t.length>u;++u){const s=t[u];s.isTimelineEnabled&&Ws(s),Yu(s)}else{const u=[],s=e.children;for(let n=0;s.length>n;++n){const r=s[n];r.isContainerEnabled&&(r.isTimelineEnabled&&Ws(r),Yu(r),u.push(r))}e.$container=u}},dl=()=>{Yu(T),fr(),dr()};class fl extends is{_$ready;stageWidth;stageHeight;frameRate;rendererScale;rendererWidth;rendererHeight;_$backgroundColor;constructor(){super(),this.stageWidth=0,this.stageHeight=0,this.frameRate=1,this.rendererScale=1,this.rendererWidth=0,this.rendererHeight=0,this._$ready=!1,this._$backgroundColor=-1}get backgroundColor(){return this._$backgroundColor}set backgroundColor(t){this._$backgroundColor=t==="transparent"?-1:parseInt(t.replace("#",""),16)}get pointer(){return ft}set ready(t){!t||this._$ready||(this._$ready=t,il(this))}addChild(t){return fe.add(t.instanceId),super.addChild(t),ke.set(t,t),t}$ticker(){dl()}$generateRenderQueue(t,u,s,n){hl(t,u,s,n,this.rendererWidth,this.rendererHeight)}$mouseHit(t,u,s){He(this,t,u,s,!0)}}const T=new fl;fe.add(T.instanceId);const Mu={command:"resize",buffer:null},Hs=[],Wu=(e=!0)=>{Mu.buffer=new Float32Array([M.rendererWidth,M.rendererHeight,e?1:0]),Hs[0]=Mu.buffer.buffer,we.postMessage(Mu,Hs)},zs=window.devicePixelRatio||1,ms=()=>{ze.x=0,ze.y=0;const e=xt();if(!e)return;const t=e.children[0];!t||t.localName!=="canvas"||(ze.x=(e.clientWidth-T.rendererWidth/zs)/2,ze.y=(e.clientHeight-T.rendererHeight/zs)/2)},ou=()=>{const e=xt();if(!e)return;const t=e.parentElement;if(!t)return;const u=M.fullScreen||t.tagName==="BODY"?window.innerWidth:t.clientWidth,s=M.fullScreen||t.tagName==="BODY"?window.innerHeight:t.clientHeight,n=e.style;if(n.width=`${u}px`,n.height=`${s}px`,!T.stageWidth||!T.stageHeight)return;const r=Math.min(u/T.stageWidth,s/T.stageHeight)*Ge,a=M.fullScreen?window.innerWidth*Ge:T.stageWidth*r|0,i=M.fullScreen?window.innerHeight*Ge:T.stageHeight*r|0;a===M.screenWidth&&i===M.screenHeight||(M.screenWidth=u,M.screenHeight=s,T.changed=!0,e.children.length>1&&e.children[1].dispatchEvent(new Event(`${es}_blur`)),ms(),!(a===M.rendererWidth&&i===M.rendererHeight)&&(T.rendererScale=M.rendererScale=r,T.rendererWidth=M.rendererWidth=a,T.rendererHeight=M.rendererHeight=i,ct[0]=ct[3]=r,ct[4]=(M.rendererWidth-T.stageWidth*r)/2,ct[5]=(M.rendererHeight-T.stageHeight*r)/2,O.reset(),Wu(),T.hasEventListener(m.RESIZE)&&T.dispatchEvent(new m(m.RESIZE))))},bl=new Float32Array([1,1,1,1,0,0,0,0]),rt=[],at={command:"render",buffer:null,length:0,imageBitmaps:null},At=[];we.addEventListener("message",e=>{if(e.data.message!=="render")return;const t=e.data.buffer;E.buffer.length>t.length||(E.buffer=t)});const Tr=()=>{E.offset=0,At.length=0,rt.length=0,T.$generateRenderQueue(T,rt,ct,bl),E.offset&&(at.buffer=E.buffer,at.length=E.offset,At.push(E.buffer.buffer),at.imageBitmaps=null,rt.length&&(at.imageBitmaps=rt,At.push(...rt)),we.postMessage(at,At))},Gs={command:"removeCache",buffer:null},Ks=[],Qs=()=>{const e=new Float32Array(O.$removeIds);O.$removeIds.length=0,Gs.buffer=e,Ks[0]=e.buffer,we.postMessage(Gs,Ks)},Er=e=>{if(M.stopFlag)return;O.$removeIds.length&&Qs();const t=e-M.startTime;t>M.fps&&(M.startTime=e-t%M.fps,T.$ticker(),T.hasEventListener(m.ENTER_FRAME)&&T.dispatchEvent(new m(m.ENTER_FRAME)),T.changed&&Tr(),O.$removeCache&&(O.removeTimerScheduledCache(),O.$removeIds.length&&Qs())),M.timerId=requestAnimationFrame(u=>{Er(u)})},$l=()=>{M.stopFlag&&(M.stopFlag=!1,T.changed=!0,M.timerId>-1&&cancelAnimationFrame(M.timerId),M.fps=1e3/T.frameRate|0,M.startTime=performance.now(),M.timerId=requestAnimationFrame(e=>{Er(e)}))},xl=()=>{M.timerId>-1&&cancelAnimationFrame(M.timerId),M.stopFlag=!0,M.timerId=-1,Je.stopAll()},ml=e=>{const t=Fe();if(t){t.keyDown(e);return}T.hasEventListener(B.KEY_DOWN)&&(Ue(e),T.dispatchEvent(new B(B.KEY_DOWN)))},gl=e=>{Fe()||T.hasEventListener(B.KEY_UP)&&(Ue(e),T.dispatchEvent(new B(B.KEY_UP)))},pl=()=>{window.addEventListener(B.KEY_DOWN,ml),window.addEventListener(B.KEY_UP,gl)};class Tl{rendererWidth;rendererHeight;screenWidth;screenHeight;rendererScale;fixedWidth;fixedHeight;stopFlag;startTime;fps;tagId;_$fullScreen;timerId;mouseState;constructor(){this.rendererWidth=0,this.rendererHeight=0,this.rendererScale=1,this.screenWidth=0,this.screenHeight=0,this.stopFlag=!0,this.startTime=0,this.fps=16,this.timerId=-1,this.mouseState="up",this.fixedWidth=0,this.fixedHeight=0,this.tagId="",this._$fullScreen=!1,pl()}get fullScreen(){return this._$fullScreen}set fullScreen(t){this._$fullScreen!==t&&(this._$fullScreen=t,ou())}play(){$l()}stop(){xl()}cacheClear(){O.reset(),we.postMessage({command:"cacheClear"})}setOptions(t=null){t&&(this.fixedWidth=t.width||this.fixedWidth,this.fixedHeight=t.height||this.fixedHeight,this.tagId=t.tagId||this.tagId,this._$fullScreen=!!t.fullScreen,t.bgColor&&(T.backgroundColor=t.bgColor))}}const M=new Tl;let Zs="auto";const gs=()=>{M.stopFlag||(Q.x=T.pointer.x,Q.y=T.pointer.y,Q.pointer="auto",Q.hit=null,pu.beginPath(),pu.setTransform(1,0,0,1,0,0),T.$mouseHit(pu,dt,Q),M.mouseState==="up"&&Zs!==Q.pointer&&(nn().style.cursor=Zs=Q.pointer))},ps=e=>{let t=window.scrollX,u=window.scrollY;const s=xt();if(s){const c=s.getBoundingClientRect();t+=c.left,u+=c.top}const n=e.target;if(n){const c=n.getBoundingClientRect();t+=c.left,u+=c.top}const r=(M.rendererWidth-T.stageWidth*M.rendererScale)/2,a=(M.rendererHeight-T.stageHeight*M.rendererScale)/2,i=M.rendererScale/Ge;T.pointer.x=(e.pageX-t)/i-r/M.rendererScale,T.pointer.y=(e.pageY-u)/i-a/M.rendererScale},El=()=>{const e=Q.hit,t=Fe();t&&(!e||t.instanceId!==e.instanceId)&&(t.focus=!1,ks(null)),e?(e.isText&&(e.focus?setTimeout(()=>{ie.focus()},300):(e.focus=!0,ks(e)),e.setFocusIndex(Q.x-dt[4],Q.y-dt[5])),e.willTrigger(w.POINTER_DOWN)&&e.dispatchEvent(new w(w.POINTER_DOWN))):T.willTrigger(w.POINTER_DOWN)&&T.dispatchEvent(new w(w.POINTER_DOWN))},yl=()=>{const e=Q.hit;e?e.willTrigger(w.DOUBLE_CLICK)&&e.dispatchEvent(new w(w.DOUBLE_CLICK)):T.willTrigger(w.DOUBLE_CLICK)&&T.dispatchEvent(new w(w.DOUBLE_CLICK))};let Js,vt=!1;const Ml=e=>{const t=e.target;t&&(M.mouseState="down",t.setPointerCapture(e.pointerId),Ue(e),ps(e),gs(),Q.hit&&e.preventDefault(),clearTimeout(Js),vt?(vt=!1,yl()):(vt=!0,Js=setTimeout(()=>{vt=!1},300),El()))},wl=()=>{const e=T.dropTarget,t=Q.hit;t?(t.willTrigger(w.POINTER_UP)&&t.dispatchEvent(new w(w.POINTER_UP)),e&&e.instanceId!==t.instanceId&&e.willTrigger(w.POINTER_UP)&&e.dispatchEvent(new w(w.POINTER_UP))):e&&e.willTrigger(w.POINTER_UP)?e.dispatchEvent(new w(w.POINTER_UP)):T.willTrigger(w.POINTER_UP)&&T.dispatchEvent(new w(w.POINTER_UP))},js=e=>{const t=e.target;t&&(M.mouseState="up",t.releasePointerCapture(e.pointerId),Ue(e),ps(e),gs(),wl())},Al=()=>{const e=T.dropTarget;if(e){const n=e.parent?e.parent.globalToLocal(T.pointer):e.globalToLocal(T.pointer);let r=0,a=0;e.$lockCenter?(r=n.x-e.width/2,a=n.y-e.height/2):(r=n.x+e.$offsetX,a=n.y+e.$offsetY);const i=e.$boundedRect;i&&(r=Ct(r,i.left,i.right),a=Ct(a,i.top,i.bottom)),e.x=r,e.y=a}const t=Fe();if(t&&M.mouseState==="down"){t.setFocusIndex(Q.x-dt[4],Q.y-dt[5],!0);return}const u=an(),s=Q.hit;s?(s.willTrigger(w.POINTER_MOVE)&&s.dispatchEvent(new w(w.POINTER_MOVE)),u?u.instanceId!==s.instanceId&&(u.willTrigger(w.POINTER_OUT)&&u.dispatchEvent(new w(w.POINTER_OUT)),s.willTrigger(w.POINTER_OVER)&&s.dispatchEvent(new w(w.POINTER_OVER))):s.willTrigger(w.POINTER_OVER)&&s.dispatchEvent(new w(w.POINTER_OVER)),ws(s)):(u&&(u.willTrigger(w.POINTER_OUT)&&u.dispatchEvent(new w(w.POINTER_OUT)),ws(null)),T.hasEventListener(w.POINTER_MOVE)&&T.dispatchEvent(new w(w.POINTER_MOVE)))},vl=e=>{e.target&&(Ue(e),ps(e),gs(),Q.hit&&e.preventDefault(),Al())},Il=e=>{Ue(e);const t=an();t&&t.willTrigger(w.POINTER_LEAVE)&&(e.preventDefault(),t.dispatchEvent(new w(w.POINTER_LEAVE)))},Sl=e=>{Ue(e);const t=Q.hit;if(t&&t.isText&&t.scrollEnabled){e.preventDefault(),e.deltaX&&(t.scrollX+=e.deltaX/(t.textWidth/t.width)),e.deltaY&&(t.scrollY+=e.deltaY/(t.textHeight/t.height));return}T.willTrigger(Ke.WHEEL)&&(e.preventDefault(),T.dispatchEvent(new Ke(Ke.WHEEL)))},Rl=e=>{const t=()=>{g0();const u=$0();for(let s=0;s<u.length;++s){const n=u[s];n&&(n.muted=!1)}u.length=0,e.removeEventListener(w.POINTER_UP,t)};e.addEventListener(w.POINTER_UP,t),e.addEventListener(w.POINTER_DOWN,Ml,{passive:!1}),e.addEventListener(w.POINTER_UP,js),e.addEventListener(w.POINTER_CANCEL,js),e.addEventListener(w.POINTER_MOVE,vl,{passive:!1}),e.addEventListener(w.POINTER_LEAVE,Il),e.addEventListener(Ke.WHEEL,Sl)},lu=document.createElement("canvas");Fr(lu);Lr(lu,Ge);Rl(lu);Nr(lu);const Hu={Event:m,EventDispatcher:je,EventPhase:We,FocusEvent:De,HTTPStatusEvent:St,IOErrorEvent:Re,PointerEvent:w,JobEvent:xe,ProgressEvent:X,VideoEvent:oe};Object.entries(Hu).forEach(([e,t])=>{Object.defineProperty(Hu,e,{get(){return t}})});const zu={Sprite:cs,MovieClip:Xt,BitmapData:Ne,BlendMode:sa,DisplayObject:ru,DisplayObjectContainer:is,FrameLabel:Un,Graphics:y,InteractiveObject:as,Loader:hr,Shape:$t,stage:T};Object.entries(zu).forEach(([e,t])=>{Object.defineProperty(zu,e,{get(){return t}})});const Gu={BevelFilter:zt,BlurFilter:Gt,ColorMatrixFilter:Kt,ConvolutionFilter:Qt,DisplacementMapFilter:Zt,DropShadowFilter:Jt,GlowFilter:jt,GradientBevelFilter:eu,GradientGlowFilter:tu};Object.entries(Gu).forEach(([e,t])=>{Object.defineProperty(Gu,e,{get(){return t}})});const Ku={ColorTransform:L,Matrix:A,Point:J,Rectangle:be};Object.entries(Ku).forEach(([e,t])=>{Object.defineProperty(Ku,e,{get(){return t}})});const Qu={Sound:iu,SoundMixer:Je,SoundTransform:F0,Video:qu};Object.entries(Qu).forEach(([e,t])=>{Object.defineProperty(Qu,e,{get(){return t}})});class yr{requestHeaders;url;contentType;data;method;responseDataFormat;withCredentials;constructor(t=""){this.url=`${t}`,this.contentType="application/json",this.data=null,this.method="GET",this.requestHeaders=[],this.responseDataFormat="json",this.withCredentials=!1}get headers(){const t=[];return t.push({name:"Content-Type",value:this.contentType}),this.requestHeaders.length&&t.push(...this.requestHeaders),t}}const Zu={URLRequest:yr};Object.entries(Zu).forEach(([e,t])=>{Object.defineProperty(Zu,e,{get(){return t}})});const Ju={TextFormat:se,TextField:Uu};Object.entries(Ju).forEach(([e,t])=>{Object.defineProperty(Ju,e,{get(){return t}})});const ju={Easing:_e,Tween:hs};Object.entries(ju).forEach(([e,t])=>{Object.defineProperty(ju,e,{get(){return t}})});const Mr=()=>{const e=xt();if(e)for(;e.firstChild;)e.removeChild(e.firstChild)},wr=()=>{const e=xt();if(!e)return;const t=nn();t&&(e.appendChild(t),e.appendChild(ie))},Ar=()=>{T.ready=!0,Tr(),M.play(),T.changed=!1},kl=()=>{const e=document.createElement("div");if(Or(e),e.id=es,e.tabIndex=-1,!M.tagId)document.body.appendChild(e);else{const t=document.getElementById(M.tagId);if(!t)return alert(`Element not found with tag ID: ${M.tagId}`),e;t.appendChild(e)}return e},Ol=(e,t=0,u=0)=>{let s="";if(s+="display:flex;",s+="align-items:center;",s+="justify-content:center;",s+="background-color:transparent;",s+="overflow:hidden;",s+="padding:0;",s+="margin:0;",s+="user-select:none;",s+="outline:none;",t&&u)s+=`width:${t}px;`,s+=`height:${u}px;`;else{const n=e.parentElement;if(!n)throw new Error("parent element is null.");n.tagName==="BODY"?(s+=`width:${window.innerWidth}px;`,s+=`height:${window.innerHeight}px;`):(s+=`width:${n.clientWidth}px;`,s+=`height:${n.clientHeight}px;`)}e.setAttribute("style",s)},Fl=e=>{const t=`${es}_loading`;e.innerHTML=`<style>
662
+ `;break;case"text":s.push(new se(...Object.values(a.textFormat))),n+=a.text;break;default:continue}}}if(u.textTable.length===e.focusIndex){let r;if(u.textTable.length){const a=u.textTable[u.textTable.length-1];r=new se(...Object.values(a.textFormat))}else r=e.defaultTextFormat,e.focusIndex++;for(let a=0;a<t.length;++a)s.push(new se(...Object.values(r.toObject()))),n+=t[a]}e.$textFormats=s,e.text=n,e.$textFormats=null,e.focusIndex+=t.length,e.selectIndex=-1,ie.value=""},_s=e=>{if(e.selectIndex===-1)return;const t=q(e);if(2>t.textTable.length)return;const u=t.textTable[e.selectIndex];if(!u)return;const s=u.mode==="text"?u.line:u.line-1,n=e.height,r=(e.textHeight-n)/n;let a=-e.scrollY*r-2,i=0;for(let f=0;f<t.heightTable.length&&(a+=t.heightTable[f],!(a>n));++f)i++;a=-e.scrollY*r-2;let c=0;for(let f=0;f<t.heightTable.length&&(a+=t.heightTable[f],!(a>0));++f)c++;c>=u.line&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=t.heightTable[u.line]/r),u.line>=i&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=t.heightTable[u.line]/r);const o=e.width,d=(e.textWidth-o)/o;let l=2,h=e.scrollX*d-2+o;for(let f=1;e.selectIndex>=f;++f){const p=t.textTable[f];if(!p||p.line>s)break;if(p.line===s&&(e.selectIndex!==f&&(l+=p.w),h-=p.w,!(h>0))){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX+=p.w/d;break}}e.scrollX*d-2>l&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((l-2)/e.textWidth))},jo=(e,t,u,s=!1)=>{if(e.type!=="input")return;const n=q(e);if(2>n.textTable.length){e.focusIndex=1,e.selectIndex=-1,_t()===void 0&&le(e);return}const r=e.width,a=e.height;let i=0;e.scrollX>0&&(i+=e.scrollX*(e.textWidth-r)/r);let c=0;e.scrollY>0&&(c+=e.scrollY*(e.textHeight-a)/a);const o=e.globalToLocal(new J(t,u)),d=o.x+i,l=o.y+c;let h=2,b=2,f=b+n.heightTable[0];for(let p=1;p<n.textTable.length;++p){const $=n.textTable[p];if($){switch($.mode){case"break":case"wrap":if(d>h&&l>b&&f>l&&r>d){const m=p;s?e.selectIndex!==m&&(e.selectIndex=m,e.focusVisible&&(e.focusVisible=!1,ae()),_s(e),_(e)):(e.focusIndex!==m||e.selectIndex>-1)&&(e.focusIndex=m,e.selectIndex=-1,_(e));return}h=2,b+=n.heightTable[$.line-1],f=b+n.heightTable[$.line];break;case"text":if(d>h&&l>b&&f>l&&h+$.w>d){let m=p;if(s)e.focusIndex>m?e.focusIndex===m+1?h+$.w/2<d&&(m=-1):h+$.w/2<d&&(m+=1):e.focusIndex===m?h+$.w/2>d&&(m=-1):h+$.w/2>d&&(m-=1),e.selectIndex!==m&&(e.selectIndex=m,e.selectIndex>-1&&(e.focusVisible=!1,ae()),_s(e),_(e));else{if(h+$.w/2<d){const R=n.textTable[m+1];(!R||R.mode==="text")&&(m+=1)}(e.focusIndex!==m||e.selectIndex>-1)&&(e.focusIndex=m,e.selectIndex=-1,_(e))}return}if(p===n.textTable.length-1&&d>h&&l>b&&f>l&&r>d){const m=n.textTable.length;s?e.selectIndex!==m&&(e.selectIndex=m,e.focusVisible&&(e.focusVisible=!1,ae()),_(e)):(e.focusIndex!==m||e.selectIndex>-1)&&(e.focusIndex=m,e.selectIndex=-1,_(e));return}h+=$.w;break}if(!s)e.focusIndex=n.textTable.length,e.selectIndex=-1,_t()===void 0?le(e):_(e);else{let m=0;for(let R=0;n.heightTable.length>R;++R)m+=n.heightTable[R];(l>m||2>l)&&(e.selectIndex=2>l?1:n.textTable.length,e.focusVisible&&(e.focusVisible=!1,ae()),_(e))}}}},e0=(e,t)=>{if(e.focusIndex===-1)return;const u=q(e);if(2>u.textTable.length)return;const s=u.textTable[e.focusIndex];if(!s)return;const n=s.mode==="text"?s.line:s.line-1;if(n===u.lineTable.length-1){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,e.focusVisible=!1,e.focusIndex=u.textTable.length;const h=e.width,b=(e.textWidth-h)/h;let f=0;for(let p=1;e.focusIndex>=p;++p){const $=u.textTable[p];if(!$||$.line>n)break;$.line===n&&(f+=$.w)}e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=(f-h)/b,ae(),le(e);return}const r=e.height,a=(e.textHeight-r)/r;let i=-e.scrollY*a-2,c=0;for(let h=0;h<u.heightTable.length&&(i+=u.heightTable[h],!(i>r));++h)c++;let o=2;for(let h=1;h<u.textTable.length;++h){const b=u.textTable[h];if(b){if(e.focusIndex===h){b.mode==="text"&&(o+=b.w/2);break}if(b.line>n)break;b.line!==n||b.mode!=="text"||(o+=b.w)}}let d=2;const l=n+1;for(let h=1;h<u.textTable.length;++h){const b=u.textTable[h];if(b){if(b.line>l){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,b.line>=c&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=u.heightTable[b.line]/a),e.focusVisible=!1,e.focusIndex=b.mode==="text"?h-1:h,e.scrollX&&d<o&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((d-2)/e.textWidth)),ae(),le(e);return}if(!(b.line!==l||b.mode!=="text")&&(d+=b.w,d>o)){if(t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===h-1&&(e.selectIndex=-1):e.selectIndex=-1,b.line>=c&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=u.heightTable[b.line]/a),e.scrollX){const f=e.width,p=(e.textWidth-f)/f;e.scrollX*p-2>d&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((d-2)/e.textWidth))}e.focusVisible=!1,e.focusIndex=h,ae(),le(e);return}}}t?e.selectIndex===-1&&(e.selectIndex=e.focusIndex):e.selectIndex=-1,e.focusVisible=!1,e.focusIndex=u.textTable.length,ae(),le(e)},t0=(e,t)=>{if(e.focusIndex===-1)return;const u=q(e);if(2>u.textTable.length)return;const s=u.textTable.length===e.focusIndex?e.focusIndex-1:e.focusIndex,n=u.textTable[s];if(!n||!n.line){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.focusVisible=!1,e.focusIndex=1,e.scrollX=0,ae(),le(e);return}const r=n.mode==="text"?n.line:n.line-1,a=e.height,i=(e.textHeight-a)/a;let c=0,o=-e.scrollY*i-2;for(let b=0;b<u.heightTable.length&&(o+=u.heightTable[b],!(o>0));++b)c++;let d=2;for(let b=1;b<u.textTable.length;++b){const f=u.textTable[b];if(f){if(e.focusIndex===b){f.mode==="text"&&(d+=f.w/2);break}if(f.line>r)break;f.line!==r||f.mode!=="text"||(d+=f.w)}}let l=2;const h=r-1;for(let b=1;b<u.textTable.length;++b){const f=u.textTable[b];if(f){if(f.line>h){t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,c>=f.line&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=u.heightTable[f.line]/i),e.scrollX&&(e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((l-2)/e.textWidth)),e.focusVisible=!1,e.focusIndex=f.mode==="text"?b-1:b,ae(),le(e);return}if(!(f.line!==h||f.mode!=="text")&&(l+=f.w,l>d)){t?e.selectIndex===-1?e.selectIndex=e.focusIndex-1:e.selectIndex===b+1&&(e.selectIndex=-1):e.selectIndex=-1,c>f.line&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=u.heightTable[f.line]/i),e.focusVisible=!1,e.focusIndex=b,ae(),le(e);return}}}},u0=(e,t)=>{if(!e.focusIndex)return;const u=q(e);if(u.textTable.length&&e.focusIndex<2){e.focusIndex=1;return}e.focusIndex--,t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1;const s=u.textTable[e.focusIndex];if(s){const n=s.mode==="text"?s.line:s.line-1,r=e.height,a=(e.textHeight-r)/r;let i=-e.scrollY*a-2,c=0;for(let d=0;d<u.heightTable.length&&(i+=u.heightTable[d],!(i>0));++d)c++;c>n&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY-=u.heightTable[s.line]/a);const o=u.textTable[e.focusIndex+1];if(o){const d=o.mode==="text"?o.line:o.line-1;let l=2;for(let p=1;e.focusIndex>p;++p){const $=u.textTable[p];if(!$||$.line>n)break;$.line===n&&(l+=$.w)}const h=e.width,b=(e.textWidth-h)/h,f=e.scrollX*b-2;if(l>h&&o&&n<d){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width;return}if(f>l){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=e.width*((l-2)/e.textWidth);return}}}e.focusVisible=!1,ae(),le(e)},s0=(e,t)=>{const u=q(e);if(u.textTable.length===e.focusIndex)return;t?e.selectIndex===-1?e.selectIndex=e.focusIndex:e.selectIndex===e.focusIndex&&(e.selectIndex=-1):e.selectIndex=-1,e.focusVisible=!1,e.focusIndex++,ae(),le(e);const s=u.textTable[e.focusIndex];if(s){const n=s.mode==="text"?s.line:s.line-1,r=e.height,a=(e.textHeight-r)/r;let i=-e.scrollY*a-2,c=0;for(let f=0;f<u.heightTable.length&&(i+=u.heightTable[f],!(i>r));++f)c++;n>=c&&(e.xScrollShape.hasLocalVariable("job")&&e.xScrollShape.deleteLocalVariable("job"),e.scrollY+=u.heightTable[n]/a);const o=u.textTable[e.focusIndex-1],d=o.mode==="text"?o.line:o.line-1;if(o&&n>d){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX=0;return}const l=e.width,h=(e.textWidth-l)/l;let b=e.scrollX*h-2+l;for(let f=1;e.focusIndex>=f;++f){const p=u.textTable[f];if(!p||p.line>n)break;if(p.line===n&&(b-=p.w,!(b>0))){e.yScrollShape.hasLocalVariable("job")&&e.yScrollShape.deleteLocalVariable("job"),e.scrollX+=p.w/h;break}}}},n0=(e,t)=>{if(e.focusIndex!==-1)switch(t.key){case"Backspace":case"Delete":e.deleteText();break;case"Enter":e.insertText(`
663
+ `);break;case"ArrowLeft":u0(e,t.shiftKey);break;case"ArrowRight":s0(e,t.shiftKey);break;case"ArrowUp":t0(e,t.shiftKey);break;case"ArrowDown":e0(e,t.shiftKey);break;case"a":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.selectAll());break;case"c":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.copy());break;case"v":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.paste());break}},r0=e=>{const t=q(e);2>t.textTable.length||(e.selectIndex=1,e.focusIndex=t.textTable.length,_(e))},a0=(e,t)=>{const u=e.defaultTextFormat;switch(u.font=t.font,u.size=t.size,u.align=t.align,u.color=t.color,u.leading=t.leading,u.letterSpacing=t.letterSpacing,u.leftMargin=t.leftMargin,u.rightMargin=t.rightMargin,t.fontType){case 1:u.bold=!0;break;case 2:u.italic=!0;break;case 3:u.bold=!0,u.italic=!0;break}switch(e.defaultTextFormat=u,e.type=t.inputType,e.multiline=t.multiline,e.wordWrap=t.wordWrap,e.border=t.border,e.scrollEnabled=t.scroll,e.thickness=t.thickness,e.thicknessColor=t.thicknessColor,t.autoSize){case 1:e.autoSize=t.align;break;case 2:e.autoFontSize=!0;break}e.xMin=e.bounds.xMin=t.bounds.xMin,e.xMax=e.bounds.xMax=t.bounds.xMax,e.yMin=e.bounds.yMin=t.bounds.yMin,e.yMax=e.bounds.yMax=t.bounds.yMax+4,e.text=t.text};class Uu extends as{isText;$textData;_$isHTML;xMin;yMin;xMax;yMax;bounds;scrollEnabled;xScrollShape;yScrollShape;focusVisible;focusIndex;selectIndex;maxChars;restrict;type;compositionStartIndex;compositionEndIndex;$textFormats;$scrollX;$scrollY;cacheKey;cacheParams;_$background;_$backgroundColor;_$border;_$borderColor;_$htmlText;_$multiline;_$text;_$wordWrap;_$defaultTextFormat;_$rawHtmlText;_$autoSize;_$autoFontSize;_$focus;_$thickness;_$thicknessColor;_$stopIndex;constructor(){super(),this.isText=!0,this.$textData=null,this._$background=!1,this._$backgroundColor=16777215,this._$border=!1,this._$borderColor=0,this._$htmlText="",this._$multiline=!1,this._$text="",this._$wordWrap=!1,this.$scrollX=0,this.$scrollY=0,this.$textFormats=null,this.maxChars=0,this._$stopIndex=-1,this.compositionStartIndex=-1,this.compositionEndIndex=-1;const t=new se;Ic(t),this._$defaultTextFormat=t,this._$rawHtmlText="",this.xMin=0,this.yMin=0,this.xMax=100,this.yMax=100,this.bounds={xMin:0,xMax:this.xMax,yMin:0,yMax:this.yMax},this.restrict="",this._$isHTML=!1,this._$autoSize="none",this._$autoFontSize=!1,this.focusVisible=!1,this.focusIndex=-1,this.selectIndex=-1,this.scrollEnabled=!0,this.xScrollShape=new $t,this.xScrollShape.graphics.beginFill("#000",.3).drawRoundRect(0,0,3,3,3),this.xScrollShape.scale9Grid=new be(1.5,1.5,.1,.1),this.yScrollShape=new $t,this.yScrollShape.graphics.beginFill("#000",.3).drawRoundRect(0,0,3,3,3),this.yScrollShape.scale9Grid=new be(1.5,1.5,.1,.1),this.type="static",this._$focus=!1,this._$thickness=0,this._$thicknessColor=0,this.cacheKey=0,this.cacheParams=[0,0,0]}static get namespace(){return"next2d.display.TextField"}get namespace(){return"next2d.display.TextField"}get autoFontSize(){return this._$autoFontSize}set autoFontSize(t){t!==this._$autoFontSize&&(this._$autoFontSize=!!t,Te(this))}get autoSize(){return this._$autoSize}set autoSize(t){t!==this._$autoSize&&(this._$autoSize=t,Te(this))}get background(){return this._$background}set background(t){t!==this._$background&&(this._$background=!!t,_(this))}get backgroundColor(){return this._$backgroundColor}set backgroundColor(t){t=ht(Qe(t),0,16777215,16777215),t!==this._$backgroundColor&&(this._$backgroundColor=t,_(this))}get border(){return this._$border}set border(t){t!==this._$border&&(this._$border=!!t,_(this))}get borderColor(){return this._$borderColor}set borderColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$borderColor&&(this._$borderColor=t,_(this))}get stopIndex(){return this._$stopIndex}set stopIndex(t){t|=0,this._$stopIndex!==t&&(this._$stopIndex=t,io(this,t))}get defaultTextFormat(){return this._$defaultTextFormat.clone()}set defaultTextFormat(t){this._$rawHtmlText="",this._$isHTML?this._$text="":this._$htmlText="",this._$defaultTextFormat=t,Te(this)}get focus(){return this._$focus}set focus(t){this._$focus!==t&&this.type==="input"&&(this._$focus=!!t,lo(this,this._$focus?De.FOCUS_IN:De.FOCUS_OUT))}get htmlText(){if(this._$htmlText)return this._$htmlText;const t=Sc(this.defaultTextFormat);return this._$htmlText=`<span style="${t}">${this._$text.replace(/\n/g,"<br>")}</span>`,this._$htmlText}set htmlText(t){this._$htmlText!==t&&(this._$htmlText=`${t}`,this._$rawHtmlText="",this._$text="",this._$isHTML=!0,Te(this),this.hasEventListener(g.CHANGE)&&this.dispatchEvent(new g(g.CHANGE)))}get length(){return this.text.length}get multiline(){return this._$multiline}set multiline(t){t!==this._$multiline&&(this._$multiline=!!t,Te(this))}get numLines(){return q(this).lineTable.length}get scrollX(){return this.$scrollX}set scrollX(t){Ho(this,t)}get scrollY(){return this.$scrollY}set scrollY(t){zo(this,t)}get text(){return this._$isHTML?(this._$rawHtmlText||(this._$rawHtmlText=Go(this)),this._$rawHtmlText):this._$text}set text(t){t=`${t}`,t===""&&(this.scrollX&&(this.scrollX=0),this.scrollY&&(this.scrollY=0)),t!==this._$text&&(this._$htmlText="",this._$rawHtmlText="",this._$isHTML=!1,this._$text=t,Te(this),this.hasEventListener(g.CHANGE)&&this.dispatchEvent(new g(g.CHANGE)))}get textHeight(){return q(this).textHeight}get textWidth(){return q(this).textWidth}get thickness(){return this._$thickness}set thickness(t){t|=0,t!==this._$thickness&&(this._$thickness=t,_(this))}get thicknessColor(){return this._$thicknessColor}set thicknessColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$thicknessColor&&(this._$thicknessColor=t,_(this))}get wordWrap(){return this._$wordWrap}set wordWrap(t){this._$wordWrap!==t&&(this._$wordWrap=!!t,Te(this))}get width(){return super.width}set width(t){if(t=+t,!isNaN(t)&&0>t)return;const u=t+this.bounds.xMin;u!==this.bounds.xMax&&(this.bounds.xMax=u,Te(this))}get height(){return super.height}set height(t){if(t=+t,!isNaN(t)&&0>t)return;const u=t+this.bounds.yMin;u!==this.bounds.yMax&&(this.bounds.yMax=u,Te(this))}appendText(t){const u=this.text;this.text=u+`${t}`}insertText(t){nr(this,t)}deleteText(){ds(this)}getLineText(t){return this._$text||this._$htmlText?Ko(this,t|0):""}replaceText(t,u,s){Qo(this,t,u|0,s|0)}selectAll(){r0(this)}copy(){Zo(this)}paste(){Jo(this)}setFocusIndex(t,u,s=!1){jo(this,t,u,s)}keyDown(t){n0(this,t)}$sync(t,u=null){u&&super.$syncLoaderInfo(u),a0(this,t)}}const i0=e=>{e.compositionStartIndex=e.focusIndex},c0=()=>{const e=Fe();e&&i0(e)},o0=(e,t)=>{if(e.compositionEndIndex>-1){const i=e.compositionStartIndex;e.focusIndex=e.compositionStartIndex,e.selectIndex=e.compositionEndIndex-1,e.compositionStartIndex=-1,ds(e),e.compositionStartIndex=i,e.selectIndex=-1}let u=q(e);const s=[],n=t.length;let r="";if(2>u.textTable.length)r=t,e.focusIndex=1,e.compositionStartIndex=1;else{for(let i=1;i<u.textTable.length;++i){const c=u.textTable[i];if(c){if(e.compositionStartIndex===i)for(let o=0;o<n;++o)s.push(new se(...Object.values(c.textFormat))),r+=t[o];switch(c.mode){case"break":s.push(new se(...Object.values(c.textFormat))),r+=`
664
+ `;break;case"text":s.push(new se(...Object.values(c.textFormat))),r+=c.text;break;default:continue}}}if(e.compositionStartIndex===u.textTable.length){const i=u.textTable[e.compositionStartIndex-1];if(!i)return;for(let c=0;c<n;++c)s.push(new se(...Object.values(i.textFormat))),r+=t[c]}}s.length&&(e.$textFormats=s),e.text=r,e.$textFormats=null,u=q(e);let a=e.compositionStartIndex+n;for(let i=e.compositionStartIndex;i<a;++i){const c=u.textTable[i];if(!c)break;if(c.textFormat.underline=!0,c.mode==="wrap"){if(i===e.compositionStartIndex){let o=1;for(;;){const d=u.textTable[i-o];if(!d)break;if(d.mode==="text"){d.textFormat.underline=!0;break}o++}}i>e.compositionStartIndex&&a++}}e.compositionEndIndex=e.focusIndex=a},l0=e=>{const t=Fe();t&&o0(t,e.data)},h0=e=>{if(e.compositionEndIndex>-1){const t=q(e);for(let u=e.compositionStartIndex;u<e.compositionEndIndex;++u){const s=t.textTable[u];s&&(s.textFormat.underline=!1)}e.focusIndex=e.compositionEndIndex}ie.blur(),ie.value="",e.focus&&ie.focus(),e.selectIndex=-1,e.compositionStartIndex=-1,e.compositionEndIndex=-1},d0=()=>{const e=Fe();e&&h0(e)},f0=e=>{if(!e.data)return;const t=Fe();t&&(nr(t,e.data),t.hasEventListener(g.INPUT)&&t.dispatchEvent(new g(g.INPUT)))},b0=e=>{e.addEventListener("compositionstart",c0),e.addEventListener("compositionupdate",l0),e.addEventListener("compositionend",d0),e.addEventListener("input",f0)};b0(ie);const rr=[],$0=()=>rr,x0=e=>{rr.push(e)};let Be=null;const g0=()=>!!Be,m0=()=>{Be||(Be=new AudioContext),Be.resume()},ar=()=>(Be||(Be=new AudioContext),Be),p0=e=>{let t=null;switch(e.method.toUpperCase()){case"GET":if(e.data){const s=e.url.split("?");s[1]=s.length===1?e.data.toString():`${s[1]}&${e.data.toString()}`,e.url=s.join("?")}break;case"PUT":case"POST":e.data&&(t=e.data.toString());break}const u=new XMLHttpRequest;if(u.open(e.method,e.url,!0),u.responseType=e.format,u.withCredentials=e.withCredentials,e.event){const s=Object.keys(e.event);for(let n=0;n<s.length;++n){const r=s[n];u.addEventListener(r,e.event[r])}}for(let s=0;s<e.headers.length;++s){const n=e.headers[s];n&&u.setRequestHeader(n.name,n.value)}u.send(t)},fs=(e,t,u,s=null)=>{const n=+e;return isNaN(n)&&s!==null?s:Math.min(Math.max(t,isNaN(n)?0:n),u)};let ir=1;const T0=()=>ir,E0=e=>{ir=fs(e,0,1,1)},y0=[],Ut=()=>y0,w0=[],au=()=>w0,M0=e=>{E0(e);const t=Ut();for(let s=0;s<t.length;++s){const n=t[s];n&&(n.volume=e)}const u=au();for(let s=0;s<u.length;++s){const n=u[s];n&&(n.volume=e)}},A0=()=>{const e=Ut();for(let u=0;u<e.length;++u){const s=e[u];s&&s.stop()}const t=au();for(let u=0;u<t.length;++u){const s=t[u];s&&s.pause()}e.length=0,t.length=0};class Je{static get volume(){return T0()}static set volume(t){M0(t)}static stopAll(){A0()}}const v0=e=>{e.canLoop?e.play():(e.stop(),e.willTrigger(g.COMPLETE)&&e.dispatchEvent(new g(g.COMPLETE)))},I0=(e,t)=>{e.willTrigger(g.OPEN)&&e.dispatchEvent(new g(g.OPEN)),e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},S0=(e,t)=>{e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},bs=async e=>{if(e.byteLength)try{return await ar().decodeAudioData(e)}catch{const t=new Uint8Array(e);let u=0;for(;u>t.byteLength&&(u=t.indexOf(255,u),!(u===-1||(t[u+1]&224)===224));)++u;return await bs(t.subarray(u).buffer)}},R0=async(e,t)=>{const u=t.target;if(u)if(e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total)),199<u.status&&400>u.status){const s=await bs(u.response);s&&(e.audioBuffer=s,e.willTrigger(g.COMPLETE)&&e.dispatchEvent(new g(g.COMPLETE)))}else e.willTrigger(Re.IO_ERROR)&&e.dispatchEvent(new Re(Re.IO_ERROR,!1,u.statusText))},k0=async(e,t)=>{await new Promise(u=>{p0({format:"arraybuffer",url:t.url,method:t.method,data:t.data,headers:t.headers,withCredentials:t.withCredentials,event:{loadstart:s=>{I0(e,s)},progress:s=>{S0(e,s)},loadend:async s=>{await R0(e,s),u()}}})})},O0=async(e,t)=>{if(!t.audioBuffer){const u=new Uint8Array(t.buffer),s=await bs(u.buffer);if(!s)return;t.audioBuffer=s}e.audioBuffer=t.audioBuffer};class iu extends je{_$source;_$gainNode;_$stopFlag;_$currentCount;_$volume;audioBuffer;loopCount;constructor(){super(),this.loopCount=0,this.audioBuffer=null,this._$volume=1,this._$currentCount=0,this._$stopFlag=!0,this._$source=null,this._$gainNode=null}get volume(){return this._$volume}set volume(t){this._$volume=fs(Math.min(Je.volume,t),0,1,1),this._$gainNode&&(this._$gainNode.gain.value=this._$volume)}get canLoop(){return!this._$stopFlag&&this.loopCount>=this._$currentCount}clone(){const t=new iu;return t.volume=this._$volume,t.loopCount=this.loopCount,t.audioBuffer=this.audioBuffer,t}async load(t){await k0(this,t)}play(t=0){if(!this._$stopFlag||!this.audioBuffer)return;this.stop();const u=ar();this._$gainNode=u.createGain(),this._$gainNode.connect(u.destination),this._$gainNode.gain.value=Math.min(Je.volume,this._$volume),this._$source=u.createBufferSource(),this._$source.addEventListener("ended",()=>{v0(this)}),this._$source.buffer=this.audioBuffer,this._$source.connect(this._$gainNode),this._$source.start(t),this._$stopFlag=!1,this._$currentCount++,Ut().push(this)}stop(){if(this._$stopFlag)return;this._$stopFlag=!0,this._$currentCount=0,this._$source&&(this._$source.disconnect(),this._$source=null),this._$gainNode&&(this._$gainNode.gain.value=0,this._$gainNode.disconnect(),this._$gainNode=null);const t=Ut(),u=t.indexOf(this);u>-1&&t.splice(u,1)}async $build(t){await O0(this,t)}}class F0{volume;loopCount;constructor(t=1,u=0){this.volume=t,this.loopCount=u}}const C0=()=>{const e=document.createElement("video");return e.autoplay=!1,e.crossOrigin="anonymous",e.setAttribute("playsinline",""),e},$s=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&$s(t)},L0=async e=>{e.autoPlay&&(g0()||(e.muted=!0,x0(e)),await e.play()),e.loaded=!0,$s(e),e.willTrigger(g.COMPLETE)&&e.dispatchEvent(new g(g.COMPLETE))},N0=(e,t)=>{t.currentTime=0,t.duration=e.duration,t.videoWidth=e.videoWidth,t.videoHeight=e.videoHeight;const u=new OffscreenCanvas(t.videoWidth,t.videoHeight);t.$context=u.getContext("2d"),t.$offscreenCanvas=u},P0=(e,t)=>{e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},B0=e=>{if(e.willTrigger(oe.ENDED)&&e.dispatchEvent(new oe(oe.ENDED)),e.loop){e.currentTime=0;return}e.ended=!0,e.changed=!1,e.pause()},D0=(e,t)=>{e.addEventListener("loadedmetadata",()=>{N0(e,t)},{once:!0}),e.addEventListener("progress",u=>{P0(t,u)}),e.addEventListener("canplaythrough",async()=>{await L0(t),e.volume=t.volume},{once:!0}),e.addEventListener("ended",()=>{B0(t)})},cr=e=>{if(e.paused||!e.loaded)return 0;e.willTrigger(oe.PLAY)&&e.dispatchEvent(new oe(oe.PLAY)),$s(e);const t=au();return t.indexOf(e)===-1&&t.push(e),e.$context&&e.$videoElement&&e.$context.drawImage(e.$videoElement,0,0,e.videoWidth,e.videoHeight),requestAnimationFrame(()=>{cr(e)})},_0=(e,t)=>{t.videoData||(t.videoData=new Uint8Array(t.buffer),t.buffer=null),e.loop=t.loop,e.autoPlay=t.autoPlay,e.videoWidth=t.bounds.xMax,e.videoHeight=t.bounds.yMax,e.volume=t.volume,e.src=URL.createObjectURL(new Blob([t.videoData.buffer],{type:"video/mp4"}))};class qu extends ru{duration;smoothing;loop;autoPlay;currentTime;videoWidth;videoHeight;loaded;ended;isVideo;$videoElement;$offscreenCanvas;$context;paused;_$timerId;_$volume;_$src;constructor(t=0,u=0){super(),this.videoWidth=t,this.videoHeight=u,this.isVideo=!0,this.duration=0,this.smoothing=!0,this.loop=!1,this.loaded=!1,this.ended=!1,this.paused=!0,this.autoPlay=!0,this.currentTime=0,this._$src="",this._$timerId=-1,this._$volume=1,this.$videoElement=null,this.$offscreenCanvas=null,this.$context=null}static get namespace(){return"next2d.media.Video"}get namespace(){return"next2d.media.Video"}get src(){return this._$src}set src(t){this._$src!==t&&(this.loaded=!1,this.currentTime=0,this.$videoElement=null,this.$offscreenCanvas=null,this.$context=null,this.$videoElement=C0(),D0(this.$videoElement,this),this._$src=this.$videoElement.src=t,this.$videoElement.load())}get muted(){return this.$videoElement?this.$videoElement.muted:!1}set muted(t){this.$videoElement&&(this.$videoElement.muted=t)}get volume(){return this._$volume}set volume(t){this._$volume=fs(Math.min(Je.volume,t),0,1,1),this.$videoElement&&(this.$videoElement.volume=this._$volume)}pause(){if(!this.$videoElement||this.paused)return;this.paused=!0,this.$videoElement.pause(),cancelAnimationFrame(this._$timerId),this.willTrigger(oe.PAUSE)&&this.dispatchEvent(new oe(oe.PAUSE));const t=au(),u=t.indexOf(this);u>-1&&t.splice(u,1)}async play(){!this.$videoElement||!this.paused||(this.paused=!1,this.ended=!1,this.$videoElement.volume=this._$volume,await this.$videoElement.play(),this._$timerId=cr(this))}seek(t){this.$videoElement&&(this.currentTime=this.$videoElement.currentTime=Math.min(this.duration,t),this.willTrigger(oe.SEEK)&&this.dispatchEvent(new oe(oe.SEEK)))}$sync(t,u=null){u&&super.$syncLoaderInfo(u),_0(this,t)}}const lt=(e,t,u,s,n=-1)=>{const r=s.loaderInfo;if(!r)throw new Error("the loaderInfo or data is null.");e.parent=s,ke.set(e,s.root),Rt.set(e,r),e.dictionaryId=t,e.characterId=u.characterId,e.clipDepth=u.clipDepth,e.startFrame=u.startFrame,e.endFrame=u.endFrame,e.name=u.name||"",e.placeId=n},Us=(e,t,u,s,n=-1)=>{switch(u.extends){case Xt.namespace:{const r=new Xt;return lt(r,e,t,s,n),r.$sync(u),r}case $t.namespace:{const r=new $t;return lt(r,e,t,s,n),r.$sync(u),r}case Uu.namespace:{const r=new Uu;return lt(r,e,t,s,n),r.$sync(u),r}case qu.namespace:{const r=new qu;return lt(r,e,t,s,n),r.$sync(u),r}default:throw new Error(`Character extends not found: ${u.extends}`)}},Mt=new Map,U0=(e,t)=>{const u=e.loaderInfo;if(!u||!u.data)return t;const s=u.data.characters[e.characterId];if(!s)return t;const n=e.currentFrame,r=s.controller[n];if(!r)return t;const a=[],i=s.dictionary;if(!t.length){for(let c=0;c<r.length;++c){if(!(c in r))continue;const o=r[c];if(typeof o!="number")continue;const d=i[o];if(!d)continue;const l=u.data.characters[d.characterId];if(!l)continue;const h=Us(o,d,l,e,c);h&&(t.push(h),h.isContainerEnabled&&a.push(h))}return e.$container=a,t}for(let c=0;c<t.length;++c){const o=t[c];if(!o)continue;const d=o.startFrame,l=o.endFrame;if(d===1&&l===0||d<=n&&l>n){Mt.set(o.dictionaryId,o);continue}o.uniqueKey&&O.has(o.uniqueKey)&&O.removeTimer(o.uniqueKey),o.willTrigger(g.REMOVED)&&o.dispatchEvent(new g(g.REMOVED,!0)),o.willTrigger(g.REMOVED_FROM_STAGE)&&o.dispatchEvent(new g(g.REMOVED_FROM_STAGE,!0)),o.isVideo&&o.pause(),o.isContainerEnabled&&ns(o)}t.length=0;for(let c=0;c<r.length;++c){if(!(c in r))continue;const o=r[c];if(typeof o!="number")continue;if(Mt.has(o)){const b=Mt.get(o);b.placeId=c,b.placeObject=null,t.push(b);continue}const d=i[o];if(!d)continue;const l=u.data.characters[d.characterId];if(!l)continue;const h=Us(o,d,l,e,c);h&&(t.push(h),h.isContainerEnabled&&a.push(h))}return e.$container=a,Mt.clear(),t},q0=(e,t)=>{e.$labels||(e.$labels=new Map),e.$labels.set(t.frame,t)},X0=e=>{if(!e.$labels)return null;const t=e.currentFrame;return e.$labels.has(t)&&e.$labels.get(t)||null},Y0=e=>!e.$labels||!e.$labels.size?null:Array.from(e.$labels.values()),V0=(e,t)=>{if(!e.$labels||!e.$labels.size)return 0;for(const[u,s]of e.$labels)if(s.name===t)return u;return 0},W0=(e,t=null)=>{if(!t||!t.size)return;const u=e.currentFrame;if(!t.has(u))return;const s=t.get(u);s.willTrigger(g.FRAME_LABEL)&&s.dispatchEvent(new g(g.FRAME_LABEL))},H0=(e,t=null)=>{if(!t||!t.size)return;const u=e.currentFrame;t.has(u)&&Ru.push(e)},qt=e=>{e.$canAction&&(e.$canAction=!1,W0(e,e.$labels),H0(e,e.$actions))},cu=(e,t)=>{if(e.totalFrames===1)return;let u=+t;if(isNaN(u)&&(u=V0(e,`${t}`)),1>u&&(u=1),e.currentFrame!==u){if(u>e.totalFrames){if(e.currentFrame===e.totalFrames)return;e.$wait=!0,e.$canSound=!0,e.$canAction=!0,e.$hasTimelineHeadMoved=!0,e.currentFrame=e.totalFrames,qt(e),Y(e);return}e.currentFrame=u,e.$wait=!0,e.$canSound=!0,e.$canAction=!0,e.$hasTimelineHeadMoved=!0,Y(e),qt(e)}},z0=(e,t)=>{e.play(),cu(e,t)},G0=(e,t)=>{e.stop(),cu(e,t),e.$wait=!1},K0=e=>{e.totalFrames<=e.currentFrame||(e.stop(),cu(e,e.currentFrame+1))},Q0=e=>{2>e.currentFrame||(e.stop(),cu(e,e.currentFrame-1))},Z0=(e,t)=>{for(let u=0;u<t.length;++u){const s=t[u];if(!s)continue;s.script||(s.script=Function(s.action));const n=s.frame;e.has(n)||e.set(n,U()),e.get(n)?.push(s.script)}},J0=(e,t)=>{for(let u=0;u<t.length;++u){const s=t[u];s&&e.set(s.frame,new Un(s.name,s.frame))}},j0=async(e,t,u)=>{const s=e.loaderInfo;if(!s)return;const n=s.data;if(!n)return;const r=n.characters;for(let a=0;a<u.length;++a){const i=u[a];if(!i)continue;const c=U();for(let o=0;o<i.sound.length;++o){const d=i.sound[o];if(!d)continue;const l=r[d.characterId];if(!l)continue;const h=new iu;h.loopCount=d.loopCount|0,h.volume=Math.min(Je.volume,d.volume),await h.$build(l),c.push(h)}t.set(i.frame,c)}},el=(e,t)=>{t.actions&&(e.$actions||(e.$actions=new Map),Z0(e.$actions,t.actions)),t.sounds&&(e.$sounds||(e.$sounds=new Map),j0(e,e.$sounds,t.sounds)),t.labels&&(e.$labels||(e.$labels=new Map),J0(e.$labels,t.labels)),e.totalFrames=t.totalFrame||1};class Xt extends cs{$labels;$actions;$sounds;$canAction;$wait;totalFrames;currentFrame;_$stopFlag;$canSound;$hasTimelineHeadMoved;isTimelineEnabled;constructor(){super(),this.currentFrame=1,this.totalFrames=1,this.isTimelineEnabled=!0,this.$actions=null,this.$labels=null,this.$sounds=null,this.$canAction=!0,this.$wait=!1,this.$canSound=!0,this.$hasTimelineHeadMoved=!0,this._$stopFlag=!1}static get namespace(){return"next2d.display.MovieClip"}get namespace(){return"next2d.display.MovieClip"}get children(){return!this.$hasTimelineHeadMoved||this.characterId===-1?this._$children:(this.$hasTimelineHeadMoved=!1,U0(this,this._$children))}get currentFrameLabel(){return X0(this)}get currentLabels(){return Y0(this)}get isPlaying(){return!this._$stopFlag}gotoAndPlay(t){z0(this,t)}gotoAndStop(t){G0(this,t)}nextFrame(){K0(this)}play(){this._$stopFlag=!1,Y(this)}prevFrame(){Q0(this)}stop(){this._$stopFlag=!0}addFrameLabel(t){q0(this,t)}$sync(t,u=null){u&&super.$syncLoaderInfo(u),el(this,t)}}const qs=async(e,t)=>{const u=new Map;if(t.symbols.length)for(let a=0;a<t.symbols.length;++a){const i=t.symbols[a];u.set(i[0],i[1])}const s=e.contentLoaderInfo;s.data={stage:t.stage,characters:t.characters,symbols:u};const n=new Xt,r=t.characters[0];lt(n,-1,{characterId:0,name:"main",clipDepth:0,endFrame:r.controller.length,startFrame:1},e),n.$sync(r,s),n.parent=null,s.content=n,s.willTrigger(g.COMPLETE)&&s.dispatchEvent(new g(g.COMPLETE))},or=`(function(){"use strict";var l=Uint8Array,k=Uint16Array,tr=Int32Array,W=new l([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),X=new l([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ur=new l([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Y=function(r,e){for(var n=new k(31),i=0;i<31;++i)n[i]=e+=1<<r[i-1];for(var f=new tr(n[30]),i=1;i<30;++i)for(var g=n[i];g<n[i+1];++g)f[g]=g-n[i]<<5|i;return{b:n,r:f}},Z=Y(W,2),$=Z.b,cr=Z.r;$[28]=258,cr[258]=28;for(var wr=Y(X,0),gr=wr.b,O=new k(32768),v=0;v<32768;++v){var b=(v&43690)>>1|(v&21845)<<1;b=(b&52428)>>2|(b&13107)<<2,b=(b&61680)>>4|(b&3855)<<4,O[v]=((b&65280)>>8|(b&255)<<8)>>1}for(var m=(function(r,e,n){for(var i=r.length,f=0,g=new k(e);f<i;++f)r[f]&&++g[r[f]-1];var s=new k(e);for(f=1;f<e;++f)s[f]=s[f-1]+g[f-1]<<1;var h;if(n){h=new k(1<<e);var p=15-e;for(f=0;f<i;++f)if(r[f])for(var C=f<<4|r[f],y=e-r[f],a=s[r[f]-1]++<<y,o=a|(1<<y)-1;a<=o;++a)h[O[a]>>p]=C}else for(h=new k(i),f=0;f<i;++f)r[f]&&(h[f]=O[s[r[f]-1]++]>>15-r[f]);return h}),A=new l(288),v=0;v<144;++v)A[v]=8;for(var v=144;v<256;++v)A[v]=9;for(var v=256;v<280;++v)A[v]=7;for(var v=280;v<288;++v)A[v]=8;for(var j=new l(32),v=0;v<32;++v)j[v]=5;var hr=m(A,9,1),br=m(j,5,1),B=function(r){for(var e=r[0],n=1;n<r.length;++n)r[n]>e&&(e=r[n]);return e},c=function(r,e,n){var i=e/8|0;return(r[i]|r[i+1]<<8)>>(e&7)&n},J=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},sr=function(r){return(r+7)/8|0},yr=function(r,e,n){return(n==null||n>r.length)&&(n=r.length),new l(r.subarray(e,n))},zr=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],t=function(r,e,n){var i=new Error(e||zr[r]);if(i.code=r,Error.captureStackTrace&&Error.captureStackTrace(i,t),!n)throw i;return i},N=function(r,e,n,i){var f=r.length,g=0;if(!f||e.f&&!e.l)return n||new l(0);var s=!n,h=s||e.i!=2,p=e.i;s&&(n=new l(f*3));var C=function(vr){var or=n.length;if(vr>or){var lr=new l(Math.max(or*2,vr));lr.set(n),n=lr}},y=e.f||0,a=e.p||0,o=e.b||0,F=e.l,D=e.d,E=e.m,T=e.n,R=f*8;do{if(!F){y=c(r,a,1);var _=c(r,a+1,3);if(a+=3,_)if(_==1)F=hr,D=br,E=9,T=5;else if(_==2){var H=c(r,a,31)+257,L=c(r,a+10,15)+4,d=H+c(r,a+5,31)+1;a+=14;for(var M=new l(d),K=new l(19),u=0;u<L;++u)K[ur[u]]=c(r,a+u*3,7);a+=L*3;for(var rr=B(K),Mr=(1<<rr)-1,Ur=m(K,rr,1),u=0;u<d;){var er=Ur[c(r,a,Mr)];a+=er&15;var w=er>>4;if(w<16)M[u++]=w;else{var x=0,I=0;for(w==16?(I=3+c(r,a,3),a+=2,x=M[u-1]):w==17?(I=3+c(r,a,7),a+=3):w==18&&(I=11+c(r,a,127),a+=7);I--;)M[u++]=x}}var nr=M.subarray(0,H),z=M.subarray(H);E=B(nr),T=B(z),F=m(nr,E,1),D=m(z,T,1)}else t(1);else{var w=sr(a)+4,q=r[w-4]|r[w-3]<<8,G=w+q;if(G>f){p&&t(0);break}h&&C(o+q),n.set(r.subarray(w,G),o),e.b=o+=q,e.p=a=G*8,e.f=y;continue}if(a>R){p&&t(0);break}}h&&C(o+131072);for(var Dr=(1<<E)-1,Ir=(1<<T)-1,P=a;;P=a){var x=F[J(r,a)&Dr],S=x>>4;if(a+=x&15,a>R){p&&t(0);break}if(x||t(2),S<256)n[o++]=S;else if(S==256){P=a,F=null;break}else{var ar=S-254;if(S>264){var u=S-257,U=W[u];ar=c(r,a,(1<<U)-1)+$[u],a+=U}var Q=D[J(r,a)&Ir],V=Q>>4;Q||t(3),a+=Q&15;var z=gr[V];if(V>3){var U=X[V];z+=J(r,a)&(1<<U)-1,a+=U}if(a>R){p&&t(0);break}h&&C(o+131072);var ir=o+ar;if(o<z){var fr=g-z,Or=Math.min(z,ir);for(fr+o<0&&t(3);o<Or;++o)n[o]=i[fr+o]}for(;o<ir;++o)n[o]=n[o-z]}}e.l=F,e.p=P,e.b=o,e.f=y,F&&(y=1,e.m=E,e.d=D,e.n=T)}while(!y);return o!=n.length&&s?yr(n,0,o):n.subarray(0,o)},Fr=new l(0),kr=function(r){(r[0]!=31||r[1]!=139||r[2]!=8)&&t(6,"invalid gzip data");var e=r[3],n=10;e&4&&(n+=(r[10]|r[11]<<8)+2);for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!r[n++]);return n+(e&2)},pr=function(r){var e=r.length;return(r[e-4]|r[e-3]<<8|r[e-2]<<16|r[e-1]<<24)>>>0},xr=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&t(6,"invalid zlib data"),(r[1]>>5&1)==1&&t(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Sr(r,e){return N(r,{i:2},e,e)}function mr(r,e){var n=kr(r);return n+8>r.length&&t(6,"invalid gzip data"),N(r.subarray(n,-8),{i:2},new l(pr(r)),e)}function Ar(r,e){return N(r.subarray(xr(r),-4),{i:2},e,e)}function Cr(r,e){return r[0]==31&&r[1]==139&&r[2]==8?mr(r,e):(r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31?Sr(r,e):Ar(r,e)}var Er=typeof TextDecoder<"u"&&new TextDecoder,Tr=0;try{Er.decode(Fr,{stream:!0}),Tr=1}catch{}self.addEventListener("message",r=>{const e=Cr(r.data);let n="";for(let i=0;i<e.length;i+=4096)n+=String.fromCharCode(...e.subarray(i,i+4096));self.postMessage(JSON.parse(decodeURIComponent(n)))})})();
665
+ `,Xs=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",or],{type:"text/javascript;charset=utf-8"});function tl(e){let t;try{if(t=Xs&&(self.URL||self.webkitURL).createObjectURL(Xs),!t)throw"";const u=new Worker(t,{name:e?.name});return u.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),u}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(or),{name:e?.name})}}const Ys=new tl,lr=async(e,t)=>{t.type==="zlib"?await new Promise(u=>{Ys.onmessage=n=>{qs(e,n.data),u()};const s=new Uint8Array(t.buffer);Ys.postMessage(s,[s.buffer])}):qs(e,t)},ul=(e,t)=>{e.willTrigger(g.OPEN)&&e.dispatchEvent(new g(g.OPEN)),e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},sl=(e,t)=>{e.willTrigger(X.PROGRESS)&&e.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total))},nl=async(e,t)=>{const u=t.target;if(!u)return;const s=e.contentLoaderInfo;if(s.willTrigger(X.PROGRESS)&&s.dispatchEvent(new X(X.PROGRESS,!1,t.loaded,t.total)),s.willTrigger(St.HTTP_STATUS)){const n=ti(u.getAllResponseHeaders());s.dispatchEvent(new St(St.HTTP_STATUS,!1,u.status,u.responseURL,n))}199<u.status&&400>u.status?(await lr(e,u.response),s.willTrigger(g.COMPLETE)&&s.dispatchEvent(new g(g.COMPLETE))):s.willTrigger(Re.IO_ERROR)&&s.dispatchEvent(new Re(Re.IO_ERROR,!1,u.statusText))},rl=async(e,t)=>{await new Promise(u=>{ei({format:t.responseDataFormat,url:t.url,method:t.method,data:t.data,headers:t.headers,withCredentials:t.withCredentials,event:{loadstart:s=>{ul(e.contentLoaderInfo,s)},progress:s=>{sl(e.contentLoaderInfo,s)},loadend:async s=>{await nl(e,s),u()}}})})};class hr{contentLoaderInfo;root;constructor(){this.root=null,this.contentLoaderInfo=new Tc}get content(){return this.contentLoaderInfo.content}get loaderInfo(){return this.contentLoaderInfo}async load(t){if(t.responseDataFormat!=="json")throw new Error("The only format that can be loaded by this function is `json` format.");this.contentLoaderInfo.url=t.url,this.contentLoaderInfo.format=t.responseDataFormat,await rl(this,t)}async loadJSON(t){await lr(this,t)}}const dr=()=>{for(;Ru.length;){const e=Ru.pop(),t=e.$actions;if(!t)continue;const u=e.currentFrame;if(!t.has(u))continue;const s=t.get(u);if(s)for(let n=0;n<s.length;n++)try{s[n].apply(e)}catch(r){console.error(r)}}},fr=()=>{for(;ku.length;){const e=ku.pop(),t=e.$sounds;if(!t)continue;const u=e.currentFrame;if(!t.has(u))continue;const s=t.get(u),n=e.soundTransform;for(let r=0;r<s.length;r++){const a=s[r];a&&(n&&(a.volume=n.volume,a.loopCount=n.loopCount),a.play())}}},al=(e,t=null)=>{if(!t||!t.size)return;const u=e.currentFrame;t.has(u)&&ku.push(e)},br=e=>{e.$canSound&&(e.$canSound=!1,al(e,e.$sounds))},$r=e=>{const t=e.children;for(let u=t.length-1;u>-1;--u){const s=t[u];s&&s.isContainerEnabled&&($r(s),s.isTimelineEnabled&&(br(s),qt(s)))}},il=e=>{$r(e),fr(),dr()},cl=e=>(e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e);class ol{buffer;offset;constructor(){this.buffer=new Float32Array(256),this.offset=0}push(...t){this.buffer.length<this.offset+t.length&&this.resize(t.length);for(let u=0;u<t.length;u++)this.buffer[this.offset++]=t[u]}set(t){this.buffer.length<this.offset+t.length&&this.resize(t.length),this.buffer.set(t,this.offset),this.offset+=t.length}resize(t){const u=new Float32Array(cl(this.offset+t));this.buffer.length&&u.set(this.buffer),this.buffer=u}}const E=new ol,Yt=e=>{let t=2166136261;for(let u=0;u<e.length;++u){let s=e[u]|0;for(let n=0;n<4;n++){const r=s&255;t^=r,t=Math.imul(t,16777619),s>>>=8}}return(t>>>0)%16777216},xs=e=>{switch(e){case"copy":return 0;case"add":return 1;case"alpha":return 2;case"darken":return 3;case"difference":return 4;case"erase":return 5;case"hardlight":return 6;case"invert":return 7;case"layer":return 8;case"lighten":return 9;case"multiply":return 10;case"normal":return 11;case"overlay":return 12;case"screen":return 13;case"subtract":return 14;default:return 11}},xr=(e,t,u,s,n)=>{if(!e.visible){E.push(0);return}const r=e.graphics,a=r.isDrawable;if(!a&&!e.isBitmap){E.push(0);return}const i=qe(e),c=i?C.multiply(u,i):u;if(!de(c[3]+c[7]/255,0,1,0)){c!==u&&C.release(c),E.push(0);return}const d=N(e),l=d?A.multiply(t,d):t,h=ne(r.xMin,r.yMin,r.xMax,r.yMax,l),b=h[0],f=h[1],p=h[2],$=h[3];F(h);const m=Math.ceil(Math.abs(p-b)),R=Math.ceil(Math.abs($-f));switch(!0){case m===0:case R===0:case m===-1/0:case R===-1/0:case m===1/0:case R===1/0:c!==u&&C.release(c),l!==t&&A.release(l),F(h),E.push(0);return}if(0>b+m||0>f+R||b>s||f>n){c!==u&&C.release(c),l!==t&&A.release(l),F(h),E.push(0);return}const S=d&&e.scale9Grid?Math.abs(d[1])<.001&&Math.abs(d[2])<1e-4:!1;if(!e.uniqueKey)if(e.characterId&&e.loaderInfo){const H=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Yt(new Float32Array(H))}`,ee(H)}else e.uniqueKey=e.isBitmap?`${e.instanceId}`:`${Yt(r.buffer)}`;const k=Math.round(Math.sqrt(l[0]*l[0]+l[1]*l[1])*100)/100,D=Math.round(Math.sqrt(l[2]*l[2]+l[3]*l[3])*100)/100;(!e.isBitmap&&!e.cacheKey||e.cacheParams[0]!==k||e.cacheParams[1]!==D||e.cacheParams[2]!==c[7])&&(e.cacheKey=O.generateKeys(k,D,c[7]),e.cacheParams[0]=k,e.cacheParams[1]=D,e.cacheParams[2]=c[7]);const re=e.isBitmap?0:e.cacheKey;if(E.push(1,bn,l[0],l[1],l[2],l[3],l[4],l[5],c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],b,f,p,$,r.xMin,r.yMin,r.xMax,r.yMax,+S,+a,+e.isBitmap,+e.uniqueKey,re),e.$cache&&!e.$cache.has(e.uniqueKey)&&(e.$cache=null),e.$cache?e.$cache.get(`${re}`):O.get(e.uniqueKey,`${re}`))e.$cache||(e.$cache=O.getById(e.uniqueKey),e.$cache.set(e.uniqueKey,!0)),E.push(1);else{if(E.push(0),S){const G=T.rendererScale,V=vu(G,0,0,G,0,0),te=A.multiply(V,d||bt);Et(V);const j=e.parent.concatenatedMatrix.rawData,ue=vu(j[0],j[1],j[2],j[3],j[4]*G-b,j[5]*G-f);A.release(j);const Xe=A.multiply(ue,te),Ye=Xe[4]-(l[4]-b),Sr=Xe[5]-(l[5]-f);Et(Xe);const tt=ne(r.xMin,r.yMin,r.xMax,r.yMax,te),Ts=tt[0],Es=tt[1],Rr=tt[2],kr=tt[3];F(tt);const gt=Math.ceil(Math.abs(Rr-Ts)),mt=Math.ceil(Math.abs(kr-Es)),$e=e.scale9Grid,hu=Math.abs(r.xMax-r.xMin),du=Math.abs(r.yMax-r.yMin),pt=$e.width>0?($e.x-r.xMin)/hu:1e-5,Tt=$e.height>0?($e.y-r.yMin)/du:1e-5,fu=$e.width>0?($e.x+$e.width-r.xMin)/hu:.99999,bu=$e.height>0?($e.y+$e.height-r.yMin)/du:.99999,ys=Math.ceil(hu*G),ws=Math.ceil(du*G);let $u=ys*pt/gt,xu=ws*Tt/mt,gu=(gt-ys*(1-fu))/gt,mu=(mt-ws*(1-bu))/mt;if($u>=gu){const ut=pt/(pt+(1-fu));$u=Math.max(ut-1e-5,0),gu=Math.min(ut+1e-5,1)}if(xu>=mu){const ut=Tt/(Tt+(1-bu));xu=Math.max(ut-1e-5,0),mu=Math.min(ut+1e-5,1)}E.push(te[0],te[1],te[2],te[3],te[4],te[5],ue[0],ue[1],ue[2],ue[3],ue[4]-Ye,ue[5]-Sr,Ts,Es,gt,mt,pt,Tt,$u,xu,fu,bu,gu,mu),Et(ue),Et(te)}const H=a||S?r.buffer:e.$bitmapBuffer;E.push(H.length),E.set(H),O.set(e.uniqueKey,`${re}`,!0),e.$cache&&(e.$cache=null)}if(E.push(xs(e.blendMode)),e.filters?.length){let H=!1;const G=[],V=he(0,0,0,0);for(let j=0;j<e.filters.length;j++){const ue=e.filters[j];if(!ue||!ue.canApplyFilter())continue;ue.$updated&&(H=!0),ue.$updated=!1,ue.getBounds(V);const Xe=ue.toNumberArray();for(let Ye=0;Ye<Xe.length;Ye+=4096)G.push(...Xe.subarray(Ye,Ye+4096))}const te=G.length>0;te&&(E.push(+te,+H,V[0],V[1],V[2],V[3],G.length),E.set(new Float32Array(G))),F(V)}else E.push(0);c!==u&&C.release(c),l!==t&&A.release(l)},Xu=(e,t)=>{const u=N(e),s=u?A.multiply(t,u):t;s!==t&&A.release(s);const n=u&&e.scale9Grid?Math.abs(u[1])<.001&&Math.abs(u[2])<1e-4:!1,r=e.graphics.buffer;E.push(bn,s[0],s[1],s[2],s[3],s[4],s[5],+n,r.length),E.set(r)},ll=new TextEncoder,gr=(e,t,u,s,n)=>{if(!e.visible){E.push(0);return}const r=qe(e),a=r?C.multiply(u,r):u;if(!de(a[3]+a[7]/255,0,1,0)){a!==u&&C.release(a),E.push(0);return}const c=N(e),o=c?A.multiply(t,c):t,d=ne(e.xMin,e.yMin,e.xMax,e.yMax,o),l=d[0],h=d[1],b=d[2],f=d[3];F(d);const p=Math.ceil(Math.abs(b-l)),$=Math.ceil(Math.abs(f-h));switch(!0){case p===0:case $===0:case p===-1/0:case $===-1/0:case p===1/0:case $===1/0:a!==u&&C.release(a),o!==t&&A.release(o),F(d),E.push(0);return}if(0>l+p||0>h+$||l>s||h>n){a!==u&&C.release(a),o!==t&&A.release(o),F(d),E.push(0);return}if(!e.uniqueKey)if(e.characterId&&e.loaderInfo){const D=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Yt(new Float32Array(D))}`,ee(D)}else e.uniqueKey=`${e.instanceId}`;const m=Math.round(Math.sqrt(o[0]*o[0]+o[1]*o[1])*100)/100,R=Math.round(Math.sqrt(o[2]*o[2]+o[3]*o[3])*100)/100;(e.changed&&!e.cacheKey||e.cacheParams[0]!==m||e.cacheParams[1]!==R||e.cacheParams[2]!==a[7])&&(e.cacheKey=O.generateKeys(m,R,a[7]),e.cacheParams[0]=m,e.cacheParams[1]=R,e.cacheParams[2]=a[7]);const S=e.cacheKey;E.push(1,za,o[0],o[1],o[2],o[3],o[4],o[5],a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],l,h,b,f,e.xMin,e.yMin,e.xMax,e.yMax,+e.uniqueKey,S,+e.changed),e.$cache&&!e.$cache.has(e.uniqueKey)&&(e.$cache=null);const k=e.$cache?e.$cache.get(`${S}`):O.get(e.uniqueKey,`${S}`);if(!k||e.changed){E.push(0,+k);const D=ll.encode(JSON.stringify(e.$textData));switch(E.push(D.length),E.set(D),e.autoSize){case"center":E.push(0);break;case"left":E.push(1);break;case"none":E.push(2);break;case"right":E.push(3);break}E.push(e.stopIndex,e.scrollX,e.scrollY,e.textWidth,e.textHeight,Math.abs(e.xMax-e.xMin),Math.abs(e.yMax-e.yMin),e.focusIndex,e.selectIndex,+e.focusVisible,e.thickness,e.thicknessColor,+e.wordWrap,+e.border,e.borderColor,+e.background,e.backgroundColor,e.defaultTextFormat.color||0,e.defaultTextFormat.size||0),k||O.set(e.uniqueKey,`${S}`,!0),e.$cache&&(e.$cache=null)}else e.$cache||(e.$cache=O.getById(e.uniqueKey),e.$cache.set(e.uniqueKey,!0)),E.push(1);if(E.push(xs(e.blendMode)),e.filters?.length){let D=!1;const re=[],ce=he(0,0,0,0);for(let G=0;G<e.filters.length;G++){const V=e.filters[G];if(!V||!V.canApplyFilter())continue;V.$updated&&(D=!0),V.$updated=!1,V.getBounds(ce);const te=V.toNumberArray();for(let j=0;j<te.length;j+=4096)re.push(...te.subarray(j,j+4096))}const H=re.length>0;H&&(E.push(+H,+D,ce[0],ce[1],ce[2],ce[3],re.length),E.set(new Float32Array(re))),F(ce)}else E.push(0);a!==u&&C.release(a),o!==t&&A.release(o)},mr=(e,t,u,s,n,r)=>{if(!e.visible||!e.$videoElement||!e.$offscreenCanvas||!e.loaded){E.push(0);return}const a=qe(e),i=a?C.multiply(s,a):s;if(!de(i[3]+i[7]/255,0,1,0)){i!==s&&C.release(i),E.push(0);return}const o=N(e),d=o?A.multiply(u,o):u,l=ne(0,0,e.videoWidth,e.videoHeight,d),h=l[0],b=l[1],f=l[2],p=l[3];F(l);const $=Math.ceil(Math.abs(f-h)),m=Math.ceil(Math.abs(p-b));switch(!0){case $===0:case m===0:case $===-1/0:case m===-1/0:case $===1/0:case m===1/0:i!==s&&C.release(i),d!==u&&A.release(d),E.push(0);return}if(0>h+$||0>b+m||h>n||b>r){i!==s&&C.release(i),d!==u&&A.release(d),E.push(0);return}if(!e.uniqueKey)if(e.characterId&&e.loaderInfo){const S=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Yt(new Float32Array(S))}`,ee(S)}else e.uniqueKey=`${e.instanceId}`;E.push(1,Ga,d[0],d[1],d[2],d[3],d[4],d[5],i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],h,b,f,p,0,0,e.videoWidth,e.videoHeight,+e.uniqueKey,+e.changed),e.$cache&&!e.$cache.has(e.uniqueKey)&&(e.$cache=null);const R=e.$cache?e.$cache.get("0"):O.get(e.uniqueKey,"0");if(!R||e.changed){E.push(0,+R);const S=e.$context;if(S){const k=e.videoWidth/2,D=e.videoHeight/2;S.save(),S.translate(k,D),S.rotate(Math.PI),S.scale(-1,1),S.drawImage(e.$videoElement,-k,-D,e.videoWidth,e.videoHeight),S.restore(),t.push(e.$offscreenCanvas.transferToImageBitmap())}R||O.set(e.uniqueKey,"0",!0),e.$cache&&(e.$cache=null)}else e.$cache||(e.$cache=O.getById(e.uniqueKey),e.$cache.set(e.uniqueKey,!0)),E.push(1);if(E.push(xs(e.blendMode)),e.filters?.length){let S=!1;const k=[],D=he(0,0,0,0);for(let ce=0;ce<e.filters.length;ce++){const H=e.filters[ce];if(!H||!H.canApplyFilter())continue;H.$updated&&(S=!0),H.$updated=!1,H.getBounds(D);const G=H.toNumberArray();for(let V=0;V<G.length;V+=4096)k.push(...G.subarray(V,V+4096))}const re=k.length>0;re&&(E.push(+re,+S,D[0],D[1],D[2],D[3],k.length),E.set(new Float32Array(k))),F(D)}else E.push(0);i!==s&&C.release(i),d!==u&&A.release(d)},Vs=(e,t,u,s)=>{let n=null;switch(!0){case e.isContainerEnabled:n=ss(e,t);break;case e.isShape:n=uu(e,t);break;case e.isText:n=nu(e,t);break;case e.isVideo:n=su(e,t);break}if(!n)return null;const r=n[0],a=n[2],i=Math.abs(a-r);if(!i)return null;const c=n[1],o=n[3],d=Math.abs(o-c);return!d||0>r+i||0>c+d||r>u||c>s?null:n},Yu=(e,t)=>{const u=N(e),s=u?A.multiply(t,u):t,n=e.children;E.push(fn,n.length);for(let r=0;r<n.length;r++){const a=n[r];if(a&&!a.isMask)switch(!0){case a.isContainerEnabled:Yu(a,s);break;case a.isShape:Xu(a,s);break}}s!==t&&A.release(s)},pr=(e,t,u,s,n,r)=>{if(!e.visible){E.push(0);return}const a=qe(e),i=a?C.multiply(s,a):s;if(!de(i[3]+i[7]/255,0,1,0)){i!==s&&C.release(i),E.push(0);return}const o=e.children;if(!o.length){i!==s&&C.release(i),E.push(0);return}const d=N(e),l=d?A.multiply(u,d):u;if(!l[0]&&!l[1]||!l[2]&&!l[3]){i!==s&&C.release(i),l!==u&&A.release(l),E.push(0);return}E.push(1,fn);const h=e.mask;if(h){const p=Vs(h,l,n,r);if(!p)E.push(0);else switch(E.push(1,p[0],p[1],p[2],p[3]),!0){case h.isContainerEnabled:Yu(h,l);break;case h.isShape:Xu(h,l);break}h.changed=!1}else E.push(0);E.push(o.length);let b=0,f=!0;for(let p=0;p<o.length;++p){const $=o[p];if(!$.isMask){if(E.push($.placeId,$.clipDepth),b&&$.placeId>b&&(b=0,f=!0),!f){$.changed=!1;continue}if($.clipDepth){b=$.clipDepth;const m=Vs($,l,n,r);if(f=!!m,E.push(+f),!m){$.changed=!1;continue}switch(E.push(m[0],m[1],m[2],m[3]),!0){case $.isContainerEnabled:Yu($,l);break;case $.isShape:Xu($,l);break}$.changed=!1;continue}switch(!0){case $.isContainerEnabled:pr($,t,l,i,n,r);break;case $.isShape:xr($,l,i,n,r);break;case $.isText:gr($,l,i,n,r);break;case $.isVideo:mr($,t,l,i,n,r);break}$.changed=!1}}i!==s&&C.release(i),l!==u&&A.release(l)},hl=(e,t,u,s,n,r)=>{switch(E.push(T.backgroundColor),!0){case e.isContainerEnabled:pr(e,t,u,s,n,r);break;case e.isShape:xr(e,u,s,n,r);break;case e.isText:gr(e,u,s,n,r);break;case e.isVideo:mr(e,t,u,s,n,r);break}e.changed=!1},Ws=e=>{e.totalFrames===1||!e.isPlaying||(e.$wait||(++e.currentFrame,e.currentFrame>e.totalFrames&&(e.currentFrame=1)),e.$wait=!1,e.$canSound=!0,e.$canAction=!0,e.$hasTimelineHeadMoved=!0,e.$container=null,br(e),qt(e),Y(e))},Vu=e=>{const t=e.$container;if(t)for(let u=0;t.length>u;++u){const s=t[u];s.isTimelineEnabled&&Ws(s),Vu(s)}else{const u=[],s=e.children;for(let n=0;s.length>n;++n){const r=s[n];r.isContainerEnabled&&(r.isTimelineEnabled&&Ws(r),Vu(r),u.push(r))}e.$container=u}},dl=()=>{Vu(T),fr(),dr()};class fl extends is{_$ready;stageWidth;stageHeight;frameRate;rendererScale;rendererWidth;rendererHeight;_$backgroundColor;constructor(){super(),this.stageWidth=0,this.stageHeight=0,this.frameRate=1,this.rendererScale=1,this.rendererWidth=0,this.rendererHeight=0,this._$ready=!1,this._$backgroundColor=-1}get backgroundColor(){return this._$backgroundColor}set backgroundColor(t){this._$backgroundColor=t==="transparent"?-1:parseInt(t.replace("#",""),16)}get pointer(){return ft}set ready(t){!t||this._$ready||(this._$ready=t,il(this))}addChild(t){return fe.add(t.instanceId),super.addChild(t),ke.set(t,t),t}$ticker(){dl()}$generateRenderQueue(t,u,s,n){hl(t,u,s,n,this.rendererWidth,this.rendererHeight)}$mouseHit(t,u,s){He(this,t,u,s,!0)}}const T=new fl;fe.add(T.instanceId);const wu={command:"resize",buffer:null},Hs=[],Wu=(e=!0)=>{wu.buffer=new Float32Array([w.rendererWidth,w.rendererHeight,e?1:0]),Hs[0]=wu.buffer.buffer,Me.postMessage(wu,Hs)},zs=window.devicePixelRatio||1,gs=()=>{ze.x=0,ze.y=0;const e=xt();if(!e)return;const t=e.children[0];!t||t.localName!=="canvas"||(ze.x=(e.clientWidth-T.rendererWidth/zs)/2,ze.y=(e.clientHeight-T.rendererHeight/zs)/2)},ou=()=>{const e=xt();if(!e)return;const t=e.parentElement;if(!t)return;const u=w.fullScreen||t.tagName==="BODY"?window.innerWidth:t.clientWidth,s=w.fullScreen||t.tagName==="BODY"?window.innerHeight:t.clientHeight,n=e.style;if(n.width=`${u}px`,n.height=`${s}px`,!T.stageWidth||!T.stageHeight)return;const r=Math.min(u/T.stageWidth,s/T.stageHeight)*Ge,a=w.fullScreen?window.innerWidth*Ge:T.stageWidth*r|0,i=w.fullScreen?window.innerHeight*Ge:T.stageHeight*r|0;a===w.screenWidth&&i===w.screenHeight||(w.screenWidth=u,w.screenHeight=s,T.changed=!0,e.children.length>1&&e.children[1].dispatchEvent(new Event(`${es}_blur`)),gs(),!(a===w.rendererWidth&&i===w.rendererHeight)&&(T.rendererScale=w.rendererScale=r,T.rendererWidth=w.rendererWidth=a,T.rendererHeight=w.rendererHeight=i,ct[0]=ct[3]=r,ct[4]=(w.rendererWidth-T.stageWidth*r)/2,ct[5]=(w.rendererHeight-T.stageHeight*r)/2,O.reset(),Wu(),T.hasEventListener(g.RESIZE)&&T.dispatchEvent(new g(g.RESIZE))))},bl=new Float32Array([1,1,1,1,0,0,0,0]),rt=[],at={command:"render",buffer:null,length:0,imageBitmaps:null},At=[];Me.addEventListener("message",e=>{if(e.data.message!=="render")return;const t=e.data.buffer;E.buffer.length>t.length||(E.buffer=t)});const Tr=()=>{E.offset=0,At.length=0,rt.length=0,T.$generateRenderQueue(T,rt,ct,bl),E.offset&&(at.buffer=E.buffer,at.length=E.offset,At.push(E.buffer.buffer),at.imageBitmaps=null,rt.length&&(at.imageBitmaps=rt,At.push(...rt)),Me.postMessage(at,At))},Gs={command:"removeCache",buffer:null},Ks=[],Qs=()=>{const e=new Float32Array(O.$removeIds);O.$removeIds.length=0,Gs.buffer=e,Ks[0]=e.buffer,Me.postMessage(Gs,Ks)},Er=e=>{if(w.stopFlag)return;O.$removeIds.length&&Qs();const t=e-w.startTime;t>w.fps&&(w.startTime=e-t%w.fps,T.$ticker(),T.hasEventListener(g.ENTER_FRAME)&&T.dispatchEvent(new g(g.ENTER_FRAME)),T.changed&&Tr(),O.$removeCache&&(O.removeTimerScheduledCache(),O.$removeIds.length&&Qs())),w.timerId=requestAnimationFrame(u=>{Er(u)})},$l=()=>{w.stopFlag&&(w.stopFlag=!1,T.changed=!0,w.timerId>-1&&cancelAnimationFrame(w.timerId),w.fps=1e3/T.frameRate|0,w.startTime=performance.now(),w.timerId=requestAnimationFrame(e=>{Er(e)}))},xl=()=>{w.timerId>-1&&cancelAnimationFrame(w.timerId),w.stopFlag=!0,w.timerId=-1,Je.stopAll()},gl=e=>{const t=Fe();if(t){t.keyDown(e);return}T.hasEventListener(B.KEY_DOWN)&&(Ue(e),T.dispatchEvent(new B(B.KEY_DOWN)))},ml=e=>{Fe()||T.hasEventListener(B.KEY_UP)&&(Ue(e),T.dispatchEvent(new B(B.KEY_UP)))},pl=()=>{window.addEventListener(B.KEY_DOWN,gl),window.addEventListener(B.KEY_UP,ml)};class Tl{rendererWidth;rendererHeight;screenWidth;screenHeight;rendererScale;fixedWidth;fixedHeight;stopFlag;startTime;fps;tagId;_$fullScreen;timerId;mouseState;constructor(){this.rendererWidth=0,this.rendererHeight=0,this.rendererScale=1,this.screenWidth=0,this.screenHeight=0,this.stopFlag=!0,this.startTime=0,this.fps=16,this.timerId=-1,this.mouseState="up",this.fixedWidth=0,this.fixedHeight=0,this.tagId="",this._$fullScreen=!1,pl()}get fullScreen(){return this._$fullScreen}set fullScreen(t){this._$fullScreen!==t&&(this._$fullScreen=t,ou())}play(){$l()}stop(){xl()}cacheClear(){O.reset(),Me.postMessage({command:"cacheClear"})}setOptions(t=null){t&&(this.fixedWidth=t.width||this.fixedWidth,this.fixedHeight=t.height||this.fixedHeight,this.tagId=t.tagId||this.tagId,this._$fullScreen=!!t.fullScreen,t.bgColor&&(T.backgroundColor=t.bgColor))}}const w=new Tl;let Zs="auto";const ms=()=>{w.stopFlag||(Q.x=T.pointer.x,Q.y=T.pointer.y,Q.pointer="auto",Q.hit=null,pu.beginPath(),pu.setTransform(1,0,0,1,0,0),T.$mouseHit(pu,dt,Q),w.mouseState==="up"&&Zs!==Q.pointer&&(nn().style.cursor=Zs=Q.pointer))},ps=e=>{let t=window.scrollX,u=window.scrollY;const s=xt();if(s){const c=s.getBoundingClientRect();t+=c.left,u+=c.top}const n=e.target;if(n){const c=n.getBoundingClientRect();t+=c.left,u+=c.top}const r=(w.rendererWidth-T.stageWidth*w.rendererScale)/2,a=(w.rendererHeight-T.stageHeight*w.rendererScale)/2,i=w.rendererScale/Ge;T.pointer.x=(e.pageX-t)/i-r/w.rendererScale,T.pointer.y=(e.pageY-u)/i-a/w.rendererScale},El=()=>{const e=Q.hit,t=Fe();t&&(!e||t.instanceId!==e.instanceId)&&(t.focus=!1,ks(null)),e?(e.isText&&(e.focus?setTimeout(()=>{ie.focus()},300):(e.focus=!0,ks(e)),e.setFocusIndex(Q.x-dt[4],Q.y-dt[5])),e.willTrigger(M.POINTER_DOWN)&&e.dispatchEvent(new M(M.POINTER_DOWN))):T.willTrigger(M.POINTER_DOWN)&&T.dispatchEvent(new M(M.POINTER_DOWN))},yl=()=>{const e=Q.hit;e?e.willTrigger(M.DOUBLE_CLICK)&&e.dispatchEvent(new M(M.DOUBLE_CLICK)):T.willTrigger(M.DOUBLE_CLICK)&&T.dispatchEvent(new M(M.DOUBLE_CLICK))};let Js,vt=!1;const wl=e=>{const t=e.target;t&&(w.mouseState="down",t.setPointerCapture(e.pointerId),Ue(e),ps(e),ms(),Q.hit&&e.preventDefault(),clearTimeout(Js),vt?(vt=!1,yl()):(vt=!0,Js=setTimeout(()=>{vt=!1},300),El()))},Ml=()=>{const e=T.dropTarget,t=Q.hit;t?(t.willTrigger(M.POINTER_UP)&&t.dispatchEvent(new M(M.POINTER_UP)),e&&e.instanceId!==t.instanceId&&e.willTrigger(M.POINTER_UP)&&e.dispatchEvent(new M(M.POINTER_UP))):e&&e.willTrigger(M.POINTER_UP)?e.dispatchEvent(new M(M.POINTER_UP)):T.willTrigger(M.POINTER_UP)&&T.dispatchEvent(new M(M.POINTER_UP))},js=e=>{const t=e.target;t&&(w.mouseState="up",t.releasePointerCapture(e.pointerId),Ue(e),ps(e),ms(),Ml())},Al=()=>{const e=T.dropTarget;if(e){const n=e.parent?e.parent.globalToLocal(T.pointer):e.globalToLocal(T.pointer);let r=0,a=0;e.$lockCenter?(r=n.x-e.width/2,a=n.y-e.height/2):(r=n.x+e.$offsetX,a=n.y+e.$offsetY);const i=e.$boundedRect;i&&(r=Lt(r,i.left,i.right),a=Lt(a,i.top,i.bottom)),e.x=r,e.y=a}const t=Fe();if(t&&w.mouseState==="down"){t.setFocusIndex(Q.x-dt[4],Q.y-dt[5],!0);return}const u=an(),s=Q.hit;s?(s.willTrigger(M.POINTER_MOVE)&&s.dispatchEvent(new M(M.POINTER_MOVE)),u?u.instanceId!==s.instanceId&&(u.willTrigger(M.POINTER_OUT)&&u.dispatchEvent(new M(M.POINTER_OUT)),s.willTrigger(M.POINTER_OVER)&&s.dispatchEvent(new M(M.POINTER_OVER))):s.willTrigger(M.POINTER_OVER)&&s.dispatchEvent(new M(M.POINTER_OVER)),Ms(s)):(u&&(u.willTrigger(M.POINTER_OUT)&&u.dispatchEvent(new M(M.POINTER_OUT)),Ms(null)),T.hasEventListener(M.POINTER_MOVE)&&T.dispatchEvent(new M(M.POINTER_MOVE)))},vl=e=>{e.target&&(Ue(e),ps(e),ms(),Q.hit&&e.preventDefault(),Al())},Il=e=>{Ue(e);const t=an();t&&t.willTrigger(M.POINTER_LEAVE)&&(e.preventDefault(),t.dispatchEvent(new M(M.POINTER_LEAVE)))},Sl=e=>{Ue(e);const t=Q.hit;if(t&&t.isText&&t.scrollEnabled){e.preventDefault(),e.deltaX&&(t.scrollX+=e.deltaX/(t.textWidth/t.width)),e.deltaY&&(t.scrollY+=e.deltaY/(t.textHeight/t.height));return}T.willTrigger(Ke.WHEEL)&&(e.preventDefault(),T.dispatchEvent(new Ke(Ke.WHEEL)))},Rl=e=>{const t=()=>{m0();const u=$0();for(let s=0;s<u.length;++s){const n=u[s];n&&(n.muted=!1)}u.length=0,e.removeEventListener(M.POINTER_UP,t)};e.addEventListener(M.POINTER_UP,t),e.addEventListener(M.POINTER_DOWN,wl,{passive:!1}),e.addEventListener(M.POINTER_UP,js),e.addEventListener(M.POINTER_CANCEL,js),e.addEventListener(M.POINTER_MOVE,vl,{passive:!1}),e.addEventListener(M.POINTER_LEAVE,Il),e.addEventListener(Ke.WHEEL,Sl)},lu=document.createElement("canvas");Fr(lu);Cr(lu,Ge);Rl(lu);Nr(lu);const Hu={Event:g,EventDispatcher:je,EventPhase:We,FocusEvent:De,HTTPStatusEvent:St,IOErrorEvent:Re,PointerEvent:M,JobEvent:xe,ProgressEvent:X,VideoEvent:oe};Object.entries(Hu).forEach(([e,t])=>{Object.defineProperty(Hu,e,{get(){return t}})});const zu={Sprite:cs,MovieClip:Xt,BitmapData:Ne,BlendMode:sa,DisplayObject:ru,DisplayObjectContainer:is,FrameLabel:Un,Graphics:y,InteractiveObject:as,Loader:hr,Shape:$t,stage:T};Object.entries(zu).forEach(([e,t])=>{Object.defineProperty(zu,e,{get(){return t}})});const Gu={BevelFilter:zt,BlurFilter:Gt,ColorMatrixFilter:Kt,ConvolutionFilter:Qt,DisplacementMapFilter:Zt,DropShadowFilter:Jt,GlowFilter:jt,GradientBevelFilter:eu,GradientGlowFilter:tu};Object.entries(Gu).forEach(([e,t])=>{Object.defineProperty(Gu,e,{get(){return t}})});const Ku={ColorTransform:C,Matrix:A,Point:J,Rectangle:be};Object.entries(Ku).forEach(([e,t])=>{Object.defineProperty(Ku,e,{get(){return t}})});const Qu={Sound:iu,SoundMixer:Je,SoundTransform:F0,Video:qu};Object.entries(Qu).forEach(([e,t])=>{Object.defineProperty(Qu,e,{get(){return t}})});class yr{requestHeaders;url;contentType;data;method;responseDataFormat;withCredentials;constructor(t=""){this.url=`${t}`,this.contentType="application/json",this.data=null,this.method="GET",this.requestHeaders=[],this.responseDataFormat="json",this.withCredentials=!1}get headers(){const t=[];return t.push({name:"Content-Type",value:this.contentType}),this.requestHeaders.length&&t.push(...this.requestHeaders),t}}const Zu={URLRequest:yr};Object.entries(Zu).forEach(([e,t])=>{Object.defineProperty(Zu,e,{get(){return t}})});const Ju={TextFormat:se,TextField:Uu};Object.entries(Ju).forEach(([e,t])=>{Object.defineProperty(Ju,e,{get(){return t}})});const ju={Easing:_e,Tween:hs};Object.entries(ju).forEach(([e,t])=>{Object.defineProperty(ju,e,{get(){return t}})});const wr=()=>{const e=xt();if(e)for(;e.firstChild;)e.removeChild(e.firstChild)},Mr=()=>{const e=xt();if(!e)return;const t=nn();t&&(e.appendChild(t),e.appendChild(ie))},Ar=()=>{T.ready=!0,Tr(),w.play(),T.changed=!1},kl=()=>{const e=document.createElement("div");if(Or(e),e.id=es,e.tabIndex=-1,!w.tagId)document.body.appendChild(e);else{const t=document.getElementById(w.tagId);if(!t)return alert(`Element not found with tag ID: ${w.tagId}`),e;t.appendChild(e)}return e},Ol=(e,t=0,u=0)=>{let s="";if(s+="display:flex;",s+="align-items:center;",s+="justify-content:center;",s+="background-color:transparent;",s+="overflow:hidden;",s+="padding:0;",s+="margin:0;",s+="user-select:none;",s+="outline:none;",t&&u)s+=`width:${t}px;`,s+=`height:${u}px;`;else{const n=e.parentElement;if(!n)throw new Error("parent element is null.");n.tagName==="BODY"?(s+=`width:${window.innerWidth}px;`,s+=`height:${window.innerHeight}px;`):(s+=`width:${n.clientWidth}px;`,s+=`height:${n.clientHeight}px;`)}e.setAttribute("style",s)},Fl=e=>{const t=`${es}_loading`;e.innerHTML=`<style>
666
666
  #${t} {
667
667
  width: 50px;
668
668
  height: 50px;
@@ -681,4 +681,4 @@ void main() {
681
681
  }
682
682
  }
683
683
  </style>
684
- <div id="${t}"></div>`};let en=-1;const Ll=()=>{window.addEventListener("resize",()=>{cancelAnimationFrame(en),en=requestAnimationFrame(ou)})},vr=(e=null)=>{M.setOptions(e);const t=kl();Ol(t,M.fixedWidth,M.fixedHeight),Fl(t),!M.fixedWidth&&!M.fixedHeight&&Ll(),ou()},Cl=async(e,t=null)=>{if(e==="develop"){const r=location.search.slice(1).split("&")[0];if(!r)return;e=`${location.origin}/${r}`}if(!e)return;e.charAt(1)==="/"&&(e=e.slice(1)),vr(t);const u=new hr,s=u.contentLoaderInfo;if(s.addEventListener(Re.IO_ERROR,r=>{alert("Error: "+r.text)}),await u.load(new yr(e)),!s.data)return;const n=s.data.stage;T.stageWidth=n.width,T.stageHeight=n.height,T.frameRate=Ct(n.fps,1,60,60),T.backgroundColor=t&&t.bgColor?t.bgColor:n.bgColor,T.addChild(s.content),ou(),Ar(),Mr(),wr(),ms()};let tn=!1;const Nl=(e=240,t=240,u=60,s=null)=>{if(tn)return T.getChildAt(0);tn=!0,T.stageWidth=e|0,T.stageHeight=t|0,T.frameRate=Ct(u,1,60,60),vr(s);const n=T.addChild(new cs);return Ar(),Mr(),wr(),ms(),n},Ee={command:"capture",buffer:null,bgColor:16777215,bgAlpha:0,width:0,height:0,length:0,imageBitmaps:null},It=[],it=[],Pl=async(e,t,u,s,n=0,r=0)=>await new Promise(a=>{if(E.offset=0,It.length=0,it.length=0,T.$generateRenderQueue(e,it,t,u),!E.offset)return a(s);Ee.buffer=E.buffer,Ee.width=s.width,Ee.height=s.height,Ee.bgColor=n,Ee.bgAlpha=r,Ee.length=E.offset,It.push(E.buffer.buffer),Ee.imageBitmaps=null,it.length&&(Ee.imageBitmaps=it,It.push(...it));const i=c=>{if(c.data.message!=="capture")return;const o=c.data.buffer;return E.buffer.length<o.length&&(E.buffer=o),s.getContext("2d").drawImage(c.data.imageBitmap,0,0),we.removeEventListener("message",i),a(s)};we.addEventListener("message",i),we.postMessage(Ee,It)}),Ir=async e=>{switch(!0){case e.isVideo:{const t=e.muted;e.muted=!0,await e.play(),e.pause(),e.muted=t,await new Promise(u=>{const s=async()=>{e.loaded?(e.seek(0),u()):requestAnimationFrame(s)};requestAnimationFrame(s)})}break;case e.isContainerEnabled:{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(!s.isVideo&&!s.isContainerEnabled||await Ir(s))}}break}},Bl=new Float32Array([1,0,0,1,0,0]),Dl=new Float32Array([1,1,1,1,0,0,0,0]),_l=async(e,t=null)=>{t&&t.videoSync&&await Ir(e);const u=t&&t.colorTransform?t.colorTransform.rawData:Dl,s=new Float32Array([1,0,0,1,-e.width/2,-e.height/2]),n=t&&t.matrix?A.multiply(t.matrix.rawData,s):A.multiply(Bl,s),r=t&&t.canvas?t.canvas:O.getCanvas(),a=Math.sqrt(n[0]*n[0]+n[1]*n[1]),i=Math.sqrt(n[2]*n[2]+n[3]*n[3]),c=Math.ceil(e.width*a),o=Math.ceil(e.height*i);if(c<=0||o<=0)return r;n[4]+=c/2,n[5]+=o/2,r.width=c,r.height=o;const d=M.stopFlag;d||M.stop();let l=!1;const h=M.rendererWidth,b=M.rendererHeight,f=M.rendererScale;if(c>h||o>b){l=!0;const p=Math.min(c/T.stageWidth,o/T.stageHeight)*Ge;T.rendererScale=M.rendererScale=p,T.rendererWidth=M.rendererWidth=c,T.rendererHeight=M.rendererHeight=o,Wu(!1)}return await Pl(e,n,u,r,t&&t.bgColor?parseInt(t.bgColor.replace("#",""),16):0,t&&t.bgAlpha?t.bgAlpha:0),l&&(T.rendererScale=M.rendererScale=f,T.rendererWidth=M.rendererWidth=h,T.rendererHeight=M.rendererHeight=b,Wu(!1)),d||M.play(),A.release(n),t&&t.colorTransform&&L.release(u),r};class Ul{display;events;filters;geom;media;net;text;ui;_$promise;constructor(){this.display=zu,this.events=Hu,this.filters=Gu,this.geom=Ku,this.media=Qu,this.net=Zu,this.text=Ju,this.ui=ju,this._$promise=new Promise(t=>{document.readyState==="loading"?window.addEventListener("DOMContentLoaded",()=>t(),{once:!0}):t()})}async load(t,u=null){await Promise.all([this._$promise]),await Cl(t,u)}async createRootMovieClip(t=240,u=240,s=60,n=null){return await Promise.all([this._$promise]),Nl(t,u,s,n)}async captureToCanvas(t,u=null){return await _l(t,u)}}"next2d"in window||(console.log("%c Next2D Player %c 2.12.0 %c https://next2d.app","color: #fff; background: #5f5f5f","color: #fff; background: #4bc729",""),window.next2d=new Ul);
684
+ <div id="${t}"></div>`};let en=-1;const Cl=()=>{window.addEventListener("resize",()=>{cancelAnimationFrame(en),en=requestAnimationFrame(ou)})},vr=(e=null)=>{w.setOptions(e);const t=kl();Ol(t,w.fixedWidth,w.fixedHeight),Fl(t),!w.fixedWidth&&!w.fixedHeight&&Cl(),ou()},Ll=async(e,t=null)=>{if(e==="develop"){const r=location.search.slice(1).split("&")[0];if(!r)return;e=`${location.origin}/${r}`}if(!e)return;e.charAt(1)==="/"&&(e=e.slice(1)),vr(t);const u=new hr,s=u.contentLoaderInfo;if(s.addEventListener(Re.IO_ERROR,r=>{alert("Error: "+r.text)}),await u.load(new yr(e)),!s.data)return;const n=s.data.stage;T.stageWidth=n.width,T.stageHeight=n.height,T.frameRate=Lt(n.fps,1,60,60),T.backgroundColor=t&&t.bgColor?t.bgColor:n.bgColor,T.addChild(s.content),ou(),Ar(),wr(),Mr(),gs()};let tn=!1;const Nl=(e=240,t=240,u=60,s=null)=>{if(tn)return T.getChildAt(0);tn=!0,T.stageWidth=e|0,T.stageHeight=t|0,T.frameRate=Lt(u,1,60,60),vr(s);const n=T.addChild(new cs);return Ar(),wr(),Mr(),gs(),n},Ee={command:"capture",buffer:null,bgColor:16777215,bgAlpha:0,width:0,height:0,length:0,imageBitmaps:null},It=[],it=[],Pl=async(e,t,u,s,n=0,r=0)=>await new Promise(a=>{if(E.offset=0,It.length=0,it.length=0,T.$generateRenderQueue(e,it,t,u),!E.offset)return a(s);Ee.buffer=E.buffer,Ee.width=s.width,Ee.height=s.height,Ee.bgColor=n,Ee.bgAlpha=r,Ee.length=E.offset,It.push(E.buffer.buffer),Ee.imageBitmaps=null,it.length&&(Ee.imageBitmaps=it,It.push(...it));const i=c=>{if(c.data.message!=="capture")return;const o=c.data.buffer;return E.buffer.length<o.length&&(E.buffer=o),s.getContext("2d").drawImage(c.data.imageBitmap,0,0),Me.removeEventListener("message",i),a(s)};Me.addEventListener("message",i),Me.postMessage(Ee,It)}),Ir=async e=>{switch(!0){case e.isVideo:{const t=e.muted;e.muted=!0,await e.play(),e.pause(),e.muted=t,await new Promise(u=>{const s=async()=>{e.loaded?(e.seek(0),u()):requestAnimationFrame(s)};requestAnimationFrame(s)})}break;case e.isContainerEnabled:{const t=e.children;for(let u=0;u<t.length;++u){const s=t[u];s&&(!s.isVideo&&!s.isContainerEnabled||await Ir(s))}}break}},Bl=new Float32Array([1,0,0,1,0,0]),Dl=new Float32Array([1,1,1,1,0,0,0,0]),_l=async(e,t=null)=>{t&&t.videoSync&&await Ir(e);const u=t&&t.colorTransform?t.colorTransform.rawData:Dl,s=new Float32Array([1,0,0,1,-e.width/2,-e.height/2]),n=t&&t.matrix?A.multiply(t.matrix.rawData,s):A.multiply(Bl,s),r=t&&t.canvas?t.canvas:O.getCanvas(),a=Math.sqrt(n[0]*n[0]+n[1]*n[1]),i=Math.sqrt(n[2]*n[2]+n[3]*n[3]),c=Math.ceil(e.width*a),o=Math.ceil(e.height*i);if(c<=0||o<=0)return r;n[4]+=c/2,n[5]+=o/2,r.width=c,r.height=o;const d=w.stopFlag;d||w.stop();let l=!1;const h=w.rendererWidth,b=w.rendererHeight,f=w.rendererScale;if(c>h||o>b){l=!0;const p=Math.min(c/T.stageWidth,o/T.stageHeight)*Ge;T.rendererScale=w.rendererScale=p,T.rendererWidth=w.rendererWidth=c,T.rendererHeight=w.rendererHeight=o,Wu(!1)}return await Pl(e,n,u,r,t&&t.bgColor?parseInt(t.bgColor.replace("#",""),16):0,t&&t.bgAlpha?t.bgAlpha:0),l&&(T.rendererScale=w.rendererScale=f,T.rendererWidth=w.rendererWidth=h,T.rendererHeight=w.rendererHeight=b,Wu(!1)),d||w.play(),A.release(n),t&&t.colorTransform&&C.release(u),r};class Ul{display;events;filters;geom;media;net;text;ui;_$promise;constructor(){this.display=zu,this.events=Hu,this.filters=Gu,this.geom=Ku,this.media=Qu,this.net=Zu,this.text=Ju,this.ui=ju,this._$promise=new Promise(t=>{document.readyState==="loading"?window.addEventListener("DOMContentLoaded",()=>t(),{once:!0}):t()})}async load(t,u=null){await Promise.all([this._$promise]),await Ll(t,u)}async createRootMovieClip(t=240,u=240,s=60,n=null){return await Promise.all([this._$promise]),Nl(t,u,s,n)}async captureToCanvas(t,u=null){return await _l(t,u)}}"next2d"in window||(console.log("%c Next2D Player %c 2.13.0 %c https://next2d.app","color: #fff; background: #5f5f5f","color: #fff; background: #4bc729",""),window.next2d=new Ul);