@next2d/player 2.5.1 → 2.6.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.
- package/next2d.js +67 -62
- package/package.json +28 -28
- 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,mt=()=>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 Nc=t=>{rt=Math.min(4096,t/2)};let de=4;const kc=t=>{de=t};let c;const Pc=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},Dc=(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)},vs=[],Se=(t=0,e=0,s=0,n=0,o=0,r=0,a=0,l=0,h=0)=>{const f=vs.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},Xc=t=>{vs.push(t)},Ms=[],St=(t=0,e=0,s=0,n=0,o=0,r=0)=>{const a=Ms.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=>{Ms.push(t)},we=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 Se(t[4]*e,0-t[1]*e,0,0-t[3]*e,t[0]*e,0,s*e,n*e,1)};let xs=0,Rs=0;const it=()=>xs,ut=()=>Rs,_c=(t,e)=>{xs=t,Rs=e},Yc=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 ys=1;const Gc=t=>{ys=t},gt=()=>ys,Vc=(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],M=e[5];return St(s*h+o*f,n*h+r*f,s*i+o*E,n*i+r*E,s*$+o*M+a,n*$+r*M+l)},gs=(t=!1)=>{const e=t?4:10;if(V.length<e){V.length=0;return}be.push(V.slice(0)),V.length=0},V=he(),be=he(),wt=(t=!1)=>(gs(t),be),zc=()=>{for(V.length=0;be.length;)Dc(be.pop())},Bt=(t,e,s)=>{V.push(t,e,s)},Zt=(t,e)=>{const s=V.length,n=+V[s-3],o=+V[s-2];return t===n&&e===o},$e=(t,e)=>{if(!V.length){Bt(t,e,!1);return}Zt(t,e)||(gs(),Bt(t,e,!1))},Wc=(t,e)=>{V.length||$e(t,e),!Zt(t,e)&&Bt(t,e,!1)},Os=(t,e,s,n)=>{V.length||$e(0,0),!Zt(s,n)&&(Bt(t,e,!0),Bt(s,n,!1))},jc=()=>{if(V.length<7)return;const t=+V[0],e=+V[1];Zt(t,e)||Bt(t,e,!1)},F=new Float32Array(32),Be=(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,M=(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-M,F[h+6]=i,F[h+7]=E,F[f]=i,F[f+1]=E,F[f+2]=i+$,F[f+3]=E+M,F[f+4]=(o+a)*.5,F[f+5]=(r+l)*.5,F[f+6]=a,F[f+7]=l},Ee=(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},Hc=(t,e,s,n,o,r,a,l)=>(Be(t,e,s,n,o,r,a,l,0,16),Be(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],0,8),Be(F[16],F[17],F[18],F[19],F[20],F[21],F[22],F[23],16,24),Ee(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],0),Ee(F[8],F[9],F[10],F[11],F[12],F[13],F[14],F[15],8),Ee(F[16],F[17],F[18],F[19],F[20],F[21],F[22],F[23],16),Ee(F[24],F[25],F[26],F[27],F[28],F[29],F[30],F[31],24),F),Qt=(t,e,s,n,o,r)=>{if(V.length||$e(0,0),Zt(o,r))return;const a=V.length,l=+V[a-3],h=+V[a-2],f=Hc(l,h,t,e,s,n,o,r);for(let i=0;32>i;)Os(f[i++],f[i++],f[i++],f[i++])},Kc=(t,e,s)=>{const n=s,o=s*.5522847498307936;Qt(t+n,e+o,t+o,e+n,t,e+n),Qt(t-o,e+n,t-n,e+o,t-n,e),Qt(t-n,e-o,t-o,e-n,t,e-n),Qt(t+o,e-n,t+n,e-o,t+n,e)},Zc=(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)},Qc=(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},Jc=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)},Mt=[],qc=t=>{if(!(Mt.indexOf(t)>-1)){if(Mt.length>10){c.deleteRenderbuffer(t.resource);return}t.dirty=!0,Mt.push(t)}};let tn=0;const ms=(t,e)=>({id:tn++,resource:c.createTexture(),width:t,height:e,area:t*e,smooth:!1});let It=-1;const Fs=t=>{It=t},Ie=[null,null,null],en=()=>{const t=ms(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 sn=0;const cn=()=>({id:sn++,width:0,height:0,clipLevel:0,msaa:!1,mask:!1,color:null,texture:null,stencil:null}),nn=()=>{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}},on=t=>{if(!ht.length)return nn();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},rn=(t,e)=>{t=Math.max(256,fe(t)),e=Math.max(256,fe(e));const s=on(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,de,c.RGBA8,t,e),c.bindRenderbuffer(c.RENDERBUFFER,s.stencil.resource),c.renderbufferStorageMultisample(c.RENDERBUFFER,de,c.STENCIL_INDEX8,t,e)),s.dirty=!0,s};let an=0;const ln=()=>({id:an++,resource:c.createRenderbuffer(),width:0,height:0,area:0,dirty:!1}),un=(t,e)=>{if(!Mt.length)return ln();for(let s=0;s<Mt.length;++s){const n=Mt[s];if(!(n.width!==t||n.height!==e))return Mt.splice(s,1),n}return Mt.shift()},hn=(t,e)=>{const s=un(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},fn=(t,e=!1)=>{It!==c.TEXTURE0&&(Fs(c.TEXTURE0),c.activeTexture(c.TEXTURE0)),Ie[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)},Jt=(t,e,s=!1)=>{const n=ms(t,e);return fn(n,s),n},W=(t,e,s=!1)=>{const n=Ce.length?Ce.shift():cn();return n.width=t,n.height=e,s?(n.msaa=!0,n.texture=null,n.color=rn(t,e),n.stencil=n.color.stencil):(n.msaa=!1,n.texture=Jt(t,e),n.color=null,n.stencil=hn(t,e)),n.mask=!1,n.clipLevel=0,n};let qt=0;const Ot=t=>{qt=t},Lt=()=>qt,Te=[],bn=()=>Te,$n=t=>{Te[qt]=t},En=()=>(qt in Te||$n(W(rt,rt,!0)),Te[qt]),te=[];let Le=null;const ds=()=>(Le||(Le=en()),Le),ee=[],Ss=t=>(t in ee||(ee[t]=new Float32Array([Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE])),ee[t]),se=[],ws=t=>(t in se||(se[t]=new Float32Array([Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE])),se[t]),Tn=()=>{for(let t=0;t<ee.length;++t){const e=ee[t];e&&(e[0]=e[1]=Number.MAX_VALUE,e[2]=e[3]=-Number.MAX_VALUE)}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)}};let Bs=0;const Is=t=>{Bs=t},Ls=()=>Bs,Ce=[];let ft;const An=t=>{ft=t.createFramebuffer()};let Cs=null;const vn=t=>{Cs=t.createFramebuffer()};let Ae=null;const Mn=t=>{Ae=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,Ae);const e=ds();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 Ns=null;const ks=t=>{Ns=t},Ps=()=>Ns;let Us=!1;const Ne=t=>{Us=t},Ds=()=>Us;let Xs=null,_s=null,Ys=null,Gs=null;const xn=t=>{_s=t.createFramebuffer(),Xs=t.createFramebuffer(),Ys=t.createFramebuffer(),Gs=t.createBuffer(),t.bindBuffer(t.PIXEL_PACK_BUFFER,Gs)},Rn=()=>Xs,Vs=()=>_s,yn=()=>Ys,z=(t,e=!0)=>{t.msaa?(Jc(t.color),t.color=null,t.stencil=null):(e&&D(t.texture),t.texture=null,qc(t.stencil),t.stencil=null),Ce.push(t)},gn=()=>{ks(null),Ds()&&(Ne(!1),c.bindFramebuffer(c.FRAMEBUFFER,null))},On=()=>{te.length=0,Ot(0);const t=bn();for(let e=0;e<t.length;e++)z(t[e]);t.length=0},pn=(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&&On(),gn(),t.$mainAttachmentObject=W(e,s,!0),t.bind(t.$mainAttachmentObject)},mn=(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)&&(Fs(e),c.activeTexture(e));const o=Ie[t];o!==null&&s!==null&&o.id===s.id||s===o||(Ie[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)))},G=(t,e=!1)=>{st(2,c.TEXTURE2,null),st(1,c.TEXTURE1,null),st(0,c.TEXTURE0,t,e)},Fn=t=>{ks(t),Ds()||(Ne(!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)):(G(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 zs=!1;const ve=t=>{zs=t},Pe=()=>zs,ce=new Map,ne=new Map,dn=t=>{!t&&Pe()?(ve(!1),c.disable(c.STENCIL_TEST),c.disable(c.SCISSOR_TEST)):t&&!Pe()&&(ve(!0),c.enable(c.STENCIL_TEST),ke())},Sn=(t,e)=>{const s=Ps();if(s&&e.id===s.id)return;Fn(e),(!s||s.width!==e.width||s.height!==e.height)&&(_c(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)),dn(e.mask)},wn=t=>{t.$stack.push(Se(...t.$matrix))},Bn=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],Xc(e)},In=(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},Ln=(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+$},Cn=t=>{t.globalAlpha=1,t.globalCompositeOperation="normal",t.imageSmoothingEnabled=!1},Nn=t=>{t.$fillStyle.fill(1),t.$strokeStyle.fill(1)},Ws=(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)},kn=()=>{c.disable(c.SCISSOR_TEST)},Pn=(t,e,s,n,o,r,a,l,h,f,i,E,$)=>{const M=t.length-5;for(let T=3;T<M;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,M=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=Pn(t[L],I,d,i,M,E,T,$,u,n,o,r,a);return{buffer:I,indexCount:d}},Un=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t);let oe=new Float32Array(128),Ct=0;const Dn=()=>oe,Xn=()=>Ct,Nt=t=>{const e=t.length+Ct;if(e>oe.length){const s=new Float32Array(Un(e));s.set(oe),s.set(t,Ct),oe=s}else oe.set(t,Ct);Ct+=t.length},q=[],bt=[],js=()=>{bt.length=0,Ct=0,q.length=0},_n=t=>{const e=wt();if(!e.length)return;bt.push(t);const s=Me(e);Nt(s.buffer),q.push(s.indexCount)},tt=[],Yn=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=Me(a);Nt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},Gn=(t,e,s)=>{const n=Math.sqrt(t*t+e*e);return{x:-(e/n)*s,y:t/n*s}},Vn=(t,e,s)=>{const n={x:e.x-t.x,y:e.y-t.y},o=Gn(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}),zn=(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]]},Wn=(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}),Hn=(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)}),Kn=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}},Hs=(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=Hn(l,t,e,s),i=Kn({x:-f.y,y:f.x});r.push({x:h.x+i.x*n,y:h.y+i.y*n})}return r},Zn=(t,e,s,n)=>{const o=Wn(t,e,s,5),r=[],a=[];for(let E=0;E<o.length;++E){const[$,M,T]=o[E];r.push(Hs($,M,T,+n)),a.push(Hs($,M,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[$,M,T]=f[E];f[E]=[T,M,$]}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},kt=(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},Pt=new OffscreenCanvas(1,1).getContext("2d"),Ut=(t,e)=>{Pt.beginPath(),Pt.moveTo(e[0],e[1]);for(let s=3;s<e.length;s+=3)e[s+2]?(Pt.quadraticCurveTo(e[s],e[s+1],e[s+3],e[s+4]),s+=3):Pt.lineTo(e[s],e[s+1]);Pt.closePath();for(let s=0;s<t.length;s+=2){const n=t[s],o=t[s+1];if(!Pt.isPointInPath(n,o))return[n,o]}return null},Ks=(t,e,s,n,o=!1)=>{const r=o?0:n.length-1,a=o?n.length-1:n.length-2,l=kt(t,e,s,n[r]),h=kt(t,e,s,n[a]),f=Ut(l,n[a]);if(!f)return;const i=Ut(h,n[r]);if(!i)return;const E=Math.atan2(f[1]-e,f[0]-t);let M=Math.atan2(i[1]-e,i[0]-t)-E;M>Math.PI?M-=2*Math.PI:M<-Math.PI&&(M+=2*Math.PI);const T=8,u=M/T,g=[t,e,!1];for(let I=0;I<=T;I++){const d=E+I*u,L=t+s*Math.cos(d),m=e+s*Math.sin(d);g.push(L,m,!1)}n.splice(-1,0,g)},Zs=(t,e,s,n,o=!1)=>{const r=o?0:n.length-1,a=o?n.length-1:n.length-2,l=kt(t,e,s,n[r]),h=kt(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=Ut(l,n[a]);if(!f)return;const i=Ut(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,M=16,T=($-E)/M,u=[];for(let g=0;g<=M;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)}},Jn=(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,M=o+e*E,T=r+e*$,u=-$,g=E,I=[M+e*E+e*u,T+e*$+e*g,!1,M+e*E-e*u,T+e*$-e*g,!1,M-e*E-e*u,T-e*$-e*g,!1,M+e*E+e*u,T+e*$+e*g,!1,M-e*E-e*u,T-e*$-e*g,!1,M-e*E+e*u,T-e*$+e*g,!1];n===0?s.unshift(I):s.push(I)}},Qs=(t,e,s,n,o,r=!1)=>{const a=r?0:o.length-1,l=r?o.length-1:o.length-2,h=kt(t.x,t.y,n,o[a]),f=kt(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=Ut(h,o[l]);if(!i)return;const E=Ut(f,o[a]);if(!E)return;const $=e.x-t.x,M=e.y-t.y,T=Math.hypot($,M),u={x:$/T,y:M/T},g=s.x-t.x,I=s.y-t.y,d=Math.hypot(g,I),L={x:g/d,y:I/d},m=u.x,R=u.y,x=L.x,S=L.y,w=m*S-R*x;w===0&&o.splice(-1,0,[t.x,t.y,!1,i[0],i[1],!1,E[0],E[1],!1]);const p=((E[0]-i[0])*S-(E[1]-i[1])*x)/w,O=i[0]+p*m,y=i[1]+p*R;o.splice(-1,0,[t.x,t.y,!1,i[0],i[1],!1,O,y,!1,t.x,t.y,!1,E[0],E[1],!1,O,y,!1])},qn=(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(Zn(s,n,o,e)):a.push(Vn(s,o,e)),a.length>1)switch(A.joints){case 0:Zs(s.x,s.y,e,a);break;case 1:r.x=t[l-6],r.y=t[l-5],Qs(s,o,r,e,a);break;case 2:Ks(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:Zs(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],Qs(s,o,r,e,a,!0);break;case 2:Ks(s.x,s.y,e,a,!0);break}else switch(A.caps){case 1:Qn(t,e,a);break;case 2:Jn(t,e,a);break}return a},De=t=>{const e=A.thickness/2,s=[];for(let n=0;n<t.length;++n){const o=qn(t[n],e);s.push(...o)}return Me(s,"stroke")},to=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=De(a);Nt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},Dt=new Map,Js=()=>{Dt.clear()},eo=t=>{Dt.set(q.length,t)},xe=()=>({id:no(),resource:c.createVertexArray(),vertexBuffer:c.createBuffer(),vertexLength:0});let Xe;const $t=t=>{Xe&&Xe.id===t.id||(Xe=t,c.bindVertexArray(t.resource))},so=()=>{const t=xe();$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};let co=0;const no=()=>co++,Re=[],ct=new Float32Array([0,0,0,1,1,0,1,1]);let _e;const oo=t=>{_e=t.createBuffer()};let qs;const ro=t=>{qs=t};let Ye;const ye=()=>(Ye||(Ye=so()),Ye),ao=()=>{if(Re.length)return Re.pop();const t=xe();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},tc=()=>{const t=ao();$t(t);const e=Dn(),s=Xn();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},ec=t=>{Re.indexOf(t)>-1||Re.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 sc=-1;const ho=t=>{sc!==t.id&&(sc=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),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,mt=()=>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 kc=t=>{rt=Math.min(4096,t/2)};let Fe=4;const Nc=t=>{Fe=t};let c;const Pc=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},Dc=(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)},vs=[],de=(t=0,e=0,s=0,n=0,o=0,r=0,a=0,l=0,h=0)=>{const f=vs.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},Xc=t=>{vs.push(t)},Ms=[],St=(t=0,e=0,s=0,n=0,o=0,r=0)=>{const a=Ms.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=>{Ms.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 xs=0,ys=0;const it=()=>xs,ut=()=>ys,_c=(t,e)=>{xs=t,ys=e},Yc=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 Gc=t=>{Rs=t},gt=()=>Rs,Vc=(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],M=e[5];return St(s*h+o*f,n*h+r*f,s*i+o*E,n*i+r*E,s*$+o*M+a,n*$+r*M+l)},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;)Dc(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,M=(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-M,F[h+6]=i,F[h+7]=E,F[f]=i,F[f+1]=E,F[f+2]=i+$,F[f+3]=E+M,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)},Mt=[],tn=t=>{if(!(Mt.indexOf(t)>-1)){if(Mt.length>10){c.deleteRenderbuffer(t.resource);return}t.dirty=!0,Mt.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 Le=t=>{Ss=t},ws=()=>Ss;let Bs=null,Ls=null,Is=null,Cs=null;const nn=t=>{Ls=t.createFramebuffer(),Bs=t.createFramebuffer(),Is=t.createFramebuffer(),Cs=t.createBuffer(),t.bindBuffer(t.PIXEL_PACK_BUFFER,Cs)},on=()=>Bs,ks=()=>Ls,rn=()=>Is,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(!Mt.length)return $n();for(let s=0;s<Mt.length;++s){const n=Mt[s];if(!(n.width!==t||n.height!==e))return Mt.splice(s,1),n}return Mt.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 Lt=-1;const Ps=t=>{Lt=t},Ie=[null,null,null],vn=(t,e=!1)=>{Lt!==c.TEXTURE0&&(Ps(c.TEXTURE0),c.activeTexture(c.TEXTURE0)),Ie[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 vn(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},Mn=()=>{Fs(null),ws()&&(Le(!1),c.bindFramebuffer(c.FRAMEBUFFER,null))},xn=()=>{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(Lt!==-1?Lt:c.TEXTURE0),t};let te=0;const pt=t=>{te=t},It=()=>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 Us=()=>(Ce||(Ce=xn()),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(),Mn(),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)=>{(Lt===-1||e!==Lt)&&(Ps(e),c.activeTexture(e));const o=Ie[t];o!==null&&s!==null&&o.id===s.id||s===o||(Ie[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()||(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)):(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)&&(_c(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))},Ln=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],Xc(e)},In=(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)},zs=(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)},Un=(t,e,s,n,o,r,a,l,h,f,i,E,$)=>{const M=t.length-5;for(let T=3;T<M;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},ve=(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,M=l[1]/f,T=l[4]/f,u=l[7]/f;let g=0;for(let I=0;I<t.length;++I)g+=(t[I].length/3-2)*51;const L=new Float32Array(g);let d=0;for(let I=0;I<t.length;++I)d=Un(t[I],L,d,i,M,E,T,$,u,n,o,r,a);return{buffer:L,indexCount:d}},Dn=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 Xn=()=>re,_n=()=>Ct,kt=t=>{const e=t.length+Ct;if(e>re.length){const s=new Float32Array(Dn(e));s.set(re),s.set(t,Ct),re=s}else re.set(t,Ct);Ct+=t.length},q=[],bt=[],Ws=()=>{bt.length=0,Ct=0,q.length=0},Yn=t=>{const e=wt();if(!e.length)return;bt.push(t);const s=ve(e);kt(s.buffer),q.push(s.indexCount)},tt=[],Gn=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=ve(a);kt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},Vn=(t,e,s)=>{const n=Math.sqrt(t*t+e*e);return{x:-(e/n)*s,y:t/n*s}},zn=(t,e,s)=>{const n={x:e.x-t.x,y:e.y-t.y},o=Vn(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]},Pe=(t,e,s)=>({x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}),Wn=(t,e,s,n=.5)=>{const o=Pe(t,e,n),r=Pe(e,s,n),a=Pe(o,r,n);return[[t,o,a],[a,r,s]]},jn=(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=Wn(h[0],h[1],h[2],.5);a.push(f[0],f[1])}o=a}return o},Hn=(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}),Kn=(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)}),Zn=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}},js=(t,e,s,n)=>{const o=[0,.5,1],r=[];for(let a=0;a<o.length;++a){const l=o[a],h=Hn(l,t,e,s),f=Kn(l,t,e,s),i=Zn({x:-f.y,y:f.x});r.push({x:h.x+i.x*n,y:h.y+i.y*n})}return r},Qn=(t,e,s,n)=>{const o=jn(t,e,s,5),r=[],a=[];for(let E=0;E<o.length;++E){const[$,M,T]=o[E];r.push(js($,M,T,+n)),a.push(js($,M,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[$,M,T]=f[E];f[E]=[T,M,$]}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},Pt=new OffscreenCanvas(1,1).getContext("2d"),Ut=(t,e)=>{Pt.beginPath(),Pt.moveTo(e[0],e[1]);for(let s=3;s<e.length;s+=3)e[s+2]?(Pt.quadraticCurveTo(e[s],e[s+1],e[s+3],e[s+4]),s+=3):Pt.lineTo(e[s],e[s+1]);Pt.closePath();for(let s=0;s<t.length;s+=2){const n=t[s],o=t[s+1];if(!Pt.isPointInPath(n,o))return[n,o]}return null},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]),f=Ut(l,n[a]);if(!f)return;const i=Ut(h,n[r]);if(!i)return;const E=Math.atan2(f[1]-e,f[0]-t);let M=Math.atan2(i[1]-e,i[0]-t)-E;M>Math.PI?M-=2*Math.PI:M<-Math.PI&&(M+=2*Math.PI);const T=8,u=M/T,g=[t,e,!1];for(let L=0;L<=T;L++){const d=E+L*u,I=t+s*Math.cos(d),O=e+s*Math.sin(d);g.push(I,O,!1)}n.splice(-1,0,g)},Ks=(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=Ut(l,n[a]);if(!f)return;const i=Ut(h,n[r]);i&&n.splice(-1,0,[t,e,!1,f[0],f[1],!1,i[0],i[1],!1,t,e,!1])},Jn=(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,M=16,T=($-E)/M,u=[];for(let g=0;g<=M;g++){const L=$+T*g,d=o+e*Math.cos(L),I=r+e*Math.sin(L);u.push(d,I,!1)}n===0?s.unshift(u):s.push(u)}},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.sqrt(h*h+f*f);if(i===0)continue;const E=h/i,$=f/i,M=o+e*E,T=r+e*$,u=-$,g=E,L=[M+e*E+e*u,T+e*$+e*g,!1,M+e*E-e*u,T+e*$-e*g,!1,M-e*E-e*u,T-e*$-e*g,!1,M+e*E+e*u,T+e*$+e*g,!1,M-e*E-e*u,T-e*$-e*g,!1,M-e*E+e*u,T-e*$+e*g,!1];n===0?s.unshift(L):s.push(L)}},Zs=(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=Ut(h,o[l]);if(!i)return;const E=Ut(f,o[a]);if(!E)return;const $=e.x-t.x,M=e.y-t.y,T=Math.hypot($,M),u={x:$/T,y:M/T},g=s.x-t.x,L=s.y-t.y,d=Math.hypot(g,L),I={x:g/d,y:L/d},O=u.x,y=u.y,x=I.x,S=I.y,w=O*S-y*x;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])*x)/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])},to=(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(Qn(s,n,o,e)):a.push(zn(s,o,e)),a.length>1)switch(A.joints){case 0:Ks(s.x,s.y,e,a);break;case 1:r.x=t[l-6],r.y=t[l-5],Zs(s,o,r,e,a);break;case 2:Hs(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:Ks(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],Zs(s,o,r,e,a,!0);break;case 2:Hs(s.x,s.y,e,a,!0);break}else switch(A.caps){case 1:Jn(t,e,a);break;case 2:qn(t,e,a);break}return a},Ue=t=>{const e=A.thickness/2,s=[];for(let n=0;n<t.length;++n){const o=to(t[n],e);s.push(...o)}return ve(s,"stroke")},eo=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push(t===0?"linear":"radial");const l=Ue(a);kt(l.buffer),q.push(l.indexCount),tt.push(e,s,n,o),t===1&&tt.push(r)},Dt=new Map,Qs=()=>{Dt.clear()},so=t=>{Dt.set(q.length,t)},Me=()=>({id:crypto.randomUUID(),resource:c.createVertexArray(),vertexBuffer:c.createBuffer(),vertexLength:0});let De;const $t=t=>{De&&De.id===t.id||(De=t,c.bindVertexArray(t.resource))},co=()=>{const t=Me();$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},xe=[],ct=new Float32Array([0,0,0,1,1,0,1,1]);let Xe;const no=t=>{Xe=t.createBuffer()};let Js;const oo=t=>{Js=t};let _e;const ye=()=>(_e||(_e=co()),_e),ro=()=>{if(xe.length)return xe.pop();const t=Me();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},qs=()=>{const t=ro();$t(t);const e=Xn(),s=_n();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},tc=t=>{xe.indexOf(t)>-1||xe.push(t)};let ao=0;const lo=(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:ao++,resource:s}},io=(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 ec=-1;const uo=t=>{ec!==t.id&&(ec=t.id,c.useProgram(t.resource))},ho=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=lo(e,s),this._$uniformMap=new Map,io(this._$programObject.resource,this._$uniformMap,n)}useProgram(){uo(this._$programObject)}bindUniform(){ho(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,fo=()=>\`
|
|
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
|
-
}
|
|
5
|
+
}\`,bo=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
|
-
}
|
|
43
|
+
}\`,$o=()=>"layout (location = 1) in vec2 a_bezier;",Eo=()=>\`layout (location = 3) in vec3 a_matrix0;
|
|
44
44
|
layout (location = 4) in vec3 a_matrix1;
|
|
45
|
-
layout (location = 5) in vec3 a_matrix2;\`,
|
|
45
|
+
layout (location = 5) in vec3 a_matrix2;\`,To=()=>"out vec2 v_uv;",Ao=()=>"out vec2 v_bezier;",vo=()=>\`
|
|
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;",vo=()=>"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;\`,
|
|
56
|
+
v_uv = (inverse_matrix * uv_matrix * vec3(a_vertex, 1.0)).xy;\`,Mo=()=>"v_bezier = a_bezier;",xo=()=>"layout (location = 2) in vec4 a_color;",yo=()=>"out vec4 v_color;",Ro=()=>"v_color = a_color;",Re=(t,e,s,n)=>{const o=s?$o():"",r=s?Ao():e?To():"",a=s?Mo():e?vo():"",l=n?bo(e?5:0):fo(),h=s?"":xo(),f=s?"":yo(),i=s?"":Ro(),E=n?"":Eo(),$=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,7 +71,7 @@ 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
|
-
}\`},
|
|
74
|
+
}\`},go=()=>\`#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;
|
|
@@ -98,7 +98,7 @@ void main() {
|
|
|
98
98
|
|
|
99
99
|
vec4 src = texture(u_texture, uv);
|
|
100
100
|
o_color = src;
|
|
101
|
-
}\`,
|
|
101
|
+
}\`,Oo=()=>\`#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
|
-
}\`,
|
|
115
|
+
}\`,Fo=()=>\`#version 300 es
|
|
116
116
|
precision mediump float;
|
|
117
117
|
|
|
118
118
|
in vec2 v_bezier;
|
|
@@ -130,21 +130,26 @@ void main() {
|
|
|
130
130
|
} else {
|
|
131
131
|
discard;
|
|
132
132
|
}
|
|
133
|
-
}\`,
|
|
133
|
+
}\`,So=()=>\`#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
|
-
}\`,
|
|
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),Fo());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 sc="normal";const cc=t=>{sc=t},nc=()=>sc;let oc=600;const xt=t=>{oc=t},yt=()=>oc,j=()=>{yt()!==613&&(xt(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(go(),So());return Et.set(t,e),e},wo=()=>{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)},Bo=()=>{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=qs();let f=oe.get(t.clipLevel),i=0,E=null;const $=q.length;for(let M=0;M<$;M++){c.stencilMask(1<<f-1);const T=q[M];Dt.has(M)&&(E=Dt.get(M));const g=ae(!!E);E&&le(g,E),nt(g,h,i,T),i+=T,++f,f>7&&(wo(),f=t.clipLevel+1)}oe.set(t.clipLevel,f),tc(h),Ws(),Qs(),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)},Io=(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 Io(this,e,s,n,o)}create(e,s,n,o,r){return new Ge(e,s,n,o,r)}}class Co{_$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 rc=(t,e)=>{const s=It();ee[s]||(ee[s]=new Co(s,rt,rt));const o=ee[s].insert(t,e);return o||(pt(s+1),rc(t,e))},ko=t=>{const e=ee[t.index];e&&e.dispose(t.x,t.y,t.w,t.h)},Ve=()=>\`
|
|
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
|
-
}\`,
|
|
142
|
-
src.rgb /= max(0.0001, src.a);
|
|
143
|
-
src = clamp(src * mul + add, 0.0, 1.0);
|
|
144
|
-
src.rgb *= src.a;\`,lc=t=>\`
|
|
141
|
+
}\`,ac=t=>\`
|
|
145
142
|
vec4 mul = u_mediump[\${t}];
|
|
146
143
|
vec4 add = u_mediump[\${t+1}];
|
|
147
|
-
|
|
144
|
+
|
|
145
|
+
if (mul.x != 1.0 || mul.y != 1.0 || mul.z != 1.0 || mul.w != 1.0
|
|
146
|
+
|| add.x != 0.0 || add.y != 0.0 || add.z != 0.0
|
|
147
|
+
) {
|
|
148
|
+
src.rgb /= max(0.0001, src.a);
|
|
149
|
+
src = clamp(src * mul + add, 0.0, 1.0);
|
|
150
|
+
src.rgb *= src.a;
|
|
151
|
+
}
|
|
152
|
+
\`,lc=t=>{const e=t?"uniform vec4 u_mediump[2];":"",s=t?ac(0):"";return\`#version 300 es
|
|
148
153
|
precision mediump float;
|
|
149
154
|
|
|
150
155
|
uniform sampler2D u_texture;
|
|
@@ -157,7 +162,7 @@ void main() {
|
|
|
157
162
|
vec4 src = texture(u_texture, v_coord);
|
|
158
163
|
\${s}
|
|
159
164
|
o_color = src;
|
|
160
|
-
}\`},
|
|
165
|
+
}\`},No=()=>\`#version 300 es
|
|
161
166
|
precision mediump float;
|
|
162
167
|
|
|
163
168
|
uniform sampler2D u_texture;
|
|
@@ -171,15 +176,15 @@ void main() {
|
|
|
171
176
|
vec4 src = texture(u_texture, v_coord);
|
|
172
177
|
|
|
173
178
|
if (v_mul.x != 1.0 || v_mul.y != 1.0 || v_mul.z != 1.0 || v_mul.w != 1.0
|
|
174
|
-
|| v_add.x != 0.0 || v_add.y != 0.0 || v_add.z != 0.0
|
|
179
|
+
|| v_add.x != 0.0 || v_add.y != 0.0 || v_add.z != 0.0
|
|
175
180
|
) {
|
|
176
181
|
src.rgb /= max(0.0001, src.a);
|
|
177
182
|
src = clamp(src * v_mul + v_add, 0.0, 1.0);
|
|
178
183
|
src.rgb *= src.a;
|
|
179
184
|
}
|
|
180
|
-
|
|
185
|
+
|
|
181
186
|
o_color = src;
|
|
182
|
-
}\`,
|
|
187
|
+
}\`,Po=t=>(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t);class Uo{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 Uo;class Do 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
|
|
183
188
|
|
|
184
189
|
layout (location = 0) in vec2 a_vertex;
|
|
185
190
|
|
|
@@ -190,7 +195,7 @@ void main() {
|
|
|
190
195
|
|
|
191
196
|
vec2 position = a_vertex * 2.0 - 1.0;
|
|
192
197
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
193
|
-
}\`,
|
|
198
|
+
}\`,Xo=()=>\`#version 300 es
|
|
194
199
|
|
|
195
200
|
layout (location = 0) in vec2 a_vertex;
|
|
196
201
|
uniform vec4 u_highp[3];
|
|
@@ -216,7 +221,7 @@ void main() {
|
|
|
216
221
|
|
|
217
222
|
position = position * 2.0 - 1.0;
|
|
218
223
|
gl_Position = vec4(position.x, -position.y, 0.0, 1.0);
|
|
219
|
-
}\`,
|
|
224
|
+
}\`,_o=()=>\`#version 300 es
|
|
220
225
|
|
|
221
226
|
layout (location = 0) in vec2 a_vertex;
|
|
222
227
|
uniform vec4 u_highp[2];
|
|
@@ -236,7 +241,7 @@ void main() {
|
|
|
236
241
|
|
|
237
242
|
position = position * 2.0 - 1.0;
|
|
238
243
|
gl_Position = vec4(position.x, -position.y, 0.0, 1.0);
|
|
239
|
-
}\`,
|
|
244
|
+
}\`,Yo=()=>\`#version 300 es
|
|
240
245
|
|
|
241
246
|
layout (location = 0) in vec2 a_vertex;
|
|
242
247
|
layout (location = 1) in vec4 a_rect;
|
|
@@ -269,10 +274,10 @@ void main() {
|
|
|
269
274
|
|
|
270
275
|
position = position * 2.0 - 1.0;
|
|
271
276
|
gl_Position = vec4(position.x, -position.y, 0.0, 1.0);
|
|
272
|
-
}\`,ot=new Map,ze=()=>{if(ot.has("i"))return ot.get("i");const e=new
|
|
277
|
+
}\`,ot=new Map,ze=()=>{if(ot.has("i"))return ot.get("i");const e=new Do(Yo(),No());return ot.set("i",e),e},Go=()=>\`
|
|
273
278
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
274
279
|
return src + dst - dst * src.a;
|
|
275
|
-
}\`,
|
|
280
|
+
}\`,Vo=()=>\`
|
|
276
281
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
277
282
|
if (src.a == 0.0) { return dst; }
|
|
278
283
|
if (dst.a == 0.0) { return src; }
|
|
@@ -287,14 +292,14 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
287
292
|
c.rgb *= c.a;
|
|
288
293
|
|
|
289
294
|
return a + b + c;
|
|
290
|
-
}\`,
|
|
295
|
+
}\`,zo=()=>\`
|
|
291
296
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
292
297
|
vec4 a = src - src * dst.a;
|
|
293
298
|
vec4 b = dst - dst * src.a;
|
|
294
299
|
vec4 c = src * dst;
|
|
295
300
|
|
|
296
301
|
return a + b + c;
|
|
297
|
-
}\`,
|
|
302
|
+
}\`,Wo=()=>\`
|
|
298
303
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
299
304
|
if (src.a == 0.0) { return dst; }
|
|
300
305
|
if (dst.a == 0.0) { return src; }
|
|
@@ -309,7 +314,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
309
314
|
c.rgb *= c.a;
|
|
310
315
|
|
|
311
316
|
return a + b + c;
|
|
312
|
-
}\`,
|
|
317
|
+
}\`,jo=()=>\`
|
|
313
318
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
314
319
|
if (src.a == 0.0) { return dst; }
|
|
315
320
|
if (dst.a == 0.0) { return src; }
|
|
@@ -324,7 +329,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
324
329
|
c.rgb *= c.a;
|
|
325
330
|
|
|
326
331
|
return a + b + c;
|
|
327
|
-
}\`,
|
|
332
|
+
}\`,Ho=()=>\`
|
|
328
333
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
329
334
|
if (src.a == 0.0) { return dst; }
|
|
330
335
|
if (dst.a == 0.0) { return src; }
|
|
@@ -342,7 +347,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
342
347
|
c.rgb *= c.a;
|
|
343
348
|
|
|
344
349
|
return a + b + c;
|
|
345
|
-
}\`,
|
|
350
|
+
}\`,Ko=()=>\`
|
|
346
351
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
347
352
|
if (src.a == 0.0) { return dst; }
|
|
348
353
|
if (dst.a == 0.0) { return src; }
|
|
@@ -360,7 +365,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
360
365
|
c.rgb *= c.a;
|
|
361
366
|
|
|
362
367
|
return a + b + c;
|
|
363
|
-
}\`,
|
|
368
|
+
}\`,Zo=()=>\`
|
|
364
369
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
365
370
|
if (src.a == 0.0) { return dst; }
|
|
366
371
|
if (dst.a == 0.0) { return src; }
|
|
@@ -375,7 +380,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
375
380
|
c.rgb *= c.a;
|
|
376
381
|
|
|
377
382
|
return a + b + c;
|
|
378
|
-
}\`,
|
|
383
|
+
}\`,Qo=()=>\`
|
|
379
384
|
vec4 blend (in vec4 src, in vec4 dst) {
|
|
380
385
|
if (src.a == 0.0) { return dst; }
|
|
381
386
|
if (dst.a == 0.0) { return src; }
|
|
@@ -384,7 +389,7 @@ vec4 blend (in vec4 src, in vec4 dst) {
|
|
|
384
389
|
vec4 c = vec4(src.a - dst.rgb * src.a, src.a);
|
|
385
390
|
|
|
386
391
|
return b + c;
|
|
387
|
-
}\`,
|
|
392
|
+
}\`,Jo=(t,e)=>{let s;switch(t){case"subtract":s=Vo();break;case"multiply":s=zo();break;case"lighten":s=Wo();break;case"darken":s=jo();break;case"overlay":s=Ho();break;case"hardlight":s=Ko();break;case"difference":s=Zo();break;case"invert":s=Qo();break;default:s=Go();break}const n="uniform vec4 u_mediump[2];",o=ac(0);return\`#version 300 es
|
|
388
393
|
precision mediump float;
|
|
389
394
|
|
|
390
395
|
uniform sampler2D u_textures[2];
|
|
@@ -400,7 +405,7 @@ void main() {
|
|
|
400
405
|
vec4 src = texture(u_textures[1], v_coord);
|
|
401
406
|
\${o}
|
|
402
407
|
o_color = blend(src, dst);
|
|
403
|
-
}\`},
|
|
408
|
+
}\`},ic=(t,e)=>{const s=\`i\${t}y\`;if(ot.has(s))return ot.get(s);const n=new Z(Ot(),Jo(t));return ot.set(s,n),n};let uc=0;const hc=()=>{const t=A.currentAttachmentObject,e=A.atlasAttachmentObject;if(A.bind(e),c.bindFramebuffer(c.DRAW_FRAMEBUFFER,Ee),Le(!1),uc===It()){const s=Ds(It());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(It());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),uc=It()}t&&A.bind(t)},fc=t=>{const e=It();pt(t.index),hc();const s=on();c.bindFramebuffer(c.FRAMEBUFFER,s);const n=Us();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(_o(),lc(!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 bc=(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},$c=(t,e,s,n)=>{const o=A.currentAttachmentObject,r=bc(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&&(xt(610),c.blendFunc(c.ONE,c.ZERO))},Ec=t=>{V(t),Xt();const e=Ft();Tt(e,t.width,t.height),G(e),j()},Tc=(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(Xo(),lc(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()},qo=(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,M=0,T=A.$matrix;switch(A.globalCompositeOperation){case"normal":case"layer":case"add":case"screen":case"alpha":case"erase":case"copy":{if(nc()!==A.globalCompositeOperation||Gs()!==t.index){pt(Gs());const g=A.globalCompositeOperation;A.globalCompositeOperation=nc(),A.drawArraysInstanced(),A.globalCompositeOperation=g,cc(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,$,M),u.count++}break;default:{const u=A.currentAttachmentObject;A.drawArraysInstanced();const g=Math.ceil(Math.abs(n-e)),L=Math.ceil(Math.abs(o-s));let d=0,I=0,O=fc(t);if(T[0]!==1||T[1]!==0||T[3]!==0||T[4]!==1){const w=W(g,L,!1),m=St(T[0],T[1],T[3],T[4],g/2,L/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],I=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||I)&&(T[6]-=d,T[7]-=I);const y=$c(T[6],T[7],g,L),x=W(g,L,!1);A.bind(x),ge(y,O);const S=ic(A.globalCompositeOperation);Tc(S,a,l,h,f,i,E,$,M),G(S),u&&A.bind(u),Ec(x.texture),(d||I)&&(T[6]+=d,T[7]+=I),D(O),D(y),z(x),cc(A.globalCompositeOperation),Ys(t.index),pt(t.index)}break}},tr=()=>{ze().clear()};let We=0;const er=()=>{$t(Js),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))},sr=t=>{t.useProgram(),t.bindUniform(),er(),c.drawArraysInstanced(c.TRIANGLES,0,6,t.count)},cr=()=>{yt()!==611&&(xt(611),c.blendFunc(c.ONE,c.ONE))},nr=()=>{yt()!==641&&(xt(641),c.blendFunc(c.ONE_MINUS_DST_COLOR,c.ONE))},or=()=>{yt()!==606&&(xt(606),c.blendFunc(c.ZERO,c.SRC_ALPHA))},je=()=>{yt()!==603&&(xt(603),c.blendFunc(c.ZERO,c.ONE_MINUS_SRC_ALPHA))},Ac=t=>{switch(t){case"add":cr();break;case"screen":nr();break;case"alpha":or();break;case"erase":je();break;case"copy":Xt();break;default:j();break}},rr=()=>{const t=ze();t.count&&(hc(),Ac(A.globalCompositeOperation),sr(t),t.clear())},ar=()=>{const t=Me();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},lr=t=>{no(t),oo(ar())},ir=()=>{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)},ur=()=>{c.enable(c.BLEND),j()},hr=()=>{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)))},fr=(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)},br=()=>{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},$r=(t,e)=>{const s=He(t.w,t.h,e),n=Ft();Tt(n,t.w,t.h),j(),G(n),D(s)},Er=(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},Tr=(t,e)=>{const s=Er(t.w,t.h,e),n=Ft();Tt(n,t.w,t.h),j(),G(n),D(s)},Rt=[],Ar=(t,e,s,n,o,r)=>{const a=wt();if(!a.length)return;bt.push("bitmap");const l=ve(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=Ue(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=Ue(t);kt(e.buffer),q.push(e.indexCount)},xr=t=>{const e=t.toFixed(1);return\`#version 300 es
|
|
404
409
|
precision mediump float;
|
|
405
410
|
|
|
406
411
|
uniform sampler2D u_texture;
|
|
@@ -425,7 +430,7 @@ void main() {
|
|
|
425
430
|
color /= samples;
|
|
426
431
|
|
|
427
432
|
o_color = color;
|
|
428
|
-
}\`},Q=new Map,
|
|
433
|
+
}\`},Q=new Map,yr=t=>{const e=\`b\${t}\`;if(Q.has(e))return Q.get(e);const s=new Z(Ot(),xr(t));return Q.set(e,s),s},Rr=(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},vc=(t,e,s)=>{V(t,!0);const n=Math.ceil(s*.5),o=1-(n-s*.5),r=1+s,a=yr(n);Rr(a,t.width,t.height,e,o,r),G(a)},U={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,gr=[.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),$=gr[o-1],M=Math.round(i*$),T=Math.round(E*$);U.x+=M,U.y+=T;const u=t.width+M*2,g=t.height+T*2;let L=1,d=1;i>128?L=.0625:i>64?L=.125:i>32?L=.25:i>16&&(L=.5),E>128?d=.0625:E>64?d=.125:E>32?d=.25:E>16&&(d=.5);const I=Math.ceil(u*L),O=Math.ceil(g*d),y=W(I,O,!1),x=W(I,O,!1),S=[y,x];A.bind(y),A.reset(),A.setTransform(L,0,0,d,M*L,T*d),V(t);const w=pe();me(w,t.width,t.height),G(w),r&&D(t);const m=i*L,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),vc(B,!0,m),B=C.texture}if(n>0){R=(R+1)%2;const C=S[R];A.bind(C),vc(B,!1,p),B=C.texture}}if(j(),L!==1||d!==1){const b=W(u,g,!1);A.bind(b),A.setTransform(1/L,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},pr=()=>\`#version 300 es
|
|
429
434
|
precision mediump float;
|
|
430
435
|
|
|
431
436
|
uniform sampler2D u_texture;
|
|
@@ -445,51 +450,51 @@ void main() {
|
|
|
445
450
|
color.rgb *= color.a;
|
|
446
451
|
|
|
447
452
|
o_color = color;
|
|
448
|
-
}\`,
|
|
453
|
+
}\`,mr=()=>{if(Q.has("m"))return Q.get("m");const e=new Z(Ot(),pr());return Q.set("m",e),e},Or=(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},Fr=(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=mr();Or(o,e),G(o);const r=n.texture;return D(t),z(n,!1),s&&A.bind(s),r},dr=(t,e,s=!1)=>{st(2,c.TEXTURE2,e,s),st(1,c.TEXTURE1,null),st(0,c.TEXTURE0,t,s)},Sr=(t,e,s,n=!1)=>{st(2,c.TEXTURE2,s,n),st(1,c.TEXTURE1,e,n),st(0,c.TEXTURE0,t,n)},wr=()=>{yt()!==670&&(xt(670),c.blendFunc(c.DST_ALPHA,c.ZERO))},Br=()=>{yt()!==673&&(xt(673),c.blendFunc(c.DST_ALPHA,c.ONE_MINUS_SRC_ALPHA))},Lr=t=>\`
|
|
449
454
|
vec2 base_scale = u_mediump[\${t}].xy;
|
|
450
455
|
vec2 base_offset = u_mediump[\${t}].zw;
|
|
451
456
|
|
|
452
457
|
vec2 uv = v_coord * base_scale - base_offset;
|
|
453
458
|
vec4 base = mix(vec4(0.0), texture(u_textures[1], uv), isInside(uv));
|
|
454
|
-
\`,
|
|
459
|
+
\`,Ir=()=>\`
|
|
455
460
|
vec4 blur = texture(u_textures[0], v_coord);
|
|
456
|
-
\`,
|
|
461
|
+
\`,Cr=t=>\`
|
|
457
462
|
vec2 blur_scale = u_mediump[\${t}].xy;
|
|
458
463
|
vec2 blur_offset = u_mediump[\${t}].zw;
|
|
459
464
|
|
|
460
465
|
vec2 st = v_coord * blur_scale - blur_offset;
|
|
461
466
|
vec4 blur = mix(vec4(0.0), texture(u_textures[0], st), isInside(st));
|
|
462
|
-
\`,
|
|
467
|
+
\`,kr=t=>{const e=Math.floor(t/4),s=t%4;return\`
|
|
463
468
|
float strength = u_mediump[\${e}][\${s}];
|
|
464
469
|
blur.a = clamp(blur.a * strength, 0.0, 1.0);
|
|
465
|
-
\`},
|
|
470
|
+
\`},Nr=t=>\`
|
|
466
471
|
vec4 color = u_mediump[\${t}];
|
|
467
472
|
blur = color * blur.a;
|
|
468
|
-
\`,
|
|
473
|
+
\`,Pr=t=>\`
|
|
469
474
|
blur = texture(u_textures[\${t?2:1}], vec2(blur.a, 0.5));
|
|
470
|
-
\`,
|
|
475
|
+
\`,Mc=(t,e,s,n,o,r)=>{const a=t?"blur.a = 1.0 - blur.a;":"",l=s?kr(r):"",h=n?Pr(e):Nr(o);return\`
|
|
471
476
|
\${a}
|
|
472
477
|
\${l}
|
|
473
478
|
\${h}
|
|
474
|
-
\`},
|
|
479
|
+
\`},Ur=()=>\`
|
|
475
480
|
vec4 blur2 = texture(u_textures[0], 1.0 - v_coord);
|
|
476
|
-
\`,
|
|
481
|
+
\`,Dr=()=>\`
|
|
477
482
|
vec2 pq = (1.0 - v_coord) * blur_scale - blur_offset;
|
|
478
483
|
vec4 blur2 = mix(vec4(0.0), texture(u_textures[0], pq), isInside(pq));
|
|
479
|
-
\`,
|
|
484
|
+
\`,Xr=t=>{const e=Math.floor(t/4),s=t%4;return\`
|
|
480
485
|
float strength = u_mediump[\${e}][\${s}];
|
|
481
486
|
highlight_alpha *= strength;
|
|
482
487
|
shadow_alpha *= strength;
|
|
483
|
-
\`},
|
|
488
|
+
\`},_r=t=>\`
|
|
484
489
|
vec4 highlight_color = u_mediump[\${t}];
|
|
485
490
|
vec4 shadow_color = u_mediump[\${t+1}];
|
|
486
491
|
blur = highlight_color * highlight_alpha + shadow_color * shadow_alpha;
|
|
487
|
-
\`,
|
|
492
|
+
\`,Yr=t=>\`
|
|
488
493
|
blur = texture(u_textures[\${t?2:1}], vec2(
|
|
489
494
|
0.5019607843137255 - 0.5019607843137255 * shadow_alpha + 0.4980392156862745 * highlight_alpha,
|
|
490
495
|
0.5
|
|
491
496
|
));
|
|
492
|
-
\`,
|
|
497
|
+
\`,Gr=(t,e,s,n,o,r,a,l,h)=>{let f=0;const i=s?Lr(f++):"",E=n?Cr(f++):Ir(),$=r==="inner",M=f;let T=f*4,u;h?u=o?Mc(!1,s,l,h,M,T):xc(s,n,l,h,M,T):o?(T+=4,u=Mc($,s,l,h,M,T)):(T+=8,u=xc(s,n,l,h,M,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
|
|
493
498
|
precision mediump float;
|
|
494
499
|
|
|
495
500
|
uniform sampler2D u_textures[\${t}];
|
|
@@ -505,7 +510,7 @@ void main() {
|
|
|
505
510
|
\${E}
|
|
506
511
|
\${u}
|
|
507
512
|
o_color = \${g};
|
|
508
|
-
}\`},
|
|
513
|
+
}\`},xc=(t,e,s,n,o,r)=>{const a=e?Dr():Ur(),l=s?Xr(r):"",h=n?Yr(t):_r(o);return\`
|
|
509
514
|
\${a}
|
|
510
515
|
float highlight_alpha = blur.a - blur2.a;
|
|
511
516
|
float shadow_alpha = blur2.a - blur.a;
|
|
@@ -513,7 +518,7 @@ void main() {
|
|
|
513
518
|
highlight_alpha = clamp(highlight_alpha, 0.0, 1.0);
|
|
514
519
|
shadow_alpha = clamp(shadow_alpha, 0.0, 1.0);
|
|
515
520
|
\${h}
|
|
516
|
-
\`},
|
|
521
|
+
\`},Vr=(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 M=1;t&&M++,a&&M++;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(),Gr(M,T,t,e,s,n,o,r,a));return Q.set($,u),u},zr=(t,e,s,n,o,r,a,l,h,f,i,E,$,M,T,u,g,L,d,I,O,y,x,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),x&&(p[R++]=e/l,p[R++]=s/h,p[R++]=f/l,p[R++]=(s-h-i)/h),w||(E?(p[R++]=M,p[R++]=T,p[R++]=u,p[R++]=g):(p[R++]=M,p[R++]=T,p[R++]=u,p[R++]=g,p[R++]=L,p[R++]=d,p[R++]=I,p[R++]=O)),S&&(p[R]=$)},Ke=new Map,Wr=(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+=\`
|
|
517
522
|
if (t <= \${f}) {
|
|
518
523
|
return mix(\${i}, \${E}, (t - \${h}) / (\${f} - \${h}));
|
|
519
524
|
}
|
|
@@ -539,7 +544,7 @@ void main() {
|
|
|
539
544
|
color.rgb *= color.a;
|
|
540
545
|
|
|
541
546
|
o_color = color;
|
|
542
|
-
}\`},yc=(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(
|
|
547
|
+
}\`},yc=(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(),Wr(r,t,e));return Ke.set(o,a),a},jr=(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},Hr=(t,e)=>{const s=Me();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 Kr=(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=Hr(t,e),Ze),Rc=(t,e,s)=>{t.useProgram(),t.bindUniform(),$t(Kr(e,s)),c.drawArrays(c.TRIANGLE_STRIP,0,4)};let Qe=null;const gc=()=>(Qe||(Qe=W(512,1,!1)),Qe);let pc=0;const mc=()=>pc,Zr=t=>{pc=Math.floor(t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)*.75)},Oc=new Float32Array(256),Fc=new Float32Array(256);for(let t=0;t<256;++t){const e=t/255;Oc[t]=Math.pow(e,2.23333333),Fc[t]=e}const Qr=(t,e,s)=>{const n=A.currentAttachmentObject,o=gc();A.bind(o);const r=t.length;Xt();const a=mc();for(let l=0;l<r;l+=a-1){const h=Math.min(l+a,r),f=yc(h-l,!1);jr(f,t,e,s,l,h),Rc(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,$,M,T,u,g=null,L=null,d=null,I=0,O=0,y=0,x=0,S=0,w=0,m=0,p=0)=>{const R=A.currentAttachmentObject,B=W(s,n,!1);A.bind(B);const b=M==="inner",C=g!==null&&L!==null&&d!==null;let N=null;if(C&&(N=Qr(g,L,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?dr(e,N,!0):V(e,!0)}else C&&N?Sr(e,t,N,!0):ge(e,t,!0);const P=!(b||M==="full"&&T),k=!(s===h&&n===f&&i===0&&E===0),Y=u!==1;b?T?wr():Br():Xt();const H=Vr(P,k,$,M,T,Y,C);zr(H,s,n,o,r,a,l,h,f,i,E,$,u,I,O,y,x,S,w,m,p,P,k,Y,C),G(H);const K=B.texture;return z(B,!1),j(),R&&A.bind(R),K},Jr=(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,M=U.x,T=U.y,u=Vt(t,e,o,r,l,!1),g=u.width,L=u.height,d=U.x,I=U.y,O=h?E:g,y=h?$:L,x=d-M,S=I-T,w=h?0:x,m=h?0:S,p=h?-x:0,R=h?-S:0,b=ie(t,u,O,y,E,$,w,m,g,L,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},qr=Math.PI/180,ta=(t,e,s=4,n=45,o=0,r=1,a=4,l=4,h=1,f=1,i=!1,E=!1,$=!1)=>{const M=A.currentAttachmentObject,T=t.width,u=t.height,g=U.x,L=U.y,d=Vt(t,e,a,l,f,!1),I=d.width,O=d.height,y=U.x,x=U.y,S=y-g,w=x-L,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*qr,b=Math.cos(B)*s*(m/R),C=Math.sin(B)*s*(p/R),N=i?T:I+Math.max(0,Math.abs(b)-S),P=i?u:O+Math.max(0,Math.abs(C)-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-C)+K,At=i?b-y:(b>0?Math.max(0,b-S):0)+H,vt=i?C-x:(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,I,O,At,vt,!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),M&&A.bind(M),ue},ea=Math.PI/180,sa=(t,e,s=4,n=45,o=16777215,r=1,a=0,l=1,h=4,f=4,i=1,E=1,$=0,M=!1)=>{const T=t.width,u=t.height,g=U.x,L=U.y,d=Math.sqrt(e[0]*e[0]+e[1]*e[1]),I=Math.sqrt(e[2]*e[2]+e[3]*e[3]),O=gt(),y=n*ea,x=Math.cos(y)*s*(d/O),S=Math.sin(y)*s*(I/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,x*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(x)*2),P=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:P,et=Math.abs(x),lt=Math.abs(S),At=(b-T)/2,vt=(C-u)/2,J=Y?0:et+At,at=Y?0:lt+vt,ue=Y?-At-x:et-x,bs=Y?-vt-S:lt-S,wl=ie(t,B,H,K,T,u,J,at,b,C,ue,bs,!1,k,M,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 U.x=g+J,U.y=L+at,D(t),D(B),wl},ca=Math.PI/180,na=(t,e,s=4,n=45,o,r,a,l=4,h=4,f=1,i=1,E=0,$=!1)=>{const M=t.width,T=t.height,u=U.x,g=U.y,L=Math.sqrt(e[0]*e[0]+e[1]*e[1]),d=Math.sqrt(e[2]*e[2]+e[3]*e[3]),I=gt(),O=n*ca,y=Math.cos(O)*s*(L/I),x=Math.sin(O)*s*(d/I),S=A.currentAttachmentObject,w=W(M,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,x*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(x)*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?M:C,H=k?T:N,K=Math.abs(y),et=Math.abs(x),lt=(B-M)/2,At=(b-T)/2,vt=k?0:K+lt,J=k?0:et+At,at=k?-lt-y:K-y,ue=k?-At-x:et-x,bs=ie(t,R,Y,H,M,T,vt,J,B,b,at,ue,!1,P,$,f,a,o,r,0,0,0,0,0,0,0,0);return U.x=u+vt,U.y=g+J,D(t),D(R),bs},oa=Math.PI/180,ra=(t,e,s=4,n=45,o,r,a,l=4,h=4,f=1,i=1,E=0,$=!1)=>{const M=t.width,T=t.height,u=U.x,g=U.y,L=Vt(t,e,l,h,i,!1),d=L.width,I=L.height,O=U.x,y=U.y,x=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*oa,B=Math.cos(R)*s*(w/p),b=Math.sin(R)*s*(m/p),C=E===1,N=C?M:d+Math.max(0,Math.abs(B)-x),P=C?T:I+Math.max(0,Math.abs(b)-S),k=Math.ceil(N),Y=Math.ceil(P),H=(k-N)/2,K=(Y-P)/2,et=C?0:Math.max(0,x-B)+H,lt=C?0:Math.max(0,S-b)+K,At=C?B-O:(B>0?Math.max(0,B-x):0)+H,vt=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,L,k,Y,M,T,et,lt,d,I,At,vt,!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(L),at},aa=(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 M=f+Math.floor($/4),T=$%4;h+=\`
|
|
543
548
|
result += getWeightedColor(\${$}, u_mediump[\${M}][\${T}]);
|
|
544
549
|
\`}const i=n?"result.a = texture(u_texture, v_coord).a;":"",E=o?"":\`
|
|
545
550
|
vec4 substitute_color = u_mediump[1];
|
|
@@ -581,7 +586,7 @@ void main() {
|
|
|
581
586
|
|
|
582
587
|
result.rgb *= result.a;
|
|
583
588
|
o_color = result;
|
|
584
|
-
}\`},
|
|
589
|
+
}\`},la=(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(),aa(f,t,e,s,n));return Q.set(h,i),i},ia=(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 M=n.length;for(let T=0;T<M;T++)E[$++]=n[T]},ua=(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,M=W(E,$,!1);A.bind(M),A.reset(),A.setTransform(1,0,0,1,0,0),V(t,!0),j();const T=la(e,s,a,l);ia(T,E,$,n,o,r,l,_t(h,f,!1),Yt(h,f,!1),Gt(h,f,!1),f),G(T);const u=M.texture;return D(t),z(M,!1),i&&A.bind(i),u},ha=(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=\`
|
|
585
590
|
vec4 source_color = texture(u_textures[0], uv);
|
|
586
591
|
\`;break;case 3:a=\`
|
|
587
592
|
vec4 source_color =texture(u_textures[0], mix(v_coord, uv, step(abs(uv - vec2(0.5)), vec2(0.5))));
|
|
@@ -614,7 +619,7 @@ void main() {
|
|
|
614
619
|
\${a}
|
|
615
620
|
|
|
616
621
|
o_color = mix(texture(u_textures[0], v_coord), source_color, isInside(st));
|
|
617
|
-
}\`}
|
|
622
|
+
}\`},fa=(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(),ha(o,t,e,s));return Q.set(n,r),r},ba=(t,e,s,n,o,r,a,l,h,f,i,E,$,M)=>{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]=M)},$a=(t,e,s,n=0,o=0,r=0,a=0,l=0,h=0,f=0,i=0,E=2,$=0,M=0)=>{const T=A.currentAttachmentObject,u=gt(),g=Math.sqrt(e[0]*e[0]+e[1]*e[1])/u,L=Math.sqrt(e[2]*e[2]+e[3]*e[3])/u,d=t.width,I=t.height,O=d/g,y=I/L,x=W(d,I,!1);A.bind(x);const S=He(n,o,s);ge(t,S);const w=fa(l,h,E);ba(w,d,I,O,y,r,a,f,i,E,_t($,M,!0),Yt($,M,!0),Gt($,M,!0),M),j(),G(w);const m=x.texture;return T&&A.bind(T),D(t),D(S),z(x,!1),m},Ea=(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]},Ta=(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);Ea(l,e,r,a),V(t),Ac(A.globalCompositeOperation),G(l)}break;default:{const l=$c(s,n,r,a),h=W(r,a,!1);A.bind(h),ge(l,t);const f=ic(A.globalCompositeOperation);Tc(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),Ec(h.texture),D(l),z(h)}break}o&&A.bind(o),j()},dc=[],Oe=t=>{t.size&&t.clear(),dc.push(t)},Aa=()=>dc.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)}},xa=(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)))},ya=(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)},Ra=(t,e,s)=>{const n=t.get(e)||null;return n?(n.delete("trash"),n.get(s)||null):null},ga=(t,e,s,n,o=null)=>{e.has(s)||e.set(s,Aa());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)},pa=(t,e,s="")=>s?t.has(e)?t.get(e).has(s):!1:t.has(e),ma=(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},Oa=(t,e,s,n)=>\`\${t}\${e}\${s}\${n}\`,Fa=(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))},da=(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 Sa{_$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){xa(this._$store,e,s)}removeTimer(e){Fa(this,this._$store,this._$trash,e)}removeTimerScheduledCache(){da(this,this._$trash)}removeById(e){ya(this,this._$store,e)}getById(e){return this._$store.get(e)}get(e,s){return Ra(this._$store,e,s)}set(e,s,n=null){ga(this,this._$store,e,s,n)}has(e,s=""){return pa(this._$store,e,s)}generateKeys(e,s,n){return ma(e,s,n)}generateFilterKeys(e,s,n,o){return Oa(e,s,n,o)}}const _=new Sa,wa=(t,e,s,n,o,r,a,l,h,f,i)=>{const E=A.currentAttachmentObject;let $=null;const M=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,I=0;if(g)d=_.get(e,"offsetX"),I=_.get(e,"offsetY");else{$=fc(t);const O=Math.atan2(a[1],a[0]),y=Math.atan2(-a[2],a[3]),x=r?M*Math.cos(O):Math.cos(O),S=r?M*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(x,S,w,m,n/2,o/2),R=St(1,0,0,1,-t.w/2,-t.h/2),B=Vc(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],I=B[5],V($);const C=pe();me(C,$.width,$.height),G(C),D($),$=b.texture,z(b,!1),E&&A.bind(E)}Kt(B),U.x=0,U.y=0;for(let b=0;i.length>b;)switch(i[b++]){case 0:$=sa($,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:$=Fr($,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,$=ua($,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,$=$a($,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:$=ta($,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:$=Jr($,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,$=na($,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,$=ra($,a,N,P,Y,H,K,i[b++],i[b++],i[b++],i[b++],i[b++],!!i[b++])}break}}if($){const O=gt(),y=f[0]*(M/O),x=f[1]*(T/O);A.reset(),A.setTransform(1,0,0,1,0,0),A.globalCompositeOperation=h,Ta($,l,-d+y+a[4],-I+x+a[5])}g||(_.set(e,"fKey",u),_.set(e,"fTexture",$),_.set(e,"offsetX",d),_.set(e,"offsetY",I)),E&&A.bind(E)},Ba=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)},Ia=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),po());return Et.set(e,s),s},Ca=(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]},ka=(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=Ia(o);n&&Ca(a,n),nt(a,t,e,s)},Na=(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]},Sc=(t,e)=>{const s=A.currentAttachmentObject,n=c.getParameter(c.SCISSOR_BOX);c.disable(c.SCISSOR_TEST);const o=gc();A.bind(o);const r=e===0,a=t.length/5,l=r?Oc:Fc;Xt();const h=mc();for(let f=0;f<a;f+=h-1){const i=Math.min(f+h,a),E=yc(i-f,r);Na(E,t,f,i,l),Rc(E,t[0],t[t.length-5])}return j(),s&&A.bind(s),zs(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}\`},Ua=t=>\`
|
|
618
623
|
vec2 focal = vec2(u_highp[\${t}][1], 0.0);
|
|
619
624
|
|
|
620
625
|
vec2 dir = normalize(coord - focal);
|
|
@@ -624,18 +629,18 @@ void main() {
|
|
|
624
629
|
float c = dot(focal, focal) - 1.0;
|
|
625
630
|
float x = (-b + sqrt(b * b - 4.0 * a * c)) / (2.0 * a);
|
|
626
631
|
|
|
627
|
-
float t = distance(focal, coord) / distance(focal, focal + dir * x);\`,
|
|
632
|
+
float t = distance(focal, coord) / distance(focal, focal + dir * x);\`,Da=()=>"float t = length(coord);",Xa=(t,e)=>{const s=e?Ua(t):Da();return\`
|
|
628
633
|
float radius = u_highp[\${t}][0];
|
|
629
634
|
vec2 coord = p / radius;
|
|
630
635
|
\${s}
|
|
631
|
-
\`},
|
|
636
|
+
\`},_a=t=>\`
|
|
632
637
|
vec2 a = u_highp[\${t}].xy;
|
|
633
638
|
vec2 b = u_highp[\${t}].zw;
|
|
634
639
|
|
|
635
640
|
vec2 ab = b - a;
|
|
636
641
|
vec2 ap = p - a;
|
|
637
642
|
|
|
638
|
-
float t = dot(ab, ap) / dot(ab, ab);\`,
|
|
643
|
+
float t = dot(ab, ap) / dot(ab, ab);\`,Ya=(t,e,s,n,o)=>{const r=s?Xa(e,n):_a(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
|
|
639
644
|
precision highp float;
|
|
640
645
|
|
|
641
646
|
uniform sampler2D u_texture;
|
|
@@ -649,15 +654,15 @@ void main() {
|
|
|
649
654
|
\${r}
|
|
650
655
|
t = \${a};
|
|
651
656
|
o_color = texture(u_texture, vec2(t, 0.5));
|
|
652
|
-
}\`},Bc=(t,e,s,n)=>{const o=Da(n,t,e,s);if(Je.has(o))return Je.get(o);const r=(n?14:5)+1,a=r-1,l=new Z(ge(r,!0,!1,n),Va(r,a,t,e,s));return Je.set(o,l),l},Ic=(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))},za=(t,e,s,n)=>{const o=tt.shift(),r=tt.shift(),a=tt.shift(),l=tt.shift();c.disable(c.STENCIL_TEST);const h=wc(o,l);G(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=re(f);n&&ae(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=Bc(!1,!1,a,f),$=Yc(r),M=we(A.$matrix);Ic(E,0,A.$matrix,M,0,$,n),As($),Kt(M),nt(E,t,e,s)},Wa=(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=wc(o,l);G(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=re(i);n&&ae(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],M=we(A.$matrix),T=Bc(!0,!!h,a,i);Ic(T,1,$,M,h,n),A.restore(),Kt(M),nt(T,t,e,s)},qe=new Map,ja=(t,e)=>{const s=\`b\${t?"y":"n"}\${e?"y":"n"}\`;if(qe.has(s))return qe.get(s);const n=t?Fo():mo(),o=new Z(ge(e?14:5,!0,!1,e),n);return qe.set(s,o),o},Ha=(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=we(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},Ka=(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=re(o);n&&ae(r,n),c.enable(c.SAMPLE_ALPHA_TO_COVERAGE),nt(r,t,e,s),c.disable(c.SAMPLE_ALPHA_TO_COVERAGE);const a=yt.shift(),l=yt.shift(),h=yt.shift(),f=yt.shift(),i=yt.shift(),E=yt.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 M=ja(i,o);Ha(M,h,f,n),nt(M,t,e,s),A.restore(),D($)},Za=()=>{const t=tc();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();Pa(t,e,r,s),e+=r}break;case"linear":{const r=q.shift();za(t,e,r,s),e+=r}break;case"radial":{const r=q.shift();Wa(t,e,r,s),e+=r}break;case"bitmap":{const r=q.shift();Ka(t,e,r,s),e+=r}break}c.disable(c.STENCIL_TEST),ec(t),js(),Js()};let ts=0;const Qa=async(t,e)=>{const s=$c(0,0,t,e);G(s),c.bindFramebuffer(c.FRAMEBUFFER,yn()),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(f=>{const i=()=>{if(c.clientWaitSync(r,c.SYNC_FLUSH_COMMANDS_BIT,0)===c.TIMEOUT_EXPIRED){requestAnimationFrame(i);return}return c.deleteSync(r),c.getBufferSubData(c.PIXEL_PACK_BUFFER,0,n),f()};i()}),c.bindFramebuffer(c.FRAMEBUFFER,ft);const a=new OffscreenCanvas(t,e),l=a.getContext("2d"),h=new ImageData(new Uint8ClampedArray(n),t,e);return l.putImageData(h,0,0),await createImageBitmap(a,{imageOrientation:"flipY"})};class Ja{$stack;$matrix;$clearColorR;$clearColorG;$clearColorB;$clearColorA;$mainAttachmentObject;$stackAttachmentObject;globalAlpha;globalCompositeOperation;imageSmoothingEnabled;$fillStyle;$strokeStyle;maskBounds;thickness;caps;joints;miterLimit;constructor(e,s,n=1){Pc(e),Nc(e.getParameter(e.MAX_TEXTURE_SIZE)),kc(s),Gc(n),this.$stack=he(),this.$stackAttachmentObject=he(),this.$matrix=Se(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),An(e),vn(e),Mn(e),xn(e),ur(e),fr(),Jr(e),Uc(this)}clearTransferBounds(){Tn()}updateBackgroundColor(e,s,n,o){Zc(this,e,s,n,o)}fillBackgroundColor(){Qc(this.$clearColorR,this.$clearColorG,this.$clearColorB,this.$clearColorA)}resize(e,s,n=!0){pn(this,e,s,n)}clearRect(e,s,n,o){mn(e,s,n,o)}bind(e){Sn(this,e)}save(){wn(this)}restore(){Bn(this)}setTransform(e,s,n,o,r,a){In(this.$matrix,e,s,n,o,r,a)}transform(e,s,n,o,r,a){Ln(this,e,s,n,o,r,a)}reset(){Cn(this)}beginPath(){Nn(this),zc()}moveTo(e,s){$e(e,s)}lineTo(e,s){Wc(e,s)}quadraticCurveTo(e,s,n,o){Os(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(){jc()}arc(e,s,n){Kc(e,s,n)}bezierCurveTo(e,s,n,o,r,a){Qt(e,s,n,o,r,a)}fill(){_n("fill")}gradientFill(e,s,n,o,r,a){Yn(e,s,n,o,r,a)}bitmapFill(e,s,n,o,r,a){Mr(e,s,n,o,r,a)}stroke(){Rr()}gradientStroke(e,s,n,o,r,a){to(e,s,n,o,r,a)}bitmapStroke(e,s,n,o,r,a){xr(e,s,n,o,r,a)}clip(){Io()}get currentAttachmentObject(){return Ps()}get atlasAttachmentObject(){return En()}createNode(e,s){return ac(e,s)}removeNode(e){ko(e)}beginNodeRendering(e){La(e),Ws(e.x,e.y,e.w,e.h)}endNodeRendering(){kn()}drawFill(){Za()}drawDisplayObject(e,s,n,o,r,a){Ca(e),er(e,s,n,o,r,a)}drawArraysInstanced(){lr()}clearArraysInstanced(){sr()}transferMainCanvas(){hr()}drawPixels(e,s){Tr(e,s)}drawElement(e,s){vr(e,s)}beginMask(){br()}setMaskBounds(e,s,n,o){$r(e,s,n,o)}endMask(){ke()}leaveMask(){this.drawArraysInstanced(),Er()}useGrid(e){eo(e)}applyFilter(e,s,n,o,r,a,l,h,f,i,E){this.drawArraysInstanced(),Ia(e,s,n,o,r,a,l,h,f,i,E)}async createImageBitmap(e,s){return await Qa(e,s)}}const qa=4;let v;const tl=t=>{v=t};let es;const el=t=>{es=t};let ss=0;const sl=()=>ss;let cs=0;const cl=()=>cs;let ns=!1;const nl=(t,e)=>{ns=!0,ss=t,cs=e},ol=()=>ns,rl=()=>{es.width=ss,es.height=cs,ns=!1},al=[],Lc=(...t)=>{const e=al.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}),ll=(t,e)=>{el(t);const s=t.getContext("webgl2",{stencil:!0,premultipliedAlpha:!0,antialias:!1,depth:!1});if(!s)throw new Error("webgl2 is not supported.");tl(new Ja(s,qa,e))},il=(t,e,s=!0)=>{sl()===t&&cl()===e||(nl(t,e),v.resize(t,e,s),s&&X.reset())},ul=0,hl=1,fl=2,bl=3,$l=4,El=5,Tl=6,Al=7,vl=8,Ml=9,xl=10,Rl=11,yl=12,gl=13,Ol=14,os=(t,e=!1)=>{let s=0;for(;t.length>s;)switch(t[s++]){case Ml:v.beginPath();break;case ul:v.moveTo(t[s++],t[s++]);break;case fl:v.lineTo(t[s++],t[s++]);break;case hl:v.quadraticCurveTo(t[s++],t[s++],t[s++],t[s++]);break;case El:if(e){s+=4;break}v.fillStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case Al:v.fill();break;case Tl:if(e){s+=8;break}v.thickness=t[s++],v.caps=t[s++],v.joints=t[s++],v.miterLimit=t[s++],v.strokeStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case vl:if(e)break;v.stroke();break;case yl:v.closePath();break;case $l:v.arc(t[s++],t[s++],t[s++]);break;case bl:v.bezierCurveTo(t[s++],t[s++],t[s++],t[s++],t[s++],t[s++]);break;case xl:{if(e){s+=1;const i=t[s++];s+=i*5,s+=9,v.fill();break}const n=t[s++],o=Lc(),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++];v.gradientFill(n,o,a,l,h,f)}break;case gl:{if(e){s+=2;const h=t[s++];s+=h,s+=8,v.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++]]);v.bitmapFill(a,l,n,o,!!t[s++],!!t[s++])}break;case Rl:{if(e){s+=20,v.fill();break}v.thickness=t[s++],v.caps=t[s++],v.joints=t[s++],v.miterLimit=t[s++];const n=t[s++],o=Lc(),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++];v.gradientStroke(n,o,a,l,h,f)}break;case Ol:{if(e){s+=6;const h=t[s++];s+=h,s+=8,v.fill();break}v.thickness=t[s++],v.caps=t[s++],v.joints=t[s++],v.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++]]);v.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++]}\`,M=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=X.get($,\`\${M}\`),!g)return e}else{const m=f?new Float32Array(28):null;m&&(m.set(t.subarray(e,e+24)),e+=24),v.useGrid(m);const R=t[e++],x=t.subarray(e,e+R);if(E&&!f){const S=Math.ceil(Math.abs(l-r)),w=Math.ceil(Math.abs(h-a));g=v.createNode(S,w),X.set($,\`\${M}\`,g);const p=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(g);const O=v.atlasAttachmentObject.height-g.y-w;v.setTransform(1,0,0,1,g.x,O),i?(os(x),v.drawFill()):v.drawPixels(g,new Uint8Array(x)),v.endNodeRendering(),p&&v.bind(p)}else{const S=Math.ceil(Math.abs(l-r)*T),w=Math.ceil(Math.abs(h-a)*u);g=v.createNode(S,w),X.set($,\`\${M}\`,g);const p=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(g);const O=v.atlasAttachmentObject.height-g.y-w;v.setTransform(T,0,0,u,-r*T+g.x,-a*u+O),m&&(m[24]=g.x,m[25]=O),os(x),v.drawFill(),v.endNodeRendering(),p&&v.bind(p)}e+=R}const d=t[e++];if(!!t[e++]){const m=!!t[e++],R=t.subarray(e,e+4);e+=4;const x=t[e++],S=t.subarray(e,e+x),w=Math.ceil(Math.abs(o[2]-o[0])),p=Math.ceil(Math.abs(o[3]-o[1]));return v.applyFilter(g,$,m,w,p,E,s,n,Wt(d),R,S),e+=x,e}if(v.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),v.imageSmoothingEnabled=!0,v.globalCompositeOperation=Wt(d),E&&!f)v.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),v.drawDisplayObject(g,o[0],o[1],o[2],o[3],n);else{const m=Math.atan2(s[1],s[0]),R=Math.atan2(-s[2],s[3]);if(m||R){const x=r*T,S=a*u,w=Math.cos(m),p=Math.sin(m),O=Math.cos(R),y=Math.sin(R);v.setTransform(w,p,-y,O,x*w-S*y+s[4],x*p+S*O+s[5])}else v.setTransform(1,0,0,1,o[0],o[1]);v.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,v.reset(),v.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]);const o=!!t[e++]?new Float32Array(28):null;v.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,v.clip(),e},Cc=(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 R=zt(e.backgroundColor);r.fillStyle=\`rgba(\${R.R},\${R.G},\${R.B},\${R.A})\`,r.fill()}if(e.border){const R=zt(e.borderColor);r.lineWidth=a,r.strokeStyle=\`rgba(\${R.R},\${R.G},\${R.B},\${R.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 R=(e.textWidth+4-e.rawWidth)/e.rawWidth;l+=-e.scrollX*R}let h=2;if(e.scrollY>0){const R=(e.textHeight+2-e.rawHeight)/e.rawHeight;h+=-e.scrollY*R}if(r.setTransform(s,0,0,n,l*s,h*n),r.beginPath(),e.selectIndex>-1&&e.focusIndex>-1){const R=t.textTable.length-1;let x=0,S=0;e.focusIndex<=e.selectIndex?(x=Math.min(e.focusIndex,R),S=Math.min(e.selectIndex,R)):(x=Math.min(e.selectIndex,R),S=Math.min(e.focusIndex-1,R));const w=t.textTable[x],p=t.lineTable[w.line],O=Cc(t,p,e);let y=0;if(x&&w.mode==="text"){let b=x;for(;b;){const C=t.textTable[--b];if(C.mode!=="text")break;y+=C.w}}r.fillStyle="#b4d7ff";let B=0;for(let b=x;b<=S;++b){const C=t.textTable[b];if(C.mode==="text"&&(B+=C.w,b!==S))continue;let k=0;const P=C.mode==="text"?C.line:C.line-1;for(let N=0;N<P;++N)k+=t.heightTable[N];r.beginPath(),r.rect(y,k,B+O,t.heightTable[P]),r.fill(),y=0,B=0}}const f=e.rawWidth;let i=0;if(e.scrollX>0){const R=(e.textWidth-f)/f;i=e.scrollX*R}const E=f+i,$=e.rawHeight;let M=0;if(e.scrollY>0){const R=(e.textHeight-$)/$;M=e.scrollY*R}const T=$+M;let u=0,g=0,I=0,d=0,L=!1,m=-1;for(let R=0;R<t.textTable.length;++R){const x=t.textTable[R];if(!x)continue;if((x.mode==="text"||x.mode==="break")&&(m++,e.stopIndex>-1&&m>e.stopIndex))break;if(L&&x.mode==="text")continue;const S=x.textFormat;if(e.autoSize==="none"){if(g>T)break;if(x.mode==="text"&&(i>u+x.w||u>E)){u+=x.w;continue}}const w=zt(S.color||0);if(r.fillStyle=\`rgba(\${w.R},\${w.G},\${w.B},\${w.A})\`,e.focusVisible&&e.focusIndex===R){const O=u+I+.1;let y=x.line,B=x.y,b=t.ascentTable[y];x.mode!=="text"&&(B=x.mode==="break"?x.h:t.ascentTable[y-1],y>0?(y=x.line-1,b=t.ascentTable[y]):b=x.h),y>0&&t.ascentTable[y]===0&&y++;for(let C=0;C<y;++C)b+=t.heightTable[C];r.strokeStyle=\`rgba(\${w.R},\${w.G},\${w.B},\${w.A})\`,r.beginPath(),r.moveTo(O,b),r.lineTo(O,b-B),r.stroke()}if(e.thickness){const O=zt(e.thicknessColor);r.lineWidth=e.thickness,r.strokeStyle=\`rgba(\${O.R},\${O.G},\${O.B},\${O.A})\`}const p=x.line|0;switch(x.mode){case"break":case"wrap":if(u=0,p&&(g+=t.heightTable[p-1]),M>g+t.heightTable[p]){L=!0;continue}d=t.ascentTable[p],I=Cc(t,x,e),L=!1;break;case"text":{r.beginPath(),r.font=pl(S);const O=u+I,y=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(O,y+2),r.lineTo(O+x.w,y+2),r.stroke()}e.thickness&&r.strokeText(x.text,O,y),r.fillText(x.text,O,y),u+=x.w}break}}if(e.focusVisible&&e.focusIndex>=t.textTable.length){const R=t.textTable[e.focusIndex-1];if(R){const x=zt(R.textFormat.color||0);r.strokeStyle=\`rgba(\${x.R},\${x.G},\${x.B},\${x.A})\`;const S=u+I+.1,w=g+d;r.beginPath(),R.mode==="text"?r.moveTo(S,w-R.y):r.moveTo(S,w+R.h),r.lineTo(S,w),r.stroke()}}return r.restore(),o},Fl=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]),M=Math.sqrt(s[2]*s[2]+s[3]*s[3]);let T;if(t[e++]){if(T=X.get(f,\`\${i}\`),!T)return e}else{const m=Math.ceil(Math.abs(l-r)*$),R=Math.ceil(Math.abs(h-a)*M),x=!!t[e++];T=x?X.get(f,\`\${i}\`):v.createNode(m,R),x||X.set(f,\`\${i}\`,T);const S=t[e++],w=new Uint8Array(t.subarray(e,e+S));e+=S;let p="none";switch(t[e++]){case 0:p="center";break;case 1:p="left";break;case 2:p="none";break;case 3:p="right";break}const O={width:m,height:R,autoSize:p,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++]},y=ml(JSON.parse(Fl.decode(w)),O,$,M),B=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(T);const b=v.atlasAttachmentObject.height-T.y-R;v.setTransform(1,0,0,1,T.x,b),v.drawElement(T,y),v.endNodeRendering(),B&&v.bind(B)}const g=t[e++];if(!!t[e++]){const m=!!t[e++],R=t.subarray(e,e+4);e+=4;const x=t[e++],S=t.subarray(e,e+x),w=Math.ceil(Math.abs(o[2]-o[0])),p=Math.ceil(Math.abs(o[3]-o[1]));return v.applyFilter(T,f,!!Math.max(+E,+m),w,p,!1,s,n,Wt(g),R,S),e+=x,e}v.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),v.imageSmoothingEnabled=!0,v.globalCompositeOperation=Wt(g);const d=Math.atan2(s[1],s[0]),L=Math.atan2(-s[2],s[3]);if(d||L){const m=r*$,R=a*M,x=Math.cos(d),S=Math.sin(d),w=Math.cos(L),p=Math.sin(L);v.setTransform(x,S,-p,w,m*x-R*p+s[4],m*S+R*w+s[5])}else v.setTransform(1,0,0,1,o[0],o[1]);return v.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 M;if(t[e++]){if(M=X.get(i,\`\${E}\`),!M)return e}else{const I=Math.abs(h-a),d=Math.abs(f-l),L=!!t[e++];if(M=L?X.get(i,\`\${E}\`):v.createNode(I,d),L||X.set(i,\`\${E}\`,M),s&&s.length){const m=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(M);const R=v.atlasAttachmentObject.height-M.y-d;v.setTransform(1,0,0,1,M.x,R);const x=s.shift();v.drawElement(M,x),v.endNodeRendering(),m&&v.bind(m)}}const u=t[e++];if(!!t[e++]){const I=!!t[e++],d=t.subarray(e,e+4);e+=4;const L=t[e++],m=t.subarray(e,e+L),R=Math.ceil(Math.abs(r[2]-r[0])),x=Math.ceil(Math.abs(r[3]-r[1]));return v.applyFilter(M,i,!!Math.max(+$,+I),R,x,!0,n,o,Wt(u),d,m),e+=L,e}return v.globalAlpha=Math.min(Math.max(0,o[3]+o[7]/255),1),v.imageSmoothingEnabled=!0,v.globalCompositeOperation=Wt(u),v.setTransform(n[0],n[1],n[2],n[3],n[4],n[5]),v.drawDisplayObject(M,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(v.drawArraysInstanced(),v.save(),v.beginMask(),v.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}v.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&&(v.restore(),v.leaveMask()),o=0,r=!0),!r)continue;if(f){if(o=f,r=!!t[e++],!r)continue;switch(v.drawArraysInstanced(),v.save(),v.beginMask(),v.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}v.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)&&(v.restore(),v.leaveMask()),e};let jt=-1;const dl=(t,e)=>{v.clearTransferBounds();let s=0;const n=t[s++];for(jt!==n&&(jt=n,jt===-1?v.updateBackgroundColor(0,0,0,0):v.updateBackgroundColor(jt>>16&255/255,jt>>8&255/255,jt&255/255,1)),v.reset(),v.setTransform(1,0,0,1,0,0),v.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}}v.drawArraysInstanced(),ol()&&rl(),v.transferMainCanvas()},Sl=t=>{for(let e=0;e<t.length;++e){const s=\`\${t[e]}\`;if(!X.has(s))continue;const n=X.getById(s);for(const o of n.values())v.removeNode(o);X.removeById(s)}},wl=async(t,e,s,n)=>{v.clearTransferBounds();let o=1;for(v.reset(),v.setTransform(1,0,0,1,0,0),v.fillBackgroundColor();t.length>o;){if(!t[o++])continue;const r=t[o++];switch(r){case 0:o=hs(t,o,n);break;case 1:o=rs(t,o);break;case 2:o=ls(t,o);break;case 3:o=is(t,o,n);break;default:console.error("unknown type",r);break}}return v.drawArraysInstanced(),await v.createImageBitmap(e,s)};class Bl{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":dl(e.buffer.subarray(0,e.length),e.imageBitmaps),globalThis.postMessage({message:"render",buffer:e.buffer},[e.buffer.buffer]);break;case"resize":il(e.buffer[0],e.buffer[1],!!e.buffer[2]);break;case"initialize":ll(e.canvas,e.devicePixelRatio);break;case"removeCache":Sl(e.buffer);break;case"cacheClear":X.reset();break;case"capture":{const s=await wl(e.buffer.subarray(0,e.length),e.width,e.height,e.imageBitmaps);globalThis.postMessage({message:"capture",buffer:e.buffer,imageBitmap:s},[e.buffer.buffer,s])}break}}this.state="deactivate"}}const fs=new Bl;self.addEventListener("message",async t=>{fs.queue.push(t.data),fs.state==="deactivate"&&await fs.execute()})})();
|
|
653
|
-
`,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 Me=new Cr,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():[],ve=e=>{10>Nt.length&&(e.length=0,Nt.push(e))};let on=null;const Ue=e=>{on=e},Yt=()=>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=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 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))}},_r=(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)),ve(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}})}},Dr=(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)),ve(n),ve(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),ve(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&&ve(u),ve(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}}ve(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}ve(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){_r(this,t,u,s)}removeAllEventListener(t,u=!1){Dr(this,t,u)}willTrigger(t){return Ur(this,t)}}class _e 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=Yt();if(r)switch(r.type){case _e.FOCUS_IN:case _e.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 Se extends g{text;constructor(t,u=!1,s=""){super(t,u),this.text=`${s}`}static get IO_ERROR(){return"ioError"}}class w 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=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 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 me 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=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)},Ae=(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]=Ae(t,0,1,1)}get alphaOffset(){return this._$colorTransform[7]}set alphaOffset(t){this._$colorTransform[7]=Ae(t,-255,255,0)}get blueMultiplier(){return this._$colorTransform[2]}set blueMultiplier(t){this._$colorTransform[2]=Ae(t,0,1,1)}get blueOffset(){return this._$colorTransform[6]}set blueOffset(t){this._$colorTransform[6]=Ae(t,-255,255,0)}get greenMultiplier(){return this._$colorTransform[1]}set greenMultiplier(t){this._$colorTransform[1]=Ae(t,0,1,1)}get greenOffset(){return this._$colorTransform[5]}set greenOffset(t){this._$colorTransform[5]=Ae(t,-255,255,0)}get redMultiplier(){return this._$colorTransform[0]}set redMultiplier(t){this._$colorTransform[0]=Ae(t,0,1,1)}get redOffset(){return this._$colorTransform[4]}set redOffset(t){this._$colorTransform[4]=Ae(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)),ma=(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)),xa=(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 ma(this,t)}static interpolate(t,u,s){return ga(t,u,s)}normalize(t){xa(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},_a=(e,t)=>{e.x-=t.x,e.width+=2*t.x,e.y-=t.y,e.height+=2*t.y},Da=(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){_a(this,t)}intersection(t){return Da(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++,mn=[],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},xn=[],Ja=()=>xn.pop()||new Map,ja=e=>{e.clear(),xn.push(e)},U=(...e)=>{const t=mn.pop()||[];return e.length&&t.push(...e),t},ee=e=>{e.length&&(e.length=0),mn.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(`
|
|
654
|
-
`);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,Re=new WeakMap,fe=new Set,ui=new WeakMap,Iu=document.createElement("canvas");Iu.width=Iu.height=1;const ye=Iu.getContext("2d"),Su=e=>ye?(ye.fillStyle=e,+`0x${ye.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=[],Fe=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 we{$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"),ke=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 we{$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"?ke(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"?ke(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 we{$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 we{$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,mi=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 we{$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"?ke(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 mi(this)}toNumberArray(){return gi(this)}canApplyFilter(){return $i(this)}}const xi=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 we{$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"?ke(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 xi(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 we{$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"?ke(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 we{$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"?ke(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 we{$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"?ke(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 we{$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"?ke(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))},_i=180/Math.PI,Di=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?Math.atan2(t[1],t[0])*_i: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,x=e*a+s*c+d,R=e*a+t*c+d;return he(Math.min(l,h,b,f),Math.min(p,$,x,R),Math.max(l,h,b,f),Math.max(p,$,x,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 _t{_$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}}}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 _t(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),x=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,x),e.yMax=Math.max(e.yMax,R),a==="round"||a==="square"){const S=t+f*-d,k=u+f*-l,_=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,_),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,x=$-c;return e.moveTo(h,u).lineTo(f,u).cubicCurveTo(f+d,u,b,p-l,b,p).lineTo(b,x).cubicCurveTo(b,x+l,f+d,$,f,$).lineTo(h,$).cubicCurveTo(h-d,$,t,x+l,t,x).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 _t(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 _t(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]);const o=ic(t,n.buffer,s);return 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 x=r[$];if(x&&!x.isMask){if(x.clipDepth){h=c.length,l=x.clipDepth,c.push(x);continue}x.visible&&(l&&x.placeId>l&&(h=0,l=0),h&&d.set(x.instanceId,h),o.push(x))}}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 x=!1;switch(!0){case $.isContainerEnabled:x=He($,t,i,s,b);break;case $.isShape:x=Ot($,t,i,s);break;case $.isText:x=Ft($,t,i,s);break;case $.isVideo:x=Lt($,t,i,s);break}if(x){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(ye.setTransform(1,0,0,1,0,0),ye.beginPath(),Le.x=t,Le.y=u,Le.hit=null,!0){case e.isContainerEnabled:return He(e,ye,l,Le);case e.isShape:return Ot(e,ye,l,Le);case e.isText:return Ft(e,ye,l,Le);case e.isVideo:return Lt(e,ye,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 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 Re.has(this)?Re.get(this):null}get rotation(){return this.$rotation===null?Di(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 Fe.has(t)?Fe.get(t):null}setGlobalVariable(t,u){Fe.set(t,u)}hasGlobalVariable(t){return Fe.has(t)}deleteGlobalVariable(t){Fe.has(t)&&Fe.delete(t)}clearGlobalVariable(){return Fe.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&&(Re.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(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)&&(Re.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&&(Re.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)))},_n=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&&(_n(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)&&(_n(t),t.isContainerEnabled&&ns(t)),fe.has(e.instanceId)&&(Re.delete(t),fe.delete(t.instanceId),t.isVideo&&t.pause(),t.isContainerEnabled&&Bn(t)),t.parent=null,V(e)},Dn=(e,t)=>{const u=e.children;return t in u?u[t]:null},fc=(e,t)=>{const u=Dn(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},mc=(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),V(e)},xc=(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 Dn(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){mc(this,t)}setChildIndex(t,u){gc(this,t,u)}swapChildren(t,u){xc(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(g.COMPLETE)&&e.dispatchEvent(new g(g.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},Oe=()=>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 Dt=()=>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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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 Ie;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ie||(Ie={}));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 ge;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ge||(ge={}));class _c{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)|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===ge.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&Ie.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const a=t.charCodeAt(u);if(this.treeIndex=Dc(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&Ie.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]&Ie.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]&~Ie.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 Dc(e,t,u,s){const n=(t&Ie.BRANCH_LENGTH)>>7,r=t&Ie.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 m;(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"})(m||(m={}));function Ee(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||Ee(e)}function Uc(e){return e>=I.LowerA&&e<=I.LowerZ||e>=I.UpperA&&e<=I.UpperZ}var xe;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(xe||(xe={}));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=m.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=m.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 _c(t?Oc:kc,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=m.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=m.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=m.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=m.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===I.Gt||Ee(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=m.InCommentLike,this.currentSequence=z.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=m.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=m.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=m.SpecialStartSequence}stateBeforeTagName(t){if(t===I.ExclamationMark)this.state=m.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===I.Questionmark)this.state=m.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const u=t|32;this.sectionStart=this.index,this.xmlMode?this.state=m.InTagName:u===z.ScriptEnd[2]?this.state=m.BeforeSpecialS:u===z.TitleEnd[2]||u===z.XmpEnd[2]?this.state=m.BeforeSpecialT:this.state=m.InTagName}else t===I.Slash?this.state=m.BeforeClosingTagName:(this.state=m.Text,this.stateText(t))}stateInTagName(t){Mt(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Ee(t)||(t===I.Gt?this.state=m.Text:(this.state=this.isTagStartChar(t)?m.InClosingTagName:m.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===I.Gt||Ee(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=m.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.state=m.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===I.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=m.InSpecialTag,this.sequenceIndex=0):this.state=m.Text,this.sectionStart=this.index+1):t===I.Slash?this.state=m.InSelfClosingTag:Ee(t)||(this.state=m.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===I.Gt?(this.cbs.onselfclosingtag(this.index),this.state=m.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Ee(t)||(this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===I.Eq||Mt(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=m.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===I.Eq?this.state=m.BeforeAttributeValue:t===I.Slash||t===I.Gt?(this.cbs.onattribend(xe.NoValue,this.sectionStart),this.sectionStart=-1,this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t)):Ee(t)||(this.cbs.onattribend(xe.NoValue,this.sectionStart),this.state=m.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===I.DoubleQuote?(this.state=m.InAttributeValueDq,this.sectionStart=this.index+1):t===I.SingleQuote?(this.state=m.InAttributeValueSq,this.sectionStart=this.index+1):Ee(t)||(this.sectionStart=this.index,this.state=m.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?xe.Double:xe.Single,this.index+1),this.state=m.BeforeAttributeName):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,I.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,I.SingleQuote)}stateInAttributeValueNoQuotes(t){Ee(t)||t===I.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(xe.Unquoted,this.index),this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===I.OpeningSquareBracket?(this.state=m.CDATASequence,this.sequenceIndex=0):this.state=t===I.Dash?m.BeforeComment:m.InDeclaration}stateInDeclaration(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=m.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=m.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===I.Dash?(this.state=m.InCommentLike,this.currentSequence=z.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=m.InDeclaration}stateInSpecialComment(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=m.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=m.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=m.InTagName,this.stateInTagName(t)}}startEntity(){this.baseState=this.state,this.state=m.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?ge.Strict:this.baseState===m.Text||this.baseState===m.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===m.Text||this.state===m.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===m.InAttributeValueDq||this.state===m.InAttributeValueSq||this.state===m.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 m.Text:{this.stateText(t);break}case m.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case m.InSpecialTag:{this.stateInSpecialTag(t);break}case m.CDATASequence:{this.stateCDATASequence(t);break}case m.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case m.InAttributeName:{this.stateInAttributeName(t);break}case m.InCommentLike:{this.stateInCommentLike(t);break}case m.InSpecialComment:{this.stateInSpecialComment(t);break}case m.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case m.InTagName:{this.stateInTagName(t);break}case m.InClosingTagName:{this.stateInClosingTagName(t);break}case m.BeforeTagName:{this.stateBeforeTagName(t);break}case m.AfterAttributeName:{this.stateAfterAttributeName(t);break}case m.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case m.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case m.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case m.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case m.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case m.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case m.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case m.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case m.InDeclaration:{this.stateInDeclaration(t);break}case m.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case m.BeforeComment:{this.stateBeforeComment(t);break}case m.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case m.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===m.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===m.InCommentLike?this.currentSequence===z.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===m.InTagName||this.state===m.BeforeAttributeName||this.state===m.BeforeAttributeValue||this.state===m.AfterAttributeName||this.state===m.InAttributeName||this.state===m.InAttributeValueSq||this.state===m.InAttributeValueDq||this.state===m.InAttributeValueNq||this.state===m.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,u){this.baseState!==m.Text&&this.baseState!==m.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===xe.Double?'"':t===xe.Single?"'":t===xe.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 x=u.textTable.length-f;if(0>=x){p=!1,f=0;break}const R=u.textTable[x];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 x=u.textTable.length-f;u.textTable.splice(x,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<x;++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=x+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}}},_u=(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),_u(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}_u(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),_u(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),D=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&D(t)},Du=e=>{e.$textData=null,D(e),e.uniqueKey!==""&&O.has(e.uniqueKey)&&(O.removeById(e.uniqueKey),O.$removeIds.push(+e.uniqueKey))},ro=e=>{if(D(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;)Du(e),q(e,s++);if(e.height&&e.textHeight)for(;t>s&&e.textHeight+4>e.height;)Du(e),q(e,s++);D(e)},Te=e=>{Du(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))}D(e)},ae=()=>{const e=Dt();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,D(e),Hn(setTimeout(()=>le(e),500)),oo(e)},lo=(e,t)=>{e.willTrigger(t)&&e.dispatchEvent(new _e(t)),ie.value="",e.focus?(setTimeout(()=>{ie.focus()},300),Dt()===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()),D(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,mo=(e,t,u,s)=>(e/=s)*e*e*u+t,go=(e,t,u,s)=>(e/=s,(--e*e*e+1)*u+t),xo=(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,_o=(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,Do=(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-De.outBounce(s-e,0,u,s)+t,Xo=(e,t,u,s)=>e<s/2?De.inBounce(e*2,t,u/2,s):De.outBounce(e*2-s,t+u/2,u/2,s);class De{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 mo(t,u,s,n)}static outCubic(t,u,s,n){return go(t,u,s,n)}static inOutCubic(t,u,s,n){return xo(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 _o(t,u,s,n)}static inOutElastic(t,u,s,n){return Do(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(me.STOP)&&e.dispatchEvent(new me(me.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(me.UPDATE)&&e.dispatchEvent(new me(me.UPDATE)),e.currentTime>=e.duration?(e.hasEventListener(me.COMPLETE)&&e.dispatchEvent(new me(me.COMPLETE)),e.nextJob&&e.nextJob.start(),-1):requestAnimationFrame(u=>{sr(e,u)})),_s=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(()=>{_s(e)},e.delay*1e3):_s(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||De.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){D(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,De.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){D(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,De.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+=`
|
|
657
|
+
}\`},wc=(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),Ya(r,a,t,e,s));return Je.set(o,l),l},Bc=(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))},Ga=(t,e,s,n)=>{const o=tt.shift(),r=tt.shift(),a=tt.shift(),l=tt.shift();c.disable(c.STENCIL_TEST);const h=Sc(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=wc(!1,!1,a,f),$=Yc(r),M=Se(A.$matrix);Bc(E,0,A.$matrix,M,0,$,n),As($),Kt(M),nt(E,t,e,s)},Va=(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=Sc(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],M=Se(A.$matrix),T=wc(!0,!!h,a,i);Bc(T,1,$,M,h,n),A.restore(),Kt(M),nt(T,t,e,s)},qe=new Map,za=(t,e)=>{const s=\`b\${t?"y":"n"}\${e?"y":"n"}\`;if(qe.has(s))return qe.get(s);const n=t?Oo():mo(),o=new Z(Re(e?14:5,!0,!1,e),n);return qe.set(s,o),o},Wa=(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},ja=(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 M=za(i,o);Wa(M,h,f,n),nt(M,t,e,s),A.restore(),D($)},Ha=()=>{const t=qs();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();ka(t,e,r,s),e+=r}break;case"linear":{const r=q.shift();Ga(t,e,r,s),e+=r}break;case"radial":{const r=q.shift();Va(t,e,r,s),e+=r}break;case"bitmap":{const r=q.shift();ja(t,e,r,s),e+=r}break}c.disable(c.STENCIL_TEST),tc(t),Ws(),Qs()};let ts=0;const Lc=new Float32Array(256);for(let t=1;t<256;t++)Lc[t]=255/t;const Ka=async(t,e)=>{const s=bc(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=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 Za{$stack;$matrix;$clearColorR;$clearColorG;$clearColorB;$clearColorA;$mainAttachmentObject;$stackAttachmentObject;globalAlpha;globalCompositeOperation;imageSmoothingEnabled;$fillStyle;$strokeStyle;maskBounds;thickness;caps;joints;miterLimit;constructor(e,s,n=1){Pc(e),kc(e.getParameter(e.MAX_TEXTURE_SIZE)),Nc(s),Gc(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,Us()),nn(e),lr(e),ur(),Zr(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(){Ln(this)}setTransform(e,s,n,o,r,a){In(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(){Yn("fill")}gradientFill(e,s,n,o,r,a){Gn(e,s,n,o,r,a)}bitmapFill(e,s,n,o,r,a){Ar(e,s,n,o,r,a)}stroke(){Mr()}gradientStroke(e,s,n,o,r,a){eo(e,s,n,o,r,a)}bitmapStroke(e,s,n,o,r,a){vr(e,s,n,o,r,a)}clip(){Bo()}get currentAttachmentObject(){return ds()}get atlasAttachmentObject(){return gn()}createNode(e,s){return rc(e,s)}removeNode(e){ko(e)}beginNodeRendering(e){Ba(e),zs(e.x,e.y,e.w,e.h)}endNodeRendering(){Pn()}drawFill(){Ha()}drawDisplayObject(e,s,n,o,r,a){La(e),qo(e,s,n,o,r,a)}drawArraysInstanced(){rr()}clearArraysInstanced(){tr()}transferMainCanvas(){ir()}drawPixels(e,s){$r(e,s)}drawElement(e,s){Tr(e,s)}beginMask(){hr()}setMaskBounds(e,s,n,o){fr(e,s,n,o)}endMask(){ke()}leaveMask(){this.drawArraysInstanced(),br()}useGrid(e){so(e)}applyFilter(e,s,n,o,r,a,l,h,f,i,E){this.drawArraysInstanced(),wa(e,s,n,o,r,a,l,h,f,i,E)}async createImageBitmap(e,s){return await Ka(e,s)}}const Qa=4;let v;const Ja=t=>{v=t};let es;const qa=t=>{es=t};let ss=0;const tl=()=>ss;let cs=0;const el=()=>cs;let ns=!1;const sl=(t,e)=>{ns=!0,ss=t,cs=e},cl=()=>ns,nl=()=>{es.width=ss,es.height=cs,ns=!1},ol=[],Ic=(...t)=>{const e=ol.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}),rl=(t,e)=>{qa(t);const s=t.getContext("webgl2",{stencil:!0,premultipliedAlpha:!0,antialias:!1,depth:!1});if(!s)throw new Error("webgl2 is not supported.");Ja(new Za(s,Qa,e))},al=(t,e,s=!0)=>{tl()===t&&el()===e||(sl(t,e),v.resize(t,e,s),s&&_.reset())},ll=0,il=1,ul=2,hl=3,fl=4,bl=5,$l=6,El=7,Tl=8,Al=9,vl=10,Ml=11,xl=12,yl=13,Rl=14,os=(t,e=!1)=>{let s=0;for(;t.length>s;)switch(t[s++]){case Al:v.beginPath();break;case ll:v.moveTo(t[s++],t[s++]);break;case ul:v.lineTo(t[s++],t[s++]);break;case il:v.quadraticCurveTo(t[s++],t[s++],t[s++],t[s++]);break;case bl:if(e){s+=4;break}v.fillStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case El:v.fill();break;case $l:if(e){s+=8;break}v.thickness=t[s++],v.caps=t[s++],v.joints=t[s++],v.miterLimit=t[s++],v.strokeStyle(t[s++]/255,t[s++]/255,t[s++]/255,t[s++]/255);break;case Tl:if(e)break;v.stroke();break;case xl:v.closePath();break;case fl:v.arc(t[s++],t[s++],t[s++]);break;case hl:v.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,v.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++];v.gradientFill(n,o,a,l,h,f)}break;case yl:{if(e){s+=2;const h=t[s++];s+=h,s+=8,v.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++]]);v.bitmapFill(a,l,n,o,!!t[s++],!!t[s++])}break;case Ml:{if(e){s+=20,v.fill();break}v.thickness=t[s++],v.caps=t[s++],v.joints=t[s++],v.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++];v.gradientStroke(n,o,a,l,h,f)}break;case Rl:{if(e){s+=6;const h=t[s++];s+=h,s+=8,v.fill();break}v.thickness=t[s++],v.caps=t[s++],v.joints=t[s++],v.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++]]);v.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++]}\`,M=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($,\`\${M}\`),!g)return e}else{const O=f?new Float32Array(28):null;O&&(O.set(t.subarray(e,e+24)),e+=24),v.useGrid(O);const y=t[e++],x=t.subarray(e,e+y);if(E&&!f){const S=Math.ceil(Math.abs(l-r)),w=Math.ceil(Math.abs(h-a));g=v.createNode(S,w),_.set($,\`\${M}\`,g);const m=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(g);const p=v.atlasAttachmentObject.height-g.y-w;v.setTransform(1,0,0,1,g.x,p),i?(os(x),v.drawFill()):v.drawPixels(g,new Uint8Array(x)),v.endNodeRendering(),m&&v.bind(m)}else{const S=Math.ceil(Math.abs(l-r)*T),w=Math.ceil(Math.abs(h-a)*u);g=v.createNode(S,w),_.set($,\`\${M}\`,g);const m=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(g);const p=v.atlasAttachmentObject.height-g.y-w;v.setTransform(T,0,0,u,-r*T+g.x,-a*u+p),O&&(O[24]=g.x,O[25]=p),os(x),v.drawFill(),v.endNodeRendering(),m&&v.bind(m)}e+=y}const d=t[e++];if(!!t[e++]){const O=!!t[e++],y=t.subarray(e,e+4);e+=4;const x=t[e++],S=t.subarray(e,e+x),w=Math.ceil(Math.abs(o[2]-o[0])),m=Math.ceil(Math.abs(o[3]-o[1]));return v.applyFilter(g,$,O,w,m,E,s,n,Wt(d),y,S),e+=x,e}if(v.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),v.imageSmoothingEnabled=!0,v.globalCompositeOperation=Wt(d),E&&!f)v.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),v.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 x=r*T,S=a*u,w=Math.cos(O),m=Math.sin(O),p=Math.cos(y),R=Math.sin(y);v.setTransform(w,m,-R,p,x*w-S*R+s[4],x*m+S*p+s[5])}else v.setTransform(1,0,0,1,o[0],o[1]);v.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,v.reset(),v.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]);const o=!!t[e++]?new Float32Array(28):null;v.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,v.clip(),e},Cc=(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)},gl=t=>{let e="";return t.italic&&(e+="italic "),t.bold&&(e+="bold "),\`\${e}\${t.size}px '\${t.font}','sans-serif'\`},pl=(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 x=0,S=0;e.focusIndex<=e.selectIndex?(x=Math.min(e.focusIndex,y),S=Math.min(e.selectIndex,y)):(x=Math.min(e.selectIndex,y),S=Math.min(e.focusIndex-1,y));const w=t.textTable[x],m=t.lineTable[w.line],p=Cc(t,m,e);let R=0;if(x&&w.mode==="text"){let b=x;for(;b;){const C=t.textTable[--b];if(C.mode!=="text")break;R+=C.w}}r.fillStyle="#b4d7ff";let B=0;for(let b=x;b<=S;++b){const C=t.textTable[b];if(C.mode==="text"&&(B+=C.w,b!==S))continue;let N=0;const P=C.mode==="text"?C.line:C.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 M=0;if(e.scrollY>0){const y=(e.textHeight-$)/$;M=e.scrollY*y}const T=$+M;let u=0,g=0,L=0,d=0,I=!1,O=-1;for(let y=0;y<t.textTable.length;++y){const x=t.textTable[y];if(!x)continue;if((x.mode==="text"||x.mode==="break")&&(O++,e.stopIndex>-1&&O>e.stopIndex))break;if(I&&x.mode==="text")continue;const S=x.textFormat;if(e.autoSize==="none"){if(g>T)break;if(x.mode==="text"&&(i>u+x.w||u>E)){u+=x.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+L+.1;let R=x.line,B=x.y,b=t.ascentTable[R];x.mode!=="text"&&(B=x.mode==="break"?x.h:t.ascentTable[R-1],R>0?(R=x.line-1,b=t.ascentTable[R]):b=x.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=x.line|0;switch(x.mode){case"break":case"wrap":if(u=0,m&&(g+=t.heightTable[m-1]),M>g+t.heightTable[m]){I=!0;continue}d=t.ascentTable[m],L=Cc(t,x,e),I=!1;break;case"text":{r.beginPath(),r.font=gl(S);const p=u+L,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+x.w,R+2),r.stroke()}e.thickness&&r.strokeText(x.text,p,R),r.fillText(x.text,p,R),u+=x.w}break}}if(e.focusVisible&&e.focusIndex>=t.textTable.length){const y=t.textTable[e.focusIndex-1];if(y){const x=zt(y.textFormat.color||0);r.strokeStyle=\`rgba(\${x.R},\${x.G},\${x.B},\${x.A})\`;const S=u+L+.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},ml=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]),M=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)*M),x=!!t[e++];T=x?_.get(f,\`\${i}\`):v.createNode(O,y),x||_.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=pl(JSON.parse(ml.decode(w)),p,$,M),B=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(T);const b=v.atlasAttachmentObject.height-T.y-y;v.setTransform(1,0,0,1,T.x,b),v.drawElement(T,R),v.endNodeRendering(),B&&v.bind(B)}const g=t[e++];if(!!t[e++]){const O=!!t[e++],y=t.subarray(e,e+4);e+=4;const x=t[e++],S=t.subarray(e,e+x),w=Math.ceil(Math.abs(o[2]-o[0])),m=Math.ceil(Math.abs(o[3]-o[1]));return v.applyFilter(T,f,!!Math.max(+E,+O),w,m,!1,s,n,Wt(g),y,S),e+=x,e}v.globalAlpha=Math.min(Math.max(0,n[3]+n[7]/255),1),v.imageSmoothingEnabled=!0,v.globalCompositeOperation=Wt(g);const d=Math.atan2(s[1],s[0]),I=Math.atan2(-s[2],s[3]);if(d||I){const O=r*$,y=a*M,x=Math.cos(d),S=Math.sin(d),w=Math.cos(I),m=Math.sin(I);v.setTransform(x,S,-m,w,O*x-y*m+s[4],O*S+y*w+s[5])}else v.setTransform(1,0,0,1,o[0],o[1]);return v.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 M;if(t[e++]){if(M=_.get(i,\`\${E}\`),!M)return e}else{const L=Math.abs(h-a),d=Math.abs(f-l),I=!!t[e++];if(M=I?_.get(i,\`\${E}\`):v.createNode(L,d),I||_.set(i,\`\${E}\`,M),s&&s.length){const O=v.currentAttachmentObject;v.bind(v.atlasAttachmentObject),v.reset(),v.beginNodeRendering(M);const y=v.atlasAttachmentObject.height-M.y-d;v.setTransform(1,0,0,1,M.x,y);const x=s.shift();v.drawElement(M,x),v.endNodeRendering(),O&&v.bind(O)}}const u=t[e++];if(!!t[e++]){const L=!!t[e++],d=t.subarray(e,e+4);e+=4;const I=t[e++],O=t.subarray(e,e+I),y=Math.ceil(Math.abs(r[2]-r[0])),x=Math.ceil(Math.abs(r[3]-r[1]));return v.applyFilter(M,i,!!Math.max(+$,+L),y,x,!0,n,o,Wt(u),d,O),e+=I,e}return v.globalAlpha=Math.min(Math.max(0,o[3]+o[7]/255),1),v.imageSmoothingEnabled=!0,v.globalCompositeOperation=Wt(u),v.setTransform(n[0],n[1],n[2],n[3],n[4],n[5]),v.drawDisplayObject(M,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(v.drawArraysInstanced(),v.save(),v.beginMask(),v.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}v.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&&(v.restore(),v.leaveMask()),o=0,r=!0),!r)continue;if(f){if(o=f,r=!!t[e++],!r)continue;switch(v.drawArraysInstanced(),v.save(),v.beginMask(),v.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}v.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)&&(v.restore(),v.leaveMask()),e};let jt=-1;const Ol=(t,e)=>{v.clearTransferBounds();let s=0;const n=t[s++];for(jt!==n&&(jt=n,jt===-1?v.updateBackgroundColor(0,0,0,0):v.updateBackgroundColor(jt>>16&255/255,jt>>8&255/255,jt&255/255,1)),v.reset(),v.setTransform(1,0,0,1,0,0),v.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}}v.drawArraysInstanced(),cl()&&nl(),v.transferMainCanvas()},Fl=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())v.removeNode(o);_.removeById(s)}},dl=async(t,e,s,n=0,o=0,r)=>{v.clearTransferBounds();let a=1;for(v.reset(),v.setTransform(1,0,0,1,0,0),v.updateBackgroundColor(n>>16&255/255,n>>8&255/255,n&255/255,o),v.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 v.drawArraysInstanced(),await v.createImageBitmap(e,s)};class Sl{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":Ol(e.buffer.subarray(0,e.length),e.imageBitmaps),globalThis.postMessage({message:"render",buffer:e.buffer},[e.buffer.buffer]);break;case"resize":al(e.buffer[0],e.buffer[1],!!e.buffer[2]);break;case"initialize":rl(e.canvas,e.devicePixelRatio);break;case"removeCache":Fl(e.buffer);break;case"cacheClear":_.reset();break;case"capture":{const s=await dl(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 Sl;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 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},Yt=()=>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=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 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))}},_r=(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}})}},Dr=(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){_r(this,t,u,s)}removeAllEventListener(t,u=!1){Dr(this,t,u)}willTrigger(t){return Ur(this,t)}}class _e 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=Yt();if(r)switch(r.type){case _e.FOCUS_IN:case _e.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 w 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=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 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 me 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=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)),ma=(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)),xa=(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 ma(this,t)}static interpolate(t,u,s){return ga(t,u,s)}normalize(t){xa(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},_a=(e,t)=>{e.x-=t.x,e.width+=2*t.x,e.y-=t.y,e.height+=2*t.y},Da=(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){_a(this,t)}intersection(t){return Da(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++,mn=[],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},xn=[],Ja=()=>xn.pop()||new Map,ja=e=>{e.clear(),xn.push(e)},U=(...e)=>{const t=mn.pop()||[];return e.length&&t.push(...e),t},ee=e=>{e.length&&(e.length=0),mn.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,mi=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 mi(this)}toNumberArray(){return gi(this)}canApplyFilter(){return $i(this)}}const xi=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 xi(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))},_i=180/Math.PI,Di=e=>{const t=e.$matrix?e.$matrix.rawData:N(e);return t?Math.atan2(t[1],t[0])*_i: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,x=e*a+s*c+d,R=e*a+t*c+d;return he(Math.min(l,h,b,f),Math.min(p,$,x,R),Math.max(l,h,b,f),Math.max(p,$,x,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 _t{_$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}}}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 _t(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),x=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,x),e.yMax=Math.max(e.yMax,R),a==="round"||a==="square"){const S=t+f*-d,k=u+f*-l,_=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,_),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,x=$-c;return e.moveTo(h,u).lineTo(f,u).cubicCurveTo(f+d,u,b,p-l,b,p).lineTo(b,x).cubicCurveTo(b,x+l,f+d,$,f,$).lineTo(h,$).cubicCurveTo(h-d,$,t,x+l,t,x).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 _t(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 _t(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]);const o=ic(t,n.buffer,s);return 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 x=r[$];if(x&&!x.isMask){if(x.clipDepth){h=c.length,l=x.clipDepth,c.push(x);continue}x.visible&&(l&&x.placeId>l&&(h=0,l=0),h&&d.set(x.instanceId,h),o.push(x))}}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 x=!1;switch(!0){case $.isContainerEnabled:x=He($,t,i,s,b);break;case $.isShape:x=Ot($,t,i,s);break;case $.isText:x=Ft($,t,i,s);break;case $.isVideo:x=Lt($,t,i,s);break}if(x){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?Di(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(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&&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(g.REMOVED)&&e.dispatchEvent(new g(g.REMOVED,!0)))},_n=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&&(_n(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)&&(_n(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)},Dn=(e,t)=>{const u=e.children;return t in u?u[t]:null},fc=(e,t)=>{const u=Dn(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},mc=(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),V(e)},xc=(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 Dn(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){mc(this,t)}setChildIndex(t,u){gc(this,t,u)}swapChildren(t,u){xc(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(g.COMPLETE)&&e.dispatchEvent(new g(g.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 Dt=()=>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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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 ge;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ge||(ge={}));class _c{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)|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===ge.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=Dc(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 Dc(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 m;(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"})(m||(m={}));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 xe;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(xe||(xe={}));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=m.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=m.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 _c(t?Oc:kc,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=m.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=m.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=m.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=m.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=m.InCommentLike,this.currentSequence=z.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=m.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=m.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=m.SpecialStartSequence}stateBeforeTagName(t){if(t===I.ExclamationMark)this.state=m.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===I.Questionmark)this.state=m.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const u=t|32;this.sectionStart=this.index,this.xmlMode?this.state=m.InTagName:u===z.ScriptEnd[2]?this.state=m.BeforeSpecialS:u===z.TitleEnd[2]||u===z.XmpEnd[2]?this.state=m.BeforeSpecialT:this.state=m.InTagName}else t===I.Slash?this.state=m.BeforeClosingTagName:(this.state=m.Text,this.stateText(t))}stateInTagName(t){Mt(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){ye(t)||(t===I.Gt?this.state=m.Text:(this.state=this.isTagStartChar(t)?m.InClosingTagName:m.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===I.Gt||ye(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=m.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.state=m.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===I.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=m.InSpecialTag,this.sequenceIndex=0):this.state=m.Text,this.sectionStart=this.index+1):t===I.Slash?this.state=m.InSelfClosingTag:ye(t)||(this.state=m.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===I.Gt?(this.cbs.onselfclosingtag(this.index),this.state=m.Text,this.sectionStart=this.index+1,this.isSpecial=!1):ye(t)||(this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===I.Eq||Mt(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=m.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===I.Eq?this.state=m.BeforeAttributeValue:t===I.Slash||t===I.Gt?(this.cbs.onattribend(xe.NoValue,this.sectionStart),this.sectionStart=-1,this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t)):ye(t)||(this.cbs.onattribend(xe.NoValue,this.sectionStart),this.state=m.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===I.DoubleQuote?(this.state=m.InAttributeValueDq,this.sectionStart=this.index+1):t===I.SingleQuote?(this.state=m.InAttributeValueSq,this.sectionStart=this.index+1):ye(t)||(this.sectionStart=this.index,this.state=m.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?xe.Double:xe.Single,this.index+1),this.state=m.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(xe.Unquoted,this.index),this.state=m.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===I.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===I.OpeningSquareBracket?(this.state=m.CDATASequence,this.sequenceIndex=0):this.state=t===I.Dash?m.BeforeComment:m.InDeclaration}stateInDeclaration(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=m.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=m.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===I.Dash?(this.state=m.InCommentLike,this.currentSequence=z.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=m.InDeclaration}stateInSpecialComment(t){(t===I.Gt||this.fastForwardTo(I.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=m.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=m.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=m.InTagName,this.stateInTagName(t)}}startEntity(){this.baseState=this.state,this.state=m.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?ge.Strict:this.baseState===m.Text||this.baseState===m.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===m.Text||this.state===m.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===m.InAttributeValueDq||this.state===m.InAttributeValueSq||this.state===m.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 m.Text:{this.stateText(t);break}case m.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case m.InSpecialTag:{this.stateInSpecialTag(t);break}case m.CDATASequence:{this.stateCDATASequence(t);break}case m.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case m.InAttributeName:{this.stateInAttributeName(t);break}case m.InCommentLike:{this.stateInCommentLike(t);break}case m.InSpecialComment:{this.stateInSpecialComment(t);break}case m.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case m.InTagName:{this.stateInTagName(t);break}case m.InClosingTagName:{this.stateInClosingTagName(t);break}case m.BeforeTagName:{this.stateBeforeTagName(t);break}case m.AfterAttributeName:{this.stateAfterAttributeName(t);break}case m.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case m.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case m.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case m.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case m.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case m.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case m.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case m.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case m.InDeclaration:{this.stateInDeclaration(t);break}case m.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case m.BeforeComment:{this.stateBeforeComment(t);break}case m.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case m.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===m.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===m.InCommentLike?this.currentSequence===z.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===m.InTagName||this.state===m.BeforeAttributeName||this.state===m.BeforeAttributeValue||this.state===m.AfterAttributeName||this.state===m.InAttributeName||this.state===m.InAttributeValueSq||this.state===m.InAttributeValueDq||this.state===m.InAttributeValueNq||this.state===m.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,u){this.baseState!==m.Text&&this.baseState!==m.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===xe.Double?'"':t===xe.Single?"'":t===xe.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 x=u.textTable.length-f;if(0>=x){p=!1,f=0;break}const R=u.textTable[x];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 x=u.textTable.length-f;u.textTable.splice(x,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<x;++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=x+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}}},_u=(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),_u(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}_u(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),_u(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),D=e=>{e.changed=!0;const t=e.parent;t&&!t.changed&&D(t)},Du=e=>{e.$textData=null,D(e),e.uniqueKey!==""&&O.has(e.uniqueKey)&&(O.removeById(e.uniqueKey),O.$removeIds.push(+e.uniqueKey))},ro=e=>{if(D(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;)Du(e),q(e,s++);if(e.height&&e.textHeight)for(;t>s&&e.textHeight+4>e.height;)Du(e),q(e,s++);D(e)},Te=e=>{Du(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))}D(e)},ae=()=>{const e=Dt();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,D(e),Hn(setTimeout(()=>le(e),500)),oo(e)},lo=(e,t)=>{e.willTrigger(t)&&e.dispatchEvent(new _e(t)),ie.value="",e.focus?(setTimeout(()=>{ie.focus()},300),Dt()===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()),D(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,mo=(e,t,u,s)=>(e/=s)*e*e*u+t,go=(e,t,u,s)=>(e/=s,(--e*e*e+1)*u+t),xo=(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,_o=(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,Do=(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-De.outBounce(s-e,0,u,s)+t,Xo=(e,t,u,s)=>e<s/2?De.inBounce(e*2,t,u/2,s):De.outBounce(e*2-s,t+u/2,u/2,s);class De{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 mo(t,u,s,n)}static outCubic(t,u,s,n){return go(t,u,s,n)}static inOutCubic(t,u,s,n){return xo(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 _o(t,u,s,n)}static inOutElastic(t,u,s,n){return Do(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(me.STOP)&&e.dispatchEvent(new me(me.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(me.UPDATE)&&e.dispatchEvent(new me(me.UPDATE)),e.currentTime>=e.duration?(e.hasEventListener(me.COMPLETE)&&e.dispatchEvent(new me(me.COMPLETE)),e.nextJob&&e.nextJob.start(),-1):requestAnimationFrame(u=>{sr(e,u)})),_s=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(()=>{_s(e)},e.delay*1e3):_s(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||De.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){D(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,De.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){D(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,De.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+=`
|
|
655
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+=`
|
|
656
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+=`
|
|
657
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=""},Ds=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,Dt()===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 x=p;s?e.selectIndex!==x&&(e.selectIndex=x,e.focusVisible&&(e.focusVisible=!1,ae()),Ds(e),D(e)):(e.focusIndex!==x||e.selectIndex>-1)&&(e.focusIndex=x,e.selectIndex=-1,D(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 x=p;if(s)e.focusIndex>x?e.focusIndex===x+1?h+$.w/2<d&&(x=-1):h+$.w/2<d&&(x+=1):e.focusIndex===x?h+$.w/2>d&&(x=-1):h+$.w/2>d&&(x-=1),e.selectIndex!==x&&(e.selectIndex=x,e.selectIndex>-1&&(e.focusVisible=!1,ae()),Ds(e),D(e));else{if(h+$.w/2<d){const R=n.textTable[x+1];(!R||R.mode==="text")&&(x+=1)}(e.focusIndex!==x||e.selectIndex>-1)&&(e.focusIndex=x,e.selectIndex=-1,D(e))}return}if(p===n.textTable.length-1&&d>h&&l>b&&f>l&&r>d){const x=n.textTable.length;s?e.selectIndex!==x&&(e.selectIndex=x,e.focusVisible&&(e.focusVisible=!1,ae()),D(e)):(e.focusIndex!==x||e.selectIndex>-1)&&(e.focusIndex=x,e.selectIndex=-1,D(e));return}h+=$.w;break}if(!s)e.focusIndex=n.textTable.length,e.selectIndex=-1,Dt()===void 0?le(e):D(e);else{let x=0;for(let R=0;n.heightTable.length>R;++R)x+=n.heightTable[R];(l>x||2>l)&&(e.selectIndex=2>l?1:n.textTable.length,e.focusVisible&&(e.focusVisible=!1,ae()),D(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(`
|
|
658
|
-
`);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,D(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,D(this))}get backgroundColor(){return this._$backgroundColor}set backgroundColor(t){t=ht(Qe(t),0,16777215,16777215),t!==this._$backgroundColor&&(this._$backgroundColor=t,D(this))}get border(){return this._$border}set border(t){t!==this._$border&&(this._$border=!!t,D(this))}get borderColor(){return this._$borderColor}set borderColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$borderColor&&(this._$borderColor=t,D(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?_e.FOCUS_IN:_e.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,D(this))}get thicknessColor(){return this._$thicknessColor}set thicknessColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$thicknessColor&&(this._$thicknessColor=t,D(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=
|
|
659
|
-
`;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=Oe();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=Oe();e&&h0(e)},f0=e=>{if(!e.data)return;const t=Oe();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,m0=e=>{rr.push(e)};let Be=null;const g0=()=>!!Be,x0=()=>{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(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(Se.IO_ERROR)&&e.dispatchEvent(new Se(Se.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&&(g0()||(e.muted=!0,m0(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()},_0=(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)})},D0=(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(),_0(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),D0(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,Re.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(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(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(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=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(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)))})})();
|
|
660
|
-
`,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(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(Se.IO_ERROR)&&s.dispatchEvent(new Se(Se.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},ms=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}},mr=(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 x=Math.ceil(Math.abs(p-b)),R=Math.ceil(Math.abs($-f));switch(!0){case x===0:case R===0:case x===-1/0:case R===-1/0:case x===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+x||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,_=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]!==_||e.cacheParams[2]!==c[7])&&(e.cacheKey=O.generateKeys(k,_,c[7]),e.cacheParams[0]=k,e.cacheParams[1]=_,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 gt=Math.ceil(Math.abs(Rr-Ts)),xt=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/gt,mu=Ms*Tt/xt,gu=(gt-ys*(1-fu))/gt,xu=(xt-Ms*(1-bu))/xt;if($u>=gu){const ut=pt/(pt+(1-fu));$u=Math.max(ut-1e-5,0),gu=Math.min(ut+1e-5,1)}if(mu>=xu){const ut=Tt/(Tt+(1-bu));mu=Math.max(ut-1e-5,0),xu=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,gt,xt,pt,Tt,$u,mu,fu,bu,gu,xu),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(ms(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,gr=(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 _=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Vt(new Float32Array(_))}`,ee(_)}else e.uniqueKey=`${e.instanceId}`;const x=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]!==x||e.cacheParams[1]!==R||e.cacheParams[2]!==a[7])&&(e.cacheKey=O.generateKeys(x,R,a[7]),e.cacheParams[0]=x,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 _=ll.encode(JSON.stringify(e.$textData));switch(E.push(_.length),E.set(_),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(ms(e.blendMode)),e.filters?.length){let _=!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&&(_=!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,+_,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)},xr=(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)),x=Math.ceil(Math.abs(p-b));switch(!0){case $===0:case x===0:case $===-1/0:case x===-1/0:case $===1/0:case x===1/0:i!==s&&L.release(i),d!==u&&A.release(d),E.push(0);return}if(0>h+$||0>b+x||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,_=e.videoHeight/2;S.save(),S.translate(k,_),S.rotate(Math.PI),S.scale(-1,1),S.drawImage(e.$videoElement,-k,-_,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(ms(e.blendMode)),e.filters?.length){let S=!1;const k=[],_=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(_);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,_[0],_[1],_[2],_[3],k.length),E.set(new Float32Array(k))),F(_)}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 x=Ys($,l,n,r);if(f=!!x,E.push(+f),!x){$.changed=!1;continue}switch(E.push(x[0],x[1],x[2],x[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:mr($,l,i,n,r);break;case $.isText:gr($,l,i,n,r);break;case $.isVideo:xr($,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:mr(e,u,s,n,r);break;case e.isText:gr(e,u,s,n,r);break;case e.isVideo:xr(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 Re.set(t,t),fe.add(t.instanceId),super.addChild(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,Me.postMessage(Mu,Hs)},zs=window.devicePixelRatio||1,gs=()=>{ze.x=0,ze.y=0;const e=mt();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=mt();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`)),gs(),!(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(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(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(g.ENTER_FRAME)&&T.dispatchEvent(new g(g.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)}))},ml=()=>{M.timerId>-1&&cancelAnimationFrame(M.timerId),M.stopFlag=!0,M.timerId=-1,Je.stopAll()},gl=e=>{const t=Oe();if(t){t.keyDown(e);return}T.hasEventListener(B.KEY_DOWN)&&(Ue(e),T.dispatchEvent(new B(B.KEY_DOWN)))},xl=e=>{Oe()||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,xl)};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(){ml()}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 M=new Tl;let Zs="auto";const xs=()=>{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=mt();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=Oe();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),xs(),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),xs(),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=Oe();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),xs(),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=()=>{x0();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:g,EventDispatcher:je,EventPhase:We,FocusEvent:_e,HTTPStatusEvent:St,IOErrorEvent:Se,PointerEvent:w,JobEvent:me,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:De,Tween:hs};Object.entries(ju).forEach(([e,t])=>{Object.defineProperty(ju,e,{get(){return t}})});const Mr=()=>{const e=mt();if(e)for(;e.firstChild;)e.removeChild(e.firstChild)},wr=()=>{const e=mt();if(!e)return;const t=nn();t&&(e.appendChild(t),e.appendChild(ie))},Ar=()=>{T.ready=!0,Tr(),T.changed=!1,M.play()},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>
|
|
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,D(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,D(this))}get backgroundColor(){return this._$backgroundColor}set backgroundColor(t){t=ht(Qe(t),0,16777215,16777215),t!==this._$backgroundColor&&(this._$backgroundColor=t,D(this))}get border(){return this._$border}set border(t){t!==this._$border&&(this._$border=!!t,D(this))}get borderColor(){return this._$borderColor}set borderColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$borderColor&&(this._$borderColor=t,D(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?_e.FOCUS_IN:_e.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,D(this))}get thicknessColor(){return this._$thicknessColor}set thicknessColor(t){t=ht(Qe(t),0,16777215,0),t!==this._$thicknessColor&&(this._$thicknessColor=t,D(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,m0=e=>{rr.push(e)};let Be=null;const g0=()=>!!Be,x0=()=>{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(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 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&&(g0()||(e.muted=!0,m0(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()},_0=(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)})},D0=(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(),_0(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),D0(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(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(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(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=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(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 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(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,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},ms=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}},mr=(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 x=Math.ceil(Math.abs(p-b)),R=Math.ceil(Math.abs($-f));switch(!0){case x===0:case R===0:case x===-1/0:case R===-1/0:case x===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+x||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,_=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]!==_||e.cacheParams[2]!==c[7])&&(e.cacheKey=O.generateKeys(k,_,c[7]),e.cacheParams[0]=k,e.cacheParams[1]=_,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 gt=Math.ceil(Math.abs(Rr-Ts)),xt=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/gt,mu=Ms*Tt/xt,gu=(gt-ys*(1-fu))/gt,xu=(xt-Ms*(1-bu))/xt;if($u>=gu){const ut=pt/(pt+(1-fu));$u=Math.max(ut-1e-5,0),gu=Math.min(ut+1e-5,1)}if(mu>=xu){const ut=Tt/(Tt+(1-bu));mu=Math.max(ut-1e-5,0),xu=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,gt,xt,pt,Tt,$u,mu,fu,bu,gu,xu),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(ms(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,gr=(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 _=U(e.loaderInfo.id,e.characterId);e.uniqueKey=`${Vt(new Float32Array(_))}`,ee(_)}else e.uniqueKey=`${e.instanceId}`;const x=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]!==x||e.cacheParams[1]!==R||e.cacheParams[2]!==a[7])&&(e.cacheKey=O.generateKeys(x,R,a[7]),e.cacheParams[0]=x,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 _=ll.encode(JSON.stringify(e.$textData));switch(E.push(_.length),E.set(_),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(ms(e.blendMode)),e.filters?.length){let _=!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&&(_=!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,+_,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)},xr=(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)),x=Math.ceil(Math.abs(p-b));switch(!0){case $===0:case x===0:case $===-1/0:case x===-1/0:case $===1/0:case x===1/0:i!==s&&L.release(i),d!==u&&A.release(d),E.push(0);return}if(0>h+$||0>b+x||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,_=e.videoHeight/2;S.save(),S.translate(k,_),S.rotate(Math.PI),S.scale(-1,1),S.drawImage(e.$videoElement,-k,-_,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(ms(e.blendMode)),e.filters?.length){let S=!1;const k=[],_=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(_);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,_[0],_[1],_[2],_[3],k.length),E.set(new Float32Array(k))),F(_)}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 x=Ys($,l,n,r);if(f=!!x,E.push(+f),!x){$.changed=!1;continue}switch(E.push(x[0],x[1],x[2],x[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:mr($,l,i,n,r);break;case $.isText:gr($,l,i,n,r);break;case $.isVideo:xr($,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:mr(e,u,s,n,r);break;case e.isText:gr(e,u,s,n,r);break;case e.isVideo:xr(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 ke.set(t,t),fe.add(t.instanceId),super.addChild(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,gs=()=>{ze.x=0,ze.y=0;const e=mt();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=mt();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`)),gs(),!(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(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=[];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(g.ENTER_FRAME)&&T.dispatchEvent(new g(g.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)}))},ml=()=>{M.timerId>-1&&cancelAnimationFrame(M.timerId),M.stopFlag=!0,M.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)))},xl=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,xl)};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(){ml()}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 xs=()=>{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=mt();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),xs(),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),xs(),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),xs(),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=()=>{x0();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:g,EventDispatcher:je,EventPhase:We,FocusEvent:_e,HTTPStatusEvent:St,IOErrorEvent:Re,PointerEvent:w,JobEvent:me,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:De,Tween:hs};Object.entries(ju).forEach(([e,t])=>{Object.defineProperty(ju,e,{get(){return t}})});const Mr=()=>{const e=mt();if(e)for(;e.firstChild;)e.removeChild(e.firstChild)},wr=()=>{const e=mt();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>
|
|
661
666
|
#${t} {
|
|
662
667
|
width: 50px;
|
|
663
668
|
height: 50px;
|
|
@@ -676,4 +681,4 @@ void main() {
|
|
|
676
681
|
}
|
|
677
682
|
}
|
|
678
683
|
</style>
|
|
679
|
-
<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(
|
|
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(),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=Ct(u,1,60,60),vr(s);const n=T.addChild(new cs);return Ar(),Mr(),wr(),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),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]),_l=new Float32Array([1,1,1,1,0,0,0,0]),Dl=async(e,t=null)=>{t&&t.videoSync&&await Ir(e);const u=t&&t.colorTransform?t.colorTransform.rawData:_l,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 Dl(t,u)}}"next2d"in window||(console.log("%c Next2D Player %c 2.6.0 %c https://next2d.app","color: #fff; background: #5f5f5f","color: #fff; background: #4bc729",""),window.next2d=new Ul);
|