@qratilabs/qrati-connect 2.33.0 → 2.33.1
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/element/{BX09gwBu.js → 73mz8Fz4.js} +1 -1
- package/element/{CfNXbM5H.js → BC9KIhak.js} +1 -1
- package/element/{ILtcTVir.js → BCE50OwS.js} +1 -1
- package/element/{DMAkdDxr.js → BFC2aU2J.js} +2 -2
- package/element/{D9jzGMeN.js → BSGK1Ri1.js} +1 -1
- package/element/{DjKx2bl9.js → Bb_tv1V-.js} +1 -1
- package/element/{plowVrDm.js → BiNwD6VL.js} +1 -1
- package/element/{BtLTtkX8.js → BiZqzQNR.js} +1 -1
- package/element/{BuT9kfma.js → BlwHCgeI.js} +1 -1
- package/element/{xPFFaUda.js → BxxWXMGe.js} +1 -1
- package/element/{ThvpIBOm.js → CTTFfh11.js} +1 -1
- package/element/{BzXQkPAW.js → CW7Iwd96.js} +1 -1
- package/element/{qTO-oPOF.js → CX1SNDQH.js} +1 -1
- package/element/{DExU6-v2.js → CeJICm77.js} +1 -1
- package/element/{X8kQCV14.js → CmtEFeGF.js} +1 -1
- package/element/{BgmJHB_q.js → CnxxYHOX.js} +2 -2
- package/element/{DjFlbVE4.js → Cs6qJQxX.js} +1 -1
- package/element/{k9JmIPl-.js → Cx6rq6N5.js} +1 -1
- package/element/{Bpjf4eY9.js → Czk6IR70.js} +1 -1
- package/element/{DkrE1H9J.js → D1TFBkCS.js} +1 -1
- package/element/{PxjP9VKW.js → DA0XxXKx.js} +1 -1
- package/element/{BhPQW37y.js → DB6HdxlA.js} +1 -1
- package/element/{SAPFe3AV.js → DHBHbWIA.js} +1 -1
- package/element/{CrZvMeF8.js → DKRKwBRc.js} +1 -1
- package/element/{BhUO8wHu.js → DV8JHO97.js} +1 -1
- package/element/{Bx-BFs7B.js → DVDZfY1d.js} +1 -1
- package/element/{Crg6P9Om.js → DdLLa5wm.js} +1 -1
- package/element/{DnrkqfsH.js → DjHszKev.js} +1 -1
- package/element/{RLxieWpc.js → DmaTYIJu.js} +1 -1
- package/element/{CGJtMtq6.js → Dr2e01jA.js} +2 -2
- package/element/{CVlMw3Vf.js → DuVfaq4G.js} +1 -1
- package/element/{ChW2P7vL.js → Dubduzq7.js} +1 -1
- package/element/{x3_URwMQ.js → DwhpFWNq.js} +1 -1
- package/element/{BhYfK52W.js → FE0pIRqe.js} +5 -5
- package/element/{pRu0r7dI.js → HkakucIO.js} +1 -1
- package/element/{ZWATOkpE.js → V6RGWsa9.js} +1 -1
- package/element/{Bjbk1Zhj.js → XIzy_5YD.js} +1 -1
- package/element/{BjDK8Ljd.js → hjsqLu1P.js} +2 -2
- package/element/web.es.js +1 -1
- package/embed/embed.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Cn as e,Ct as t,G as l,On as n,un as r,xn as s}from"./
|
|
1
|
+
import{Cn as e,Ct as t,G as l,On as n,un as r,xn as s}from"./FE0pIRqe.js";var a=()=>/* @__PURE__ */r("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */r("path",{d:"m15 18-6-6 6-6"})}),o=()=>/* @__PURE__ */r("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */r("path",{d:"m9 18 6-6-6-6"})});function i({items:l,autoplayInterval:i=3e3,showControls:d=!1,className:c}){const[u,h]=s(0);return e(()=>{if(l.length<=1)return;const e=setInterval(()=>h(e=>(e+1)%l.length),i);return()=>clearInterval(e)},[l.length,i]),0===l.length?null:/* @__PURE__ */r("div",{className:t("relative size-full overflow-hidden",c),children:[l.map((e,l)=>/* @__PURE__ */r("div",{className:t("absolute inset-0 transition-opacity duration-500",l===u?"opacity-100":"opacity-0"),children:e},l)),l.length>1&&/* @__PURE__ */r("div",{className:"absolute bottom-2 left-1/2 z-10 flex -translate-x-1/2 gap-1",children:l.map((e,l)=>/* @__PURE__ */r("button",{onClick:()=>h(l),className:t("h-1.5 rounded-full transition-all",l===u?"w-4 bg-white":"w-1.5 bg-white/50 hover:bg-white/75"),"aria-label":`Go to slide ${l+1}`},l))}),d&&l.length>1&&/* @__PURE__ */r(n,{children:[/* @__PURE__ */r("button",{onClick:()=>h(e=>0===e?l.length-1:e-1),className:"absolute top-1/2 left-2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white hover:bg-black/60","aria-label":"Previous",children:/* @__PURE__ */r(a,{})}),/* @__PURE__ */r("button",{onClick:()=>h(e=>(e+1)%l.length),className:"absolute top-1/2 right-2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white hover:bg-black/60","aria-label":"Next",children:/* @__PURE__ */r(o,{})})]})]})}var d=({event:e,onExplore:t})=>{const n=(e.contents||[]).map(t=>/* @__PURE__ */r(l,{alt:e.name,src:t.thumbnailUrl||t.url,containerClassName:"size-full",imgClassName:"rounded"},t._id)),s=e?.status?.toUpperCase();/* @__PURE__ */
|
|
2
2
|
return r("div",{className:"w-48 max-w-full overflow-hidden rounded-lg bg-white",children:[/* @__PURE__ */r("div",{className:"relative h-40 w-full overflow-hidden",children:[/* @__PURE__ */r(i,{items:n,autoplayInterval:3e3}),"OPEN"===s&&/* @__PURE__ */r("span",{className:"absolute top-2 left-2 inline-flex items-center gap-1 rounded-full bg-green-500 px-2 py-0.5 text-[10px] font-medium text-white",children:[/* @__PURE__ */r("span",{className:"size-1.5 animate-pulse rounded-full bg-white"}),"Open"]})]}),/* @__PURE__ */r("div",{className:"p-2",children:[
|
|
3
3
|
/* @__PURE__ */r("div",{className:"line-clamp-2 pb-0.5 text-sm font-medium text-black",children:e.name}),
|
|
4
4
|
/* @__PURE__ */r("div",{className:"pb-2 text-xs text-gray-600",children:e.location?.label}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{un as e}from"./
|
|
1
|
+
import{un as e}from"./FE0pIRqe.js";function t({className:t}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M6 20q-.825 0-1.412-.587T4 18v-2q0-.425.288-.712T5 15t.713.288T6 16v2h12v-2q0-.425.288-.712T19 15t.713.288T20 16v2q0 .825-.587 1.413T18 20zm5-12.15L9.125 9.725q-.3.3-.712.288T7.7 9.7q-.275-.3-.288-.7t.288-.7l3.6-3.6q.15-.15.325-.212T12 4.425t.375.063t.325.212l3.6 3.6q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L13 7.85V15q0 .425-.288.713T12 16t-.712-.288T11 15z"})})}var r=/\.(mp4|mov|avi|mkv|webm|qt)$/i,n=/heic|heif/i,i=/\.(heic|heif)$/i,o=/\.(heic|heif|jpg|jpeg|png|webp|gif)$/i;function a(e){return e.type.startsWith("video/")||r.test(e.name)}function f(e){return e.type.startsWith("image/")||o.test(e.name)}function s(e){return n.test(e.type)||i.test(e.name)}async function c(e){const t=e.type.trim().toLowerCase(),n=e.name.toLowerCase(),a=r.test(n),f=o.test(n),s=i.test(n);if(t&&"application/octet-stream"!==t&&!(t.startsWith("image/")&&a||t.startsWith("video/")&&f||t.startsWith("image/")&&s))return t;try{const t=new Uint8Array(await e.slice(0,12).arrayBuffer());if(82===t[0]&&73===t[1]&&70===t[2]&&70===t[3]){if(87===t[8]&&69===t[9]&&66===t[10]&&80===t[11])return"image/webp";if(65===t[8]&&86===t[9]&&73===t[10]&&32===t[11])return"video/x-msvideo"}if(255===t[0]&&216===t[1]&&255===t[2])return"image/jpeg";if(137===t[0]&&80===t[1]&&78===t[2]&&71===t[3])return"image/png";if(71===t[0]&&73===t[1]&&70===t[2]&&56===t[3])return"image/gif";if(26===t[0]&&69===t[1]&&223===t[2]&&163===t[3])return n.endsWith(".webm")?"video/webm":"video/x-matroska";const r=102===t[4]&&116===t[5]&&121===t[6]&&112===t[7],i=109===t[4]&&111===t[5]&&111===t[6]&&118===t[7],o=109===t[4]&&100===t[5]&&97===t[6]&&116===t[7];if(r||i||o){if(r){const e=String.fromCharCode(t[8]??0,t[9]??0,t[10]??0,t[11]??0).trim().toLowerCase();if("heic"===e||"heix"===e||"mif1"===e)return"image/heic";if("qt "===e)return"video/quicktime"}return a&&(n.endsWith(".mov")||n.endsWith(".qt"))?"video/quicktime":"video/mp4"}}catch{}return t||"application/octet-stream"}var l="image/jpeg",u=/* @__PURE__ */new WeakMap;async function h(e){if(!s(e))return e;const t=u.get(e);if(t)return t;const{loadHeic2any:r}=await(import("./DnIueBGr.js")),n=await(await r())({blob:e,toType:l}),i=Array.isArray(n)?n[0]:n,o=e.name.replace(/\.(heic|heif)$/i,""),a=new File([i],`${o}.jpg`,{type:l});return u.set(e,a),a}async function d(e){if(e instanceof File&&s(e)){const t=await h(e);return URL.createObjectURL(t)}return URL.createObjectURL(e)}function g(e,t){return new Promise(function(r,n){let i;return w(e).then(function(e){try{return i=e,r(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(e){return n(e)}},n)})}var w=e=>new Promise((t,r)=>{const n=new FileReader;n.addEventListener("load",({target:{result:e}})=>{const n=new DataView(e);let i=0;if(65496!==n.getUint16(i))return r("not a valid JPEG");for(i+=2;;){const o=n.getUint16(i);if(65498===o)break;const a=n.getUint16(i+2);if(65505===o&&1165519206===n.getUint32(i+4)){const o=i+10;let f;switch(n.getUint16(o)){case 18761:f=!0;break;case 19789:f=!1;break;default:return r("TIFF header contains invalid endian")}if(42!==n.getUint16(o+2,f))return r("TIFF header contains invalid version");const s=n.getUint32(o+4,f),c=o+s+2+12*n.getUint16(o+s,f);for(let e=o+s+2;e<c;e+=12)if(274==n.getUint16(e,f)){if(3!==n.getUint16(e+2,f))return r("Orientation data type is invalid");if(1!==n.getUint32(e+4,f))return r("Orientation data count is invalid");n.setUint16(e+8,1,f);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),n.readAsArrayBuffer(e)}),A={},p={get exports(){return A},set exports(e){A=e}};!function(){var e,t,r={};p.exports=r,r.parse=function(e,t){for(var n=r.bin.readUshort,i=r.bin.readUint,o=0,a={},f=new Uint8Array(e),s=f.length-4;101010256!=i(f,s);)s--;o=s,o+=4;var c=n(f,o+=4);n(f,o+=2);var l=i(f,o+=2),u=i(f,o+=4);o+=4,o=u;for(var h=0;h<c;h++){i(f,o),o+=4,o+=4,o+=4,i(f,o+=4),l=i(f,o+=4);var d=i(f,o+=4),g=n(f,o+=4),w=n(f,o+2),A=n(f,o+4);o+=6;var p=i(f,o+=8);o+=4,o+=g+w+A,r._readLocal(f,p,a,l,d,t)}return a},r._readLocal=function(e,t,n,i,o,a){var f=r.bin.readUshort,s=r.bin.readUint;s(e,t),f(e,t+=4),f(e,t+=2);var c=f(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var l=f(e,t+=8),u=f(e,t+=2);t+=2;var h=r.bin.readUTF8(e,t,l);if(t+=l,t+=u,a)n[h]={size:o,csize:i};else{var d=new Uint8Array(e.buffer,t);if(0==c)n[h]=new Uint8Array(d.buffer.slice(t,t+i));else{if(8!=c)throw"unknown compression method: "+c;var g=new Uint8Array(o);r.inflateRaw(d,g),n[h]=g}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t??={level:6};var n=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[n]=120,i[n+1]=156,n+=2,n=r.F.deflateRaw(e,i,n,t.level);var o=r.adler(e,0,e.length);return i[n+0]=o>>>24&255,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=o>>>0&255,new Uint8Array(i.buffer,0,n+4)},r.deflateRaw=function(e,t){t??={level:6};var n=new Uint8Array(50+Math.floor(1.1*e.length)),i=r.F.deflateRaw(e,n,i,t.level);return new Uint8Array(n.buffer,0,i)},r.encode=function(e,t){t??=!1;var n=0,i=r.bin.writeUint,o=r.bin.writeUshort,a={};for(var f in e){var s=!r._noNeed(f)&&!t,c=e[f],l=r.crc.crc(c,0,c.length);a[f]={cpr:s,usize:c.length,crc:l,file:s?r.deflateRaw(c):c}}for(var f in a)n+=a[f].file.length+30+46+2*r.bin.sizeUTF8(f);n+=22;var u=new Uint8Array(n),h=0,d=[];for(var f in a){var g=a[f];d.push(h),h=r._writeHeader(u,h,f,g,0)}var w=0,A=h;for(var f in a)g=a[f],d.push(h),h=r._writeHeader(u,h,f,g,1,d[w++]);var p=h-A;return i(u,h,101010256),h+=4,o(u,h+=4,w),o(u,h+=2,w),i(u,h+=2,p),i(u,h+=4,A),h+=4,h+=2,u.buffer},r._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},r._writeHeader=function(e,t,n,i,o,a){var f=r.bin.writeUint,s=r.bin.writeUshort,c=i.file;return f(e,t,0==o?67324752:33639248),t+=4,1==o&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,i.cpr?8:0),f(e,t+=2,0),f(e,t+=4,i.crc),f(e,t+=4,c.length),f(e,t+=4,i.usize),s(e,t+=4,r.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,f(e,t+=6,a),t+=4),t+=r.bin.writeUTF8(e,t,n),0==o&&(e.set(c,t),t+=c.length),t},r.crc={table:function(){for(var e=/* @__PURE__ */new Uint32Array(256),t=0;t<256;t++){for(var r=t,n=0;n<8;n++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update:function(e,t,n,i){for(var o=0;o<i;o++)e=r.crc.table[255&(e^t[n+o])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^r.crc.update(4294967295,e,t,n)}},r.adler=function(e,t,r){for(var n=1,i=0,o=t,a=t+r;o<a;){for(var f=Math.min(o+5552,a);o<f;)i+=n+=e[o++];n%=65521,i%=65521}return i<<16|n},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255},readASCII:function(e,t,r){for(var n="",i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},writeASCII:function(e,t,r){for(var n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var i,o="",a=0;a<n;a++)o+="%"+r.bin.pad(e[t+a].toString(16));try{i=decodeURIComponent(o)}catch(i){return r.bin.readASCII(e,t,n)}return i},writeUTF8:function(e,t,r){for(var n=r.length,i=0,o=0;o<n;o++){var a=r.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,r=0,n=0;n<t;n++){var i=e.charCodeAt(n);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";r+=4}else r+=3;else r+=2;else r++}return r}},r.F={},r.F.deflateRaw=function(e,t,n,i){var o=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],a=r.F.U,f=r.F._goodIndex;r.F._hash;var s=r.F._putsE,c=0,l=n<<3,u=0,h=e.length;if(0==i){for(;c<h;)s(t,l,c+(E=Math.min(65535,h-c))==h?1:0),l=r.F._copyExact(e,c,E,t,l+8),c+=E;return l>>>3}var d=a.lits,g=a.strt,w=a.prev,A=0,p=0,m=0,v=0,b=0,y=0;for(h>2&&(g[y=r.F._hash(e,0)]=0),c=0;c<h;c++){if(b=y,c+1<h-2){y=r.F._hash(e,c+1);var U=c+1&32767;w[U]=g[y],g[y]=U}if(u<=c){(A>14e3||p>26697)&&h-c>100&&(u<c&&(d[A]=c-u,A+=2,u=c),l=r.F._writeBlock(c==h-1||u==h?1:0,d,A,v,e,m,c-m,t,l),A=p=v=0,m=c);var F=0;c<h-2&&(F=r.F._bestMatch(e,c,w,b,Math.min(o[2],h-c),o[3]));var E=F>>>16,_=65535&F;if(0!=F){_=65535&F;var C=f(E=F>>>16,a.of0);a.lhst[257+C]++;var B=f(_,a.df0);a.dhst[B]++,v+=a.exb[C]+a.dxb[B],d[A]=E<<23|c-u,d[A+1]=_<<16|C<<8|B,A+=2,u=c+E}else a.lhst[e[c]]++;p++}}for(m==c&&0!=e.length||(u<c&&(d[A]=c-u,A+=2,u=c),l=r.F._writeBlock(1,d,A,v,e,m,c-m,t,l),A=0,p=0,A=p=v=0,m=c);7&l;)l++;return l>>>3},r.F._bestMatch=function(e,t,n,i,o,a){var f=32767&t,s=n[f],c=f-s+32768&32767;if(s==f||i!=r.F._hash(e,t-c))return 0;for(var l=0,u=0,h=Math.min(32767,t);c<=h&&0!=--a&&s!=f;){if(0==l||e[t+l]==e[t+l-c]){var d=r.F._howLong(e,t,c);if(d>l){if(u=c,(l=d)>=o)break;c+2<d&&(d=c+2);for(var g=0,w=0;w<d-2;w++){var A=t-c+w+32768&32767,p=A-n[A]+32768&32767;p>g&&(g=p,s=A)}}}c+=(f=s)-(s=n[f])+32768&32767}return l<<16|u},r.F._howLong=function(e,t,r){if(e[t]!=e[t-r]||e[t+1]!=e[t+1-r]||e[t+2]!=e[t+2-r])return 0;var n=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-r];)t++;return t-n},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,n,i,o,a,f,s,c){var l,u,h,d,g,w,A,p,m,v=r.F.U,b=r.F._putsF,y=r.F._putsE;v.lhst[256]++,u=(l=r.F.getTrees())[0],h=l[1],d=l[2],g=l[3],w=l[4],A=l[5],p=l[6],m=l[7];var U=32+(c+3&7?8-(c+3&7):0)+(f<<3),F=i+r.F.contSize(v.fltree,v.lhst)+r.F.contSize(v.fdtree,v.dhst),E=i+r.F.contSize(v.ltree,v.lhst)+r.F.contSize(v.dtree,v.dhst);E+=14+3*A+r.F.contSize(v.itree,v.ihst)+(2*v.ihst[16]+3*v.ihst[17]+7*v.ihst[18]);for(var _=0;_<286;_++)v.lhst[_]=0;for(_=0;_<30;_++)v.dhst[_]=0;for(_=0;_<19;_++)v.ihst[_]=0;var C=U<F&&U<E?0:F<E?1:2;if(b(s,c,e),b(s,c+1,C),c+=3,0==C){for(;7&c;)c++;c=r.F._copyExact(o,a,f,s,c)}else{var B,I;if(1==C&&(B=v.fltree,I=v.fdtree),2==C){r.F.makeCodes(v.ltree,u),r.F.revCodes(v.ltree,u),r.F.makeCodes(v.dtree,h),r.F.revCodes(v.dtree,h),r.F.makeCodes(v.itree,d),r.F.revCodes(v.itree,d),B=v.ltree,I=v.dtree,y(s,c,g-257),y(s,c+=5,w-1),y(s,c+=5,A-4),c+=4;for(var M=0;M<A;M++)y(s,c+3*M,v.itree[1+(v.ordr[M]<<1)]);c+=3*A,c=r.F._codeTiny(p,v.itree,s,c),c=r.F._codeTiny(m,v.itree,s,c)}for(var T=a,R=0;R<n;R+=2){for(var x=t[R],S=x>>>23,Q=T+(8388607&x);T<Q;)c=r.F._writeLit(o[T++],B,s,c);if(0!=S){var k=t[R+1],L=k>>16,H=k>>8&255,O=255&k;y(s,c=r.F._writeLit(257+H,B,s,c),S-v.of0[H]),c+=v.exb[H],b(s,c=r.F._writeLit(O,I,s,c),L-v.df0[O]),c+=v.dxb[O],T+=S}}c=r.F._writeLit(256,B,s,c)}return c},r.F._copyExact=function(e,t,r,n,i){var o=i>>>3;return n[o]=r,n[o+1]=r>>>8,n[o+2]=255-n[o],n[o+3]=255-n[o+1],o+=4,n.set(new Uint8Array(e.buffer,t,r),o),i+(r+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),n=r.F._hufTree(e.dhst,e.dtree,15),i=[],o=r.F._lenCodes(e.ltree,i),a=[],f=r.F._lenCodes(e.dtree,a),s=0;s<i.length;s+=2)e.ihst[i[s]]++;for(s=0;s<a.length;s+=2)e.ihst[a[s]]++;for(var c=r.F._hufTree(e.ihst,e.itree,7),l=19;l>4&&0==e.itree[1+(e.ordr[l-1]<<1)];)l--;return[t,n,c,o,f,l,i,a]},r.F.getSecond=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(e[r+1]);return t},r.F.nonZero=function(e){for(var t="",r=0;r<e.length;r+=2)0!=e[r+1]&&(t+=(r>>1)+",");return t},r.F.contSize=function(e,t){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[1+(n<<1)];return r},r.F._codeTiny=function(e,t,n,i){for(var o=0;o<e.length;o+=2){var a=e[o],f=e[o+1];i=r.F._writeLit(a,t,n,i);var s=16==a?2:17==a?3:7;a>15&&(r.F._putsE(n,i,f,s),i+=s)}return i},r.F._lenCodes=function(e,t){for(var r=e.length;2!=r&&0==e[r-1];)r-=2;for(var n=0;n<r;n+=2){var i=e[n+1],o=n+3<r?e[n+3]:-1,a=n+5<r?e[n+5]:-1,f=0==n?-1:e[n-1];if(0==i&&o==i&&a==i){for(var s=n+5;s+2<r&&e[s+2]==i;)s+=2;(c=Math.min(s+1-n>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),n+=2*c-2}else if(i==f&&o==i&&a==i){for(s=n+5;s+2<r&&e[s+2]==i;)s+=2;var c=Math.min(s+1-n>>>1,6);t.push(16,c-3),n+=2*c-2}else t.push(i,0)}return r>>>1},r.F._hufTree=function(e,t,n){var i=[],o=e.length,a=t.length,f=0;for(f=0;f<a;f+=2)t[f]=0,t[f+1]=0;for(f=0;f<o;f++)0!=e[f]&&i.push({lit:f,f:e[f]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,t[1+(l<<1)]=1,t[1+(c<<1)]=1,1}i.sort(function(e,t){return e.f-t.f});var u=i[0],h=i[1],d=0,g=1,w=2;for(i[0]={lit:-1,f:u.f+h.f,l:u,r:h,d:0};g!=s-1;)u=d!=g&&(w==s||i[d].f<i[w].f)?i[d++]:i[w++],h=d!=g&&(w==s||i[d].f<i[w].f)?i[d++]:i[w++],i[g++]={lit:-1,f:u.f+h.f,l:u,r:h};var A=r.F.setDepth(i[g-1],0);for(A>n&&(r.F.restrictDepth(c,n,A),A=n),f=0;f<s;f++)t[1+(c[f].lit<<1)]=c[f].d;return A},r.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1))},r.F.restrictDepth=function(e,t,r){var n=0,i=1<<r-t,o=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),n=0;n<e.length&&e[n].d>t;n++){var a=e[n].d;e[n].d=t,o+=i-(1<<r-a)}for(o>>>=r-t;o>0;)(a=e[n].d)<t?(e[n].d++,o-=1<<t-a-1):n++;for(;n>=0;n--)e[n].d==t&&o<0&&(e[n].d--,o++);0!=o&&console.log("debt left")},r.F._goodIndex=function(e,t){var r=0;return t[16|r]<=e&&(r|=16),t[8|r]<=e&&(r|=8),t[4|r]<=e&&(r|=4),t[2|r]<=e&&(r|=2),t[1|r]<=e&&(r|=1),r},r.F._writeLit=function(e,t,n,i){return r.F._putsF(n,i,t[e<<1]),i+t[1+(e<<1)]},r.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var i=r.F,o=i._bitsF,a=i._bitsE,f=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,u=i.U,h=null==t;h&&(t=new n(e.length>>>2<<3));for(var d,g,w=0,A=0,p=0,m=0,v=0,b=0,y=0,U=0,F=0;0==w;)if(w=o(e,F,1),A=o(e,F+1,2),F+=3,0!=A){if(h&&(t=r.F._check(t,U+(1<<17))),1==A&&(d=u.flmap,g=u.fdmap,b=511,y=31),2==A){p=a(e,F,5)+257,m=a(e,F+5,5)+1,v=a(e,F+10,4)+4,F+=14;for(var E=0;E<38;E+=2)u.itree[E]=0,u.itree[E+1]=0;var _=1;for(E=0;E<v;E++){var C=a(e,F+3*E,3);u.itree[1+(u.ordr[E]<<1)]=C,C>_&&(_=C)}F+=3*v,s(u.itree,_),c(u.itree,_,u.imap),d=u.lmap,g=u.dmap,F=f(u.imap,(1<<_)-1,p+m,e,F,u.ttree);var B=i._copyOut(u.ttree,0,p,u.ltree);b=(1<<B)-1;var I=i._copyOut(u.ttree,p,m,u.dtree);y=(1<<I)-1,s(u.ltree,B),c(u.ltree,B,d),s(u.dtree,I),c(u.dtree,I,g)}for(;;){var M=d[l(e,F)&b];F+=15&M;var T=M>>>4;if(T>>>8==0)t[U++]=T;else{if(256==T)break;var R=U+T-254;if(T>264){var x=u.ldef[T-257];R=U+(x>>>3)+a(e,F,7&x),F+=7&x}var S=g[l(e,F)&y];F+=15&S;var Q=S>>>4,k=u.ddef[Q],L=(k>>>4)+o(e,F,15&k);for(F+=15&k,h&&(t=r.F._check(t,U+(1<<17)));U<R;)t[U]=t[U++-L],t[U]=t[U++-L],t[U]=t[U++-L],t[U]=t[U++-L];U=R}}}else{7&F&&(F+=8-(7&F));var H=4+(F>>>3),O=e[H-4]|e[H-3]<<8;h&&(t=r.F._check(t,U+O)),t.set(new n(e.buffer,e.byteOffset+H,O),U),F=H+O<<3,U+=O}return t.length==U?t:t.slice(0,U)},r.F._check=function(e,t){var r=e.length;if(t<=r)return e;var n=new Uint8Array(Math.max(r<<1,t));return n.set(e,0),n},r.F._decodeTiny=function(e,t,n,i,o,a){for(var f=r.F._bitsE,s=r.F._get17,c=0;c<n;){var l=e[s(i,o)&t];o+=15&l;var u=l>>>4;if(u<=15)a[c]=u,c++;else{var h=0,d=0;16==u?(d=3+f(i,o,2),o+=2,h=a[c-1]):17==u?(d=3+f(i,o,3),o+=3):18==u&&(d=11+f(i,o,7),o+=7);for(var g=c+d;c<g;)a[c]=h,c++}}return o},r.F._copyOut=function(e,t,r,n){for(var i=0,o=0,a=n.length>>>1;o<r;){var f=e[o+t];n[o<<1]=0,n[1+(o<<1)]=f,f>i&&(i=f),o++}for(;o<a;)n[o<<1]=0,n[1+(o<<1)]=0,o++;return i},r.F.makeCodes=function(e,t){for(var n,i,o,a,f=r.F.U,s=e.length,c=f.bl_count,l=0;l<=t;l++)c[l]=0;for(l=1;l<s;l+=2)c[e[l]]++;var u=f.next_code;for(n=0,c[0]=0,i=1;i<=t;i++)n=n+c[i-1]<<1,u[i]=n;for(o=0;o<s;o+=2)0!=(a=e[o+1])&&(e[o]=u[a],u[a]++)},r.F.codes2map=function(e,t,n){for(var i=e.length,o=r.F.U.rev15,a=0;a<i;a+=2)if(0!=e[a+1])for(var f=a>>1,s=e[a+1],c=f<<4|s,l=t-s,u=e[a]<<l,h=u+(1<<l);u!=h;)n[o[u]>>>15-t]=c,u++},r.F.revCodes=function(e,t){for(var n=r.F.U.rev15,i=15-t,o=0;o<e.length;o+=2){var a=e[o]<<t-e[o+1];e[o]=n[a]>>>i}},r.F._putsE=function(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8},r.F._putsF=function(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},r.F._bitsE=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},r.F._bitsF=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(e=Uint16Array,t=Uint32Array,{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[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],ldef:new e(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[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],ddef:new t(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new e(65536),prev:new e(32768)}),function(){for(var e=r.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function i(e,t,r){for(;0!=t--;)e.push(0,r)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];i(e.fltree,144,8),i(e.fltree,112,9),i(e.fltree,24,7),i(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),i(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),i(e.itree,19,0),i(e.ltree,286,0),i(e.dtree,30,0),i(e.ttree,320,0)}()}();var m=function(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}({__proto__:null,default:A},[A]),v=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},readASCII(e,t,r){let n="";for(let i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},writeASCII(e,t,r){for(let n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},readBytes(e,t,r){const n=[];for(let i=0;i<r;i++)n.push(e[t+i]);return n},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,r,n){let i,o="";for(let a=0;a<n;a++)o+=`%${e.pad(t[r+a].toString(16))}`;try{i=decodeURIComponent(o)}catch(i){return e.readASCII(t,r,n)}return i}};function t(t,r,n,i){const a=r*n,f=o(i),s=Math.ceil(r*f/8),c=new Uint8Array(4*a),l=new Uint32Array(c.buffer),{ctype:u}=i,{depth:h}=i,d=e.readUshort;if(6==u){const e=a<<2;if(8==h)for(var g=0;g<e;g+=4)c[g]=t[g],c[g+1]=t[g+1],c[g+2]=t[g+2],c[g+3]=t[g+3];if(16==h)for(g=0;g<e;g++)c[g]=t[g<<1]}else if(2==u){const e=i.tabs.tRNS;if(null==e){if(8==h)for(g=0;g<a;g++){var w=3*g;l[g]=255<<24|t[w+2]<<16|t[w+1]<<8|t[w]}if(16==h)for(g=0;g<a;g++)w=6*g,l[g]=255<<24|t[w+4]<<16|t[w+2]<<8|t[w]}else{var A=e[0];const r=e[1],n=e[2];if(8==h)for(g=0;g<a;g++){var p=g<<2;w=3*g,l[g]=255<<24|t[w+2]<<16|t[w+1]<<8|t[w],t[w]==A&&t[w+1]==r&&t[w+2]==n&&(c[p+3]=0)}if(16==h)for(g=0;g<a;g++)p=g<<2,w=6*g,l[g]=255<<24|t[w+4]<<16|t[w+2]<<8|t[w],d(t,w)==A&&d(t,w+2)==r&&d(t,w+4)==n&&(c[p+3]=0)}}else if(3==u){const e=i.tabs.PLTE,o=i.tabs.tRNS,f=o?o.length:0;if(1==h)for(var m=0;m<n;m++){var v=m*s,b=m*r;for(g=0;g<r;g++){p=b+g<<2;var y=3*(U=t[v+(g>>3)]>>7-(7&g)&1);c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255}}if(2==h)for(m=0;m<n;m++)for(v=m*s,b=m*r,g=0;g<r;g++)p=b+g<<2,y=3*(U=t[v+(g>>2)]>>6-((3&g)<<1)&3),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255;if(4==h)for(m=0;m<n;m++)for(v=m*s,b=m*r,g=0;g<r;g++)p=b+g<<2,y=3*(U=t[v+(g>>1)]>>4-((1&g)<<2)&15),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255;if(8==h)for(g=0;g<a;g++){var U;p=g<<2,y=3*(U=t[g]),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255}}else if(4==u){if(8==h)for(g=0;g<a;g++){p=g<<2;var F=t[E=g<<1];c[p]=F,c[p+1]=F,c[p+2]=F,c[p+3]=t[E+1]}if(16==h)for(g=0;g<a;g++){var E;p=g<<2,F=t[E=g<<2],c[p]=F,c[p+1]=F,c[p+2]=F,c[p+3]=t[E+2]}}else if(0==u)for(A=i.tabs.tRNS?i.tabs.tRNS:-1,m=0;m<n;m++){const e=m*s,n=m*r;if(1==h)for(var _=0;_<r;_++){var C=(F=255*(t[e+(_>>>3)]>>>7-(7&_)&1))==255*A?0:255;l[n+_]=C<<24|F<<16|F<<8|F}else if(2==h)for(_=0;_<r;_++)C=(F=85*(t[e+(_>>>2)]>>>6-((3&_)<<1)&3))==85*A?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(4==h)for(_=0;_<r;_++)C=(F=17*(t[e+(_>>>1)]>>>4-((1&_)<<2)&15))==17*A?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(8==h)for(_=0;_<r;_++)C=(F=t[e+_])==A?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(16==h)for(_=0;_<r;_++)F=t[e+(_<<1)],C=d(t,e+(_<<1))==A?0:255,l[n+_]=C<<24|F<<16|F<<8|F}return c}function r(e,t,r,f){const s=o(e),c=Math.ceil(r*s/8),l=new Uint8Array((c+1+e.interlace)*f);return t=e.tabs.CgBI?i(t,l):n(t,l),0==e.interlace?t=a(t,e,0,r,f):1==e.interlace&&(t=function(e,t){const r=t.width,n=t.height,i=o(t),f=i>>3,s=Math.ceil(r*i/8),c=new Uint8Array(n*s);let l=0;const u=[0,0,4,0,2,0,1],h=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],g=[8,8,4,4,2,2,1];let w=0;for(;w<7;){const o=d[w],p=g[w];let m=0,v=0,b=u[w];for(;b<n;)b+=o,v++;let y=h[w];for(;y<r;)y+=p,m++;const U=Math.ceil(m*i/8);a(e,t,l,m,v);let F=0,E=u[w];for(;E<n;){let t=h[w],n=l+F*U<<3;for(;t<r;){var A;if(1==i&&(A=(A=e[n>>3])>>7-(7&n)&1,c[E*s+(t>>3)]|=A<<7-(7&t)),2==i&&(A=(A=e[n>>3])>>6-(7&n)&3,c[E*s+(t>>2)]|=A<<6-((3&t)<<1)),4==i&&(A=(A=e[n>>3])>>4-(7&n)&15,c[E*s+(t>>1)]|=A<<4-((1&t)<<2)),i>=8){const r=E*s+t*f;for(let t=0;t<f;t++)c[r+t]=e[(n>>3)+t]}n+=i,t+=p}F++,E+=o}m*v!=0&&(l+=v*(1+U)),w+=1}return c}(t,e)),t}function n(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,r){const n=Uint8Array;let i,o,a=0,f=0,s=0,c=0,l=0,u=0,h=0,d=0,g=0;if(3==t[0]&&0==t[1])return r||new n(0);const w=e.H,A=w.b,p=w.e,m=w.R,v=w.n,b=w.A,y=w.Z,U=w.m,F=null==r;for(F&&(r=new n(t.length>>>2<<5));0==a;)if(a=A(t,g,1),f=A(t,g+1,2),g+=3,0!=f){if(F&&(r=e.H.W(r,d+(1<<17))),1==f&&(i=U.J,o=U.h,u=511,h=31),2==f){s=p(t,g,5)+257,c=p(t,g+5,5)+1,l=p(t,g+10,4)+4,g+=14;let e=1;for(var E=0;E<38;E+=2)U.Q[E]=0,U.Q[E+1]=0;for(E=0;E<l;E++){const r=p(t,g+3*E,3);U.Q[1+(U.X[E]<<1)]=r,r>e&&(e=r)}g+=3*l,v(U.Q,e),b(U.Q,e,U.u),i=U.w,o=U.d,g=m(U.u,(1<<e)-1,s+c,t,g,U.v);const r=w.V(U.v,0,s,U.C);u=(1<<r)-1;const n=w.V(U.v,s,c,U.D);h=(1<<n)-1,v(U.C,r),b(U.C,r,i),v(U.D,n),b(U.D,n,o)}for(;;){const e=i[y(t,g)&u];g+=15&e;const n=e>>>4;if(n>>>8==0)r[d++]=n;else{if(256==n)break;{let e=d+n-254;if(n>264){const r=U.q[n-257];e=d+(r>>>3)+p(t,g,7&r),g+=7&r}const i=o[y(t,g)&h];g+=15&i;const a=i>>>4,f=U.c[a],s=(f>>>4)+A(t,g,15&f);for(g+=15&f;d<e;)r[d]=r[d++-s],r[d]=r[d++-s],r[d]=r[d++-s],r[d]=r[d++-s];d=e}}}}else{7&g&&(g+=8-(7&g));const i=4+(g>>>3),o=t[i-4]|t[i-3]<<8;F&&(r=e.H.W(r,d+o)),r.set(new n(t.buffer,t.byteOffset+i,o),d),g=i+o<<3,d+=o}return r.length==d?r:r.slice(0,d)},e.H.W=function(e,t){const r=e.length;if(t<=r)return e;const n=new Uint8Array(r<<1);return n.set(e,0),n},e.H.R=function(t,r,n,i,o,a){const f=e.H.e,s=e.H.Z;let c=0;for(;c<n;){const e=t[s(i,o)&r];o+=15&e;const n=e>>>4;if(n<=15)a[c]=n,c++;else{let e=0,t=0;16==n?(t=3+f(i,o,2),o+=2,e=a[c-1]):17==n?(t=3+f(i,o,3),o+=3):18==n&&(t=11+f(i,o,7),o+=7);const r=c+t;for(;c<r;)a[c]=e,c++}}return o},e.H.V=function(e,t,r,n){let i=0,o=0;const a=n.length>>>1;for(;o<r;){const r=e[o+t];n[o<<1]=0,n[1+(o<<1)]=r,r>i&&(i=r),o++}for(;o<a;)n[o<<1]=0,n[1+(o<<1)]=0,o++;return i},e.H.n=function(t,r){const n=e.H.m,i=t.length;let o,a,f,s;const c=n.j;for(var l=0;l<=r;l++)c[l]=0;for(l=1;l<i;l+=2)c[t[l]]++;const u=n.K;for(o=0,c[0]=0,a=1;a<=r;a++)o=o+c[a-1]<<1,u[a]=o;for(f=0;f<i;f+=2)s=t[f+1],0!=s&&(t[f]=u[s],u[s]++)},e.H.A=function(t,r,n){const i=t.length,o=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],f=i<<4|a,s=r-a;let c=t[e]<<s;const l=c+(1<<s);for(;c!=l;)n[o[c]>>>15-r]=f,c++}},e.H.l=function(t,r){const n=e.H.m.r,i=15-r;for(let e=0;e<t.length;e+=2){const o=t[e]<<r-t[e+1];t[e]=n[o]>>>i}},e.H.M=function(e,t,r){r<<=7&t;const n=t>>>3;e[n]|=r,e[n+1]|=r>>>8},e.H.I=function(e,t,r){r<<=7&t;const n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},e.H.e=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},e.H.b=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[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],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[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],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var r=0;r<32768;r++){let e=r;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[r]=(e>>>16|e<<16)>>>17}function n(e,t,r){for(;0!=t--;)e.push(0,r)}for(r=0;r<32;r++)t.q[r]=t.S[r]<<3|t.T[r],t.c[r]=t.p[r]<<4|t.z[r];n(t._,144,8),n(t._,112,9),n(t._,24,7),n(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),n(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),n(t.Q,19,0),n(t.C,286,0),n(t.D,30,0),n(t.v,320,0)}(),e.H.N}();function o(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,r,n,i){let a=o(t);const s=Math.ceil(n*a/8);let c,l;a=Math.ceil(a/8);let u=e[r],h=0;if(u>1&&(e[r]=[0,0,1][u-2]),3==u)for(h=a;h<s;h++)e[h+1]=e[h+1]+(e[h+1-a]>>>1)&255;for(let o=0;o<i;o++)if(c=r+o*s,l=c+o+1,u=e[l-1],h=0,0==u)for(;h<s;h++)e[c+h]=e[l+h];else if(1==u){for(;h<a;h++)e[c+h]=e[l+h];for(;h<s;h++)e[c+h]=e[l+h]+e[c+h-a]}else if(2==u)for(;h<s;h++)e[c+h]=e[l+h]+e[c+h-s];else if(3==u){for(;h<a;h++)e[c+h]=e[l+h]+(e[c+h-s]>>>1);for(;h<s;h++)e[c+h]=e[l+h]+(e[c+h-s]+e[c+h-a]>>>1)}else{for(;h<a;h++)e[c+h]=e[l+h]+f(0,e[c+h-s],0);for(;h<s;h++)e[c+h]=e[l+h]+f(e[c+h-a],e[c+h-s],e[c+h-a-s])}return e}function f(e,t,r){const n=e+t-r,i=n-e,o=n-t,a=n-r;return i*i<=o*o&&i*i<=a*a?e:o*o<=a*a?t:r}function s(t,r,n){n.width=e.readUint(t,r),r+=4,n.height=e.readUint(t,r),r+=4,n.depth=t[r],r++,n.ctype=t[r],r++,n.compress=t[r],r++,n.filter=t[r],r++,n.interlace=t[r],r++}function c(e,t,r,n,i,o,a,f,s){const c=Math.min(t,i),l=Math.min(r,o);let u=0,h=0;for(let y=0;y<l;y++)for(let r=0;r<c;r++)if(a>=0&&f>=0?(u=y*t+r<<2,h=(f+y)*i+a+r<<2):(u=(-f+y)*t-a+r<<2,h=y*i+r<<2),0==s)n[h]=e[u],n[h+1]=e[u+1],n[h+2]=e[u+2],n[h+3]=e[u+3];else if(1==s){var d=e[u+3]*(1/255),g=e[u]*d,w=e[u+1]*d,A=e[u+2]*d,p=n[h+3]*(1/255),m=n[h]*p,v=n[h+1]*p,b=n[h+2]*p;const t=1-d,r=d+p*t,i=0==r?0:1/r;n[h+3]=255*r,n[h+0]=(g+m*t)*i,n[h+1]=(w+v*t)*i,n[h+2]=(A+b*t)*i}else if(2==s)d=e[u+3],g=e[u],w=e[u+1],A=e[u+2],p=n[h+3],m=n[h],v=n[h+1],b=n[h+2],d==p&&g==m&&w==v&&A==b?(n[h]=0,n[h+1]=0,n[h+2]=0,n[h+3]=0):(n[h]=g,n[h+1]=w,n[h+2]=A,n[h+3]=d);else if(3==s){if(d=e[u+3],g=e[u],w=e[u+1],A=e[u+2],p=n[h+3],m=n[h],v=n[h+1],b=n[h+2],d==p&&g==m&&w==v&&A==b)continue;if(d<220&&p>20)return!1}return!0}return{decode:function(t){const o=new Uint8Array(t);let a=8;const f=e,c=f.readUshort,l=f.readUint,u={tabs:{},frames:[]},h=new Uint8Array(o.length);let d,g=0,w=0;const A=[137,80,78,71,13,10,26,10];for(var p=0;p<8;p++)if(o[p]!=A[p])throw"The input is not a PNG file!";for(;a<o.length;){const t=f.readUint(o,a);a+=4;const A=f.readASCII(o,a,4);if(a+=4,"IHDR"==A)s(o,a,u);else if("iCCP"==A){for(var m=a;0!=o[m];)m++;f.readASCII(o,a,m-a),o[m+1];const r=o.slice(m+2,a+t);let s=null;try{s=n(r)}catch(e){s=i(r)}u.tabs[A]=s}else if("CgBI"==A)u.tabs[A]=o.slice(a,a+4);else if("IDAT"==A){for(p=0;p<t;p++)h[g+p]=o[a+p];g+=t}else if("acTL"==A)u.tabs[A]={num_frames:l(o,a),num_plays:l(o,a+4)},d=new Uint8Array(o.length);else if("fcTL"==A){0!=w&&((E=u.frames[u.frames.length-1]).data=r(u,d.slice(0,w),E.rect.width,E.rect.height),w=0);const e={x:l(o,a+12),y:l(o,a+16),width:l(o,a+4),height:l(o,a+8)};let t=c(o,a+22);t=c(o,a+20)/(0==t?100:t);const n={rect:e,delay:Math.round(1e3*t),dispose:o[a+24],blend:o[a+25]};u.frames.push(n)}else if("fdAT"==A){for(p=0;p<t-4;p++)d[w+p]=o[a+p+4];w+=t-4}else if("pHYs"==A)u.tabs[A]=[f.readUint(o,a),f.readUint(o,a+4),o[a+8]];else if("cHRM"==A)for(u.tabs[A]=[],p=0;p<8;p++)u.tabs[A].push(f.readUint(o,a+4*p));else if("tEXt"==A||"zTXt"==A){u.tabs[A]??(u.tabs[A]={});var v=f.nextZero(o,a),b=f.readASCII(o,a,v-a),y=a+t-v-1;if("tEXt"==A)F=f.readASCII(o,v+1,y);else{var U=n(o.slice(v+2,v+2+y));F=f.readUTF8(U,0,U.length)}u.tabs[A][b]=F}else if("iTXt"==A){u.tabs[A]??(u.tabs[A]={}),v=0,m=a,v=f.nextZero(o,m),b=f.readASCII(o,m,v-m);const e=o[m=v+1];var F;o[m+1],m+=2,v=f.nextZero(o,m),f.readASCII(o,m,v-m),m=v+1,v=f.nextZero(o,m),f.readUTF8(o,m,v-m),y=t-((m=v+1)-a),0==e?F=f.readUTF8(o,m,y):(U=n(o.slice(m,m+y)),F=f.readUTF8(U,0,U.length)),u.tabs[A][b]=F}else if("PLTE"==A)u.tabs[A]=f.readBytes(o,a,t);else if("hIST"==A){const e=u.tabs.PLTE.length/3;for(u.tabs[A]=[],p=0;p<e;p++)u.tabs[A].push(c(o,a+2*p))}else if("tRNS"==A)3==u.ctype?u.tabs[A]=f.readBytes(o,a,t):0==u.ctype?u.tabs[A]=c(o,a):2==u.ctype&&(u.tabs[A]=[c(o,a),c(o,a+2),c(o,a+4)]);else if("gAMA"==A)u.tabs[A]=f.readUint(o,a)/1e5;else if("sRGB"==A)u.tabs[A]=o[a];else if("bKGD"==A)0==u.ctype||4==u.ctype?u.tabs[A]=[c(o,a)]:2==u.ctype||6==u.ctype?u.tabs[A]=[c(o,a),c(o,a+2),c(o,a+4)]:3==u.ctype&&(u.tabs[A]=o[a]);else if("IEND"==A)break;a+=t,f.readUint(o,a),a+=4}var E;return 0!=w&&((E=u.frames[u.frames.length-1]).data=r(u,d.slice(0,w),E.rect.width,E.rect.height)),u.data=r(u,h,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(e){const r=e.width,n=e.height;if(null==e.tabs.acTL)return[t(e.data,r,n,e).buffer];const i=[];e.frames[0].data??(e.frames[0].data=e.data);const o=r*n*4,a=new Uint8Array(o),f=new Uint8Array(o),s=new Uint8Array(o);for(let u=0;u<e.frames.length;u++){const h=e.frames[u],d=h.rect.x,g=h.rect.y,w=h.rect.width,A=h.rect.height,p=t(h.data,w,A,e);if(0!=u)for(var l=0;l<o;l++)s[l]=a[l];if(0==h.blend?c(p,w,A,a,r,n,d,g,0):1==h.blend&&c(p,w,A,a,r,n,d,g,1),i.push(a.buffer.slice(0)),0==h.dispose);else if(1==h.dispose)c(f,w,A,a,r,n,d,g,0);else if(2==h.dispose)for(l=0;l<o;l++)a[l]=s[l]}return i},_paeth:f,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=v,{_bin:t}=v,r=v._paeth;var n={table:function(){const e=/* @__PURE__ */new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let e=0;e<8;e++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update(e,t,r,i){for(let o=0;o<i;o++)e=n.table[255&(e^t[r+o])]^e>>>8;return e},crc:(e,t,r)=>4294967295^n.update(4294967295,e,t,r)};function i(e,t,r,n){t[r]+=e[0]*n>>4,t[r+1]+=e[1]*n>>4,t[r+2]+=e[2]*n>>4,t[r+3]+=e[3]*n>>4}function o(e){return Math.max(0,Math.min(255,e))}function a(e,t){const r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}function f(e,t,r,n,f,s,c){c??=1;const l=n.length,u=[];for(var h=0;h<l;h++){const e=n[h];u.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(h=0;h<l;h++){let e=4294967295;for(var d=0,g=0;g<l;g++){var w=a(u[h],u[g]);g!=h&&w<e&&(e=w,d=g)}}const A=new Uint32Array(f.buffer),p=new Int16Array(t*r*4),m=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<m.length;h++)m[h]=255*((m[h]+.5)/16-.5);for(let b=0;b<r;b++)for(let f=0;f<t;f++){var v;h=4*(b*t+f),2!=c?v=[o(e[h]+p[h]),o(e[h+1]+p[h+1]),o(e[h+2]+p[h+2]),o(e[h+3]+p[h+3])]:(w=m[4*(3&b)+(3&f)],v=[o(e[h]+w),o(e[h+1]+w),o(e[h+2]+w),o(e[h+3]+w)]),d=0;let y=16777215;for(g=0;g<l;g++){const e=a(v,u[g]);e<y&&(y=e,d=g)}const U=u[d],F=[v[0]-U[0],v[1]-U[1],v[2]-U[2],v[3]-U[3]];1==c&&(f!=t-1&&i(F,p,h+4,7),b!=r-1&&(0!=f&&i(F,p,h+4*t-4,3),i(F,p,h+4*t,5),f!=t-1&&i(F,p,h+4*t+4,1))),s[h>>2]=d,A[h>>2]=n[d]}}function s(e,r,i,o,a){a??={};const{crc:f}=n,s=t.writeUint,c=t.writeUshort,l=t.writeASCII;let u=8;const h=e.frames.length>1;let d,g=!1,w=33+(h?20:0);if(null!=a.sRGB&&(w+=13),null!=a.pHYs&&(w+=21),null!=a.iCCP&&(d=pako.deflate(a.iCCP),w+=21+d.length+4),3==e.ctype){for(var A=e.plte.length,p=0;p<A;p++)e.plte[p]>>>24!=255&&(g=!0);w+=8+3*A+4+(g?8+1*A+4:0)}for(var m=0;m<e.frames.length;m++)h&&(w+=38),w+=(U=e.frames[m]).cimg.length+12,0!=m&&(w+=4);w+=12;const v=new Uint8Array(w),b=[137,80,78,71,13,10,26,10];for(p=0;p<8;p++)v[p]=b[p];if(s(v,u,13),u+=4,l(v,u,"IHDR"),u+=4,s(v,u,r),u+=4,s(v,u,i),u+=4,v[u]=e.depth,u++,v[u]=e.ctype,u++,v[u]=0,u++,v[u]=0,u++,v[u]=0,u++,s(v,u,f(v,u-17,17)),u+=4,null!=a.sRGB&&(s(v,u,1),u+=4,l(v,u,"sRGB"),u+=4,v[u]=a.sRGB,u++,s(v,u,f(v,u-5,5)),u+=4),null!=a.iCCP){const e=13+d.length;s(v,u,e),u+=4,l(v,u,"iCCP"),u+=4,l(v,u,"ICC profile"),u+=11,u+=2,v.set(d,u),u+=d.length,s(v,u,f(v,u-(e+4),e+4)),u+=4}if(null!=a.pHYs&&(s(v,u,9),u+=4,l(v,u,"pHYs"),u+=4,s(v,u,a.pHYs[0]),u+=4,s(v,u,a.pHYs[1]),u+=4,v[u]=a.pHYs[2],u++,s(v,u,f(v,u-13,13)),u+=4),h&&(s(v,u,8),u+=4,l(v,u,"acTL"),u+=4,s(v,u,e.frames.length),u+=4,s(v,u,null!=a.loop?a.loop:0),u+=4,s(v,u,f(v,u-12,12)),u+=4),3==e.ctype){for(s(v,u,3*(A=e.plte.length)),u+=4,l(v,u,"PLTE"),u+=4,p=0;p<A;p++){const t=3*p,r=e.plte[p],n=255&r,i=r>>>8&255,o=r>>>16&255;v[u+t+0]=n,v[u+t+1]=i,v[u+t+2]=o}if(u+=3*A,s(v,u,f(v,u-3*A-4,3*A+4)),u+=4,g){for(s(v,u,A),u+=4,l(v,u,"tRNS"),u+=4,p=0;p<A;p++)v[u+p]=e.plte[p]>>>24&255;u+=A,s(v,u,f(v,u-A-4,A+4)),u+=4}}let y=0;for(m=0;m<e.frames.length;m++){var U=e.frames[m];h&&(s(v,u,26),u+=4,l(v,u,"fcTL"),u+=4,s(v,u,y++),u+=4,s(v,u,U.rect.width),u+=4,s(v,u,U.rect.height),u+=4,s(v,u,U.rect.x),u+=4,s(v,u,U.rect.y),u+=4,c(v,u,o[m]),u+=2,c(v,u,1e3),u+=2,v[u]=U.dispose,u++,v[u]=U.blend,u++,s(v,u,f(v,u-30,30)),u+=4);const t=U.cimg;s(v,u,(A=t.length)+(0==m?0:4)),u+=4;const r=u;l(v,u,0==m?"IDAT":"fdAT"),u+=4,0!=m&&(s(v,u,y++),u+=4),v.set(t,u),u+=A,s(v,u,f(v,r,u-r)),u+=4}return s(v,u,0),u+=4,l(v,u,"IEND"),u+=4,s(v,u,f(v,u-4,4)),u+=4,v.buffer}function c(e,t,r){for(let n=0;n<e.frames.length;n++){const i=e.frames[n];i.rect.width;const o=i.rect.height,a=new Uint8Array(o*i.bpl+o);i.cimg=d(i.img,o,i.bpp,i.bpl,a,t,r)}}function l(t,r,n,i,o){const a=o[0],s=o[1],c=o[2],l=o[3],d=o[4],g=o[5];let A=6,p=8,m=255;for(var v=0;v<t.length;v++){const e=new Uint8Array(t[v]);for(var b=e.length,y=0;y<b;y+=4)m&=e[y+3]}const U=255!=m,F=function(t,r,n,i,o,a){const f=[];for(var s=0;s<t.length;s++){const u=new Uint8Array(t[s]),d=new Uint32Array(u.buffer);var c;let w=0,A=0,p=r,m=n,v=i?1:0;if(0!=s){const b=a||i||1==s||0!=f[s-2].dispose?1:2;let y=0,U=1e9;for(let e=0;e<b;e++){var l=new Uint8Array(t[s-1-e]);const i=new Uint32Array(t[s-1-e]);let a=r,f=n,c=-1,u=-1;for(let e=0;e<n;e++)for(let t=0;t<r;t++)d[g=e*r+t]!=i[g]&&(t<a&&(a=t),t>c&&(c=t),e<f&&(f=e),e>u&&(u=e));-1==c&&(a=f=c=u=0),o&&(!(1&~a)&&a--,!(1&~f)&&f--);const h=(c-a+1)*(u-f+1);h<U&&(U=h,y=e,w=a,A=f,p=c-a+1,m=u-f+1)}l=new Uint8Array(t[s-1-y]),1==y&&(f[s-1].dispose=2),c=new Uint8Array(p*m*4),e(l,r,n,c,p,m,-w,-A,0),v=e(u,r,n,c,p,m,-w,-A,3)?1:0,1==v?h(u,r,n,c,{x:w,y:A,width:p,height:m}):e(u,r,n,c,p,m,-w,-A,0)}else c=u.slice(0);f.push({rect:{x:w,y:A,width:p,height:m},img:c,blend:v,dispose:0})}if(i)for(s=0;s<f.length;s++){if(1==(w=f[s]).blend)continue;const e=w.rect,i=f[s-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),l={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};f[s-1].dispose=1,s-1!=0&&u(t,r,n,f,s-1,l,o),u(t,r,n,f,s,l,o)}let d=0;if(1!=t.length)for(var g=0;g<f.length;g++){var w;d+=(w=f[g]).rect.width*w.rect.height}return f}(t,r,n,a,s,c),E={},_=[],C=[];if(0!=i){const e=[];for(y=0;y<F.length;y++)e.push(F[y].img.buffer);const t=w(function(e){let t=0;for(var r=0;r<e.length;r++)t+=e[r].byteLength;const n=new Uint8Array(t);let i=0;for(r=0;r<e.length;r++){const t=new Uint8Array(e[r]),o=t.length;for(let e=0;e<o;e+=4){let r=t[e],o=t[e+1],a=t[e+2];const f=t[e+3];0==f&&(r=o=a=0),n[i+e]=r,n[i+e+1]=o,n[i+e+2]=a,n[i+e+3]=f}i+=o}return n.buffer}(e),i);for(y=0;y<t.plte.length;y++)_.push(t.plte[y].est.rgba);let r=0;for(y=0;y<F.length;y++){const e=(I=F[y]).img.length;var B=new Uint8Array(t.inds.buffer,r>>2,e>>2);C.push(B);const n=new Uint8Array(t.abuf,r,e);g&&f(I.img,I.rect.width,I.rect.height,_,n,B),I.img.set(n),r+=e}}else for(v=0;v<F.length;v++){var I=F[v];const e=new Uint32Array(I.img.buffer);var M=I.rect.width;for(b=e.length,B=new Uint8Array(b),C.push(B),y=0;y<b;y++){const t=e[y];if(0!=y&&t==e[y-1])B[y]=B[y-1];else if(y>M&&t==e[y-M])B[y]=B[y-M];else{let e=E[t];if(null==e&&(E[t]=e=_.length,_.push(t),_.length>=300))break;B[y]=e}}}const T=_.length;for(T<=256&&0==d&&(p=T<=2?1:T<=4?2:T<=16?4:8,p=Math.max(p,l)),v=0;v<F.length;v++){(I=F[v]).rect.x,I.rect.y,M=I.rect.width;const e=I.rect.height;let t=I.img;new Uint32Array(t.buffer);let r=4*M,n=4;if(T<=256&&0==d){r=Math.ceil(p*M/8);var R=new Uint8Array(r*e);const i=C[v];for(let t=0;t<e;t++){y=t*r;const e=t*M;if(8==p)for(var x=0;x<M;x++)R[y+x]=i[e+x];else if(4==p)for(x=0;x<M;x++)R[y+(x>>1)]|=i[e+x]<<4-4*(1&x);else if(2==p)for(x=0;x<M;x++)R[y+(x>>2)]|=i[e+x]<<6-2*(3&x);else if(1==p)for(x=0;x<M;x++)R[y+(x>>3)]|=i[e+x]<<7-1*(7&x)}t=R,A=3,n=1}else if(0==U&&1==F.length){R=new Uint8Array(M*e*3);const i=M*e;for(y=0;y<i;y++){const e=3*y,r=4*y;R[e]=t[r],R[e+1]=t[r+1],R[e+2]=t[r+2]}t=R,A=2,n=3,r=3*M}I.img=t,I.bpl=r,I.bpp=n}return{ctype:A,depth:p,plte:_,frames:F}}function u(t,r,n,i,o,a,f){const s=Uint8Array,c=Uint32Array,l=new s(t[o-1]),u=new c(t[o-1]),d=o+1<t.length?new s(t[o+1]):null,g=new s(t[o]),w=new c(g.buffer);let A=r,p=n,m=-1,v=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const n=a.x+t,f=a.y+e,s=f*r+n,c=w[s];0==c||0==i[o-1].dispose&&u[s]==c&&(null==d||0!=d[4*s+3])||(n<A&&(A=n),n>m&&(m=n),f<p&&(p=f),f>v&&(v=f))}-1==m&&(A=p=m=v=0),f&&(!(1&~A)&&A--,!(1&~p)&&p--),a={x:A,y:p,width:m-A+1,height:v-p+1};const b=i[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==i[o-1].dispose?(e(l,r,n,b.img,a.width,a.height,-a.x,-a.y,0),h(g,r,n,b.img,a)):e(g,r,n,b.img,a.width,a.height,-a.x,-a.y,0)}function h(t,r,n,i,o){e(t,r,n,i,o.width,o.height,-o.x,-o.y,2)}function d(e,t,r,n,i,o,a){const f=[];let s,c=[0,1,2,3,4];-1!=o?c=[o]:(t*n>5e5||1==r)&&(c=[0]),a&&(s={level:0});const l=m;for(var u=0;u<c.length;u++){for(let o=0;o<t;o++)g(i,e,o,n,r,c[u]);f.push(l.deflate(i,s))}let h,d=1e9;for(u=0;u<f.length;u++)f[u].length<d&&(h=u,d=f[u].length);return f[h]}function g(e,t,n,i,o,a){const f=n*i;let s=f+n;if(e[s]=a,s++,0==a)if(i<500)for(var c=0;c<i;c++)e[s+c]=t[f+c];else e.set(new Uint8Array(t.buffer,f,i),s);else if(1==a){for(c=0;c<o;c++)e[s+c]=t[f+c];for(c=o;c<i;c++)e[s+c]=t[f+c]-t[f+c-o]+256&255}else if(0==n){for(c=0;c<o;c++)e[s+c]=t[f+c];if(2==a)for(c=o;c<i;c++)e[s+c]=t[f+c];if(3==a)for(c=o;c<i;c++)e[s+c]=t[f+c]-(t[f+c-o]>>1)+256&255;if(4==a)for(c=o;c<i;c++)e[s+c]=t[f+c]-r(t[f+c-o],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[s+c]=t[f+c]+256-t[f+c-i]&255;if(3==a){for(c=0;c<o;c++)e[s+c]=t[f+c]+256-(t[f+c-i]>>1)&255;for(c=o;c<i;c++)e[s+c]=t[f+c]+256-(t[f+c-i]+t[f+c-o]>>1)&255}if(4==a){for(c=0;c<o;c++)e[s+c]=t[f+c]+256-r(0,t[f+c-i],0)&255;for(c=o;c<i;c++)e[s+c]=t[f+c]+256-r(t[f+c-o],t[f+c-i],t[f+c-o-i])&255}}}function w(e,t){const r=new Uint8Array(e),n=r.slice(0),i=new Uint32Array(n.buffer),o=A(n,t),a=o[0],f=o[1],s=r.length,c=new Uint8Array(s>>2);let l;if(r.length<2e7)for(var u=0;u<s;u+=4)l=p(a,h=r[u]*(1/255),d=r[u+1]*(1/255),g=r[u+2]*(1/255),w=r[u+3]*(1/255)),c[u>>2]=l.ind,i[u>>2]=l.est.rgba;else for(u=0;u<s;u+=4){var h=r[u]*(1/255),d=r[u+1]*(1/255),g=r[u+2]*(1/255),w=r[u+3]*(1/255);for(l=a;l.left;)l=b(l.est,h,d,g,w)<=0?l.left:l.right;c[u>>2]=l.ind,i[u>>2]=l.est.rgba}return{abuf:n.buffer,inds:c,plte:f}}function A(e,t,r){r??=1e-4;const n=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=F(e,i.i0,i.i1),i.est=E(i.bst);const o=[i];for(;o.length<t;){let t=0,i=0;for(var a=0;a<o.length;a++)o[a].est.L>t&&(t=o[a].est.L,i=a);if(t<r)break;const f=o[i],s=y(e,n,f.i0,f.i1,f.est.e,f.est.eMq255);if(f.i0>=s||f.i1<=s){f.est.L=0;continue}const c={i0:f.i0,i1:s,bst:null,est:null,tdst:0,left:null,right:null};c.bst=F(e,c.i0,c.i1),c.est=E(c.bst);const l={i0:s,i1:f.i1,bst:null,est:null,tdst:0,left:null,right:null};for(l.bst={R:[],m:[],N:f.bst.N-c.bst.N},a=0;a<16;a++)l.bst.R[a]=f.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)l.bst.m[a]=f.bst.m[a]-c.bst.m[a];l.est=E(l.bst),f.left=c,f.right=l,o[i]=c,o.push(l)}for(o.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[i,o]}function p(e,t,r,n,i){if(null==e.left)return e.tdst=function(e,t,r,n,i){const o=t-e[0],a=r-e[1],f=n-e[2],s=i-e[3];return o*o+a*a+f*f+s*s}(e.est.q,t,r,n,i),e;const o=b(e.est,t,r,n,i);let a=e.left,f=e.right;o>0&&(a=e.right,f=e.left);const s=p(a,t,r,n,i);if(s.tdst<=o*o)return s;const c=p(f,t,r,n,i);return c.tdst<s.tdst?c:s}function b(e,t,r,n,i){const{e:o}=e;return o[0]*t+o[1]*r+o[2]*n+o[3]*i-e.eMq}function y(e,t,r,n,i,o){for(n-=4;r<n;){for(;U(e,r,i)<=o;)r+=4;for(;U(e,n,i)>o;)n-=4;if(r>=n)break;const a=t[r>>2];t[r>>2]=t[n>>2],t[n>>2]=a,r+=4,n-=4}for(;U(e,r,i)>o;)r-=4;return r+4}function U(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]}function F(e,t,r){const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-t>>2;for(let a=t;a<r;a+=4){const t=e[a]*(1/255),r=e[a+1]*(1/255),o=e[a+2]*(1/255),f=e[a+3]*(1/255);i[0]+=t,i[1]+=r,i[2]+=o,i[3]+=f,n[0]+=t*t,n[1]+=t*r,n[2]+=t*o,n[3]+=t*f,n[5]+=r*r,n[6]+=r*o,n[7]+=r*f,n[10]+=o*o,n[11]+=o*f,n[15]+=f*f}return n[4]=n[1],n[8]=n[2],n[9]=n[6],n[12]=n[3],n[13]=n[7],n[14]=n[11],{R:n,m:i,N:o}}function E(e){const{R:t}=e,{m:r}=e,{N:n}=e,i=r[0],o=r[1],a=r[2],f=r[3],s=0==n?0:1/n,c=[t[0]-i*i*s,t[1]-i*o*s,t[2]-i*a*s,t[3]-i*f*s,t[4]-o*i*s,t[5]-o*o*s,t[6]-o*a*s,t[7]-o*f*s,t[8]-a*i*s,t[9]-a*o*s,t[10]-a*a*s,t[11]-a*f*s,t[12]-f*i*s,t[13]-f*o*s,t[14]-f*a*s,t[15]-f*f*s],l=c,u=_;let h=[Math.random(),Math.random(),Math.random(),Math.random()],d=0,g=0;if(0!=n)for(let A=0;A<16&&(h=u.multVec(l,h),g=Math.sqrt(u.dot(h,h)),h=u.sml(1/g,h),!(0!=A&&Math.abs(g-d)<1e-9));A++)d=g;const w=[i*s,o*s,a*s,f*s];return{Cov:c,q:w,e:h,L:d,eMq255:u.dot(u.sml(255,w),h),eMq:u.dot(h,w),rgba:(Math.round(255*w[3])<<24|Math.round(255*w[2])<<16|Math.round(255*w[1])<<8|Math.round(255*w[0]))>>>0}}var _={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};v.encode=function(e,t,r,n,i,o,a){n??=0,a??=!1;const f=l(e,t,r,n,[!1,!1,!1,0,a,!1]);return c(f,-1),s(f,t,r,i,o)},v.encodeLL=function(e,t,r,n,i,o,a,f){const l={ctype:0+(1==n?0:2)+(0==i?0:4),depth:o,frames:[]},u=(n+i)*o,h=u*t;for(let s=0;s<e.length;s++)l.frames.push({rect:{x:0,y:0,width:t,height:r},img:new Uint8Array(e[s]),blend:0,dispose:1,bpp:Math.ceil(u/8),bpl:Math.ceil(h/8)});return c(l,0,!0),s(l,t,r,a,f)},v.encode.compress=l,v.encode.dither=f,v.quantize=w,v.quantize.getKDtree=A,v.quantize.getNearest=p}();var b,y={toArrayBuffer(e,t){const r=e.width,n=e.height,i=r<<2,o=e.getContext("2d").getImageData(0,0,r,n),a=new Uint32Array(o.data.buffer),f=(32*r+31)/32<<2,s=f*n,c=122+s,l=new ArrayBuffer(c),u=new DataView(l),h=1<<20;let d,g,w,A,p=h,m=0,v=0,b=0;function U(e){u.setUint16(v,e,!0),v+=2}function F(e){u.setUint32(v,e,!0),v+=4}function E(e){v+=e}U(19778),F(c),E(4),F(122),F(108),F(r),F(-n>>>0),U(1),U(32),F(3),F(s),F(2835),F(2835),E(8),F(16711680),F(65280),F(255),F(4278190080),F(1466527264),function e(){for(;m<n&&p>0;){for(A=122+m*f,d=0;d<i;)p--,g=a[b++],w=g>>>24,u.setUint32(A+d,g<<8|w),d+=4;m++}b<a.length?(p=h,setTimeout(e,y._dly)):t(l)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9},U={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},F={[U.CHROME]:16384,[U.FIREFOX]:11180,[U.DESKTOP_SAFARI]:16384,[U.IE]:8192,[U.IOS]:4096,[U.ETC]:8192},E="undefined"!=typeof window,_="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,C=E&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),B=(E||_)&&(C&&C.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),I=(E||_)&&(C&&C.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function M(e,t,r=Date.now()){return new Promise(n=>{const i=e.split(","),o=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let f=a.length;const s=new Uint8Array(f);for(;f--;)s[f]=a.charCodeAt(f);const c=new Blob([s],{type:o});c.name=t,c.lastModified=r,n(c)})}function T(e){return new Promise((t,r)=>{const n=new I;n.onload=()=>t(n.result),n.onerror=e=>r(e),n.readAsDataURL(e)})}function R(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=e=>r(e),n.src=e})}function x(){if(void 0!==x.cachedResult)return x.cachedResult;let e=U.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=U.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=U.IOS:/Safari/i.test(t)?e=U.DESKTOP_SAFARI:/Firefox/i.test(t)?e=U.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=U.IE),x.cachedResult=e,x.cachedResult}function S(e,t){const r=F[x()];let n=e,i=t,o=n*i;const a=n>i?i/n:n/i;for(;o>r*r;){const e=(r+n)/2,t=(r+i)/2;e<t?(i=t,n=t*a):(i=e*a,n=e),o=n*i}return{width:n,height:i}}function Q(e,t){let r,n;try{if(r=new OffscreenCanvas(e,t),n=r.getContext("2d"),null===n)throw new Error("getContext of OffscreenCanvas returns null")}catch(e){r=document.createElement("canvas"),n=r.getContext("2d")}return r.width=e,r.height=t,[r,n]}function k(e,t){const{width:r,height:n}=S(e.width,e.height),[i,o]=Q(r,n);return t&&/jpe?g/.test(t)&&(o.fillStyle="white",o.fillRect(0,0,i.width,i.height)),o.drawImage(e,0,0,i.width,i.height),i}function L(){return void 0!==L.cachedResult||(L.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),L.cachedResult}function H(e,t={}){return new Promise(function(r,n){let i,o;var a=function(){try{return o=k(i,t.fileType||e.type),r([i,o])}catch(e){return n(e)}},f=function(t){try{var r=function(e){try{throw e}catch(e){return n(e)}};try{let t;return T(e).then(function(e){try{return t=e,R(t).then(function(e){try{return i=e,function(){try{return a()}catch(e){return n(e)}}()}catch(e){return r(e)}},r)}catch(e){return r(e)}},r)}catch(e){r(e)}}catch(e){return n(e)}};try{if(L()||[U.DESKTOP_SAFARI,U.MOBILE_SAFARI].includes(x()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return i=e,a()}catch(e){return f()}},f)}catch(e){f()}})}function O(e,t,r,n,i=1){return new Promise(function(o,a){let f;if("image/png"===t){let c,l,u;return c=e.getContext("2d"),({data:l}=c.getImageData(0,0,e.width,e.height)),u=v.encode([l.buffer],e.width,e.height,4096*i),f=new Blob([u],{type:t}),f.name=r,f.lastModified=n,s.call(this)}{if("image/bmp"===t)return new Promise(t=>y.toBlob(e,t)).then(function(e){try{return f=e,f.name=r,f.lastModified=n,h.call(this)}catch(e){return a(e)}}.bind(this),a);{if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return f=e,f.name=r,f.lastModified=n,d.call(this)}catch(e){return a(e)}}.bind(this),a);{let g;return g=e.toDataURL(t,i),M(g,r,n).then(function(e){try{return f=e,d.call(this)}catch(e){return a(e)}}.bind(this),a)}function d(){return h.call(this)}}function h(){return s.call(this)}}function s(){return o(f)}})}function P(e){e.width=0,e.height=0}function D(){return new Promise(function(e,t){let r,n,i,o;return void 0!==D.cachedResult?e(D.cachedResult):M("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return r=a,H(r).then(function(a){try{return n=a[1],O(n,r.type,r.name,r.lastModified).then(function(r){try{return i=r,P(n),H(i).then(function(r){try{return o=r[0],D.cachedResult=1===o.width&&2===o.height,e(D.cachedResult)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)})}function z(e){return new Promise((t,r)=>{const n=new I;n.onload=e=>{const r=new DataView(e.target.result);if(65496!=r.getUint16(0,!1))return t(-2);const n=r.byteLength;let i=2;for(;i<n;){if(r.getUint16(i+2,!1)<=8)return t(-1);const e=r.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=r.getUint32(i+=2,!1))return t(-1);const e=18761==r.getUint16(i+=6,!1);i+=r.getUint32(i+4,e);const n=r.getUint16(i,e);i+=2;for(let o=0;o<n;o++)if(274==r.getUint16(i+12*o,e))return t(r.getUint16(i+12*o+8,e))}else{if(65280&~e)break;i+=r.getUint16(i,!1)}}return t(-1)},n.onerror=e=>r(e),n.readAsArrayBuffer(e)})}function q(e,t){const{width:r}=e,{height:n}=e,{maxWidthOrHeight:i}=t;let o,a=e;return isFinite(i)&&(r>i||n>i)&&([a,o]=Q(r,n),r>n?(a.width=i,a.height=n/r*i):(a.width=r/n*i,a.height=i),o.drawImage(e,0,0,a.width,a.height),P(e)),a}function W(e,t){const{width:r}=e,{height:n}=e,[i,o]=Q(r,n);switch(t>4&&t<9?(i.width=n,i.height=r):(i.width=r,i.height=n),t){case 2:o.transform(-1,0,0,1,r,0);break;case 3:o.transform(-1,0,0,-1,r,n);break;case 4:o.transform(1,0,0,-1,0,n);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,n,0);break;case 7:o.transform(0,-1,-1,0,n,r);break;case 8:o.transform(0,-1,1,0,0,r)}return o.drawImage(e,0,0,r,n),P(e),i}function N(e,t,r=0){return new Promise(function(n,i){let o,a,f,s,c,l,u,h,d,g,w,A,p,m,v,b,y,U,F,E;function _(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;o+=e,t.onProgress(Math.min(o,100))}function C(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;o=Math.min(Math.max(e,o),100),t.onProgress(o)}return o=r,a=t.maxIteration||10,f=1024*t.maxSizeMB*1024,_(),H(e,t).then(function(r){try{return[,s]=r,_(),c=q(s,t),_(),new Promise(function(r,n){var i;if(!(i=t.exifOrientation))return z(e).then(function(e){try{return i=e,o.call(this)}catch(e){return n(e)}}.bind(this),n);function o(){return r(i)}return o.call(this)}).then(function(r){try{return l=r,_(),D().then(function(r){try{return u=r?c:W(c,l),_(),h=t.initialQuality||1,d=t.fileType||e.type,O(u,d,e.name,e.lastModified,h).then(function(r){try{{if(g=r,_(),w=g.size>f,A=g.size>e.size,!w&&!A)return C(100),n(g);var o;function B(){if(a--&&(v>f||v>p)){let t,r;return t=E?.95*F.width:F.width,r=E?.95*F.height:F.height,[y,U]=Q(t,r),U.drawImage(F,0,0,t,r),h*="image/png"===d?.85:.95,O(y,d,e.name,e.lastModified,h).then(function(e){try{return b=e,P(F),F=y,v=b.size,C(Math.min(99,Math.floor((m-v)/(m-f)*100))),B}catch(e){return i(e)}},i)}return[1]}return p=e.size,m=g.size,v=m,F=u,E=!t.alwaysKeepResolution&&w,(o=function(e){for(;e;){if(e.then)return void e.then(o,i);try{if(e.pop){if(e.length)return e.pop()?I.call(this):e;e=B}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))(B);function I(){return P(F),P(y),P(c),P(u),P(s),C(100),n(b)}}}catch(l){return i(l)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)})}function j(e,t){return new Promise((r,n)=>{b||(b=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const i=new Worker(b);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return n(new Error(e.data.error)),void i.terminate();r(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",()=>{n(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function G(e,t){return new Promise(function(r,n){let i,o,a,f,s,c;if(i={...t},a=0,({onProgress:f}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,s="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof f&&f(a)},!(e instanceof Blob||e instanceof B))return n(/* @__PURE__ */new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(/* @__PURE__ */new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!s||"function"!=typeof Worker||c)return N(e,i).then(function(e){try{return o=e,h.call(this)}catch(e){return n(e)}}.bind(this),n);var l=function(){try{return h.call(this)}catch(e){return n(e)}}.bind(this),u=function(t){try{return N(e,i).then(function(e){try{return o=e,l()}catch(e){return n(e)}},n)}catch(e){return n(e)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",j(e,i).then(function(e){try{return o=e,l()}catch(e){return u()}},u)}catch(e){u()}function h(){try{o.name=e.name,o.lastModified=e.lastModified}catch(e){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(o=g(e,o))}catch(e){}return r(o)}})}G.getDataUrlFromFile=T,G.getFilefromDataUrl=M,G.loadImage=R,G.drawImageInCanvas=k,G.drawFileInCanvas=H,G.canvasToFile=O,G.getExifOrientation=z,G.handleMaxWidthOrHeight=q,G.followExifOrientation=W,G.cleanupCanvasMemory=P,G.isAutoOrientationInBrowser=D,G.approximateBelowMaximumCanvasSizeOfBrowser=S,G.copyExifWithoutOrientation=g,G.getBrowserName=x,G.version="2.0.2";export{a,f as i,d as n,c as o,h as r,t as s,G as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Cn as t,Ct as e,G as r,Jt as n,Kt as i,M as o,Nt as a,Rt as s,V as _,Yt as l,Zt as d,_t as c,et as u,i as h,kt as p,mn as g,mt as m,nt as f,pt as b,st as w,tt as y,un as v,vn as C,wn as L,xn as x,xt as A,yn as M,yt as k}from"./
|
|
1
|
+
import{Cn as t,Ct as e,G as r,Jt as n,Kt as i,M as o,Nt as a,Rt as s,V as _,Yt as l,Zt as d,_t as c,et as u,i as h,kt as p,mn as g,mt as m,nt as f,pt as b,st as w,tt as y,un as v,vn as C,wn as L,xn as x,xt as A,yn as M,yt as k}from"./FE0pIRqe.js";import{n as S}from"./Czk6IR70.js";import{t as E}from"./Cx6rq6N5.js";import{n as I,t as F}from"./DA0XxXKx.js";import{a as O,n as P,o as N,r as T,t as R}from"./Bb_tv1V-.js";var z=({src:r,thumbnailUrl:n,playing:i=!1,controls:o=!1,playsInline:a=!0,fit:s="cover",muted:_,onClick:l,loop:d=!1,volume:c=1,onPlay:u,onPause:h,onEnd:p,showFullscreen:g=!0})=>{const m=C(null),f=C(null),b=C(null),[w,y]=x(!0);return t(()=>{(async()=>{try{i&&m.current?(b.current&&await b.current,b.current=m.current.play(),await b.current,b.current=null):m.current&&(b.current&&(await b.current,b.current=null),m.current.pause(),y(!0))}catch(t){"AbortError"!==t.name&&console.error(t)}})();const t=f.current;return()=>{t&&clearTimeout(t)}},[i]),t(()=>{if(m.current&&"number"==typeof c)try{m.current.volume=Math.min(Math.max(c,0),1)}catch(q){console.error(q)}},[c]),/* @__PURE__ */v("div",{className:"relative size-full hover:cursor-pointer",onMouseEnter:()=>!w&&y(!0),onMouseLeave:()=>w&&i&&y(!1),children:[
|
|
2
2
|
/* @__PURE__ */v("video",{ref:m,className:e("size-full","cover"===s&&"object-cover","contain"===s&&"object-contain","fill"===s&&"object-fill","none"===s&&"object-none","scale-down"===s&&"object-scale-down"),src:r,muted:_,loop:d,onLoadedMetadata:()=>{if("number"==typeof c&&m.current)try{m.current.volume=Math.min(Math.max(Number(c)||0,0),1)}catch(q){console.error(q)}},poster:n,controls:o,playsInline:a,onEnded:p,onClick:l,children:"Your browser does not support the video!"}),w&&!o&&/* @__PURE__ */v("button",{type:"button",onClick:()=>{i?h?.():u?.()},"aria-label":i?"Pause video":"Play video",className:"animate-fade-in absolute inset-0 m-auto size-12 hover:opacity-90",children:[i&&/* @__PURE__ */v("svg",{className:"absolute inset-0 m-auto size-12",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:/* @__PURE__ */v("path",{fill:"white",d:"M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"})}),!i&&/* @__PURE__ */v("svg",{className:"absolute inset-0 m-auto size-12",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:/* @__PURE__ */v("path",{fill:"white",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})]}),w&&i&&g&&/* @__PURE__ */v("button",{type:"button",className:"animate-fade-in absolute top-2 right-2 size-6 text-white hover:opacity-90",onClick:()=>{m.current&&(m.current.requestFullscreen?m.current.requestFullscreen():m.current.mozRequestFullScreen?m.current.mozRequestFullScreen():m.current.webkitRequestFullscreen?m.current.webkitRequestFullscreen():m.current.msRequestFullscreen&&m.current.msRequestFullscreen())},"aria-label":"Enter fullscreen",children:/* @__PURE__ */v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:/* @__PURE__ */v("path",{fill:"currentColor",d:"M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"})})})]})};function q(t){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(t){var e=function(t){if("object"!=q(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=q(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==q(e)?e:e+""}function B(t,e,r){return(e=U(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var D,Z=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},W=class{constructor(){B(this,"_lastHandleId",0),B(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(performance.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},H=class{constructor(){B(this,"_strategy",void 0),this._strategy="function"==typeof requestAnimationFrame?new Z:new W}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}},K=typeof window<"u"&&void 0!==window.document,G=new Uint8Array([80,75,3,4]),J=["v","ip","op","layers","fr","w","h"],j=Array(128).fill(void 0);function Q(t){return j[t]}j.push(void 0,null,!0,!1);var V=j.length;function Y(t){V===j.length&&j.push(j.length+1);let e=V;return V=j[e],j[e]=t,e}function X(t,e){try{return t.apply(this,e)}catch(t){D.__wbindgen_export_0(Y(t))}}function $(t){return null==t}var tt=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&tt.decode();var et=null;function rt(){return(null===et||0===et.byteLength)&&(et=new Uint8Array(D.memory.buffer)),et}function nt(t,e){return t>>>=0,tt.decode(rt().subarray(t,t+e))}var it=0,ot=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},at="function"==typeof ot.encodeInto?function(t,e){return ot.encodeInto(t,e)}:function(t,e){let r=ot.encode(t);return e.set(r),{read:t.length,written:r.length}};function st(t,e,r){if(void 0===r){let r=ot.encode(t),n=e(r.length,1)>>>0;return rt().subarray(n,n+r.length).set(r),it=r.length,n}let n=t.length,i=e(n,1)>>>0,o=rt(),a=0;for(;a<n;a++){let e=t.charCodeAt(a);if(e>127)break;o[i+a]=e}if(a!==n){0!==a&&(t=t.slice(a)),i=r(i,n,n=a+3*t.length,1)>>>0;let e=rt().subarray(i+a,i+n);a+=at(t,e).written,i=r(i,n,a,1)>>>0}return it=a,i}var _t=null;function lt(){return(null===_t||!0===_t.buffer.detached||void 0===_t.buffer.detached&&_t.buffer!==D.memory.buffer)&&(_t=new DataView(D.memory.buffer)),_t}function dt(t,e){let r=e(1*t.length,1)>>>0;return rt().set(t,r/1),it=t.length,r}function ct(t){let e=Q(t);return function(t){t<132||(j[t]=V,V=t)}(t),e}var ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{D.__wbindgen_export_4.get(t.dtor)(t.a,t.b)}),ht=null;function pt(t,e,r){D.__wbindgen_export_5(t,e,Y(r))}var gt=Object.freeze({Forward:0,0:"Forward",Reverse:1,1:"Reverse",Bounce:2,2:"Bounce",ReverseBounce:3,3:"ReverseBounce"}),mt=Object.freeze({Idle:0,0:"Idle",Playing:1,1:"Playing",Paused:2,2:"Paused",Stopped:3,3:"Stopped",Tweening:4,4:"Tweening"}),ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>D.__wbg_dotlottieplayerwasm_free(t>>>0,1)),bt=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ft.unregister(this),t}free(){let t=this.__destroy_into_raw();D.__wbg_dotlottieplayerwasm_free(t,0)}clear_slot(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,e,r)}layout_fit(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_layout_fit(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}loop_count(){return D.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return ct(D.dotlottieplayerwasm_poll_event(this.__wbg_ptr))}reset_slot(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,e,r)}set_layout(t,e,r){let n=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),i=it;return 0!==D.dotlottieplayerwasm_set_layout(this.__wbg_ptr,n,i,e,r)}set_marker(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;D.dotlottieplayerwasm_set_marker(this.__wbg_ptr,e,r)}clear_slots(){return 0!==D.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)}is_complete(){return 0!==D.dotlottieplayerwasm_is_complete(this.__wbg_ptr)}reset_slots(){return 0!==D.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)}reset_theme(){return 0!==D.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)}segment_end(){return D.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(t){return 0!==D.dotlottieplayerwasm_set_quality(this.__wbg_ptr,t)}set_segment(t,e){return 0!==D.dotlottieplayerwasm_set_segment(this.__wbg_ptr,t,e)}sm_set_seed(t){return 0!==D.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,t)}static unload_font(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_unload_font(e,r)}animation_id(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_animation_id(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}audio_volume(){return D.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return D.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return D.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return D.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return D.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){D.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){D.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return ct(D.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr))}get_slot_str(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_get_slot_str(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}marker_names(){return ct(D.dotlottieplayerwasm_marker_names(this.__wbg_ptr))}set_autoplay(t){D.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,t)}set_slot_str(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,r,n,i,o)}set_viewport(t,e,r,n){return 0!==D.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,t,e,r,n)}total_frames(){return D.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return 0!==D.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)}current_frame(){return D.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_get_slot_type(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}get_slots_str(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_get_slots_str(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}get_transform(){return ct(D.dotlottieplayerwasm_get_transform(this.__wbg_ptr))}segment_start(){return D.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,e,r)}set_text_slot(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,r,n,i,o)}set_transform(t){let e=function(t,e){let r=e(4*t.length,4)>>>0;return((null===ht||0===ht.byteLength)&&(ht=new Float32Array(D.memory.buffer)),ht).set(t,r/4),it=t.length,r}(t,D.__wbindgen_export_1),r=it;return 0!==D.dotlottieplayerwasm_set_transform(this.__wbg_ptr,e,r)}sm_get_inputs(){return ct(D.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr))}sm_poll_event(){return ct(D.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr))}sm_post_click(t,e){D.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,t,e)}animation_size(){return ct(D.dotlottieplayerwasm_animation_size(this.__wbg_ptr))}current_marker(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_current_marker(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}layout_align_x(){return D.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return D.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_load_animation(this.__wbg_ptr,e,r)}loop_animation(){return 0!==D.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)}set_background(t,e,r,n){return 0!==D.dotlottieplayerwasm_set_background(this.__wbg_ptr,t,e,r,n)}set_color_slot(t,e,r,n){let i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,o,e,r,n)}set_image_slot(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,r,n,i,o)}set_loop_count(t){D.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,t)}set_theme_data(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,e,r)}sm_reset_input(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;D.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,e,r)}manifest_string(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_manifest_string(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}set_scalar_slot(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,r,n,e)}set_vector_slot(t,e,r){let n=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),i=it;return 0!==D.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,n,i,e,r)}setup_sw_target(t,e){return 0!==D.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,t,e)}get_pixel_buffer(){return ct(D.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr))}set_audio_volume(t){D.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,t)}sm_current_state(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_sm_current_state(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}state_machine_id(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_state_machine_id(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}get_state_machine(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_get_state_machine(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}set_position_slot(t,e,r){let n=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),i=it;return 0!==D.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,n,i,e,r)}current_loop_count(){return D.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}set_asset_resolver(t){D.dotlottieplayerwasm_set_asset_resolver(this.__wbg_ptr,$(t)?0:Y(t))}sm_framework_setup(){return ct(D.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr))}sm_post_pointer_up(t,e){D.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,t,e)}state_machine_load(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,e,r)}load_dotlottie_data(t){let e=dt(t,D.__wbindgen_export_1),r=it;return 0!==D.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,e,r)}sm_get_string_input(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_sm_get_string_input(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}sm_set_string_input(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,r,n,i,o)}sm_get_boolean_input(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it,n=D.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,e,r);return 16777215===n?void 0:0!==n}sm_get_numeric_input(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it,n=D.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,e,r);return 4294967297===n?void 0:n}sm_post_pointer_down(t,e){D.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,t,e)}sm_post_pointer_exit(t,e){D.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,t,e)}sm_post_pointer_move(t,e){D.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,t,e)}sm_set_boolean_input(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,r,n,e)}sm_set_numeric_input(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,r,n,e)}state_machine_unload(){D.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(t,e){D.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,t,e)}load_animation_from_id(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,e,r)}sm_poll_internal_event(){return ct(D.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr))}use_frame_interpolation(){return 0!==D.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)}reset_current_loop_count(){D.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,r,n,e)}state_machine_load_from_id(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,e,r)}set_use_frame_interpolation(t){D.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,t)}constructor(){let t=D.dotlottieplayerwasm_new();return this.__wbg_ptr=t>>>0,ft.register(this,this.__wbg_ptr,this),this}mode(){return D.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return 0!==D.dotlottieplayerwasm_play(this.__wbg_ptr)}stop(){return 0!==D.dotlottieplayerwasm_stop(this.__wbg_ptr)}tick(t){return 0!==D.dotlottieplayerwasm_tick(this.__wbg_ptr,t)}pause(){return 0!==D.dotlottieplayerwasm_pause(this.__wbg_ptr)}speed(){return D.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return D.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return D.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return 0!==D.dotlottieplayerwasm_render(this.__wbg_ptr)}status(){return D.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return ct(D.dotlottieplayerwasm_markers(this.__wbg_ptr))}sm_fire(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,e,r)}sm_stop(){return 0!==D.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)}sm_tick(t){return 0!==D.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,t)}autoplay(){return 0!==D.dotlottieplayerwasm_autoplay(this.__wbg_ptr)}duration(){return D.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(t){D.dotlottieplayerwasm_set_loop(this.__wbg_ptr,t)}set_mode(t){D.dotlottieplayerwasm_set_mode(this.__wbg_ptr,t)}sm_start(t,e){let r=function(t){let e=(0,D.__wbindgen_export_1)(4*t.length,4)>>>0,r=lt();for(let n=0;n<t.length;n++)r.setUint32(e+4*n,Y(t[n]),!0);return it=t.length,e}(e),n=it;return 0!==D.dotlottieplayerwasm_sm_start(this.__wbg_ptr,t,r,n)}theme_id(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_theme_id(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}load_font(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=dt(e,D.__wbindgen_export_1),o=it;return 0!==D.dotlottieplayerwasm_load_font(this.__wbg_ptr,r,n,i,o)}set_frame(t){return 0!==D.dotlottieplayerwasm_set_frame(this.__wbg_ptr,t)}set_speed(t){D.dotlottieplayerwasm_set_speed(this.__wbg_ptr,t)}set_theme(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_set_theme(this.__wbg_ptr,e,r)}sm_status(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_sm_status(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}};async function wt(t){if(void 0!==D)return D;if(void 0!==t&&(Object.getPrototypeOf(t)===Object.prototype?({module_or_path:t}=t):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t)throw Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");let e=function(){let t={wbg:{}};return t.wbg.__wbg_appendChild_8204974b7328bf98=function(){return X(function(t,e){return Y(Q(t).appendChild(Q(e)))},arguments)},t.wbg.__wbg_body_942ea927546a04ba=function(t){let e=Q(t).body;return $(e)?0:Y(e)},t.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return Y(Q(t).buffer)},t.wbg.__wbg_call_672a4d21634d4a24=function(){return X(function(t,e){return Y(Q(t).call(Q(e)))},arguments)},t.wbg.__wbg_call_7cccdd69e0791ae2=function(){return X(function(t,e,r){return Y(Q(t).call(Q(e),Q(r)))},arguments)},t.wbg.__wbg_catch_a6e601879b2610e9=function(t,e){return Y(Q(t).catch(Q(e)))},t.wbg.__wbg_createElement_8c9931a732ee2fea=function(){return X(function(t,e,r){return Y(Q(t).createElement(nt(e,r)))},arguments)},t.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return X(function(t,e){let r=st(URL.createObjectURL(Q(e)),D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;lt().setInt32(t+4,n,!0),lt().setInt32(t+0,r,!0)},arguments)},t.wbg.__wbg_currentTime_7940fe39798a1ca0=function(t){return Q(t).currentTime},t.wbg.__wbg_data_d1ed736c1e42b10e=function(t,e){let r=dt(Q(e).data,D.__wbindgen_export_1),n=it;lt().setInt32(t+4,n,!0),lt().setInt32(t+0,r,!0)},t.wbg.__wbg_document_d249400bd7bd996d=function(t){let e=Q(t).document;return $(e)?0:Y(e)},t.wbg.__wbg_drawImage_803dcc46897223c9=function(){return X(function(t,e,r,n){Q(t).drawImage(Q(e),r,n)},arguments)},t.wbg.__wbg_duration_4d32c501d87796c1=function(t){return Q(t).duration},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,n;try{r=t,n=e,console.error(nt(t,e))}finally{D.__wbindgen_export_3(r,n,1)}},t.wbg.__wbg_getContext_e9cf379449413580=function(){return X(function(t,e,r){let n=Q(t).getContext(nt(e,r));return $(n)?0:Y(n)},arguments)},t.wbg.__wbg_getImageData_c02374a30b126dab=function(){return X(function(t,e,r,n,i){return Y(Q(t).getImageData(e,r,n,i))},arguments)},t.wbg.__wbg_instanceof_CanvasRenderingContext2d_df82a4d3437bf1cc=function(t){let e;try{e=Q(t)instanceof CanvasRenderingContext2D}catch{e=!1}return e},t.wbg.__wbg_instanceof_HtmlCanvasElement_2ea67072a7624ac5=function(t){let e;try{e=Q(t)instanceof HTMLCanvasElement}catch{e=!1}return e},t.wbg.__wbg_instanceof_HtmlVideoElement_7f414b32f362e317=function(t){let e;try{e=Q(t)instanceof HTMLVideoElement}catch{e=!1}return e},t.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=Q(t)instanceof Window}catch{e=!1}return e},t.wbg.__wbg_length_a446193dc22c12f8=function(t){return Q(t).length},t.wbg.__wbg_load_2671477a3293aadb=function(t){Q(t).load()},t.wbg.__wbg_new_405e22f390576ce2=function(){return Y({})},t.wbg.__wbg_new_78feb108b6472713=function(){return Y([])},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Y(Error())},t.wbg.__wbg_new_a12002a7f91c75be=function(t){return Y(new Uint8Array(Q(t)))},t.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return Y(Function(nt(t,e)))},t.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return Y(new Uint8Array(Q(t),e>>>0,r>>>0))},t.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(t){return Y(new Float32Array(t>>>0))},t.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return X(function(t,e){return Y(new Audio(nt(t,e)))},arguments)},t.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return X(function(t,e){return Y(new Blob(Q(t),Q(e)))},arguments)},t.wbg.__wbg_pause_b74c96d69f769518=function(){return X(function(t){Q(t).pause()},arguments)},t.wbg.__wbg_paused_9b2affc0a8a62e86=function(t){return Q(t).paused},t.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return X(function(t){return Y(Q(t).play())},arguments)},t.wbg.__wbg_push_737cfc8c1432c2c6=function(t,e){return Q(t).push(Q(e))},t.wbg.__wbg_readyState_017c08aa5e73517e=function(t){return Q(t).readyState},t.wbg.__wbg_remove_e2d2659f3128c045=function(t){Q(t).remove()},t.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return X(function(t,e){URL.revokeObjectURL(nt(t,e))},arguments)},t.wbg.__wbg_seeking_c0427be38e698dcd=function(t){return Q(t).seeking},t.wbg.__wbg_setAttribute_2704501201f15687=function(){return X(function(t,e,r,n,i){Q(t).setAttribute(nt(e,r),nt(n,i))},arguments)},t.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){Q(t).set(Q(e),r>>>0)},t.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return X(function(t,e,r){return Reflect.set(Q(t),Q(e),Q(r))},arguments)},t.wbg.__wbg_setcssText_e018c236104b0233=function(t,e,r){Q(t).cssText=nt(e,r)},t.wbg.__wbg_setcurrentTime_64727eddd3966512=function(t,e){Q(t).currentTime=e},t.wbg.__wbg_setheight_da683a33fa99843c=function(t,e){Q(t).height=e>>>0},t.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(t,e,r){Q(t)[e>>>0]=r},t.wbg.__wbg_setmuted_e93fc48340c43e67=function(t,e){Q(t).muted=0!==e},t.wbg.__wbg_setplaybackRate_f5c3b8896f82425e=function(t,e){Q(t).playbackRate=e},t.wbg.__wbg_setpreload_d2fb02758e3f8e3a=function(t,e,r){Q(t).preload=nt(e,r)},t.wbg.__wbg_setsrc_3a759736e2659904=function(t,e,r){Q(t).src=nt(e,r)},t.wbg.__wbg_settype_39ed370d3edd403c=function(t,e,r){Q(t).type=nt(e,r)},t.wbg.__wbg_setvolume_3895e06a030ca4f7=function(t,e){Q(t).volume=e},t.wbg.__wbg_setwidth_c5fed9f5e7f0b406=function(t,e){Q(t).width=e>>>0},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){let r=st(Q(e).stack,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;lt().setInt32(t+4,n,!0),lt().setInt32(t+0,r,!0)},t.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return $(t)?0:Y(t)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return $(t)?0:Y(t)},t.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return $(t)?0:Y(t)},t.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return $(t)?0:Y(t)},t.wbg.__wbg_style_fb30c14e5815805c=function(t){return Y(Q(t).style)},t.wbg.__wbg_videoHeight_3a43327a766c1f03=function(t){return Q(t).videoHeight},t.wbg.__wbg_videoWidth_4b400cf6f4744a4d=function(t){return Q(t).videoWidth},t.wbg.__wbindgen_cb_drop=function(t){let e=ct(t).original;return 1==e.cnt--&&(e.a=0,!0)},t.wbg.__wbindgen_closure_wrapper109=function(t,e,r){return Y(function(t,e,r,n){let i={a:t,b:e,cnt:1,dtor:7},o=(...t)=>{i.cnt++;let e=i.a;i.a=0;try{return n(e,i.b,...t)}finally{0===--i.cnt?(D.__wbindgen_export_4.get(i.dtor)(e,i.b),ut.unregister(i)):i.a=e}};return o.original=i,ut.register(o,i,i),o}(t,e,0,pt))},t.wbg.__wbindgen_is_null=function(t){return null===Q(t)},t.wbg.__wbindgen_is_undefined=function(t){return void 0===Q(t)},t.wbg.__wbindgen_memory=function(){return Y(D.memory)},t.wbg.__wbindgen_number_new=function(t){return Y(t)},t.wbg.__wbindgen_object_clone_ref=function(t){return Y(Q(t))},t.wbg.__wbindgen_object_drop_ref=function(t){ct(t)},t.wbg.__wbindgen_string_get=function(t,e){let r=Q(e),n="string"==typeof r?r:void 0;var i=$(n)?0:st(n,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;lt().setInt32(t+4,o,!0),lt().setInt32(t+0,i,!0)},t.wbg.__wbindgen_string_new=function(t,e){return Y(nt(t,e))},t.wbg.__wbindgen_throw=function(t,e){throw Error(nt(t,e))},t}();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await async function(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(e){if("application/wasm"==t.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}{let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}(await t,e);return function(t,e){return D=t.exports,wt.__wbindgen_wasm_module=e,_t=null,ht=null,et=null,D}(r,n)}var yt=class{constructor(){B(this,"_eventListeners",/* @__PURE__ */new Map)}addEventListener(t,e){let r=this._eventListeners.get(t);r||(r=/* @__PURE__ */new Set,this._eventListeners.set(t,r)),r.add(e)}removeEventListener(t,e){let r=this._eventListeners.get(t);r&&(e?(r.delete(e),0===r.size&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}dispatch(t){this._eventListeners.get(t.type)?.forEach(e=>e(t))}removeAllEventListeners(){this._eventListeners.clear()}},vt=class t{static _initializeObserver(){t._observer||(t._observer=new IntersectionObserver(e=>{e.forEach(e=>{let r=t._observedCanvases.get(e.target);r&&(e.isIntersecting?r.unfreeze():r.freeze())})},{threshold:0}))}static observe(e,r){t._initializeObserver(),!t._observedCanvases.has(e)&&(t._observedCanvases.set(e,r),t._observer?.observe(e))}static unobserve(e){t._observer?.unobserve(e),t._observedCanvases.delete(e),0===t._observedCanvases.size&&(t._observer?.disconnect(),t._observer=null)}};B(vt,"_observer",null),B(vt,"_observedCanvases",/* @__PURE__ */new Map);var Ct=class t{static _initializeObserver(){t._observer||(t._observer=new ResizeObserver(e=>{e.forEach(e=>{let r=t._observedCanvases.get(e.target);if(!r)return;let[n,i]=r;clearTimeout(i);let o=setTimeout(()=>{n.resize()},100);t._observedCanvases.set(e.target,[n,o])})}))}static observe(e,r){t._initializeObserver(),!t._observedCanvases.has(e)&&(t._observedCanvases.set(e,[r,0]),t._observer?.observe(e))}static unobserve(e){let r=t._observedCanvases.get(e);if(r){let t=r[1];t&&clearTimeout(t)}t._observer?.unobserve(e),t._observedCanvases.delete(e),!t._observedCanvases.size&&t._observer&&(t._observer.disconnect(),t._observer=null)}};function Lt(t){if(t.byteLength<4)return!1;let e=new Uint8Array(t.slice(0,G.byteLength));for(let r=0;r<G.length;r+=1)if(G[r]!==e[r])return!1;return!0}function xt(t){return"string"==typeof t?/^\s*\{/u.test(t)&&/\}\s*$/u.test(t):function(t){return J.every(e=>Object.hasOwn(t,e))}(t)}function At(){return 1+.75*((K?window.devicePixelRatio:1)-1)}function Mt(t){let e=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return!(e.bottom<0||e.top>r||e.right<0||e.left>n)}function kt(t){let e=t.target;if(e instanceof HTMLCanvasElement){let r=e.getBoundingClientRect();if(0===r.width||0===r.height||0===e.width||0===e.height)return null;let n=e.width/r.width,i=e.height/r.height,o=(t.clientX-r.left)*n,a=(t.clientY-r.top)*i;return!Number.isFinite(o)||!Number.isFinite(a)||Number.isNaN(o)||Number.isNaN(a)?null:{x:o,y:a}}return null}function St(t){let e,r,n=t.replace("OpenUrl: ",""),i=n.indexOf(" | Target: ");-1===i?(e=n,r="_blank"):(e=n.substring(0,i),r=n.substring(i+11)),window.open(e,r)}B(Ct,"_observer",null),B(Ct,"_observedCanvases",/* @__PURE__ */new Map);var Et=null;function It(){return Et??(Et=function(t){let e=null,r="https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.81.0/dist/dotlottie-player.wasm",n="https://unpkg.com/@lottiefiles/dotlottie-web@0.81.0/dist/dotlottie-player.wasm";async function i(e){await t({module_or_path:e})}async function o(e){let r=await fetch(e);if(!r.ok)throw Error(`fetch ${e} responded with ${r.status} ${r.statusText}`);await t({module_or_path:await r.arrayBuffer()})}async function a(t,e){try{return await t(e),null}catch(t){return t}}return{load(){if(!e){let t=r,s=null;s=(async()=>{let r=await a(i,t);if(!r)return;console.warn(`Primary WASM load failed from ${t}: ${r.message}`);let _=null;if(null!==n){if(console.warn(`Attempting to load WASM from backup URL: ${n}`),_=await a(i,n),!_)return;console.warn(`Backup WASM load failed from ${n}: ${_.message}`)}console.warn("Retrying WASM load with buffered instantiation");let l=await a(o,t);if(l&&(console.warn(`Buffered WASM load from ${t} failed: ${l.message}`),null===n||(l=await a(o,n),l)))throw console.error(`Primary WASM URL failed: ${r.message}`),_&&console.error(`Backup WASM URL failed: ${_.message}`),console.error(`Buffered fallback failed: ${l.message}`),e===s&&(e=null),Error("WASM loading failed from all sources.")})(),e=s}return e},setWasmUrl(t){if("string"!=typeof t||""===t.trim())throw TypeError("setWasmUrl() expects a non-empty URL string");n=null,t!==r&&(r=t,e=null)}}}(wt)),Et}var Ft=t=>{switch(t){case"reverse":return gt.Reverse;case"bounce":return gt.Bounce;case"reverse-bounce":return gt.ReverseBounce;default:return gt.Forward}},Ot=t=>{switch(t){case gt.Reverse:return"reverse";case gt.Bounce:return"bounce";case gt.ReverseBounce:return"reverse-bounce";default:return"forward"}},Pt=t=>{switch(t){case"contain":default:return"contain";case"cover":return"cover";case"fill":return"fill";case"fit-height":return"fit-height";case"fit-width":return"fit-width";case"none":return"none"}},Nt=class{constructor(t){B(this,"_canvas",null),B(this,"_pendingLoad",null),B(this,"_srcFetchAbort",null),B(this,"_context",null),B(this,"_eventManager",void 0),B(this,"_animationFrameId",null),B(this,"_frameManager",void 0),B(this,"_boundAnimationLoop",void 0),B(this,"_dotLottieCore",null),B(this,"_stateMachineId",""),B(this,"_stateMachineConfig",null),B(this,"_isStateMachineRunning",!1),B(this,"_renderConfig",{}),B(this,"_isFrozen",!1),B(this,"_backgroundColor",null),B(this,"_lastFrameTime",null),B(this,"_boundOnClick",null),B(this,"_boundOnPointerUp",null),B(this,"_boundOnPointerDown",null),B(this,"_boundOnPointerMove",null),B(this,"_boundOnPointerEnter",null),B(this,"_boundOnPointerLeave",null),B(this,"_bufferMismatchCount",0),B(this,"_lastExpectedBufferSize",0),B(this,"_cachedImageData",null),B(this,"_cachedImageDataBuffer",null),B(this,"_cachedImageDataByteOffset",0),B(this,"_marker",""),B(this,"_segment",null),this._canvas=t.canvas??null,this._eventManager=new yt,this._frameManager=new H,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||At(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0};let e=null;t.src&&!t.data&&(this._srcFetchAbort=new AbortController,e=this._fetchData(t.src,this._srcFetchAbort.signal),e.catch(()=>{})),this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(Ft(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length&&(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=t.marker??"",this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),this._stateMachineId=t.stateMachineId??"",this._stateMachineConfig=t.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:"ready"}),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src,e):this._pendingLoad={src:t.src,dataPromise:e}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(t=>{this._srcFetchAbort?.abort(),console.error("[dotlottie-web] Initialization failed:",t),this._eventManager.dispatch({type:"loadError",error:Error(`Failed to load wasm module: ${t}`)})})}async _initWasm(){return It().load()}_createCore(){return new bt}_onCoreCreated(){}_setupTarget(t,e){return!!this._dotLottieCore&&this._dotLottieCore.setup_sw_target(t,e)}_drainPlayerEvents({skipFrame:t=!1}={}){if(this._dotLottieCore)for(;;){let e=this._dotLottieCore.poll_event();if(null==e)break;switch(e.type){case"Load":setTimeout(()=>this._eventManager.dispatch({type:"load"}),0);break;case"LoadError":setTimeout(()=>this._eventManager.dispatch({type:"loadError",error:Error("failed to load")}),0);break;case"Play":queueMicrotask(()=>this._eventManager.dispatch({type:"play"}));break;case"Pause":queueMicrotask(()=>this._eventManager.dispatch({type:"pause"}));break;case"Stop":queueMicrotask(()=>this._eventManager.dispatch({type:"stop"}));break;case"Frame":{let r=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"frame",currentFrame:r}));break}case"Render":{let r=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"render",currentFrame:r}));break}case"Loop":{let t=e.loopCount??0;queueMicrotask(()=>this._eventManager.dispatch({type:"loop",loopCount:t}));break}case"Complete":queueMicrotask(()=>this._eventManager.dispatch({type:"complete"}))}}}_discardPlayerEvents(){for(;null!=this._dotLottieCore?.poll_event(););}_drainSmEvents(){if(this._dotLottieCore){for(;;){let t=this._dotLottieCore.sm_poll_event();if(null==t)break;switch(t.type){case"Start":queueMicrotask(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:"stateMachineStart"}),this._startAnimationLoop()});break;case"Stop":queueMicrotask(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:"stateMachineStop"}),this._dotLottieCore?.status()!==mt.Playing&&this._stopAnimationLoop()});break;case"CustomEvent":this._eventManager.dispatch({type:"stateMachineCustomEvent",eventName:t.message??""});break;case"BooleanInputChange":this._eventManager.dispatch({type:"stateMachineBooleanInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"NumericInputChange":this._eventManager.dispatch({type:"stateMachineNumericInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"StringInputChange":this._eventManager.dispatch({type:"stateMachineStringInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"InputFired":this._eventManager.dispatch({type:"stateMachineInputFired",inputName:t.name??""});break;case"Transition":this._eventManager.dispatch({type:"stateMachineTransition",fromState:t.previousState??"",toState:t.newState??""});break;case"StateEntered":this._eventManager.dispatch({type:"stateMachineStateEntered",state:t.state??""});break;case"StateExit":this._eventManager.dispatch({type:"stateMachineStateExit",state:t.state??""});break;case"Error":this._eventManager.dispatch({type:"stateMachineError",error:t.message??""})}}for(;;){let t=this._dotLottieCore.sm_poll_internal_event();if(null==t)break;if("Message"===t.type){let e=t.message??"";K&&e.startsWith("OpenUrl: ")?St(e):this._eventManager.dispatch({type:"stateMachineInternalMessage",message:e})}}}}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:Error(t)})}async _fetchData(t,e=null){let r=await fetch(t,{signal:e});if(!r.ok)throw Error(`Failed to fetch animation data from URL: ${t}. ${r.status}: ${r.statusText}`);let n=await r.arrayBuffer();return Lt(n)?n:(new TextDecoder).decode(n)}_loadFromData(t){if(null===this._dotLottieCore)return;if(!this._canvas)return void console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.");this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height);let e=!1;if("string"==typeof t){if(e=this._dotLottieCore.load_animation(t),!e&&!xt(t))return this._discardPlayerEvents(),void this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.")}else if(t instanceof ArrayBuffer){if(!Lt(t))return void this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");e=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else{if("object"!=typeof t)return void this._dispatchError("Unsupported data type for animation data. Expected:\n - string (Lottie JSON),\n - ArrayBuffer (dotLottie),\n - object (Lottie JSON).\n Received: "+typeof t);if(!xt(t))return void this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");e=this._dotLottieCore.load_animation(JSON.stringify(t))}if(e){if(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents({skipFrame:!!this._marker||!!this._segment}),this._marker&&this._dotLottieCore.set_marker(this._marker),this._segment){this._dotLottieCore.set_segment(this._segment[0],this._segment[1]);let t=Ot(this._dotLottieCore.mode()),e="reverse"===t||"reverse-bounce"===t?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(e)}setTimeout(()=>{this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.status()===mt.Playing&&this._startAnimationLoop(),K&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(vt.observe(this._canvas,this),Mt(this._canvas)||this.freeze()),this._renderConfig.autoResize&&Ct.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(t,e){(e??this._fetchData(t)).then(t=>this._loadFromData(t)).catch(e=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${e}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:Pt(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??""}get manifest(){try{let t=this._dotLottieCore?.manifest_string();if(null===this._dotLottieCore||!t)return null;let e=JSON.parse(t);return 0===Object.keys(e).length?null:e}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(this._dotLottieCore)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?Ot(this._dotLottieCore.mode()):"forward"}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return null!==this._dotLottieCore}get isLoaded(){return(this._dotLottieCore?.status()??mt.Idle)!==mt.Idle}get isPlaying(){return this._dotLottieCore?.status()===mt.Playing}get isPaused(){return this._dotLottieCore?.status()===mt.Paused}get isStopped(){return this._dotLottieCore?.status()===mt.Stopped}get currentFrame(){return this._dotLottieCore?Math.round(100*this._dotLottieCore.current_frame())/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return(this._dotLottieCore?.duration()??0)/1e3}get canvas(){return this._canvas}load(t){null!==this._dotLottieCore&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(Ft(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length?(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,this._dotLottieCore.clear_segment()),this._marker=t.marker??"",this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src):this._pendingLoad={src:t.src}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor))}_draw(){if(null===this._dotLottieCore||null===this._canvas||(!this._context&&"getContext"in this._canvas&&"function"==typeof this._canvas.getContext&&(!K||typeof HTMLCanvasElement<"u"&&this._canvas instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext("2d")),!this._context))return;let t=this._dotLottieCore.get_pixel_buffer(),e=this._canvas.width,r=this._canvas.height,n=e*r*4;if(t.byteLength!==n)return this._lastExpectedBufferSize===n?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=n),void(10===this._bufferMismatchCount&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${n} bytes for canvas ${e}x${r}, but got ${t.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`));this._bufferMismatchCount=0,this._lastExpectedBufferSize=n;let i=this._cachedImageData;if(null===i||i.width!==e||i.height!==r||i.data.byteLength!==n||this._cachedImageDataBuffer!==t.buffer||this._cachedImageDataByteOffset!==t.byteOffset){if(typeof ImageData>"u")this._cachedImageData=this._context.createImageData(e,r);else{let n=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(n,e,r)}this._cachedImageDataBuffer=t.buffer,this._cachedImageDataByteOffset=t.byteOffset}if(typeof ImageData>"u"){let e=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData.data.set(e)}this._context.putImageData(this._cachedImageData,0,0)}_cleanupCanvas(){this._canvas&&K&&this._canvas instanceof HTMLCanvasElement&&(vt.unobserve(this._canvas),Ct.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&K&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(vt.observe(this._canvas,this),Mt(this._canvas)||this.freeze()),this._renderConfig.autoResize&&Ct.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){null!==this._animationFrameId&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._lastFrameTime=null}_startAnimationLoop(){null===this._animationFrameId&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.status()===mt.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(t){if(null!==this._dotLottieCore)if(this._dotLottieCore.status()===mt.Playing||this._isStateMachineRunning)try{let e=null===this._lastFrameTime?0:t-this._lastFrameTime;this._lastFrameTime=t;let r=this._isStateMachineRunning?this._dotLottieCore.sm_tick(e):this._dotLottieCore.tick(e);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),r&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop)}catch(t){console.error("Error in animation frame:",t),this._eventManager.dispatch({type:"renderError",error:t}),t instanceof WebAssembly.RuntimeError&&this.destroy()}else this._stopAnimationLoop();else this._stopAnimationLoop()}play(){if(null===this._dotLottieCore||!this.isLoaded)return;this._stopAnimationLoop();let t=this._dotLottieCore.play();this._drainPlayerEvents(),(t||this._dotLottieCore.status()===mt.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&K&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!Mt(this._canvas)&&this.freeze()}pause(){null!==this._dotLottieCore&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(null===this._dotLottieCore)return;let t=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),t&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(t){if(null!==this._dotLottieCore&&this._dotLottieCore.set_frame(t)){let t=this._dotLottieCore.render();this._drainPlayerEvents(),t&&this._draw()}}setSpeed(t){null!==this._dotLottieCore&&this._dotLottieCore.set_speed(t)}setBackgroundColor(t){if(null!==this._dotLottieCore){if(K&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,r,n,i]=function(t){if(!function(t){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(t)}(t))return[0,0,0,0];let e=t.replace("#","");return e=6===e.length?`${e}ff`:e,[parseInt(e.slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255,parseInt(e.slice(6,8),16)/255]}(t);this._dotLottieCore.set_background(e,r,n,i)}this._backgroundColor=t}}setLoop(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop(t)}setLoopCount(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop_count(t)}setUseFrameInterpolation(t){null!==this._dotLottieCore&&this._dotLottieCore.set_use_frame_interpolation(t)}_applyAssetResolver(t){if(null!==this._dotLottieCore){if(null===t)return void this._dotLottieCore.set_asset_resolver(null);this._dotLottieCore.set_asset_resolver(e=>{try{return t(e)??null}catch(t){return console.error(`[dotlottie-web] assetResolver threw for "${e}":`,t),null}})}}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let t=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,t)try{t.free()}catch(t){console.warn("[dotlottie-web] Error freeing wasm core during destroy:",t)}this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){null!==this._animationFrameId&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){null===this._animationFrameId&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this._startAnimationLoop())}_syncCanvasSize(){if(!(K&&this._canvas instanceof HTMLCanvasElement))return;let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:e,width:r}=this._canvas.getBoundingClientRect();0!==e&&0!==r&&(this._canvas.width=r*t,this._canvas.height=e*t)}resize(){!this._dotLottieCore||!this.isLoaded||!this._canvas||(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw()))}setCanvas(t){if(t&&this._canvas!==t&&(this._canvas&&this._cleanupCanvas(),this._canvas=t,this._initializeCanvas(),this._pendingLoad)){let t=this._pendingLoad;this._pendingLoad=null,t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src,t.dataPromise)}}setTransform(t){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.set_transform(new Float32Array(t));return e&&this._dotLottieCore.render()&&this._draw(),e}getTransform(){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_transform();return Array.from(t)}setSegment(t,e){null!==this._dotLottieCore&&(this._segment=[t,e],this._dotLottieCore.set_segment(t,e))}resetSegment(){null!==this._dotLottieCore&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(t){null!==this._dotLottieCore&&this._dotLottieCore.set_mode(Ft(t))}setRenderConfig(t){let{devicePixelRatio:e,freezeOnOffscreen:r,quality:n,...i}=t;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:e||At(),freezeOnOffscreen:r??!0,...void 0!==n&&{quality:n}},void 0!==n&&this._dotLottieCore&&this._dotLottieCore.set_quality(n),K&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?Ct.observe(this._canvas,this):Ct.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(vt.observe(this._canvas,this),Mt(this._canvas)||this.freeze()):(vt.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){null===this._dotLottieCore||this._dotLottieCore.animation_id()===t||!this._canvas||(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(t)?(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${t}`))}setMarker(t){null!==this._dotLottieCore&&(this.markers().some(e=>e.name===t)?(this._marker=t,this._dotLottieCore.set_marker(t)):(this._marker="",this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment()))}markers(){let t=this._dotLottieCore?.markers();return t&&Array.isArray(t)?t:[]}setTheme(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.set_theme(t);return e&&(this._dotLottieCore.render(),this._draw()),e}resetTheme(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_theme();return t&&(this._dotLottieCore.render(),this._draw()),t}setThemeData(t){if(null===this._dotLottieCore)return!1;let e="string"==typeof t?t:JSON.stringify(t),r=this._dotLottieCore.set_theme_data(e);return r&&(this._dotLottieCore.render(),this._draw()),r}setSlots(t){null!==this._dotLottieCore&&this._dotLottieCore.set_slots_str(JSON.stringify(t))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(t){return Array.isArray(t)&&t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"t"in t[0]&&"s"in t[0]}getSlotIds(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.get_slot_ids();return Array.isArray(t)?t:[]}getSlotType(t){if(!this._dotLottieCore)return;return this._dotLottieCore.get_slot_type(t)||void 0}getSlot(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_str(t);if(e)try{return JSON.parse(e)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(t,e){if(null===this._dotLottieCore)return!1;let r=this._isKeyframeArray(e),n=JSON.stringify({a:+!!r,k:e}),i=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),i}setScalarSlot(t,e){if(null===this._dotLottieCore)return!1;let r=JSON.stringify({a:"number"==typeof e?0:1,k:e}),n=this._dotLottieCore.set_slot_str(t,r);return this._dotLottieCore.render(),this._draw(),n}setVectorSlot(t,e){if(null===this._dotLottieCore)return!1;let r=this._isKeyframeArray(e),n=JSON.stringify({a:+!!r,k:e}),i=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),i}setGradientSlot(t,e,r){if(null===this._dotLottieCore)return!1;let n=this._isKeyframeArray(e),i=JSON.stringify({k:{a:+!!n,k:e},p:r}),o=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),o}setTextSlot(t,e){if(null===this._dotLottieCore)return!1;let r=this._dotLottieCore.get_slot_str(t),n=e;if(r){let t=JSON.parse(r);if(t&&"k"in t&&Array.isArray(t.k)){let r=t.k[0];"s"in r&&"object"==typeof r.s&&(n={...r.s,...e})}}let i=JSON.stringify({a:0,k:[{t:0,s:n}]}),o=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),o}async setImageSlot(t,e){if(null===this._dotLottieCore)return!1;let r=await async function(t){if(!/^https?:\/\//i.test(t))return t;let e=await fetch(t);if(!e.ok)throw Error(`Failed to fetch image slot source from URL: ${t}. ${e.status}: ${e.statusText}`);return function(t){return new Promise((e,r)=>{let n=new FileReader;n.onerror=()=>r(n.error??Error("Failed to read image slot source")),n.onload=()=>e(n.result),n.readAsDataURL(t)})}(await e.blob())}(e);if(null===this._dotLottieCore)return!1;let n=this._dotLottieCore.set_image_slot(t,r);return this._dotLottieCore.render(),this._draw(),n}resetSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.reset_slot(t);return this._dotLottieCore.render(),this._draw(),e}clearSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.clear_slot(t);return this._dotLottieCore.render(),this._draw(),e}resetSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),t}clearSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),t}setLayout(t){null!==this._dotLottieCore&&this._dotLottieCore.set_layout(t.fit??"contain",t.align?.[0]??.5,t.align?.[1]??.5)}setViewport(t,e,r,n){return null!==this._dotLottieCore&&this._dotLottieCore.set_viewport(t,e,r,n)}static setWasmUrl(t){It().setWasmUrl(t)}static preload(){return It().load()}static async registerFont(t,e){try{let r;if(await It().load(),"string"==typeof e){let t=await fetch(e);if(!t.ok)return console.error(`Failed to fetch font from URL: ${e}. Status: ${t.status}`),!1;r=new Uint8Array(await t.arrayBuffer())}else r=e instanceof Uint8Array?e:new Uint8Array(e);let n=function(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=dt(e,D.__wbindgen_export_1),o=it;return 0!==D.register_font(r,n,i,o)}(t,r);return n||console.error(`Failed to register font "${t}". Font data may be invalid.`),n}catch(e){return console.error(`Error registering font "${t}":`,e),!1}}animationSize(){let t=this._dotLottieCore?.animation_size();return{width:t?.[0]??0,height:t?.[1]??0}}stateMachineLoad(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load_from_id(t)}stateMachineLoadData(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load(t)}stateMachineSetConfig(t){this._stateMachineConfig=t}stateMachineStart(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),t&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),t}stateMachineStop(){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_stop();return this._drainSmEvents(),t&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.status()!==mt.Playing&&this._stopAnimationLoop()),t}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??""}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??""}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??""}stateMachineOverrideState(t,e=!1){return this._dotLottieCore?.sm_override_current_state(t,e)??!1}stateMachineSetSeed(t){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(t)))??!1}stateMachineGet(t){return this._dotLottieCore?.get_state_machine(t)??""}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_framework_setup();return Array.isArray(t)?t:[]}stateMachineSetBooleanInput(t,e){return this._dotLottieCore?.sm_set_boolean_input(t,e)??!1}stateMachineSetNumericInput(t,e){return this._dotLottieCore?.sm_set_numeric_input(t,e)??!1}stateMachineSetStringInput(t,e){return this._dotLottieCore?.sm_set_string_input(t,e)??!1}stateMachineGetBooleanInput(t){return this._dotLottieCore?.sm_get_boolean_input(t)??void 0}stateMachineGetNumericInput(t){return this._dotLottieCore?.sm_get_numeric_input(t)??void 0}stateMachineGetStringInput(t){return this._dotLottieCore?.sm_get_string_input(t)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_get_inputs();return Array.isArray(t)?t:[]}stateMachineFireEvent(t){this._dotLottieCore?.sm_fire(t)}stateMachinePostClickEvent(t,e){this._dotLottieCore?.sm_post_click(t,e)}stateMachinePostPointerUpEvent(t,e){this._dotLottieCore?.sm_post_pointer_up(t,e)}stateMachinePostPointerDownEvent(t,e){this._dotLottieCore?.sm_post_pointer_down(t,e)}stateMachinePostPointerMoveEvent(t,e){this._dotLottieCore?.sm_post_pointer_move(t,e)}stateMachinePostPointerEnterEvent(t,e){this._dotLottieCore?.sm_post_pointer_enter(t,e)}stateMachinePostPointerExitEvent(t,e){this._dotLottieCore?.sm_post_pointer_exit(t,e)}_onClick(t){let e=kt(t);e&&this.stateMachinePostClickEvent(e.x,e.y)}_onPointerUp(t){let e=kt(t);e&&this.stateMachinePostPointerUpEvent(e.x,e.y)}_onPointerDown(t){let e=kt(t);e&&this.stateMachinePostPointerDownEvent(e.x,e.y)}_onPointerMove(t){let e=kt(t);e&&this.stateMachinePostPointerMoveEvent(e.x,e.y)}_onPointerEnter(t){let e=kt(t);e&&this.stateMachinePostPointerEnterEvent(e.x,e.y)}_onPointerLeave(t){let e=kt(t);e&&this.stateMachinePostPointerExitEvent(e.x,e.y)}_setupStateMachineListeners(){if(K&&this._canvas instanceof HTMLCanvasElement&&null!==this._dotLottieCore&&this.isLoaded){let t=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){K&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}},Tt=({animationId:e,autoplay:r,backgroundColor:n,className:i,createDotLottie:o,data:a,dotLottieRefCallback:s,layout:_,loop:l,loopCount:d,mode:c,playOnHover:u,renderConfig:h,segment:p,speed:g,src:m,stateMachineConfig:f,stateMachineId:b,style:w,themeData:y,themeId:x,useFrameInterpolation:A,workerId:M,...k})=>{let S=C(null),E=C(null),I=C(m),F=C(s),O=C(null),P={speed:g,mode:c,loop:l,loopCount:d,useFrameInterpolation:A,segment:p,backgroundColor:n,autoplay:r,themeId:x,workerId:M,src:m,data:a,layout:_,renderConfig:h,animationId:e,stateMachineConfig:f,stateMachineId:b},N=C(P);F.current=s,N.current=P;let T=L(t=>{if(E.current=t,t){let e=O.current;e&&e.canvas===t?(clearTimeout(e.timer),O.current=null,S.current=e.instance):S.current?.canvas!==t&&(S.current=o({...N.current,canvas:t}))}else if(S.current){let t=S.current,e=t.canvas;S.current=null,e instanceof HTMLCanvasElement?O.current={canvas:e,instance:t,timer:setTimeout(()=>{O.current?.instance===t&&(O.current=null),t.destroy()},0)}:t.destroy()}F.current?.(S.current)},[]);return t(()=>{let t=t=>{u&&("mouseenter"===t.type&&S.current?.play(),"mouseleave"===t.type&&S.current?.pause())};return E.current?.addEventListener("mouseenter",t),E.current?.addEventListener("mouseleave",t),()=>{E.current?.removeEventListener("mouseenter",t),E.current?.removeEventListener("mouseleave",t)}},[u]),t(()=>{S.current?.setSpeed(g??1)},[g]),t(()=>{S.current?.setMode(c??"forward")},[c]),t(()=>{S.current?.setLoop(l??!1)},[l]),t(()=>{S.current?.setLoopCount(d??0)},[d]),t(()=>{S.current?.setUseFrameInterpolation(A??!0)},[A]),t(()=>{"number"==typeof p?.[0]&&"number"==typeof p[1]?S.current?.setSegment(p[0],p[1]):S.current?.resetSegment()},[p]),t(()=>{S.current?.setBackgroundColor(n??"")},[n]),t(()=>{S.current?.setRenderConfig(h??{})},[JSON.stringify(h)]),t(()=>{"string"!=typeof a&&"object"!=typeof a||S.current?.load({data:a,...N.current})},[a]),t(()=>{m!==I.current&&(I.current=m,"string"==typeof m&&S.current?.load({src:m,...N.current}))},[m]),t(()=>{S.current?.setMarker(k.marker??"")},[k.marker]),t(()=>{S.current?.isLoaded&&S.current.activeAnimationId!==e&&S.current.loadAnimation(e??"")},[e]),t(()=>{"string"==typeof x&&S.current?.setTheme(x)},[x]),t(()=>{S.current?.setThemeData(y??"")},[y]),t(()=>{S.current?.setLayout(_??{})},[_?.fit,_?.align?.[0],_?.align?.[1]]),t(()=>{S.current?.isLoaded&&("string"==typeof b&&b?S.current.stateMachineLoad(b)&&S.current.stateMachineStart():S.current.stateMachineStop())},[b]),t(()=>{S.current?.stateMachineSetConfig(f??null)},[f]),v("div",{className:i,...!i&&{style:{width:"100%",height:"100%",lineHeight:0,...w}},children:v("canvas",{ref:T,style:{width:"100%",height:"100%"},...k})})},Rt=t=>new Nt(t),zt=t=>v(Tt,{...t,createDotLottie:Rt}),qt=({src:r,className:n,autoplay:i=!1,loop:o=!1,playing:a})=>{const s=C(null);return t(()=>{"boolean"==typeof a&&(a?s.current?.play?.():s.current?.stop?.())},[a]),/* @__PURE__ */v("div",{className:e("size-full",n),children:/* @__PURE__ */v(zt,{src:r,loop:o,autoplay:i,dotLottieRefCallback:t=>{s.current=t},useFrameInterpolation:!1})})},Ut=(t,e=1)=>`${Number.parseFloat((t??0).toFixed(e))}`,Bt=(t,e)=>{switch(Math.floor(Math.abs(t-e))){case 0:return"bg-green-500";case 1:return"bg-lime-500";case 2:return"bg-yellow-500";case 3:return"bg-orange-500";case 4:return"bg-red-500";default:return"bg-gray-500"}},Dt=(t,e)=>{switch(Math.floor(Math.abs(t-e))){case 0:return"border-t-green-500";case 1:return"border-t-lime-500";case 2:return"border-t-yellow-500";case 3:return"border-t-orange-500";case 4:return"border-t-red-500";default:return"border-t-gray-500"}},Zt=({position:t,maxPosition:e=4,content:r,isOverlapping:n,colorclsx:i,borderColorclsx:o})=>{const a=t/e*100;let s="transform -translate-x-1/2 left-1/2";t<2?s="left-0":t>3&&(s="right-0 transform -translate-x-full");const _=n?"-top-1.5":"bottom-full";/* @__PURE__ */
|
|
3
3
|
return v("div",{className:"relative",children:[/* @__PURE__ */v("div",{style:{left:`${a}%`},className:`absolute ${_} text-foreground mb-0.5 w-fit rounded px-2 py-1 whitespace-nowrap md:mb-1 ${s} transition-all duration-500 ease-in-out ${i}`,children:r}),/* @__PURE__ */v("div",{style:{left:`${a}%`},className:`absolute ${_} -mb-1.5 size-0 border-x-4 border-t-[1rem] border-transparent ${s} transition-all duration-500 ease-in-out ${o}`})]})},Wt=({crowdScore:r,userScore:n})=>{const[i,o]=x(0),a=C(null);t(()=>(a.current=window.setTimeout(()=>{o(()=>n-1)},300),()=>{null!==a.current&&window.clearTimeout(a.current)}),[n]);const s=r-1,_=n-1,l=Math.abs(s-_)<1;/* @__PURE__ */
|
|
4
4
|
return v("div",{className:e("relative h-4",l?"mb-3":"mb-0"),children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,$t as t,At as n,B as r,Bt as a,Cn as i,Ct as s,F as o,Ft as l,H as c,Ht as d,I as u,It as m,Kt as g,L as h,Lt as p,Mt as v,On as w,Pt as f,R as T,Rt as y,U as N,Vt as q,W as x,X as b,Xt as C,Zt as E,_n as S,at as I,et as L,ft as z,hn as k,it as M,jt as R,kt as A,ln as _,lt as F,nt as O,qt as P,rt as B,s as V,st as j,tt as U,un as H,vn as $,wn as G,xn as D,xt as W,yn as K,yt as Q,z as X,zt as Y}from"./
|
|
1
|
+
import{$ as e,$t as t,At as n,B as r,Bt as a,Cn as i,Ct as s,F as o,Ft as l,H as c,Ht as d,I as u,It as m,Kt as g,L as h,Lt as p,Mt as v,On as w,Pt as f,R as T,Rt as y,U as N,Vt as q,W as x,X as b,Xt as C,Zt as E,_n as S,at as I,et as L,ft as z,hn as k,it as M,jt as R,kt as A,ln as _,lt as F,nt as O,qt as P,rt as B,s as V,st as j,tt as U,un as H,vn as $,wn as G,xn as D,xt as W,yn as K,yt as Q,z as X,zt as Y}from"./FE0pIRqe.js";import{r as Z}from"./Czk6IR70.js";import{n as J,t as ee}from"./Cx6rq6N5.js";import{t as te}from"./DdLLa5wm.js";import{t as ne}from"./HkakucIO.js";import{t as re}from"./CW7Iwd96.js";import{a as ae,i as ie,n as se,o as oe,r as le,s as ce,t as de}from"./D1TFBkCS.js";import{r as ue,s as me,t as ge}from"./BC9KIhak.js";import{n as he,t as pe}from"./BSGK1Ri1.js";function ve(e){if(e<1e3)return String(e);const[t,n]=e<1e6?[1e3,"K"]:[1e6,"M"],r=Math.round(e/t*10)/10;return`${r%1==0?r.toFixed(0):r.toFixed(1)}${n}`}function we({className:e}){/* @__PURE__ */
|
|
2
2
|
return H("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */H("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}function fe({className:e}){/* @__PURE__ */
|
|
3
3
|
return H("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */H("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var Te=({description:e,maxLines:t=2,className:n})=>{const[r,a]=D(!1),[o,l]=D(!1),c=$(null),d=$(null);return i(()=>{a(!1)},[e]),i(()=>{if(!c.current||!e)return void l(!1);const n=c.current,r=()=>{const e=window.getComputedStyle(n),a=Math.max(0,Math.floor(n.getBoundingClientRect().width));if(!a)return void(d.current=window.requestAnimationFrame(r));const i=e.lineHeight,s=parseFloat(e.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",c.style.pointerEvents="none",c.style.whiteSpace="normal",c.style.width=`${a}px`,c.style.boxSizing=e.boxSizing,c.style.padding=e.padding,c.style.margin=e.margin,c.style.fontSize=e.fontSize,c.style.fontFamily=e.fontFamily,c.style.fontWeight=e.fontWeight,c.style.lineHeight=e.lineHeight,c.style.letterSpacing=e.letterSpacing,c.style.wordBreak="break-word",c.innerText=n.innerText||"",document.body.appendChild(c);const u=c.scrollHeight;document.body.removeChild(c),l(u>o*t+1)},a=()=>{null!==d.current&&window.cancelAnimationFrame(d.current),d.current=window.requestAnimationFrame(r)};let i;a(),window.addEventListener("resize",a);try{i=new MutationObserver(a),i.observe(n,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",a),null!==d.current&&window.cancelAnimationFrame(d.current),i?.disconnect()}},[e,t]),e?/* @__PURE__ */H("div",{className:s("relative w-full",n),children:[/* @__PURE__ */H("p",{ref:c,className:s(B({variant:"body2",color:"muted",align:"center"}),"w-full",r?void 0:`line-clamp-${t}`),children:[e,o&&r&&/* @__PURE__ */H("button",{type:"button",onClick:()=>a(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),o&&!r&&/* @__PURE__ */H("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */H("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */H("button",{type:"button",onClick:()=>a(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},ye=()=>{const{t:n}=Z(),{eventSlug:r}=Q(),{event:a,parameters:i}=j({eventSlug:r}),{props:s,organization:o,folders:l}=W(),{curateLabel:c,leaderboardLabel:d}=s??{},{eventViews:u,contentCount:m,curationCount:h}=(({event:e})=>{const{props:n,organization:r}=W(),a=n?.organizationId,{isLoading:i,data:s}=t({queryKey:["event-stats",a??"",e?._id??""],queryFn:async()=>{try{return(await E.get(A.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":a}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(r?.integrationSettings?.showEventStats)});return{isLoading:i,eventViews:"number"==typeof s?.eventViews?s.eventViews:s?.eventViews?.views??0,contentCount:s?.contentCount||0,curationCount:s?.curationCount||0}})({event:a}),v=Array.isArray(i)&&i.length>0,w=a?.engagementStyle===p.CONTEST||v,f=o?.integrationSettings?.showFolderBreadcrumb&&a?.folderId?b(l??[],a.folderId):[];/* @__PURE__ */
|
|
4
4
|
return H("div",{className:"w-full space-y-3 md:-mt-6",children:[f.length>0&&/* @__PURE__ */H("div",{className:"flex justify-center",children:/* @__PURE__ */H(e,{homeLink:g.PUBLIC_EVENTS,data:f})}),
|
|
@@ -22,7 +22,7 @@ return H("div",{className:"relative flex w-auto items-center gap-2",children:[/*
|
|
|
22
22
|
/* @__PURE__ */H(pe,{placeholder:h("content.search_placeholder","Search using text"),value:f,className:"py-2",onChange:C,onKeyUp:E}),f?.length>0&&/* @__PURE__ */H("button",{type:"button","aria-label":"Clear search",className:"absolute inset-y-0 right-10 flex items-center",onClick:S,children:/* @__PURE__ */H(u,{className:"text-foreground w-5"})}),
|
|
23
23
|
/* @__PURE__ */H("button",{type:"button","aria-label":"Search",className:"absolute inset-y-0 right-3 flex items-center",onClick:L,children:/* @__PURE__ */H(o,{className:"text-foreground w-5"})})]})}),w&&/* @__PURE__ */H(_e,{value:y,onChange:b})]}),
|
|
24
24
|
/* @__PURE__ */H("div",{className:"col-span-3 md:col-span-1"}),
|
|
25
|
-
/* @__PURE__ */H("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */H(Re,{engagementStyle:e,sort:a,order:l,onSortChange:s,onSortOrderChange:c})})]})},Be=({position:e,gamConfig:t,eventId:n,organizationId:r})=>{const{trackGamAnalytics:a}=se(),s=$(null),o=`gam-${e}-banner-${n??"ev"}`,l=t.placementCategories?.[e];return i(()=>{let e=!1,i=null,c=null,u=null,m=null,g=null,h=null;const p=l?[l]:[],v=document.createElement("div");v.id=o,document.body.appendChild(v);const w=()=>{const e=s.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;v.style.display=n?"block":"none",n&&(v.style.position="fixed",v.style.top=`${t.top}px`,v.style.left=`${t.left}px`,v.style.width="728px",v.style.height="90px",v.style.zIndex="20")};return w(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),(async()=>{await ae(),e||window.googletag.cmd.push(()=>{if(e)return;le(o);const s=window.googletag.defineSlot(t.adUnitPath,[[728,90]],o)?.addService(window.googletag.pubads());s&&(i=s,m=window.googletag.pubads(),n?s.setConfig({targeting:{qrati_event:n,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&s.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===s&&a({eventId:n,organizationId:r,type:d.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===s&&a({eventId:n,organizationId:r,type:d.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=de({container:v,onClick:()=>{a({eventId:n,organizationId:r,type:d.GAM_CLICK})}}),ie(),window.googletag.display(o),c=window.setTimeout(()=>{e||(w(),s.getResponseInformation?.()||window.googletag.pubads().refresh([s]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",w),window.removeEventListener("resize",w),null!==c&&window.clearTimeout(c),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const t=i;i=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),v.parentNode&&v.parentNode.removeChild(v)}},[n,t.adUnitPath,r,l,e,o]),/* @__PURE__ */H("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */H("div",{ref:s,style:{width:728,height:90,minWidth:728}})})},Ve=({gamConfig:e,eventId:t,organizationId:n})=>{const{trackGamAnalytics:r}=se(),a=$(null),s=`gam-right-${t??"ev"}`,o=e.placementCategories?.right??e.placementCategories?.sidebar;return i(()=>{let i=!1,l=null,c=null,u=null,m=null,g=null,h=null;const p=o?[o]:[],v=document.createElement("div");v.id=s,document.body.appendChild(v);const w=()=>{const e=a.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(v.style.display=r?"block":"none",!r)return;const i=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;v.style.position="fixed",v.style.top=`${i}px`,v.style.left=`${t.left}px`,v.style.width="160px",v.style.height="600px",v.style.zIndex="20"};return w(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),(async()=>{await ae(),i||window.googletag.cmd.push(()=>{if(i)return;le(s);const a=window.googletag.defineSlot(e.adUnitPath,[[160,600]],s)?.addService(window.googletag.pubads());a&&(l=a,m=window.googletag.pubads(),t?a.setConfig({targeting:{qrati_event:t,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&a.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===a&&r({eventId:t,organizationId:n,type:d.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===a&&r({eventId:t,organizationId:n,type:d.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=de({container:v,onClick:()=>{r({eventId:t,organizationId:n,type:d.GAM_CLICK})}}),ie(),window.googletag.display(s),c=window.setTimeout(()=>{i||(w(),a.getResponseInformation?.()||window.googletag.pubads().refresh([a]))},1500))})})(),()=>{i=!0,window.removeEventListener("scroll",w),window.removeEventListener("resize",w),null!==c&&window.clearTimeout(c),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const e=l;l=null,e&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([e])}),v.parentNode&&v.parentNode.removeChild(v)}},[t,e.adUnitPath,n,o,s]),/* @__PURE__ */H("div",{ref:a,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},je=S(()=>import("./
|
|
25
|
+
/* @__PURE__ */H("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */H(Re,{engagementStyle:e,sort:a,order:l,onSortChange:s,onSortOrderChange:c})})]})},Be=({position:e,gamConfig:t,eventId:n,organizationId:r})=>{const{trackGamAnalytics:a}=se(),s=$(null),o=`gam-${e}-banner-${n??"ev"}`,l=t.placementCategories?.[e];return i(()=>{let e=!1,i=null,c=null,u=null,m=null,g=null,h=null;const p=l?[l]:[],v=document.createElement("div");v.id=o,document.body.appendChild(v);const w=()=>{const e=s.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;v.style.display=n?"block":"none",n&&(v.style.position="fixed",v.style.top=`${t.top}px`,v.style.left=`${t.left}px`,v.style.width="728px",v.style.height="90px",v.style.zIndex="20")};return w(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),(async()=>{await ae(),e||window.googletag.cmd.push(()=>{if(e)return;le(o);const s=window.googletag.defineSlot(t.adUnitPath,[[728,90]],o)?.addService(window.googletag.pubads());s&&(i=s,m=window.googletag.pubads(),n?s.setConfig({targeting:{qrati_event:n,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&s.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===s&&a({eventId:n,organizationId:r,type:d.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===s&&a({eventId:n,organizationId:r,type:d.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=de({container:v,onClick:()=>{a({eventId:n,organizationId:r,type:d.GAM_CLICK})}}),ie(),window.googletag.display(o),c=window.setTimeout(()=>{e||(w(),s.getResponseInformation?.()||window.googletag.pubads().refresh([s]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",w),window.removeEventListener("resize",w),null!==c&&window.clearTimeout(c),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const t=i;i=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),v.parentNode&&v.parentNode.removeChild(v)}},[n,t.adUnitPath,r,l,e,o]),/* @__PURE__ */H("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */H("div",{ref:s,style:{width:728,height:90,minWidth:728}})})},Ve=({gamConfig:e,eventId:t,organizationId:n})=>{const{trackGamAnalytics:r}=se(),a=$(null),s=`gam-right-${t??"ev"}`,o=e.placementCategories?.right??e.placementCategories?.sidebar;return i(()=>{let i=!1,l=null,c=null,u=null,m=null,g=null,h=null;const p=o?[o]:[],v=document.createElement("div");v.id=s,document.body.appendChild(v);const w=()=>{const e=a.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(v.style.display=r?"block":"none",!r)return;const i=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;v.style.position="fixed",v.style.top=`${i}px`,v.style.left=`${t.left}px`,v.style.width="160px",v.style.height="600px",v.style.zIndex="20"};return w(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),(async()=>{await ae(),i||window.googletag.cmd.push(()=>{if(i)return;le(s);const a=window.googletag.defineSlot(e.adUnitPath,[[160,600]],s)?.addService(window.googletag.pubads());a&&(l=a,m=window.googletag.pubads(),t?a.setConfig({targeting:{qrati_event:t,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&a.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===a&&r({eventId:t,organizationId:n,type:d.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===a&&r({eventId:t,organizationId:n,type:d.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=de({container:v,onClick:()=>{r({eventId:t,organizationId:n,type:d.GAM_CLICK})}}),ie(),window.googletag.display(s),c=window.setTimeout(()=>{i||(w(),a.getResponseInformation?.()||window.googletag.pubads().refresh([a]))},1500))})})(),()=>{i=!0,window.removeEventListener("scroll",w),window.removeEventListener("resize",w),null!==c&&window.clearTimeout(c),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const e=l;l=null,e&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([e])}),v.parentNode&&v.parentNode.removeChild(v)}},[t,e.adUnitPath,n,o,s]),/* @__PURE__ */H("div",{ref:a,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},je=S(()=>import("./Dr2e01jA.js")),Ue=e=>e?.status===y.OPEN||Boolean(e?.isUnlimitedDuration&&!e?.endDate),He=e=>Array.isArray(e)&&e.length>0,$e=()=>{const e=Q().eventSlug,{loadingUser:t,organization:r}=W(),a=_(),[o,c]=D(""),[d,h]=D(void 0),[v,T]=D(l),[y,N]=D(m),[q,x]=D("undefined"!=typeof window&&window.innerWidth<768?f.SINGLE:f.GRID),b=$(null),{event:C,ads:E,gamConfig:S,customAds:I,parameters:z}=j({eventSlug:e}),{loading:R,isError:A,error:B,refetch:X,contentsWithAds:Y,hasNextPage:Z,fetchNextPage:J,isFetchingNextPage:re}=F({event:C,ads:E,gamConfig:S,customAds:I,sort:v,order:y,keywords:o,face:d}),{incrementEventView:ae}=se(),{start:ie,initializing:oe,running:le}=(({ref:e,onBottomReached:t,hasNextPage:n,fetchNextPage:r,isFetchingNextPage:a})=>{const[s,o]=D(!1),[l,c]=D(!1),d=$(1),u=$(null),m=$(null),g=$(null),h=$(0),p=$(!1),v=$(null),w=$(null),f=$(!1),T=$(),y=$(),N=$(n),q=$(a),x=$(r),b=$(t);N.current=n,q.current=a,x.current=r,b.current=t,i(()=>{a||(p.current=!1)},[a]);const C=()=>{null!==u.current&&(window.cancelAnimationFrame(u.current),u.current=null)},E=t=>{const n=e.current;if(!n)return;null===g.current&&(g.current=t);const r=Math.min((t-g.current)/1e3,.05);g.current=t,h.current+=60*d.current*r;const a=Math.floor(h.current);a>0&&(n.scrollTop+=a,h.current-=a),N.current&&!q.current&&!p.current&&"function"==typeof x.current&&n.scrollTop+n.clientHeight>=.5*n.scrollHeight&&(p.current=!0,x.current()),Math.ceil(n.scrollTop)+n.clientHeight>=n.scrollHeight?(C(),m.current=window.setTimeout(()=>{c(!0),b.current?.(),p.current=!1,m.current=window.setTimeout(()=>{e.current&&(e.current.scrollTop=0),c(!1),h.current=0,g.current=null,u.current=window.requestAnimationFrame(E)},1e3)},1e3)):u.current=window.requestAnimationFrame(E)},S=()=>{C(),m.current&&(window.clearTimeout(m.current),m.current=null),null!==v.current&&v.current.release().catch(()=>{}).finally(()=>{v.current=null}),w.current&&(document.removeEventListener("visibilitychange",w.current),w.current=null),f.current&&(T.current&&document.removeEventListener("keydown",T.current),y.current&&document.removeEventListener("fullscreenchange",y.current),f.current=!1),o(!1),c(!1),e.current&&(e.current.scrollTop=0)},I=$(e=>{"+"===e.key&&(d.current=Math.min(d.current+1,10)),"-"===e.key&&(d.current=Math.max(d.current-1,1))}),L=$(()=>{document.fullscreenElement||S()});return L.current=()=>{document.fullscreenElement||S()},i(()=>()=>{S()},[]),{start:()=>{if(e?.current?.requestFullscreen)e.current.requestFullscreen();else{const t=e.current;t?.webkitRequestFullscreen?t.webkitRequestFullscreen():t?.mozRequestFullScreen?t.mozRequestFullScreen():t?.msRequestFullscreen&&t.msRequestFullscreen()}(async()=>{try{if(!("wakeLock"in navigator))return;const e=navigator;v.current=await e.wakeLock.request("screen");const t=async()=>{"visible"===document.visibilityState&&(v.current=await e.wakeLock.request("screen"))};w.current=t,document.addEventListener("visibilitychange",t)}catch(e){}})(),f.current||(T.current=e=>I.current(e),y.current=()=>L.current(),document.addEventListener("keydown",T.current),document.addEventListener("fullscreenchange",y.current),f.current=!0),h.current=0,g.current=null,p.current=!1,o(!0),C(),m.current=window.setTimeout(()=>{u.current=window.requestAnimationFrame(E)},300)},initializing:l,running:s}})({ref:b,hasNextPage:Z,fetchNextPage:J,isFetchingNextPage:re,onBottomReached:()=>C?._id&&a.refetchQueries({queryKey:[P.CONTENTS_BY_EVENT(C._id)]})});i(()=>{C?.slug&&ae(C.slug)},[C?.slug,ae]);const ce=K(()=>q===f.SINGLE,[q]),de=K(()=>/* @__PURE__ */H(ke,{event:C,onAutoscrollClick:ie}),[C,ie]),ue=$(null),me=$({hasNextPage:Z,isFetchingNextPage:re,loading:R,running:le,fetchNextPage:J});me.current={hasNextPage:Z,isFetchingNextPage:re,loading:R,running:le,fetchNextPage:J},i(()=>(ue.current=new IntersectionObserver(e=>{const t=me.current;t.running||e[0].isIntersecting&&t.hasNextPage&&!t.isFetchingNextPage&&!t.loading&&t.fetchNextPage()},{rootMargin:"200px"}),()=>{ue.current?.disconnect(),ue.current=null}),[]);const ge=G(e=>{const t=ue.current;t&&(t.disconnect(),e&&t.observe(e))},[]),he=G(()=>{!re&&Z&&J()},[J,Z,re]),pe=S?.bannerPositions??[],ve=r?._id,we=S&&pe.includes("right"),fe=Boolean(r?.advancedSettings?.aiSettings?.faceRecognitionEnabled),Te=Boolean(r?.integrationSettings?.showQuickSearch)&&fe;/* @__PURE__ */
|
|
26
26
|
return H("div",{className:"bg-background mx-auto min-h-[80vh]",children:[
|
|
27
27
|
/* @__PURE__ */H("div",{className:"flex flex-row justify-end gap-4 pt-2",children:de}),
|
|
28
28
|
/* @__PURE__ */H("div",{className:"pb-3",children:/* @__PURE__ */H(ye,{})}),S&&pe.includes("top")&&/* @__PURE__ */H(Be,{position:"top",gamConfig:S,eventId:C?._id,organizationId:ve}),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Ct as e,nt as r,un as t}from"./
|
|
1
|
+
import{Ct as e,nt as r,un as t}from"./FE0pIRqe.js";var a=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",s=e=>e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?void 0:"Enter a valid email":"Please enter your email",o=e=>e?e.length<8?"Min password length is 8":void 0:"Please enter your password",i=e=>{if(!e.trim())return"First name is required"},n=e=>{if(!e.trim())return"Last name is required"},d=(e,r)=>e?e!==r?"Passwords do not match":void 0:"Please confirm your password",l=({label:a,type:s="text",disabled:o,error:i,iconSVG:n,actionIcon:d,onActionClick:l,actionLabel:u,className:c="",step:m,...p})=>/* @__PURE__ */t("div",{className:"relative",children:[a&&/* @__PURE__ */t(r,{variant:"body1",className:"sm:mb-1",children:a}),
|
|
2
2
|
/* @__PURE__ */t("div",{className:"relative",children:[n&&/* @__PURE__ */t("div",{className:e("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",o?"text-muted-foreground":" "),children:n}),
|
|
3
3
|
/* @__PURE__ */t("input",{type:s,disabled:o,step:"number"===s?m:void 0,"aria-invalid":!!i,className:e("border-border shadow-outer focus:border-primary peer w-full rounded border px-4 py-2 focus:border focus:ring-0 focus:outline-none",o?"text-muted-foreground bg-transparent":"bg-input",i?"border-destructive animate-pulse":"border-border animate-none",n?"pl-9":"",d?"pr-10":"",c),...p,value:p.value??""}),d&&/* @__PURE__ */t("button",{type:"button","aria-label":u,onClick:l,disabled:o,className:"text-muted-foreground hover:text-foreground absolute inset-y-0 right-0 flex items-center pr-3 disabled:cursor-not-allowed",children:d})]}),i&&/* @__PURE__ */t(r,{variant:"caption",color:"error","data-testid":"input-error",children:i})]});export{i as a,s as i,a as n,n as o,d as r,o as s,l as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{An as e,Cn as a,Ct as t,On as s,Tn as o,un as n,wn as d,wt as l,xn as r,xt as m,yn as c}from"./
|
|
1
|
+
import{An as e,Cn as a,Ct as t,On as s,Tn as o,un as n,wn as d,wt as l,xn as r,xt as m,yn as c}from"./FE0pIRqe.js";var i=e(null),p=({open:e,onOpenChange:t,children:s})=>{const[o,l]=r(!!e);a(()=>{"boolean"==typeof e&&l(e)},[e]);const m=d(e=>{l(e),t?.(e)},[t]),p=c(()=>({open:o,setOpen:m}),[o,m]);/* @__PURE__ */
|
|
2
2
|
return n(i.Provider,{value:p,children:s})},u=({children:e})=>/* @__PURE__ */n(s,{children:e}),x=({className:e,...a})=>{const s=o(i);/* @__PURE__ */
|
|
3
3
|
return n("div",{"data-state":s?.open?"open":"closed",className:t("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",e),...a})},f=({className:e,children:s,...d})=>{const{organization:r,props:c}=m(),p=o(i);return a(()=>{if(!p?.open)return;const e=e=>{"Escape"===e.key&&p.setOpen(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p?.open]),p?.open?/* @__PURE__ */n(u,{children:[/* @__PURE__ */n(x,{onClick:()=>p.setOpen(!1)}),/* @__PURE__ */n("div",{role:"dialog","aria-modal":"true","data-state":p?.open?"open":"closed",className:t("border-border bg-background shadow-outer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom fixed top-[50%] left-[50%] z-2002 h-fit w-auto max-w-5xl translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-t border duration-300 max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:border-x-0 max-sm:border-b-0 sm:rounded",e),style:l(r,c?.theme??"light"),...d,children:s})]}):null},b=({className:e,...a})=>/* @__PURE__ */n("div",{className:t("flex flex-col space-y-1 p-3 text-center sm:text-left",e),...a}),h=({className:e,...a})=>/* @__PURE__ */n("div",{className:t("flex justify-end space-x-3 p-4",e),...a}),N=({className:e,...a})=>/* @__PURE__ */n("h2",{className:t("text-lg font-semibold",e),...a}),v=({className:e,...a})=>/* @__PURE__ */n("p",{className:t("text-muted-foreground text-sm",e),...a});export{b as a,h as i,f as n,N as o,v as r,p as t};
|