@zyzgroup/core-web 0.1.99 → 0.1.100

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.
@@ -1,4 +1,4 @@
1
- (function(y,Er){typeof exports=="object"&&typeof module<"u"?Er(exports):typeof define=="function"&&define.amd?define(["exports"],Er):(y=typeof globalThis<"u"?globalThis:y||self,Er(y.ZYZGroupCoreWeb={}))})(this,function(y){"use strict";function Er(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in n)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const Zy=Function("return this")();function Qy(){const n=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,t=typeof window=="object"&&window&&window.Object===Object&&window,e=typeof global=="object"&&global&&global.Object===Object&&global,r=typeof self=="object"&&self&&self.Object===Object&&self;return n||t||e||r||this||Zy}const Z=Qy(),Ca={env:{NODE_ENV:"",terminal:""},argv:[],execPath:"",platform:"",versions:{node:void 0,bun:void 0},...typeof process=="object"&&process?process:{}};({...Ca.env});const Xl="@YZ/";function t1(n,t=Xl){return n.startsWith(t)}function e1(n,t=Xl){return t1(n,t)?n:`${t}${n}`}function n1(n){return typeof n=="string"&&n.startsWith("Symbol(")&&n.endsWith(")")}function r1(n){return n1(n)&&(n=n.slice(7,-1)),n}function s1(n){return n=r1(n),n=e1(n),typeof Symbol=="function"?Symbol(n):`Symbol(${n})`}s1("META");const Ta=NaN,i1=Symbol("NO_VALUE"),yi={immediate:0,high:100,normal:200,low:300,idle:400};function bi(n){return"dispatch"in n}var He=(n=>(n[n["text/plain"]=0]="text/plain",n[n["text/html"]=1]="text/html",n[n["text/xml"]=2]="text/xml",n[n["text/css"]=3]="text/css",n[n["image/jpeg"]=4]="image/jpeg",n[n["image/png"]=5]="image/png",n[n["image/gif"]=6]="image/gif",n[n["image/bmp"]=7]="image/bmp",n[n["image/webp"]=8]="image/webp",n[n["image/svg+xml"]=9]="image/svg+xml",n[n["image/x-icon"]=10]="image/x-icon",n[n["image/vnd.microsoft.icon"]=11]="image/vnd.microsoft.icon",n[n["image/octet-stream"]=12]="image/octet-stream",n[n["audio/mpeg"]=13]="audio/mpeg",n[n["video/mp4"]=14]="video/mp4",n[n["audio/ogg"]=15]="audio/ogg",n[n["audio/wav"]=16]="audio/wav",n[n["audio/midi"]=17]="audio/midi",n[n["video/webm"]=18]="video/webm",n[n["video/ogg"]=19]="video/ogg",n[n["application/octet-stream"]=20]="application/octet-stream",n[n["application/javascript"]=21]="application/javascript",n[n["application/ecmascript"]=22]="application/ecmascript",n[n["application/json"]=23]="application/json",n[n["application/xml"]=24]="application/xml",n[n["application/xhtml+xml"]=25]="application/xhtml+xml",n[n["application/x-www-form-urlencoded"]=26]="application/x-www-form-urlencoded",n[n["application/msword"]=27]="application/msword",n[n["application/x-csv"]=28]="application/x-csv",n[n["application/vnb.ms-excel"]=29]="application/vnb.ms-excel",n[n["application/vnb.mspowerpoint"]=30]="application/vnb.mspowerpoint",n[n["application/pdf"]=31]="application/pdf",n[n["application/zip"]=32]="application/zip",n[n["application/x-gtar"]=33]="application/x-gtar",n[n["application/x-gzip"]=34]="application/x-gzip",n[n["appliaction/vnd.ms-fontobject"]=35]="appliaction/vnd.ms-fontobject",n[n["aplication/font-sfnt"]=36]="aplication/font-sfnt",n[n["aplication/pkcs12"]=37]="aplication/pkcs12",n))(He||{}),Ae=(n=>(n[n.text=0]="text",n[n.dataURL=1]="dataURL",n[n.binaryString=2]="binaryString",n[n.arraybuffer=3]="arraybuffer",n))(Ae||{});const vi={ascii:"ascii",utf8:"utf8","utf-8":"utf-8",utf16le:"utf16le","utf-16le":"utf-16le",ucs2:"ucs2","ucs-2":"ucs-2",base64:"base64",base64url:"base64url",latin1:"latin1",binary:"binary",hex:"hex"},wi=n=>{let t=null;switch(n){case"any-character":t=/[^]/;break;case"bin":t=/^(0b)?[0-1]+$/i;break;case"oct":t=/^(0o)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"ascii":t=/^[\x00-\xFF]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"number-single":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/i;break;case"split":t=/\s*,\s*/gi;break;case"trim":t=/^\s+|\s+$/g;break;case"regexp":t=/[\\^$.*+?()[\]{}|]/g;break;case"regexp-flags":t=/\w*$/;break;case"native-method":t=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(wi("regexp"),"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");break;case"svg-segment":t=/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi;break;case"mobile-china":t=/^[1]{1}[0-9]{10}$/;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+\@[A-Za-z0-9._-]+\.[A-Za-z0-9]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"url":t=/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-./?%&=]*)?$/;break;case"element-url":t=/^url\(['"]?(.+?)['"]?\)$/i;break;case"date":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})$/;break;case"time":t=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"datetime":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"color":t=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i;break;case"whitespace":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/g;break;case"commaSpaces":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"bezier":t=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
1
+ (function(y,Er){typeof exports=="object"&&typeof module<"u"?Er(exports):typeof define=="function"&&define.amd?define(["exports"],Er):(y=typeof globalThis<"u"?globalThis:y||self,Er(y.ZYZGroupCoreWeb={}))})(this,function(y){"use strict";function Er(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in n)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const Qy=Function("return this")();function t1(){const n=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,t=typeof window=="object"&&window&&window.Object===Object&&window,e=typeof global=="object"&&global&&global.Object===Object&&global,r=typeof self=="object"&&self&&self.Object===Object&&self;return n||t||e||r||this||Qy}const Z=t1(),Ca={env:{NODE_ENV:"",terminal:""},argv:[],execPath:"",platform:"",versions:{node:void 0,bun:void 0},...typeof process=="object"&&process?process:{}};({...Ca.env});const Wl="@YZ/";function e1(n,t=Wl){return n.startsWith(t)}function n1(n,t=Wl){return e1(n,t)?n:`${t}${n}`}function r1(n){return typeof n=="string"&&n.startsWith("Symbol(")&&n.endsWith(")")}function s1(n){return r1(n)&&(n=n.slice(7,-1)),n}function i1(n){return n=s1(n),n=n1(n),typeof Symbol=="function"?Symbol(n):`Symbol(${n})`}i1("META");const Ta=NaN,o1=Symbol("NO_VALUE"),yi={immediate:0,high:100,normal:200,low:300,idle:400};function bi(n){return"dispatch"in n}var He=(n=>(n[n["text/plain"]=0]="text/plain",n[n["text/html"]=1]="text/html",n[n["text/xml"]=2]="text/xml",n[n["text/css"]=3]="text/css",n[n["image/jpeg"]=4]="image/jpeg",n[n["image/png"]=5]="image/png",n[n["image/gif"]=6]="image/gif",n[n["image/bmp"]=7]="image/bmp",n[n["image/webp"]=8]="image/webp",n[n["image/svg+xml"]=9]="image/svg+xml",n[n["image/x-icon"]=10]="image/x-icon",n[n["image/vnd.microsoft.icon"]=11]="image/vnd.microsoft.icon",n[n["image/octet-stream"]=12]="image/octet-stream",n[n["audio/mpeg"]=13]="audio/mpeg",n[n["video/mp4"]=14]="video/mp4",n[n["audio/ogg"]=15]="audio/ogg",n[n["audio/wav"]=16]="audio/wav",n[n["audio/midi"]=17]="audio/midi",n[n["video/webm"]=18]="video/webm",n[n["video/ogg"]=19]="video/ogg",n[n["application/octet-stream"]=20]="application/octet-stream",n[n["application/javascript"]=21]="application/javascript",n[n["application/ecmascript"]=22]="application/ecmascript",n[n["application/json"]=23]="application/json",n[n["application/xml"]=24]="application/xml",n[n["application/xhtml+xml"]=25]="application/xhtml+xml",n[n["application/x-www-form-urlencoded"]=26]="application/x-www-form-urlencoded",n[n["application/msword"]=27]="application/msword",n[n["application/x-csv"]=28]="application/x-csv",n[n["application/vnb.ms-excel"]=29]="application/vnb.ms-excel",n[n["application/vnb.mspowerpoint"]=30]="application/vnb.mspowerpoint",n[n["application/pdf"]=31]="application/pdf",n[n["application/zip"]=32]="application/zip",n[n["application/x-gtar"]=33]="application/x-gtar",n[n["application/x-gzip"]=34]="application/x-gzip",n[n["appliaction/vnd.ms-fontobject"]=35]="appliaction/vnd.ms-fontobject",n[n["aplication/font-sfnt"]=36]="aplication/font-sfnt",n[n["aplication/pkcs12"]=37]="aplication/pkcs12",n))(He||{}),Ae=(n=>(n[n.text=0]="text",n[n.dataURL=1]="dataURL",n[n.binaryString=2]="binaryString",n[n.arraybuffer=3]="arraybuffer",n))(Ae||{});const vi={ascii:"ascii",utf8:"utf8","utf-8":"utf-8",utf16le:"utf16le","utf-16le":"utf-16le",ucs2:"ucs2","ucs-2":"ucs-2",base64:"base64",base64url:"base64url",latin1:"latin1",binary:"binary",hex:"hex"},wi=n=>{let t=null;switch(n){case"any-character":t=/[^]/;break;case"bin":t=/^(0b)?[0-1]+$/i;break;case"oct":t=/^(0o)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"ascii":t=/^[\x00-\xFF]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"number-single":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/i;break;case"split":t=/\s*,\s*/gi;break;case"trim":t=/^\s+|\s+$/g;break;case"regexp":t=/[\\^$.*+?()[\]{}|]/g;break;case"regexp-flags":t=/\w*$/;break;case"native-method":t=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(wi("regexp"),"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");break;case"svg-segment":t=/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi;break;case"mobile-china":t=/^[1]{1}[0-9]{10}$/;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+\@[A-Za-z0-9._-]+\.[A-Za-z0-9]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"url":t=/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-./?%&=]*)?$/;break;case"element-url":t=/^url\(['"]?(.+?)['"]?\)$/i;break;case"date":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})$/;break;case"time":t=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"datetime":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"color":t=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i;break;case"whitespace":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/g;break;case"commaSpaces":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"bezier":t=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
2
2
  [\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
3
3
  |[\u{4E00}-\u{9FCC}]
4
4
  |[\u{3400}-\u{4DB5}]
@@ -7,16 +7,16 @@
7
7
  |[\u{2B740}-\u{2B81D}]
8
8
  |[\u{2B820}-\u{2CEAF}]
9
9
  |[\u{2CEB0}-\u{2EBEF}]
10
- `.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},rn=(n,t)=>(typeof n=="string"&&(n=wi(n)||new RegExp(n)),n.test(t)),Wl=(n,t)=>{typeof n=="string"&&(n=wi(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(r=>({matchIndex:-1,fullMatch:r,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},Hl=(n,t)=>{typeof n=="string"&&(n=wi(n)||new RegExp(n));const e=[],r=t.matchAll(n);for(const s of r)e.push({matchIndex:typeof s.index=="number"?s.index:-1,fullMatch:s[0],groupMatchs:s.slice(1)});return e};function o1(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function ql(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}const a1="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",c1="0123456789";function Kl(n=12,t=a1){let e="";for(let r=0;r<n;r++)e+=t[Math.floor(Math.random()*t.length)];return e}function h1(n=12){return Kl(n,c1)}function u1(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const Wt=(n,t="-")=>{let e=n.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const r=new RegExp(`^${t}`);return r.test(n)||(e=e.replace(r,"")),e};function l1(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Jl(n){return u1(l1(n))}function Zl(n){let t="";for(let e=0,r=n.length;e<r;e++){const s=n.charCodeAt(e);s>=1&&s<=127?t+=n.charAt(e):s>2047?(t+=String.fromCharCode(224|s>>12&15),t+=String.fromCharCode(128|s>>6&63),t+=String.fromCharCode(128|s>>0&63)):(t+=String.fromCharCode(192|s>>6&31),t+=String.fromCharCode(128|s>>0&63))}return t}function f1(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:default:return!0}}const Cr=(n,t=16)=>{let e=n.toLowerCase();const r=e.indexOf("0b")==0,s=e.indexOf("0o")==0,i=e.indexOf("0x")==0;(r||s||i)&&(e=e.slice(2)),r&&(t=2),s&&(t=8),i&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return o};function Pa(n,t){let e=t?.type;const r=t?.mime,s=t?.encode;if(!e&&r)switch(s){case vi.utf8:case vi["utf-8"]:e=`${r};charset=${s}`;break;case vi.base64:e=`${r};${s}`;break;default:e=`${r}`;break}return new Blob([n],{type:e})}function d1(n){let t=He["text/plain"];switch(new DataView(n).getUint32(0,f1()).toString(16).toUpperCase()){case"FFD8FFDB":t=He["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=He["image/jpeg"];break;case"89504E47":t=He["image/png"];break;case"47494638":t=He["image/gif"];break;case"52494646":t=He["image/webp"];break;case"25504446":t=He["application/pdf"];break;case"504B0304":t=He["application/zip"];break}return t}const m1="[object Undefined]",p1="[object Null]",g1="[object Boolean]",y1="[object Number]",b1="[object BigInt]",v1="[object String]",w1="[object Symbol]",x1="[object Function]",S1="[object GeneratorFunction]",_1="[object Array]";function Aa(n){return Object.prototype.toString.call(n)}function E1(n){const t=Aa(n);return t===m1||t===p1||t===g1||t===y1||t===v1||t===w1||t===b1}function Ql(n){const t=Aa(n);return t==x1||t==S1}function tf(n){if(!rf(n))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,r=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(Ql(n)?r:e).test(D1(n))}function C1(n,t){return n?.[t]}function ef(n,t){const e=C1(n,t);return tf(e)?e:void 0}ef(Z,"Map"),ef(Z,"WeakMap");function nf(n){return Aa(n)===_1}function rf(n){const t=typeof n;return!!n&&(t=="object"||t=="function")}function Jn(n){return!!n&&typeof n=="object"}function xi(n){return Jn(n)&&!nf(n)}const sf=n=>{for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0};function T1(n){return typeof Promise<"u"&&n instanceof Promise||rf(n)&&typeof n.then=="function"&&typeof n.catch=="function"}function P1(n){const t=[];for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return t}function Tr(n,t,e=!0){if(xi(n)&&xi(t))for(const r of P1(t))(e||typeof n[r]>"u")&&(xi(n[r])&&xi(t[r])?Tr(n[r],t[r],e):n[r]=t[r]);return n}function A1(n,...t){return new n.constructor(...t)}function M1(n,t){return n===t||n!==n&&t!==t}function D1(n){if(n!=null){try{return Function.prototype.toString.call(n)}catch{}try{return""+n}catch{}}return""}function O1(n,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((r,s)=>r!=null&&r!=null?r[s]:r,n)}function sn(n,t){try{return O1(n,t)}catch{return}}function Ma(n,t,e){if(!n||!t)return n;let r;typeof t=="string"?r=t.split("."):r=t;let s=n;for(let i=0,o=r.length-1;i<o;i++){const a=r[i];(!(a in s)||typeof s[a]!="object"||s[a]===null)&&(s[a]=Number.isNaN(Number(r[i+1]))?{}:[]),s=s[a]}return s[r[r.length-1]]=e,n}function is(n){return n!=null}function I1(n){return is(n)&&n!==i1&&n!==Ta}function R1(n){return typeof n=="number"&&!Number.isNaN(n)}const k1=2**31-1;function Me(n,t){const e=parseFloat(n);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const L1=n=>typeof n=="number"&&n>=0&&Number.isFinite(n),N1=n=>L1(n)&&n>0,on=n=>N1(n)&&n===Math.floor(n),Da=n=>n===1/0||on(n);function Oa(n=1e-6){return function(t,e){return Math.abs(t-e)<n}}function st(n,t,e){const r=Math.min(t,e),s=Math.max(t,e);return n<r?r:n>s?s:n}function z1(n,t){return(n%t+t)%t}function Si(n,t,e){return typeof n=="number"&&typeof t=="number"?(1-e)*n+e*t:typeof n=="number"?n:typeof t=="number"?t:0}function V1(n,t,e){const r=Math.max(n.length,t.length),s=new Array(r);for(let i=0;i<r;i++)s[i]=Si(n[i],t[i],e);return s}function F1(n,t,e){return r=>{const s=st(r,n,t);return e==0?s:t-s<e?t:Math.round(s/e)*e}}function B1(n,t=2){return Me(n,0).toFixed(t)}function at(n,t=2){return+B1(n,t)}function Ia(n,t){const e=Wl("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):I1(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function of(n){const t=Wl("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function af(n,t){for(let e=0,r=n.length;e<r;e++)if(n[e]==t)return!0;return!1}function $1(n=[],t=[]){const e=n.length,r=t.length;for(let i=0;i<r;i++)n[i]=t[i];let s=Math.max(0,e-r);for(;s>0;)n.pop(),s--;return n}function cf(n,t){const e=n.findIndex(r=>r===t);return e>=0&&n.splice(e,1),n}function U1(n,...t){return t.forEach(e=>{af(n,e)||n.push(e)}),n}class _i extends Array{constructor(t){super(t),this.fill(0)}}const hf=n=>on(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?_i:null:null;function Ei(n,t){let e=n.length;for(;e--;)if(M1(n[e][0],t))return e;return-1}function Rt(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function Pr(n=new Date){return n.getTime()}function Y1(n=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return q1(n,t)}function j1(n){const t=n.valueOf();return!Number.isNaN(t)}function G1(n,t=3,e=":"){const r=Math.max(n.length,6);let s="";for(let o=0;o<r-4;o++)s+=n[o]||"0";const i=[s,""+(n[r-4]||"0")+(n[r-3]||"0"),""+(n[r-2]||"0")+(n[r-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+e+i[1];case 3:return i[0]+e+i[1]+e+i[2]}}function X1(n){const t=Math.max(n.length,6);let e=0;e+=(n[t-2]||0)*10+(n[t-1]||0),e+=((n[t-4]||0)*10+(n[t-3]||0))*60;let r=0;for(let s=0;s<t-4;s++)r=r*10+(n[s]||0);return e+=r*60*60,Math.floor(Math.max(0,e))}function W1(n,t=!1){let e=0;if(typeof n=="number"?e=n:e=X1(n),e<=0)return[0,0,0,0,0,0];const r=[],s=e%60;r.unshift(s%10),r.unshift(Math.floor(s/10)),e=Math.floor(e/60);const i=e%60;if(r.unshift(i%10),r.unshift(Math.floor(i/10)),e=Math.floor(e/60),t){const o=e%100;for(r.unshift(o%10),r.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)r.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;r.unshift(o%10),r.unshift(Math.floor(o/10))}return r}function H1(n,t=1,e=!1){return n[n.length-1]+=t,W1(n,e)}function q1(n,t="yyyy-mm-dd hh:ii:ss"){if(!j1(n))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const s=e[1];t=t.replace(s,(n.getFullYear()+"").substring(4-s.length))}const r={"m+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"i+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),"S+":n.getMilliseconds()};for(const s in r){const i=new RegExp("("+s+")").exec(t);if(i&&i[1]){const o=i[1];t=t.replace(o,o.length===1?""+r[s]:("00"+r[s]).slice(-o.length))}}return t}const uf=()=>{};function K1(...n){return n.length===0?(...t)=>t:n.length===1?n[0]:n.reduce((t,e)=>(...r)=>t(e(...r)))}function J1(n=0,t){const e=t?.min??300,r=t?.max??6e4,s=t?.exponent??2,i=t?.factor??.5;let o=e*Math.pow(s,n);if(i){const a=Math.random(),c=Math.floor(a*i*o);o=Math.floor(a*10)&1?o+c:o-c}return Math.min(o,r)|0}function Z1(n,t={}){if(typeof n!="function")throw new TypeError("Expected a function");const e=function(...r){const s=t?.thisArg||this,i=t?.cacheKeyResolver?t.cacheKeyResolver.apply(s,r):r[0],o=e.cache;if(o.has(i))return o.get(i);const a=n.apply(s,r);return a instanceof Promise&&a.catch(()=>o.delete(i)),e.cache=o.set(i,a)||o,a};return e.cache=t?.createCache?t.createCache():new Map,e}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};function Q1(){let n,t;return{promise:new Promise((e,r)=>{n=e,t=r}),resolve:n,reject:t}}function Zn(n,t=e=>console.error(e)){try{const e=n();return T1(e)?Promise.resolve(e).catch(r=>{t(r)}):e}catch(e){t(e)}}const tb=2147483647;function lf(n,t,e){if(typeof t!="number"||t<=0)return n;let r;const s=new Promise((i,o)=>{r=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,tb),o,e)});return Promise.race([n,s]).finally(()=>{r!==void 0&&(clearTimeout(r),r=void 0)})}function eb(n,t,e){if(!t)return n;const r=e||"Aborted!";return t.aborted?Promise.reject(new Error(r)):new Promise((s,i)=>{const o=()=>{i(new Error(r))};t.addEventListener("abort",o,{once:!0}),n.finally(()=>{t.removeEventListener("abort",o)}),n.then(s,i)})}class nb{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let r=-1;for(;++r<e;){const s=t[r];this.set(s[0],s[1])}}set(t,e){const r=this.__data__,s=Ei(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}get(t){const e=this.__data__,r=Ei(e,t);return r<0?void 0:e[r][1]}has(t){return Ei(this.__data__,t)>-1}delete(t){const e=this.__data__,r=Ei(e,t);if(r<0)return!1;const s=e.length-1;return r==s?e.pop():Array.prototype.splice.call(e,r,1),--this.size,!0}clear(){this.__data__=[],this.size=0}*entries(){for(const t of this.__data__)yield t}*keys(){for(const t of this.__data__)yield t[0]}*values(){for(const t of this.__data__)yield t[1]}[Symbol.iterator](){return this.entries()}}const rb=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ff=new Set,sb=(n,t,e,r)=>{typeof Ca.emitWarning=="function"?Ca.emitWarning(n,t,e,r):console.error(`[${e}] ${t}: ${n}`)},ib=n=>!ff.has(n);class Ar{heap;length;static#a=!1;static create(t){const e=hf(t);if(!e)return[];Ar.#a=!0;const r=new Ar(t,e);return Ar.#a=!1,r}constructor(t,e){if(!Ar.#a)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Ra{#a;#l;#g;#D;#y;#L;#N;#b;get perf(){return this.#b}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#v;#r;#n;#t;#h;#f;#c;#i;#w;#o;#x;#S;#d;#m;#_;#A;#u;#z;static unsafeExposeInternals(t){return{starts:t.#S,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#r,keyList:t.#n,valList:t.#t,next:t.#h,prev:t.#f,get head(){return t.#c},get tail(){return t.#i},free:t.#w,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,r,s,i)=>t.#B(e,r,s,i),moveToTail:e=>t.#k(e),indexes:e=>t.#E(e),rindexes:e=>t.#C(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#l}get calculatedSize(){return this.#v}get size(){return this.#s}get fetchMethod(){return this.#L}get memoMethod(){return this.#N}get dispose(){return this.#g}get onInsert(){return this.#D}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:r,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:u,disposeAfter:l,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:b,fetchMethod:g,memoMethod:w,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:_,ignoreFetchAbort:D,perf:z}=t;if(z!==void 0&&typeof z?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#b=z??rb,e!==0&&!on(e))throw new TypeError("max option must be a nonnegative integer");const O=e?hf(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#a=e,this.#l=p,this.maxEntrySize=m||this.#l,this.sizeCalculation=b,this.sizeCalculation){if(!this.#l&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#N=w,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=g,this.#A=!!g,this.#r=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new O(e),this.#f=new O(e),this.#c=0,this.#i=0,this.#w=Ar.create(e),this.#s=0,this.#v=0,typeof h=="function"&&(this.#g=h),typeof u=="function"&&(this.#D=u),typeof l=="function"?(this.#y=l,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#_=!!this.#g,this.#z=!!this.#D,this.#u=!!this.#y,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#l!==0&&!on(this.#l))throw new TypeError("maxSize must be a positive integer if specified");if(!on(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=on(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=r||0,this.ttl){if(!on(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$()}if(this.#a===0&&this.ttl===0&&this.#l===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#l){const L="LRU_CACHE_UNBOUNDED";ib(L)&&(ff.add(L),sb("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,Ra))}}getRemainingTTL(t){return this.#r.has(t)?1/0:0}#$(){const t=new _i(this.#a),e=new _i(this.#a);this.#d=t,this.#S=e;const r=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=r,this.#U=(a,c,h=this.#b.now())=>{e[a]=c!==0?h:0,t[a]=c,s(a,c)},this.#O=a=>{e[a]=t[a]!==0?this.#b.now():0,s(a,t[a])};const s=this.ttlAutopurge?(a,c)=>{if(r?.[a]&&(clearTimeout(r[a]),r[a]=void 0),c&&c!==0&&r){const h=setTimeout(()=>{this.#p(a)&&this.#T(this.#n[a],"expire")},c+1);h.unref&&h.unref(),r[a]=h}}:()=>{};this.#P=(a,c)=>{if(t[c]){const h=t[c],u=e[c];if(!h||!u)return;a.ttl=h,a.start=u,a.now=i||o();const l=a.now-u;a.remainingTTL=h-l}};let i=0;const o=()=>{const a=this.#b.now();if(this.ttlResolution>0){i=a;const c=setTimeout(()=>i=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{const c=this.#r.get(a);if(c===void 0)return 0;const h=t[c],u=e[c];if(!h||!u)return 1/0;const l=(i||o())-u;return h-l},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(i||o())-c>h}}#O=()=>{};#P=()=>{};#U=()=>{};#p=()=>!1;#H(){const t=new _i(this.#a);this.#v=0,this.#x=t,this.#I=e=>{this.#v-=t[e],t[e]=0},this.#Y=(e,r,s,i)=>{if(this.#e(r))return 0;if(!on(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(r,e),!on(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s||0},this.#V=(e,r,s)=>{if(t[e]=r,this.#l){const i=this.#l-t[e];for(;this.#v>i;)this.#F(!0)}this.#v+=t[e],s&&(s.entrySize=r,s.totalCalculatedSize=this.#v)}}#I=t=>{};#V=(t,e,r)=>{};#Y=(t,e,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#i;this.#j(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#C({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#c;this.#j(e)&&((t||!this.#p(e))&&(yield e),e!==this.#i);)e=this.#h[e]}#j(t){return t!==void 0&&this.#r.get(this.#n[t])===t}*entries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*rentries(){for(const t of this.#C())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*keys(){for(const t of this.#E()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#C()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#C())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const r of this.#E()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;if(i!==void 0&&t(i,this.#n[r],this))return this.#R(this.#n[r],e)}}forEach(t,e=this){for(const r of this.#E()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(e,i,this.#n[r],this)}}rforEach(t,e=this){for(const r of this.#C()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(e,i,this.#n[r],this)}}purgeStale(){let t=!1;for(const e of this.#C({allowStale:!0}))this.#p(e)&&(this.#T(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#r.get(t);if(e===void 0)return;const r=this.#t[e],s=this.#e(r)?r.__staleWhileFetching:r;if(s===void 0)return;const i={value:s};if(this.#d&&this.#S){const o=this.#d[e],a=this.#S[e];if(o&&a){const c=o-(this.#b.now()-a);i.ttl=c,i.start=Date.now()}}return this.#x&&(i.size=this.#x[e]),i}dump(){const t=[];for(const e of this.#E({allowStale:!0})){const r=this.#n[e],s=this.#t[e],i=this.#e(s)?s.__staleWhileFetching:s;if(i===void 0||r===void 0)continue;const o={value:i};if(this.#d&&this.#S){o.ttl=this.#d[e];const a=this.#b.now()-this.#S[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([r,o])}return t}load(t){this.clear();for(const[e,r]of t){if(r.start){const s=Date.now()-r.start;r.start=this.#b.now()-s}this.#M(e,r.value,r)}}set(t,e,r={}){const{status:s=void 0}=r;return r.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e)),this.#M(t,e,r)}#M(t,e,r={}){const{ttl:s=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=r;c&&!this.#e(e)&&(c.value=e);const u=this.#Y(t,e,r.size||0,a,c);if(this.maxEntrySize&&u>this.maxEntrySize)return this.#T(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let l=this.#s===0?void 0:this.#r.get(t);if(l===void 0)l=this.#s===0?this.#i:this.#w.length!==0?this.#w.pop():this.#s===this.#a?this.#F(!1):this.#s,this.#n[l]=t,this.#t[l]=e,this.#r.set(t,l),this.#h[this.#i]=l,this.#f[l]=this.#i,this.#i=l,this.#s++,this.#V(l,u,c),c&&(c.set="add"),h=!1,this.#z&&this.#D?.(e,t,"add");else{this.#k(l);const d=this.#t[l];if(e!==d){if(this.#A&&this.#e(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#_&&this.#g?.(f,t,"set"),this.#u&&this.#o?.push([f,t,"set"]))}else o||(this.#_&&this.#g?.(d,t,"set"),this.#u&&this.#o?.push([d,t,"set"]));if(this.#I(l),this.#V(l,u,c),this.#t[l]=e,c){c.set="replace";const f=d&&this.#e(d)?d.__staleWhileFetching:d;f!==void 0&&(c.oldValue=f)}}else c&&(c.set="update");this.#z&&this.onInsert?.(e,t,e===d?"update":"replace")}if(s!==0&&!this.#d&&this.#$(),this.#d&&(h||this.#U(l,s,i),c&&this.#P(c,l)),!o&&this.#u&&this.#o){const d=this.#o;let f;for(;f=d?.shift();)this.#y?.(...f)}return this}pop(){try{for(;this.#s;){const t=this.#t[this.#c];if(this.#F(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#u&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#y?.(...e)}}}#F(t){const e=this.#c,r=this.#n[e],s=this.#t[e];return this.#A&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#u)&&(this.#_&&this.#g?.(s,r,"evict"),this.#u&&this.#o?.push([s,r,"evict"])),this.#I(e),this.#m?.[e]&&(clearTimeout(this.#m[e]),this.#m[e]=void 0),t&&(this.#n[e]=void 0,this.#t[e]=void 0,this.#w.push(e)),this.#s===1?(this.#c=this.#i=0,this.#w.length=0):this.#c=this.#h[e],this.#r.delete(r),this.#s--,e}has(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&(r.op="has",r.key=t),this.#q(t,e)}#q(t,e={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=e,i=this.#r.get(t);if(i!==void 0){const o=this.#t[i];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(i))s&&(s.has="stale",this.#P(s,i));else return r&&this.#O(i),s&&(s.has="hit",this.#P(s,i)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{status:r=void 0}=e;return r&&(r.op="peek",r.key=t),e.status=r,this.#K(t,e)}#K(t,e){const{status:r,allowStale:s=this.allowStale}=e,i=this.#r.get(t);if(i===void 0||!s&&this.#p(i)){r&&(r.peek=i===void 0?"miss":"stale");return}const o=this.#t[i],a=this.#e(o)?o.__staleWhileFetching:o;return r&&(a!==void 0?(r.peek="hit",r.value=a):r.peek="miss"),a}#B(t,e,r,s){const i=e===void 0?void 0:this.#t[e];if(this.#e(i))return i;const o=new AbortController,{signal:a}=r;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:r,context:s},h=(m,b=!1)=>{const{aborted:g}=o.signal,w=r.ignoreFetchAbort&&m!==void 0,x=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&m!==void 0);if(r.status&&(g&&!b?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,w&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),g&&!w&&!b)return l(o.signal.reason,x);const v=f,E=this.#t[e];return(E===f||E===void 0&&w&&b)&&(m===void 0?v.__staleWhileFetching!==void 0?this.#t[e]=v.__staleWhileFetching:this.#T(t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.#M(t,m,c.options))),m},u=m=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=m),l(m,!1)),l=(m,b)=>{const{aborted:g}=o.signal,w=g&&r.allowStaleOnFetchAbort,x=w||r.allowStaleOnFetchRejection,v=x||r.noDeleteOnFetchRejection,E=f;if(this.#t[e]===f&&(!v||!b&&E.__staleWhileFetching===void 0?this.#T(t,"fetch"):w||(this.#t[e]=E.__staleWhileFetching)),x)return r.status&&E.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw m},d=(m,b)=>{const g=this.#L?.(t,i,c);g&&g instanceof Promise&&g.then(w=>m(w===void 0?void 0:w),b),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(m(void 0),r.allowStaleOnFetchAbort&&(m=w=>h(w,!0)))})};r.status&&(r.status.fetchDispatched=!0);const f=new Promise(d).then(h,u),p=Object.assign(f,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return e===void 0?(this.#M(t,p,{...c.options,status:void 0}),e=this.#r.get(t)):this.#t[e]=p,p}#e(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&e.context&&(r.context=e.context),this.#G(t,e)}async#G(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:b=!1,status:g,signal:w}=e;if(g&&(g.op="fetch",g.key=t,b&&(g.forceRefresh=!0)),!this.#A)return g&&(g.fetch="get"),this.#R(t,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:g});const x={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:w},v=this.#r.get(t);if(v===void 0){g&&(g.fetch="miss");const E=this.#B(t,v,x,m);return E.__returned=E}else{const E=this.#t[v];if(this.#e(E)){const O=r&&E.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",O&&(g.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}const _=this.#p(v);if(!b&&!_)return g&&(g.fetch="hit"),this.#k(v),s&&this.#O(v),g&&this.#P(g,v),E;const D=this.#B(t,v,x,m),z=D.__staleWhileFetching!==void 0&&r;return g&&(g.fetch=_?"stale":"refresh",z&&_&&(g.returnedStale=!0)),z?D.__staleWhileFetching:D.__returned=D}}forceFetch(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&e.context&&(r.context=e.context),this.#J(t,e)}async#J(t,e={}){const r=await this.#G(t,e);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(t,e={}){const{status:r=void 0}=e;e.status=r,r&&(r.op="memo",r.key=t,e.context&&(r.context=e.context));const s=this.#Z(t,e);return r&&(r.value=s),s}#Z(t,e={}){const r=this.#N;if(!r)throw new Error("no memoMethod provided to constructor");const{context:s,status:i,forceRefresh:o,...a}=e;i&&o&&(i.forceRefresh=!0);const c=this.#R(t,a),h=o||c===void 0;if(i&&(i.memo=h?"miss":"hit",h||(i.value=c)),!h)return c;const u=r(t,c,{options:a,context:s});return i&&(i.value=u),this.#M(t,u,a),u}get(t,e={}){const{status:r=void 0}=e;e.status=r,r&&(r.op="get",r.key=t);const s=this.#R(t,e);return r&&s!==void 0&&(r.value=s),s}#R(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=e,a=this.#r.get(t);if(a===void 0){o&&(o.get="miss");return}const c=this.#t[a],h=this.#e(c);return o&&this.#P(o,a),this.#p(a)?h?(o&&(o.get="stale-fetching"),r&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(i||this.#T(t,"expire"),o&&(o.get="stale"),r?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#k(a),s&&this.#O(a),h?c.__staleWhileFetching:c)}#X(t,e){this.#f[e]=t,this.#h[t]=e}#k(t){t!==this.#i&&(t===this.#c?this.#c=this.#h[t]:this.#X(this.#f[t],this.#h[t]),this.#X(this.#i,t),this.#i=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let r=!1;if(this.#s!==0){const s=this.#r.get(t);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),r=!0,this.#s===1)this.#W(e);else{this.#I(s);const i=this.#t[s];if(this.#e(i)?i.__abortController.abort(new Error("deleted")):(this.#_||this.#u)&&(this.#_&&this.#g?.(i,t,e),this.#u&&this.#o?.push([i,t,e])),this.#r.delete(t),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#i)this.#i=this.#f[s];else if(s===this.#c)this.#c=this.#h[s];else{const o=this.#f[s];this.#h[o]=this.#h[s];const a=this.#h[s];this.#f[a]=this.#f[s]}this.#s--,this.#w.push(s)}}if(this.#u&&this.#o?.length){const s=this.#o;let i;for(;i=s?.shift();)this.#y?.(...i)}return r}clear(){return this.#W("delete")}#W(t){for(const e of this.#C({allowStale:!0})){const r=this.#t[e];if(this.#e(r))r.__abortController.abort(new Error("deleted"));else{const s=this.#n[e];this.#_&&this.#g?.(r,s,t),this.#u&&this.#o?.push([r,s,t])}}if(this.#r.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#S){this.#d.fill(0),this.#S.fill(0);for(const e of this.#m??[])e!==void 0&&clearTimeout(e);this.#m?.fill(void 0)}if(this.#x&&this.#x.fill(0),this.#c=0,this.#i=0,this.#w.length=0,this.#v=0,this.#s=0,this.#u&&this.#o){const e=this.#o;let r;for(;r=e?.shift();)this.#y?.(...r)}}}class ka{data;expirationMap=new Map;immortalKeys=new Set;expirations=Object.create(null);ttl;max;updateAgeOnGet;checkAgeOnGet;updateAgeOnHas;checkAgeOnHas;noUpdateTTL;dispose;noDisposeOnSet;timer;timerExpiration;constructor({ttl:t=1/0,max:e=1/0,updateAgeOnGet:r=!1,checkAgeOnGet:s=!1,updateAgeOnHas:i=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},u=new Map){if(t!==void 0&&!Da(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!Da(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=u,this.ttl=t,this.max=e,this.updateAgeOnGet=!!r,this.checkAgeOnGet=!!s,this.updateAgeOnHas=!!i,this.checkAgeOnHas=!!o,this.noUpdateTTL=!!a,this.noDisposeOnSet=!!h,c!==void 0){if(typeof c!="function")throw new TypeError("dispose must be function if set");this.dispose=c}else this.dispose=(l,d,f)=>{};this.timer=void 0,this.timerExpiration=void 0}get size(){return this.data.size}setTimer(t,e){if(this.timerExpiration&&this.timerExpiration<t)return;this.timer&&clearTimeout(this.timer);const r=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const s in this.expirations){const i=Number(s);this.setTimer(i,i-Rt());break}},Math.min(k1,Math.max(0,e)));r.unref&&r.unref(),this.timerExpiration=t,this.timer=r}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==ka.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,r]of t)this.dispose(r,e,"delete")}setTTL(t,e=this.ttl){const r=this.expirationMap.get(t);if(r!==void 0){const s=this.expirations[r];!s||s.length<=1?delete this.expirations[r]:this.expirations[r]=s.filter(i=>i!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const s=Math.floor(Rt()+e);this.expirationMap.set(t,s),this.expirations[s]||(this.expirations[s]=[],this.setTimer(s,e)),this.expirations[s].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:r=this.ttl,noUpdateTTL:s=this.noUpdateTTL,noDisposeOnSet:i=this.noDisposeOnSet}={}){if(!Da(r))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){s||this.setTTL(t,r);const o=this.data.get(t),a=!i&&this.data.has(t);o!==e&&(this.data.set(t,e),a&&this.dispose(o,t,"set"))}else this.setTTL(t,r),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:r=this.ttl,updateAgeOnHas:s=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(s&&this.setTTL(t,r),!0):!1}getRemainingTTL(t){const e=this.expirationMap.get(t);return e===1/0?1/0:e!==void 0?Math.max(0,Math.ceil(e-Rt())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:r=this.ttl,checkAgeOnGet:s=this.checkAgeOnGet}={}){const i=this.data.get(t);if(s&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,r),i}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const r=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const s=this.expirations[e];return s&&(s.length<=1?delete this.expirations[e]:this.expirations[e]=s.filter(i=>i!==t)),this.dispose(r,t,"delete"),this.size===0&&this.cancelTimer(),!0}return!1}purgeToCapacity(){if(!(this.size<=this.max))for(const t in this.expirations){const e=this.expirations[t];if(this.size-e.length>=this.max){delete this.expirations[t];const r=[];for(const s of e)r.push([s,this.data.get(s)]),this.data.delete(s),this.expirationMap.delete(s);for(const[s,i]of r)this.dispose(i,s,"evict")}else{const r=this.size-this.max,s=[];for(const i of e.splice(0,r))s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of s)this.dispose(o,i,"evict")}}}purgeStale(){const t=Math.ceil(Rt());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const r=[...this.expirations[e]||[]],s=[];delete this.expirations[e];for(const i of r)s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of s)this.dispose(o,i,"expire")}this.size===0&&this.cancelTimer()}*entries(){for(const t in this.expirations)for(const e of this.expirations[t])yield[e,this.data.get(e)];for(const t of this.immortalKeys)yield[t,this.data.get(t)]}*keys(){for(const t in this.expirations)for(const e of this.expirations[t])yield e;for(const t of this.immortalKeys)yield t}*values(){for(const t in this.expirations)for(const e of this.expirations[t])yield this.data.get(e);for(const t of this.immortalKeys)yield this.data.get(t)}[Symbol.iterator](){return this.entries()}firstKey(){return this.keys().next().value}}const Qn={branch:"├",lastBranch:"└",line:"│",empty:" "};function Ci(n,t={}){const{showValues:e=!0,hideFunctions:r=!1,lineBreak:s=`\r
11
- `,maxDeep:i}=t,o=[],a=new WeakSet;function c(u,l="",d=0){if(typeof u=="string"){o.push(l+'"'+u+'"');return}if(typeof u!="object"||u===null){e&&o.push(l+String(u));return}if(i&&d>=i){Array.isArray(n)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(u)){o.push(l+"[Circular]");return}a.add(u);const f=Object.keys(u).filter(p=>!(r&&typeof u[p]=="function"));f.forEach((p,m)=>{const b=u[p],g=m===f.length-1,w=d===0&&m===0?"":l,x=g?Qn.lastBranch:Qn.branch,v=p.trim()===""?"":p;let E=w+x+(v?" "+v:"");const _=p.trim()!=="";if(b&&typeof b=="object"&&a.has(b))o.push(E+(_?": ":E?" ":"")+"[Circular]");else if(b&&typeof b=="object"&&!Array.isArray(b)){o.push(E);const D=g?Qn.empty:Qn.line,z=w+D+" ";c(b,z,d+1)}else if(Array.isArray(b)){o.push(E+(_?": ":E?" ":"")+"[Array("+b.length+")]");const D=g?Qn.empty:Qn.line,z=w+D+" ";c(b,z,d+1)}else if(e){const D=typeof b=="function"?"[Function]":typeof b=="string"?'"'+String(b)+'"':String(b);E+=(_?": ":E?" ":"")+D,o.push(E)}else o.push(E)})}const h=Object.keys(n);if(h.length===0)return"(empty)";if(h.length===1&&h[0]!==void 0&&h[0].trim()===""&&typeof n[h[0]]=="string"){const u=h[0],l=Qn.lastBranch,d=n[u],f=typeof d=="function"?"[Function]":typeof d=="string"?'"'+d+'"':String(d);return l+" "+f}return c(n),s+o.join(s)}function df(n="verbose"){let t=-1;switch(n){case"verbose":t=0;break;case"debug":t=1;break;case"info":t=2;break;case"warn":t=3;break;case"error":t=4;break}return t}function ob(n="verbose"){Z.OPEN_LOG_LEVEL=df(n)}function mf(){Z.OPEN_LOG_LEVEL=-1}function ab(n){Z.LOG_UPLOAD_FN=n}mf();function os(n="verbose"){return Z.OPEN_LOG_LEVEL<=df(n)}function La(n){Z.LOG_UPLOAD_FN&&Z.LOG_UPLOAD_FN(n)}function Pn(n,t=""){try{if(La({level:"info",msg:n,type:t}),!os("info"))return;console.log(n)}catch{}}function De(n,t=""){try{if(La({level:"warn",msg:n,type:t}),!os("warn"))return;console.warn(n)}catch{}}function cb(n,t=""){try{if(La({level:"error",msg:n,type:t}),!os("error"))return;console.error(n)}catch{}}const pf={start:n=>{os("verbose")&&(!console||typeof console!="object"||typeof console.groupCollapsed!="function"||console.groupCollapsed(n))},end:()=>{!console||typeof console!="object"||typeof console.groupEnd!="function"||console.groupEnd()}},gf={start:n=>{os("verbose")&&(!console||typeof console!="object"||typeof console.time!="function"||console.time(n))},end:n=>{!console||typeof console!="object"||typeof console.timeEnd!="function"||console.timeEnd(n)}};function Ti(n){if(typeof MessageChannel<"u"&&(tf(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;t.onmessage=()=>{t.onmessage=null,n()},e.postMessage(null)}else setTimeout(n,0)}async function hb(){return new Promise(n=>{Ti(n)})}if(Z.requestAnimationFrame=Z.requestAnimationFrame||Z.webkitRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.oRequestAnimationFrame||Z.msRequestAnimationFrame,Z.cancelAnimationFrame=Z.cancelAnimationFrame||Z.webkitCancelAnimationFrame||Z.mozCancelAnimationFrame||Z.oCancelAnimationFrame||Z.msCancelAnimationFrame,!Z.requestAnimationFrame){let n=Rt();Z.requestAnimationFrame=t=>{const e=Rt(),r=Math.max(0,16-(e-n)),s=Z.setTimeout(()=>{t(e+r)},r);return n=e+r,s}}Z.cancelAnimationFrame||(Z.cancelAnimationFrame=n=>{Z.clearTimeout(n)});const Pi=Z.requestAnimationFrame,ub=Z.cancelAnimationFrame;function lb(n){let t=!0,e=Pi(function r(s){t&&n(s)&&(e=Pi(r))});return()=>{t=!1,ub(e)}}Z.requestIdleCallback=Z.requestIdleCallback||function(n,t){const e=Rt();return setTimeout(()=>{const r=Rt()-e,s={didTimeout:typeof t?.timeout!="number"?!1:r>t.timeout,timeRemaining:()=>Math.max(0,50-r)};n(s)},t?.timeout)},Z.cancelIdleCallback=Z.cancelIdleCallback||function(n){clearTimeout(n)},Z.requestIdleCallback,Z.cancelIdleCallback;let as=33,an=33,Ai=0,cs=0,Na=!1;function yf(n){Na||(Na=!0,Pi(t=>{Na=!1,Ai=t,cs===0&&(cs=Ai+an);let e=an+Ai-cs;e<an&&as<an?(e<8&&(e=8),an=Math.max(e,as)):e>an&&as>an&&(an=Math.min(e,as)),as=e,cs=Ai+an,Ti(()=>{n(cs),yf(n)})}))}function za(n){const t=n?.maxIterations||1e4,e=!!n?.tracing,r=n?.onTrace||(f=>{const p=" ".repeat(f.depth);console.log(`${p}emit#${f.id} parent=${f.parentId} source=${f.source}`)}),s=[];let i=0,o=0;const a=new Set,c=f=>(a.add(f),()=>{a.delete(f)});let h;function u(f,p){const m=h,b={id:String(++i),dataset:f,source:p,createdAt:Rt(),parentId:m?.id,depth:m?m.depth+1:0};s.push(b)}let l=!1;function d(){if(l)return;l=!0;let f=0;try{for(;o<s.length;){if(++f>t)throw new Error("Possible infinite signal loop detected");const p=s[o],m=h;h=p,e&&r(p);const b=Array.from(a);for(const g of b)try{g(...p.dataset)}catch(w){Ti(()=>{throw w})}h=m,o++}}finally{l=!1,o>=s.length&&(s.length=0,o=0)}}return{subscribe:c,once(f){const p=c((...m)=>{p(),f(...m)});return p},emit(...f){u(f),d()},emitFrom(f,...p){u(p,f),d()},clear(){a.clear()}}}function fb(n={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=n;let r=1/0;const s=()=>r===1/0||Rt()<r,i=O=>{r=Rt()+O,h()};let o=s()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,D()},u=()=>!a()&&!s(),l=async()=>{u()&&await hb()};let d=0,f=[];const p=new Set,m=new Set;let b=0,g=[],w=[];const x=()=>{b===0&&(g.forEach(O=>O()),g=[],f.length===0&&(w.forEach(O=>O()),w=[]))},v=O=>{if(O.signal){if(O.signal.aborted)return O.resultReject("Cancel by Aborted!"),O;O.abortHandler=()=>{O.resultReject("Cancel by Abort!"),f=f.filter(L=>L.id!==O.id),x()},O.signal.addEventListener("abort",O.abortHandler,{once:!0})}if(f.filter(L=>O.invalidates?.includes(L.id)).forEach(L=>{L.resultReject("Cancel by invalidates!")}),f=f.filter(L=>!O.invalidates?.includes(L.id)),O.fold){const L=f.findIndex($=>$.id===O.id);if(L!==-1){const $=f[L],j=O.fold($,O);return $.dataset=j.dataset,$}else return f.push(O),O}else return f.push(O),O},E=()=>{if(f.length===0)return;let O=-1,L;for(let $=0,j=f.length;$<j;$++){const Q=f[$];(!L||Q.niceness<L.niceness)&&(O=$,L=Q)}return f.splice(O,1),L};let _=!1;const D=()=>{_||a()||(_=!0,Ti(()=>{for(_=!1;f.length>0&&m.size>0&&b<t&&!a();){const O=E(),L=R1(O.deadline)&&Rt()>=O.deadline,$=O.niceness==yi.immediate;if(!s()&&!L&&!$){v(O),D();break}if(O.signal?.aborted){O.resultReject("Cancel by Aborted!"),x();continue}b++;const j=m.values().next().value;m.delete(j),eb(lf(Promise.resolve(j(...O.dataset)),e),O.signal).then(Q=>{O.resultResolve(Q)}).catch(Q=>{O.retry>0?(O.retry--,v(O)):O.resultReject(Q)}).finally(async()=>{p.has(j)&&m.add(j),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),b--,x(),D()})}}))},z=O=>(p.add(O),m.add(O),D(),()=>{p.delete(O),m.delete(O)});return{put(...O){const L=O[O.length-1]||{};let $={};("niceness"in L||"deadline"in L||"retry"in L||"signal"in L||"invalidates"in L||"fold"in L)&&($=O.pop());const j=Q1(),Q=v({id:String(++d),dataset:O,createdAt:Rt(),result:j.promise,resultResolve:j.resolve,resultReject:j.reject,niceness:$.niceness??yi.normal,deadline:$.deadline??Ta,retry:$.retry??0,signal:$.signal});return D(),Q},cancel(O){f=f.filter(L=>L.id!==O.id),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),x()},clear(){for(const O of f)O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),O.resultReject(new Error("Cleared"));f.length=0,x()},run:z,once(O){const L=z((...$)=>{try{return O(...$)}finally{L()}});return L},async onDrain(){if(!(b===0&&f.length===0))return new Promise(O=>{w.push(O)})},async onIdle(){if(b!==0)return new Promise(O=>{g.push(O)})},pause:c,resume:h,get paused(){return a()},startFrame:i,yieldIfNeeded:l}}class db{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=fb({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(r){return await r()})}cancel(t){this.pool.cancel(t)}clear(){this.pool.clear()}get paused(){return this.pool.paused}startFrame(t){this.pool.startFrame(t)}async immediate(t){try{return this.pool.pause(),await this.pool.onIdle(),await lf(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??yi.normal,deadline:typeof e?.timeout=="number"?Rt()+e?.timeout:Ta})}}class mb{pool;started=!1;constructor(t={concurrency:1}){this.pool=new db(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,yf(t=>{this.pool.startFrame(t-Rt())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:yi.idle,timeout:e}).result}}const bf=new mb,pb=bf.idle.bind(bf);class Va{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e,r){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(r?e.bind(r):e),this}addListener(t,e,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r?e.bind(r):e),this}on(t,e,r){return this.addListener(t,e,r),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(r=>r!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(r=>{r(...e)}),this}once(t,e,r){const s=(...i)=>{r?e.apply(r,i):e(...i),this.off(t,s)};return this.on(t,s),this}}var Fa=function(n,t){return Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},Fa(n,t)};function Ba(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fa(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function vf(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $a(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function Ua(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function cn(n){return typeof n=="function"}function gb(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ya=gb(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
10
+ `.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},rn=(n,t)=>(typeof n=="string"&&(n=wi(n)||new RegExp(n)),n.test(t)),Hl=(n,t)=>{typeof n=="string"&&(n=wi(n)||new RegExp(n));const e=t.match(n);return e?n.flags.toLowerCase().indexOf("g")>=0?e.map(r=>({matchIndex:-1,fullMatch:r,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},ql=(n,t)=>{typeof n=="string"&&(n=wi(n)||new RegExp(n));const e=[],r=t.matchAll(n);for(const s of r)e.push({matchIndex:typeof s.index=="number"?s.index:-1,fullMatch:s[0],groupMatchs:s.slice(1)});return e};function a1(n){const t=n.match(/[\s\S]/gu);return t?t.length:0}function Kl(n,t){const e=n.codePointAt(t);return e?String.fromCodePoint(e):void 0}const c1="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",h1="0123456789";function Jl(n=12,t=c1){let e="";for(let r=0;r<n;r++)e+=t[Math.floor(Math.random()*t.length)];return e}function u1(n=12){return Jl(n,h1)}function l1(n){return n.replace(/(^\w)/g,t=>t.toLowerCase())}const Wt=(n,t="-")=>{let e=n.replace(new RegExp("[_-]?([A-Z])","g"),t+"$1").toLowerCase();const r=new RegExp(`^${t}`);return r.test(n)||(e=e.replace(r,"")),e};function f1(n){return n.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function Zl(n){return l1(f1(n))}function Ql(n){let t="";for(let e=0,r=n.length;e<r;e++){const s=n.charCodeAt(e);s>=1&&s<=127?t+=n.charAt(e):s>2047?(t+=String.fromCharCode(224|s>>12&15),t+=String.fromCharCode(128|s>>6&63),t+=String.fromCharCode(128|s>>0&63)):(t+=String.fromCharCode(192|s>>6&31),t+=String.fromCharCode(128|s>>0&63))}return t}function d1(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:default:return!0}}const Cr=(n,t=16)=>{let e=n.toLowerCase();const r=e.indexOf("0b")==0,s=e.indexOf("0o")==0,i=e.indexOf("0x")==0;(r||s||i)&&(e=e.slice(2)),r&&(t=2),s&&(t=8),i&&(t=16);const o=parseInt(e,t);if(Number.isNaN(o)||e.length==0)throw new Error(`radixStringToNumber(${n}, ${t}) 无法解析!`);return o};function Pa(n,t){let e=t?.type;const r=t?.mime,s=t?.encode;if(!e&&r)switch(s){case vi.utf8:case vi["utf-8"]:e=`${r};charset=${s}`;break;case vi.base64:e=`${r};${s}`;break;default:e=`${r}`;break}return new Blob([n],{type:e})}function m1(n){let t=He["text/plain"];switch(new DataView(n).getUint32(0,d1()).toString(16).toUpperCase()){case"FFD8FFDB":t=He["image/jpeg"];break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=He["image/jpeg"];break;case"89504E47":t=He["image/png"];break;case"47494638":t=He["image/gif"];break;case"52494646":t=He["image/webp"];break;case"25504446":t=He["application/pdf"];break;case"504B0304":t=He["application/zip"];break}return t}const p1="[object Undefined]",g1="[object Null]",y1="[object Boolean]",b1="[object Number]",v1="[object BigInt]",w1="[object String]",x1="[object Symbol]",S1="[object Function]",_1="[object GeneratorFunction]",E1="[object Array]";function Aa(n){return Object.prototype.toString.call(n)}function C1(n){const t=Aa(n);return t===p1||t===g1||t===y1||t===b1||t===w1||t===x1||t===v1}function tf(n){const t=Aa(n);return t==S1||t==_1}function ef(n){if(!sf(n))return!1;const t=/[\\^$.*+?()[\]{}|]/g,e=/^\[object .+?Constructor\]$/,r=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return(tf(n)?r:e).test(O1(n))}function T1(n,t){return n?.[t]}function nf(n,t){const e=T1(n,t);return ef(e)?e:void 0}nf(Z,"Map"),nf(Z,"WeakMap");function rf(n){return Aa(n)===E1}function sf(n){const t=typeof n;return!!n&&(t=="object"||t=="function")}function Jn(n){return!!n&&typeof n=="object"}function xi(n){return Jn(n)&&!rf(n)}const of=n=>{for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0};function P1(n){return typeof Promise<"u"&&n instanceof Promise||sf(n)&&typeof n.then=="function"&&typeof n.catch=="function"}function A1(n){const t=[];for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return t}function Tr(n,t,e=!0){if(xi(n)&&xi(t))for(const r of A1(t))(e||typeof n[r]>"u")&&(xi(n[r])&&xi(t[r])?Tr(n[r],t[r],e):n[r]=t[r]);return n}function M1(n,...t){return new n.constructor(...t)}function D1(n,t){return n===t||n!==n&&t!==t}function O1(n){if(n!=null){try{return Function.prototype.toString.call(n)}catch{}try{return""+n}catch{}}return""}function I1(n,t){let e;return typeof t=="string"?e=t.split("."):e=t,e.reduce((r,s)=>r!=null&&r!=null?r[s]:r,n)}function sn(n,t){try{return I1(n,t)}catch{return}}function Ma(n,t,e){if(!n||!t)return n;let r;typeof t=="string"?r=t.split("."):r=t;let s=n;for(let i=0,o=r.length-1;i<o;i++){const a=r[i];(!(a in s)||typeof s[a]!="object"||s[a]===null)&&(s[a]=Number.isNaN(Number(r[i+1]))?{}:[]),s=s[a]}return s[r[r.length-1]]=e,n}function is(n){return n!=null}function R1(n){return is(n)&&n!==o1&&n!==Ta}function k1(n){return typeof n=="number"&&!Number.isNaN(n)}const L1=2**31-1;function Me(n,t){const e=parseFloat(n);return Number.isNaN(e)?typeof t=="number"?t:NaN:e}const N1=n=>typeof n=="number"&&n>=0&&Number.isFinite(n),z1=n=>N1(n)&&n>0,on=n=>z1(n)&&n===Math.floor(n),Da=n=>n===1/0||on(n);function Oa(n=1e-6){return function(t,e){return Math.abs(t-e)<n}}function st(n,t,e){const r=Math.min(t,e),s=Math.max(t,e);return n<r?r:n>s?s:n}function V1(n,t){return(n%t+t)%t}function Si(n,t,e){return typeof n=="number"&&typeof t=="number"?(1-e)*n+e*t:typeof n=="number"?n:typeof t=="number"?t:0}function F1(n,t,e){const r=Math.max(n.length,t.length),s=new Array(r);for(let i=0;i<r;i++)s[i]=Si(n[i],t[i],e);return s}function B1(n,t,e){return r=>{const s=st(r,n,t);return e==0?s:t-s<e?t:Math.round(s/e)*e}}function $1(n,t=2){return Me(n,0).toFixed(t)}function at(n,t=2){return+$1(n,t)}function Ia(n,t){const e=Hl("number-single",String(n));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):R1(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?n.substring(e.matchIndex+e.fullMatch.length):""}}function af(n){const t=Hl("number",n);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}function cf(n,t){for(let e=0,r=n.length;e<r;e++)if(n[e]==t)return!0;return!1}function U1(n=[],t=[]){const e=n.length,r=t.length;for(let i=0;i<r;i++)n[i]=t[i];let s=Math.max(0,e-r);for(;s>0;)n.pop(),s--;return n}function hf(n,t){const e=n.findIndex(r=>r===t);return e>=0&&n.splice(e,1),n}function Y1(n,...t){return t.forEach(e=>{cf(n,e)||n.push(e)}),n}class _i extends Array{constructor(t){super(t),this.fill(0)}}const uf=n=>on(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?_i:null:null;function Ei(n,t){let e=n.length;for(;e--;)if(D1(n[e][0],t))return e;return-1}function Rt(){return(typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date).now()}function Pr(n=new Date){return n.getTime()}function j1(n=new Date,t="yyyy-mm-dd hh:ii:ss.SSS"){return K1(n,t)}function G1(n){const t=n.valueOf();return!Number.isNaN(t)}function X1(n,t=3,e=":"){const r=Math.max(n.length,6);let s="";for(let o=0;o<r-4;o++)s+=n[o]||"0";const i=[s,""+(n[r-4]||"0")+(n[r-3]||"0"),""+(n[r-2]||"0")+(n[r-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+e+i[1];case 3:return i[0]+e+i[1]+e+i[2]}}function W1(n){const t=Math.max(n.length,6);let e=0;e+=(n[t-2]||0)*10+(n[t-1]||0),e+=((n[t-4]||0)*10+(n[t-3]||0))*60;let r=0;for(let s=0;s<t-4;s++)r=r*10+(n[s]||0);return e+=r*60*60,Math.floor(Math.max(0,e))}function H1(n,t=!1){let e=0;if(typeof n=="number"?e=n:e=W1(n),e<=0)return[0,0,0,0,0,0];const r=[],s=e%60;r.unshift(s%10),r.unshift(Math.floor(s/10)),e=Math.floor(e/60);const i=e%60;if(r.unshift(i%10),r.unshift(Math.floor(i/10)),e=Math.floor(e/60),t){const o=e%100;for(r.unshift(o%10),r.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)r.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;r.unshift(o%10),r.unshift(Math.floor(o/10))}return r}function q1(n,t=1,e=!1){return n[n.length-1]+=t,H1(n,e)}function K1(n,t="yyyy-mm-dd hh:ii:ss"){if(!G1(n))return"";const e=/(y+)/.exec(t);if(e&&e[1]){const s=e[1];t=t.replace(s,(n.getFullYear()+"").substring(4-s.length))}const r={"m+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"i+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),"S+":n.getMilliseconds()};for(const s in r){const i=new RegExp("("+s+")").exec(t);if(i&&i[1]){const o=i[1];t=t.replace(o,o.length===1?""+r[s]:("00"+r[s]).slice(-o.length))}}return t}const lf=()=>{};function J1(...n){return n.length===0?(...t)=>t:n.length===1?n[0]:n.reduce((t,e)=>(...r)=>t(e(...r)))}function Z1(n=0,t){const e=t?.min??300,r=t?.max??6e4,s=t?.exponent??2,i=t?.factor??.5;let o=e*Math.pow(s,n);if(i){const a=Math.random(),c=Math.floor(a*i*o);o=Math.floor(a*10)&1?o+c:o-c}return Math.min(o,r)|0}function Q1(n,t={}){if(typeof n!="function")throw new TypeError("Expected a function");const e=function(...r){const s=t?.thisArg||this,i=t?.cacheKeyResolver?t.cacheKeyResolver.apply(s,r):r[0],o=e.cache;if(o.has(i))return o.get(i);const a=n.apply(s,r);return a instanceof Promise&&a.catch(()=>o.delete(i)),e.cache=o.set(i,a)||o,a};return e.cache=t?.createCache?t.createCache():new Map,e}Array.prototype.ap=function(n){return this.reduce((t,e)=>t.concat(n.map(e)),[])};function tb(){let n,t;return{promise:new Promise((e,r)=>{n=e,t=r}),resolve:n,reject:t}}function Zn(n,t=e=>console.error(e)){try{const e=n();return P1(e)?Promise.resolve(e).catch(r=>{t(r)}):e}catch(e){t(e)}}const eb=2147483647;function ff(n,t,e){if(typeof t!="number"||t<=0)return n;let r;const s=new Promise((i,o)=>{r=setTimeout((a,c)=>{a(new Error(c||`Timeout of ${t}ms!`))},Math.min(t,eb),o,e)});return Promise.race([n,s]).finally(()=>{r!==void 0&&(clearTimeout(r),r=void 0)})}function nb(n,t,e){if(!t)return n;const r=e||"Aborted!";return t.aborted?Promise.reject(new Error(r)):new Promise((s,i)=>{const o=()=>{i(new Error(r))};t.addEventListener("abort",o,{once:!0}),n.finally(()=>{t.removeEventListener("abort",o)}),n.then(s,i)})}class rb{__data__=[];size=0;constructor(t){t=t||[];const e=t.length;let r=-1;for(;++r<e;){const s=t[r];this.set(s[0],s[1])}}set(t,e){const r=this.__data__,s=Ei(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}get(t){const e=this.__data__,r=Ei(e,t);return r<0?void 0:e[r][1]}has(t){return Ei(this.__data__,t)>-1}delete(t){const e=this.__data__,r=Ei(e,t);if(r<0)return!1;const s=e.length-1;return r==s?e.pop():Array.prototype.splice.call(e,r,1),--this.size,!0}clear(){this.__data__=[],this.size=0}*entries(){for(const t of this.__data__)yield t}*keys(){for(const t of this.__data__)yield t[0]}*values(){for(const t of this.__data__)yield t[1]}[Symbol.iterator](){return this.entries()}}const sb=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,df=new Set,ib=(n,t,e,r)=>{typeof Ca.emitWarning=="function"?Ca.emitWarning(n,t,e,r):console.error(`[${e}] ${t}: ${n}`)},ob=n=>!df.has(n);class Ar{heap;length;static#a=!1;static create(t){const e=uf(t);if(!e)return[];Ar.#a=!0;const r=new Ar(t,e);return Ar.#a=!1,r}constructor(t,e){if(!Ar.#a)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Ra{#a;#l;#g;#D;#y;#L;#N;#b;get perf(){return this.#b}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#v;#r;#n;#t;#h;#f;#c;#i;#w;#o;#x;#S;#d;#m;#_;#A;#u;#z;static unsafeExposeInternals(t){return{starts:t.#S,ttls:t.#d,autopurgeTimers:t.#m,sizes:t.#x,keyMap:t.#r,keyList:t.#n,valList:t.#t,next:t.#h,prev:t.#f,get head(){return t.#c},get tail(){return t.#i},free:t.#w,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,r,s,i)=>t.#B(e,r,s,i),moveToTail:e=>t.#k(e),indexes:e=>t.#E(e),rindexes:e=>t.#C(e),isStale:e=>t.#p(e)}}get max(){return this.#a}get maxSize(){return this.#l}get calculatedSize(){return this.#v}get size(){return this.#s}get fetchMethod(){return this.#L}get memoMethod(){return this.#N}get dispose(){return this.#g}get onInsert(){return this.#D}get disposeAfter(){return this.#y}constructor(t){const{max:e=0,ttl:r,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:h,onInsert:u,disposeAfter:l,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:b,fetchMethod:g,memoMethod:w,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:_,ignoreFetchAbort:D,perf:z}=t;if(z!==void 0&&typeof z?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#b=z??sb,e!==0&&!on(e))throw new TypeError("max option must be a nonnegative integer");const O=e?uf(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#a=e,this.#l=p,this.maxEntrySize=m||this.#l,this.sizeCalculation=b,this.sizeCalculation){if(!this.#l&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#N=w,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=g,this.#A=!!g,this.#r=new Map,this.#n=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#h=new O(e),this.#f=new O(e),this.#c=0,this.#i=0,this.#w=Ar.create(e),this.#s=0,this.#v=0,typeof h=="function"&&(this.#g=h),typeof u=="function"&&(this.#D=u),typeof l=="function"?(this.#y=l,this.#o=[]):(this.#y=void 0,this.#o=void 0),this.#_=!!this.#g,this.#z=!!this.#D,this.#u=!!this.#y,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#l!==0&&!on(this.#l))throw new TypeError("maxSize must be a positive integer if specified");if(!on(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=on(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=r||0,this.ttl){if(!on(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$()}if(this.#a===0&&this.ttl===0&&this.#l===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#l){const L="LRU_CACHE_UNBOUNDED";ob(L)&&(df.add(L),ib("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,Ra))}}getRemainingTTL(t){return this.#r.has(t)?1/0:0}#$(){const t=new _i(this.#a),e=new _i(this.#a);this.#d=t,this.#S=e;const r=this.ttlAutopurge?Array.from({length:this.#a}):void 0;this.#m=r,this.#U=(a,c,h=this.#b.now())=>{e[a]=c!==0?h:0,t[a]=c,s(a,c)},this.#O=a=>{e[a]=t[a]!==0?this.#b.now():0,s(a,t[a])};const s=this.ttlAutopurge?(a,c)=>{if(r?.[a]&&(clearTimeout(r[a]),r[a]=void 0),c&&c!==0&&r){const h=setTimeout(()=>{this.#p(a)&&this.#T(this.#n[a],"expire")},c+1);h.unref&&h.unref(),r[a]=h}}:()=>{};this.#P=(a,c)=>{if(t[c]){const h=t[c],u=e[c];if(!h||!u)return;a.ttl=h,a.start=u,a.now=i||o();const l=a.now-u;a.remainingTTL=h-l}};let i=0;const o=()=>{const a=this.#b.now();if(this.ttlResolution>0){i=a;const c=setTimeout(()=>i=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{const c=this.#r.get(a);if(c===void 0)return 0;const h=t[c],u=e[c];if(!h||!u)return 1/0;const l=(i||o())-u;return h-l},this.#p=a=>{const c=e[a],h=t[a];return!!h&&!!c&&(i||o())-c>h}}#O=()=>{};#P=()=>{};#U=()=>{};#p=()=>!1;#H(){const t=new _i(this.#a);this.#v=0,this.#x=t,this.#I=e=>{this.#v-=t[e],t[e]=0},this.#Y=(e,r,s,i)=>{if(this.#e(r))return 0;if(!on(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(r,e),!on(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s||0},this.#V=(e,r,s)=>{if(t[e]=r,this.#l){const i=this.#l-t[e];for(;this.#v>i;)this.#F(!0)}this.#v+=t[e],s&&(s.entrySize=r,s.totalCalculatedSize=this.#v)}}#I=t=>{};#V=(t,e,r)=>{};#Y=(t,e,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#i;this.#j(e)&&((t||!this.#p(e))&&(yield e),e!==this.#c);)e=this.#f[e]}*#C({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#c;this.#j(e)&&((t||!this.#p(e))&&(yield e),e!==this.#i);)e=this.#h[e]}#j(t){return t!==void 0&&this.#r.get(this.#n[t])===t}*entries(){for(const t of this.#E())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*rentries(){for(const t of this.#C())this.#t[t]!==void 0&&this.#n[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#n[t],this.#t[t]])}*keys(){for(const t of this.#E()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(const t of this.#C()){const e=this.#n[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(const t of this.#E())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(const t of this.#C())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const r of this.#E()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;if(i!==void 0&&t(i,this.#n[r],this))return this.#R(this.#n[r],e)}}forEach(t,e=this){for(const r of this.#E()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(e,i,this.#n[r],this)}}rforEach(t,e=this){for(const r of this.#C()){const s=this.#t[r],i=this.#e(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(e,i,this.#n[r],this)}}purgeStale(){let t=!1;for(const e of this.#C({allowStale:!0}))this.#p(e)&&(this.#T(this.#n[e],"expire"),t=!0);return t}info(t){const e=this.#r.get(t);if(e===void 0)return;const r=this.#t[e],s=this.#e(r)?r.__staleWhileFetching:r;if(s===void 0)return;const i={value:s};if(this.#d&&this.#S){const o=this.#d[e],a=this.#S[e];if(o&&a){const c=o-(this.#b.now()-a);i.ttl=c,i.start=Date.now()}}return this.#x&&(i.size=this.#x[e]),i}dump(){const t=[];for(const e of this.#E({allowStale:!0})){const r=this.#n[e],s=this.#t[e],i=this.#e(s)?s.__staleWhileFetching:s;if(i===void 0||r===void 0)continue;const o={value:i};if(this.#d&&this.#S){o.ttl=this.#d[e];const a=this.#b.now()-this.#S[e];o.start=Math.floor(Date.now()-a)}this.#x&&(o.size=this.#x[e]),t.unshift([r,o])}return t}load(t){this.clear();for(const[e,r]of t){if(r.start){const s=Date.now()-r.start;r.start=this.#b.now()-s}this.#M(e,r.value,r)}}set(t,e,r={}){const{status:s=void 0}=r;return r.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e)),this.#M(t,e,r)}#M(t,e,r={}){const{ttl:s=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;if(e===void 0)return c&&(c.set="deleted"),this.delete(t),this;let{noUpdateTTL:h=this.noUpdateTTL}=r;c&&!this.#e(e)&&(c.value=e);const u=this.#Y(t,e,r.size||0,a,c);if(this.maxEntrySize&&u>this.maxEntrySize)return this.#T(t,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let l=this.#s===0?void 0:this.#r.get(t);if(l===void 0)l=this.#s===0?this.#i:this.#w.length!==0?this.#w.pop():this.#s===this.#a?this.#F(!1):this.#s,this.#n[l]=t,this.#t[l]=e,this.#r.set(t,l),this.#h[this.#i]=l,this.#f[l]=this.#i,this.#i=l,this.#s++,this.#V(l,u,c),c&&(c.set="add"),h=!1,this.#z&&this.#D?.(e,t,"add");else{this.#k(l);const d=this.#t[l];if(e!==d){if(this.#A&&this.#e(d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#_&&this.#g?.(f,t,"set"),this.#u&&this.#o?.push([f,t,"set"]))}else o||(this.#_&&this.#g?.(d,t,"set"),this.#u&&this.#o?.push([d,t,"set"]));if(this.#I(l),this.#V(l,u,c),this.#t[l]=e,c){c.set="replace";const f=d&&this.#e(d)?d.__staleWhileFetching:d;f!==void 0&&(c.oldValue=f)}}else c&&(c.set="update");this.#z&&this.onInsert?.(e,t,e===d?"update":"replace")}if(s!==0&&!this.#d&&this.#$(),this.#d&&(h||this.#U(l,s,i),c&&this.#P(c,l)),!o&&this.#u&&this.#o){const d=this.#o;let f;for(;f=d?.shift();)this.#y?.(...f)}return this}pop(){try{for(;this.#s;){const t=this.#t[this.#c];if(this.#F(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#u&&this.#o){const t=this.#o;let e;for(;e=t?.shift();)this.#y?.(...e)}}}#F(t){const e=this.#c,r=this.#n[e],s=this.#t[e];return this.#A&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#u)&&(this.#_&&this.#g?.(s,r,"evict"),this.#u&&this.#o?.push([s,r,"evict"])),this.#I(e),this.#m?.[e]&&(clearTimeout(this.#m[e]),this.#m[e]=void 0),t&&(this.#n[e]=void 0,this.#t[e]=void 0,this.#w.push(e)),this.#s===1?(this.#c=this.#i=0,this.#w.length=0):this.#c=this.#h[e],this.#r.delete(r),this.#s--,e}has(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&(r.op="has",r.key=t),this.#q(t,e)}#q(t,e={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=e,i=this.#r.get(t);if(i!==void 0){const o=this.#t[i];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(i))s&&(s.has="stale",this.#P(s,i));else return r&&this.#O(i),s&&(s.has="hit",this.#P(s,i)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){const{status:r=void 0}=e;return r&&(r.op="peek",r.key=t),e.status=r,this.#K(t,e)}#K(t,e){const{status:r,allowStale:s=this.allowStale}=e,i=this.#r.get(t);if(i===void 0||!s&&this.#p(i)){r&&(r.peek=i===void 0?"miss":"stale");return}const o=this.#t[i],a=this.#e(o)?o.__staleWhileFetching:o;return r&&(a!==void 0?(r.peek="hit",r.value=a):r.peek="miss"),a}#B(t,e,r,s){const i=e===void 0?void 0:this.#t[e];if(this.#e(i))return i;const o=new AbortController,{signal:a}=r;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const c={signal:o.signal,options:r,context:s},h=(m,b=!1)=>{const{aborted:g}=o.signal,w=r.ignoreFetchAbort&&m!==void 0,x=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&m!==void 0);if(r.status&&(g&&!b?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,w&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),g&&!w&&!b)return l(o.signal.reason,x);const v=f,E=this.#t[e];return(E===f||E===void 0&&w&&b)&&(m===void 0?v.__staleWhileFetching!==void 0?this.#t[e]=v.__staleWhileFetching:this.#T(t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.#M(t,m,c.options))),m},u=m=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=m),l(m,!1)),l=(m,b)=>{const{aborted:g}=o.signal,w=g&&r.allowStaleOnFetchAbort,x=w||r.allowStaleOnFetchRejection,v=x||r.noDeleteOnFetchRejection,E=f;if(this.#t[e]===f&&(!v||!b&&E.__staleWhileFetching===void 0?this.#T(t,"fetch"):w||(this.#t[e]=E.__staleWhileFetching)),x)return r.status&&E.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw m},d=(m,b)=>{const g=this.#L?.(t,i,c);g&&g instanceof Promise&&g.then(w=>m(w===void 0?void 0:w),b),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(m(void 0),r.allowStaleOnFetchAbort&&(m=w=>h(w,!0)))})};r.status&&(r.status.fetchDispatched=!0);const f=new Promise(d).then(h,u),p=Object.assign(f,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return e===void 0?(this.#M(t,p,{...c.options,status:void 0}),e=this.#r.get(t)):this.#t[e]=p,p}#e(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&e.context&&(r.context=e.context),this.#G(t,e)}async#G(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:b=!1,status:g,signal:w}=e;if(g&&(g.op="fetch",g.key=t,b&&(g.forceRefresh=!0)),!this.#A)return g&&(g.fetch="get"),this.#R(t,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:g});const x={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:w},v=this.#r.get(t);if(v===void 0){g&&(g.fetch="miss");const E=this.#B(t,v,x,m);return E.__returned=E}else{const E=this.#t[v];if(this.#e(E)){const O=r&&E.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",O&&(g.returnedStale=!0)),O?E.__staleWhileFetching:E.__returned=E}const _=this.#p(v);if(!b&&!_)return g&&(g.fetch="hit"),this.#k(v),s&&this.#O(v),g&&this.#P(g,v),E;const D=this.#B(t,v,x,m),z=D.__staleWhileFetching!==void 0&&r;return g&&(g.fetch=_?"stale":"refresh",z&&_&&(g.returnedStale=!0)),z?D.__staleWhileFetching:D.__returned=D}}forceFetch(t,e={}){const{status:r=void 0}=e;return e.status=r,r&&e.context&&(r.context=e.context),this.#J(t,e)}async#J(t,e={}){const r=await this.#G(t,e);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(t,e={}){const{status:r=void 0}=e;e.status=r,r&&(r.op="memo",r.key=t,e.context&&(r.context=e.context));const s=this.#Z(t,e);return r&&(r.value=s),s}#Z(t,e={}){const r=this.#N;if(!r)throw new Error("no memoMethod provided to constructor");const{context:s,status:i,forceRefresh:o,...a}=e;i&&o&&(i.forceRefresh=!0);const c=this.#R(t,a),h=o||c===void 0;if(i&&(i.memo=h?"miss":"hit",h||(i.value=c)),!h)return c;const u=r(t,c,{options:a,context:s});return i&&(i.value=u),this.#M(t,u,a),u}get(t,e={}){const{status:r=void 0}=e;e.status=r,r&&(r.op="get",r.key=t);const s=this.#R(t,e);return r&&s!==void 0&&(r.value=s),s}#R(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=e,a=this.#r.get(t);if(a===void 0){o&&(o.get="miss");return}const c=this.#t[a],h=this.#e(c);return o&&this.#P(o,a),this.#p(a)?h?(o&&(o.get="stale-fetching"),r&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(i||this.#T(t,"expire"),o&&(o.get="stale"),r?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=h?"fetching":"hit"),this.#k(a),s&&this.#O(a),h?c.__staleWhileFetching:c)}#X(t,e){this.#f[e]=t,this.#h[t]=e}#k(t){t!==this.#i&&(t===this.#c?this.#c=this.#h[t]:this.#X(this.#f[t],this.#h[t]),this.#X(this.#i,t),this.#i=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let r=!1;if(this.#s!==0){const s=this.#r.get(t);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m?.[s]),this.#m[s]=void 0),r=!0,this.#s===1)this.#W(e);else{this.#I(s);const i=this.#t[s];if(this.#e(i)?i.__abortController.abort(new Error("deleted")):(this.#_||this.#u)&&(this.#_&&this.#g?.(i,t,e),this.#u&&this.#o?.push([i,t,e])),this.#r.delete(t),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#i)this.#i=this.#f[s];else if(s===this.#c)this.#c=this.#h[s];else{const o=this.#f[s];this.#h[o]=this.#h[s];const a=this.#h[s];this.#f[a]=this.#f[s]}this.#s--,this.#w.push(s)}}if(this.#u&&this.#o?.length){const s=this.#o;let i;for(;i=s?.shift();)this.#y?.(...i)}return r}clear(){return this.#W("delete")}#W(t){for(const e of this.#C({allowStale:!0})){const r=this.#t[e];if(this.#e(r))r.__abortController.abort(new Error("deleted"));else{const s=this.#n[e];this.#_&&this.#g?.(r,s,t),this.#u&&this.#o?.push([r,s,t])}}if(this.#r.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#d&&this.#S){this.#d.fill(0),this.#S.fill(0);for(const e of this.#m??[])e!==void 0&&clearTimeout(e);this.#m?.fill(void 0)}if(this.#x&&this.#x.fill(0),this.#c=0,this.#i=0,this.#w.length=0,this.#v=0,this.#s=0,this.#u&&this.#o){const e=this.#o;let r;for(;r=e?.shift();)this.#y?.(...r)}}}class ka{data;expirationMap=new Map;immortalKeys=new Set;expirations=Object.create(null);ttl;max;updateAgeOnGet;checkAgeOnGet;updateAgeOnHas;checkAgeOnHas;noUpdateTTL;dispose;noDisposeOnSet;timer;timerExpiration;constructor({ttl:t=1/0,max:e=1/0,updateAgeOnGet:r=!1,checkAgeOnGet:s=!1,updateAgeOnHas:i=!1,checkAgeOnHas:o=!1,noUpdateTTL:a=!1,dispose:c,noDisposeOnSet:h=!1}={},u=new Map){if(t!==void 0&&!Da(t))throw new TypeError("ttl must be positive integer or Infinity if set");if(!Da(e))throw new TypeError("max must be positive integer or Infinity");if(this.data=u,this.ttl=t,this.max=e,this.updateAgeOnGet=!!r,this.checkAgeOnGet=!!s,this.updateAgeOnHas=!!i,this.checkAgeOnHas=!!o,this.noUpdateTTL=!!a,this.noDisposeOnSet=!!h,c!==void 0){if(typeof c!="function")throw new TypeError("dispose must be function if set");this.dispose=c}else this.dispose=(l,d,f)=>{};this.timer=void 0,this.timerExpiration=void 0}get size(){return this.data.size}setTimer(t,e){if(this.timerExpiration&&this.timerExpiration<t)return;this.timer&&clearTimeout(this.timer);const r=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const s in this.expirations){const i=Number(s);this.setTimer(i,i-Rt());break}},Math.min(L1,Math.max(0,e)));r.unref&&r.unref(),this.timerExpiration=t,this.timer=r}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}clear(){const t=this.dispose!==ka.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[e,r]of t)this.dispose(r,e,"delete")}setTTL(t,e=this.ttl){const r=this.expirationMap.get(t);if(r!==void 0){const s=this.expirations[r];!s||s.length<=1?delete this.expirations[r]:this.expirations[r]=s.filter(i=>i!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);const s=Math.floor(Rt()+e);this.expirationMap.set(t,s),this.expirations[s]||(this.expirations[s]=[],this.setTimer(s,e)),this.expirations[s].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:r=this.ttl,noUpdateTTL:s=this.noUpdateTTL,noDisposeOnSet:i=this.noDisposeOnSet}={}){if(!Da(r))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){s||this.setTTL(t,r);const o=this.data.get(t),a=!i&&this.data.has(t);o!==e&&(this.data.set(t,e),a&&this.dispose(o,t,"set"))}else this.setTTL(t,r),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:r=this.ttl,updateAgeOnHas:s=this.updateAgeOnHas}={}){return this.data.has(t)?e&&this.getRemainingTTL(t)===0?(this.delete(t),!1):(s&&this.setTTL(t,r),!0):!1}getRemainingTTL(t){const e=this.expirationMap.get(t);return e===1/0?1/0:e!==void 0?Math.max(0,Math.ceil(e-Rt())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:r=this.ttl,checkAgeOnGet:s=this.checkAgeOnGet}={}){const i=this.data.get(t);if(s&&this.getRemainingTTL(t)===0){this.delete(t);return}return e&&this.setTTL(t,r),i}delete(t){const e=this.expirationMap.get(t);if(e!==void 0){const r=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);const s=this.expirations[e];return s&&(s.length<=1?delete this.expirations[e]:this.expirations[e]=s.filter(i=>i!==t)),this.dispose(r,t,"delete"),this.size===0&&this.cancelTimer(),!0}return!1}purgeToCapacity(){if(!(this.size<=this.max))for(const t in this.expirations){const e=this.expirations[t];if(this.size-e.length>=this.max){delete this.expirations[t];const r=[];for(const s of e)r.push([s,this.data.get(s)]),this.data.delete(s),this.expirationMap.delete(s);for(const[s,i]of r)this.dispose(i,s,"evict")}else{const r=this.size-this.max,s=[];for(const i of e.splice(0,r))s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of s)this.dispose(o,i,"evict")}}}purgeStale(){const t=Math.ceil(Rt());for(const e in this.expirations){if(e==="Infinity"||Number(e)>t)return;const r=[...this.expirations[e]||[]],s=[];delete this.expirations[e];for(const i of r)s.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,o]of s)this.dispose(o,i,"expire")}this.size===0&&this.cancelTimer()}*entries(){for(const t in this.expirations)for(const e of this.expirations[t])yield[e,this.data.get(e)];for(const t of this.immortalKeys)yield[t,this.data.get(t)]}*keys(){for(const t in this.expirations)for(const e of this.expirations[t])yield e;for(const t of this.immortalKeys)yield t}*values(){for(const t in this.expirations)for(const e of this.expirations[t])yield this.data.get(e);for(const t of this.immortalKeys)yield this.data.get(t)}[Symbol.iterator](){return this.entries()}firstKey(){return this.keys().next().value}}const Qn={branch:"├",lastBranch:"└",line:"│",empty:" "};function Ci(n,t={}){const{showValues:e=!0,hideFunctions:r=!1,lineBreak:s=`\r
11
+ `,maxDeep:i}=t,o=[],a=new WeakSet;function c(u,l="",d=0){if(typeof u=="string"){o.push(l+'"'+u+'"');return}if(typeof u!="object"||u===null){e&&o.push(l+String(u));return}if(i&&d>=i){Array.isArray(n)?o.push("[...OverMaxDeep]"):o.push("{...OverMaxDeep}");return}if(a.has(u)){o.push(l+"[Circular]");return}a.add(u);const f=Object.keys(u).filter(p=>!(r&&typeof u[p]=="function"));f.forEach((p,m)=>{const b=u[p],g=m===f.length-1,w=d===0&&m===0?"":l,x=g?Qn.lastBranch:Qn.branch,v=p.trim()===""?"":p;let E=w+x+(v?" "+v:"");const _=p.trim()!=="";if(b&&typeof b=="object"&&a.has(b))o.push(E+(_?": ":E?" ":"")+"[Circular]");else if(b&&typeof b=="object"&&!Array.isArray(b)){o.push(E);const D=g?Qn.empty:Qn.line,z=w+D+" ";c(b,z,d+1)}else if(Array.isArray(b)){o.push(E+(_?": ":E?" ":"")+"[Array("+b.length+")]");const D=g?Qn.empty:Qn.line,z=w+D+" ";c(b,z,d+1)}else if(e){const D=typeof b=="function"?"[Function]":typeof b=="string"?'"'+String(b)+'"':String(b);E+=(_?": ":E?" ":"")+D,o.push(E)}else o.push(E)})}const h=Object.keys(n);if(h.length===0)return"(empty)";if(h.length===1&&h[0]!==void 0&&h[0].trim()===""&&typeof n[h[0]]=="string"){const u=h[0],l=Qn.lastBranch,d=n[u],f=typeof d=="function"?"[Function]":typeof d=="string"?'"'+d+'"':String(d);return l+" "+f}return c(n),s+o.join(s)}function mf(n="verbose"){let t=-1;switch(n){case"verbose":t=0;break;case"debug":t=1;break;case"info":t=2;break;case"warn":t=3;break;case"error":t=4;break}return t}function ab(n="verbose"){Z.OPEN_LOG_LEVEL=mf(n)}function pf(){Z.OPEN_LOG_LEVEL=-1}function cb(n){Z.LOG_UPLOAD_FN=n}pf();function os(n="verbose"){return Z.OPEN_LOG_LEVEL<=mf(n)}function La(n){Z.LOG_UPLOAD_FN&&Z.LOG_UPLOAD_FN(n)}function Pn(n,t=""){try{if(La({level:"info",msg:n,type:t}),!os("info"))return;console.log(n)}catch{}}function De(n,t=""){try{if(La({level:"warn",msg:n,type:t}),!os("warn"))return;console.warn(n)}catch{}}function hb(n,t=""){try{if(La({level:"error",msg:n,type:t}),!os("error"))return;console.error(n)}catch{}}const gf={start:n=>{os("verbose")&&(!console||typeof console!="object"||typeof console.groupCollapsed!="function"||console.groupCollapsed(n))},end:()=>{!console||typeof console!="object"||typeof console.groupEnd!="function"||console.groupEnd()}},yf={start:n=>{os("verbose")&&(!console||typeof console!="object"||typeof console.time!="function"||console.time(n))},end:n=>{!console||typeof console!="object"||typeof console.timeEnd!="function"||console.timeEnd(n)}};function Ti(n){if(typeof MessageChannel<"u"&&(ef(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;t.onmessage=()=>{t.onmessage=null,n()},e.postMessage(null)}else setTimeout(n,0)}async function ub(){return new Promise(n=>{Ti(n)})}if(Z.requestAnimationFrame=Z.requestAnimationFrame||Z.webkitRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.oRequestAnimationFrame||Z.msRequestAnimationFrame,Z.cancelAnimationFrame=Z.cancelAnimationFrame||Z.webkitCancelAnimationFrame||Z.mozCancelAnimationFrame||Z.oCancelAnimationFrame||Z.msCancelAnimationFrame,!Z.requestAnimationFrame){let n=Rt();Z.requestAnimationFrame=t=>{const e=Rt(),r=Math.max(0,16-(e-n)),s=Z.setTimeout(()=>{t(e+r)},r);return n=e+r,s}}Z.cancelAnimationFrame||(Z.cancelAnimationFrame=n=>{Z.clearTimeout(n)});const Pi=Z.requestAnimationFrame,lb=Z.cancelAnimationFrame;function fb(n){let t=!0,e=Pi(function r(s){t&&n(s)&&(e=Pi(r))});return()=>{t=!1,lb(e)}}Z.requestIdleCallback=Z.requestIdleCallback||function(n,t){const e=Rt();return setTimeout(()=>{const r=Rt()-e,s={didTimeout:typeof t?.timeout!="number"?!1:r>t.timeout,timeRemaining:()=>Math.max(0,50-r)};n(s)},t?.timeout)},Z.cancelIdleCallback=Z.cancelIdleCallback||function(n){clearTimeout(n)},Z.requestIdleCallback,Z.cancelIdleCallback;let as=33,an=33,Ai=0,cs=0,Na=!1;function bf(n){Na||(Na=!0,Pi(t=>{Na=!1,Ai=t,cs===0&&(cs=Ai+an);let e=an+Ai-cs;e<an&&as<an?(e<8&&(e=8),an=Math.max(e,as)):e>an&&as>an&&(an=Math.min(e,as)),as=e,cs=Ai+an,Ti(()=>{n(cs),bf(n)})}))}function za(n){const t=n?.maxIterations||1e4,e=!!n?.tracing,r=n?.onTrace||(f=>{const p=" ".repeat(f.depth);console.log(`${p}emit#${f.id} parent=${f.parentId} source=${f.source}`)}),s=[];let i=0,o=0;const a=new Set,c=f=>(a.add(f),()=>{a.delete(f)});let h;function u(f,p){const m=h,b={id:String(++i),dataset:f,source:p,createdAt:Rt(),parentId:m?.id,depth:m?m.depth+1:0};s.push(b)}let l=!1;function d(){if(l)return;l=!0;let f=0;try{for(;o<s.length;){if(++f>t)throw new Error("Possible infinite signal loop detected");const p=s[o],m=h;h=p,e&&r(p);const b=Array.from(a);for(const g of b)try{g(...p.dataset)}catch(w){Ti(()=>{throw w})}h=m,o++}}finally{l=!1,o>=s.length&&(s.length=0,o=0)}}return{subscribe:c,once(f){const p=c((...m)=>{p(),f(...m)});return p},emit(...f){u(f),d()},emitFrom(f,...p){u(p,f),d()},clear(){a.clear()}}}function db(n={}){const{concurrency:t=1/0,maxWorkerRunTime:e=6e4}=n;let r=1/0;const s=()=>r===1/0||Rt()<r,i=O=>{r=Rt()+O,h()};let o=s()?0:1;const a=()=>o>0,c=()=>{o++},h=()=>{o>0&&o--,D()},u=()=>!a()&&!s(),l=async()=>{u()&&await ub()};let d=0,f=[];const p=new Set,m=new Set;let b=0,g=[],w=[];const x=()=>{b===0&&(g.forEach(O=>O()),g=[],f.length===0&&(w.forEach(O=>O()),w=[]))},v=O=>{if(O.signal){if(O.signal.aborted)return O.resultReject("Cancel by Aborted!"),O;O.abortHandler=()=>{O.resultReject("Cancel by Abort!"),f=f.filter(L=>L.id!==O.id),x()},O.signal.addEventListener("abort",O.abortHandler,{once:!0})}if(f.filter(L=>O.invalidates?.includes(L.id)).forEach(L=>{L.resultReject("Cancel by invalidates!")}),f=f.filter(L=>!O.invalidates?.includes(L.id)),O.fold){const L=f.findIndex($=>$.id===O.id);if(L!==-1){const $=f[L],j=O.fold($,O);return $.dataset=j.dataset,$}else return f.push(O),O}else return f.push(O),O},E=()=>{if(f.length===0)return;let O=-1,L;for(let $=0,j=f.length;$<j;$++){const Q=f[$];(!L||Q.niceness<L.niceness)&&(O=$,L=Q)}return f.splice(O,1),L};let _=!1;const D=()=>{_||a()||(_=!0,Ti(()=>{for(_=!1;f.length>0&&m.size>0&&b<t&&!a();){const O=E(),L=k1(O.deadline)&&Rt()>=O.deadline,$=O.niceness==yi.immediate;if(!s()&&!L&&!$){v(O),D();break}if(O.signal?.aborted){O.resultReject("Cancel by Aborted!"),x();continue}b++;const j=m.values().next().value;m.delete(j),nb(ff(Promise.resolve(j(...O.dataset)),e),O.signal).then(Q=>{O.resultResolve(Q)}).catch(Q=>{O.retry>0?(O.retry--,v(O)):O.resultReject(Q)}).finally(async()=>{p.has(j)&&m.add(j),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),b--,x(),D()})}}))},z=O=>(p.add(O),m.add(O),D(),()=>{p.delete(O),m.delete(O)});return{put(...O){const L=O[O.length-1]||{};let $={};("niceness"in L||"deadline"in L||"retry"in L||"signal"in L||"invalidates"in L||"fold"in L)&&($=O.pop());const j=tb(),Q=v({id:String(++d),dataset:O,createdAt:Rt(),result:j.promise,resultResolve:j.resolve,resultReject:j.reject,niceness:$.niceness??yi.normal,deadline:$.deadline??Ta,retry:$.retry??0,signal:$.signal});return D(),Q},cancel(O){f=f.filter(L=>L.id!==O.id),O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),x()},clear(){for(const O of f)O.signal&&O.abortHandler&&O.signal.removeEventListener("abort",O.abortHandler),O.resultReject(new Error("Cleared"));f.length=0,x()},run:z,once(O){const L=z((...$)=>{try{return O(...$)}finally{L()}});return L},async onDrain(){if(!(b===0&&f.length===0))return new Promise(O=>{w.push(O)})},async onIdle(){if(b!==0)return new Promise(O=>{g.push(O)})},pause:c,resume:h,get paused(){return a()},startFrame:i,yieldIfNeeded:l}}class mb{pool;concurrency;maxWorkerRunTime;constructor(t={concurrency:1}){this.concurrency=t.concurrency??1,this.maxWorkerRunTime=t.maxWorkerRunTime??6e4,this.pool=db({concurrency:this.concurrency,maxWorkerRunTime:this.maxWorkerRunTime});for(let e=0;e<this.concurrency;e++)this.pool.run(async function(r){return await r()})}cancel(t){this.pool.cancel(t)}clear(){this.pool.clear()}get paused(){return this.pool.paused}startFrame(t){this.pool.startFrame(t)}async immediate(t){try{return this.pool.pause(),await this.pool.onIdle(),await ff(Promise.resolve(t()),this.maxWorkerRunTime)}finally{this.pool.resume()}}asap(t,e){return this.pool.put(t,{niceness:e?.niceness??yi.normal,deadline:typeof e?.timeout=="number"?Rt()+e?.timeout:Ta})}}class pb{pool;started=!1;constructor(t={concurrency:1}){this.pool=new mb(t),this.pool.startFrame(0)}clear(){this.pool.clear()}start(){this.started||(this.started=!0,bf(t=>{this.pool.startFrame(t-Rt())}))}async idle(t,e){return this.start(),await this.pool.asap(t,{niceness:yi.idle,timeout:e}).result}}const vf=new pb,gb=vf.idle.bind(vf);class Va{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e,r){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(r?e.bind(r):e),this}addListener(t,e,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r?e.bind(r):e),this}on(t,e,r){return this.addListener(t,e,r),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(r=>r!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(r=>{r(...e)}),this}once(t,e,r){const s=(...i)=>{r?e.apply(r,i):e(...i),this.off(t,s)};return this.on(t,s),this}}var Fa=function(n,t){return Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},Fa(n,t)};function Ba(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fa(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function wf(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $a(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function Ua(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function cn(n){return typeof n=="function"}function yb(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ya=yb(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
12
12
  `+t.map(function(e,r){return r+1+") "+e.toString()}).join(`
13
- `):"",this.name="UnsubscriptionError",this.errors=t}});function wf(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var ja=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=vf(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(cn(u))try{u()}catch(m){i=m instanceof Ya?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=vf(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Sf(p)}catch(m){i=i??[],m instanceof Ya?i=Ua(Ua([],$a(i)),$a(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new Ya(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Sf(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&wf(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&wf(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}();ja.EMPTY;function xf(n){return n instanceof ja||n&&"closed"in n&&cn(n.remove)&&cn(n.add)&&cn(n.unsubscribe)}function Sf(n){cn(n)?n():n.unsubscribe()}var _f={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yb={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,Ua([n,t],$a(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function bb(n){yb.setTimeout(function(){throw n})}function Ef(){}function vb(n){n()}var Ga=function(n){Ba(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,xf(e)&&e.add(r)):r.destination=_b,r}return t.create=function(e,r,s){return new Wa(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ja),wb=Function.prototype.bind;function Xa(n,t){return wb.call(n,t)}var xb=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){Mi(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){Mi(r)}else Mi(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Mi(e)}},n}(),Wa=function(n){Ba(t,n);function t(e,r,s){var i=n.call(this)||this,o;if(cn(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;i&&_f.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Xa(e.next,a),error:e.error&&Xa(e.error,a),complete:e.complete&&Xa(e.complete,a)}):o=e}return i.destination=new xb(o),i}return t}(Ga);function Mi(n){bb(n)}function Sb(n){throw n}var _b={closed:!0,next:Ef,error:Sb,complete:Ef},Eb=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Cb(n){return n}function Tb(n){return n.length===0?Cb:n.length===1?n[0]:function(t){return n.reduce(function(e,r){return r(e)},t)}}(function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=Ab(t)?t:new Wa(t,e,r);return vb(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Cf(e),new e(function(s,i){var o=new Wa({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Eb]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Tb(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Cf(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n})();function Cf(n){var t;return(t=n??_f.Promise)!==null&&t!==void 0?t:Promise}function Pb(n){return n&&cn(n.next)&&cn(n.error)&&cn(n.complete)}function Ab(n){return n&&n instanceof Ga||Pb(n)&&xf(n)}(function(n){Ba(t,n);function t(e,r,s,i,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(h){try{r(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=i?function(h){try{i(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ga);function Mb(){const n=Z.navigator?.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}Mb(),Z.document&&Z.document.documentMode&&Z.document.documentMode,Z.document&&Z.document.documentMode&&Z.document.documentMode,Z.document&&Z.document.documentMode&&Z.document.documentMode,!!(Z.Worker&&Z.Blob&&Z.Promise&&Z.OffscreenCanvas&&Z.OffscreenCanvasRenderingContext2D&&Z.HTMLCanvasElement&&Z.HTMLCanvasElement.prototype.transferControlToOffscreen&&Z.URL&&Z.URL.createObjectURL);const Db=(()=>{if(!Z.OffscreenCanvas)return!1;const n=new OffscreenCanvas(1,1),t=n.getContext("2d");if(!t)return!1;t.fillRect(0,0,1,1);const e=n.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0})(),Tf=Z.crypto;Tf?.subtle;function Pf(){try{return Tf.randomUUID()}catch{let n=new Date().getTime();return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?e:e&3|8).toString(16)})}}const Ob="\uFEFF";function Ib(n){return n.startsWith(Ob)?n.slice(1):n}function Rb(n){try{return{ok:!0,value:JSON.parse(Ib(n))}}catch{return{ok:!1}}}Z1(Rb,{createCache:()=>new Ra({max:50}),cacheKeyResolver:n=>n});const Ha=10,Af=(n=0)=>t=>`\x1B[${t+n}m`,Mf=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,Df=(n=0)=>(t,e,r)=>`\x1B[${38+n};2;${t};${e};${r}m`,Ot={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ot.modifier);const kb=Object.keys(Ot.color),Lb=Object.keys(Ot.bgColor);[...kb,...Lb];function Nb(){const n=new Map;for(const[t,e]of Object.entries(Ot)){for(const[r,s]of Object.entries(e))Ot[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},e[r]=Ot[r],n.set(s[0],s[1]);Object.defineProperty(Ot,t,{value:e,enumerable:!1})}return Object.defineProperty(Ot,"codes",{value:n,enumerable:!1}),Ot.color.close="\x1B[39m",Ot.bgColor.close="\x1B[49m",Ot.color.ansi=Af(),Ot.color.ansi256=Mf(),Ot.color.ansi16m=Df(),Ot.bgColor.ansi=Af(Ha),Ot.bgColor.ansi256=Mf(Ha),Ot.bgColor.ansi16m=Df(Ha),Object.defineProperties(Ot,{rgbToAnsi256:{value(t,e,r){return t===e&&e===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[r]=e;r.length===3&&(r=[...r].map(i=>i+i).join(""));const s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>Ot.rgbToAnsi256(...Ot.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,r,s;if(t>=232)e=((t-232)*10+8)/255,r=e,s=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,r=Math.floor(a/6)/5,s=a%6/5}const i=Math.max(e,r,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(e));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,r)=>Ot.ansi256ToAnsi(Ot.rgbToAnsi256(t,e,r)),enumerable:!1},hexToAnsi:{value:t=>Ot.ansi256ToAnsi(Ot.hexToAnsi256(t)),enumerable:!1}}),Ot}const zb=Nb(),Vb=0;new Set(zb.codes.values()).delete(Vb);const hs={1:"rgb(10,194,210)",2:"rgb(123,183,250)",3:"rgb(96,215,169)",4:"rgb(253,193,98)",5:"rgb(253,106,98)",6:"rgb(246,141,187)",7:"rgb(38,204,255)",8:"rgb(162,90,253)",9:"rgb(255,94,126)",10:"rgb(136,255,90)",11:"rgb(252,255,66)",12:"rgb(255,166,45)",13:"rgb(255,54,255)",14:"rgb(220,73,22)",15:"rgb(104,113,177)",16:"rgb(209,185,53)",17:"rgb(27,188,155)",18:"rgb(255,127,80)",19:"rgb(75,191,195)",20:"rgb(255,153,0)",black:"rgb(0,0,0)",blue:"rgb(0,0,255)",brightblue:"rgb(59,142,234)",terminalblue:"rgb(36,114,200)",red:"rgb(255,0,0)",brightred:"rgb(241,76,76)",terminalred:"rgb(205,49,49)",white:"rgb(255,255,255)",terminalwhite:"rgb(229,229,229)",yellow:"rgb(255,255,0)",brightyellow:"rgb(245,245,67)",terminalyellow:"rgb(229,229,16)",yellowgreen:"rgb(154,205,50)",aliceblue:"rgb(240,248,255)",antiquewhite:"rgb(250,235,215)",aqua:"rgb(0,255,255)",aquamarine:"rgb(127,255,212)",azure:"rgb(240,255,255)",beige:"rgb(245,245,220)",bisque:"rgb(255,228,196)",blanchedalmond:"rgb(255,235,205)",blueviolet:"rgb(138,43,226)",brown:"rgb(165,42,42)",burlywood:"rgb(222,184,135)",cadetblue:"rgb(95,158,160)",chartreuse:"rgb(127,255,0)",chocolate:"rgb(210,105,30)",coral:"rgb(255,127,80)",cornflowerblue:"rgb(100,149,237)",cornsilk:"rgb(255,248,220)",crimson:"rgb(220,20,60)",cyan:"rgb(0,255,255)",brightcyan:"rgb(41,184,219)",terminalcyan:"rgb(17,168,205)",darkblue:"rgb(0,0,139)",darkcyan:"rgb(0,139,139)",darkgoldenrod:"rgb(184,134,11)",darkgray:"rgb(169,169,169)",darkgreen:"rgb(0,100,0)",darkgrey:"rgb(30,30,30)",darkkhaki:"rgb(189,183,107)",darkmagenta:"rgb(139,0,139)",darkolivegreen:"rgb(85,107,47)",darkorange:"rgb(255,140,0)",darkorchid:"rgb(153,50,204)",darkred:"rgb(139,0,0)",darksalmon:"rgb(233,150,122)",darkseagreen:"rgb(143,188,143)",darkslateblue:"rgb(72,61,139)",darkslategray:"rgb(47,79,79)",darkslategrey:"rgb(47,79,79)",darkturquoise:"rgb(0,206,209)",darkviolet:"rgb(148,0,211)",deeppink:"rgb(255,20,147)",deepskyblue:"rgb(0,191,255)",dimgray:"rgb(105,105,105)",dodgerblue:"rgb(30,144,255)",firebrick:"rgb(178,34,34)",floralwhite:"rgb(255,250,240)",forestgreen:"rgb(34,139,34)",fuchsia:"rgb(255,0,255)",gainsboro:"rgb(220,220,220)",ghostwhite:"rgb(248,248,255)",gold:"rgb(255,215,0)",goldenrod:"rgb(218,165,32)",grey:"rgb(128,128,128)",green:"rgb(0,128,0)",brightgreen:"rgb(35,209,139)",terminalgreen:"rgb(13,188,121)",greenyellow:"rgb(173,255,47)",honeydew:"rgb(240,255,240)",hotpink:"rgb(255,105,180)",indianred:"rgb(205,92,92)",indigo:"rgb(75,0,130)",ivory:"rgb(255,255,240)",khaki:"rgb(240,230,140)",lavender:"rgb(230,230,250)",lavenderblush:"rgb(255,240,245)",lawngreen:"rgb(124,252,0)",lemonchiffon:"rgb(255,250,205)",lightblue:"rgb(173,216,230)",lightcoral:"rgb(240,128,128)",lightcyan:"rgb(224,255,255)",lightgoldenrodyellow:"rgb(250,250,210)",lightgreen:"rgb(144,238,144)",lightgrey:"rgb(229,229,229)",lightpink:"rgb(255,182,193)",lightsalmon:"rgb(255,160,122)",lightseagreen:"rgb(32,178,170)",lightskyblue:"rgb(135,206,250)",lightslategray:"rgb(119,136,153)",lightslategrey:"rgb(119,136,153)",lightsteelblue:"rgb(176,196,222)",lightyellow:"rgb(255,255,224)",lime:"rgb(0,255,0)",limegreen:"rgb(50,205,50)",linen:"rgb(250,240,230)",magenta:"rgb(255,0,255)",brightmagenta:"rgb(214,112,214)",terminalmagenta:"rgb(188,63,188)",maroon:"rgb(128,0,0)",mediumaquamarine:"rgb(102,205,170)",mediumblue:"rgb(0,0,205)",mediumorchid:"rgb(186,85,211)",mediumpurple:"rgb(147,112,219)",mediumseagreen:"rgb(60,179,113)",mediumslateblue:"rgb(123,104,238)",mediumspringgreen:"rgb(0,250,154)",mediumturquoise:"rgb(72,209,204)",mediumvioletred:"rgb(199,21,133)",midnightblue:"rgb(25,25,112)",mintcream:"rgb(245,255,250)",mistyrose:"rgb(255,228,225)",moccasin:"rgb(255,228,181)",navajowhite:"rgb(255,222,173)",navy:"rgb(0,0,128)",oldlace:"rgb(253,245,230)",olive:"rgb(128,128,0)",olivedrab:"rgb(107,142,35)",orange:"rgb(255,165,0)",orangered:"rgb(255,69,0)",orchid:"rgb(218,112,214)",palegoldenrod:"rgb(238,232,170)",palegreen:"rgb(152,251,152)",paleturquoise:"rgb(175,238,238)",palevioletred:"rgb(219,112,147)",papayawhip:"rgb(255,239,213)",peachpuff:"rgb(255,218,185)",peru:"rgb(205,133,63)",pink:"rgb(255,192,203)",plum:"rgb(221,160,221)",powderblue:"rgb(176,224,230)",purple:"rgb(128,0,128)",rebeccapurple:"rgb(102,51,153)",rosybrown:"rgb(188,143,143)",royalblue:"rgb(65,105,225)",saddlebrown:"rgb(139,69,19)",salmon:"rgb(250,128,114)",sandybrown:"rgb(244,164,96)",seagreen:"rgb(46,139,87)",seashell:"rgb(255,245,238)",sienna:"rgb(160,82,45)",silver:"rgb(192,192,192)",skyblue:"rgb(135,206,235)",slateblue:"rgb(106,90,205)",slategray:"rgb(112,128,144)",slategrey:"rgb(112,128,144)",snow:"rgb(255,250,250)",springgreen:"rgb(0,255,127)",steelblue:"rgb(70,130,180)",tan:"rgb(210,180,140)",teal:"rgb(0,128,128)",thistle:"rgb(216,191,216)",tomato:"rgb(255,99,71)",turquoise:"rgb(64,224,208)",violet:"rgb(238,130,238)",wheat:"rgb(245,222,179)"},Fb=Array.from(Object.values(hs));Object.entries(hs).map(([n,t])=>{const e=t;return{name:n,rgb:e,brightness:Bb(e)}}).sort((n,t)=>n.brightness-t.brightness);function Bb(n){const[t,e,r]=n.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*r}class Ne{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color Set Unknown Error: color(${t}) type(${typeof t})`;if(t instanceof Ne)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let r;if(r=/^(\w+)\(([^)]*)\)/.exec(t)){const s=r[2];let i;switch(r[1]){case"rgb":case"rgba":(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(this.r=parseInt(i[1],10),this.g=parseInt(i[2],10),this.b=parseInt(i[3],10),this.a=i[4]?parseFloat(i[4]):1):(i=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(this.r=st(parseFloat(i[1]),0,100)*255/100,this.g=st(parseFloat(i[2]),0,100)*255/100,this.b=st(parseFloat(i[3]),0,100)*255/100,this.a=i[4]?parseFloat(i[4]):1):De(e);break;case"hsl":case"hsla":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):De(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSV(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):De(e);break;default:De(e)}}else if(r=/#([A-Fa-f0-9]+)/.exec(t)){const s=r[1],i=s.length;i===3?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),1):i===4?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),st(parseInt(s.charAt(3),16)/16,0,1)):i===6||i===8?this.setHEX(parseInt(s,16)):De(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{De(e)}else De(e)}else Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):De(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){this._color.r=st(Math.round(Me(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=st(Math.round(Me(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=st(Math.round(Me(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=st(Me(t,this.a),0,1)}setAlpha(t){return this.a=t,this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${at(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Ne(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Ka(t.r),this.g=Ka(t.g),this.b=Ka(t.b),this}copyLinearToSRGB(t){return this.r=Ja(t.r),this.g=Ja(t.g),this.b=Ja(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",r="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:r);{const{r:s,g:i,b:o}=this.color;return this.r=255-s,this.g=255-i,this.b=255-o,this}}closet(t="#000000",e="#ffffff"){return this.opposite(!0,t,e).opposite(!0,t,e)}lighten(t){t=st(t,0,1);const{r:e,g:r,b:s,a:i}=this.color;return i==0?this.a=t:(this.r=e+(255-e)*t,this.g=r+(255-r)*t,this.b=s+(255-s)*t),this}darken(t){t=st(t,0,1);const{r:e,g:r,b:s,a:i}=this.color;return i==0?this.a=t:(this.r=e*(1-t),this.g=r*(1-t),this.b=s*(1-t)),this}lerp(t,e){e=st(e,0,1);const{r,g:s,b:i}=this.color;return this.r=r+(t.r-r)*e,this.g=s+(t.g-s)*e,this.b=i+(t.b-i)*e,this}lerpColors(t,e,r){return r=st(r,0,1),this.r=t.r+(e.r-t.r)*r,this.g=t.g+(e.g-t.g)*r,this.b=t.b+(e.b-t.b)*r,this}static gradient(t,e,r){try{return qa.lerpColors(new Ne(t),new Ne(e),r).toString()}catch{return e}}static random(){return qa.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Ne.nextIndex){Ne.nextIndex=t;const e=Object.keys(hs),r=e.length;return qa.set(hs[e[Ne.nextIndex++%r]]).toString()}setColorName(t){const e=hs[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,De("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,r,s=1){return this.r=t,this.g=e,this.b=r,this.a=s,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,r,s=1){const i=z1(t,1),o=st(e,0,1),a=st(r,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=Za(h,c,i+1/3)*255,this.g=Za(h,c,i)*255,this.b=Za(h,c,i-1/3)*255}return this.a=s,this}getHSL(t){const e=this.r,r=this.g,s=this.b,i=Math.max(e,r,s)/255,o=Math.min(e,r,s)/255;let a,c;const h=(o+i)/2;if(o===i)a=0,c=0;else{const u=i-o;switch(c=h<=.5?u/(i+o):u/(2-i-o),i){case e:a=(r-s)/u+(r<s?6:0);break;case r:a=(s-e)/u+2;break;case s:default:a=(e-r)/u+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,r){const s=this.getHSL();return this.setHSL(s.h+t,s.s+e,s.l+r)}lerpHSL(t,e){const r=this.getHSL(),s=t.getHSL(),i=Si(r.h,s.h,e),o=Si(r.s,s.s,e),a=Si(r.l,s.l,e);return this.setHSL(i,o,a),this}setHSV(t,e,r,s=1){const i=st(t,0,1)*360,o=st(e,0,1),a=st(r,0,1),c=Math.floor(i/60)%6,h=i/60-Math.floor(i/60),u=a*(1-o),l=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,u],[l,a,u],[u,a,d],[u,l,a],[d,u,a],[a,u,l]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=s,this}setHSB(t,e,r,s=1){this.setHSV(t,e,r,s)}getHSV(t){const{r:e,g:r,b:s,a:i}=this.color,o=Math.max(e,r,s),a=Math.min(e,r,s),c=o-a;let h;e===o?h=(r-s)/c:r===o?h=2+(s-e)/c:h=4+(e-r)/c,h/=6,h<0&&(h+=1);const u=c==0?0:h,l=o===0?0:c/o,d=o/255;return t&&t.setHSV(u,l,d,i),{h:u,s:l,v:d,a:i}}getHSB(t){const{h:e,s:r,v:s,a:i}=this.getHSV(t);return{h:e,s:r,b:s,a:i}}}const qa=new Ne;function Ka(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Ja(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function Za(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}function $b(n=window.location.href,t){try{return new URL(n,t)}catch{const e="(?<protocol>https?:)",r="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",s="(?<pathname>(?:\\/[^/#?]+)*\\/?)",i="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${r}${s}${i}${o}$`).exec(n);return{href:n,protocol:a?.groups?.protocol||"",host:a?.groups?.host||"",hostname:a?.groups?.hostname||"",port:a?.groups?.port||"",pathname:a?.groups?.pathname||"",search:a?.groups?.search||"",hash:a?.groups?.hash||""}}}function Ub(n=window.location.href){const t=$b(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Yb(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function jb(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function Gb(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function wt(n){return n*Math.PI/180}function ee(n){return n*180/Math.PI}function Qa(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function tr(n,t,e,r){return Qa(e-n,r-t)}function ze(n,t,e,r){let s=Math.atan2(r-t,e-n);return s<0&&(s+=Math.PI*2),s}function er(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function Of(n,t){return function(){return n.apply(t,arguments)}}const{toString:Xb}=Object.prototype,{getPrototypeOf:tc}=Object,Di=(n=>t=>{const e=Xb.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=n=>(n=n.toLowerCase(),t=>Di(t)===n),Oi=n=>t=>typeof t===n,{isArray:Mr}=Array,us=Oi("undefined");function Wb(n){return n!==null&&!us(n)&&n.constructor!==null&&!us(n.constructor)&&we(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const If=Ve("ArrayBuffer");function Hb(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&If(n.buffer),t}const qb=Oi("string"),we=Oi("function"),Rf=Oi("number"),Ii=n=>n!==null&&typeof n=="object",Kb=n=>n===!0||n===!1,Ri=n=>{if(Di(n)!=="object")return!1;const t=tc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Jb=Ve("Date"),Zb=Ve("File"),Qb=Ve("Blob"),tv=Ve("FileList"),ev=n=>Ii(n)&&we(n.pipe),nv=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||we(n.append)&&((t=Di(n))==="formdata"||t==="object"&&we(n.toString)&&n.toString()==="[object FormData]"))},rv=Ve("URLSearchParams"),[sv,iv,ov,av]=["ReadableStream","Request","Response","Headers"].map(Ve),cv=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ls(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),Mr(n))for(r=0,s=n.length;r<s;r++)t.call(null,n[r],r,n);else{const i=e?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,n[a],a,n)}}function kf(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,s;for(;r-- >0;)if(s=e[r],t===s.toLowerCase())return s;return null}const nr=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Lf=n=>!us(n)&&n!==nr;function ec(){const{caseless:n}=Lf(this)&&this||{},t={},e=(r,s)=>{const i=n&&kf(t,s)||s;Ri(t[i])&&Ri(r)?t[i]=ec(t[i],r):Ri(r)?t[i]=ec({},r):Mr(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ls(arguments[r],e);return t}const hv=(n,t,e,{allOwnKeys:r}={})=>(ls(t,(s,i)=>{e&&we(s)?n[i]=Of(s,e):n[i]=s},{allOwnKeys:r}),n),uv=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),lv=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},fv=(n,t,e,r)=>{let s,i,o;const a={};if(t=t||{},n==null)return t;do{for(s=Object.getOwnPropertyNames(n),i=s.length;i-- >0;)o=s[i],(!r||r(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&tc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},dv=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},mv=n=>{if(!n)return null;if(Mr(n))return n;let t=n.length;if(!Rf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},pv=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&tc(Uint8Array)),gv=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},yv=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},bv=Ve("HTMLFormElement"),vv=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Nf=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),wv=Ve("RegExp"),zf=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};ls(e,(s,i)=>{let o;(o=t(s,i,n))!==!1&&(r[i]=o||s)}),Object.defineProperties(n,r)},xv=n=>{zf(n,(t,e)=>{if(we(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(we(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Sv=(n,t)=>{const e={},r=s=>{s.forEach(i=>{e[i]=!0})};return Mr(n)?r(n):r(String(n).split(t)),e},_v=()=>{},Ev=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Cv(n){return!!(n&&we(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Tv=n=>{const t=new Array(10),e=(r,s)=>{if(Ii(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Mr(r)?[]:{};return ls(r,(o,a)=>{const c=e(o,s+1);!us(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return e(n,0)},Pv=Ve("AsyncFunction"),Av=n=>n&&(Ii(n)||we(n))&&we(n.then)&&we(n.catch),Vf=((n,t)=>n?setImmediate:t?((e,r)=>(nr.addEventListener("message",({source:s,data:i})=>{s===nr&&i===e&&r.length&&r.shift()()},!1),s=>{r.push(s),nr.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",we(nr.postMessage)),Mv=typeof queueMicrotask<"u"?queueMicrotask.bind(nr):typeof process<"u"&&process.nextTick||Vf,k={isArray:Mr,isArrayBuffer:If,isBuffer:Wb,isFormData:nv,isArrayBufferView:Hb,isString:qb,isNumber:Rf,isBoolean:Kb,isObject:Ii,isPlainObject:Ri,isReadableStream:sv,isRequest:iv,isResponse:ov,isHeaders:av,isUndefined:us,isDate:Jb,isFile:Zb,isBlob:Qb,isRegExp:wv,isFunction:we,isStream:ev,isURLSearchParams:rv,isTypedArray:pv,isFileList:tv,forEach:ls,merge:ec,extend:hv,trim:cv,stripBOM:uv,inherits:lv,toFlatObject:fv,kindOf:Di,kindOfTest:Ve,endsWith:dv,toArray:mv,forEachEntry:gv,matchAll:yv,isHTMLForm:bv,hasOwnProperty:Nf,hasOwnProp:Nf,reduceDescriptors:zf,freezeMethods:xv,toObjectSet:Sv,toCamelCase:vv,noop:_v,toFiniteNumber:Ev,findKey:kf,global:nr,isContextDefined:Lf,isSpecCompliantForm:Cv,toJSONObject:Tv,isAsyncFn:Pv,isThenable:Av,setImmediate:Vf,asap:Mv};function mt(n,t,e,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}k.inherits(mt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Ff=mt.prototype,Bf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Bf[n]={value:n}}),Object.defineProperties(mt,Bf),Object.defineProperty(Ff,"isAxiosError",{value:!0}),mt.from=(n,t,e,r,s,i)=>{const o=Object.create(Ff);return k.toFlatObject(n,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),mt.call(o,n.message,t,e,r,s),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const Dv=null;function nc(n){return k.isPlainObject(n)||k.isArray(n)}function $f(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function Uf(n,t,e){return n?n.concat(t).map(function(r,s){return r=$f(r),!e&&s?"["+r+"]":r}).join(e?".":""):t}function Ov(n){return k.isArray(n)&&!n.some(nc)}const Iv=k.toFlatObject(k,{},null,function(n){return/^is[A-Z]/.test(n)});function ki(n,t,e){if(!k.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=k.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!k.isUndefined(p[f])});const r=e.metaTokens,s=e.visitor||h,i=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(s))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(k.isDate(f))return f.toISOString();if(!a&&k.isBlob(f))throw new mt("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(f)||k.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function h(f,p,m){let b=f;if(f&&!m&&typeof f=="object"){if(k.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=JSON.stringify(f);else if(k.isArray(f)&&Ov(f)||(k.isFileList(f)||k.endsWith(p,"[]"))&&(b=k.toArray(f)))return p=$f(p),b.forEach(function(g,w){!(k.isUndefined(g)||g===null)&&t.append(o===!0?Uf([p],w,i):o===null?p:p+"[]",c(g))}),!1}return nc(f)?!0:(t.append(Uf(m,p,i),c(f)),!1)}const u=[],l=Object.assign(Iv,{defaultVisitor:h,convertValue:c,isVisitable:nc});function d(f,p){if(!k.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));u.push(f),k.forEach(f,function(m,b){(!(k.isUndefined(m)||m===null)&&s.call(t,m,k.isString(b)?b.trim():b,p,l))===!0&&d(m,p?p.concat(b):[b])}),u.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return d(n),t}function Yf(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function rc(n,t){this._pairs=[],n&&ki(n,this,t)}const jf=rc.prototype;jf.append=function(n,t){this._pairs.push([n,t])},jf.toString=function(n){const t=n?function(e){return n.call(this,e,Yf)}:Yf;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function Rv(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Gf(n,t,e){if(!t)return n;const r=e&&e.encode||Rv;k.isFunction(e)&&(e={serialize:e});const s=e&&e.serialize;let i;if(s?i=s(t,e):i=k.isURLSearchParams(t)?t.toString():new rc(t,e).toString(r),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class kv{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Xf=kv,Wf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lv=typeof URLSearchParams<"u"?URLSearchParams:rc,Nv=typeof FormData<"u"?FormData:null,zv=typeof Blob<"u"?Blob:null,Vv={isBrowser:!0,classes:{URLSearchParams:Lv,FormData:Nv,Blob:zv},protocols:["http","https","file","blob","url","data"]},sc=typeof window<"u"&&typeof document<"u",ic=typeof navigator=="object"&&navigator||void 0,Fv=sc&&(!ic||["ReactNative","NativeScript","NS"].indexOf(ic.product)<0),Bv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$v=sc&&window.location.href||"http://localhost",Uv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sc,hasStandardBrowserEnv:Fv,hasStandardBrowserWebWorkerEnv:Bv,navigator:ic,origin:$v},Symbol.toStringTag,{value:"Module"})),ne={...Uv,...Vv};function Yv(n,t){return ki(n,new ne.classes.URLSearchParams,Object.assign({visitor:function(e,r,s,i){return ne.isNode&&k.isBuffer(e)?(this.append(r,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function jv(n){return k.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gv(n){const t={},e=Object.keys(n);let r;const s=e.length;let i;for(r=0;r<s;r++)i=e[r],t[i]=n[i];return t}function Hf(n){function t(e,r,s,i){let o=e[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=i>=e.length;return o=!o&&k.isArray(s)?s.length:o,c?(k.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!k.isObject(s[o]))&&(s[o]=[]),t(e,r,s[o],i)&&k.isArray(s[o])&&(s[o]=Gv(s[o])),!a)}if(k.isFormData(n)&&k.isFunction(n.entries)){const e={};return k.forEachEntry(n,(r,s)=>{t(jv(r),s,e,0)}),e}return null}function Xv(n,t,e){if(k.isString(n))try{return(t||JSON.parse)(n),k.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const oc={transitional:Wf,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,s=k.isObject(n);if(s&&k.isHTMLForm(n)&&(n=new FormData(n)),k.isFormData(n))return r?JSON.stringify(Hf(n)):n;if(k.isArrayBuffer(n)||k.isBuffer(n)||k.isStream(n)||k.isFile(n)||k.isBlob(n)||k.isReadableStream(n))return n;if(k.isArrayBufferView(n))return n.buffer;if(k.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let i;if(s){if(e.indexOf("application/x-www-form-urlencoded")>-1)return Yv(n,this.formSerializer).toString();if((i=k.isFileList(n))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ki(i?{"files[]":n}:n,o&&new o,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),Xv(n)):n}],transformResponse:[function(n){const t=this.transitional||oc.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(k.isResponse(n)||k.isReadableStream(n))return n;if(n&&k.isString(n)&&(e&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(i){if(s)throw i.name==="SyntaxError"?mt.from(i,mt.ERR_BAD_RESPONSE,this,null,this.response):i}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ne.classes.FormData,Blob:ne.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],n=>{oc.headers[n]={}});const ac=oc,Wv=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hv=n=>{const t={};let e,r,s;return n&&n.split(`
14
- `).forEach(function(i){s=i.indexOf(":"),e=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!e||t[e]&&Wv[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},qf=Symbol("internals");function fs(n){return n&&String(n).trim().toLowerCase()}function Li(n){return n===!1||n==null?n:k.isArray(n)?n.map(Li):String(n)}function qv(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const Kv=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function cc(n,t,e,r,s){if(k.isFunction(r))return r.call(this,t,e);if(s&&(t=e),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function Jv(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function Zv(n,t){const e=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class Ni{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function i(a,c,h){const u=fs(c);if(!u)throw new Error("header name must be a non-empty string");const l=k.findKey(s,u);(!l||s[l]===void 0||h===!0||h===void 0&&s[l]!==!1)&&(s[l||c]=Li(a))}const o=(a,c)=>k.forEach(a,(h,u)=>i(h,u,c));if(k.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(k.isString(t)&&(t=t.trim())&&!Kv(t))o(Hv(t),e);else if(k.isHeaders(t))for(const[a,c]of t.entries())i(c,a,r);else t!=null&&i(e,t,r);return this}get(t,e){if(t=fs(t),t){const r=k.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return qv(s);if(k.isFunction(e))return e.call(this,s,r);if(k.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=fs(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||cc(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function i(o){if(o=fs(o),o){const a=k.findKey(r,o);a&&(!e||cc(r,r[a],a,e))&&(delete r[a],s=!0)}}return k.isArray(t)?t.forEach(i):i(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const i=e[r];(!t||cc(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const e=this,r={};return k.forEach(this,(s,i)=>{const o=k.findKey(r,i);if(o){e[o]=Li(s),delete e[i];return}const a=t?Jv(i):String(i).trim();a!==i&&delete e[i],e[a]=Li(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return k.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&k.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
15
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[qf]=this[qf]={accessors:{}}).accessors,r=this.prototype;function s(i){const o=fs(i);e[o]||(Zv(r,i),e[o]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}}Ni.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(Ni.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),k.freezeMethods(Ni);const Fe=Ni;function hc(n,t){const e=this||ac,r=t||e,s=Fe.from(r.headers);let i=r.data;return k.forEach(n,function(o){i=o.call(e,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Kf(n){return!!(n&&n.__CANCEL__)}function Dr(n,t,e){mt.call(this,n??"canceled",mt.ERR_CANCELED,t,e),this.name="CanceledError"}k.inherits(Dr,mt,{__CANCEL__:!0});function Jf(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new mt("Request failed with status code "+e.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Qv(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function tw(n,t){n=n||10;const e=new Array(n),r=new Array(n);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=r[i];o||(o=c),e[s]=a,r[s]=c;let u=i,l=0;for(;u!==s;)l+=e[u++],u=u%n;if(s=(s+1)%n,s===i&&(i=(i+1)%n),c-o<t)return;const d=h&&c-h;return d?Math.round(l*1e3/d):void 0}}function ew(n,t){let e=0,r=1e3/t,s,i;const o=(a,c=Date.now())=>{e=c,s=null,i&&(clearTimeout(i),i=null),n.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=r?o(a,c):(s=a,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const zi=(n,t,e=3)=>{let r=0;const s=tw(50,250);return ew(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-r,h=s(c),u=o<=a;r=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&u?(a-o)/h:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(l)},e)},Zf=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Qf=n=>(...t)=>k.asap(()=>n(...t)),nw=ne.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,ne.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(ne.origin),ne.navigator&&/(msie|trident)/i.test(ne.navigator.userAgent)):()=>!0,rw=ne.hasStandardBrowserEnv?{write(n,t,e,r,s,i){const o=[n+"="+encodeURIComponent(t)];k.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),k.isString(r)&&o.push("path="+r),k.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function iw(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function td(n,t,e){let r=!sw(t);return n&&(r||e==!1)?iw(n,t):t}const ed=n=>n instanceof Fe?{...n}:n;function rr(n,t){t=t||{};const e={};function r(h,u,l,d){return k.isPlainObject(h)&&k.isPlainObject(u)?k.merge.call({caseless:d},h,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function s(h,u,l,d){if(k.isUndefined(u)){if(!k.isUndefined(h))return r(void 0,h,l,d)}else return r(h,u,l,d)}function i(h,u){if(!k.isUndefined(u))return r(void 0,u)}function o(h,u){if(k.isUndefined(u)){if(!k.isUndefined(h))return r(void 0,h)}else return r(void 0,u)}function a(h,u,l){if(l in t)return r(h,u);if(l in n)return r(void 0,h)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,u,l)=>s(ed(h),ed(u),l,!0)};return k.forEach(Object.keys(Object.assign({},n,t)),function(h){const u=c[h]||s,l=u(n[h],t[h],h);k.isUndefined(l)&&u!==a||(e[h]=l)}),e}const nd=n=>{const t=rr({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Fe.from(o),t.url=Gf(td(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(k.isFormData(e)){if(ne.hasStandardBrowserEnv||ne.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...u]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...u].join("; "))}}if(ne.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&nw(t.url))){const h=s&&i&&rw.read(i);h&&o.set(s,h)}return t},ow=typeof XMLHttpRequest<"u",aw=ow&&function(n){return new Promise(function(t,e){const r=nd(n);let s=r.data;const i=Fe.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=r,h,u,l,d,f;function p(){d&&d(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function b(){if(!m)return;const w=Fe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:w,config:n,request:m};Jf(function(v){t(v),p()},function(v){e(v),p()},x),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){m&&(e(new mt("Request aborted",mt.ECONNABORTED,n,m)),m=null)},m.onerror=function(){e(new mt("Network Error",mt.ERR_NETWORK,n,m)),m=null},m.ontimeout=function(){let w=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||Wf;r.timeoutErrorMessage&&(w=r.timeoutErrorMessage),e(new mt(w,x.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,n,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&k.forEach(i.toJSON(),function(w,x){m.setRequestHeader(x,w)}),k.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),o&&o!=="json"&&(m.responseType=r.responseType),c&&([l,f]=zi(c,!0),m.addEventListener("progress",l)),a&&m.upload&&([u,d]=zi(a),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(h=w=>{m&&(e(!w||w.type?new Dr(null,n,m):w),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const g=Qv(r.url);if(g&&ne.protocols.indexOf(g)===-1){e(new mt("Unsupported protocol "+g+":",mt.ERR_BAD_REQUEST,n));return}m.send(s||null)})},cw=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,s;const i=function(h){if(!s){s=!0,a();const u=h instanceof Error?h:this.reason;r.abort(u instanceof mt?u:new Dr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new mt(`timeout ${t} of ms exceeded`,mt.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(i):h.removeEventListener("abort",i)}),n=null)};n.forEach(h=>h.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>k.asap(a),c}},hw=cw,uw=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let r=0,s;for(;r<e;)s=r+t,yield n.slice(r,s),r=s},lw=async function*(n,t){for await(const e of fw(n))yield*uw(e,t)},fw=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},rd=(n,t,e,r)=>{const s=lw(n,t);let i=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await s.next();if(h){a(),c.close();return}let l=u.byteLength;if(e){let d=i+=l;e(d)}c.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},Vi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",sd=Vi&&typeof ReadableStream=="function",dw=Vi&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),id=(n,...t)=>{try{return!!n(...t)}catch{return!1}},mw=sd&&id(()=>{let n=!1;const t=new Request(ne.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),od=64*1024,uc=sd&&id(()=>k.isReadableStream(new Response("").body)),Fi={stream:uc&&(n=>n.body)};Vi&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fi[t]&&(Fi[t]=k.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new mt(`Response type '${t}' is not supported`,mt.ERR_NOT_SUPPORT,r)})})})(new Response);const pw=async n=>{if(n==null)return 0;if(k.isBlob(n))return n.size;if(k.isSpecCompliantForm(n))return(await new Request(ne.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(k.isArrayBufferView(n)||k.isArrayBuffer(n))return n.byteLength;if(k.isURLSearchParams(n)&&(n=n+""),k.isString(n))return(await dw(n)).byteLength},gw=async(n,t)=>k.toFiniteNumber(n.getContentLength())??pw(t),yw=Vi&&(async n=>{let{url:t,method:e,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:u,withCredentials:l="same-origin",fetchOptions:d}=nd(n);h=h?(h+"").toLowerCase():"text";let f=hw([s,i&&i.toAbortSignal()],o),p;const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let b;try{if(c&&mw&&e!=="get"&&e!=="head"&&(b=await gw(u,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(k.isFormData(r)&&(_=E.headers.get("content-type"))&&u.setContentType(_),E.body){const[D,z]=Zf(b,zi(Qf(c)));r=rd(E.body,od,D,z)}}k.isString(l)||(l=l?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?l:void 0});let w=await fetch(p);const x=uc&&(h==="stream"||h==="response");if(uc&&(a||x&&m)){const E={};["status","statusText","headers"].forEach(O=>{E[O]=w[O]});const _=k.toFiniteNumber(w.headers.get("content-length")),[D,z]=a&&Zf(_,zi(Qf(a),!0))||[];w=new Response(rd(w.body,od,D,()=>{z&&z(),m&&m()}),E)}h=h||"text";let v=await Fi[k.findKey(Fi,h)||"text"](w,n);return!x&&m&&m(),await new Promise((E,_)=>{Jf(E,_,{data:v,headers:Fe.from(w.headers),status:w.status,statusText:w.statusText,config:n,request:p})})}catch(g){throw m&&m(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new mt("Network Error",mt.ERR_NETWORK,n,p),{cause:g.cause||g}):mt.from(g,g&&g.code,n,p)}}),lc={http:Dv,xhr:aw,fetch:yw};k.forEach(lc,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const ad=n=>`- ${n}`,bw=n=>k.isFunction(n)||n===null||n===!1,cd={getAdapter:n=>{n=k.isArray(n)?n:[n];const{length:t}=n;let e,r;const s={};for(let i=0;i<t;i++){e=n[i];let o;if(r=e,!bw(e)&&(r=lc[(o=String(e)).toLowerCase()],r===void 0))throw new mt(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
16
- `+i.map(ad).join(`
17
- `):" "+ad(i[0]):"as no adapter specified";throw new mt("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:lc};function fc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Dr(null,n)}function hd(n){return fc(n),n.headers=Fe.from(n.headers),n.data=hc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),cd.getAdapter(n.adapter||ac.adapter)(n).then(function(t){return fc(n),t.data=hc.call(n,n.transformResponse,t),t.headers=Fe.from(t.headers),t},function(t){return Kf(t)||(fc(n),t&&t.response&&(t.response.data=hc.call(n,n.transformResponse,t.response),t.response.headers=Fe.from(t.response.headers))),Promise.reject(t)})}const ud="1.8.4",Bi={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Bi[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const ld={};Bi.transitional=function(n,t,e){function r(s,i){return"[Axios v"+ud+"] Transitional option '"+s+"'"+i+(e?". "+e:"")}return(s,i,o)=>{if(n===!1)throw new mt(r(i," has been removed"+(t?" in "+t:"")),mt.ERR_DEPRECATED);return t&&!ld[i]&&(ld[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(s,i,o):!0}},Bi.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function vw(n,t,e){if(typeof n!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new mt("option "+i+" must be "+c,mt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new mt("Unknown option "+i,mt.ERR_BAD_OPTION)}}const $i={assertOptions:vw,validators:Bi},qe=$i.validators;class Ui{constructor(t){this.defaults=t,this.interceptors={request:new Xf,response:new Xf}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
18
- `+i):r.stack=i}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=rr(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:i}=e;r!==void 0&&$i.assertOptions(r,{silentJSONParsing:qe.transitional(qe.boolean),forcedJSONParsing:qe.transitional(qe.boolean),clarifyTimeoutError:qe.transitional(qe.boolean)},!1),s!=null&&(k.isFunction(s)?e.paramsSerializer={serialize:s}:$i.assertOptions(s,{encode:qe.function,serialize:qe.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),$i.assertOptions(e,{baseUrl:qe.spelling("baseURL"),withXsrfToken:qe.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&k.merge(i.common,i[e.method]);i&&k.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Fe.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const h=[];this.interceptors.response.forEach(function(p){h.push(p.fulfilled,p.rejected)});let u,l=0,d;if(!c){const p=[hd.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,u=Promise.resolve(e);l<d;)u=u.then(p[l++],p[l++]);return u}d=a.length;let f=e;for(l=0;l<d;){const p=a[l++],m=a[l++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=hd.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,d=h.length;l<d;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=rr(this.defaults,t);const e=td(t.baseURL,t.url,t.allowAbsoluteUrls);return Gf(e,t.params,t.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(n){Ui.prototype[n]=function(t,e){return this.request(rr(e||{},{method:n,url:t,data:(e||{}).data}))}}),k.forEach(["post","put","patch"],function(n){function t(e){return function(r,s,i){return this.request(rr(i||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}Ui.prototype[n]=t(),Ui.prototype[n+"Form"]=t(!0)});const Yi=Ui;class dc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(s,i,o){r.reason||(r.reason=new Dr(s,i,o),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new dc(function(e){t=e}),cancel:t}}}const ww=dc;function xw(n){return function(t){return n.apply(null,t)}}function Sw(n){return k.isObject(n)&&n.isAxiosError===!0}const mc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mc).forEach(([n,t])=>{mc[t]=n});const _w=mc;function fd(n){const t=new Yi(n),e=Of(Yi.prototype.request,t);return k.extend(e,Yi.prototype,t,{allOwnKeys:!0}),k.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return fd(rr(n,r))},e}const Bt=fd(ac);Bt.Axios=Yi,Bt.CanceledError=Dr,Bt.CancelToken=ww,Bt.isCancel=Kf,Bt.VERSION=ud,Bt.toFormData=ki,Bt.AxiosError=mt,Bt.Cancel=Bt.CanceledError,Bt.all=function(n){return Promise.all(n)},Bt.spread=xw,Bt.isAxiosError=Sw,Bt.mergeConfig=rr,Bt.AxiosHeaders=Fe,Bt.formToJSON=n=>Hf(k.isHTMLForm(n)?new FormData(n):n),Bt.getAdapter=cd.getAdapter,Bt.HttpStatusCode=_w,Bt.default=Bt;const Ew=Bt;class Cw{instance;constructor(t){this.instance=Ew.create(t),this.instance.interceptors.request.use(e=>(t?.interceptors?.request?.(e),e),e=>(t?.interceptors?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(t?.interceptors?.response?.(e),e.status==200,Promise.resolve(e)),e=>(t?.interceptors?.responseError?.(e),Promise.reject(e)))}request(t){let e=!1;const r=this.instance.request;return r.cancel=()=>{e=!0},r(t).then(s=>{if(e)throw new Error("Canceled!");return s})}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,r){return this.request({...r,method:"post",url:t,data:e})}postFormData(t,e,r){return r={...r,headers:{...r?.headers,"Content-Type":"multipart/form-data"}},this.request({...r,method:"post",url:t,data:e})}postForm(t,e,r){return this.instance.postForm(t,e,{...r})}put(t,e,r){return this.request({...r,method:"put",url:t,data:e})}patch(t,e,r){return this.request({...r,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}function Tw(n,t=(e,r)=>e<=r){const e=n.length;let r=Math.floor(e/2);for(;r>0;){for(let s=r;s<e;s++){const i=n[s];let o=s;for(;o>=r&&!t(n[o-r],i);)n[o]=n[o-r],o-=r;n[o]=i}r=Math.floor(r/2)}}function ji(n,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,r=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function s(o,a=!1){return E1(o)||nf(o)||Ql(o)?{value:o,timestamp:Pr()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:Pr()}}let i=s(n,!0);return{get:()=>{let o=!1;return(e>=0&&Pr()>Me(i.timestamp,0)+e*1e3||r>=0&&Pr()>r)&&(o=!0),o&&(i.value=void 0),i},set:o=>i=s(o,!1)}}function pc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Pw(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),e}var dd={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(g,w){var x=g[0],v=g[1],E=g[2],_=g[3];x+=(v&E|~v&_)+w[0]-680876936|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[1]-389564586|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[2]+606105819|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[3]-1044525330|0,v=(v<<22|v>>>10)+E|0,x+=(v&E|~v&_)+w[4]-176418897|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[5]+1200080426|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[6]-1473231341|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[7]-45705983|0,v=(v<<22|v>>>10)+E|0,x+=(v&E|~v&_)+w[8]+1770035416|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[9]-1958414417|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[10]-42063|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[11]-1990404162|0,v=(v<<22|v>>>10)+E|0,x+=(v&E|~v&_)+w[12]+1804603682|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[13]-40341101|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[14]-1502002290|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[15]+1236535329|0,v=(v<<22|v>>>10)+E|0,x+=(v&_|E&~_)+w[1]-165796510|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[6]-1069501632|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[11]+643717713|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[0]-373897302|0,v=(v<<20|v>>>12)+E|0,x+=(v&_|E&~_)+w[5]-701558691|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[10]+38016083|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[15]-660478335|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[4]-405537848|0,v=(v<<20|v>>>12)+E|0,x+=(v&_|E&~_)+w[9]+568446438|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[14]-1019803690|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[3]-187363961|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[8]+1163531501|0,v=(v<<20|v>>>12)+E|0,x+=(v&_|E&~_)+w[13]-1444681467|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[2]-51403784|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[7]+1735328473|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[12]-1926607734|0,v=(v<<20|v>>>12)+E|0,x+=(v^E^_)+w[5]-378558|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[8]-2022574463|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[11]+1839030562|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[14]-35309556|0,v=(v<<23|v>>>9)+E|0,x+=(v^E^_)+w[1]-1530992060|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[4]+1272893353|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[7]-155497632|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[10]-1094730640|0,v=(v<<23|v>>>9)+E|0,x+=(v^E^_)+w[13]+681279174|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[0]-358537222|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[3]-722521979|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[6]+76029189|0,v=(v<<23|v>>>9)+E|0,x+=(v^E^_)+w[9]-640364487|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[12]-421815835|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[15]+530742520|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[2]-995338651|0,v=(v<<23|v>>>9)+E|0,x+=(E^(v|~_))+w[0]-198630844|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[7]+1126891415|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[14]-1416354905|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[5]-57434055|0,v=(v<<21|v>>>11)+E|0,x+=(E^(v|~_))+w[12]+1700485571|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[3]-1894986606|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[10]-1051523|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[1]-2054922799|0,v=(v<<21|v>>>11)+E|0,x+=(E^(v|~_))+w[8]+1873313359|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[15]-30611744|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[6]-1560198380|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[13]+1309151649|0,v=(v<<21|v>>>11)+E|0,x+=(E^(v|~_))+w[4]-145523070|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[11]-1120210379|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[2]+718787259|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[9]-343485551|0,v=(v<<21|v>>>11)+E|0,g[0]=x+g[0]|0,g[1]=v+g[1]|0,g[2]=E+g[2]|0,g[3]=_+g[3]|0}function i(g){var w=[],x;for(x=0;x<64;x+=4)w[x>>2]=g.charCodeAt(x)+(g.charCodeAt(x+1)<<8)+(g.charCodeAt(x+2)<<16)+(g.charCodeAt(x+3)<<24);return w}function o(g){var w=[],x;for(x=0;x<64;x+=4)w[x>>2]=g[x]+(g[x+1]<<8)+(g[x+2]<<16)+(g[x+3]<<24);return w}function a(g){var w=g.length,x=[1732584193,-271733879,-1732584194,271733878],v,E,_,D,z,O;for(v=64;v<=w;v+=64)s(x,i(g.substring(v-64,v)));for(g=g.substring(v-64),E=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0;v<E;v+=1)_[v>>2]|=g.charCodeAt(v)<<(v%4<<3);if(_[v>>2]|=128<<(v%4<<3),v>55)for(s(x,_),v=0;v<16;v+=1)_[v]=0;return D=w*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(D[2],16),O=parseInt(D[1],16)||0,_[14]=z,_[15]=O,s(x,_),x}function c(g){var w=g.length,x=[1732584193,-271733879,-1732584194,271733878],v,E,_,D,z,O;for(v=64;v<=w;v+=64)s(x,o(g.subarray(v-64,v)));for(g=v-64<w?g.subarray(v-64):new Uint8Array(0),E=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0;v<E;v+=1)_[v>>2]|=g[v]<<(v%4<<3);if(_[v>>2]|=128<<(v%4<<3),v>55)for(s(x,_),v=0;v<16;v+=1)_[v]=0;return D=w*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(D[2],16),O=parseInt(D[1],16)||0,_[14]=z,_[15]=O,s(x,_),x}function h(g){var w="",x;for(x=0;x<4;x+=1)w+=r[g>>x*8+4&15]+r[g>>x*8&15];return w}function u(g){var w;for(w=0;w<g.length;w+=1)g[w]=h(g[w]);return g.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function g(w,x){return w=w|0||0,w<0?Math.max(w+x,0):Math.min(w,x)}ArrayBuffer.prototype.slice=function(w,x){var v=this.byteLength,E=g(w,v),_=v,D,z,O,L;return x!==e&&(_=g(x,v)),E>_?new ArrayBuffer(0):(D=_-E,z=new ArrayBuffer(D),O=new Uint8Array(z),L=new Uint8Array(this,E,D),O.set(L),z)}}();function l(g){return/[\u0080-\uFFFF]/.test(g)&&(g=unescape(encodeURIComponent(g))),g}function d(g,w){var x=g.length,v=new ArrayBuffer(x),E=new Uint8Array(v),_;for(_=0;_<x;_+=1)E[_]=g.charCodeAt(_);return w?E:v}function f(g){return String.fromCharCode.apply(null,new Uint8Array(g))}function p(g,w,x){var v=new Uint8Array(g.byteLength+w.byteLength);return v.set(new Uint8Array(g)),v.set(new Uint8Array(w),g.byteLength),x?v:v.buffer}function m(g){var w=[],x=g.length,v;for(v=0;v<x-1;v+=2)w.push(parseInt(g.substr(v,2),16));return String.fromCharCode.apply(String,w)}function b(){this.reset()}return b.prototype.append=function(g){return this.appendBinary(l(g)),this},b.prototype.appendBinary=function(g){this._buff+=g,this._length+=g.length;var w=this._buff.length,x;for(x=64;x<=w;x+=64)s(this._hash,i(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},b.prototype.end=function(g){var w=this._buff,x=w.length,v,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_;for(v=0;v<x;v+=1)E[v>>2]|=w.charCodeAt(v)<<(v%4<<3);return this._finish(E,x),_=u(this._hash),g&&(_=m(_)),this.reset(),_},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(g){return this._buff=g.buff,this._length=g.length,this._hash=g.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(g,w){var x=w,v,E,_;if(g[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,g),x=0;x<16;x+=1)g[x]=0;v=this._length*8,v=v.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(v[2],16),_=parseInt(v[1],16)||0,g[14]=E,g[15]=_,s(this._hash,g)},b.hash=function(g,w){return b.hashBinary(l(g),w)},b.hashBinary=function(g,w){var x=a(g),v=u(x);return w?m(v):v},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(g){var w=p(this._buff.buffer,g,!0),x=w.length,v;for(this._length+=g.byteLength,v=64;v<=x;v+=64)s(this._hash,o(w.subarray(v-64,v)));return this._buff=v-64<x?new Uint8Array(w.buffer.slice(v-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(g){var w=this._buff,x=w.length,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,_;for(E=0;E<x;E+=1)v[E>>2]|=w[E]<<(E%4<<3);return this._finish(v,x),_=u(this._hash),g&&(_=m(_)),this.reset(),_},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var g=b.prototype.getState.call(this);return g.buff=f(g.buff),g},b.ArrayBuffer.prototype.setState=function(g){return g.buff=d(g.buff,!0),b.prototype.setState.call(this,g)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(g,w){var x=c(new Uint8Array(g)),v=u(x);return w?m(v):v},b})})(dd);var Aw=dd.exports;const Mw=pc(Aw);function Dw(n='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(n),t=>t.textContent)}const gc=n=>new XMLSerializer().serializeToString(n),Ow=(n,t="text/html")=>new DOMParser().parseFromString(n,t),md=(n,t={mime:He["image/svg+xml"],encode:vi.utf8})=>Pa(gc(n),t);async function yc(n=["*"],t){let e=[];const r=document.createElement("input");return r.setAttribute("type","file"),r.setAttribute("visibility","hidden"),r.setAttribute("accept",n.join(",")),t&&r.setAttribute("multiple","true"),r.addEventListener("click",s=>{r.value=""},!1),new Promise((s,i)=>{r.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?i(new Error("Cancel")):s(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&i(new Error("Cancel"))},1e3)},{once:!0}),r.click()}).then(s=>(r.remove(),s)).catch(s=>{throw r.remove(),s})}function ds(n,t=Ae.text,e){return new Promise((r,s)=>{const i=new FileReader;switch(i.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),i.addEventListener("load",o=>{r(o.target?.result)}),i.addEventListener("error",o=>{s(o)}),t){case Ae.dataURL:i.readAsDataURL(n);break;case Ae.binaryString:i.readAsBinaryString(n);break;case Ae.arraybuffer:i.readAsArrayBuffer(n);break;case Ae.text:default:i.readAsText(n)}})}async function Iw(n){const t=await ds(n,Ae.arraybuffer);return d1(t)}function pd(n,t,e,r,s,i,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<r.size)pd(n,t,e,r,s,o,Math.min(o+s,r.size));else return n(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(r.slice(i,o))}async function gd(n,t=1*1024*1024){return await new Promise((e,r)=>pd(e,r,new Mw.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class Rw{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new Cw({baseURL:t.baseURL,interceptors:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1*1024*1024,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await gd(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postFormData(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{H1(this.time,1),this.onTime?.(G1(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function yd(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,r=t.length;e<r;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function bd(n,t){return new Promise((e,r)=>{const{method:s="GET",data:i={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:u="json",timeout:l=3e4}=t||{},d=yd();d.timeout=l,d.responseType=u,d.onreadystatechange=function(w){d.readyState===4&&(d.status===200?e(d.response):r(d.statusText))},d.ontimeout=()=>{r(`${n} is timed out for ${l}ms.`)},d.addEventListener("load",w=>t?.load?.(w,d),!1),d.addEventListener("loadstart",w=>t?.loadstart?.(w,d),!1),d.addEventListener("loadend",w=>t?.loadend?.(w,d),!1),d.addEventListener("progress",w=>{if(w.lengthComputable){const x=Math.round(w.loaded*100/w.total);t?.progress?.(w,d,x)}},!1),d.addEventListener("error",w=>t?.error?.(w,d),!1),d.addEventListener("abort",w=>t?.abort?.(w,d),!1);const f=s.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,m=!1,b=!1;function g(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(d.withCredentials=!0);for(const w in c)Wt(w).toLowerCase()=="content-type"&&c[w].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(Wt(w).toLowerCase()=="content-type"&&(c[w].toLowerCase().indexOf("text/plain")>=0?m=!0:c[w].toLowerCase().indexOf("application/json")>=0&&(b=!0)),d.setRequestHeader(w,c[w]))}switch(f){case"GET":let w="";i instanceof FormData?w=Gb(i):w=jb(i),d.open("GET",Yb(n,w),!0),g(),d.send(null);break;default:d.open(f,n,!0),g(),p?d.sendAsBinary(o):b?d.send(JSON.stringify(i)):m?d.send(Object.entries(i).map(([x,v])=>`${x}=${v}`).join(`\r
19
- `)):d.send(Object.entries(i).map(([x,v])=>`${encodeURIComponent(x)}=${encodeURIComponent(v)}`).join("&"));break}})}async function kw(n){const t={url:n.action||"",data:{},contentType:n.method.toLowerCase()==="post"&&n.enctype?n.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],r=t.contentType=="multipart/form-data";for(let s=0;s<n.elements.length;s++){const i=n.elements[s];if(!i.hasAttribute("name"))continue;const o=i.getAttribute("type");switch(i.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=i;if(r)for(let l=0,d=c.files?.length||0;l<d;l++){const f=c.files?.[l];if(f){const p=await ds(f,Ae.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+f.name+`"\r
13
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function xf(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var ja=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=wf(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(cn(u))try{u()}catch(m){i=m instanceof Ya?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=wf(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{_f(p)}catch(m){i=i??[],m instanceof Ya?i=Ua(Ua([],$a(i)),$a(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new Ya(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)_f(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&xf(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&xf(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}();ja.EMPTY;function Sf(n){return n instanceof ja||n&&"closed"in n&&cn(n.remove)&&cn(n.add)&&cn(n.unsubscribe)}function _f(n){cn(n)?n():n.unsubscribe()}var Ef={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},bb={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,Ua([n,t],$a(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function vb(n){bb.setTimeout(function(){throw n})}function Cf(){}function wb(n){n()}var Ga=function(n){Ba(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Sf(e)&&e.add(r)):r.destination=Eb,r}return t.create=function(e,r,s){return new Wa(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ja),xb=Function.prototype.bind;function Xa(n,t){return xb.call(n,t)}var Sb=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){Mi(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){Mi(r)}else Mi(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Mi(e)}},n}(),Wa=function(n){Ba(t,n);function t(e,r,s){var i=n.call(this)||this,o;if(cn(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;i&&Ef.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Xa(e.next,a),error:e.error&&Xa(e.error,a),complete:e.complete&&Xa(e.complete,a)}):o=e}return i.destination=new Sb(o),i}return t}(Ga);function Mi(n){vb(n)}function _b(n){throw n}var Eb={closed:!0,next:Cf,error:_b,complete:Cf},Cb=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Tb(n){return n}function Pb(n){return n.length===0?Tb:n.length===1?n[0]:function(t){return n.reduce(function(e,r){return r(e)},t)}}(function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=Mb(t)?t:new Wa(t,e,r);return wb(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Tf(e),new e(function(s,i){var o=new Wa({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Cb]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Pb(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Tf(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n})();function Tf(n){var t;return(t=n??Ef.Promise)!==null&&t!==void 0?t:Promise}function Ab(n){return n&&cn(n.next)&&cn(n.error)&&cn(n.complete)}function Mb(n){return n&&n instanceof Ga||Ab(n)&&Sf(n)}(function(n){Ba(t,n);function t(e,r,s,i,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(h){try{r(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=i?function(h){try{i(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ga);function Db(){const n=Z.navigator?.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}Db(),Z.document&&Z.document.documentMode&&Z.document.documentMode,Z.document&&Z.document.documentMode&&Z.document.documentMode,Z.document&&Z.document.documentMode&&Z.document.documentMode,!!(Z.Worker&&Z.Blob&&Z.Promise&&Z.OffscreenCanvas&&Z.OffscreenCanvasRenderingContext2D&&Z.HTMLCanvasElement&&Z.HTMLCanvasElement.prototype.transferControlToOffscreen&&Z.URL&&Z.URL.createObjectURL);const Ob=(()=>{if(!Z.OffscreenCanvas)return!1;const n=new OffscreenCanvas(1,1),t=n.getContext("2d");if(!t)return!1;t.fillRect(0,0,1,1);const e=n.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0})(),Pf=Z.crypto;Pf?.subtle;function Af(){try{return Pf.randomUUID()}catch{let n=new Date().getTime();return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?e:e&3|8).toString(16)})}}const Ib="\uFEFF";function Rb(n){return n.startsWith(Ib)?n.slice(1):n}function kb(n){try{return{ok:!0,value:JSON.parse(Rb(n))}}catch{return{ok:!1}}}Q1(kb,{createCache:()=>new Ra({max:50}),cacheKeyResolver:n=>n});const Ha=10,Mf=(n=0)=>t=>`\x1B[${t+n}m`,Df=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,Of=(n=0)=>(t,e,r)=>`\x1B[${38+n};2;${t};${e};${r}m`,Ot={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ot.modifier);const Lb=Object.keys(Ot.color),Nb=Object.keys(Ot.bgColor);[...Lb,...Nb];function zb(){const n=new Map;for(const[t,e]of Object.entries(Ot)){for(const[r,s]of Object.entries(e))Ot[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},e[r]=Ot[r],n.set(s[0],s[1]);Object.defineProperty(Ot,t,{value:e,enumerable:!1})}return Object.defineProperty(Ot,"codes",{value:n,enumerable:!1}),Ot.color.close="\x1B[39m",Ot.bgColor.close="\x1B[49m",Ot.color.ansi=Mf(),Ot.color.ansi256=Df(),Ot.color.ansi16m=Of(),Ot.bgColor.ansi=Mf(Ha),Ot.bgColor.ansi256=Df(Ha),Ot.bgColor.ansi16m=Of(Ha),Object.defineProperties(Ot,{rgbToAnsi256:{value(t,e,r){return t===e&&e===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[r]=e;r.length===3&&(r=[...r].map(i=>i+i).join(""));const s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>Ot.rgbToAnsi256(...Ot.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,r,s;if(t>=232)e=((t-232)*10+8)/255,r=e,s=e;else{t-=16;const a=t%36;e=Math.floor(t/36)/5,r=Math.floor(a/6)/5,s=a%6/5}const i=Math.max(e,r,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(e));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,e,r)=>Ot.ansi256ToAnsi(Ot.rgbToAnsi256(t,e,r)),enumerable:!1},hexToAnsi:{value:t=>Ot.ansi256ToAnsi(Ot.hexToAnsi256(t)),enumerable:!1}}),Ot}const Vb=zb(),Fb=0;new Set(Vb.codes.values()).delete(Fb);const hs={1:"rgb(10,194,210)",2:"rgb(123,183,250)",3:"rgb(96,215,169)",4:"rgb(253,193,98)",5:"rgb(253,106,98)",6:"rgb(246,141,187)",7:"rgb(38,204,255)",8:"rgb(162,90,253)",9:"rgb(255,94,126)",10:"rgb(136,255,90)",11:"rgb(252,255,66)",12:"rgb(255,166,45)",13:"rgb(255,54,255)",14:"rgb(220,73,22)",15:"rgb(104,113,177)",16:"rgb(209,185,53)",17:"rgb(27,188,155)",18:"rgb(255,127,80)",19:"rgb(75,191,195)",20:"rgb(255,153,0)",black:"rgb(0,0,0)",blue:"rgb(0,0,255)",brightblue:"rgb(59,142,234)",terminalblue:"rgb(36,114,200)",red:"rgb(255,0,0)",brightred:"rgb(241,76,76)",terminalred:"rgb(205,49,49)",white:"rgb(255,255,255)",terminalwhite:"rgb(229,229,229)",yellow:"rgb(255,255,0)",brightyellow:"rgb(245,245,67)",terminalyellow:"rgb(229,229,16)",yellowgreen:"rgb(154,205,50)",aliceblue:"rgb(240,248,255)",antiquewhite:"rgb(250,235,215)",aqua:"rgb(0,255,255)",aquamarine:"rgb(127,255,212)",azure:"rgb(240,255,255)",beige:"rgb(245,245,220)",bisque:"rgb(255,228,196)",blanchedalmond:"rgb(255,235,205)",blueviolet:"rgb(138,43,226)",brown:"rgb(165,42,42)",burlywood:"rgb(222,184,135)",cadetblue:"rgb(95,158,160)",chartreuse:"rgb(127,255,0)",chocolate:"rgb(210,105,30)",coral:"rgb(255,127,80)",cornflowerblue:"rgb(100,149,237)",cornsilk:"rgb(255,248,220)",crimson:"rgb(220,20,60)",cyan:"rgb(0,255,255)",brightcyan:"rgb(41,184,219)",terminalcyan:"rgb(17,168,205)",darkblue:"rgb(0,0,139)",darkcyan:"rgb(0,139,139)",darkgoldenrod:"rgb(184,134,11)",darkgray:"rgb(169,169,169)",darkgreen:"rgb(0,100,0)",darkgrey:"rgb(30,30,30)",darkkhaki:"rgb(189,183,107)",darkmagenta:"rgb(139,0,139)",darkolivegreen:"rgb(85,107,47)",darkorange:"rgb(255,140,0)",darkorchid:"rgb(153,50,204)",darkred:"rgb(139,0,0)",darksalmon:"rgb(233,150,122)",darkseagreen:"rgb(143,188,143)",darkslateblue:"rgb(72,61,139)",darkslategray:"rgb(47,79,79)",darkslategrey:"rgb(47,79,79)",darkturquoise:"rgb(0,206,209)",darkviolet:"rgb(148,0,211)",deeppink:"rgb(255,20,147)",deepskyblue:"rgb(0,191,255)",dimgray:"rgb(105,105,105)",dodgerblue:"rgb(30,144,255)",firebrick:"rgb(178,34,34)",floralwhite:"rgb(255,250,240)",forestgreen:"rgb(34,139,34)",fuchsia:"rgb(255,0,255)",gainsboro:"rgb(220,220,220)",ghostwhite:"rgb(248,248,255)",gold:"rgb(255,215,0)",goldenrod:"rgb(218,165,32)",grey:"rgb(128,128,128)",green:"rgb(0,128,0)",brightgreen:"rgb(35,209,139)",terminalgreen:"rgb(13,188,121)",greenyellow:"rgb(173,255,47)",honeydew:"rgb(240,255,240)",hotpink:"rgb(255,105,180)",indianred:"rgb(205,92,92)",indigo:"rgb(75,0,130)",ivory:"rgb(255,255,240)",khaki:"rgb(240,230,140)",lavender:"rgb(230,230,250)",lavenderblush:"rgb(255,240,245)",lawngreen:"rgb(124,252,0)",lemonchiffon:"rgb(255,250,205)",lightblue:"rgb(173,216,230)",lightcoral:"rgb(240,128,128)",lightcyan:"rgb(224,255,255)",lightgoldenrodyellow:"rgb(250,250,210)",lightgreen:"rgb(144,238,144)",lightgrey:"rgb(229,229,229)",lightpink:"rgb(255,182,193)",lightsalmon:"rgb(255,160,122)",lightseagreen:"rgb(32,178,170)",lightskyblue:"rgb(135,206,250)",lightslategray:"rgb(119,136,153)",lightslategrey:"rgb(119,136,153)",lightsteelblue:"rgb(176,196,222)",lightyellow:"rgb(255,255,224)",lime:"rgb(0,255,0)",limegreen:"rgb(50,205,50)",linen:"rgb(250,240,230)",magenta:"rgb(255,0,255)",brightmagenta:"rgb(214,112,214)",terminalmagenta:"rgb(188,63,188)",maroon:"rgb(128,0,0)",mediumaquamarine:"rgb(102,205,170)",mediumblue:"rgb(0,0,205)",mediumorchid:"rgb(186,85,211)",mediumpurple:"rgb(147,112,219)",mediumseagreen:"rgb(60,179,113)",mediumslateblue:"rgb(123,104,238)",mediumspringgreen:"rgb(0,250,154)",mediumturquoise:"rgb(72,209,204)",mediumvioletred:"rgb(199,21,133)",midnightblue:"rgb(25,25,112)",mintcream:"rgb(245,255,250)",mistyrose:"rgb(255,228,225)",moccasin:"rgb(255,228,181)",navajowhite:"rgb(255,222,173)",navy:"rgb(0,0,128)",oldlace:"rgb(253,245,230)",olive:"rgb(128,128,0)",olivedrab:"rgb(107,142,35)",orange:"rgb(255,165,0)",orangered:"rgb(255,69,0)",orchid:"rgb(218,112,214)",palegoldenrod:"rgb(238,232,170)",palegreen:"rgb(152,251,152)",paleturquoise:"rgb(175,238,238)",palevioletred:"rgb(219,112,147)",papayawhip:"rgb(255,239,213)",peachpuff:"rgb(255,218,185)",peru:"rgb(205,133,63)",pink:"rgb(255,192,203)",plum:"rgb(221,160,221)",powderblue:"rgb(176,224,230)",purple:"rgb(128,0,128)",rebeccapurple:"rgb(102,51,153)",rosybrown:"rgb(188,143,143)",royalblue:"rgb(65,105,225)",saddlebrown:"rgb(139,69,19)",salmon:"rgb(250,128,114)",sandybrown:"rgb(244,164,96)",seagreen:"rgb(46,139,87)",seashell:"rgb(255,245,238)",sienna:"rgb(160,82,45)",silver:"rgb(192,192,192)",skyblue:"rgb(135,206,235)",slateblue:"rgb(106,90,205)",slategray:"rgb(112,128,144)",slategrey:"rgb(112,128,144)",snow:"rgb(255,250,250)",springgreen:"rgb(0,255,127)",steelblue:"rgb(70,130,180)",tan:"rgb(210,180,140)",teal:"rgb(0,128,128)",thistle:"rgb(216,191,216)",tomato:"rgb(255,99,71)",turquoise:"rgb(64,224,208)",violet:"rgb(238,130,238)",wheat:"rgb(245,222,179)"},Bb=Array.from(Object.values(hs));Object.entries(hs).map(([n,t])=>{const e=t;return{name:n,rgb:e,brightness:$b(e)}}).sort((n,t)=>n.brightness-t.brightness);function $b(n){const[t,e,r]=n.replace("rgb(","").replace(")","").split(",").map(Number);return .2126*t+.7152*e+.0722*r}class Ne{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color Set Unknown Error: color(${t}) type(${typeof t})`;if(t instanceof Ne)this.setRGB(t.r,t.g,t.b,t.a);else if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let r;if(r=/^(\w+)\(([^)]*)\)/.exec(t)){const s=r[2];let i;switch(r[1]){case"rgb":case"rgba":(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(this.r=parseInt(i[1],10),this.g=parseInt(i[2],10),this.b=parseInt(i[3],10),this.a=i[4]?parseFloat(i[4]):1):(i=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?(this.r=st(parseFloat(i[1]),0,100)*255/100,this.g=st(parseFloat(i[2]),0,100)*255/100,this.b=st(parseFloat(i[3]),0,100)*255/100,this.a=i[4]?parseFloat(i[4]):1):De(e);break;case"hsl":case"hsla":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):De(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))?this.setHSV(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,i[4]?parseFloat(i[4]):1):De(e);break;default:De(e)}}else if(r=/#([A-Fa-f0-9]+)/.exec(t)){const s=r[1],i=s.length;i===3?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),1):i===4?this.setRGB(parseInt(s.charAt(0),16),parseInt(s.charAt(1),16),parseInt(s.charAt(2),16),st(parseInt(s.charAt(3),16)/16,0,1)):i===6||i===8?this.setHEX(parseInt(s,16)):De(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{De(e)}else De(e)}else Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):De(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){this._color.r=st(Math.round(Me(t,this.r)),0,255)}get g(){return this._color.g}set g(t){this._color.g=st(Math.round(Me(t,this.g)),0,255)}get b(){return this._color.b}set b(t){this._color.b=st(Math.round(Me(t,this.b)),0,255)}get a(){return this._color.a}set a(t){this._color.a=st(Me(t,this.a),0,1)}setAlpha(t){return this.a=t,this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${at(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Ne(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Ka(t.r),this.g=Ka(t.g),this.b=Ka(t.b),this}copyLinearToSRGB(t){return this.r=Ja(t.r),this.g=Ja(t.g),this.b=Ja(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",r="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:r);{const{r:s,g:i,b:o}=this.color;return this.r=255-s,this.g=255-i,this.b=255-o,this}}closet(t="#000000",e="#ffffff"){return this.opposite(!0,t,e).opposite(!0,t,e)}lighten(t){t=st(t,0,1);const{r:e,g:r,b:s,a:i}=this.color;return i==0?this.a=t:(this.r=e+(255-e)*t,this.g=r+(255-r)*t,this.b=s+(255-s)*t),this}darken(t){t=st(t,0,1);const{r:e,g:r,b:s,a:i}=this.color;return i==0?this.a=t:(this.r=e*(1-t),this.g=r*(1-t),this.b=s*(1-t)),this}lerp(t,e){e=st(e,0,1);const{r,g:s,b:i}=this.color;return this.r=r+(t.r-r)*e,this.g=s+(t.g-s)*e,this.b=i+(t.b-i)*e,this}lerpColors(t,e,r){return r=st(r,0,1),this.r=t.r+(e.r-t.r)*r,this.g=t.g+(e.g-t.g)*r,this.b=t.b+(e.b-t.b)*r,this}static gradient(t,e,r){try{return qa.lerpColors(new Ne(t),new Ne(e),r).toString()}catch{return e}}static random(){return qa.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Ne.nextIndex){Ne.nextIndex=t;const e=Object.keys(hs),r=e.length;return qa.set(hs[e[Ne.nextIndex++%r]]).toString()}setColorName(t){const e=hs[t.toLowerCase()];return e!==void 0?this.set(e):t==="none"?this.a=0:(this.a=1,De("Color.setColorName: Unknown color "+t)),this}setRGB(t,e,r,s=1){return this.r=t,this.g=e,this.b=r,this.a=s,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,r,s=1){const i=V1(t,1),o=st(e,0,1),a=st(r,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=Za(h,c,i+1/3)*255,this.g=Za(h,c,i)*255,this.b=Za(h,c,i-1/3)*255}return this.a=s,this}getHSL(t){const e=this.r,r=this.g,s=this.b,i=Math.max(e,r,s)/255,o=Math.min(e,r,s)/255;let a,c;const h=(o+i)/2;if(o===i)a=0,c=0;else{const u=i-o;switch(c=h<=.5?u/(i+o):u/(2-i-o),i){case e:a=(r-s)/u+(r<s?6:0);break;case r:a=(s-e)/u+2;break;case s:default:a=(e-r)/u+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,r){const s=this.getHSL();return this.setHSL(s.h+t,s.s+e,s.l+r)}lerpHSL(t,e){const r=this.getHSL(),s=t.getHSL(),i=Si(r.h,s.h,e),o=Si(r.s,s.s,e),a=Si(r.l,s.l,e);return this.setHSL(i,o,a),this}setHSV(t,e,r,s=1){const i=st(t,0,1)*360,o=st(e,0,1),a=st(r,0,1),c=Math.floor(i/60)%6,h=i/60-Math.floor(i/60),u=a*(1-o),l=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,u],[l,a,u],[u,a,d],[u,l,a],[d,u,a],[a,u,l]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=s,this}setHSB(t,e,r,s=1){this.setHSV(t,e,r,s)}getHSV(t){const{r:e,g:r,b:s,a:i}=this.color,o=Math.max(e,r,s),a=Math.min(e,r,s),c=o-a;let h;e===o?h=(r-s)/c:r===o?h=2+(s-e)/c:h=4+(e-r)/c,h/=6,h<0&&(h+=1);const u=c==0?0:h,l=o===0?0:c/o,d=o/255;return t&&t.setHSV(u,l,d,i),{h:u,s:l,v:d,a:i}}getHSB(t){const{h:e,s:r,v:s,a:i}=this.getHSV(t);return{h:e,s:r,b:s,a:i}}}const qa=new Ne;function Ka(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Ja(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function Za(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}function Ub(n=window.location.href,t){try{return new URL(n,t)}catch{const e="(?<protocol>https?:)",r="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",s="(?<pathname>(?:\\/[^/#?]+)*\\/?)",i="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",a=new RegExp(`^${e}//${r}${s}${i}${o}$`).exec(n);return{href:n,protocol:a?.groups?.protocol||"",host:a?.groups?.host||"",hostname:a?.groups?.hostname||"",port:a?.groups?.port||"",pathname:a?.groups?.pathname||"",search:a?.groups?.search||"",hash:a?.groups?.hash||""}}}function Yb(n=window.location.href){const t=Ub(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function jb(n,t){return n+t.replace(/^[&?]/,n.indexOf("?")>=0?"&":"?")}function Gb(n){return"?"+Object.entries(n).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function Xb(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function wt(n){return n*Math.PI/180}function ee(n){return n*180/Math.PI}function Qa(n,t,e=0){return Math.sqrt(n*n+t*t+e*e)}function tr(n,t,e,r){return Qa(e-n,r-t)}function ze(n,t,e,r){let s=Math.atan2(r-t,e-n);return s<0&&(s+=Math.PI*2),s}function er(n,t){return{dx:Math.cos(n)*t,dy:Math.sin(n)*t}}function If(n,t){return function(){return n.apply(t,arguments)}}const{toString:Wb}=Object.prototype,{getPrototypeOf:tc}=Object,Di=(n=>t=>{const e=Wb.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=n=>(n=n.toLowerCase(),t=>Di(t)===n),Oi=n=>t=>typeof t===n,{isArray:Mr}=Array,us=Oi("undefined");function Hb(n){return n!==null&&!us(n)&&n.constructor!==null&&!us(n.constructor)&&we(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Rf=Ve("ArrayBuffer");function qb(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Rf(n.buffer),t}const Kb=Oi("string"),we=Oi("function"),kf=Oi("number"),Ii=n=>n!==null&&typeof n=="object",Jb=n=>n===!0||n===!1,Ri=n=>{if(Di(n)!=="object")return!1;const t=tc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Zb=Ve("Date"),Qb=Ve("File"),tv=Ve("Blob"),ev=Ve("FileList"),nv=n=>Ii(n)&&we(n.pipe),rv=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||we(n.append)&&((t=Di(n))==="formdata"||t==="object"&&we(n.toString)&&n.toString()==="[object FormData]"))},sv=Ve("URLSearchParams"),[iv,ov,av,cv]=["ReadableStream","Request","Response","Headers"].map(Ve),hv=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ls(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),Mr(n))for(r=0,s=n.length;r<s;r++)t.call(null,n[r],r,n);else{const i=e?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,n[a],a,n)}}function Lf(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,s;for(;r-- >0;)if(s=e[r],t===s.toLowerCase())return s;return null}const nr=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Nf=n=>!us(n)&&n!==nr;function ec(){const{caseless:n}=Nf(this)&&this||{},t={},e=(r,s)=>{const i=n&&Lf(t,s)||s;Ri(t[i])&&Ri(r)?t[i]=ec(t[i],r):Ri(r)?t[i]=ec({},r):Mr(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ls(arguments[r],e);return t}const uv=(n,t,e,{allOwnKeys:r}={})=>(ls(t,(s,i)=>{e&&we(s)?n[i]=If(s,e):n[i]=s},{allOwnKeys:r}),n),lv=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),fv=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},dv=(n,t,e,r)=>{let s,i,o;const a={};if(t=t||{},n==null)return t;do{for(s=Object.getOwnPropertyNames(n),i=s.length;i-- >0;)o=s[i],(!r||r(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&tc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},mv=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},pv=n=>{if(!n)return null;if(Mr(n))return n;let t=n.length;if(!kf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},gv=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&tc(Uint8Array)),yv=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},bv=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},vv=Ve("HTMLFormElement"),wv=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),zf=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),xv=Ve("RegExp"),Vf=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};ls(e,(s,i)=>{let o;(o=t(s,i,n))!==!1&&(r[i]=o||s)}),Object.defineProperties(n,r)},Sv=n=>{Vf(n,(t,e)=>{if(we(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(we(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},_v=(n,t)=>{const e={},r=s=>{s.forEach(i=>{e[i]=!0})};return Mr(n)?r(n):r(String(n).split(t)),e},Ev=()=>{},Cv=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Tv(n){return!!(n&&we(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Pv=n=>{const t=new Array(10),e=(r,s)=>{if(Ii(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Mr(r)?[]:{};return ls(r,(o,a)=>{const c=e(o,s+1);!us(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return e(n,0)},Av=Ve("AsyncFunction"),Mv=n=>n&&(Ii(n)||we(n))&&we(n.then)&&we(n.catch),Ff=((n,t)=>n?setImmediate:t?((e,r)=>(nr.addEventListener("message",({source:s,data:i})=>{s===nr&&i===e&&r.length&&r.shift()()},!1),s=>{r.push(s),nr.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",we(nr.postMessage)),Dv=typeof queueMicrotask<"u"?queueMicrotask.bind(nr):typeof process<"u"&&process.nextTick||Ff,k={isArray:Mr,isArrayBuffer:Rf,isBuffer:Hb,isFormData:rv,isArrayBufferView:qb,isString:Kb,isNumber:kf,isBoolean:Jb,isObject:Ii,isPlainObject:Ri,isReadableStream:iv,isRequest:ov,isResponse:av,isHeaders:cv,isUndefined:us,isDate:Zb,isFile:Qb,isBlob:tv,isRegExp:xv,isFunction:we,isStream:nv,isURLSearchParams:sv,isTypedArray:gv,isFileList:ev,forEach:ls,merge:ec,extend:uv,trim:hv,stripBOM:lv,inherits:fv,toFlatObject:dv,kindOf:Di,kindOfTest:Ve,endsWith:mv,toArray:pv,forEachEntry:yv,matchAll:bv,isHTMLForm:vv,hasOwnProperty:zf,hasOwnProp:zf,reduceDescriptors:Vf,freezeMethods:Sv,toObjectSet:_v,toCamelCase:wv,noop:Ev,toFiniteNumber:Cv,findKey:Lf,global:nr,isContextDefined:Nf,isSpecCompliantForm:Tv,toJSONObject:Pv,isAsyncFn:Av,isThenable:Mv,setImmediate:Ff,asap:Dv};function mt(n,t,e,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}k.inherits(mt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Bf=mt.prototype,$f={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{$f[n]={value:n}}),Object.defineProperties(mt,$f),Object.defineProperty(Bf,"isAxiosError",{value:!0}),mt.from=(n,t,e,r,s,i)=>{const o=Object.create(Bf);return k.toFlatObject(n,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),mt.call(o,n.message,t,e,r,s),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const Ov=null;function nc(n){return k.isPlainObject(n)||k.isArray(n)}function Uf(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function Yf(n,t,e){return n?n.concat(t).map(function(r,s){return r=Uf(r),!e&&s?"["+r+"]":r}).join(e?".":""):t}function Iv(n){return k.isArray(n)&&!n.some(nc)}const Rv=k.toFlatObject(k,{},null,function(n){return/^is[A-Z]/.test(n)});function ki(n,t,e){if(!k.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=k.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!k.isUndefined(p[f])});const r=e.metaTokens,s=e.visitor||h,i=e.dots,o=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(s))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(k.isDate(f))return f.toISOString();if(!a&&k.isBlob(f))throw new mt("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(f)||k.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function h(f,p,m){let b=f;if(f&&!m&&typeof f=="object"){if(k.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=JSON.stringify(f);else if(k.isArray(f)&&Iv(f)||(k.isFileList(f)||k.endsWith(p,"[]"))&&(b=k.toArray(f)))return p=Uf(p),b.forEach(function(g,w){!(k.isUndefined(g)||g===null)&&t.append(o===!0?Yf([p],w,i):o===null?p:p+"[]",c(g))}),!1}return nc(f)?!0:(t.append(Yf(m,p,i),c(f)),!1)}const u=[],l=Object.assign(Rv,{defaultVisitor:h,convertValue:c,isVisitable:nc});function d(f,p){if(!k.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));u.push(f),k.forEach(f,function(m,b){(!(k.isUndefined(m)||m===null)&&s.call(t,m,k.isString(b)?b.trim():b,p,l))===!0&&d(m,p?p.concat(b):[b])}),u.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return d(n),t}function jf(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function rc(n,t){this._pairs=[],n&&ki(n,this,t)}const Gf=rc.prototype;Gf.append=function(n,t){this._pairs.push([n,t])},Gf.toString=function(n){const t=n?function(e){return n.call(this,e,jf)}:jf;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function kv(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xf(n,t,e){if(!t)return n;const r=e&&e.encode||kv;k.isFunction(e)&&(e={serialize:e});const s=e&&e.serialize;let i;if(s?i=s(t,e):i=k.isURLSearchParams(t)?t.toString():new rc(t,e).toString(r),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class Lv{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Wf=Lv,Hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nv=typeof URLSearchParams<"u"?URLSearchParams:rc,zv=typeof FormData<"u"?FormData:null,Vv=typeof Blob<"u"?Blob:null,Fv={isBrowser:!0,classes:{URLSearchParams:Nv,FormData:zv,Blob:Vv},protocols:["http","https","file","blob","url","data"]},sc=typeof window<"u"&&typeof document<"u",ic=typeof navigator=="object"&&navigator||void 0,Bv=sc&&(!ic||["ReactNative","NativeScript","NS"].indexOf(ic.product)<0),$v=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Uv=sc&&window.location.href||"http://localhost",Yv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sc,hasStandardBrowserEnv:Bv,hasStandardBrowserWebWorkerEnv:$v,navigator:ic,origin:Uv},Symbol.toStringTag,{value:"Module"})),ne={...Yv,...Fv};function jv(n,t){return ki(n,new ne.classes.URLSearchParams,Object.assign({visitor:function(e,r,s,i){return ne.isNode&&k.isBuffer(e)?(this.append(r,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Gv(n){return k.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xv(n){const t={},e=Object.keys(n);let r;const s=e.length;let i;for(r=0;r<s;r++)i=e[r],t[i]=n[i];return t}function qf(n){function t(e,r,s,i){let o=e[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=i>=e.length;return o=!o&&k.isArray(s)?s.length:o,c?(k.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!k.isObject(s[o]))&&(s[o]=[]),t(e,r,s[o],i)&&k.isArray(s[o])&&(s[o]=Xv(s[o])),!a)}if(k.isFormData(n)&&k.isFunction(n.entries)){const e={};return k.forEachEntry(n,(r,s)=>{t(Gv(r),s,e,0)}),e}return null}function Wv(n,t,e){if(k.isString(n))try{return(t||JSON.parse)(n),k.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const oc={transitional:Hf,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,s=k.isObject(n);if(s&&k.isHTMLForm(n)&&(n=new FormData(n)),k.isFormData(n))return r?JSON.stringify(qf(n)):n;if(k.isArrayBuffer(n)||k.isBuffer(n)||k.isStream(n)||k.isFile(n)||k.isBlob(n)||k.isReadableStream(n))return n;if(k.isArrayBufferView(n))return n.buffer;if(k.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let i;if(s){if(e.indexOf("application/x-www-form-urlencoded")>-1)return jv(n,this.formSerializer).toString();if((i=k.isFileList(n))||e.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ki(i?{"files[]":n}:n,o&&new o,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),Wv(n)):n}],transformResponse:[function(n){const t=this.transitional||oc.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(k.isResponse(n)||k.isReadableStream(n))return n;if(n&&k.isString(n)&&(e&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(i){if(s)throw i.name==="SyntaxError"?mt.from(i,mt.ERR_BAD_RESPONSE,this,null,this.response):i}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ne.classes.FormData,Blob:ne.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],n=>{oc.headers[n]={}});const ac=oc,Hv=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qv=n=>{const t={};let e,r,s;return n&&n.split(`
14
+ `).forEach(function(i){s=i.indexOf(":"),e=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!e||t[e]&&Hv[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Kf=Symbol("internals");function fs(n){return n&&String(n).trim().toLowerCase()}function Li(n){return n===!1||n==null?n:k.isArray(n)?n.map(Li):String(n)}function Kv(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const Jv=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function cc(n,t,e,r,s){if(k.isFunction(r))return r.call(this,t,e);if(s&&(t=e),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function Zv(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function Qv(n,t){const e=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class Ni{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function i(a,c,h){const u=fs(c);if(!u)throw new Error("header name must be a non-empty string");const l=k.findKey(s,u);(!l||s[l]===void 0||h===!0||h===void 0&&s[l]!==!1)&&(s[l||c]=Li(a))}const o=(a,c)=>k.forEach(a,(h,u)=>i(h,u,c));if(k.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(k.isString(t)&&(t=t.trim())&&!Jv(t))o(qv(t),e);else if(k.isHeaders(t))for(const[a,c]of t.entries())i(c,a,r);else t!=null&&i(e,t,r);return this}get(t,e){if(t=fs(t),t){const r=k.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return Kv(s);if(k.isFunction(e))return e.call(this,s,r);if(k.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=fs(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||cc(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function i(o){if(o=fs(o),o){const a=k.findKey(r,o);a&&(!e||cc(r,r[a],a,e))&&(delete r[a],s=!0)}}return k.isArray(t)?t.forEach(i):i(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const i=e[r];(!t||cc(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const e=this,r={};return k.forEach(this,(s,i)=>{const o=k.findKey(r,i);if(o){e[o]=Li(s),delete e[i];return}const a=t?Zv(i):String(i).trim();a!==i&&delete e[i],e[a]=Li(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return k.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&k.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
15
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[Kf]=this[Kf]={accessors:{}}).accessors,r=this.prototype;function s(i){const o=fs(i);e[o]||(Qv(r,i),e[o]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}}Ni.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(Ni.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),k.freezeMethods(Ni);const Fe=Ni;function hc(n,t){const e=this||ac,r=t||e,s=Fe.from(r.headers);let i=r.data;return k.forEach(n,function(o){i=o.call(e,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Jf(n){return!!(n&&n.__CANCEL__)}function Dr(n,t,e){mt.call(this,n??"canceled",mt.ERR_CANCELED,t,e),this.name="CanceledError"}k.inherits(Dr,mt,{__CANCEL__:!0});function Zf(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new mt("Request failed with status code "+e.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function tw(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function ew(n,t){n=n||10;const e=new Array(n),r=new Array(n);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),h=r[i];o||(o=c),e[s]=a,r[s]=c;let u=i,l=0;for(;u!==s;)l+=e[u++],u=u%n;if(s=(s+1)%n,s===i&&(i=(i+1)%n),c-o<t)return;const d=h&&c-h;return d?Math.round(l*1e3/d):void 0}}function nw(n,t){let e=0,r=1e3/t,s,i;const o=(a,c=Date.now())=>{e=c,s=null,i&&(clearTimeout(i),i=null),n.apply(null,a)};return[(...a)=>{const c=Date.now(),h=c-e;h>=r?o(a,c):(s=a,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const zi=(n,t,e=3)=>{let r=0;const s=ew(50,250);return nw(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-r,h=s(c),u=o<=a;r=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&u?(a-o)/h:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(l)},e)},Qf=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},td=n=>(...t)=>k.asap(()=>n(...t)),rw=ne.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,ne.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(ne.origin),ne.navigator&&/(msie|trident)/i.test(ne.navigator.userAgent)):()=>!0,sw=ne.hasStandardBrowserEnv?{write(n,t,e,r,s,i){const o=[n+"="+encodeURIComponent(t)];k.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),k.isString(r)&&o.push("path="+r),k.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function iw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function ow(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ed(n,t,e){let r=!iw(t);return n&&(r||e==!1)?ow(n,t):t}const nd=n=>n instanceof Fe?{...n}:n;function rr(n,t){t=t||{};const e={};function r(h,u,l,d){return k.isPlainObject(h)&&k.isPlainObject(u)?k.merge.call({caseless:d},h,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function s(h,u,l,d){if(k.isUndefined(u)){if(!k.isUndefined(h))return r(void 0,h,l,d)}else return r(h,u,l,d)}function i(h,u){if(!k.isUndefined(u))return r(void 0,u)}function o(h,u){if(k.isUndefined(u)){if(!k.isUndefined(h))return r(void 0,h)}else return r(void 0,u)}function a(h,u,l){if(l in t)return r(h,u);if(l in n)return r(void 0,h)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,u,l)=>s(nd(h),nd(u),l,!0)};return k.forEach(Object.keys(Object.assign({},n,t)),function(h){const u=c[h]||s,l=u(n[h],t[h],h);k.isUndefined(l)&&u!==a||(e[h]=l)}),e}const rd=n=>{const t=rr({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Fe.from(o),t.url=Xf(ed(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(k.isFormData(e)){if(ne.hasStandardBrowserEnv||ne.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...u]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...u].join("; "))}}if(ne.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&rw(t.url))){const h=s&&i&&sw.read(i);h&&o.set(s,h)}return t},aw=typeof XMLHttpRequest<"u",cw=aw&&function(n){return new Promise(function(t,e){const r=rd(n);let s=r.data;const i=Fe.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=r,h,u,l,d,f;function p(){d&&d(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function b(){if(!m)return;const w=Fe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:w,config:n,request:m};Zf(function(v){t(v),p()},function(v){e(v),p()},x),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){m&&(e(new mt("Request aborted",mt.ECONNABORTED,n,m)),m=null)},m.onerror=function(){e(new mt("Network Error",mt.ERR_NETWORK,n,m)),m=null},m.ontimeout=function(){let w=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||Hf;r.timeoutErrorMessage&&(w=r.timeoutErrorMessage),e(new mt(w,x.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,n,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&k.forEach(i.toJSON(),function(w,x){m.setRequestHeader(x,w)}),k.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),o&&o!=="json"&&(m.responseType=r.responseType),c&&([l,f]=zi(c,!0),m.addEventListener("progress",l)),a&&m.upload&&([u,d]=zi(a),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",d)),(r.cancelToken||r.signal)&&(h=w=>{m&&(e(!w||w.type?new Dr(null,n,m):w),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const g=tw(r.url);if(g&&ne.protocols.indexOf(g)===-1){e(new mt("Unsupported protocol "+g+":",mt.ERR_BAD_REQUEST,n));return}m.send(s||null)})},hw=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,s;const i=function(h){if(!s){s=!0,a();const u=h instanceof Error?h:this.reason;r.abort(u instanceof mt?u:new Dr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new mt(`timeout ${t} of ms exceeded`,mt.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(i):h.removeEventListener("abort",i)}),n=null)};n.forEach(h=>h.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>k.asap(a),c}},uw=hw,lw=function*(n,t){let e=n.byteLength;if(!t||e<t){yield n;return}let r=0,s;for(;r<e;)s=r+t,yield n.slice(r,s),r=s},fw=async function*(n,t){for await(const e of dw(n))yield*lw(e,t)},dw=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},sd=(n,t,e,r)=>{const s=fw(n,t);let i=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await s.next();if(h){a(),c.close();return}let l=u.byteLength;if(e){let d=i+=l;e(d)}c.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},Vi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",id=Vi&&typeof ReadableStream=="function",mw=Vi&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),od=(n,...t)=>{try{return!!n(...t)}catch{return!1}},pw=id&&od(()=>{let n=!1;const t=new Request(ne.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),ad=64*1024,uc=id&&od(()=>k.isReadableStream(new Response("").body)),Fi={stream:uc&&(n=>n.body)};Vi&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fi[t]&&(Fi[t]=k.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new mt(`Response type '${t}' is not supported`,mt.ERR_NOT_SUPPORT,r)})})})(new Response);const gw=async n=>{if(n==null)return 0;if(k.isBlob(n))return n.size;if(k.isSpecCompliantForm(n))return(await new Request(ne.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(k.isArrayBufferView(n)||k.isArrayBuffer(n))return n.byteLength;if(k.isURLSearchParams(n)&&(n=n+""),k.isString(n))return(await mw(n)).byteLength},yw=async(n,t)=>k.toFiniteNumber(n.getContentLength())??gw(t),bw=Vi&&(async n=>{let{url:t,method:e,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:u,withCredentials:l="same-origin",fetchOptions:d}=rd(n);h=h?(h+"").toLowerCase():"text";let f=uw([s,i&&i.toAbortSignal()],o),p;const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let b;try{if(c&&pw&&e!=="get"&&e!=="head"&&(b=await yw(u,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(k.isFormData(r)&&(_=E.headers.get("content-type"))&&u.setContentType(_),E.body){const[D,z]=Qf(b,zi(td(c)));r=sd(E.body,ad,D,z)}}k.isString(l)||(l=l?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?l:void 0});let w=await fetch(p);const x=uc&&(h==="stream"||h==="response");if(uc&&(a||x&&m)){const E={};["status","statusText","headers"].forEach(O=>{E[O]=w[O]});const _=k.toFiniteNumber(w.headers.get("content-length")),[D,z]=a&&Qf(_,zi(td(a),!0))||[];w=new Response(sd(w.body,ad,D,()=>{z&&z(),m&&m()}),E)}h=h||"text";let v=await Fi[k.findKey(Fi,h)||"text"](w,n);return!x&&m&&m(),await new Promise((E,_)=>{Zf(E,_,{data:v,headers:Fe.from(w.headers),status:w.status,statusText:w.statusText,config:n,request:p})})}catch(g){throw m&&m(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new mt("Network Error",mt.ERR_NETWORK,n,p),{cause:g.cause||g}):mt.from(g,g&&g.code,n,p)}}),lc={http:Ov,xhr:cw,fetch:bw};k.forEach(lc,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const cd=n=>`- ${n}`,vw=n=>k.isFunction(n)||n===null||n===!1,hd={getAdapter:n=>{n=k.isArray(n)?n:[n];const{length:t}=n;let e,r;const s={};for(let i=0;i<t;i++){e=n[i];let o;if(r=e,!vw(e)&&(r=lc[(o=String(e)).toLowerCase()],r===void 0))throw new mt(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
16
+ `+i.map(cd).join(`
17
+ `):" "+cd(i[0]):"as no adapter specified";throw new mt("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:lc};function fc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Dr(null,n)}function ud(n){return fc(n),n.headers=Fe.from(n.headers),n.data=hc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),hd.getAdapter(n.adapter||ac.adapter)(n).then(function(t){return fc(n),t.data=hc.call(n,n.transformResponse,t),t.headers=Fe.from(t.headers),t},function(t){return Jf(t)||(fc(n),t&&t.response&&(t.response.data=hc.call(n,n.transformResponse,t.response),t.response.headers=Fe.from(t.response.headers))),Promise.reject(t)})}const ld="1.8.4",Bi={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Bi[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const fd={};Bi.transitional=function(n,t,e){function r(s,i){return"[Axios v"+ld+"] Transitional option '"+s+"'"+i+(e?". "+e:"")}return(s,i,o)=>{if(n===!1)throw new mt(r(i," has been removed"+(t?" in "+t:"")),mt.ERR_DEPRECATED);return t&&!fd[i]&&(fd[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(s,i,o):!0}},Bi.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function ww(n,t,e){if(typeof n!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new mt("option "+i+" must be "+c,mt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new mt("Unknown option "+i,mt.ERR_BAD_OPTION)}}const $i={assertOptions:ww,validators:Bi},qe=$i.validators;class Ui{constructor(t){this.defaults=t,this.interceptors={request:new Wf,response:new Wf}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
18
+ `+i):r.stack=i}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=rr(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:i}=e;r!==void 0&&$i.assertOptions(r,{silentJSONParsing:qe.transitional(qe.boolean),forcedJSONParsing:qe.transitional(qe.boolean),clarifyTimeoutError:qe.transitional(qe.boolean)},!1),s!=null&&(k.isFunction(s)?e.paramsSerializer={serialize:s}:$i.assertOptions(s,{encode:qe.function,serialize:qe.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),$i.assertOptions(e,{baseUrl:qe.spelling("baseURL"),withXsrfToken:qe.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&k.merge(i.common,i[e.method]);i&&k.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Fe.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const h=[];this.interceptors.response.forEach(function(p){h.push(p.fulfilled,p.rejected)});let u,l=0,d;if(!c){const p=[ud.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,u=Promise.resolve(e);l<d;)u=u.then(p[l++],p[l++]);return u}d=a.length;let f=e;for(l=0;l<d;){const p=a[l++],m=a[l++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=ud.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,d=h.length;l<d;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=rr(this.defaults,t);const e=ed(t.baseURL,t.url,t.allowAbsoluteUrls);return Xf(e,t.params,t.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(n){Ui.prototype[n]=function(t,e){return this.request(rr(e||{},{method:n,url:t,data:(e||{}).data}))}}),k.forEach(["post","put","patch"],function(n){function t(e){return function(r,s,i){return this.request(rr(i||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}Ui.prototype[n]=t(),Ui.prototype[n+"Form"]=t(!0)});const Yi=Ui;class dc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(s,i,o){r.reason||(r.reason=new Dr(s,i,o),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new dc(function(e){t=e}),cancel:t}}}const xw=dc;function Sw(n){return function(t){return n.apply(null,t)}}function _w(n){return k.isObject(n)&&n.isAxiosError===!0}const mc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mc).forEach(([n,t])=>{mc[t]=n});const Ew=mc;function dd(n){const t=new Yi(n),e=If(Yi.prototype.request,t);return k.extend(e,Yi.prototype,t,{allOwnKeys:!0}),k.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return dd(rr(n,r))},e}const Bt=dd(ac);Bt.Axios=Yi,Bt.CanceledError=Dr,Bt.CancelToken=xw,Bt.isCancel=Jf,Bt.VERSION=ld,Bt.toFormData=ki,Bt.AxiosError=mt,Bt.Cancel=Bt.CanceledError,Bt.all=function(n){return Promise.all(n)},Bt.spread=Sw,Bt.isAxiosError=_w,Bt.mergeConfig=rr,Bt.AxiosHeaders=Fe,Bt.formToJSON=n=>qf(k.isHTMLForm(n)?new FormData(n):n),Bt.getAdapter=hd.getAdapter,Bt.HttpStatusCode=Ew,Bt.default=Bt;const Cw=Bt;class Tw{instance;constructor(t){this.instance=Cw.create(t),this.instance.interceptors.request.use(e=>(t?.interceptors?.request?.(e),e),e=>(t?.interceptors?.requestError?.(e),Promise.reject(e))),this.instance.interceptors.response.use(e=>(t?.interceptors?.response?.(e),e.status==200,Promise.resolve(e)),e=>(t?.interceptors?.responseError?.(e),Promise.reject(e)))}request(t){let e=!1;const r=this.instance.request;return r.cancel=()=>{e=!0},r(t).then(s=>{if(e)throw new Error("Canceled!");return s})}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,r){return this.request({...r,method:"post",url:t,data:e})}postFormData(t,e,r){return r={...r,headers:{...r?.headers,"Content-Type":"multipart/form-data"}},this.request({...r,method:"post",url:t,data:e})}postForm(t,e,r){return this.instance.postForm(t,e,{...r})}put(t,e,r){return this.request({...r,method:"put",url:t,data:e})}patch(t,e,r){return this.request({...r,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}function Pw(n,t=(e,r)=>e<=r){const e=n.length;let r=Math.floor(e/2);for(;r>0;){for(let s=r;s<e;s++){const i=n[s];let o=s;for(;o>=r&&!t(n[o-r],i);)n[o]=n[o-r],o-=r;n[o]=i}r=Math.floor(r/2)}}function ji(n,t){const e=typeof t?.aliveInSeconds=="number"?Math.max(t.aliveInSeconds,0):-1,r=typeof t?.aliveUntilTimestamp=="number"?Math.max(t.aliveUntilTimestamp,0):-1;function s(o,a=!1){return C1(o)||rf(o)||tf(o)?{value:o,timestamp:Pr()}:a&&Object.prototype.hasOwnProperty.call(o,"timestamp")?o:{...o,timestamp:Pr()}}let i=s(n,!0);return{get:()=>{let o=!1;return(e>=0&&Pr()>Me(i.timestamp,0)+e*1e3||r>=0&&Pr()>r)&&(o=!0),o&&(i.value=void 0),i},set:o=>i=s(o,!1)}}function pc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Aw(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),e}var md={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(e){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(g,w){var x=g[0],v=g[1],E=g[2],_=g[3];x+=(v&E|~v&_)+w[0]-680876936|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[1]-389564586|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[2]+606105819|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[3]-1044525330|0,v=(v<<22|v>>>10)+E|0,x+=(v&E|~v&_)+w[4]-176418897|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[5]+1200080426|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[6]-1473231341|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[7]-45705983|0,v=(v<<22|v>>>10)+E|0,x+=(v&E|~v&_)+w[8]+1770035416|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[9]-1958414417|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[10]-42063|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[11]-1990404162|0,v=(v<<22|v>>>10)+E|0,x+=(v&E|~v&_)+w[12]+1804603682|0,x=(x<<7|x>>>25)+v|0,_+=(x&v|~x&E)+w[13]-40341101|0,_=(_<<12|_>>>20)+x|0,E+=(_&x|~_&v)+w[14]-1502002290|0,E=(E<<17|E>>>15)+_|0,v+=(E&_|~E&x)+w[15]+1236535329|0,v=(v<<22|v>>>10)+E|0,x+=(v&_|E&~_)+w[1]-165796510|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[6]-1069501632|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[11]+643717713|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[0]-373897302|0,v=(v<<20|v>>>12)+E|0,x+=(v&_|E&~_)+w[5]-701558691|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[10]+38016083|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[15]-660478335|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[4]-405537848|0,v=(v<<20|v>>>12)+E|0,x+=(v&_|E&~_)+w[9]+568446438|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[14]-1019803690|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[3]-187363961|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[8]+1163531501|0,v=(v<<20|v>>>12)+E|0,x+=(v&_|E&~_)+w[13]-1444681467|0,x=(x<<5|x>>>27)+v|0,_+=(x&E|v&~E)+w[2]-51403784|0,_=(_<<9|_>>>23)+x|0,E+=(_&v|x&~v)+w[7]+1735328473|0,E=(E<<14|E>>>18)+_|0,v+=(E&x|_&~x)+w[12]-1926607734|0,v=(v<<20|v>>>12)+E|0,x+=(v^E^_)+w[5]-378558|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[8]-2022574463|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[11]+1839030562|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[14]-35309556|0,v=(v<<23|v>>>9)+E|0,x+=(v^E^_)+w[1]-1530992060|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[4]+1272893353|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[7]-155497632|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[10]-1094730640|0,v=(v<<23|v>>>9)+E|0,x+=(v^E^_)+w[13]+681279174|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[0]-358537222|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[3]-722521979|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[6]+76029189|0,v=(v<<23|v>>>9)+E|0,x+=(v^E^_)+w[9]-640364487|0,x=(x<<4|x>>>28)+v|0,_+=(x^v^E)+w[12]-421815835|0,_=(_<<11|_>>>21)+x|0,E+=(_^x^v)+w[15]+530742520|0,E=(E<<16|E>>>16)+_|0,v+=(E^_^x)+w[2]-995338651|0,v=(v<<23|v>>>9)+E|0,x+=(E^(v|~_))+w[0]-198630844|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[7]+1126891415|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[14]-1416354905|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[5]-57434055|0,v=(v<<21|v>>>11)+E|0,x+=(E^(v|~_))+w[12]+1700485571|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[3]-1894986606|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[10]-1051523|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[1]-2054922799|0,v=(v<<21|v>>>11)+E|0,x+=(E^(v|~_))+w[8]+1873313359|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[15]-30611744|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[6]-1560198380|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[13]+1309151649|0,v=(v<<21|v>>>11)+E|0,x+=(E^(v|~_))+w[4]-145523070|0,x=(x<<6|x>>>26)+v|0,_+=(v^(x|~E))+w[11]-1120210379|0,_=(_<<10|_>>>22)+x|0,E+=(x^(_|~v))+w[2]+718787259|0,E=(E<<15|E>>>17)+_|0,v+=(_^(E|~x))+w[9]-343485551|0,v=(v<<21|v>>>11)+E|0,g[0]=x+g[0]|0,g[1]=v+g[1]|0,g[2]=E+g[2]|0,g[3]=_+g[3]|0}function i(g){var w=[],x;for(x=0;x<64;x+=4)w[x>>2]=g.charCodeAt(x)+(g.charCodeAt(x+1)<<8)+(g.charCodeAt(x+2)<<16)+(g.charCodeAt(x+3)<<24);return w}function o(g){var w=[],x;for(x=0;x<64;x+=4)w[x>>2]=g[x]+(g[x+1]<<8)+(g[x+2]<<16)+(g[x+3]<<24);return w}function a(g){var w=g.length,x=[1732584193,-271733879,-1732584194,271733878],v,E,_,D,z,O;for(v=64;v<=w;v+=64)s(x,i(g.substring(v-64,v)));for(g=g.substring(v-64),E=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0;v<E;v+=1)_[v>>2]|=g.charCodeAt(v)<<(v%4<<3);if(_[v>>2]|=128<<(v%4<<3),v>55)for(s(x,_),v=0;v<16;v+=1)_[v]=0;return D=w*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(D[2],16),O=parseInt(D[1],16)||0,_[14]=z,_[15]=O,s(x,_),x}function c(g){var w=g.length,x=[1732584193,-271733879,-1732584194,271733878],v,E,_,D,z,O;for(v=64;v<=w;v+=64)s(x,o(g.subarray(v-64,v)));for(g=v-64<w?g.subarray(v-64):new Uint8Array(0),E=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0;v<E;v+=1)_[v>>2]|=g[v]<<(v%4<<3);if(_[v>>2]|=128<<(v%4<<3),v>55)for(s(x,_),v=0;v<16;v+=1)_[v]=0;return D=w*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(D[2],16),O=parseInt(D[1],16)||0,_[14]=z,_[15]=O,s(x,_),x}function h(g){var w="",x;for(x=0;x<4;x+=1)w+=r[g>>x*8+4&15]+r[g>>x*8&15];return w}function u(g){var w;for(w=0;w<g.length;w+=1)g[w]=h(g[w]);return g.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function g(w,x){return w=w|0||0,w<0?Math.max(w+x,0):Math.min(w,x)}ArrayBuffer.prototype.slice=function(w,x){var v=this.byteLength,E=g(w,v),_=v,D,z,O,L;return x!==e&&(_=g(x,v)),E>_?new ArrayBuffer(0):(D=_-E,z=new ArrayBuffer(D),O=new Uint8Array(z),L=new Uint8Array(this,E,D),O.set(L),z)}}();function l(g){return/[\u0080-\uFFFF]/.test(g)&&(g=unescape(encodeURIComponent(g))),g}function d(g,w){var x=g.length,v=new ArrayBuffer(x),E=new Uint8Array(v),_;for(_=0;_<x;_+=1)E[_]=g.charCodeAt(_);return w?E:v}function f(g){return String.fromCharCode.apply(null,new Uint8Array(g))}function p(g,w,x){var v=new Uint8Array(g.byteLength+w.byteLength);return v.set(new Uint8Array(g)),v.set(new Uint8Array(w),g.byteLength),x?v:v.buffer}function m(g){var w=[],x=g.length,v;for(v=0;v<x-1;v+=2)w.push(parseInt(g.substr(v,2),16));return String.fromCharCode.apply(String,w)}function b(){this.reset()}return b.prototype.append=function(g){return this.appendBinary(l(g)),this},b.prototype.appendBinary=function(g){this._buff+=g,this._length+=g.length;var w=this._buff.length,x;for(x=64;x<=w;x+=64)s(this._hash,i(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},b.prototype.end=function(g){var w=this._buff,x=w.length,v,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_;for(v=0;v<x;v+=1)E[v>>2]|=w.charCodeAt(v)<<(v%4<<3);return this._finish(E,x),_=u(this._hash),g&&(_=m(_)),this.reset(),_},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(g){return this._buff=g.buff,this._length=g.length,this._hash=g.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(g,w){var x=w,v,E,_;if(g[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,g),x=0;x<16;x+=1)g[x]=0;v=this._length*8,v=v.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(v[2],16),_=parseInt(v[1],16)||0,g[14]=E,g[15]=_,s(this._hash,g)},b.hash=function(g,w){return b.hashBinary(l(g),w)},b.hashBinary=function(g,w){var x=a(g),v=u(x);return w?m(v):v},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(g){var w=p(this._buff.buffer,g,!0),x=w.length,v;for(this._length+=g.byteLength,v=64;v<=x;v+=64)s(this._hash,o(w.subarray(v-64,v)));return this._buff=v-64<x?new Uint8Array(w.buffer.slice(v-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(g){var w=this._buff,x=w.length,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,_;for(E=0;E<x;E+=1)v[E>>2]|=w[E]<<(E%4<<3);return this._finish(v,x),_=u(this._hash),g&&(_=m(_)),this.reset(),_},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var g=b.prototype.getState.call(this);return g.buff=f(g.buff),g},b.ArrayBuffer.prototype.setState=function(g){return g.buff=d(g.buff,!0),b.prototype.setState.call(this,g)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(g,w){var x=c(new Uint8Array(g)),v=u(x);return w?m(v):v},b})})(md);var Mw=md.exports;const Dw=pc(Mw);function Ow(n='script[type="text/js-worker"]'){return Array.prototype.map.call(document.querySelectorAll(n),t=>t.textContent)}const gc=n=>new XMLSerializer().serializeToString(n),Iw=(n,t="text/html")=>new DOMParser().parseFromString(n,t),pd=(n,t={mime:He["image/svg+xml"],encode:vi.utf8})=>Pa(gc(n),t);async function yc(n=["*"],t){let e=[];const r=document.createElement("input");return r.setAttribute("type","file"),r.setAttribute("visibility","hidden"),r.setAttribute("accept",n.join(",")),t&&r.setAttribute("multiple","true"),r.addEventListener("click",s=>{r.value=""},!1),new Promise((s,i)=>{r.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?i(new Error("Cancel")):s(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&i(new Error("Cancel"))},1e3)},{once:!0}),r.click()}).then(s=>(r.remove(),s)).catch(s=>{throw r.remove(),s})}function ds(n,t=Ae.text,e){return new Promise((r,s)=>{const i=new FileReader;switch(i.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),i.addEventListener("load",o=>{r(o.target?.result)}),i.addEventListener("error",o=>{s(o)}),t){case Ae.dataURL:i.readAsDataURL(n);break;case Ae.binaryString:i.readAsBinaryString(n);break;case Ae.arraybuffer:i.readAsArrayBuffer(n);break;case Ae.text:default:i.readAsText(n)}})}async function Rw(n){const t=await ds(n,Ae.arraybuffer);return m1(t)}function gd(n,t,e,r,s,i,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<r.size)gd(n,t,e,r,s,o,Math.min(o+s,r.size));else return n(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(r.slice(i,o))}async function yd(n,t=1*1024*1024){return await new Promise((e,r)=>gd(e,r,new Dw.ArrayBuffer,n,t,0,Math.min(t,n.size)))}class kw{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new Tw({baseURL:t.baseURL,interceptors:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1*1024*1024,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await yd(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postFormData(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{q1(this.time,1),this.onTime?.(X1(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}function bd(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,r=t.length;e<r;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function vd(n,t){return new Promise((e,r)=>{const{method:s="GET",data:i={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:u="json",timeout:l=3e4}=t||{},d=bd();d.timeout=l,d.responseType=u,d.onreadystatechange=function(w){d.readyState===4&&(d.status===200?e(d.response):r(d.statusText))},d.ontimeout=()=>{r(`${n} is timed out for ${l}ms.`)},d.addEventListener("load",w=>t?.load?.(w,d),!1),d.addEventListener("loadstart",w=>t?.loadstart?.(w,d),!1),d.addEventListener("loadend",w=>t?.loadend?.(w,d),!1),d.addEventListener("progress",w=>{if(w.lengthComputable){const x=Math.round(w.loaded*100/w.total);t?.progress?.(w,d,x)}},!1),d.addEventListener("error",w=>t?.error?.(w,d),!1),d.addEventListener("abort",w=>t?.abort?.(w,d),!1);const f=s.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,m=!1,b=!1;function g(){d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT"),h&&(d.withCredentials=!0);for(const w in c)Wt(w).toLowerCase()=="content-type"&&c[w].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(Wt(w).toLowerCase()=="content-type"&&(c[w].toLowerCase().indexOf("text/plain")>=0?m=!0:c[w].toLowerCase().indexOf("application/json")>=0&&(b=!0)),d.setRequestHeader(w,c[w]))}switch(f){case"GET":let w="";i instanceof FormData?w=Xb(i):w=Gb(i),d.open("GET",jb(n,w),!0),g(),d.send(null);break;default:d.open(f,n,!0),g(),p?d.sendAsBinary(o):b?d.send(JSON.stringify(i)):m?d.send(Object.entries(i).map(([x,v])=>`${x}=${v}`).join(`\r
19
+ `)):d.send(Object.entries(i).map(([x,v])=>`${encodeURIComponent(x)}=${encodeURIComponent(v)}`).join("&"));break}})}async function Lw(n){const t={url:n.action||"",data:{},contentType:n.method.toLowerCase()==="post"&&n.enctype?n.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],r=t.contentType=="multipart/form-data";for(let s=0;s<n.elements.length;s++){const i=n.elements[s];if(!i.hasAttribute("name"))continue;const o=i.getAttribute("type");switch(i.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=i;if(r)for(let l=0,d=c.files?.length||0;l<d;l++){const f=c.files?.[l];if(f){const p=await ds(f,Ae.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+f.name+`"\r
20
20
  Content-Type: `+f.type+`\r
21
21
  \r
22
22
  `+p+`\r
@@ -26,9 +26,9 @@ Content-Type: `+f.type+`\r
26
26
  `):t.data[u.name]=u.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
27
27
  `+e.join("--"+t.boundary+`\r
28
28
  `)+"--"+t.boundary+`--\r
29
- `,t}function vd(n){const t=[];for(let e=0,r=hl.length;e<r;e++){const s=Wt(hl[e]+n);t.push(s)}return t}function ms(n,t,e){const r=Dl(n);return r.props.style=r.props.style||{},t?r.props.style[t]||r.props.style[Jl(t)]||r.props.style[Wt(t)]||"":r.props.style}function Or(n,t,e){la(n,r=>{r.props.style=r.props.style||{},typeof t=="string"&&e?r.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(s=>{r.props.style[s]=t[s]})}),Ol()}function bc(n,t=!1){const e={};if(!t)if(getComputedStyle){const r=getComputedStyle(n);for(let s=0,i=r.length;s<i;s++){const o=r[s];e[o]=r.getPropertyValue(o)}}else{const r=n.style||n.currentStyle;for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return n.style.cssText&&n.style.cssText.split(";").filter(r=>!!r).forEach(r=>{const[s,i]=r.split(":").map(o=>o.trim());s&&i&&(e[s]=i)}),e}function Lw(n,t){const e=vd(t),r=e.length;let s="";for(let i=0;i<r;i++){const o=e[i];if(s=n[o]||"",s)return s}return s}function Nw(n,t,e){const r=vd(t),s=r.length;let i="";for(let o=0;o<s;o++){const a=r[o];if(i="style"in n&&n.style[a]||"currentStyle"in n&&n.currentStyle[a]||"",i)return i}if(getComputedStyle){const o=getComputedStyle(n,e);for(let a=0;a<s;a++){const c=r[a];if(i=o.getPropertyValue(c).trim(),i)return i}}return i}function ps(n,t,e){if(t)if(typeof t=="string"&&e)try{n.style.setProperty(t,e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":"")}catch{n.style[t]=e}else t instanceof Object&&Object.keys(t).forEach(r=>{ps(n,r,t[r])})}function vc(n,t){typeof t=="string"?n.style.removeProperty(Wt(t)):Object.keys(t).forEach(e=>{vc(n,e)})}function wd(n,t){if(!document)return()=>{};let e;if(typeof t=="string"){const r=document.querySelector(t)?.shadowRoot;r?e=r:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const r=document.createElement("style");return r.innerHTML=n,e.appendChild(r),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(r)}}else{const r=document.styleSheets[0].insertRule(n);return()=>{document.styleSheets[0].deleteRule(r)}}}class zw{selector;name;value;constructor(t,e,r){this.selector=t,this.name=e,this.value=r}toString(){return`${this.selector} { ${this.name}: ${this.value} }`}}class Vw{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new zw(t,this.propertyName,e))}}async function xd(){const n=[],t=document.querySelectorAll("style, link");for(let e=0,r=t.length;e<r;e++){const s=t[e];let i=s.innerHTML;switch(s.nodeName.toLowerCase()){case"style":break;case"link":i=await bd(s.href,{method:"GET",responseType:"text"});break}i=i.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),n.push(i)}return n}async function Fw(){const n={},t=await xd();for(let e=0,r=t.length;e<r;e++){const i=t[e].match(/[^{]*{[^}]*}/g);if(i)for(let o=0,a=i.length;o<a;o++){const c=i[o].split(/[{}]/g),h=c[0].trim(),l=c[1].split(";");for(let d=0;d<l.length;d++)if(l[d].trim()!=""){const f=l[d].split(":"),p=f[0].trim().toLowerCase(),m=f[1];n[p]||(n[p]=new Vw(p)),m&&n[p].add(h,m.trim())}}}return n}function An(n,t,e){if(t===void 0&&e===void 0)return wc(n);if(typeof t=="string"&&e===void 0)return Sd(n,t);typeof t=="object"?la(n,r=>{for(const s in t)s=="style"?Or(n,s,t[s]):Object.prototype.hasOwnProperty.call(t,s)&&(r.props[s]=""+t[s])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?Or(n,t,e):la(n,r=>{r.props[t]=""+e})),Ol()}function wc(n){const t={};for(let e=0,r=n.attributes,s=r.length;e<s;e++){const i=r[e];i.nodeName&&i.nodeValue&&(i.nodeName==="style"?t[i.nodeName]=bc(n,!0):t[i.nodeName]=i.nodeValue)}return t}function Sd(n,t){return t==="style"?bc(n,!0):n.getAttribute(Wt(t))}function sr(n,t,e){return n.setAttribute(Wt(t),""+e)}function Bw(n,t){t.split(/[,\s]+/i).forEach(e=>{const r=Wt(e.trim());r!=""&&n.removeAttribute(r)})}function _d(n,t){for(const e in t){const r=t[e];switch(e){case"fill":r!=="none"&&(n.fillStyle=r);break;case"stroke":r!=="none"&&(n.strokeStyle=r);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(r);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=r;break;case"stroke-linejoin":case"strokeLinejoin":switch(r){case"round":case"bevel":case"miter":n.lineJoin=r;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(r);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(r);break;case"stroke-dasharray":case"strokeDasharray":typeof r=="string"&&n.setLineDash(r.split(/\s+/).map(s=>Number(s)));break;case"cursor":break;case"font":typeof r=="string"&&(n.font=r);break;case"font-size":case"fontSize":n.font+=` ${r}`;break;case"font-family":case"fontFamily":n.font+=` ${r}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(r){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(r){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=r;break;default:n.textBaseline="alphabetic";break}break}}}var xc=function(n,t){return xc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},xc(n,t)};function Ke(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xc(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function $w(n,t,e,r){function s(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function a(u){try{h(r.next(u))}catch(l){o(l)}}function c(u){try{h(r.throw(u))}catch(l){o(l)}}function h(u){u.done?i(u.value):s(u.value).then(a,c)}h((r=r.apply(n,t||[])).next())})}function Ed(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(h){return function(u){return c([h,u])}}function c(h){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(r=1,s&&(i=h[0]&2?s.return:h[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,h[1])).done)return i;switch(s=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,s=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){e.label=h[1];break}if(h[0]===6&&e.label<i[1]){e.label=i[1],i=h;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(h);break}i[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(n,e)}catch(u){h=[6,u],s=0}finally{r=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function ir(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function hn(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function Mn(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function Ir(n){return this instanceof Ir?(this.v=n,this):new Ir(n)}function Uw(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),s,i=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){r[f]&&(s[f]=function(m){return new Promise(function(b,g){i.push([f,m,b,g])>1||c(f,m)})},p&&(s[f]=p(s[f])))}function c(f,p){try{h(r[f](p))}catch(m){d(i[0][3],m)}}function h(f){f.value instanceof Ir?Promise.resolve(f.value.v).then(u,l):d(i[0][2],f)}function u(f){c("next",f)}function l(f){c("throw",f)}function d(f,p){f(p),i.shift(),i.length&&c(i[0][0],i[0][1])}}function Yw(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof ir=="function"?ir(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=n[i]&&function(o){return new Promise(function(a,c){o=n[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(h){i({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function Et(n){return typeof n=="function"}function Sc(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var _c=Sc(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
29
+ `,t}function wd(n){const t=[];for(let e=0,r=ul.length;e<r;e++){const s=Wt(ul[e]+n);t.push(s)}return t}function ms(n,t,e){const r=Ol(n);return r.props.style=r.props.style||{},t?r.props.style[t]||r.props.style[Zl(t)]||r.props.style[Wt(t)]||"":r.props.style}function Or(n,t,e){la(n,r=>{r.props.style=r.props.style||{},typeof t=="string"&&e?r.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(s=>{r.props.style[s]=t[s]})}),Il()}function bc(n,t=!1){const e={};if(!t)if(getComputedStyle){const r=getComputedStyle(n);for(let s=0,i=r.length;s<i;s++){const o=r[s];e[o]=r.getPropertyValue(o)}}else{const r=n.style||n.currentStyle;for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return n.style.cssText&&n.style.cssText.split(";").filter(r=>!!r).forEach(r=>{const[s,i]=r.split(":").map(o=>o.trim());s&&i&&(e[s]=i)}),e}function Nw(n,t){const e=wd(t),r=e.length;let s="";for(let i=0;i<r;i++){const o=e[i];if(s=n[o]||"",s)return s}return s}function zw(n,t,e){const r=wd(t),s=r.length;let i="";for(let o=0;o<s;o++){const a=r[o];if(i="style"in n&&n.style[a]||"currentStyle"in n&&n.currentStyle[a]||"",i)return i}if(getComputedStyle){const o=getComputedStyle(n,e);for(let a=0;a<s;a++){const c=r[a];if(i=o.getPropertyValue(c).trim(),i)return i}}return i}function ps(n,t,e){if(t)if(typeof t=="string"&&e)try{n.style.setProperty(t,e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":"")}catch{n.style[t]=e}else t instanceof Object&&Object.keys(t).forEach(r=>{ps(n,r,t[r])})}function vc(n,t){typeof t=="string"?n.style.removeProperty(Wt(t)):Object.keys(t).forEach(e=>{vc(n,e)})}function xd(n,t){if(!document)return()=>{};let e;if(typeof t=="string"){const r=document.querySelector(t)?.shadowRoot;r?e=r:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const r=document.createElement("style");return r.innerHTML=n,e.appendChild(r),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(r)}}else{const r=document.styleSheets[0].insertRule(n);return()=>{document.styleSheets[0].deleteRule(r)}}}class Vw{selector;name;value;constructor(t,e,r){this.selector=t,this.name=e,this.value=r}toString(){return`${this.selector} { ${this.name}: ${this.value} }`}}class Fw{propertyName;values=[];constructor(t){this.propertyName=t}add(t,e){this.values.push(new Vw(t,this.propertyName,e))}}async function Sd(){const n=[],t=document.querySelectorAll("style, link");for(let e=0,r=t.length;e<r;e++){const s=t[e];let i=s.innerHTML;switch(s.nodeName.toLowerCase()){case"style":break;case"link":i=await vd(s.href,{method:"GET",responseType:"text"});break}i=i.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,"").replace(/@[^{};]*;|@[^{};]*\{[^}]*\}/g,"").replace(/[\\n\n]+(?<=[\\n\n]+)\s+/g,""),n.push(i)}return n}async function Bw(){const n={},t=await Sd();for(let e=0,r=t.length;e<r;e++){const i=t[e].match(/[^{]*{[^}]*}/g);if(i)for(let o=0,a=i.length;o<a;o++){const c=i[o].split(/[{}]/g),h=c[0].trim(),l=c[1].split(";");for(let d=0;d<l.length;d++)if(l[d].trim()!=""){const f=l[d].split(":"),p=f[0].trim().toLowerCase(),m=f[1];n[p]||(n[p]=new Fw(p)),m&&n[p].add(h,m.trim())}}}return n}function An(n,t,e){if(t===void 0&&e===void 0)return wc(n);if(typeof t=="string"&&e===void 0)return _d(n,t);typeof t=="object"?la(n,r=>{for(const s in t)s=="style"?Or(n,s,t[s]):Object.prototype.hasOwnProperty.call(t,s)&&(r.props[s]=""+t[s])}):typeof t=="string"&&typeof e=="string"&&(t=="style"?Or(n,t,e):la(n,r=>{r.props[t]=""+e})),Il()}function wc(n){const t={};for(let e=0,r=n.attributes,s=r.length;e<s;e++){const i=r[e];i.nodeName&&i.nodeValue&&(i.nodeName==="style"?t[i.nodeName]=bc(n,!0):t[i.nodeName]=i.nodeValue)}return t}function _d(n,t){return t==="style"?bc(n,!0):n.getAttribute(Wt(t))}function sr(n,t,e){return n.setAttribute(Wt(t),""+e)}function $w(n,t){t.split(/[,\s]+/i).forEach(e=>{const r=Wt(e.trim());r!=""&&n.removeAttribute(r)})}function Ed(n,t){for(const e in t){const r=t[e];switch(e){case"fill":r!=="none"&&(n.fillStyle=r);break;case"stroke":r!=="none"&&(n.strokeStyle=r);break;case"stroke-width":case"strokeWidth":n.lineWidth=Number(r);break;case"stroke-linecap":case"strokeLinecap":n.lineCap=r;break;case"stroke-linejoin":case"strokeLinejoin":switch(r){case"round":case"bevel":case"miter":n.lineJoin=r;break;default:n.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":n.miterLimit=Number(r);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":n.lineDashOffset=Number(r);break;case"stroke-dasharray":case"strokeDasharray":typeof r=="string"&&n.setLineDash(r.split(/\s+/).map(s=>Number(s)));break;case"cursor":break;case"font":typeof r=="string"&&(n.font=r);break;case"font-size":case"fontSize":n.font+=` ${r}`;break;case"font-family":case"fontFamily":n.font+=` ${r}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(r){case"middle":n.textAlign="center";break;case"end":n.textAlign="end";break;case"start":n.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(r){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":n.textBaseline=r;break;default:n.textBaseline="alphabetic";break}break}}}var xc=function(n,t){return xc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},xc(n,t)};function Ke(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xc(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Uw(n,t,e,r){function s(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function a(u){try{h(r.next(u))}catch(l){o(l)}}function c(u){try{h(r.throw(u))}catch(l){o(l)}}function h(u){u.done?i(u.value):s(u.value).then(a,c)}h((r=r.apply(n,t||[])).next())})}function Cd(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(h){return function(u){return c([h,u])}}function c(h){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(r=1,s&&(i=h[0]&2?s.return:h[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,h[1])).done)return i;switch(s=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,s=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){e.label=h[1];break}if(h[0]===6&&e.label<i[1]){e.label=i[1],i=h;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(h);break}i[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(n,e)}catch(u){h=[6,u],s=0}finally{r=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function ir(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function hn(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function Mn(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function Ir(n){return this instanceof Ir?(this.v=n,this):new Ir(n)}function Yw(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),s,i=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){r[f]&&(s[f]=function(m){return new Promise(function(b,g){i.push([f,m,b,g])>1||c(f,m)})},p&&(s[f]=p(s[f])))}function c(f,p){try{h(r[f](p))}catch(m){d(i[0][3],m)}}function h(f){f.value instanceof Ir?Promise.resolve(f.value.v).then(u,l):d(i[0][2],f)}function u(f){c("next",f)}function l(f){c("throw",f)}function d(f,p){f(p),i.shift(),i.length&&c(i[0][0],i[0][1])}}function jw(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof ir=="function"?ir(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=n[i]&&function(o){return new Promise(function(a,c){o=n[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(h){i({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function Et(n){return typeof n=="function"}function Sc(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var _c=Sc(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
30
30
  `+e.map(function(r,s){return s+1+") "+r.toString()}).join(`
31
- `):"",this.name="UnsubscriptionError",this.errors=e}});function gs(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Rr=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ir(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(Et(u))try{u()}catch(m){i=m instanceof _c?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=ir(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Pd(p)}catch(m){i=i??[],m instanceof _c?i=Mn(Mn([],hn(i)),hn(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new _c(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Pd(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&gs(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&gs(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Cd=Rr.EMPTY;function Td(n){return n instanceof Rr||n&&"closed"in n&&Et(n.remove)&&Et(n.add)&&Et(n.unsubscribe)}function Pd(n){Et(n)?n():n.unsubscribe()}var Ad={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ec={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=Ec.delegate;return s?.setTimeout?s.setTimeout.apply(s,Mn([n,t],hn(e))):setTimeout.apply(void 0,Mn([n,t],hn(e)))},clearTimeout:function(n){var t=Ec.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Md(n){Ec.setTimeout(function(){throw n})}function ys(){}function Gi(n){n()}var Cc=function(n){Ke(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Td(e)&&e.add(r)):r.destination=Ww,r}return t.create=function(e,r,s){return new kr(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Rr),jw=Function.prototype.bind;function Tc(n,t){return jw.call(n,t)}var Gw=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){Xi(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){Xi(r)}else Xi(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Xi(e)}},n}(),kr=function(n){Ke(t,n);function t(e,r,s){var i=n.call(this)||this,o;if(Et(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;i&&Ad.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Tc(e.next,a),error:e.error&&Tc(e.error,a),complete:e.complete&&Tc(e.complete,a)}):o=e}return i.destination=new Gw(o),i}return t}(Cc);function Xi(n){Md(n)}function Xw(n){throw n}var Ww={closed:!0,next:ys,error:Xw,complete:ys},Pc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function or(n){return n}function Hw(n){return n.length===0?or:n.length===1?n[0]:function(e){return n.reduce(function(r,s){return s(r)},e)}}var Nt=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=Kw(t)?t:new kr(t,e,r);return Gi(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Dd(e),new e(function(s,i){var o=new kr({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Pc]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Hw(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Dd(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n}();function Dd(n){var t;return(t=n??Ad.Promise)!==null&&t!==void 0?t:Promise}function qw(n){return n&&Et(n.next)&&Et(n.error)&&Et(n.complete)}function Kw(n){return n&&n instanceof Cc||qw(n)&&Td(n)}function Jw(n){return Et(n?.lift)}function oe(n){return function(t){if(Jw(t))return t.lift(function(e){try{return n(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function $t(n,t,e,r,s){return new Zw(n,t,e,r,s)}var Zw=function(n){Ke(t,n);function t(e,r,s,i,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(h){try{r(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=i?function(h){try{i(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(Cc),Qw=Sc(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),un=function(n){Ke(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new Od(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Qw},t.prototype.next=function(e){var r=this;Gi(function(){var s,i;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=ir(r.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var r=this;Gi(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var s=r.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Gi(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,s=this,i=s.hasError,o=s.isStopped,a=s.observers;return i||o?Cd:(this.currentObservers=null,a.push(e),new Rr(function(){r.currentObservers=null,gs(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,s=r.hasError,i=r.thrownError,o=r.isStopped;s?e.error(i):o&&e.complete()},t.prototype.asObservable=function(){var e=new Nt;return e.source=this,e},t.create=function(e,r){return new Od(e,r)},t}(Nt),Od=function(n){Ke(t,n);function t(e,r){var s=n.call(this)||this;return s.destination=e,s.source=r,s}return t.prototype.next=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,e)},t.prototype.error=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&s!==void 0?s:Cd},t}(un),Wi=function(n){Ke(t,n);function t(e){var r=n.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=n.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,s=e.thrownError,i=e._value;if(r)throw s;return this._throwIfClosed(),i},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(un),Ac={now:function(){return(Ac.delegate||Date).now()},delegate:void 0},tx=function(n){Ke(t,n);function t(e,r,s){e===void 0&&(e=1/0),r===void 0&&(r=1/0),s===void 0&&(s=Ac);var i=n.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=s,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return t.prototype.next=function(e){var r=this,s=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,c=r._windowTime;s||(i.push(e),!o&&i.push(a.now()+c)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(e),s=this,i=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=i?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),r},t.prototype._trimBuffer=function(){var e=this,r=e._bufferSize,s=e._timestampProvider,i=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*r;if(r<1/0&&a<i.length&&i.splice(0,i.length-a),!o){for(var c=s.now(),h=0,u=1;u<i.length&&i[u]<=c;u+=2)h=u;h&&i.splice(0,h+1)}},t}(un),ex=function(n){Ke(t,n);function t(e,r){return n.call(this)||this}return t.prototype.schedule=function(e,r){return this},t}(Rr),Hi={setInterval:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=Hi.delegate;return s?.setInterval?s.setInterval.apply(s,Mn([n,t],hn(e))):setInterval.apply(void 0,Mn([n,t],hn(e)))},clearInterval:function(n){var t=Hi.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},nx=function(n){Ke(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.scheduler=e,s.work=r,s.pending=!1,s}return t.prototype.schedule=function(e,r){var s;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,r)),this.pending=!0,this.delay=r,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,r),this},t.prototype.requestAsyncId=function(e,r,s){return s===void 0&&(s=0),Hi.setInterval(e.flush.bind(e,this),s)},t.prototype.recycleAsyncId=function(e,r,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return r;r!=null&&Hi.clearInterval(r)},t.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(e,r);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,r){var s=!1,i;try{this.work(e)}catch(o){s=!0,i=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,s=e.scheduler,i=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,gs(i,this),r!=null&&(this.id=this.recycleAsyncId(s,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(ex),Id=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},n.now=Ac.now,n}(),rx=function(n){Ke(t,n);function t(e,r){r===void 0&&(r=Id.now);var s=n.call(this,e,r)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var s;this._active=!0;do if(s=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,s){for(;e=r.shift();)e.unsubscribe();throw s}},t}(Id),Mc=new rx(nx),sx=Mc,Rd=new Nt(function(n){return n.complete()});function kd(n){return n&&Et(n.schedule)}function Dc(n){return n[n.length-1]}function ix(n){return Et(Dc(n))?n.pop():void 0}function bs(n){return kd(Dc(n))?n.pop():void 0}function ox(n,t){return typeof Dc(n)=="number"?n.pop():t}var Oc=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Ld(n){return Et(n?.then)}function Nd(n){return Et(n[Pc])}function zd(n){return Symbol.asyncIterator&&Et(n?.[Symbol.asyncIterator])}function Vd(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ax(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Fd=ax();function Bd(n){return Et(n?.[Fd])}function $d(n){return Uw(this,arguments,function(){var e,r,s,i;return Ed(this,function(o){switch(o.label){case 0:e=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Ir(e.read())];case 3:return r=o.sent(),s=r.value,i=r.done,i?[4,Ir(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Ir(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ud(n){return Et(n?.getReader)}function jt(n){if(n instanceof Nt)return n;if(n!=null){if(Nd(n))return cx(n);if(Oc(n))return hx(n);if(Ld(n))return ux(n);if(zd(n))return Yd(n);if(Bd(n))return lx(n);if(Ud(n))return fx(n)}throw Vd(n)}function cx(n){return new Nt(function(t){var e=n[Pc]();if(Et(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function hx(n){return new Nt(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function ux(n){return new Nt(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Md)})}function lx(n){return new Nt(function(t){var e,r;try{for(var s=ir(n),i=s.next();!i.done;i=s.next()){var o=i.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}t.complete()})}function Yd(n){return new Nt(function(t){dx(n,t).catch(function(e){return t.error(e)})})}function fx(n){return Yd($d(n))}function dx(n,t){var e,r,s,i;return $w(this,void 0,void 0,function(){var o,a;return Ed(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=Yw(n),c.label=1;case 1:return[4,e.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(i=e.return)?[4,i.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ln(n,t,e,r,s){r===void 0&&(r=0),s===void 0&&(s=!1);var i=t.schedule(function(){e(),s?n.add(this.schedule(null,r)):this.unsubscribe()},r);if(n.add(i),!s)return i}function jd(n,t){return t===void 0&&(t=0),oe(function(e,r){e.subscribe($t(r,function(s){return ln(r,n,function(){return r.next(s)},t)},function(){return ln(r,n,function(){return r.complete()},t)},function(s){return ln(r,n,function(){return r.error(s)},t)}))})}function Ic(n,t){return t===void 0&&(t=0),oe(function(e,r){r.add(n.schedule(function(){return e.subscribe(r)},t))})}function mx(n,t){return jt(n).pipe(Ic(t),jd(t))}function px(n,t){return jt(n).pipe(Ic(t),jd(t))}function gx(n,t){return new Nt(function(e){var r=0;return t.schedule(function(){r===n.length?e.complete():(e.next(n[r++]),e.closed||this.schedule())})})}function yx(n,t){return new Nt(function(e){var r;return ln(e,t,function(){r=n[Fd](),ln(e,t,function(){var s,i,o;try{s=r.next(),i=s.value,o=s.done}catch(a){e.error(a);return}o?e.complete():e.next(i)},0,!0)}),function(){return Et(r?.return)&&r.return()}})}function Gd(n,t){if(!n)throw new Error("Iterable cannot be null");return new Nt(function(e){ln(e,t,function(){var r=n[Symbol.asyncIterator]();ln(e,t,function(){r.next().then(function(s){s.done?e.complete():e.next(s.value)})},0,!0)})})}function bx(n,t){return Gd($d(n),t)}function vx(n,t){if(n!=null){if(Nd(n))return mx(n,t);if(Oc(n))return gx(n,t);if(Ld(n))return px(n,t);if(zd(n))return Gd(n,t);if(Bd(n))return yx(n,t);if(Ud(n))return bx(n,t)}throw Vd(n)}function vs(n,t){return t?vx(n,t):jt(n)}function xx(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n);return vs(n,e)}var Sx=Sc(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function _x(n,t){var e=typeof t=="object";return new Promise(function(r,s){var i=new kr({next:function(o){r(o),i.unsubscribe()},error:s,complete:function(){e?r(t.defaultValue):s(new Sx)}});n.subscribe(i)})}function Ex(n){return n instanceof Date&&!isNaN(n)}function zt(n,t){return oe(function(e,r){var s=0;e.subscribe($t(r,function(i){r.next(n.call(t,i,s++))}))})}var Cx=Array.isArray;function Tx(n,t){return Cx(t)?n.apply(void 0,Mn([],hn(t))):n(t)}function Rc(n){return zt(function(t){return Tx(n,t)})}var Px=Array.isArray,Ax=Object.getPrototypeOf,Mx=Object.prototype,Dx=Object.keys;function Ox(n){if(n.length===1){var t=n[0];if(Px(t))return{args:t,keys:null};if(Ix(t)){var e=Dx(t);return{args:e.map(function(r){return t[r]}),keys:e}}}return{args:n,keys:null}}function Ix(n){return n&&typeof n=="object"&&Ax(n)===Mx}function Rx(n,t){return n.reduce(function(e,r,s){return e[r]=t[s],e},{})}function kx(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n),r=ix(n),s=Ox(n),i=s.args,o=s.keys;if(i.length===0)return vs([],e);var a=new Nt(Lx(i,e,o?function(c){return Rx(o,c)}:or));return r?a.pipe(Rc(r)):a}function Lx(n,t,e){return e===void 0&&(e=or),function(r){Xd(t,function(){for(var s=n.length,i=new Array(s),o=s,a=s,c=function(u){Xd(t,function(){var l=vs(n[u],t),d=!1;l.subscribe($t(r,function(f){i[u]=f,d||(d=!0,a--),a||r.next(e(i.slice()))},function(){--o||r.complete()}))},r)},h=0;h<s;h++)c(h)},r)}}function Xd(n,t,e){n?ln(e,n,t):t()}function Nx(n,t,e,r,s,i,o,a){var c=[],h=0,u=0,l=!1,d=function(){l&&!c.length&&!h&&t.complete()},f=function(m){return h<r?p(m):c.push(m)},p=function(m){i&&t.next(m),h++;var b=!1;jt(e(m,u++)).subscribe($t(t,function(g){s?.(g),i?f(g):t.next(g)},function(){b=!0},void 0,function(){if(b)try{h--;for(var g=function(){var w=c.shift();o?ln(t,o,function(){return p(w)}):p(w)};c.length&&h<r;)g();d()}catch(w){t.error(w)}}))};return n.subscribe($t(t,f,function(){l=!0,d()})),function(){a?.()}}function kc(n,t,e){return e===void 0&&(e=1/0),Et(t)?kc(function(r,s){return zt(function(i,o){return t(r,i,s,o)})(jt(n(r,s)))},e):(typeof t=="number"&&(e=t),oe(function(r,s){return Nx(r,s,n,e)}))}function Wd(n){return n===void 0&&(n=1/0),kc(or,n)}function zx(){return Wd(1)}function Hd(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return zx()(vs(n,bs(n)))}var Vx=["addListener","removeListener"],Fx=["addEventListener","removeEventListener"],Bx=["on","off"];function Lc(n,t,e,r){if(Et(e)&&(r=e,e=void 0),r)return Lc(n,t,e).pipe(Rc(r));var s=hn(Yx(n)?Fx.map(function(a){return function(c){return n[a](t,c,e)}}):$x(n)?Vx.map(qd(n,t)):Ux(n)?Bx.map(qd(n,t)):[],2),i=s[0],o=s[1];if(!i&&Oc(n))return kc(function(a){return Lc(a,t,e)})(jt(n));if(!i)throw new TypeError("Invalid event target");return new Nt(function(a){var c=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return a.next(1<h.length?h:h[0])};return i(c),function(){return o(c)}})}function qd(n,t){return function(e){return function(r){return n[e](t,r)}}}function $x(n){return Et(n.addListener)&&Et(n.removeListener)}function Ux(n){return Et(n.on)&&Et(n.off)}function Yx(n){return Et(n.addEventListener)&&Et(n.removeEventListener)}function kt(n,t,e){return e?kt(n,t).pipe(Rc(e)):new Nt(function(r){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return r.next(o.length===1?o[0]:o)},i=n(s);return Et(t)?function(){return t(s,i)}:void 0})}function jx(n,t,e){n===void 0&&(n=0),e===void 0&&(e=sx);var r=-1;return t!=null&&(kd(t)?e=t:r=t),new Nt(function(s){var i=Ex(n)?+n-e.now():n;i<0&&(i=0);var o=0;return e.schedule(function(){s.closed||(s.next(o++),0<=r?this.schedule(void 0,r):s.complete())},i)})}function qi(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n),r=ox(n,1/0),s=n;return s.length?s.length===1?jt(s[0]):Wd(r)(vs(s,e)):Rd}var Gx=Array.isArray;function Xx(n){return n.length===1&&Gx(n[0])?n[0]:n}function Nc(n,t){return oe(function(e,r){var s=0;e.subscribe($t(r,function(i){return n.call(t,i,s++)&&r.next(i)}))})}function Ki(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=Xx(n),n.length===1?jt(n[0]):new Nt(Wx(n))}function Wx(n){return function(t){for(var e=[],r=function(i){e.push(jt(n[i]).subscribe($t(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==i&&e[a].unsubscribe();e=null}t.next(o)})))},s=0;e&&!t.closed&&s<n.length;s++)r(s)}}function Kd(n){return oe(function(t,e){var r=null,s=!1,i;r=t.subscribe($t(e,void 0,void 0,function(o){i=jt(n(o,Kd(n)(t))),r?(r.unsubscribe(),r=null,i.subscribe(e)):s=!0})),s&&(r.unsubscribe(),r=null,i.subscribe(e))})}function Dn(n,t){return t===void 0&&(t=or),n=n??Hx,oe(function(e,r){var s,i=!0;e.subscribe($t(r,function(o){var a=t(o);(i||!n(s,a))&&(i=!1,s=a,r.next(o))}))})}function Hx(n,t){return n===t}function Jd(n,t){return t?function(e){return e.pipe(Jd(function(r,s){return jt(n(r,s)).pipe(zt(function(i,o){return t(r,i,s,o)}))}))}:oe(function(e,r){var s=0,i=null,o=!1;e.subscribe($t(r,function(a){i||(i=$t(r,void 0,function(){i=null,o&&r.complete()}),jt(n(a,s++)).subscribe(i))},function(){o=!0,!i&&r.complete()}))})}function qx(n){n===void 0&&(n={});var t=n.connector,e=t===void 0?function(){return new un}:t,r=n.resetOnError,s=r===void 0?!0:r,i=n.resetOnComplete,o=i===void 0?!0:i,a=n.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var u,l,d,f=0,p=!1,m=!1,b=function(){l?.unsubscribe(),l=void 0},g=function(){b(),u=d=void 0,p=m=!1},w=function(){var x=u;g(),x?.unsubscribe()};return oe(function(x,v){f++,!m&&!p&&b();var E=d=d??e();v.add(function(){f--,f===0&&!m&&!p&&(l=zc(w,c))}),E.subscribe(v),!u&&f>0&&(u=new kr({next:function(_){return E.next(_)},error:function(_){m=!0,b(),l=zc(g,s,_),E.error(_)},complete:function(){p=!0,b(),l=zc(g,o),E.complete()}}),jt(x).subscribe(u))})(h)}}function zc(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];if(t===!0){n();return}if(t!==!1){var s=new kr({next:function(){s.unsubscribe(),n()}});return jt(t.apply(void 0,Mn([],hn(e)))).subscribe(s)}}function Zd(n,t,e){var r,s,i,o,a=!1;return n&&typeof n=="object"?(r=n.bufferSize,o=r===void 0?1/0:r,s=n.windowTime,t=s===void 0?1/0:s,i=n.refCount,a=i===void 0?!1:i,e=n.scheduler):o=n??1/0,qx({connector:function(){return new tx(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function ar(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n);return oe(function(r,s){(e?Hd(n,r,e):Hd(n,r)).subscribe(s)})}function Ji(n,t){return oe(function(e,r){var s=null,i=0,o=!1,a=function(){return o&&!s&&r.complete()};e.subscribe($t(r,function(c){s?.unsubscribe();var h=0,u=i++;jt(n(c,u)).subscribe(s=$t(r,function(l){return r.next(t?t(c,l,u,h++):l)},function(){s=null,a()}))},function(){o=!0,a()}))})}function Kx(){return Ji(or)}function Vc(n){return oe(function(t,e){jt(n).subscribe($t(e,function(){return e.complete()},ys)),!e.closed&&t.subscribe(e)})}function cr(n,t,e){var r=Et(n)||t||e?{next:n,error:t,complete:e}:n;return r?oe(function(s,i){var o;(o=r.subscribe)===null||o===void 0||o.call(r);var a=!0;s.subscribe($t(i,function(c){var h;(h=r.next)===null||h===void 0||h.call(r,c),i.next(c)},function(){var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},function(c){var h;a=!1,(h=r.error)===null||h===void 0||h.call(r,c),i.error(c)},function(){var c,h;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(h=r.finalize)===null||h===void 0||h.call(r)}))}):or}function Jx(n,t){return oe(function(e,r){var s=t??{},i=s.leading,o=i===void 0?!0:i,a=s.trailing,c=a===void 0?!1:a,h=!1,u=null,l=null,d=!1,f=function(){l?.unsubscribe(),l=null,c&&(b(),d&&r.complete())},p=function(){l=null,d&&r.complete()},m=function(g){return l=jt(n(g)).subscribe($t(r,f,p))},b=function(){if(h){h=!1;var g=u;u=null,r.next(g),!d&&m(g)}};e.subscribe($t(r,function(g){h=!0,u=g,!(l&&!l.closed)&&(o?b():m(g))},function(){d=!0,!(c&&h&&l&&!l.closed)&&r.complete()}))})}function Zx(n,t,e){t===void 0&&(t=Mc);var r=jx(n,t);return Jx(function(){return r},e)}function Qx(n,t){return oe(function(e,r){var s=[],i=function(o){for(;0<s.length;)s.shift().error(o);r.error(o)};jt(n).subscribe($t(r,function(o){var a=new un;s.push(a);var c=new Rr,h=function(){gs(s,a),a.complete(),c.unsubscribe()},u;try{u=jt(t(o))}catch(l){i(l);return}r.next(a.asObservable()),c.add(u.subscribe($t(r,h,ys,i)))},ys)),e.subscribe($t(r,function(o){var a,c,h=s.slice();try{for(var u=ir(h),l=u.next();!l.done;l=u.next()){var d=l.value;d.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();r.complete()},i,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}function t2(n){return n.toElement?n.toElement:n.currentTarget?n.currentTarget:n.srcElement?n.srcElement:null}function Ct(n,t,e,r=!1){const s=async i=>{await e(i)};try{n.addEventListener(t,s,r)}catch{n.attachEvent("on"+t,s)}return()=>{try{n.removeEventListener(t,s,r)}catch{n.detachEvent("on"+t,s)}}}function e2(n,t,e,r,s=!1){return Ct(n||document.body,e,i=>{i.target===t&&r(i)},s)}function n2(n){n.replaceWith(n.cloneNode(!0))}function it(n,t,e=!1){return Lc(n,t,{capture:e})}function r2(n){const t=kt(e=>n.register(e),(e,r)=>{n.unregister?.(e,...r||[])},(...e)=>[...e]);return n.share?t.pipe(Zd({bufferSize:n.bufferSize||1,refCount:!0})):t}function Qd(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}function On(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}const s2=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],i2=["keydown","keyup","keypress"],o2=["touchstart","touchend","touchcancel","touchmove"],a2=["pointerdown","pointerup","pointercancel","pointermove"],c2=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],h2=["change"];function Zi(n,t={bubbles:!0,detail:{}}){let e;try{const r=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);s2.includes(n)?e=new MouseEvent(n,r):i2.includes(n)?e=new KeyboardEvent(n,r):o2.includes(n)?e=new TouchEvent(n,r):a2.includes(n)?e=new PointerEvent(n,r):c2.includes(n)?e=new DragEvent(n,r):h2.includes(n)?e=new Event(n,r):e=new CustomEvent(n,r)}catch{document.createEvent?e=document.createEvent("Event").initEvent(n,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function Fc(n,t,e){if(n)if(n.dispatchEvent)n.dispatchEvent(e);else if(n.fireEvent&&document.createEventObject)n.fireEvent("on"+t,e);else throw new Error(`Can't dispatch event : ${t}`)}function u2(n,t){const e=n.target,r=Zi(t);Fc(e,t,r)}function l2(n){const t=n.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const r=Zi(e);r.view=n.view||window,r.detail=1,r.screenX=t.screenX||0,r.screenY=t.screenY||0,r.clientX=t.clientX||0,r.clientY=t.clientY||0,r.pageX=n.pageX,r.pageY=n.pageY,r.ctrlKey=!!n.ctrlKey,r.altKey=!!n.altKey,r.shiftKey=!!n.shiftKey,r.metaKey=!!n.metaKey,r.button=0,r.relatedTarget=null,r._constructed=!0,Fc(t,e,r)}}function f2(n,t){const e=n.changedTouches[0];return Zi(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function d2(n,t,e,r,s){const i=t/e;let o=0,a=0;switch(n){case"aspectFit":i>=1?(o=r,a=o/i,a>s&&(a=s,o=a*i)):(a=s,o=a*i,o>r&&(o=r,a=o/i));break;case"aspectFill":i>=1?(a=s,o=a*i):(o=r,a=o/i);break;case"widthFix":o=r,a=o/i;break;case"heightFix":a=s,o=a*i;break;case"scaleToFill":default:o=r,a=s;break}return{width:o,height:a}}function tm(n){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(n.width,n.height)}}const m2=n=>{const t=n.width,e=n.height,r=t*e*3,s=r+54,i=[66,77,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,r&255,r>>8&255,r>>16&255,r>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=n.data;let h="";const u=t<<2;let l=e;const d=String.fromCharCode;do{const p=u*(l-1);let m="";for(let b=0;b<t;b++){const g=b<<2;m+=d(c[p+g+2])+d(c[p+g+1])+d(c[p+g])}for(let b=0;b<a;b++)m+=String.fromCharCode(0);h+=m}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let m="";if(typeof p=="string")m=p;else for(let b=0;b<p.length;b++)m+=String.fromCharCode(p[b]);return btoa(m)}return f(i.concat(o))+f(h)};function p2(n){const{width:t,height:e}=n,r=document.createElement("canvas"),s=r.getContext("2d");return r.width=t,r.height=e,s.putImageData(n,0,0,0,0,t,e),r.toDataURL("image/png")}const g2=(n,t,e)=>{const{width:r,height:s}=n,i=document.createElement("canvas"),o=i.getContext("2d");i.width=r,i.height=s,o.putImageData(n,0,0,0,0,r,s);const a=`image/${t?t.toLowerCase():"png"}`;i.toBlob(c=>{e?.(null,c)},a,1)};function y2(n,t){return createImageBitmap(n,t)}function b2(n){const t=[],e=[],r=[];let s=0;for(let c=0,h=n.data.length;c<h;c+=4)t[s]=n.data[c],e[s]=n.data[c+1],r[s]=n.data[c+2],s+=1;const i=Bc(t),o=Bc(e),a=Bc(r);return"rgb("+i+","+o+","+a+")"}function Bc(n){const t={},e=[],r=[];for(let a=0;a<n.length;a++)t[n[a]]?e.push(n[a]):t[n[a]]=1;let s=0;for(let a=0;a<e.length;a++){s=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(s+=1),r[a]=s}const i=Math.max.apply(null,r);let o=0;for(;o<r.length;o++)if(r[o]===i)return;return e[o]}const v2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[(o*e+e-a-1)*4],s[c+1]=t[(o*e+e-a-1)*4+1],s[c+2]=t[(o*e+e-a-1)*4+2],s[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(s,e,r)},w2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[((r-o-1)*e+a)*4],s[c+1]=t[((r-o-1)*e+a)*4+1],s[c+2]=t[((r-o-1)*e+a)*4+2],s[c+3]=t[((r-o-1)*e+a)*4+3]}return new ImageData(s,e,r)},x2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<r;a++){const c=(o*r+a)*4;s[c]=t[(a*e+e-o-1)*4],s[c+1]=t[(a*e+e-o-1)*4+1],s[c+2]=t[(a*e+e-o-1)*4+2],s[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(s,r,e)},S2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<r;a++){const c=(o*r+a)*4;s[c]=t[((r-a-1)*e+o)*4],s[c+1]=t[((r-a-1)*e+o)*4+1],s[c+2]=t[((r-a-1)*e+o)*4+2],s[c+3]=t[((r-a-1)*e+o)*4+3]}return new ImageData(s,r,e)},_2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},E2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},C2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,u=(t[c]+t[c+1]+t[c+2])/3>127?255:0;s[c]=u,s[c+1]=u,s[c+2]=u,s[c+3]=t[c+3]}return new ImageData(s,e,r)},T2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=255-t[c],s[c+1]=255-t[c+1],s[c+2]=255-t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},P2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},A2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},M2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=0,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},D2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},O2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,r)},I2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,r)},R2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;s[c]=t[c],s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},k2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;s[c]=h,s[c+1]=t[c+1],s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},L2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;s[c]=h,s[c+1]=h,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},N2=n=>em(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),z2=n=>em(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),V2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=t[c+2],s[c+3]=255}return new ImageData(s,e,r)},F2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)s[c]=255,s[c+1]=255,s[c+2]=255,s[c+3]=255;else{const h=nm([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);s[c]=h[0],s[c+1]=h[1],s[c+2]=h[2],s[c+3]=h[3]}}return new ImageData(s,e,r)};function B2(n,t,e,r,s,i=!1,o){const{data:a,width:c,height:h}=n;let u=s,l=r,d=t,f=e;if(u<0?u=0:u>c&&(u=c),l<0?l=0:l>h&&(l=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),u+d>c&&(d=c-u),l+f>h&&(f=h-l),i){const p=new Uint8ClampedArray(a.length);for(let b=0;b<h;b++)for(let g=0;g<c;g++){const w=(b*c+g)*4;g>=u&&g<=u+d&&b>=l&&b<=l+f?(p[w]=a[w],p[w+1]=a[w+1],p[w+2]=a[w+2],p[w+3]=a[w+3]):(p[w]=255,p[w+1]=255,p[w+2]=255,p[w+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let b=l;b<=l+f;b++)for(let g=u;g<=u+d;g++){const w=((b-l)*d+g-u)*4,x=(b*c+g)*4;p[w]=a[x],p[w+1]=a[x+1],p[w+2]=a[x+2],p[w+3]=a[x+3]}return new ImageData(p,d,f)}}function $2(n,t,e,r){const{data:s,width:i,height:o}=n;let a=t;a>Math.floor(i/2)&&(a=Math.floor(i/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const c=new Uint8ClampedArray(s.length);for(let u=0;u<o;u++)for(let l=0;l<i;l++){const d=(u*i+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>i-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(i-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(i-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=r||e.toUpperCase()==="PNG"?0:255):(c[d]=s[d],c[d+1]=s[d+1],c[d+2]=s[d+2],c[d+3]=r||e.toUpperCase()==="PNG"?s[d+3]:255)}return new ImageData(c,i,o)}function U2(n,t,e,r,s,i=1e4){const o=new Image;o.src=n;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=i,a.height=i,c.drawImage(o,0,0,t,e,0,0,r,s),c.getImageData(0,0,r,s)}function Y2(n,t){const{data:e,width:r,height:s}=n,i=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<r;c++){const h=(a*r+c)*4;i[h]=Math.max(Math.min(e[h]+t,255),0),i[h+1]=Math.max(Math.min(e[h+1]+t,255),0),i[h+2]=Math.max(Math.min(e[h+2]+t,255),0),i[h+3]=e[h+3]}return new ImageData(i,r,s)}function j2(n,t,e=!1){const{data:r,width:s,height:i}=n,o=new Uint8ClampedArray(r.length);for(let c=0;c<i;c++)for(let h=0;h<s;h++){const u=(c*s+h)*4;r[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=r[u],o[u+1]=r[u+1],o[u+2]=r[u+2]);let l=r[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,s,i)}function G2(n,t,e,r){const{data:s,width:i,height:o}=n,{data:a,width:c,height:h}=t;let u=e,l=r;e+h>o&&(u=o-h),r+c>i&&(l=i-c);const d=new Uint8ClampedArray(s.length);for(let p=0;p<o;p++)for(let m=0;m<i;m++){const b=(p*i+m)*4;if(m<l||m>l+c||p<=u||p>=u+h)d[b]=s[b],d[b+1]=s[b+1],d[b+2]=s[b+2],d[b+3]=s[b+3];else{const g=(p*i+m-((u+1)*i+(p-(u+1))*(i-c))+c-l-1)*4,w=[a[g],a[g+1],a[g+2],a[g+3]],x=[s[b],s[b+1],s[b+2],s[b+3]],v=nm(w,x);d[b]=v[0],d[b+1]=v[1],d[b+2]=v[2],d[b+3]=v[3]}}return new ImageData(d,i,o)}function X2(n,t,e,r,s,i=10){const{data:o,width:a,height:c}=n;let h=s,u=r,l=t,d=e;h<0?h=0:h>a&&(h=a),u<0?u=0:u>c&&(u=c),l<1?l=1:l>a&&(l=a),d<1?d=1:d>c&&(d=c),h+l>a&&(l=a-h),u+d>c&&(d=c-u);const f=new Uint8ClampedArray(o.length);for(let m=0;m<c;m++)for(let b=0;b<a;b++){const g=(m*a+b)*4;if(b>=h&&b<=h+l&&m>=u&&m<=u+d){const w=Math.floor((b-h)/i),x=Math.floor((m-u)/i);let v=Math.floor(i*(w+1)-i/2+h),E=Math.floor(i*(x+1)-i/2+u);v>a-1&&(v=a-1),E>c-1&&(E=c-1);const _=(E*a+v)*4;f[g]=o[_],f[g+1]=o[_+1],f[g+2]=o[_+2],f[g+3]=o[_+3]}else f[g]=o[g],f[g+1]=o[g+1],f[g+2]=o[g+2],f[g+3]=o[g+3]}return new ImageData(f,a,c)}function W2(n,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:r,width:s,height:i}=n,{data:o}=t,a=new Uint8ClampedArray(r.length),{backgroundColor:c,changeIntoColor:h}=e;for(let l=0;l<i;l++)for(let d=0;d<s;d++){const f=(l*s+d)*4,p=o[f],m=o[f+1],b=o[f+2],g=o[f+3];p===c.r&&m===c.g&&b===c.b&&g===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=r[f],a[f+1]=r[f+1],a[f+2]=r[f+2],a[f+3]=r[f+3])}return new ImageData(a,s,i)}return n}function em(n,t){const{data:e,width:r,height:s}=n,i=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<r;c++){const h=(a*r+c)*4;for(let u=0;u<3;u++){const l=h+u;c===0||c===r-1||a===0||a===s-1?i[l]=e[l]:i[l]=t[0]*e[l-r*4-4]+t[1]*e[l-r*4]+t[2]*e[l-r*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+r*4-4]+t[7]*e[l+r*4]+t[8]*e[l+r*4+4]}i[h+3]=e[h+3]}return new ImageData(i,r,s)}function nm(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],r=t[3];if(e===255||r===0)return n;if(e===0)return t;{const s=e/255,i=r/255,o=Math.max(Math.min(Math.floor(n[0]*s+t[0]*i*(1-s)),255),0),a=Math.max(Math.min(Math.floor(n[1]*s+t[1]*i*(1-s)),255),0),c=Math.max(Math.min(Math.floor(n[2]*s+t[2]*i*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+i*(1-s))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const $c=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,r=t.length){for(let s=0;s<r;s++)this.writeByte(t[s+e])},writeString(t){for(let e=0,r=t.length;e<r;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,r=n.length;e<r;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},rm=function(){let n=0,t=0,e=0,r="";const s=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},i=function(o){r+=String.fromCharCode(s(o&63))};return{writeByte(o){for(n=n<<8|o&255,t+=8,e+=1;t>=6;)i(n>>>t-6),t-=6},flush(){if(t>0&&(i(n<<6-t),n=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)r+="="}},toString(){return r}}},sm=function(n,t,e){const r=new Array(n*n),s=function(a){const c=a;let h=0,u=0;return{write(l,d){if(l>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(l<<h|u)),d-=8-h,l>>>=8-h,u=0,h=0;u=l<<h|u,h=h+d},flush(){h>0&&c.writeByte(u)}}},i=function(a){const c=1<<a,h=(1<<a)+1;let u=a+1;const l=o();for(let b=0;b<c;b++)l.add(String.fromCharCode(b));l.add(String.fromCharCode(c)),l.add(String.fromCharCode(h));const d=$c(),f=s(d);f.write(c,u);let p=0,m=String.fromCharCode(r[p]);for(p+=1;p<r.length;){const b=String.fromCharCode(r[p]);p+=1,l.contains(m+b)?m=m+b:(f.write(l.indexOf(m),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(m+b)),m=b)}return f.write(l.indexOf(m),u),f.write(h,u),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){r[c*n+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(n),a.writeShort(n),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(Cr("0x"+t[1]+t[2])),a.writeByte(Cr("0x"+t[3]+t[4])),a.writeByte(Cr("0x"+t[5]+t[6])),a.writeByte(Cr("0x"+e[1]+e[2])),a.writeByte(Cr("0x"+e[3]+e[4])),a.writeByte(Cr("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(n),a.writeShort(n),a.writeByte(0);const c=2,h=i(c);a.writeByte(c);let u=0;for(;h.length-u>255;)a.writeByte(255),a.writeBytes(h,u,255),u+=255;a.writeByte(h.length-u),a.writeBytes(h,u,h.length-u),a.writeByte(0),a.writeString(";")}}},im=function(n,t,e,r){const s=sm(n,t,e);for(let h=0;h<n;h++)for(let u=0;u<n;u++)s.setPixel(u,h,r(u,h));const i=$c();s.write(i);const o=rm(),a=i.toByteArray();for(let h=0,u=a.length;h<u;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},xe={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ws={M:0,L:1,H:2,Q:3},In={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ht={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Ht.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Ht.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Ht.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Ht.EXP_TABLE[n]=Ht.EXP_TABLE[n-4]^Ht.EXP_TABLE[n-5]^Ht.EXP_TABLE[n-6]^Ht.EXP_TABLE[n-8];for(let n=0;n<255;n++)Ht.LOG_TABLE[Ht.EXP_TABLE[n]]=n;const It={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(n){let t=n<<10;for(;It.getBCHDigit(t)-It.getBCHDigit(It.G15)>=0;)t^=It.G15<<It.getBCHDigit(t)-It.getBCHDigit(It.G15);return(n<<10|t)^It.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;It.getBCHDigit(t)-It.getBCHDigit(It.G18)>=0;)t^=It.G18<<It.getBCHDigit(t)-It.getBCHDigit(It.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return It.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case In.PATTERN000:return(t+e)%2==0;case In.PATTERN001:return t%2==0;case In.PATTERN010:return e%3==0;case In.PATTERN011:return(t+e)%3==0;case In.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case In.PATTERN101:return t*e%2+t*e%3==0;case In.PATTERN110:return(t*e%2+t*e%3)%2==0;case In.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new Lr([1],0);for(let e=0;e<n;e++)t=t.multiply(new Lr([1,Ht.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case xe.MODE_NUMBER:return 10;case xe.MODE_ALPHA_NUM:return 9;case xe.MODE_8BIT_BYTE:return 8;case xe.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case xe.MODE_NUMBER:return 12;case xe.MODE_ALPHA_NUM:return 11;case xe.MODE_8BIT_BYTE:return 16;case xe.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case xe.MODE_NUMBER:return 14;case xe.MODE_ALPHA_NUM:return 13;case xe.MODE_8BIT_BYTE:return 16;case xe.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++){let a=0;const c=n.isDark(i,o);for(let h=-1;h<=1;h++)if(!(i+h<0||t<=i+h))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||h==0&&u==0||c==n.isDark(i+h,o+u)&&a++;a>5&&(e+=3+a-5)}for(let i=0;i<t-1;i++)for(let o=0;o<t-1;o++){let a=0;n.isDark(i,o)&&a++,n.isDark(i+1,o)&&a++,n.isDark(i,o+1)&&a++,n.isDark(i+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)n.isDark(i,o)&&!n.isDark(i,o+1)&&n.isDark(i,o+2)&&n.isDark(i,o+3)&&n.isDark(i,o+4)&&!n.isDark(i,o+5)&&n.isDark(i,o+6)&&(e+=40);for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)n.isDark(o,i)&&!n.isDark(o+1,i)&&n.isDark(o+2,i)&&n.isDark(o+3,i)&&n.isDark(o+4,i)&&!n.isDark(o+5,i)&&n.isDark(o+6,i)&&(e+=40);let r=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++)n.isDark(o,i)&&r++;const s=Math.abs(100*r/t/t-50)/5;return e+=s*10,e}};class Lr{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let r=0;for(;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(let s=0;s<t.length-r;s++)this.num[s]=t[s+r]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let r=0;r<this.getLength();r++)for(let s=0;s<t.getLength();s++)e[r+s]^=Ht.gexp(Ht.glog(this.get(r))+Ht.glog(t.get(s)));return new Lr(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Ht.glog(this.get(0))-Ht.glog(t.get(0)),r=new Array(this.getLength());for(let s=0;s<this.getLength();s++)r[s]=this.get(s);for(let s=0;s<t.getLength();s++)r[s]^=Ht.gexp(Ht.glog(t.get(s))+e);return new Lr(r,0).mod(t)}}class fn{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const r=fn.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const s=r.length/3,i=[];for(let o=0;o<s;o++){const a=r[o*3+0],c=r[o*3+1],h=r[o*3+2];for(let u=0;u<a;u++)i.push(new fn(c,h))}return i}static getRsBlockTable(t,e){switch(e){case ws.L:return fn.RS_BLOCK_TABLE[(t-1)*4+0];case ws.M:return fn.RS_BLOCK_TABLE[(t-1)*4+1];case ws.Q:return fn.RS_BLOCK_TABLE[(t-1)*4+2];case ws.H:return fn.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class om{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class H2{mode;data;constructor(t){this.mode=xe.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data.charCodeAt(e),8)}}class Rn{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=ws[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new H2(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=fn.getRSBlocks(t,this.errorCorrectLevel),r=new om;let s=0;for(let i=0;i<e.length;i++)s+=e[i].dataCount;for(let i=0;i<this.dataList.length;i++){const o=this.dataList[i];r.put(o.mode,4),r.put(o.getLength(),It.getLengthInBits(o.mode,t)),o.write(r)}if(r.getLengthInBits()<=s*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[r][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Rn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(let s=-1;s<=7;s++)e+s<=-1||this.moduleCount<=e+s||(0<=r&&r<=6&&(s==0||s==6)||0<=s&&s<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=s&&s<=4?this.modules[t+r][e+s]=!0:this.modules[t+r][e+s]=!1)}getBestMaskPattern(){let t=0,e=0;for(let r=0;r<8;r++){this.makeImpl(!0,r);const s=It.getLostPoint(this);(r==0||t>s)&&(t=s,e=r)}return e}createMovieClip(t,e,r){const s=t.createEmptyMovieClip(e,r),i=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*i;for(let c=0;c<this.modules[o].length;c++){const h=c*i;this.modules[o][c]&&(s.beginFill(0,100),s.moveTo(h,a),s.lineTo(h+i,a),s.lineTo(h+i,a+i),s.lineTo(h,a+i),s.endFill())}}return s}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=It.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let r=0;r<t.length;r++){const s=t[e],i=t[r];if(this.modules[s][i]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[s+o][i+a]=!0:this.modules[s+o][i+a]=!1}}setupTypeNumber(t){const e=It.getBCHTypeNumber(this.typeNumber);for(let r=0;r<18;r++){const s=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=s}for(let r=0;r<18;r++){const s=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=s}}setupTypeInfo(t,e){const r=this.errorCorrectLevel<<3|e,s=It.getBCHTypeInfo(r);for(let i=0;i<15;i++){const o=!t&&(s>>i&1)==1;i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(let i=0;i<15;i++){const o=!t&&(s>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let r=-1,s=this.moduleCount-1,i=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[s][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>i&1)==1),It.getMask(e,s,a-c)&&(h=!h),this.modules[s][a-c]=h,i--,i==-1&&(o++,i=7)}if(s+=r,s<0||this.moduleCount<=s){s-=r,r=-r;break}}}static createData(t,e,r){const s=fn.getRSBlocks(t,e),i=new om;for(let a=0;a<r.length;a++){const c=r[a];i.put(c.mode,4),i.put(c.getLength(),It.getLengthInBits(c.mode,t)),c.write(i)}let o=0;for(let a=0;a<s.length;a++)o+=s[a].dataCount;if(i.getLengthInBits()>o*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+o*8+")");for(i.getLengthInBits()+4<=o*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=o*8||(i.put(Rn.PAD0,8),i.getLengthInBits()>=o*8));)i.put(Rn.PAD1,8);return Rn.createBytes(i,s)}static createBytes(t,e){let r=0,s=0,i=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const d=e[l].dataCount,f=e[l].totalCount-d;s=Math.max(s,d),i=Math.max(i,f),o[l]=new Array(d);for(let g=0;g<o[l].length;g++)o[l][g]=255&t.buffer[g+r];r+=d;const p=It.getErrorCorrectPolynomial(f),b=new Lr(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let g=0;g<a[l].length;g++){const w=g+b.getLength()-a[l].length;a[l][g]=w>=0?b.get(w):0}}let c=0;for(let l=0;l<e.length;l++)c+=e[l].totalCount;const h=new Array(c);let u=0;for(let l=0;l<s;l++)for(let d=0;d<e.length;d++)l<o[d].length&&(h[u++]=o[d][l]);for(let l=0;l<i;l++)for(let d=0;d<e.length;d++)l<a[d].length&&(h[u++]=a[d][l]);return h}}const am=Math.ceil,xs=Math.floor,cm=Math.round;function q2(n,t){const e=Zl(n),r=t?.ecc||"H",s=t?.size||256,i=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new Rn(i,r);h.addData(e),h.make();const u=h.getModuleCount(),l=(s-o*2)/u,d=o,f=s-o;return im(s,a,c,function(p,m){if(d<=p&&p<f&&d<=m&&m<f){const b=xs((p-d)/l),g=xs((m-d)/l);return h.isDark(g,b)?0:1}else return 1})}function K2(n,t){const e=t.x||0,r=t.y||0,s=Zl(n),i=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?xs(t.size):256,c=t.padding||0,h=-1,u=t.color||"#000000",l=t.background||"#ffffff",d=new Rn(h,o);d.addData(s),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;i.fillStyle=l,i.fillRect(e,r,a,a);for(let m=0;m<f;m++)for(let b=0;b<f;b++){const g=am((b+1)*p)-xs(b*p),w=am((m+1)*p)-xs(m*p);i.fillStyle=d.isDark(m,b)?u:l,i.fillRect(e+cm(b*p)+c,r+cm(m*p)+c,g,w)}}class Qi{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Qi(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,r=this.y;return this.x=t.m11*e+t.m21*r+t.m31,this.y=t.m12*e+t.m22*r+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=st(this.x,t.x,e.x),this.y=st(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=st(this.x,t,e),this.y=st(this.y,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(st(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}perpendOnVector(t){return hm.copy(this).projectOnVector(t),this.sub(hm)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(st(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}rotateAround(t,e){const r=Math.cos(e),s=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*r-o*s+t.x,this.y=i*s+o*r+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Je{x=0;y=0;z=0;constructor(t=0,e=0,r=0){this.x=t,this.y=e,this.z=r}set(t=0,e=0,r=0){return this.x=t,this.y=e,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Je(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyMatrix3(t){const e=this.x,r=this.y,s=this.z,i=t.value;return this.x=i[0]*e+i[3]*r+i[6]*s,this.y=i[1]*e+i[4]*r+i[7]*s,this.z=i[2]*e+i[5]*r+i[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,r=this.y,s=this.z,i=t.value,o=1/(i[3]*e+i[7]*r+i[11]*s+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*s+i[12])*o,this.y=(i[1]*e+i[5]*r+i[9]*s+i[13])*o,this.z=(i[2]*e+i[6]*r+i[10]*s+i[14])*o,this}transformDirection(t){const e=this.x,r=this.y,s=this.z,i=t.value;return this.x=i[0]*e+i[4]*r+i[8]*s,this.y=i[1]*e+i[5]*r+i[9]*s,this.z=i[2]*e+i[6]*r+i[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=st(this.x,t.x,e.x),this.y=st(this.y,t.y,e.y),this.z=st(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=st(this.x,t,e),this.y=st(this.y,t,e),this.z=st(this.z,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(st(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const r=t.x,s=t.y,i=t.z,o=e.x,a=e.y,c=e.z;return this.x=s*c-i*a,this.y=i*o-r*c,this.z=r*a-s*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}perpendOnVector(t){return Yc.copy(this).projectOnVector(t),this.sub(Yc)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Yc.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(st(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,s=this.z-t.z;return e*e+r*r+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),r=this.setFromMatrix4Column(t,1).length(),s=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=r,this.z=s,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,r=Math.sqrt(1-e*e);return this.x=r*Math.cos(t),this.y=e,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Uc{x=0;y=0;z=0;w=1;constructor(t=0,e=0,r=0,s=1){this.x=t,this.y=e,this.z=r,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,r=0,s=1){return this.x=t,this.y=e,this.z=r,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Uc(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,r=this.y,s=this.z,i=this.w,o=t.value;return this.x=o[0]*e+o[4]*r+o[8]*s+o[12]*i,this.y=o[1]*e+o[5]*r+o[9]*s+o[13]*i,this.z=o[2]*e+o[6]*r+o[10]*s+o[14]*i,this.w=o[3]*e+o[7]*r+o[11]*s+o[15]*i,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromRotationMatrix4(t){let e,r,s,i;const c=t.value,h=c[0],u=c[4],l=c[8],d=c[1],f=c[5],p=c[9],m=c[2],b=c[6],g=c[10];if(Math.abs(u-d)<.01&&Math.abs(l-m)<.01&&Math.abs(p-b)<.01){if(Math.abs(u+d)<.1&&Math.abs(l+m)<.1&&Math.abs(p+b)<.1&&Math.abs(h+f+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(h+1)/2,v=(f+1)/2,E=(g+1)/2,_=(u+d)/4,D=(l+m)/4,z=(p+b)/4;return x>v&&x>E?x<.01?(r=0,s=.707106781,i=.707106781):(r=Math.sqrt(x),s=_/r,i=D/r):v>E?v<.01?(r=.707106781,s=0,i=.707106781):(s=Math.sqrt(v),r=_/s,i=z/s):E<.01?(r=.707106781,s=.707106781,i=0):(i=Math.sqrt(E),r=D/i,s=z/i),this.set(r,s,i,e),this}let w=Math.sqrt((b-p)*(b-p)+(l-m)*(l-m)+(d-u)*(d-u));return Math.abs(w)<.001&&(w=1),this.x=(b-p)/w,this.y=(l-m)/w,this.z=(d-u)/w,this.w=Math.acos((h+f+g-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=st(this.x,t.x,e.x),this.y=st(this.y,t.y,e.y),this.z=st(this.z,t.z,e.z),this.w=st(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=st(this.x,t,e),this.y=st(this.y,t,e),this.z=st(this.z,t,e),this.w=st(this.w,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(st(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this.w=t.w+(e.w-t.w)*r,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const hm=new Qi,Yc=new Je,um=J2("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function J2(n,t=10){const e={},r=n.split(",");for(let s=0;s<r.length;s+=2){const i="&"+r[s+1]+";",o=parseInt(r[s],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function ae(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function to(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function Z2(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function Q2(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Ss={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let eo=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",ae("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}},jc=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},lm=class jl{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:r=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=r),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Ss);for(let e=0,r=t.length;e<r;e++){const s=t[e];this[s]=Ss[s].canvas}}__getStyleState(){const t={},e=Object.keys(Ss);for(let r=0,s=e.length;r<s;r++){const i=e[r];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,s=e.length;r<s;r++){const i=e[r];this[i]=t[i]}}__createElement(t,e={},r=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);r&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(i=>{i.setAttribute(t,"")}));const s=Object.keys(Ss);for(let i=0;i<s.length;i++){const o=Ss[s[i]],a=this[s[i]];if(o.apply){if(a instanceof jc){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,ae("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof eo)e.setAttribute(o.apply,ae("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,ae("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(s[i]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const s=Object.keys(um);for(let i=0,o=s.length;i<o;i++){const a=s[i],c=um[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(ae("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(ae("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(ae("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,s,i,o){this.__addTransform(ae("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:s,e:i,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(ae("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(ae("L {x} {y}",this.__currentPosition)):this.__addPathCommand(ae("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,s,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(ae("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:s,x:i,y:o}))}quadraticCurveTo(t,e,r,s){this.__currentPosition={x:r,y:s},this.__addPathCommand(ae("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,s,i){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===r&&e===s||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([r-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(l/2),p=t+f*d[0],m=e+f*d[1],b=[-c[1],c[0]],g=[h[1],-h[0]],w=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},x=w(b),v=w(g);this.lineTo(p+b[0]*i,m+b[1]*i),this.arc(p,m,i,x,v)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),r=this.__rootSVG.childNodes[1],s=r.childNodes;for(let i=s.length-1;i>=0;i--)s[i]&&r.removeChild(s[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,r,s){if(t===0&&e===0&&r===this.width&&s===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:r,height:s,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,r,s){const i=this.__createElement("linearGradient",{id:to(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new eo(i,this)}createRadialGradient(t,e,r,s,i,o){const a=this.__createElement("radialGradient",{id:to(this.__ids),cx:s+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new eo(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),r={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(r.decoration="underline"),this.__fontHref&&(r.href=this.__fontHref),r}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,s){const i=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:e,y:r,"text-anchor":Z2(this.textAlign),"dominant-baseline":Q2(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(i,a))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,s,i,o){if(s===i)return;s=s%(2*Math.PI),i=i%(2*Math.PI),s===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+r*Math.cos(i),c=e+r*Math.sin(i),h=t+r*Math.cos(s),u=e+r*Math.sin(s),l=o?0:1;let d=0,f=i-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(ae("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=to(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",ae("url(#{id})",{id:r})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],r,s,i,o,a=0,c=0,h,u,l,d,f,p,m,b;if(t.length===3)r=t[1],s=t[2],h=e.width,u=e.height,i=h,o=u;else if(t.length===5)r=t[1],s=t[2],i=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],r=t[5],s=t[6],i=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const g=this.__closestGroupOrSvg();this.__currentElement;const w="translate("+r+", "+s+")";if(e instanceof jl){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)b=d.childNodes[0].getAttribute("id"),this.__ids[b]=b,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let v;x?v=x+" "+w:v=w,f.setAttribute("transform",v),g.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",i),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=i,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,i,o),e=m),p.setAttribute("transform",w),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),g.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=to(this.__ids);let i;return r.setAttribute("id",s),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(i=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(i),this.__SVGdefs.appendChild(r)):t instanceof jl&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new jc(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Gc=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,r,s=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new lm({canvas:this.canvas,width:e||this.canvas.width,height:r||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,r,s){return this.context.fillRect(t,e,r,s),this.customContext&&this.customContext.fillRect(t,e,r,s),this}fillText(t,e,r,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,r,s),this.customContext&&this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,r,s){return this.context.strokeText(t,e,r,s),this.customContext&&this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,s){return this.context.strokeRect(t,e,r,s),this.customContext&&this.customContext.strokeRect(t,e,r,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,r=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,r,s),this.customContext&&this.customContext.clearRect(t,e,r,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const r=new Path2D;r.addPath(t,e),this.currentPath2D=r}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,r=0){return this.translate(e,r),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-r),this.changePath2D(),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-r,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,r,s,i,o){return this.context.arc(t,e,r,s,i,o),this.customContext&&this.customContext.arc(t,e,r,s,i,o?-1:1),this.currentPath2D.arc(t,e,r,s,i,o),this}arcTo(t,e,r,s,i){return this.context.arcTo(t,e,r,s,i),this.customContext&&this.customContext.arcTo(t,e,r,s,i),this.currentPath2D.arcTo(t,e,r,s,i),this}ellipse(t,e,r,s,i,o,a,c){return this.context.ellipse(t,e,r,s,i,o,a,c),this.currentPath2D.ellipse(t,e,r,s,i,o,a,c),this}quadraticCurveTo(t,e,r,s){return this.context.quadraticCurveTo(t,e,r,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,r,s),this.currentPath2D.quadraticCurveTo(t,e,r,s),this}bezierCurveTo(t,e,r,s,i,o){return this.context.bezierCurveTo(t,e,r,s,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,r,s,i,o),this.currentPath2D.bezierCurveTo(t,e,r,s,i,o),this}rect(t,e,r,s){return this.context.rect(t,e,r,s),this.customContext&&this.customContext.rect(t,e,r,s),this.currentPath2D.rect(t,e,r,s),this}createLinearGradient(t,e,r,s,i){const o=this.context.createLinearGradient(t,e,r,s);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,r,s,i,o,a){const c=this.context.createRadialGradient(t,e,r,s,i,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const r=e[0],s=e[1];this.context.drawImage(t,r,s)}else if(e.length===4){const r=e[0],s=e[1],i=e[2],o=e[3];this.context.drawImage(t,r,s,i,o)}else if(e.length===8){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,r,s,i,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,r=this.canvas.width,s=this.canvas.height,i){return this.context.getImageData(t,e,r,s,i)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Xc=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=ze(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),r=Math.min(this.y,this.toY),s=Math.max(this.x,this.toX),i=Math.max(this.y,this.toY);return{x:e,y:r,width:s-e,height:i-r}}else{const e=Math.sin(t),r=Math.cos(t),s=r*this.x-e*this.y,i=r*this.toX-e*this.toY,o=r*this.y+e*this.x,a=r*this.toY+e*this.toX;return{x:Math.min(s,i),y:Math.min(o,a),width:Math.max(s,i)-Math.min(s,i),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,r=this.y,s=t.toX,i=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-r)/o,h=(t.y-i)/a;if(o){if(!a)return{x:s,y:c*(s-e)+r}}else return{x:e,y:h*(e-s)+i};const u=(-h*s+i+c*e-r)/(c-h),l=c*(u-e)+r;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const tS=class extends Xc{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,r,s,i,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,r,s,i,o,a,c,!this.sweepFlag)}convert(t,e,r,s,i,o,a,c,h){const u=a/180*Math.PI,l=(t-r)/2,d=(e-s)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,m=f*f/(i*i)+p*p/(o*o);if(m>1){const $=Math.sqrt(m);throw i=$*i,o=$*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const b=Math.sqrt((i*i*o*o-i*i*p*p-o*o*f*f)/(i*i*p*p+o*o*f*f)),g=c!=h?1:-1,w=g*b*i*p/o,x=g*b*-o*f/i,v=(t+r)/2,E=(e+s)/2,_=Math.cos(u)*w-Math.sin(u)*x+v,D=Math.sin(u)*w+Math.cos(u)*x+E,z=($,j,Q,rt)=>($*rt>=j*Q?1:-1)*Math.acos(($*Q+j*rt)/(Math.sqrt($*$+j*j)*Math.sqrt(Q*Q+rt*rt))),O=z(1,0,t-_,e-D)-u,L=z(t-_,e-D,r-_,s-D);return[_,D,i,o,u,O,O+L]}},eS=class extends Xc{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,r=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let r,s,i,o;for(let h=0;h<2;++h)r=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,s=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,i=h==0?this.x:this.y,Math.abs(r)>1e-12&&(o=-s/(2*r),0<o&&o<1&&[t,e][h].push(r*o*o+s*o+i));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},kn=class gi extends Xc{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),r=this.x-this.c1x,s=(-e+Math.sqrt(e*e-4*t*r))/2/t,i=(-e-Math.sqrt(e*e-4*t*r))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(s)>1e12&&(s=.5),Math.abs(i)>1e12&&(i=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),r=this.y-this.c1y,s=(-e+Math.sqrt(e*e-4*t*r))/2/t,i=(-e-Math.sqrt(e*e-4*t*r))/2/t,Math.abs(s)>1e12&&(s=.5),Math.abs(i)>1e12&&(i=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let m=p+1;m<l;m++)h[p].X===h[m].X&&h[p].Y===h[m].Y&&(m=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,r,s,i){const o=-3*e+9*r-9*s+3*i,a=t*o+6*e-12*r+6*s;return t*a-3*e+3*r}static bezlen(t,e,r,s,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=u*l[p]+u,b=this.base3(m,t,r,i,a),g=this.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(b*b+g*g)}return u*f}length(t=1){return gi.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,r=this.y,s=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||gi.bezlen(e,r,s,i,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=gi.bezlen(e,r,s,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=gi.bezlen(e,r,s,i,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),r=1-e,s=Math.pow(r,3),i=Math.pow(r,2),o=e*e,a=o*e,c=s*this.x+i*3*e*this.c1x+r*3*e*e*this.c2x+a*this.toX,h=s*this.y+i*3*e*this.c1y+r*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=r*this.x+e*this.c1x,m=r*this.y+e*this.c1y,b=r*this.c2x+e*this.toX,g=r*this.c2y+e*this.toY,w=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:m},end:{x:b,y:g},alpha:w}}},_s=Math.PI*2;function fm(n,t,e,r){const s=n*r-t*e<0?-1:1;let i=n*e+t*r;return i>1&&(i=1),i<-1&&(i=-1),s*Math.acos(i)}function nS(n,t,e,r,s,i,o,a,c,h){const u=h*(n-e)/2+c*(t-r)/2,l=-c*(n-e)/2+h*(t-r)/2,d=o*o,f=a*a,p=u*u,m=l*l;let b=d*f-d*m-f*p;b<0&&(b=0),b/=d*m+f*p,b=Math.sqrt(b)*(s===i?-1:1);const g=b*o/a*l,w=b*-a/o*u,x=h*g-c*w+(n+e)/2,v=c*g+h*w+(t+r)/2,E=(u-g)/o,_=(l-w)/a,D=(-u-g)/o,z=(-l-w)/a,O=fm(1,0,E,_);let L=fm(E,_,D,z);return i===0&&L>0&&(L-=_s),i===1&&L<0&&(L+=_s),[x,v,O,L]}function rS(n,t){const e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),s=Math.sin(n),i=Math.cos(n+t),o=Math.sin(n+t);return[r,s,r-s*e,s+r*e,i+o*e,o-i*e,i,o]}function no(n,t,e,r,s,i,o,a,c){const h=Math.sin(c*_s/360),u=Math.cos(c*_s/360),l=u*(n-e)/2+h*(t-r)/2,d=-h*(n-e)/2+u*(t-r)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=nS(n,t,e,r,s,i,o,a,h,u),m=[];let b=p[2],g=p[3];const w=Math.max(Math.ceil(Math.abs(g)/(_s/4)),1);g/=w;for(let x=0;x<w;x++)m.push(rS(b,g)),b+=g;return m.map(x=>{for(let v=0;v<x.length;v+=2){let E=x[v+0],_=x[v+1];E*=o,_*=a;const D=u*E-h*_,z=h*E+u*_;x[v+0]=D+p[0],x[v+1]=z+p[1]}return x})}function dm(n,t,e,r,s,i,o,a,c,h){const u=Math.PI*120/180,l=Math.PI/180*(+s||0);let d=[],f;const p=function(ot,nt,tt){const bt=ot*Math.cos(tt)-nt*Math.sin(tt),Y=ot*Math.sin(tt)+nt*Math.cos(tt);return{x:bt,y:Y}};let m,b,g,w;if(h)m=h[0],b=h[1],g=h[2],w=h[3];else{f=p(n,t,-l),n=f.x,t=f.y,f=p(a,c,-l),a=f.x,c=f.y;const ot=(n-a)/2,nt=(t-c)/2;let tt=ot*ot/(e*e)+nt*nt/(r*r);tt>1&&(tt=Math.sqrt(tt),e=tt*e,r=tt*r);const bt=e*e,Y=r*r,F=(i==o?-1:1)*Math.sqrt(Math.abs((bt*Y-bt*nt*nt-Y*ot*ot)/(bt*nt*nt+Y*ot*ot)));g=F*e*nt/r+(n+a)/2,w=F*-r*ot/e+(t+c)/2,m=Math.asin(Number(((t-w)/r).toFixed(9))),b=Math.asin(Number(((c-w)/r).toFixed(9))),m=n<g?Math.PI-m:m,b=a<g?Math.PI-b:b,m<0&&(m=Math.PI*2+m),b<0&&(b=Math.PI*2+b),o&&m>b&&(m=m-Math.PI*2),!o&&b>m&&(b=b-Math.PI*2)}let x=b-m;if(Math.abs(x)>u){const ot=b,nt=a,tt=c;b=m+u*(o&&b>m?1:-1),a=g+e*Math.cos(b),c=w+r*Math.sin(b),d=dm(a,c,e,r,s,0,o,nt,tt,[b,ot,g,w])}x=b-m;const v=Math.cos(m),E=Math.sin(m),_=Math.cos(b),D=Math.sin(b),z=Math.tan(x/4),O=4/3*e*z,L=4/3*r*z,$=[n,t],j=[n+O*E,t-L*v],Q=[a+O*D,c-L*_],rt=[a,c];return j[0]=2*$[0]-j[0],j[1]=2*$[1]-j[1],h?[[...j,...Q,...rt]].concat(d):[[...j,...Q,...rt]].concat(d).map(ot=>{const nt=[];for(let tt=0,bt=ot.length;tt<bt;tt++)nt[tt]=tt%2?p(ot[tt-1],ot[tt],l).y:p(ot[tt],ot[tt+1],l).x;return nt})}function Es(n,t,e,r,s,i){return[n/3+2/3*e,t/3+2/3*r,s/3+2/3*e,i/3+2/3*r,s,i]}function hr(n,t,e,r){return[n,t,e,r,e,r]}const Cs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Ln(n="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",n)}function Wc(){return Ln("path")}const mm=n=>n instanceof SVGElement&&n.tagName==="path";function pm(n,t="shape"){return fl(md(n),`${t}.svg`)}function sS(n,t="shape"){return fl(Pa(n),`${t}.svg`)}function iS(n){return gc(n)}function Hc(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function qc(n){return n.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function ro(n){const t=[];return Hc(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,r,s)=>{let i=r.toLowerCase();const o=of(s);for(i=="m"&&o.length>Cs[i]&&(t.push([r,...o.splice(0,Cs[i])]),i="l",r=r=="m"?"l":"L");o.length;){if(o.length<Cs[i])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${r} } args:{ ${o} }`);t.push([r,...o.splice(0,Cs[i])])}return i=="z"&&t.push([r]),""}),t}function so(n){let t=0,e=0,r=0,s=0;return n.map(function(i){const o=i[0],a=o.toUpperCase();if(o!=a)switch(i[0]=a,o){case"a":i[6]+=r,i[7]+=s;break;case"v":i[1]+=s;break;case"h":i[1]+=r;break;default:for(let c=1;c<i.length;)i[c++]+=r,i[c++]+=s}switch(a){case"Z":r=t,s=e;break;case"H":r=i[1];break;case"V":s=i[1];break;case"M":r=t=i[1],s=e=i[2];break;default:r=i[i.length-2],s=i[i.length-1]}return i})}function oS(n){let t=0,e=0,r=0,s=0;return n.map(function(i){const o=i[0],a=o.toLowerCase();if(o!=a)switch(i[0]=a,o){case"A":i[6]-=r,i[7]-=s;break;case"V":i[1]-=s;break;case"H":i[1]-=r;break;default:for(let c=1;c<i.length;)i[c++]-=r,i[c++]-=s}switch(a){case"z":r=t,s=e;break;case"h":r+=i[1];break;case"v":s+=i[1];break;case"m":r+=i[1],s+=i[2],t+=i[1],e+=i[2];break;default:r+=i[i.length-2],s+=i[i.length-1]}return i})}function Kc(n){const t=[];let e=0,r=0,s=0,i=0,o=0,a=0,c=0,h=0,u;for(let l=0,d=n.length;l<d;l++){let f=n[l];const p=f[0];switch(p){case"M":e=f[1],r=f[2];break;case"A":const m=no(s,i,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!m.length)continue;m.forEach((w,x)=>{const[v,E,_,D,z,O,L,$]=w;f=["C",_,D,z,O,L,$],x<m.length-1&&t.push(f)});break;case"S":let b=s,g=i;(u=="C"||u=="S")&&(b+=b-c,g+=g-h),f=["C",b,g,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=s*2-o,a=i*2-a):(o=s,a=i),f=["C",...Es(s,i,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...Es(s,i,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...hr(s,i,f[1],f[2])];break;case"H":f=["C",...hr(s,i,f[1],i)];break;case"V":f=["C",...hr(s,i,s,f[1])];break;case"Z":f=["C",...hr(s,i,e,r)];break}u=p,s=f[f.length-2],i=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=s,h=i),t.push(f)}return t}function aS(n){const t=[];for(let e=0,r=n.length;r-2>e;e+=2){let s;e==0?s=[{x:n[e],y:n[e+1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}]:r-4==e?s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+2],y:n[e+3]}]:s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}];const i=[{x:s[1].x,y:s[1].y},{x:(-s[0].x+6*s[1].x+s[2].x)/6,y:(-s[0].y+6*s[1].y+s[2].y)/6},{x:(s[1].x+6*s[2].x-s[3].x)/6,y:(s[1].y+6*s[2].y-s[3].y)/6},{x:s[2].x,y:s[2].y}];t.push(["C",i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y])}return t}function cS(n){const t=[];let e=["L",0,0],r;for(let s=0,i=n.length;s<i;s++){const o=n[s];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":r=t[t.length-1]||["L",0,0],t.push(["L",o[1],r[r.length-1]]);break;case"V":r=t[t.length-1]||["L",0,0],t.push(["L",r[r.length-2],o[1]]);break;default:t.push(o)}}return t}function hS(n){const t={S:{to:"C",x:3},T:{to:"Q",x:1}};let e,r=0,s=0;for(let i=0,o=n.length;i<o;i++){const a=n[i],c=t[a[0]];c&&(a[0]=c.to,e&&(e[0]===c.to?(r=2*Number(e[c.x+2])-Number(e[c.x]),s=2*Number(e[c.x+3])-Number(e[c.x+1])):(r=Number(e[e.length-2]),s=Number(e[e.length-1]))),a.splice(1,0,r,s)),e=a}return n}let uS=class Tn{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(ro(t),e):t instanceof Tn?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const r=Kc(so(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let s=!1;for(let i=0,o=r.length;i<o;i++){const a=r[i];if(a[0]=="M"){s||(s=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new kn({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(i=>{({x:i.x,y:i.y}=e.transformPoint({x:i.x,y:i.y})),{x:i.c1x,y:i.c1y}=e.transformPoint({x:i.c1x,y:i.c1y}),{x:i.c2x,y:i.c2y}=e.transformPoint({x:i.c2x,y:i.c2y}),{x:i.toX,y:i.toY}=e.transformPoint({x:i.toX,y:i.toY})}))}static fromPolymorphPoints(t){const e=new Tn;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let r=2,s=t.length;r+5<s;r+=6)e.appendLine(new kn({c1x:t[r],c1y:t[r+1],c2x:t[r+2],c2y:t[r+3],toX:t[r+4],toY:t[r+5]}));return e}static fromLines(t){const e=new Tn;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let r=0,s=t.length;r<s;r++)e.appendLine(t[r]);return e}appendLine(t){if(t instanceof tS){no(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,m,b,g]=h;this.normalizedLines.push(new kn({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:b,toY:g})),this.prevPathX=b,this.prevPathY=g});return}let e,r,s,i,o,a;t instanceof kn?(e=t.c1x,r=t.c1y,s=t.c2x,i=t.c2y,o=t.toX,a=t.toY):t instanceof eS?[e,r,s,i,o,a]=Es(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,r,s,i,o,a]=hr(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new kn({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:r,c2x:s,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:r}=this.updateTransform(),s=[];s.push(["M",t,e]);for(let i=0,o=r.length;i<o;i++)s.push(...r[i].toSVGPathData());return s}toSVGPathD(){return qc(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:r,normalizedLines:s}=this.updateTransform();t.beginPath(),t.moveTo(e,r),s.forEach(i=>{i.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],r=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)}),e.length==0||r.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min.apply(0,e),i=Math.min.apply(0,r),o=Math.max.apply(0,e),a=Math.max.apply(0,r);return{x:s,y:i,width:o-s,height:a-i}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new Zt;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,r=this.startPathY;({x:e,y:r}=t.transformPoint({x:e,y:r}));const s=[];return this.normalizedLines.forEach(i=>{let o=i.x,a=i.y,c=i.c1x,h=i.c1y,u=i.c2x,l=i.c2y,d=i.toX,f=i.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:d,y:f}=t.transformPoint({x:d,y:f}),s.push(new kn({x:o,y:a,c1x:c,c1y:h,c2x:u,c2y:l,toX:d,toY:f}))}),{startPathX:e,startPathY:r,normalizedLines:s}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,r)=>e+=r.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let r=0;const s=e.length;for(let i=0;i<s;i++){const o=e[i],a=o.length();if(r+a>=t)return o.getPointAtSegmentLength(t-r);r+=a}return e[s-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:r,normalizedLines:s}=this.updateTransform(),i=s.length;if(i===0)return{x:e,y:r};if(i===1)return s[0].interpolate(t);{let o=t*i,a=s[0];if(o--,o>1)for(let c=1;c<i&&(a=s[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const r=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(r,t):r}}getSubpathsAtLength(t,e,r){const{startPathX:s,startPathY:i,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new Tn;h.prevPathX=h.startPathX=s,h.prevPathY=h.startPathY=i;for(let u=0,l=o.length;u<l;u++){const d=o[u],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new kn({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),r)return h;a=h,h.appendLine(new kn({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const r=this.getTotalLength();let s={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=r;h+=a){const u=this.getPointAtLength(h),l=Math.pow(tr(u.x,u.y,t,e),2);l<o&&(s=u,i=h,o=l)}for(a/=2;a>.5;){const h=i-a,u=this.getPointAtLength(h),l=Math.pow(tr(u.x,u.y,t,e),2),d=i+a,f=this.getPointAtLength(d),p=Math.pow(tr(f.x,f.y,t,e),2);h>=0&&l<o?(s=u,i=h,o=l):d<=r&&p<o?(s=f,i=d,o=p):a/=2}const c=this.getPointAtLength(i+(i===r?-.1:.1));return{point:s,rotation:i>=r?ze(c.x,c.y,s.x,s.y):ze(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:r}=this.updateTransform();return[t,e].concat(r.reduce((s,i)=>s.concat([i.c1x,i.c1y,i.c2x,i.c2y,i.toX,i.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let r=t[e-2],s=t[e-1],i=0;for(let o=0;o<e;o+=6)i+=tr(t[o],t[o+1],r,s),r=t[o],s=t[o+1];return Math.floor(i)}expendFill(t){const e=this.polymorphPoints,r=e.length;let s=t-r;const i=Math.ceil(t/r),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=r-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<i&&s>0;)o.push(["C",d,f,d,f,d,f]),s-=6,p++}return o}static mixPoints(t,e,r){const s=t.length,i=new Array(s);for(let o=0;o<s;o++)i[o]=at(t[o]+(e[o]-t[o])*r,6);return i}static getPathInterpolator(t,e){return r=>Math.abs(r-0)<Number.EPSILON?t:Math.abs(r-1)<Number.EPSILON?e:Tn.fromPolymorphPoints(Tn.mixPoints(new Tn({d:t}).polymorphPoints,new Tn({d:e}).polymorphPoints,r)).toSVGPathData()}};class Ts{static _nextId=0;static nextId(){return Ts._nextId++}}const X={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},style:"cubic-bezier(0.1, 0.57, 0.1, 1)"},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)},style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)"},Bounce:{In:function(n){return 1-X.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?X.Bounce.In(n*2)*.5:X.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(r){return t*Math.random()+e*n(r)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function gm(n){switch(n){case X.Quadratic.In:return X.Quadratic.Out;case X.Quadratic.Out:return X.Quadratic.In;case X.Quadratic.InOut:return X.Quadratic.InOut;case X.Cubic.In:return X.Cubic.Out;case X.Cubic.Out:return X.Cubic.In;case X.Cubic.InOut:return X.Cubic.InOut;case X.Quartic.In:return X.Quartic.Out;case X.Quartic.Out:return X.Quartic.In;case X.Quartic.InOut:return X.Quartic.InOut;case X.Quintic.In:return X.Quintic.Out;case X.Quintic.Out:return X.Quintic.In;case X.Quintic.InOut:return X.Quintic.InOut;case X.Sinusoidal.In:return X.Sinusoidal.Out;case X.Sinusoidal.Out:return X.Sinusoidal.In;case X.Sinusoidal.InOut:return X.Sinusoidal.InOut;case X.Exponential.In:return X.Exponential.Out;case X.Exponential.Out:return X.Exponential.In;case X.Exponential.InOut:return X.Exponential.InOut;case X.Circular.In:return X.Circular.Out;case X.Circular.Out:return X.Circular.In;case X.Circular.InOut:return X.Circular.InOut;case X.Elastic.In:return X.Elastic.Out;case X.Elastic.Out:return X.Elastic.In;case X.Elastic.InOut:return X.Elastic.InOut;case X.Back.In:return X.Back.Out;case X.Back.Out:return X.Back.In;case X.Back.InOut:return X.Back.InOut;case X.Bounce.In:return X.Bounce.Out;case X.Bounce.Out:return X.Bounce.In;case X.Bounce.InOut:return X.Bounce.InOut;default:return n}}const lS=4,fS=.001,dS=1e-7,mS=10,Ps=11,io=1/(Ps-1),pS=typeof Float32Array=="function";function ym(n,t){return 1-3*t+3*n}function bm(n,t){return 3*t-6*n}function vm(n){return 3*n}function oo(n,t,e){return((ym(t,e)*n+bm(t,e))*n+vm(t))*n}function wm(n,t,e){return 3*ym(t,e)*n*n+2*bm(t,e)*n+vm(t)}function gS(n,t,e,r,s){let i,o,a=0;do o=t+(e-t)/2,i=oo(o,r,s)-n,i>0?e=o:t=o;while(Math.abs(i)>dS&&++a<mS);return o}function yS(n,t,e,r){for(let s=0;s<lS;++s){const i=wm(t,e,r);if(i===0)return t;const o=oo(t,e,r)-n;t-=o/i}return t}function bS(n){return n}function Jc(n,t,e,r){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===r)return bS;const s=pS?new Float32Array(Ps):new Array(Ps);for(let o=0;o<Ps;++o)s[o]=oo(o*io,n,e);function i(o){let a=0,c=1;const h=Ps-1;for(;c!==h&&s[c]<=o;++c)a+=io;--c;const u=(o-s[c])/(s[c+1]-s[c]),l=a+u*io,d=wm(l,n,e);return d>=fS?yS(o,l,n,e):d===0?l:gS(o,a,a+io,n,e)}return o=>o===0||o===1?o:oo(i(o),t,r)}function Zc(n){switch(n){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function xm(n){const[t,e,r,s]=Zc(n);return[1-r,1-s,1-t,1-e]}function vS(n){return Jc(...Zc(n))}function wS(n){return Jc(...xm(n))}const dn={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let r=t;r>1;r--)e*=r;return n[t]=e,e}}(),Bernstein:function(n,t){const e=dn.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,r,s){const i=(e-n)*.5,o=(r-t)*.5,a=s*s,c=s*a;return(2*t-2*e+i+o)*c+(-3*t+3*e-2*i-o)*a+i*s+t},QuadraticBezier:(n,t,e,r)=>{const s=1-r;return s*s*n+2*s*r*t+r*r*e},CubicBezier:(n,t,e,r,s)=>{const i=1-s;return i*i*i*n+3*i*i*s*t+3*i*s*s*e+s*s*s*r}},Linear:function(n,t){const e=n.length-1,r=e*t,s=Math.floor(r),i=dn.Utils.Linear;return t<0?i(n[0],n[1],r):t>1?i(n[e],n[e-1],e-r):i(n[s],n[s+1>e?e:s+1],r-s)},Bezier:function(n,t){let e=0;const r=n.length-1,s=Math.pow,i=dn.Utils.Bernstein;for(let o=0;o<=r;o++)e+=s(1-t,r-o)*s(t,o)*n[o]*i(r,o);return e},CatmullRom:function(n,t){const e=n.length-1;let r=e*t,s=Math.floor(r);const i=dn.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(r=e*(1+t))),i(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],r-s)):t<0?n[0]-(i(n[0],n[0],n[1],n[1],-r)-n[0]):t>1?n[e]-(i(n[e],n[e],n[e-1],n[e-1],r-e)-n[e]):i(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],r-s)}};class Sm{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=Rt(),e=!1){const r=Object.keys(this._tweens);for(let s=0;s<r.length;s++){const i=this._tweens[r[s]],o=!e;i&&i.update(t,o)===!1&&!e&&delete this._tweens[r[s]]}return!!Object.keys(this._tweens).length}}const Oe=new Sm;class Qc{constructor(t,e=Oe){this._object=t,this._group=e}_id=Ts.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=X.Linear.None;_interpolationFunction=dn.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=Rt()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,r,s){for(const i in r){const o=t[i],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(r[i]);if(!(c==="undefined"||c==="function")){if(h){let u=r[i];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),r[i]=[o].concat(u)}if((c==="object"||a)&&o&&!h){e[i]=a?[]:{};for(const u in o)e[i][u]=o[u];s[i]=a?[]:{},this._setupProperties(o,e[i],r[i],s[i])}else typeof e[i]>"u"&&(e[i]=o),a||(e[i]*=1),h?s[i]=r[i].slice().reverse():s[i]=e[i]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=Rt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=Rt()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Oe){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=X.Linear.None){return this._easingFunction=t,this}interpolation(t=dn.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=Rt(),e=!0){if(this._isPaused)return!0;let r,s;const i=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>i)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),s=(t-this._startTime)/this._durationTime,s=this._durationTime===0||s>1?1:s;const o=this._easingFunction(s);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,s),s===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,r,s){for(const i in r){if(e[i]===void 0)continue;const o=e[i]||0;let a=r[i];const c=Array.isArray(t[i]),h=Array.isArray(a);!c&&h?t[i]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[i],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[i]=o+(a-o)*s))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],r=this._valuesEnd[t];typeof r=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(r):this._valuesStartRepeat[t]=r,this._valuesEnd[t]=e}}const xS=Ts.nextId,SS=Oe.getAll.bind(Oe),_S=Oe.removeAll.bind(Oe),ES=Oe.add.bind(Oe),CS=Oe.remove.bind(Oe),TS=Oe.update.bind(Oe),PS={now:Rt,Sequence:Ts,Easing:X,Interpolation:dn,Group:Sm,Tween:Qc,nextId:xS,getAll:SS,removeAll:_S,add:ES,remove:CS,update:TS};class th{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Rt(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=Rt();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class As{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){Tw(this.tweens,(e,r)=>t?e.delay>r.delay:e.delay<=r.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(r=>{const s={...r};delete s.tween,s.fromValues={...s.fromValues},s.toValues={...s.toValues},e.push(s)}),e}addTween(t,e,r){const s={fromValues:t,toValues:e,frames:typeof r?.frames=="number"?r.frames:1,delay:typeof r?.delay=="number"?r.delay:this.tweens.length,easeFunction:r?.easeFunction||X.Linear.None,interpolationFunction:r?.interpolationFunction||dn.Linear,repeat:typeof r?.repeat=="number"?r.repeat:0,yoyo:r?.yoyo||!1,onStart:r?.onStart||(()=>{}),onUpdate:r?.onUpdate||(()=>{}),onComplete:r?.onComplete||(()=>{})};return this.tweens.push(s),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new th,r=this.frameDuration;return new Promise(s=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=lb(i=>{if(!this.isPaused){const a=Math.max(0,i-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*r<=c).forEach(h=>{h.tween||(h.tween=new Qc({...h.fromValues}).to({...h.toValues},h.frames*r).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*r>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),cf(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),s()),o})})}isPaused=!1;pausedClock=new th;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(r=>{e=Math.max(e,r.delay+r.frames),r.easeFunction=gm(r.easeFunction);const s={...r.toValues};r.toValues={...r.fromValues},r.fromValues={...s}}),t.forEach(r=>{r.delay=e-r.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}var eh={exports:{}},ut={};/**
31
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function gs(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Rr=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ir(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(Et(u))try{u()}catch(m){i=m instanceof _c?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=ir(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Ad(p)}catch(m){i=i??[],m instanceof _c?i=Mn(Mn([],hn(i)),hn(m.errors)):i.push(m)}}}catch(m){r={error:m}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new _c(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ad(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&gs(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&gs(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Td=Rr.EMPTY;function Pd(n){return n instanceof Rr||n&&"closed"in n&&Et(n.remove)&&Et(n.add)&&Et(n.unsubscribe)}function Ad(n){Et(n)?n():n.unsubscribe()}var Md={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ec={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=Ec.delegate;return s?.setTimeout?s.setTimeout.apply(s,Mn([n,t],hn(e))):setTimeout.apply(void 0,Mn([n,t],hn(e)))},clearTimeout:function(n){var t=Ec.delegate;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Dd(n){Ec.setTimeout(function(){throw n})}function ys(){}function Gi(n){n()}var Cc=function(n){Ke(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Pd(e)&&e.add(r)):r.destination=Hw,r}return t.create=function(e,r,s){return new kr(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Rr),Gw=Function.prototype.bind;function Tc(n,t){return Gw.call(n,t)}var Xw=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){Xi(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){Xi(r)}else Xi(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Xi(e)}},n}(),kr=function(n){Ke(t,n);function t(e,r,s){var i=n.call(this)||this,o;if(Et(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;i&&Md.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},o={next:e.next&&Tc(e.next,a),error:e.error&&Tc(e.error,a),complete:e.complete&&Tc(e.complete,a)}):o=e}return i.destination=new Xw(o),i}return t}(Cc);function Xi(n){Dd(n)}function Ww(n){throw n}var Hw={closed:!0,next:ys,error:Ww,complete:ys},Pc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function or(n){return n}function qw(n){return n.length===0?or:n.length===1?n[0]:function(e){return n.reduce(function(r,s){return s(r)},e)}}var Nt=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=Jw(t)?t:new kr(t,e,r);return Gi(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Od(e),new e(function(s,i){var o=new kr({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Pc]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return qw(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Od(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n}();function Od(n){var t;return(t=n??Md.Promise)!==null&&t!==void 0?t:Promise}function Kw(n){return n&&Et(n.next)&&Et(n.error)&&Et(n.complete)}function Jw(n){return n&&n instanceof Cc||Kw(n)&&Pd(n)}function Zw(n){return Et(n?.lift)}function oe(n){return function(t){if(Zw(t))return t.lift(function(e){try{return n(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function $t(n,t,e,r,s){return new Qw(n,t,e,r,s)}var Qw=function(n){Ke(t,n);function t(e,r,s,i,o,a){var c=n.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(h){try{r(h)}catch(u){e.error(u)}}:n.prototype._next,c._error=i?function(h){try{i(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=s?function(){try{s()}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(Cc),tx=Sc(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),un=function(n){Ke(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new Id(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new tx},t.prototype.next=function(e){var r=this;Gi(function(){var s,i;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=ir(r.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var r=this;Gi(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var s=r.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Gi(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,s=this,i=s.hasError,o=s.isStopped,a=s.observers;return i||o?Td:(this.currentObservers=null,a.push(e),new Rr(function(){r.currentObservers=null,gs(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,s=r.hasError,i=r.thrownError,o=r.isStopped;s?e.error(i):o&&e.complete()},t.prototype.asObservable=function(){var e=new Nt;return e.source=this,e},t.create=function(e,r){return new Id(e,r)},t}(Nt),Id=function(n){Ke(t,n);function t(e,r){var s=n.call(this)||this;return s.destination=e,s.source=r,s}return t.prototype.next=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,e)},t.prototype.error=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&s!==void 0?s:Td},t}(un),Wi=function(n){Ke(t,n);function t(e){var r=n.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=n.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,s=e.thrownError,i=e._value;if(r)throw s;return this._throwIfClosed(),i},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(un),Ac={now:function(){return(Ac.delegate||Date).now()},delegate:void 0},ex=function(n){Ke(t,n);function t(e,r,s){e===void 0&&(e=1/0),r===void 0&&(r=1/0),s===void 0&&(s=Ac);var i=n.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=s,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return t.prototype.next=function(e){var r=this,s=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,c=r._windowTime;s||(i.push(e),!o&&i.push(a.now()+c)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(e),s=this,i=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!e.closed;c+=i?1:2)e.next(a[c]);return this._checkFinalizedStatuses(e),r},t.prototype._trimBuffer=function(){var e=this,r=e._bufferSize,s=e._timestampProvider,i=e._buffer,o=e._infiniteTimeWindow,a=(o?1:2)*r;if(r<1/0&&a<i.length&&i.splice(0,i.length-a),!o){for(var c=s.now(),h=0,u=1;u<i.length&&i[u]<=c;u+=2)h=u;h&&i.splice(0,h+1)}},t}(un),nx=function(n){Ke(t,n);function t(e,r){return n.call(this)||this}return t.prototype.schedule=function(e,r){return this},t}(Rr),Hi={setInterval:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=Hi.delegate;return s?.setInterval?s.setInterval.apply(s,Mn([n,t],hn(e))):setInterval.apply(void 0,Mn([n,t],hn(e)))},clearInterval:function(n){var t=Hi.delegate;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},rx=function(n){Ke(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.scheduler=e,s.work=r,s.pending=!1,s}return t.prototype.schedule=function(e,r){var s;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,r)),this.pending=!0,this.delay=r,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,r),this},t.prototype.requestAsyncId=function(e,r,s){return s===void 0&&(s=0),Hi.setInterval(e.flush.bind(e,this),s)},t.prototype.recycleAsyncId=function(e,r,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return r;r!=null&&Hi.clearInterval(r)},t.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(e,r);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,r){var s=!1,i;try{this.work(e)}catch(o){s=!0,i=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,s=e.scheduler,i=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,gs(i,this),r!=null&&(this.id=this.recycleAsyncId(s,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(nx),Rd=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},n.now=Ac.now,n}(),sx=function(n){Ke(t,n);function t(e,r){r===void 0&&(r=Rd.now);var s=n.call(this,e,r)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var s;this._active=!0;do if(s=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,s){for(;e=r.shift();)e.unsubscribe();throw s}},t}(Rd),Mc=new sx(rx),ix=Mc,kd=new Nt(function(n){return n.complete()});function Ld(n){return n&&Et(n.schedule)}function Dc(n){return n[n.length-1]}function ox(n){return Et(Dc(n))?n.pop():void 0}function bs(n){return Ld(Dc(n))?n.pop():void 0}function ax(n,t){return typeof Dc(n)=="number"?n.pop():t}var Oc=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Nd(n){return Et(n?.then)}function zd(n){return Et(n[Pc])}function Vd(n){return Symbol.asyncIterator&&Et(n?.[Symbol.asyncIterator])}function Fd(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function cx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Bd=cx();function $d(n){return Et(n?.[Bd])}function Ud(n){return Yw(this,arguments,function(){var e,r,s,i;return Cd(this,function(o){switch(o.label){case 0:e=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Ir(e.read())];case 3:return r=o.sent(),s=r.value,i=r.done,i?[4,Ir(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Ir(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Yd(n){return Et(n?.getReader)}function jt(n){if(n instanceof Nt)return n;if(n!=null){if(zd(n))return hx(n);if(Oc(n))return ux(n);if(Nd(n))return lx(n);if(Vd(n))return jd(n);if($d(n))return fx(n);if(Yd(n))return dx(n)}throw Fd(n)}function hx(n){return new Nt(function(t){var e=n[Pc]();if(Et(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ux(n){return new Nt(function(t){for(var e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function lx(n){return new Nt(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Dd)})}function fx(n){return new Nt(function(t){var e,r;try{for(var s=ir(n),i=s.next();!i.done;i=s.next()){var o=i.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}t.complete()})}function jd(n){return new Nt(function(t){mx(n,t).catch(function(e){return t.error(e)})})}function dx(n){return jd(Ud(n))}function mx(n,t){var e,r,s,i;return Uw(this,void 0,void 0,function(){var o,a;return Cd(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=jw(n),c.label=1;case 1:return[4,e.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(i=e.return)?[4,i.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ln(n,t,e,r,s){r===void 0&&(r=0),s===void 0&&(s=!1);var i=t.schedule(function(){e(),s?n.add(this.schedule(null,r)):this.unsubscribe()},r);if(n.add(i),!s)return i}function Gd(n,t){return t===void 0&&(t=0),oe(function(e,r){e.subscribe($t(r,function(s){return ln(r,n,function(){return r.next(s)},t)},function(){return ln(r,n,function(){return r.complete()},t)},function(s){return ln(r,n,function(){return r.error(s)},t)}))})}function Ic(n,t){return t===void 0&&(t=0),oe(function(e,r){r.add(n.schedule(function(){return e.subscribe(r)},t))})}function px(n,t){return jt(n).pipe(Ic(t),Gd(t))}function gx(n,t){return jt(n).pipe(Ic(t),Gd(t))}function yx(n,t){return new Nt(function(e){var r=0;return t.schedule(function(){r===n.length?e.complete():(e.next(n[r++]),e.closed||this.schedule())})})}function bx(n,t){return new Nt(function(e){var r;return ln(e,t,function(){r=n[Bd](),ln(e,t,function(){var s,i,o;try{s=r.next(),i=s.value,o=s.done}catch(a){e.error(a);return}o?e.complete():e.next(i)},0,!0)}),function(){return Et(r?.return)&&r.return()}})}function Xd(n,t){if(!n)throw new Error("Iterable cannot be null");return new Nt(function(e){ln(e,t,function(){var r=n[Symbol.asyncIterator]();ln(e,t,function(){r.next().then(function(s){s.done?e.complete():e.next(s.value)})},0,!0)})})}function vx(n,t){return Xd(Ud(n),t)}function xx(n,t){if(n!=null){if(zd(n))return px(n,t);if(Oc(n))return yx(n,t);if(Nd(n))return gx(n,t);if(Vd(n))return Xd(n,t);if($d(n))return bx(n,t);if(Yd(n))return vx(n,t)}throw Fd(n)}function vs(n,t){return t?xx(n,t):jt(n)}function Sx(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n);return vs(n,e)}var _x=Sc(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function Ex(n,t){var e=typeof t=="object";return new Promise(function(r,s){var i=new kr({next:function(o){r(o),i.unsubscribe()},error:s,complete:function(){e?r(t.defaultValue):s(new _x)}});n.subscribe(i)})}function Cx(n){return n instanceof Date&&!isNaN(n)}function zt(n,t){return oe(function(e,r){var s=0;e.subscribe($t(r,function(i){r.next(n.call(t,i,s++))}))})}var Tx=Array.isArray;function Px(n,t){return Tx(t)?n.apply(void 0,Mn([],hn(t))):n(t)}function Rc(n){return zt(function(t){return Px(n,t)})}var Ax=Array.isArray,Mx=Object.getPrototypeOf,Dx=Object.prototype,Ox=Object.keys;function Ix(n){if(n.length===1){var t=n[0];if(Ax(t))return{args:t,keys:null};if(Rx(t)){var e=Ox(t);return{args:e.map(function(r){return t[r]}),keys:e}}}return{args:n,keys:null}}function Rx(n){return n&&typeof n=="object"&&Mx(n)===Dx}function kx(n,t){return n.reduce(function(e,r,s){return e[r]=t[s],e},{})}function Lx(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n),r=ox(n),s=Ix(n),i=s.args,o=s.keys;if(i.length===0)return vs([],e);var a=new Nt(Nx(i,e,o?function(c){return kx(o,c)}:or));return r?a.pipe(Rc(r)):a}function Nx(n,t,e){return e===void 0&&(e=or),function(r){Wd(t,function(){for(var s=n.length,i=new Array(s),o=s,a=s,c=function(u){Wd(t,function(){var l=vs(n[u],t),d=!1;l.subscribe($t(r,function(f){i[u]=f,d||(d=!0,a--),a||r.next(e(i.slice()))},function(){--o||r.complete()}))},r)},h=0;h<s;h++)c(h)},r)}}function Wd(n,t,e){n?ln(e,n,t):t()}function zx(n,t,e,r,s,i,o,a){var c=[],h=0,u=0,l=!1,d=function(){l&&!c.length&&!h&&t.complete()},f=function(m){return h<r?p(m):c.push(m)},p=function(m){i&&t.next(m),h++;var b=!1;jt(e(m,u++)).subscribe($t(t,function(g){s?.(g),i?f(g):t.next(g)},function(){b=!0},void 0,function(){if(b)try{h--;for(var g=function(){var w=c.shift();o?ln(t,o,function(){return p(w)}):p(w)};c.length&&h<r;)g();d()}catch(w){t.error(w)}}))};return n.subscribe($t(t,f,function(){l=!0,d()})),function(){a?.()}}function kc(n,t,e){return e===void 0&&(e=1/0),Et(t)?kc(function(r,s){return zt(function(i,o){return t(r,i,s,o)})(jt(n(r,s)))},e):(typeof t=="number"&&(e=t),oe(function(r,s){return zx(r,s,n,e)}))}function Hd(n){return n===void 0&&(n=1/0),kc(or,n)}function Vx(){return Hd(1)}function qd(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return Vx()(vs(n,bs(n)))}var Fx=["addListener","removeListener"],Bx=["addEventListener","removeEventListener"],$x=["on","off"];function Lc(n,t,e,r){if(Et(e)&&(r=e,e=void 0),r)return Lc(n,t,e).pipe(Rc(r));var s=hn(jx(n)?Bx.map(function(a){return function(c){return n[a](t,c,e)}}):Ux(n)?Fx.map(Kd(n,t)):Yx(n)?$x.map(Kd(n,t)):[],2),i=s[0],o=s[1];if(!i&&Oc(n))return kc(function(a){return Lc(a,t,e)})(jt(n));if(!i)throw new TypeError("Invalid event target");return new Nt(function(a){var c=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return a.next(1<h.length?h:h[0])};return i(c),function(){return o(c)}})}function Kd(n,t){return function(e){return function(r){return n[e](t,r)}}}function Ux(n){return Et(n.addListener)&&Et(n.removeListener)}function Yx(n){return Et(n.on)&&Et(n.off)}function jx(n){return Et(n.addEventListener)&&Et(n.removeEventListener)}function kt(n,t,e){return e?kt(n,t).pipe(Rc(e)):new Nt(function(r){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return r.next(o.length===1?o[0]:o)},i=n(s);return Et(t)?function(){return t(s,i)}:void 0})}function Gx(n,t,e){n===void 0&&(n=0),e===void 0&&(e=ix);var r=-1;return t!=null&&(Ld(t)?e=t:r=t),new Nt(function(s){var i=Cx(n)?+n-e.now():n;i<0&&(i=0);var o=0;return e.schedule(function(){s.closed||(s.next(o++),0<=r?this.schedule(void 0,r):s.complete())},i)})}function qi(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n),r=ax(n,1/0),s=n;return s.length?s.length===1?jt(s[0]):Hd(r)(vs(s,e)):kd}var Xx=Array.isArray;function Wx(n){return n.length===1&&Xx(n[0])?n[0]:n}function Nc(n,t){return oe(function(e,r){var s=0;e.subscribe($t(r,function(i){return n.call(t,i,s++)&&r.next(i)}))})}function Ki(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n=Wx(n),n.length===1?jt(n[0]):new Nt(Hx(n))}function Hx(n){return function(t){for(var e=[],r=function(i){e.push(jt(n[i]).subscribe($t(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==i&&e[a].unsubscribe();e=null}t.next(o)})))},s=0;e&&!t.closed&&s<n.length;s++)r(s)}}function Jd(n){return oe(function(t,e){var r=null,s=!1,i;r=t.subscribe($t(e,void 0,void 0,function(o){i=jt(n(o,Jd(n)(t))),r?(r.unsubscribe(),r=null,i.subscribe(e)):s=!0})),s&&(r.unsubscribe(),r=null,i.subscribe(e))})}function Dn(n,t){return t===void 0&&(t=or),n=n??qx,oe(function(e,r){var s,i=!0;e.subscribe($t(r,function(o){var a=t(o);(i||!n(s,a))&&(i=!1,s=a,r.next(o))}))})}function qx(n,t){return n===t}function Zd(n,t){return t?function(e){return e.pipe(Zd(function(r,s){return jt(n(r,s)).pipe(zt(function(i,o){return t(r,i,s,o)}))}))}:oe(function(e,r){var s=0,i=null,o=!1;e.subscribe($t(r,function(a){i||(i=$t(r,void 0,function(){i=null,o&&r.complete()}),jt(n(a,s++)).subscribe(i))},function(){o=!0,!i&&r.complete()}))})}function Kx(n){n===void 0&&(n={});var t=n.connector,e=t===void 0?function(){return new un}:t,r=n.resetOnError,s=r===void 0?!0:r,i=n.resetOnComplete,o=i===void 0?!0:i,a=n.resetOnRefCountZero,c=a===void 0?!0:a;return function(h){var u,l,d,f=0,p=!1,m=!1,b=function(){l?.unsubscribe(),l=void 0},g=function(){b(),u=d=void 0,p=m=!1},w=function(){var x=u;g(),x?.unsubscribe()};return oe(function(x,v){f++,!m&&!p&&b();var E=d=d??e();v.add(function(){f--,f===0&&!m&&!p&&(l=zc(w,c))}),E.subscribe(v),!u&&f>0&&(u=new kr({next:function(_){return E.next(_)},error:function(_){m=!0,b(),l=zc(g,s,_),E.error(_)},complete:function(){p=!0,b(),l=zc(g,o),E.complete()}}),jt(x).subscribe(u))})(h)}}function zc(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];if(t===!0){n();return}if(t!==!1){var s=new kr({next:function(){s.unsubscribe(),n()}});return jt(t.apply(void 0,Mn([],hn(e)))).subscribe(s)}}function Qd(n,t,e){var r,s,i,o,a=!1;return n&&typeof n=="object"?(r=n.bufferSize,o=r===void 0?1/0:r,s=n.windowTime,t=s===void 0?1/0:s,i=n.refCount,a=i===void 0?!1:i,e=n.scheduler):o=n??1/0,Kx({connector:function(){return new ex(o,t,e)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function ar(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=bs(n);return oe(function(r,s){(e?qd(n,r,e):qd(n,r)).subscribe(s)})}function Ji(n,t){return oe(function(e,r){var s=null,i=0,o=!1,a=function(){return o&&!s&&r.complete()};e.subscribe($t(r,function(c){s?.unsubscribe();var h=0,u=i++;jt(n(c,u)).subscribe(s=$t(r,function(l){return r.next(t?t(c,l,u,h++):l)},function(){s=null,a()}))},function(){o=!0,a()}))})}function Jx(){return Ji(or)}function Vc(n){return oe(function(t,e){jt(n).subscribe($t(e,function(){return e.complete()},ys)),!e.closed&&t.subscribe(e)})}function cr(n,t,e){var r=Et(n)||t||e?{next:n,error:t,complete:e}:n;return r?oe(function(s,i){var o;(o=r.subscribe)===null||o===void 0||o.call(r);var a=!0;s.subscribe($t(i,function(c){var h;(h=r.next)===null||h===void 0||h.call(r,c),i.next(c)},function(){var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},function(c){var h;a=!1,(h=r.error)===null||h===void 0||h.call(r,c),i.error(c)},function(){var c,h;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(h=r.finalize)===null||h===void 0||h.call(r)}))}):or}function Zx(n,t){return oe(function(e,r){var s=t??{},i=s.leading,o=i===void 0?!0:i,a=s.trailing,c=a===void 0?!1:a,h=!1,u=null,l=null,d=!1,f=function(){l?.unsubscribe(),l=null,c&&(b(),d&&r.complete())},p=function(){l=null,d&&r.complete()},m=function(g){return l=jt(n(g)).subscribe($t(r,f,p))},b=function(){if(h){h=!1;var g=u;u=null,r.next(g),!d&&m(g)}};e.subscribe($t(r,function(g){h=!0,u=g,!(l&&!l.closed)&&(o?b():m(g))},function(){d=!0,!(c&&h&&l&&!l.closed)&&r.complete()}))})}function Qx(n,t,e){t===void 0&&(t=Mc);var r=Gx(n,t);return Zx(function(){return r},e)}function t2(n,t){return oe(function(e,r){var s=[],i=function(o){for(;0<s.length;)s.shift().error(o);r.error(o)};jt(n).subscribe($t(r,function(o){var a=new un;s.push(a);var c=new Rr,h=function(){gs(s,a),a.complete(),c.unsubscribe()},u;try{u=jt(t(o))}catch(l){i(l);return}r.next(a.asObservable()),c.add(u.subscribe($t(r,h,ys,i)))},ys)),e.subscribe($t(r,function(o){var a,c,h=s.slice();try{for(var u=ir(h),l=u.next();!l.done;l=u.next()){var d=l.value;d.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();r.complete()},i,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}function e2(n){return n.toElement?n.toElement:n.currentTarget?n.currentTarget:n.srcElement?n.srcElement:null}function Ct(n,t,e,r=!1){const s=async i=>{await e(i)};try{n.addEventListener(t,s,r)}catch{n.attachEvent("on"+t,s)}return()=>{try{n.removeEventListener(t,s,r)}catch{n.detachEvent("on"+t,s)}}}function n2(n,t,e,r,s=!1){return Ct(n||document.body,e,i=>{i.target===t&&r(i)},s)}function r2(n){n.replaceWith(n.cloneNode(!0))}function it(n,t,e=!1){return Lc(n,t,{capture:e})}function s2(n){const t=kt(e=>n.register(e),(e,r)=>{n.unregister?.(e,...r||[])},(...e)=>[...e]);return n.share?t.pipe(Qd({bufferSize:n.bufferSize||1,refCount:!0})):t}function tm(n){if(n.stopPropagation){n.stopPropagation();return}try{n.cancelBubble=!0}catch{}}function On(n){if(n.preventDefault){n.preventDefault();return}try{n.returnValue=!1}catch{}}const i2=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],o2=["keydown","keyup","keypress"],a2=["touchstart","touchend","touchcancel","touchmove"],c2=["pointerdown","pointerup","pointercancel","pointermove"],h2=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],u2=["change"];function Zi(n,t={bubbles:!0,detail:{}}){let e;try{const r=Object.assign({bubbles:!0,cancelable:!0,view:window,detail:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},t);i2.includes(n)?e=new MouseEvent(n,r):o2.includes(n)?e=new KeyboardEvent(n,r):a2.includes(n)?e=new TouchEvent(n,r):c2.includes(n)?e=new PointerEvent(n,r):h2.includes(n)?e=new DragEvent(n,r):u2.includes(n)?e=new Event(n,r):e=new CustomEvent(n,r)}catch{document.createEvent?e=document.createEvent("Event").initEvent(n,!0,!0):document.createEventObject&&(e=document.createEventObject())}return e}function Fc(n,t,e){if(n)if(n.dispatchEvent)n.dispatchEvent(e);else if(n.fireEvent&&document.createEventObject)n.fireEvent("on"+t,e);else throw new Error(`Can't dispatch event : ${t}`)}function l2(n,t){const e=n.target,r=Zi(t);Fc(e,t,r)}function f2(n){const t=n.target,e="click";if(!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)){const r=Zi(e);r.view=n.view||window,r.detail=1,r.screenX=t.screenX||0,r.screenY=t.screenY||0,r.clientX=t.clientX||0,r.clientY=t.clientY||0,r.pageX=n.pageX,r.pageY=n.pageY,r.ctrlKey=!!n.ctrlKey,r.altKey=!!n.altKey,r.shiftKey=!!n.shiftKey,r.metaKey=!!n.metaKey,r.button=0,r.relatedTarget=null,r._constructed=!0,Fc(t,e,r)}}function d2(n,t){const e=n.changedTouches[0];return Zi(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function m2(n,t,e,r,s){const i=t/e;let o=0,a=0;switch(n){case"aspectFit":i>=1?(o=r,a=o/i,a>s&&(a=s,o=a*i)):(a=s,o=a*i,o>r&&(o=r,a=o/i));break;case"aspectFill":i>=1?(a=s,o=a*i):(o=r,a=o/i);break;case"widthFix":o=r,a=o/i;break;case"heightFix":a=s,o=a*i;break;case"scaleToFill":default:o=r,a=s;break}return{width:o,height:a}}function em(n){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(n.width,n.height)}}const p2=n=>{const t=n.width,e=n.height,r=t*e*3,s=r+54,i=[66,77,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,r&255,r>>8&255,r>>16&255,r>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=n.data;let h="";const u=t<<2;let l=e;const d=String.fromCharCode;do{const p=u*(l-1);let m="";for(let b=0;b<t;b++){const g=b<<2;m+=d(c[p+g+2])+d(c[p+g+1])+d(c[p+g])}for(let b=0;b<a;b++)m+=String.fromCharCode(0);h+=m}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let m="";if(typeof p=="string")m=p;else for(let b=0;b<p.length;b++)m+=String.fromCharCode(p[b]);return btoa(m)}return f(i.concat(o))+f(h)};function g2(n){const{width:t,height:e}=n,r=document.createElement("canvas"),s=r.getContext("2d");return r.width=t,r.height=e,s.putImageData(n,0,0,0,0,t,e),r.toDataURL("image/png")}const y2=(n,t,e)=>{const{width:r,height:s}=n,i=document.createElement("canvas"),o=i.getContext("2d");i.width=r,i.height=s,o.putImageData(n,0,0,0,0,r,s);const a=`image/${t?t.toLowerCase():"png"}`;i.toBlob(c=>{e?.(null,c)},a,1)};function b2(n,t){return createImageBitmap(n,t)}function v2(n){const t=[],e=[],r=[];let s=0;for(let c=0,h=n.data.length;c<h;c+=4)t[s]=n.data[c],e[s]=n.data[c+1],r[s]=n.data[c+2],s+=1;const i=Bc(t),o=Bc(e),a=Bc(r);return"rgb("+i+","+o+","+a+")"}function Bc(n){const t={},e=[],r=[];for(let a=0;a<n.length;a++)t[n[a]]?e.push(n[a]):t[n[a]]=1;let s=0;for(let a=0;a<e.length;a++){s=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(s+=1),r[a]=s}const i=Math.max.apply(null,r);let o=0;for(;o<r.length;o++)if(r[o]===i)return;return e[o]}const w2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[(o*e+e-a-1)*4],s[c+1]=t[(o*e+e-a-1)*4+1],s[c+2]=t[(o*e+e-a-1)*4+2],s[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(s,e,r)},x2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[((r-o-1)*e+a)*4],s[c+1]=t[((r-o-1)*e+a)*4+1],s[c+2]=t[((r-o-1)*e+a)*4+2],s[c+3]=t[((r-o-1)*e+a)*4+3]}return new ImageData(s,e,r)},S2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<r;a++){const c=(o*r+a)*4;s[c]=t[(a*e+e-o-1)*4],s[c+1]=t[(a*e+e-o-1)*4+1],s[c+2]=t[(a*e+e-o-1)*4+2],s[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(s,r,e)},_2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<r;a++){const c=(o*r+a)*4;s[c]=t[((r-a-1)*e+o)*4],s[c+1]=t[((r-a-1)*e+o)*4+1],s[c+2]=t[((r-a-1)*e+o)*4+2],s[c+3]=t[((r-a-1)*e+o)*4+3]}return new ImageData(s,r,e)},E2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},C2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];s[c]=h,s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},T2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,u=(t[c]+t[c+1]+t[c+2])/3>127?255:0;s[c]=u,s[c+1]=u,s[c+2]=u,s[c+3]=t[c+3]}return new ImageData(s,e,r)},P2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=255-t[c],s[c+1]=255-t[c+1],s[c+2]=255-t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},A2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},M2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},D2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=0,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},O2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=0,s[c+3]=t[c+3]}return new ImageData(s,e,r)},I2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=0,s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,r)},R2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=0,s[c+1]=t[c+1],s[c+2]=t[c+1],s[c+3]=t[c+3]}return new ImageData(s,e,r)},k2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;s[c]=t[c],s[c+1]=h,s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},L2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;s[c]=h,s[c+1]=t[c+1],s[c+2]=h,s[c+3]=t[c+3]}return new ImageData(s,e,r)},N2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;s[c]=h,s[c+1]=h,s[c+2]=t[c+2],s[c+3]=t[c+3]}return new ImageData(s,e,r)},z2=n=>nm(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),V2=n=>nm(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),F2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;s[c]=t[c],s[c+1]=t[c+1],s[c+2]=t[c+2],s[c+3]=255}return new ImageData(s,e,r)},B2=n=>{const{data:t,width:e,height:r}=n,s=new Uint8ClampedArray(t.length);for(let o=0;o<r;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)s[c]=255,s[c+1]=255,s[c+2]=255,s[c+3]=255;else{const h=rm([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);s[c]=h[0],s[c+1]=h[1],s[c+2]=h[2],s[c+3]=h[3]}}return new ImageData(s,e,r)};function $2(n,t,e,r,s,i=!1,o){const{data:a,width:c,height:h}=n;let u=s,l=r,d=t,f=e;if(u<0?u=0:u>c&&(u=c),l<0?l=0:l>h&&(l=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),u+d>c&&(d=c-u),l+f>h&&(f=h-l),i){const p=new Uint8ClampedArray(a.length);for(let b=0;b<h;b++)for(let g=0;g<c;g++){const w=(b*c+g)*4;g>=u&&g<=u+d&&b>=l&&b<=l+f?(p[w]=a[w],p[w+1]=a[w+1],p[w+2]=a[w+2],p[w+3]=a[w+3]):(p[w]=255,p[w+1]=255,p[w+2]=255,p[w+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let b=l;b<=l+f;b++)for(let g=u;g<=u+d;g++){const w=((b-l)*d+g-u)*4,x=(b*c+g)*4;p[w]=a[x],p[w+1]=a[x+1],p[w+2]=a[x+2],p[w+3]=a[x+3]}return new ImageData(p,d,f)}}function U2(n,t,e,r){const{data:s,width:i,height:o}=n;let a=t;a>Math.floor(i/2)&&(a=Math.floor(i/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const c=new Uint8ClampedArray(s.length);for(let u=0;u<o;u++)for(let l=0;l<i;l++){const d=(u*i+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>i-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(i-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(i-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=r||e.toUpperCase()==="PNG"?0:255):(c[d]=s[d],c[d+1]=s[d+1],c[d+2]=s[d+2],c[d+3]=r||e.toUpperCase()==="PNG"?s[d+3]:255)}return new ImageData(c,i,o)}function Y2(n,t,e,r,s,i=1e4){const o=new Image;o.src=n;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=i,a.height=i,c.drawImage(o,0,0,t,e,0,0,r,s),c.getImageData(0,0,r,s)}function j2(n,t){const{data:e,width:r,height:s}=n,i=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<r;c++){const h=(a*r+c)*4;i[h]=Math.max(Math.min(e[h]+t,255),0),i[h+1]=Math.max(Math.min(e[h+1]+t,255),0),i[h+2]=Math.max(Math.min(e[h+2]+t,255),0),i[h+3]=e[h+3]}return new ImageData(i,r,s)}function G2(n,t,e=!1){const{data:r,width:s,height:i}=n,o=new Uint8ClampedArray(r.length);for(let c=0;c<i;c++)for(let h=0;h<s;h++){const u=(c*s+h)*4;r[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=r[u],o[u+1]=r[u+1],o[u+2]=r[u+2]);let l=r[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,s,i)}function X2(n,t,e,r){const{data:s,width:i,height:o}=n,{data:a,width:c,height:h}=t;let u=e,l=r;e+h>o&&(u=o-h),r+c>i&&(l=i-c);const d=new Uint8ClampedArray(s.length);for(let p=0;p<o;p++)for(let m=0;m<i;m++){const b=(p*i+m)*4;if(m<l||m>l+c||p<=u||p>=u+h)d[b]=s[b],d[b+1]=s[b+1],d[b+2]=s[b+2],d[b+3]=s[b+3];else{const g=(p*i+m-((u+1)*i+(p-(u+1))*(i-c))+c-l-1)*4,w=[a[g],a[g+1],a[g+2],a[g+3]],x=[s[b],s[b+1],s[b+2],s[b+3]],v=rm(w,x);d[b]=v[0],d[b+1]=v[1],d[b+2]=v[2],d[b+3]=v[3]}}return new ImageData(d,i,o)}function W2(n,t,e,r,s,i=10){const{data:o,width:a,height:c}=n;let h=s,u=r,l=t,d=e;h<0?h=0:h>a&&(h=a),u<0?u=0:u>c&&(u=c),l<1?l=1:l>a&&(l=a),d<1?d=1:d>c&&(d=c),h+l>a&&(l=a-h),u+d>c&&(d=c-u);const f=new Uint8ClampedArray(o.length);for(let m=0;m<c;m++)for(let b=0;b<a;b++){const g=(m*a+b)*4;if(b>=h&&b<=h+l&&m>=u&&m<=u+d){const w=Math.floor((b-h)/i),x=Math.floor((m-u)/i);let v=Math.floor(i*(w+1)-i/2+h),E=Math.floor(i*(x+1)-i/2+u);v>a-1&&(v=a-1),E>c-1&&(E=c-1);const _=(E*a+v)*4;f[g]=o[_],f[g+1]=o[_+1],f[g+2]=o[_+2],f[g+3]=o[_+3]}else f[g]=o[g],f[g+1]=o[g+1],f[g+2]=o[g+2],f[g+3]=o[g+3]}return new ImageData(f,a,c)}function H2(n,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:r,width:s,height:i}=n,{data:o}=t,a=new Uint8ClampedArray(r.length),{backgroundColor:c,changeIntoColor:h}=e;for(let l=0;l<i;l++)for(let d=0;d<s;d++){const f=(l*s+d)*4,p=o[f],m=o[f+1],b=o[f+2],g=o[f+3];p===c.r&&m===c.g&&b===c.b&&g===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=r[f],a[f+1]=r[f+1],a[f+2]=r[f+2],a[f+3]=r[f+3])}return new ImageData(a,s,i)}return n}function nm(n,t){const{data:e,width:r,height:s}=n,i=new Uint8ClampedArray(e.length);for(let a=0;a<s;a++)for(let c=0;c<r;c++){const h=(a*r+c)*4;for(let u=0;u<3;u++){const l=h+u;c===0||c===r-1||a===0||a===s-1?i[l]=e[l]:i[l]=t[0]*e[l-r*4-4]+t[1]*e[l-r*4]+t[2]*e[l-r*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+r*4-4]+t[7]*e[l+r*4]+t[8]*e[l+r*4+4]}i[h+3]=e[h+3]}return new ImageData(i,r,s)}function rm(n,t){if(n&&n.length===4&&t&&t.length===4){const e=n[3],r=t[3];if(e===255||r===0)return n;if(e===0)return t;{const s=e/255,i=r/255,o=Math.max(Math.min(Math.floor(n[0]*s+t[0]*i*(1-s)),255),0),a=Math.max(Math.min(Math.floor(n[1]*s+t[1]*i*(1-s)),255),0),c=Math.max(Math.min(Math.floor(n[2]*s+t[2]*i*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+i*(1-s))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const $c=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,r=t.length){for(let s=0;s<r;s++)this.writeByte(t[s+e])},writeString(t){for(let e=0,r=t.length;e<r;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,r=n.length;e<r;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},sm=function(){let n=0,t=0,e=0,r="";const s=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},i=function(o){r+=String.fromCharCode(s(o&63))};return{writeByte(o){for(n=n<<8|o&255,t+=8,e+=1;t>=6;)i(n>>>t-6),t-=6},flush(){if(t>0&&(i(n<<6-t),n=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)r+="="}},toString(){return r}}},im=function(n,t,e){const r=new Array(n*n),s=function(a){const c=a;let h=0,u=0;return{write(l,d){if(l>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(l<<h|u)),d-=8-h,l>>>=8-h,u=0,h=0;u=l<<h|u,h=h+d},flush(){h>0&&c.writeByte(u)}}},i=function(a){const c=1<<a,h=(1<<a)+1;let u=a+1;const l=o();for(let b=0;b<c;b++)l.add(String.fromCharCode(b));l.add(String.fromCharCode(c)),l.add(String.fromCharCode(h));const d=$c(),f=s(d);f.write(c,u);let p=0,m=String.fromCharCode(r[p]);for(p+=1;p<r.length;){const b=String.fromCharCode(r[p]);p+=1,l.contains(m+b)?m=m+b:(f.write(l.indexOf(m),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(m+b)),m=b)}return f.write(l.indexOf(m),u),f.write(h,u),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){r[c*n+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(n),a.writeShort(n),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(Cr("0x"+t[1]+t[2])),a.writeByte(Cr("0x"+t[3]+t[4])),a.writeByte(Cr("0x"+t[5]+t[6])),a.writeByte(Cr("0x"+e[1]+e[2])),a.writeByte(Cr("0x"+e[3]+e[4])),a.writeByte(Cr("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(n),a.writeShort(n),a.writeByte(0);const c=2,h=i(c);a.writeByte(c);let u=0;for(;h.length-u>255;)a.writeByte(255),a.writeBytes(h,u,255),u+=255;a.writeByte(h.length-u),a.writeBytes(h,u,h.length-u),a.writeByte(0),a.writeString(";")}}},om=function(n,t,e,r){const s=im(n,t,e);for(let h=0;h<n;h++)for(let u=0;u<n;u++)s.setPixel(u,h,r(u,h));const i=$c();s.write(i);const o=sm(),a=i.toByteArray();for(let h=0,u=a.length;h<u;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},xe={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ws={M:0,L:1,H:2,Q:3},In={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ht={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Ht.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Ht.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Ht.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Ht.EXP_TABLE[n]=Ht.EXP_TABLE[n-4]^Ht.EXP_TABLE[n-5]^Ht.EXP_TABLE[n-6]^Ht.EXP_TABLE[n-8];for(let n=0;n<255;n++)Ht.LOG_TABLE[Ht.EXP_TABLE[n]]=n;const It={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(n){let t=n<<10;for(;It.getBCHDigit(t)-It.getBCHDigit(It.G15)>=0;)t^=It.G15<<It.getBCHDigit(t)-It.getBCHDigit(It.G15);return(n<<10|t)^It.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;It.getBCHDigit(t)-It.getBCHDigit(It.G18)>=0;)t^=It.G18<<It.getBCHDigit(t)-It.getBCHDigit(It.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return It.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case In.PATTERN000:return(t+e)%2==0;case In.PATTERN001:return t%2==0;case In.PATTERN010:return e%3==0;case In.PATTERN011:return(t+e)%3==0;case In.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case In.PATTERN101:return t*e%2+t*e%3==0;case In.PATTERN110:return(t*e%2+t*e%3)%2==0;case In.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new Lr([1],0);for(let e=0;e<n;e++)t=t.multiply(new Lr([1,Ht.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case xe.MODE_NUMBER:return 10;case xe.MODE_ALPHA_NUM:return 9;case xe.MODE_8BIT_BYTE:return 8;case xe.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case xe.MODE_NUMBER:return 12;case xe.MODE_ALPHA_NUM:return 11;case xe.MODE_8BIT_BYTE:return 16;case xe.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case xe.MODE_NUMBER:return 14;case xe.MODE_ALPHA_NUM:return 13;case xe.MODE_8BIT_BYTE:return 16;case xe.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++){let a=0;const c=n.isDark(i,o);for(let h=-1;h<=1;h++)if(!(i+h<0||t<=i+h))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||h==0&&u==0||c==n.isDark(i+h,o+u)&&a++;a>5&&(e+=3+a-5)}for(let i=0;i<t-1;i++)for(let o=0;o<t-1;o++){let a=0;n.isDark(i,o)&&a++,n.isDark(i+1,o)&&a++,n.isDark(i,o+1)&&a++,n.isDark(i+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)n.isDark(i,o)&&!n.isDark(i,o+1)&&n.isDark(i,o+2)&&n.isDark(i,o+3)&&n.isDark(i,o+4)&&!n.isDark(i,o+5)&&n.isDark(i,o+6)&&(e+=40);for(let i=0;i<t;i++)for(let o=0;o<t-6;o++)n.isDark(o,i)&&!n.isDark(o+1,i)&&n.isDark(o+2,i)&&n.isDark(o+3,i)&&n.isDark(o+4,i)&&!n.isDark(o+5,i)&&n.isDark(o+6,i)&&(e+=40);let r=0;for(let i=0;i<t;i++)for(let o=0;o<t;o++)n.isDark(o,i)&&r++;const s=Math.abs(100*r/t/t-50)/5;return e+=s*10,e}};class Lr{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let r=0;for(;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(let s=0;s<t.length-r;s++)this.num[s]=t[s+r]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let r=0;r<this.getLength();r++)for(let s=0;s<t.getLength();s++)e[r+s]^=Ht.gexp(Ht.glog(this.get(r))+Ht.glog(t.get(s)));return new Lr(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Ht.glog(this.get(0))-Ht.glog(t.get(0)),r=new Array(this.getLength());for(let s=0;s<this.getLength();s++)r[s]=this.get(s);for(let s=0;s<t.getLength();s++)r[s]^=Ht.gexp(Ht.glog(t.get(s))+e);return new Lr(r,0).mod(t)}}class fn{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const r=fn.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const s=r.length/3,i=[];for(let o=0;o<s;o++){const a=r[o*3+0],c=r[o*3+1],h=r[o*3+2];for(let u=0;u<a;u++)i.push(new fn(c,h))}return i}static getRsBlockTable(t,e){switch(e){case ws.L:return fn.RS_BLOCK_TABLE[(t-1)*4+0];case ws.M:return fn.RS_BLOCK_TABLE[(t-1)*4+1];case ws.Q:return fn.RS_BLOCK_TABLE[(t-1)*4+2];case ws.H:return fn.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class am{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class q2{mode;data;constructor(t){this.mode=xe.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data.charCodeAt(e),8)}}class Rn{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=ws[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new q2(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=fn.getRSBlocks(t,this.errorCorrectLevel),r=new am;let s=0;for(let i=0;i<e.length;i++)s+=e[i].dataCount;for(let i=0;i<this.dataList.length;i++){const o=this.dataList[i];r.put(o.mode,4),r.put(o.getLength(),It.getLengthInBits(o.mode,t)),o.write(r)}if(r.getLengthInBits()<=s*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[r][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Rn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(let s=-1;s<=7;s++)e+s<=-1||this.moduleCount<=e+s||(0<=r&&r<=6&&(s==0||s==6)||0<=s&&s<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=s&&s<=4?this.modules[t+r][e+s]=!0:this.modules[t+r][e+s]=!1)}getBestMaskPattern(){let t=0,e=0;for(let r=0;r<8;r++){this.makeImpl(!0,r);const s=It.getLostPoint(this);(r==0||t>s)&&(t=s,e=r)}return e}createMovieClip(t,e,r){const s=t.createEmptyMovieClip(e,r),i=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*i;for(let c=0;c<this.modules[o].length;c++){const h=c*i;this.modules[o][c]&&(s.beginFill(0,100),s.moveTo(h,a),s.lineTo(h+i,a),s.lineTo(h+i,a+i),s.lineTo(h,a+i),s.endFill())}}return s}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=It.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let r=0;r<t.length;r++){const s=t[e],i=t[r];if(this.modules[s][i]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[s+o][i+a]=!0:this.modules[s+o][i+a]=!1}}setupTypeNumber(t){const e=It.getBCHTypeNumber(this.typeNumber);for(let r=0;r<18;r++){const s=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=s}for(let r=0;r<18;r++){const s=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=s}}setupTypeInfo(t,e){const r=this.errorCorrectLevel<<3|e,s=It.getBCHTypeInfo(r);for(let i=0;i<15;i++){const o=!t&&(s>>i&1)==1;i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(let i=0;i<15;i++){const o=!t&&(s>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let r=-1,s=this.moduleCount-1,i=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[s][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>i&1)==1),It.getMask(e,s,a-c)&&(h=!h),this.modules[s][a-c]=h,i--,i==-1&&(o++,i=7)}if(s+=r,s<0||this.moduleCount<=s){s-=r,r=-r;break}}}static createData(t,e,r){const s=fn.getRSBlocks(t,e),i=new am;for(let a=0;a<r.length;a++){const c=r[a];i.put(c.mode,4),i.put(c.getLength(),It.getLengthInBits(c.mode,t)),c.write(i)}let o=0;for(let a=0;a<s.length;a++)o+=s[a].dataCount;if(i.getLengthInBits()>o*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+o*8+")");for(i.getLengthInBits()+4<=o*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=o*8||(i.put(Rn.PAD0,8),i.getLengthInBits()>=o*8));)i.put(Rn.PAD1,8);return Rn.createBytes(i,s)}static createBytes(t,e){let r=0,s=0,i=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const d=e[l].dataCount,f=e[l].totalCount-d;s=Math.max(s,d),i=Math.max(i,f),o[l]=new Array(d);for(let g=0;g<o[l].length;g++)o[l][g]=255&t.buffer[g+r];r+=d;const p=It.getErrorCorrectPolynomial(f),b=new Lr(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let g=0;g<a[l].length;g++){const w=g+b.getLength()-a[l].length;a[l][g]=w>=0?b.get(w):0}}let c=0;for(let l=0;l<e.length;l++)c+=e[l].totalCount;const h=new Array(c);let u=0;for(let l=0;l<s;l++)for(let d=0;d<e.length;d++)l<o[d].length&&(h[u++]=o[d][l]);for(let l=0;l<i;l++)for(let d=0;d<e.length;d++)l<a[d].length&&(h[u++]=a[d][l]);return h}}const cm=Math.ceil,xs=Math.floor,hm=Math.round;function K2(n,t){const e=Ql(n),r=t?.ecc||"H",s=t?.size||256,i=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new Rn(i,r);h.addData(e),h.make();const u=h.getModuleCount(),l=(s-o*2)/u,d=o,f=s-o;return om(s,a,c,function(p,m){if(d<=p&&p<f&&d<=m&&m<f){const b=xs((p-d)/l),g=xs((m-d)/l);return h.isDark(g,b)?0:1}else return 1})}function J2(n,t){const e=t.x||0,r=t.y||0,s=Ql(n),i=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?xs(t.size):256,c=t.padding||0,h=-1,u=t.color||"#000000",l=t.background||"#ffffff",d=new Rn(h,o);d.addData(s),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;i.fillStyle=l,i.fillRect(e,r,a,a);for(let m=0;m<f;m++)for(let b=0;b<f;b++){const g=cm((b+1)*p)-xs(b*p),w=cm((m+1)*p)-xs(m*p);i.fillStyle=d.isDark(m,b)?u:l,i.fillRect(e+hm(b*p)+c,r+hm(m*p)+c,g,w)}}class Qi{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Qi(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,r=this.y;return this.x=t.m11*e+t.m21*r+t.m31,this.y=t.m12*e+t.m22*r+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=st(this.x,t.x,e.x),this.y=st(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=st(this.x,t,e),this.y=st(this.y,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(st(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}perpendOnVector(t){return um.copy(this).projectOnVector(t),this.sub(um)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(st(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}rotateAround(t,e){const r=Math.cos(e),s=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*r-o*s+t.x,this.y=i*s+o*r+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Je{x=0;y=0;z=0;constructor(t=0,e=0,r=0){this.x=t,this.y=e,this.z=r}set(t=0,e=0,r=0){return this.x=t,this.y=e,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Je(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyMatrix3(t){const e=this.x,r=this.y,s=this.z,i=t.value;return this.x=i[0]*e+i[3]*r+i[6]*s,this.y=i[1]*e+i[4]*r+i[7]*s,this.z=i[2]*e+i[5]*r+i[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,r=this.y,s=this.z,i=t.value,o=1/(i[3]*e+i[7]*r+i[11]*s+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*s+i[12])*o,this.y=(i[1]*e+i[5]*r+i[9]*s+i[13])*o,this.z=(i[2]*e+i[6]*r+i[10]*s+i[14])*o,this}transformDirection(t){const e=this.x,r=this.y,s=this.z,i=t.value;return this.x=i[0]*e+i[4]*r+i[8]*s,this.y=i[1]*e+i[5]*r+i[9]*s,this.z=i[2]*e+i[6]*r+i[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=st(this.x,t.x,e.x),this.y=st(this.y,t.y,e.y),this.z=st(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=st(this.x,t,e),this.y=st(this.y,t,e),this.z=st(this.z,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(st(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const r=t.x,s=t.y,i=t.z,o=e.x,a=e.y,c=e.z;return this.x=s*c-i*a,this.y=i*o-r*c,this.z=r*a-s*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}perpendOnVector(t){return Yc.copy(this).projectOnVector(t),this.sub(Yc)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Yc.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(st(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,s=this.z-t.z;return e*e+r*r+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),r=this.setFromMatrix4Column(t,1).length(),s=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=r,this.z=s,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,r=Math.sqrt(1-e*e);return this.x=r*Math.cos(t),this.y=e,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Uc{x=0;y=0;z=0;w=1;constructor(t=0,e=0,r=0,s=1){this.x=t,this.y=e,this.z=r,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,r=0,s=1){return this.x=t,this.y=e,this.z=r,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Uc(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,r=this.y,s=this.z,i=this.w,o=t.value;return this.x=o[0]*e+o[4]*r+o[8]*s+o[12]*i,this.y=o[1]*e+o[5]*r+o[9]*s+o[13]*i,this.z=o[2]*e+o[6]*r+o[10]*s+o[14]*i,this.w=o[3]*e+o[7]*r+o[11]*s+o[15]*i,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromRotationMatrix4(t){let e,r,s,i;const c=t.value,h=c[0],u=c[4],l=c[8],d=c[1],f=c[5],p=c[9],m=c[2],b=c[6],g=c[10];if(Math.abs(u-d)<.01&&Math.abs(l-m)<.01&&Math.abs(p-b)<.01){if(Math.abs(u+d)<.1&&Math.abs(l+m)<.1&&Math.abs(p+b)<.1&&Math.abs(h+f+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(h+1)/2,v=(f+1)/2,E=(g+1)/2,_=(u+d)/4,D=(l+m)/4,z=(p+b)/4;return x>v&&x>E?x<.01?(r=0,s=.707106781,i=.707106781):(r=Math.sqrt(x),s=_/r,i=D/r):v>E?v<.01?(r=.707106781,s=0,i=.707106781):(s=Math.sqrt(v),r=_/s,i=z/s):E<.01?(r=.707106781,s=.707106781,i=0):(i=Math.sqrt(E),r=D/i,s=z/i),this.set(r,s,i,e),this}let w=Math.sqrt((b-p)*(b-p)+(l-m)*(l-m)+(d-u)*(d-u));return Math.abs(w)<.001&&(w=1),this.x=(b-p)/w,this.y=(l-m)/w,this.z=(d-u)/w,this.w=Math.acos((h+f+g-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=st(this.x,t.x,e.x),this.y=st(this.y,t.y,e.y),this.z=st(this.z,t.z,e.z),this.w=st(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=st(this.x,t,e),this.y=st(this.y,t,e),this.z=st(this.z,t,e),this.w=st(this.w,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(st(r,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this.w=t.w+(e.w-t.w)*r,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const um=new Qi,Yc=new Je,lm=Z2("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Z2(n,t=10){const e={},r=n.split(",");for(let s=0;s<r.length;s+=2){const i="&"+r[s+1]+";",o=parseInt(r[s],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function ae(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function to(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function Q2(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function tS(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Ss={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let eo=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",ae("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}},jc=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},fm=class Gl{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:r=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=r),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Ss);for(let e=0,r=t.length;e<r;e++){const s=t[e];this[s]=Ss[s].canvas}}__getStyleState(){const t={},e=Object.keys(Ss);for(let r=0,s=e.length;r<s;r++){const i=e[r];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,s=e.length;r<s;r++){const i=e[r];this[i]=t[i]}}__createElement(t,e={},r=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);r&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(i=>{i.setAttribute(t,"")}));const s=Object.keys(Ss);for(let i=0;i<s.length;i++){const o=Ss[s[i]],a=this[s[i]];if(o.apply){if(a instanceof jc){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,ae("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof eo)e.setAttribute(o.apply,ae("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,ae("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(s[i]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const s=Object.keys(lm);for(let i=0,o=s.length;i<o;i++){const a=s[i],c=lm[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(ae("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(ae("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(ae("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,s,i,o){this.__addTransform(ae("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:s,e:i,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(ae("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(ae("L {x} {y}",this.__currentPosition)):this.__addPathCommand(ae("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,s,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(ae("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:s,x:i,y:o}))}quadraticCurveTo(t,e,r,s){this.__currentPosition={x:r,y:s},this.__addPathCommand(ae("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,s,i){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===r&&e===s||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([r-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(l/2),p=t+f*d[0],m=e+f*d[1],b=[-c[1],c[0]],g=[h[1],-h[0]],w=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},x=w(b),v=w(g);this.lineTo(p+b[0]*i,m+b[1]*i),this.arc(p,m,i,x,v)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),r=this.__rootSVG.childNodes[1],s=r.childNodes;for(let i=s.length-1;i>=0;i--)s[i]&&r.removeChild(s[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,r,s){if(t===0&&e===0&&r===this.width&&s===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:r,height:s,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,r,s){const i=this.__createElement("linearGradient",{id:to(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new eo(i,this)}createRadialGradient(t,e,r,s,i,o){const a=this.__createElement("radialGradient",{id:to(this.__ids),cx:s+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new eo(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),r={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(r.decoration="underline"),this.__fontHref&&(r.href=this.__fontHref),r}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,s){const i=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:e,y:r,"text-anchor":Q2(this.textAlign),"dominant-baseline":tS(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(i,a))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,s,i,o){if(s===i)return;s=s%(2*Math.PI),i=i%(2*Math.PI),s===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+r*Math.cos(i),c=e+r*Math.sin(i),h=t+r*Math.cos(s),u=e+r*Math.sin(s),l=o?0:1;let d=0,f=i-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(ae("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=to(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",ae("url(#{id})",{id:r})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],r,s,i,o,a=0,c=0,h,u,l,d,f,p,m,b;if(t.length===3)r=t[1],s=t[2],h=e.width,u=e.height,i=h,o=u;else if(t.length===5)r=t[1],s=t[2],i=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],r=t[5],s=t[6],i=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const g=this.__closestGroupOrSvg();this.__currentElement;const w="translate("+r+", "+s+")";if(e instanceof Gl){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)b=d.childNodes[0].getAttribute("id"),this.__ids[b]=b,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let v;x?v=x+" "+w:v=w,f.setAttribute("transform",v),g.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",i),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=i,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,i,o),e=m),p.setAttribute("transform",w),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),g.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=to(this.__ids);let i;return r.setAttribute("id",s),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(i=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(i),this.__SVGdefs.appendChild(r)):t instanceof Gl&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new jc(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Gc=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,r,s=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new fm({canvas:this.canvas,width:e||this.canvas.width,height:r||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,r,s){return this.context.fillRect(t,e,r,s),this.customContext&&this.customContext.fillRect(t,e,r,s),this}fillText(t,e,r,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,r,s),this.customContext&&this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,r,s){return this.context.strokeText(t,e,r,s),this.customContext&&this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,s){return this.context.strokeRect(t,e,r,s),this.customContext&&this.customContext.strokeRect(t,e,r,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,r=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,r,s),this.customContext&&this.customContext.clearRect(t,e,r,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const r=new Path2D;r.addPath(t,e),this.currentPath2D=r}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,r=0){return this.translate(e,r),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-r),this.changePath2D(),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-r,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,r,s,i,o){return this.context.arc(t,e,r,s,i,o),this.customContext&&this.customContext.arc(t,e,r,s,i,o?-1:1),this.currentPath2D.arc(t,e,r,s,i,o),this}arcTo(t,e,r,s,i){return this.context.arcTo(t,e,r,s,i),this.customContext&&this.customContext.arcTo(t,e,r,s,i),this.currentPath2D.arcTo(t,e,r,s,i),this}ellipse(t,e,r,s,i,o,a,c){return this.context.ellipse(t,e,r,s,i,o,a,c),this.currentPath2D.ellipse(t,e,r,s,i,o,a,c),this}quadraticCurveTo(t,e,r,s){return this.context.quadraticCurveTo(t,e,r,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,r,s),this.currentPath2D.quadraticCurveTo(t,e,r,s),this}bezierCurveTo(t,e,r,s,i,o){return this.context.bezierCurveTo(t,e,r,s,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,r,s,i,o),this.currentPath2D.bezierCurveTo(t,e,r,s,i,o),this}rect(t,e,r,s){return this.context.rect(t,e,r,s),this.customContext&&this.customContext.rect(t,e,r,s),this.currentPath2D.rect(t,e,r,s),this}createLinearGradient(t,e,r,s,i){const o=this.context.createLinearGradient(t,e,r,s);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,r,s,i,o,a){const c=this.context.createRadialGradient(t,e,r,s,i,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const r=e[0],s=e[1];this.context.drawImage(t,r,s)}else if(e.length===4){const r=e[0],s=e[1],i=e[2],o=e[3];this.context.drawImage(t,r,s,i,o)}else if(e.length===8){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,r,s,i,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,r=this.canvas.width,s=this.canvas.height,i){return this.context.getImageData(t,e,r,s,i)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Xc=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=ze(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),r=Math.min(this.y,this.toY),s=Math.max(this.x,this.toX),i=Math.max(this.y,this.toY);return{x:e,y:r,width:s-e,height:i-r}}else{const e=Math.sin(t),r=Math.cos(t),s=r*this.x-e*this.y,i=r*this.toX-e*this.toY,o=r*this.y+e*this.x,a=r*this.toY+e*this.toX;return{x:Math.min(s,i),y:Math.min(o,a),width:Math.max(s,i)-Math.min(s,i),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,r=this.y,s=t.toX,i=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-r)/o,h=(t.y-i)/a;if(o){if(!a)return{x:s,y:c*(s-e)+r}}else return{x:e,y:h*(e-s)+i};const u=(-h*s+i+c*e-r)/(c-h),l=c*(u-e)+r;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const eS=class extends Xc{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,r,s,i,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,r,s,i,o,a,c,!this.sweepFlag)}convert(t,e,r,s,i,o,a,c,h){const u=a/180*Math.PI,l=(t-r)/2,d=(e-s)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,m=f*f/(i*i)+p*p/(o*o);if(m>1){const $=Math.sqrt(m);throw i=$*i,o=$*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const b=Math.sqrt((i*i*o*o-i*i*p*p-o*o*f*f)/(i*i*p*p+o*o*f*f)),g=c!=h?1:-1,w=g*b*i*p/o,x=g*b*-o*f/i,v=(t+r)/2,E=(e+s)/2,_=Math.cos(u)*w-Math.sin(u)*x+v,D=Math.sin(u)*w+Math.cos(u)*x+E,z=($,j,Q,rt)=>($*rt>=j*Q?1:-1)*Math.acos(($*Q+j*rt)/(Math.sqrt($*$+j*j)*Math.sqrt(Q*Q+rt*rt))),O=z(1,0,t-_,e-D)-u,L=z(t-_,e-D,r-_,s-D);return[_,D,i,o,u,O,O+L]}},nS=class extends Xc{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,r=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let r,s,i,o;for(let h=0;h<2;++h)r=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,s=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,i=h==0?this.x:this.y,Math.abs(r)>1e-12&&(o=-s/(2*r),0<o&&o<1&&[t,e][h].push(r*o*o+s*o+i));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},kn=class gi extends Xc{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),r=this.x-this.c1x,s=(-e+Math.sqrt(e*e-4*t*r))/2/t,i=(-e-Math.sqrt(e*e-4*t*r))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(s)>1e12&&(s=.5),Math.abs(i)>1e12&&(i=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),r=this.y-this.c1y,s=(-e+Math.sqrt(e*e-4*t*r))/2/t,i=(-e-Math.sqrt(e*e-4*t*r))/2/t,Math.abs(s)>1e12&&(s=.5),Math.abs(i)>1e12&&(i=.5),s>=0&&s<=1&&(c=this.interpolate(s),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let m=p+1;m<l;m++)h[p].X===h[m].X&&h[p].Y===h[m].Y&&(m=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,r,s,i){const o=-3*e+9*r-9*s+3*i,a=t*o+6*e-12*r+6*s;return t*a-3*e+3*r}static bezlen(t,e,r,s,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=u*l[p]+u,b=this.base3(m,t,r,i,a),g=this.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(b*b+g*g)}return u*f}length(t=1){return gi.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,r=this.y,s=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||gi.bezlen(e,r,s,i,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=gi.bezlen(e,r,s,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=gi.bezlen(e,r,s,i,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),r=1-e,s=Math.pow(r,3),i=Math.pow(r,2),o=e*e,a=o*e,c=s*this.x+i*3*e*this.c1x+r*3*e*e*this.c2x+a*this.toX,h=s*this.y+i*3*e*this.c1y+r*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=r*this.x+e*this.c1x,m=r*this.y+e*this.c1y,b=r*this.c2x+e*this.toX,g=r*this.c2y+e*this.toY,w=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:m},end:{x:b,y:g},alpha:w}}},_s=Math.PI*2;function dm(n,t,e,r){const s=n*r-t*e<0?-1:1;let i=n*e+t*r;return i>1&&(i=1),i<-1&&(i=-1),s*Math.acos(i)}function rS(n,t,e,r,s,i,o,a,c,h){const u=h*(n-e)/2+c*(t-r)/2,l=-c*(n-e)/2+h*(t-r)/2,d=o*o,f=a*a,p=u*u,m=l*l;let b=d*f-d*m-f*p;b<0&&(b=0),b/=d*m+f*p,b=Math.sqrt(b)*(s===i?-1:1);const g=b*o/a*l,w=b*-a/o*u,x=h*g-c*w+(n+e)/2,v=c*g+h*w+(t+r)/2,E=(u-g)/o,_=(l-w)/a,D=(-u-g)/o,z=(-l-w)/a,O=dm(1,0,E,_);let L=dm(E,_,D,z);return i===0&&L>0&&(L-=_s),i===1&&L<0&&(L+=_s),[x,v,O,L]}function sS(n,t){const e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),s=Math.sin(n),i=Math.cos(n+t),o=Math.sin(n+t);return[r,s,r-s*e,s+r*e,i+o*e,o-i*e,i,o]}function no(n,t,e,r,s,i,o,a,c){const h=Math.sin(c*_s/360),u=Math.cos(c*_s/360),l=u*(n-e)/2+h*(t-r)/2,d=-h*(n-e)/2+u*(t-r)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=rS(n,t,e,r,s,i,o,a,h,u),m=[];let b=p[2],g=p[3];const w=Math.max(Math.ceil(Math.abs(g)/(_s/4)),1);g/=w;for(let x=0;x<w;x++)m.push(sS(b,g)),b+=g;return m.map(x=>{for(let v=0;v<x.length;v+=2){let E=x[v+0],_=x[v+1];E*=o,_*=a;const D=u*E-h*_,z=h*E+u*_;x[v+0]=D+p[0],x[v+1]=z+p[1]}return x})}function mm(n,t,e,r,s,i,o,a,c,h){const u=Math.PI*120/180,l=Math.PI/180*(+s||0);let d=[],f;const p=function(ot,nt,tt){const bt=ot*Math.cos(tt)-nt*Math.sin(tt),Y=ot*Math.sin(tt)+nt*Math.cos(tt);return{x:bt,y:Y}};let m,b,g,w;if(h)m=h[0],b=h[1],g=h[2],w=h[3];else{f=p(n,t,-l),n=f.x,t=f.y,f=p(a,c,-l),a=f.x,c=f.y;const ot=(n-a)/2,nt=(t-c)/2;let tt=ot*ot/(e*e)+nt*nt/(r*r);tt>1&&(tt=Math.sqrt(tt),e=tt*e,r=tt*r);const bt=e*e,Y=r*r,F=(i==o?-1:1)*Math.sqrt(Math.abs((bt*Y-bt*nt*nt-Y*ot*ot)/(bt*nt*nt+Y*ot*ot)));g=F*e*nt/r+(n+a)/2,w=F*-r*ot/e+(t+c)/2,m=Math.asin(Number(((t-w)/r).toFixed(9))),b=Math.asin(Number(((c-w)/r).toFixed(9))),m=n<g?Math.PI-m:m,b=a<g?Math.PI-b:b,m<0&&(m=Math.PI*2+m),b<0&&(b=Math.PI*2+b),o&&m>b&&(m=m-Math.PI*2),!o&&b>m&&(b=b-Math.PI*2)}let x=b-m;if(Math.abs(x)>u){const ot=b,nt=a,tt=c;b=m+u*(o&&b>m?1:-1),a=g+e*Math.cos(b),c=w+r*Math.sin(b),d=mm(a,c,e,r,s,0,o,nt,tt,[b,ot,g,w])}x=b-m;const v=Math.cos(m),E=Math.sin(m),_=Math.cos(b),D=Math.sin(b),z=Math.tan(x/4),O=4/3*e*z,L=4/3*r*z,$=[n,t],j=[n+O*E,t-L*v],Q=[a+O*D,c-L*_],rt=[a,c];return j[0]=2*$[0]-j[0],j[1]=2*$[1]-j[1],h?[[...j,...Q,...rt]].concat(d):[[...j,...Q,...rt]].concat(d).map(ot=>{const nt=[];for(let tt=0,bt=ot.length;tt<bt;tt++)nt[tt]=tt%2?p(ot[tt-1],ot[tt],l).y:p(ot[tt],ot[tt+1],l).x;return nt})}function Es(n,t,e,r,s,i){return[n/3+2/3*e,t/3+2/3*r,s/3+2/3*e,i/3+2/3*r,s,i]}function hr(n,t,e,r){return[n,t,e,r,e,r]}const Cs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Ln(n="path"){return document.createElementNS.call(document,"http://www.w3.org/2000/svg",n)}function Wc(){return Ln("path")}const pm=n=>n instanceof SVGElement&&n.tagName==="path";function gm(n,t="shape"){return dl(pd(n),`${t}.svg`)}function iS(n,t="shape"){return dl(Pa(n),`${t}.svg`)}function oS(n){return gc(n)}function Hc(n){return typeof n!="string"?!1:(n=n.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(n)&&/[\dz]$/i.test(n))}function qc(n){return n.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function ro(n){const t=[];return Hc(n)&&n.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,r,s)=>{let i=r.toLowerCase();const o=af(s);for(i=="m"&&o.length>Cs[i]&&(t.push([r,...o.splice(0,Cs[i])]),i="l",r=r=="m"?"l":"L");o.length;){if(o.length<Cs[i])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${r} } args:{ ${o} }`);t.push([r,...o.splice(0,Cs[i])])}return i=="z"&&t.push([r]),""}),t}function so(n){let t=0,e=0,r=0,s=0;return n.map(function(i){const o=i[0],a=o.toUpperCase();if(o!=a)switch(i[0]=a,o){case"a":i[6]+=r,i[7]+=s;break;case"v":i[1]+=s;break;case"h":i[1]+=r;break;default:for(let c=1;c<i.length;)i[c++]+=r,i[c++]+=s}switch(a){case"Z":r=t,s=e;break;case"H":r=i[1];break;case"V":s=i[1];break;case"M":r=t=i[1],s=e=i[2];break;default:r=i[i.length-2],s=i[i.length-1]}return i})}function aS(n){let t=0,e=0,r=0,s=0;return n.map(function(i){const o=i[0],a=o.toLowerCase();if(o!=a)switch(i[0]=a,o){case"A":i[6]-=r,i[7]-=s;break;case"V":i[1]-=s;break;case"H":i[1]-=r;break;default:for(let c=1;c<i.length;)i[c++]-=r,i[c++]-=s}switch(a){case"z":r=t,s=e;break;case"h":r+=i[1];break;case"v":s+=i[1];break;case"m":r+=i[1],s+=i[2],t+=i[1],e+=i[2];break;default:r+=i[i.length-2],s+=i[i.length-1]}return i})}function Kc(n){const t=[];let e=0,r=0,s=0,i=0,o=0,a=0,c=0,h=0,u;for(let l=0,d=n.length;l<d;l++){let f=n[l];const p=f[0];switch(p){case"M":e=f[1],r=f[2];break;case"A":const m=no(s,i,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!m.length)continue;m.forEach((w,x)=>{const[v,E,_,D,z,O,L,$]=w;f=["C",_,D,z,O,L,$],x<m.length-1&&t.push(f)});break;case"S":let b=s,g=i;(u=="C"||u=="S")&&(b+=b-c,g+=g-h),f=["C",b,g,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=s*2-o,a=i*2-a):(o=s,a=i),f=["C",...Es(s,i,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...Es(s,i,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...hr(s,i,f[1],f[2])];break;case"H":f=["C",...hr(s,i,f[1],i)];break;case"V":f=["C",...hr(s,i,s,f[1])];break;case"Z":f=["C",...hr(s,i,e,r)];break}u=p,s=f[f.length-2],i=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=s,h=i),t.push(f)}return t}function cS(n){const t=[];for(let e=0,r=n.length;r-2>e;e+=2){let s;e==0?s=[{x:n[e],y:n[e+1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}]:r-4==e?s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+2],y:n[e+3]}]:s=[{x:n[e-2],y:n[e-1]},{x:n[e],y:n[e+1]},{x:n[e+2],y:n[e+3]},{x:n[e+4],y:n[e+5]}];const i=[{x:s[1].x,y:s[1].y},{x:(-s[0].x+6*s[1].x+s[2].x)/6,y:(-s[0].y+6*s[1].y+s[2].y)/6},{x:(s[1].x+6*s[2].x-s[3].x)/6,y:(s[1].y+6*s[2].y-s[3].y)/6},{x:s[2].x,y:s[2].y}];t.push(["C",i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y])}return t}function hS(n){const t=[];let e=["L",0,0],r;for(let s=0,i=n.length;s<i;s++){const o=n[s];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":r=t[t.length-1]||["L",0,0],t.push(["L",o[1],r[r.length-1]]);break;case"V":r=t[t.length-1]||["L",0,0],t.push(["L",r[r.length-2],o[1]]);break;default:t.push(o)}}return t}function uS(n){const t={S:{to:"C",x:3},T:{to:"Q",x:1}};let e,r=0,s=0;for(let i=0,o=n.length;i<o;i++){const a=n[i],c=t[a[0]];c&&(a[0]=c.to,e&&(e[0]===c.to?(r=2*Number(e[c.x+2])-Number(e[c.x]),s=2*Number(e[c.x+3])-Number(e[c.x+1])):(r=Number(e[e.length-2]),s=Number(e[e.length-1]))),a.splice(1,0,r,s)),e=a}return n}let lS=class Tn{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(ro(t),e):t instanceof Tn?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const r=Kc(so(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let s=!1;for(let i=0,o=r.length;i<o;i++){const a=r[i];if(a[0]=="M"){s||(s=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new kn({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(i=>{({x:i.x,y:i.y}=e.transformPoint({x:i.x,y:i.y})),{x:i.c1x,y:i.c1y}=e.transformPoint({x:i.c1x,y:i.c1y}),{x:i.c2x,y:i.c2y}=e.transformPoint({x:i.c2x,y:i.c2y}),{x:i.toX,y:i.toY}=e.transformPoint({x:i.toX,y:i.toY})}))}static fromPolymorphPoints(t){const e=new Tn;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let r=2,s=t.length;r+5<s;r+=6)e.appendLine(new kn({c1x:t[r],c1y:t[r+1],c2x:t[r+2],c2y:t[r+3],toX:t[r+4],toY:t[r+5]}));return e}static fromLines(t){const e=new Tn;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let r=0,s=t.length;r<s;r++)e.appendLine(t[r]);return e}appendLine(t){if(t instanceof eS){no(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,m,b,g]=h;this.normalizedLines.push(new kn({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:b,toY:g})),this.prevPathX=b,this.prevPathY=g});return}let e,r,s,i,o,a;t instanceof kn?(e=t.c1x,r=t.c1y,s=t.c2x,i=t.c2y,o=t.toX,a=t.toY):t instanceof nS?[e,r,s,i,o,a]=Es(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,r,s,i,o,a]=hr(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new kn({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:r,c2x:s,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:r}=this.updateTransform(),s=[];s.push(["M",t,e]);for(let i=0,o=r.length;i<o;i++)s.push(...r[i].toSVGPathData());return s}toSVGPathD(){return qc(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:r,normalizedLines:s}=this.updateTransform();t.beginPath(),t.moveTo(e,r),s.forEach(i=>{i.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],r=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)}),e.length==0||r.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min.apply(0,e),i=Math.min.apply(0,r),o=Math.max.apply(0,e),a=Math.max.apply(0,r);return{x:s,y:i,width:o-s,height:a-i}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new Zt;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,r=this.startPathY;({x:e,y:r}=t.transformPoint({x:e,y:r}));const s=[];return this.normalizedLines.forEach(i=>{let o=i.x,a=i.y,c=i.c1x,h=i.c1y,u=i.c2x,l=i.c2y,d=i.toX,f=i.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:d,y:f}=t.transformPoint({x:d,y:f}),s.push(new kn({x:o,y:a,c1x:c,c1y:h,c2x:u,c2y:l,toX:d,toY:f}))}),{startPathX:e,startPathY:r,normalizedLines:s}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,r)=>e+=r.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let r=0;const s=e.length;for(let i=0;i<s;i++){const o=e[i],a=o.length();if(r+a>=t)return o.getPointAtSegmentLength(t-r);r+=a}return e[s-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:r,normalizedLines:s}=this.updateTransform(),i=s.length;if(i===0)return{x:e,y:r};if(i===1)return s[0].interpolate(t);{let o=t*i,a=s[0];if(o--,o>1)for(let c=1;c<i&&(a=s[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const r=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(r,t):r}}getSubpathsAtLength(t,e,r){const{startPathX:s,startPathY:i,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new Tn;h.prevPathX=h.startPathX=s,h.prevPathY=h.startPathY=i;for(let u=0,l=o.length;u<l;u++){const d=o[u],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new kn({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),r)return h;a=h,h.appendLine(new kn({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const r=this.getTotalLength();let s={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=r;h+=a){const u=this.getPointAtLength(h),l=Math.pow(tr(u.x,u.y,t,e),2);l<o&&(s=u,i=h,o=l)}for(a/=2;a>.5;){const h=i-a,u=this.getPointAtLength(h),l=Math.pow(tr(u.x,u.y,t,e),2),d=i+a,f=this.getPointAtLength(d),p=Math.pow(tr(f.x,f.y,t,e),2);h>=0&&l<o?(s=u,i=h,o=l):d<=r&&p<o?(s=f,i=d,o=p):a/=2}const c=this.getPointAtLength(i+(i===r?-.1:.1));return{point:s,rotation:i>=r?ze(c.x,c.y,s.x,s.y):ze(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:r}=this.updateTransform();return[t,e].concat(r.reduce((s,i)=>s.concat([i.c1x,i.c1y,i.c2x,i.c2y,i.toX,i.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let r=t[e-2],s=t[e-1],i=0;for(let o=0;o<e;o+=6)i+=tr(t[o],t[o+1],r,s),r=t[o],s=t[o+1];return Math.floor(i)}expendFill(t){const e=this.polymorphPoints,r=e.length;let s=t-r;const i=Math.ceil(t/r),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=r-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<i&&s>0;)o.push(["C",d,f,d,f,d,f]),s-=6,p++}return o}static mixPoints(t,e,r){const s=t.length,i=new Array(s);for(let o=0;o<s;o++)i[o]=at(t[o]+(e[o]-t[o])*r,6);return i}static getPathInterpolator(t,e){return r=>Math.abs(r-0)<Number.EPSILON?t:Math.abs(r-1)<Number.EPSILON?e:Tn.fromPolymorphPoints(Tn.mixPoints(new Tn({d:t}).polymorphPoints,new Tn({d:e}).polymorphPoints,r)).toSVGPathData()}};class Ts{static _nextId=0;static nextId(){return Ts._nextId++}}const X={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},style:"cubic-bezier(0.1, 0.57, 0.1, 1)"},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)},style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)"},Bounce:{In:function(n){return 1-X.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?X.Bounce.In(n*2)*.5:X.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(r){return t*Math.random()+e*n(r)}},swing:function(n){return n+Math.sin(n*Math.PI*2)/2},causeSeizures:function(n){return n+.2*Math.random()-.1}};function ym(n){switch(n){case X.Quadratic.In:return X.Quadratic.Out;case X.Quadratic.Out:return X.Quadratic.In;case X.Quadratic.InOut:return X.Quadratic.InOut;case X.Cubic.In:return X.Cubic.Out;case X.Cubic.Out:return X.Cubic.In;case X.Cubic.InOut:return X.Cubic.InOut;case X.Quartic.In:return X.Quartic.Out;case X.Quartic.Out:return X.Quartic.In;case X.Quartic.InOut:return X.Quartic.InOut;case X.Quintic.In:return X.Quintic.Out;case X.Quintic.Out:return X.Quintic.In;case X.Quintic.InOut:return X.Quintic.InOut;case X.Sinusoidal.In:return X.Sinusoidal.Out;case X.Sinusoidal.Out:return X.Sinusoidal.In;case X.Sinusoidal.InOut:return X.Sinusoidal.InOut;case X.Exponential.In:return X.Exponential.Out;case X.Exponential.Out:return X.Exponential.In;case X.Exponential.InOut:return X.Exponential.InOut;case X.Circular.In:return X.Circular.Out;case X.Circular.Out:return X.Circular.In;case X.Circular.InOut:return X.Circular.InOut;case X.Elastic.In:return X.Elastic.Out;case X.Elastic.Out:return X.Elastic.In;case X.Elastic.InOut:return X.Elastic.InOut;case X.Back.In:return X.Back.Out;case X.Back.Out:return X.Back.In;case X.Back.InOut:return X.Back.InOut;case X.Bounce.In:return X.Bounce.Out;case X.Bounce.Out:return X.Bounce.In;case X.Bounce.InOut:return X.Bounce.InOut;default:return n}}const fS=4,dS=.001,mS=1e-7,pS=10,Ps=11,io=1/(Ps-1),gS=typeof Float32Array=="function";function bm(n,t){return 1-3*t+3*n}function vm(n,t){return 3*t-6*n}function wm(n){return 3*n}function oo(n,t,e){return((bm(t,e)*n+vm(t,e))*n+wm(t))*n}function xm(n,t,e){return 3*bm(t,e)*n*n+2*vm(t,e)*n+wm(t)}function yS(n,t,e,r,s){let i,o,a=0;do o=t+(e-t)/2,i=oo(o,r,s)-n,i>0?e=o:t=o;while(Math.abs(i)>mS&&++a<pS);return o}function bS(n,t,e,r){for(let s=0;s<fS;++s){const i=xm(t,e,r);if(i===0)return t;const o=oo(t,e,r)-n;t-=o/i}return t}function vS(n){return n}function Jc(n,t,e,r){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===r)return vS;const s=gS?new Float32Array(Ps):new Array(Ps);for(let o=0;o<Ps;++o)s[o]=oo(o*io,n,e);function i(o){let a=0,c=1;const h=Ps-1;for(;c!==h&&s[c]<=o;++c)a+=io;--c;const u=(o-s[c])/(s[c+1]-s[c]),l=a+u*io,d=xm(l,n,e);return d>=dS?bS(o,l,n,e):d===0?l:yS(o,a,a+io,n,e)}return o=>o===0||o===1?o:oo(i(o),t,r)}function Zc(n){switch(n){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function Sm(n){const[t,e,r,s]=Zc(n);return[1-r,1-s,1-t,1-e]}function wS(n){return Jc(...Zc(n))}function xS(n){return Jc(...Sm(n))}const dn={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let r=t;r>1;r--)e*=r;return n[t]=e,e}}(),Bernstein:function(n,t){const e=dn.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,r,s){const i=(e-n)*.5,o=(r-t)*.5,a=s*s,c=s*a;return(2*t-2*e+i+o)*c+(-3*t+3*e-2*i-o)*a+i*s+t},QuadraticBezier:(n,t,e,r)=>{const s=1-r;return s*s*n+2*s*r*t+r*r*e},CubicBezier:(n,t,e,r,s)=>{const i=1-s;return i*i*i*n+3*i*i*s*t+3*i*s*s*e+s*s*s*r}},Linear:function(n,t){const e=n.length-1,r=e*t,s=Math.floor(r),i=dn.Utils.Linear;return t<0?i(n[0],n[1],r):t>1?i(n[e],n[e-1],e-r):i(n[s],n[s+1>e?e:s+1],r-s)},Bezier:function(n,t){let e=0;const r=n.length-1,s=Math.pow,i=dn.Utils.Bernstein;for(let o=0;o<=r;o++)e+=s(1-t,r-o)*s(t,o)*n[o]*i(r,o);return e},CatmullRom:function(n,t){const e=n.length-1;let r=e*t,s=Math.floor(r);const i=dn.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(r=e*(1+t))),i(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],r-s)):t<0?n[0]-(i(n[0],n[0],n[1],n[1],-r)-n[0]):t>1?n[e]-(i(n[e],n[e],n[e-1],n[e-1],r-e)-n[e]):i(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],r-s)}};class _m{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=Rt(),e=!1){const r=Object.keys(this._tweens);for(let s=0;s<r.length;s++){const i=this._tweens[r[s]],o=!e;i&&i.update(t,o)===!1&&!e&&delete this._tweens[r[s]]}return!!Object.keys(this._tweens).length}}const Oe=new _m;class Qc{constructor(t,e=Oe){this._object=t,this._group=e}_id=Ts.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=X.Linear.None;_interpolationFunction=dn.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=Rt()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,r,s){for(const i in r){const o=t[i],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(r[i]);if(!(c==="undefined"||c==="function")){if(h){let u=r[i];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),r[i]=[o].concat(u)}if((c==="object"||a)&&o&&!h){e[i]=a?[]:{};for(const u in o)e[i][u]=o[u];s[i]=a?[]:{},this._setupProperties(o,e[i],r[i],s[i])}else typeof e[i]>"u"&&(e[i]=o),a||(e[i]*=1),h?s[i]=r[i].slice().reverse():s[i]=e[i]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=Rt()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=Rt()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=Oe){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=X.Linear.None){return this._easingFunction=t,this}interpolation(t=dn.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=Rt(),e=!0){if(this._isPaused)return!0;let r,s;const i=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>i)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),s=(t-this._startTime)/this._durationTime,s=this._durationTime===0||s>1?1:s;const o=this._easingFunction(s);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,s),s===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,r,s){for(const i in r){if(e[i]===void 0)continue;const o=e[i]||0;let a=r[i];const c=Array.isArray(t[i]),h=Array.isArray(a);!c&&h?t[i]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[i],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[i]=o+(a-o)*s))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],r=this._valuesEnd[t];typeof r=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(r):this._valuesStartRepeat[t]=r,this._valuesEnd[t]=e}}const SS=Ts.nextId,_S=Oe.getAll.bind(Oe),ES=Oe.removeAll.bind(Oe),CS=Oe.add.bind(Oe),TS=Oe.remove.bind(Oe),PS=Oe.update.bind(Oe),AS={now:Rt,Sequence:Ts,Easing:X,Interpolation:dn,Group:_m,Tween:Qc,nextId:SS,getAll:_S,removeAll:ES,add:CS,remove:TS,update:PS};class th{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Rt(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=Rt();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class As{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){Pw(this.tweens,(e,r)=>t?e.delay>r.delay:e.delay<=r.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(r=>{const s={...r};delete s.tween,s.fromValues={...s.fromValues},s.toValues={...s.toValues},e.push(s)}),e}addTween(t,e,r){const s={fromValues:t,toValues:e,frames:typeof r?.frames=="number"?r.frames:1,delay:typeof r?.delay=="number"?r.delay:this.tweens.length,easeFunction:r?.easeFunction||X.Linear.None,interpolationFunction:r?.interpolationFunction||dn.Linear,repeat:typeof r?.repeat=="number"?r.repeat:0,yoyo:r?.yoyo||!1,onStart:r?.onStart||(()=>{}),onUpdate:r?.onUpdate||(()=>{}),onComplete:r?.onComplete||(()=>{})};return this.tweens.push(s),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new th,r=this.frameDuration;return new Promise(s=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=fb(i=>{if(!this.isPaused){const a=Math.max(0,i-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*r<=c).forEach(h=>{h.tween||(h.tween=new Qc({...h.fromValues}).to({...h.toValues},h.frames*r).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*r>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),hf(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),s()),o})})}isPaused=!1;pausedClock=new th;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(r=>{e=Math.max(e,r.delay+r.frames),r.easeFunction=ym(r.easeFunction);const s={...r.toValues};r.toValues={...r.fromValues},r.fromValues={...s}}),t.forEach(r=>{r.delay=e-r.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}var eh={exports:{}},ut={};/**
32
32
  * @license React
33
33
  * react.production.js
34
34
  *
@@ -36,7 +36,7 @@ Content-Type: `+f.type+`\r
36
36
  *
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
- */var _m;function AS(){if(_m)return ut;_m=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),d=Symbol.iterator;function f(A){return A===null||typeof A!="object"?null:(A=d&&A[d]||A["@@iterator"],typeof A=="function"?A:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,b={};function g(A,N,H){this.props=A,this.context=N,this.refs=b,this.updater=H||p}g.prototype.isReactComponent={},g.prototype.setState=function(A,N){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,N,"setState")},g.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function w(){}w.prototype=g.prototype;function x(A,N,H){this.props=A,this.context=N,this.refs=b,this.updater=H||p}var v=x.prototype=new w;v.constructor=x,m(v,g.prototype),v.isPureReactComponent=!0;var E=Array.isArray;function _(){}var D={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function O(A,N,H){var K=H.ref;return{$$typeof:n,type:A,key:N,ref:K!==void 0?K:null,props:H}}function L(A,N){return O(A.type,N,A.props)}function $(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function j(A){var N={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(H){return N[H]})}var Q=/\/+/g;function rt(A,N){return typeof A=="object"&&A!==null&&A.key!=null?j(""+A.key):N.toString(36)}function ot(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(_,_):(A.status="pending",A.then(function(N){A.status==="pending"&&(A.status="fulfilled",A.value=N)},function(N){A.status==="pending"&&(A.status="rejected",A.reason=N)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function nt(A,N,H,K,ct){var ft=typeof A;(ft==="undefined"||ft==="boolean")&&(A=null);var et=!1;if(A===null)et=!0;else switch(ft){case"bigint":case"string":case"number":et=!0;break;case"object":switch(A.$$typeof){case n:case t:et=!0;break;case u:return et=A._init,nt(et(A._payload),N,H,K,ct)}}if(et)return ct=ct(A),et=K===""?"."+rt(A,0):K,E(ct)?(H="",et!=null&&(H=et.replace(Q,"$&/")+"/"),nt(ct,N,H,"",function(Mt){return Mt})):ct!=null&&($(ct)&&(ct=L(ct,H+(ct.key==null||A&&A.key===ct.key?"":(""+ct.key).replace(Q,"$&/")+"/")+et)),N.push(ct)),1;et=0;var Tt=K===""?".":K+":";if(E(A))for(var lt=0;lt<A.length;lt++)K=A[lt],ft=Tt+rt(K,lt),et+=nt(K,N,H,ft,ct);else if(lt=f(A),typeof lt=="function")for(A=lt.call(A),lt=0;!(K=A.next()).done;)K=K.value,ft=Tt+rt(K,lt++),et+=nt(K,N,H,ft,ct);else if(ft==="object"){if(typeof A.then=="function")return nt(ot(A),N,H,K,ct);throw N=String(A),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return et}function tt(A,N,H){if(A==null)return A;var K=[],ct=0;return nt(A,K,"","",function(ft){return N.call(H,ft,ct++)}),K}function bt(A){if(A._status===-1){var N=A._result;N=N(),N.then(function(H){(A._status===0||A._status===-1)&&(A._status=1,A._result=H)},function(H){(A._status===0||A._status===-1)&&(A._status=2,A._result=H)}),A._status===-1&&(A._status=0,A._result=N)}if(A._status===1)return A._result.default;throw A._result}var Y=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},F={map:tt,forEach:function(A,N,H){tt(A,function(){N.apply(this,arguments)},H)},count:function(A){var N=0;return tt(A,function(){N++}),N},toArray:function(A){return tt(A,function(N){return N})||[]},only:function(A){if(!$(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ut.Activity=l,ut.Children=F,ut.Component=g,ut.Fragment=e,ut.Profiler=s,ut.PureComponent=x,ut.StrictMode=r,ut.Suspense=c,ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ut.__COMPILER_RUNTIME={__proto__:null,c:function(A){return D.H.useMemoCache(A)}},ut.cache=function(A){return function(){return A.apply(null,arguments)}},ut.cacheSignal=function(){return null},ut.cloneElement=function(A,N,H){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var K=m({},A.props),ct=A.key;if(N!=null)for(ft in N.key!==void 0&&(ct=""+N.key),N)!z.call(N,ft)||ft==="key"||ft==="__self"||ft==="__source"||ft==="ref"&&N.ref===void 0||(K[ft]=N[ft]);var ft=arguments.length-2;if(ft===1)K.children=H;else if(1<ft){for(var et=Array(ft),Tt=0;Tt<ft;Tt++)et[Tt]=arguments[Tt+2];K.children=et}return O(A.type,ct,K)},ut.createContext=function(A){return A={$$typeof:o,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:i,_context:A},A},ut.createElement=function(A,N,H){var K,ct={},ft=null;if(N!=null)for(K in N.key!==void 0&&(ft=""+N.key),N)z.call(N,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ct[K]=N[K]);var et=arguments.length-2;if(et===1)ct.children=H;else if(1<et){for(var Tt=Array(et),lt=0;lt<et;lt++)Tt[lt]=arguments[lt+2];ct.children=Tt}if(A&&A.defaultProps)for(K in et=A.defaultProps,et)ct[K]===void 0&&(ct[K]=et[K]);return O(A,ft,ct)},ut.createRef=function(){return{current:null}},ut.forwardRef=function(A){return{$$typeof:a,render:A}},ut.isValidElement=$,ut.lazy=function(A){return{$$typeof:u,_payload:{_status:-1,_result:A},_init:bt}},ut.memo=function(A,N){return{$$typeof:h,type:A,compare:N===void 0?null:N}},ut.startTransition=function(A){var N=D.T,H={};D.T=H;try{var K=A(),ct=D.S;ct!==null&&ct(H,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(_,Y)}catch(ft){Y(ft)}finally{N!==null&&H.types!==null&&(N.types=H.types),D.T=N}},ut.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ut.use=function(A){return D.H.use(A)},ut.useActionState=function(A,N,H){return D.H.useActionState(A,N,H)},ut.useCallback=function(A,N){return D.H.useCallback(A,N)},ut.useContext=function(A){return D.H.useContext(A)},ut.useDebugValue=function(){},ut.useDeferredValue=function(A,N){return D.H.useDeferredValue(A,N)},ut.useEffect=function(A,N){return D.H.useEffect(A,N)},ut.useEffectEvent=function(A){return D.H.useEffectEvent(A)},ut.useId=function(){return D.H.useId()},ut.useImperativeHandle=function(A,N,H){return D.H.useImperativeHandle(A,N,H)},ut.useInsertionEffect=function(A,N){return D.H.useInsertionEffect(A,N)},ut.useLayoutEffect=function(A,N){return D.H.useLayoutEffect(A,N)},ut.useMemo=function(A,N){return D.H.useMemo(A,N)},ut.useOptimistic=function(A,N){return D.H.useOptimistic(A,N)},ut.useReducer=function(A,N,H){return D.H.useReducer(A,N,H)},ut.useRef=function(A){return D.H.useRef(A)},ut.useState=function(A){return D.H.useState(A)},ut.useSyncExternalStore=function(A,N,H){return D.H.useSyncExternalStore(A,N,H)},ut.useTransition=function(){return D.H.useTransition()},ut.version="19.2.5",ut}var Ms={exports:{}};/**
39
+ */var Em;function MS(){if(Em)return ut;Em=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),d=Symbol.iterator;function f(A){return A===null||typeof A!="object"?null:(A=d&&A[d]||A["@@iterator"],typeof A=="function"?A:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,b={};function g(A,N,H){this.props=A,this.context=N,this.refs=b,this.updater=H||p}g.prototype.isReactComponent={},g.prototype.setState=function(A,N){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,N,"setState")},g.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function w(){}w.prototype=g.prototype;function x(A,N,H){this.props=A,this.context=N,this.refs=b,this.updater=H||p}var v=x.prototype=new w;v.constructor=x,m(v,g.prototype),v.isPureReactComponent=!0;var E=Array.isArray;function _(){}var D={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function O(A,N,H){var K=H.ref;return{$$typeof:n,type:A,key:N,ref:K!==void 0?K:null,props:H}}function L(A,N){return O(A.type,N,A.props)}function $(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function j(A){var N={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(H){return N[H]})}var Q=/\/+/g;function rt(A,N){return typeof A=="object"&&A!==null&&A.key!=null?j(""+A.key):N.toString(36)}function ot(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(_,_):(A.status="pending",A.then(function(N){A.status==="pending"&&(A.status="fulfilled",A.value=N)},function(N){A.status==="pending"&&(A.status="rejected",A.reason=N)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function nt(A,N,H,K,ct){var ft=typeof A;(ft==="undefined"||ft==="boolean")&&(A=null);var et=!1;if(A===null)et=!0;else switch(ft){case"bigint":case"string":case"number":et=!0;break;case"object":switch(A.$$typeof){case n:case t:et=!0;break;case u:return et=A._init,nt(et(A._payload),N,H,K,ct)}}if(et)return ct=ct(A),et=K===""?"."+rt(A,0):K,E(ct)?(H="",et!=null&&(H=et.replace(Q,"$&/")+"/"),nt(ct,N,H,"",function(Mt){return Mt})):ct!=null&&($(ct)&&(ct=L(ct,H+(ct.key==null||A&&A.key===ct.key?"":(""+ct.key).replace(Q,"$&/")+"/")+et)),N.push(ct)),1;et=0;var Tt=K===""?".":K+":";if(E(A))for(var lt=0;lt<A.length;lt++)K=A[lt],ft=Tt+rt(K,lt),et+=nt(K,N,H,ft,ct);else if(lt=f(A),typeof lt=="function")for(A=lt.call(A),lt=0;!(K=A.next()).done;)K=K.value,ft=Tt+rt(K,lt++),et+=nt(K,N,H,ft,ct);else if(ft==="object"){if(typeof A.then=="function")return nt(ot(A),N,H,K,ct);throw N=String(A),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return et}function tt(A,N,H){if(A==null)return A;var K=[],ct=0;return nt(A,K,"","",function(ft){return N.call(H,ft,ct++)}),K}function bt(A){if(A._status===-1){var N=A._result;N=N(),N.then(function(H){(A._status===0||A._status===-1)&&(A._status=1,A._result=H)},function(H){(A._status===0||A._status===-1)&&(A._status=2,A._result=H)}),A._status===-1&&(A._status=0,A._result=N)}if(A._status===1)return A._result.default;throw A._result}var Y=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},F={map:tt,forEach:function(A,N,H){tt(A,function(){N.apply(this,arguments)},H)},count:function(A){var N=0;return tt(A,function(){N++}),N},toArray:function(A){return tt(A,function(N){return N})||[]},only:function(A){if(!$(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ut.Activity=l,ut.Children=F,ut.Component=g,ut.Fragment=e,ut.Profiler=s,ut.PureComponent=x,ut.StrictMode=r,ut.Suspense=c,ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ut.__COMPILER_RUNTIME={__proto__:null,c:function(A){return D.H.useMemoCache(A)}},ut.cache=function(A){return function(){return A.apply(null,arguments)}},ut.cacheSignal=function(){return null},ut.cloneElement=function(A,N,H){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var K=m({},A.props),ct=A.key;if(N!=null)for(ft in N.key!==void 0&&(ct=""+N.key),N)!z.call(N,ft)||ft==="key"||ft==="__self"||ft==="__source"||ft==="ref"&&N.ref===void 0||(K[ft]=N[ft]);var ft=arguments.length-2;if(ft===1)K.children=H;else if(1<ft){for(var et=Array(ft),Tt=0;Tt<ft;Tt++)et[Tt]=arguments[Tt+2];K.children=et}return O(A.type,ct,K)},ut.createContext=function(A){return A={$$typeof:o,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:i,_context:A},A},ut.createElement=function(A,N,H){var K,ct={},ft=null;if(N!=null)for(K in N.key!==void 0&&(ft=""+N.key),N)z.call(N,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ct[K]=N[K]);var et=arguments.length-2;if(et===1)ct.children=H;else if(1<et){for(var Tt=Array(et),lt=0;lt<et;lt++)Tt[lt]=arguments[lt+2];ct.children=Tt}if(A&&A.defaultProps)for(K in et=A.defaultProps,et)ct[K]===void 0&&(ct[K]=et[K]);return O(A,ft,ct)},ut.createRef=function(){return{current:null}},ut.forwardRef=function(A){return{$$typeof:a,render:A}},ut.isValidElement=$,ut.lazy=function(A){return{$$typeof:u,_payload:{_status:-1,_result:A},_init:bt}},ut.memo=function(A,N){return{$$typeof:h,type:A,compare:N===void 0?null:N}},ut.startTransition=function(A){var N=D.T,H={};D.T=H;try{var K=A(),ct=D.S;ct!==null&&ct(H,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(_,Y)}catch(ft){Y(ft)}finally{N!==null&&H.types!==null&&(N.types=H.types),D.T=N}},ut.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ut.use=function(A){return D.H.use(A)},ut.useActionState=function(A,N,H){return D.H.useActionState(A,N,H)},ut.useCallback=function(A,N){return D.H.useCallback(A,N)},ut.useContext=function(A){return D.H.useContext(A)},ut.useDebugValue=function(){},ut.useDeferredValue=function(A,N){return D.H.useDeferredValue(A,N)},ut.useEffect=function(A,N){return D.H.useEffect(A,N)},ut.useEffectEvent=function(A){return D.H.useEffectEvent(A)},ut.useId=function(){return D.H.useId()},ut.useImperativeHandle=function(A,N,H){return D.H.useImperativeHandle(A,N,H)},ut.useInsertionEffect=function(A,N){return D.H.useInsertionEffect(A,N)},ut.useLayoutEffect=function(A,N){return D.H.useLayoutEffect(A,N)},ut.useMemo=function(A,N){return D.H.useMemo(A,N)},ut.useOptimistic=function(A,N){return D.H.useOptimistic(A,N)},ut.useReducer=function(A,N,H){return D.H.useReducer(A,N,H)},ut.useRef=function(A){return D.H.useRef(A)},ut.useState=function(A){return D.H.useState(A)},ut.useSyncExternalStore=function(A,N,H){return D.H.useSyncExternalStore(A,N,H)},ut.useTransition=function(){return D.H.useTransition()},ut.version="19.2.5",ut}var Ms={exports:{}};/**
40
40
  * @license React
41
41
  * react.development.js
42
42
  *
@@ -44,7 +44,7 @@ Content-Type: `+f.type+`\r
44
44
  *
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
- */Ms.exports;var Em;function MS(){return Em||(Em=1,function(n,t){({}).NODE_ENV!=="production"&&function(){function e(S,I){Object.defineProperty(i.prototype,S,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",I[0],I[1])}})}function r(S){return S===null||typeof S!="object"?null:(S=Xt&&S[Xt]||S["@@iterator"],typeof S=="function"?S:null)}function s(S,I){S=(S=S.constructor)&&(S.displayName||S.name)||"ReactClass";var U=S+"."+I;Pe[U]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",I,S),Pe[U]=!0)}function i(S,I,U){this.props=S,this.context=I,this.refs=At,this.updater=U||ve}function o(){}function a(S,I,U){this.props=S,this.context=I,this.refs=At,this.updater=U||ve}function c(){}function h(S){return""+S}function u(S){try{h(S);var I=!1}catch{I=!0}if(I){I=console;var U=I.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return U.call(I,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),h(S)}}function l(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===fa?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case A:return"Fragment";case H:return"Profiler";case N:return"StrictMode";case et:return"Suspense";case Tt:return"SuspenseList";case ke:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case F:return"Portal";case ct:return S.displayName||"Context";case K:return(S._context.displayName||"Context")+".Consumer";case ft:var I=S.render;return S=S.displayName,S||(S=I.displayName||I.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case lt:return I=S.displayName||null,I!==null?I:l(S.type)||"Memo";case Mt:I=S._payload,S=S._init;try{return l(S(I))}catch{}}return null}function d(S){if(S===A)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===Mt)return"<...>";try{var I=l(S);return I?"<"+I+">":"<...>"}catch{return"<...>"}}function f(){var S=dt.A;return S===null?null:S.getOwner()}function p(){return Error("react-stack-top-frame")}function m(S){if(Qt.call(S,"key")){var I=Object.getOwnPropertyDescriptor(S,"key").get;if(I&&I.isReactWarning)return!1}return S.key!==void 0}function b(S,I){function U(){ma||(ma=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",I))}U.isReactWarning=!0,Object.defineProperty(S,"key",{get:U,configurable:!0})}function g(){var S=l(this.type);return ga[S]||(ga[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function w(S,I,U,G,J,gt){var pt=U.ref;return S={$$typeof:Y,type:S,key:I,props:U,_owner:G},(pt!==void 0?pt:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:g}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:gt}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function x(S,I){return I=w(S.type,I,S.props,S._owner,S._debugStack,S._debugTask),S._store&&(I._store.validated=S._store.validated),I}function v(S){E(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===Mt&&(S._payload.status==="fulfilled"?E(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function E(S){return typeof S=="object"&&S!==null&&S.$$typeof===Y}function _(S){var I={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(U){return I[U]})}function D(S,I){return typeof S=="object"&&S!==null&&S.key!=null?(u(S.key),_(""+S.key)):I.toString(36)}function z(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(c,c):(S.status="pending",S.then(function(I){S.status==="pending"&&(S.status="fulfilled",S.value=I)},function(I){S.status==="pending"&&(S.status="rejected",S.reason=I)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function O(S,I,U,G,J){var gt=typeof S;(gt==="undefined"||gt==="boolean")&&(S=null);var pt=!1;if(S===null)pt=!0;else switch(gt){case"bigint":case"string":case"number":pt=!0;break;case"object":switch(S.$$typeof){case Y:case F:pt=!0;break;case Mt:return pt=S._init,O(pt(S._payload),I,U,G,J)}}if(pt){pt=S,J=J(pt);var Pt=G===""?"."+D(pt,0):G;return ci(J)?(U="",Pt!=null&&(U=Pt.replace(ui,"$&/")+"/"),O(J,I,U,"",function(Xe){return Xe})):J!=null&&(E(J)&&(J.key!=null&&(pt&&pt.key===J.key||u(J.key)),U=x(J,U+(J.key==null||pt&&pt.key===J.key?"":(""+J.key).replace(ui,"$&/")+"/")+Pt),G!==""&&pt!=null&&E(pt)&&pt.key==null&&pt._store&&!pt._store.validated&&(U._store.validated=2),J=U),I.push(J)),1}if(pt=0,Pt=G===""?".":G+":",ci(S))for(var yt=0;yt<S.length;yt++)G=S[yt],gt=Pt+D(G,yt),pt+=O(G,I,U,gt,J);else if(yt=r(S),typeof yt=="function")for(yt===S.entries&&(hi||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),hi=!0),S=yt.call(S),yt=0;!(G=S.next()).done;)G=G.value,gt=Pt+D(G,yt++),pt+=O(G,I,U,gt,J);else if(gt==="object"){if(typeof S.then=="function")return O(z(S),I,U,G,J);throw I=String(S),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return pt}function L(S,I,U){if(S==null)return S;var G=[],J=0;return O(S,G,"","",function(gt){return I.call(U,gt,J++)}),G}function $(S){if(S._status===-1){var I=S._ioInfo;I!=null&&(I.start=I.end=performance.now()),I=S._result;var U=I();if(U.then(function(J){if(S._status===0||S._status===-1){S._status=1,S._result=J;var gt=S._ioInfo;gt!=null&&(gt.end=performance.now()),U.status===void 0&&(U.status="fulfilled",U.value=J)}},function(J){if(S._status===0||S._status===-1){S._status=2,S._result=J;var gt=S._ioInfo;gt!=null&&(gt.end=performance.now()),U.status===void 0&&(U.status="rejected",U.reason=J)}}),I=S._ioInfo,I!=null){I.value=U;var G=U.displayName;typeof G=="string"&&(I.name=G)}S._status===-1&&(S._status=0,S._result=U)}if(S._status===1)return I=S._result,I===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
47
+ */Ms.exports;var Cm;function DS(){return Cm||(Cm=1,function(n,t){({}).NODE_ENV!=="production"&&function(){function e(S,I){Object.defineProperty(i.prototype,S,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",I[0],I[1])}})}function r(S){return S===null||typeof S!="object"?null:(S=Xt&&S[Xt]||S["@@iterator"],typeof S=="function"?S:null)}function s(S,I){S=(S=S.constructor)&&(S.displayName||S.name)||"ReactClass";var U=S+"."+I;Pe[U]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",I,S),Pe[U]=!0)}function i(S,I,U){this.props=S,this.context=I,this.refs=At,this.updater=U||ve}function o(){}function a(S,I,U){this.props=S,this.context=I,this.refs=At,this.updater=U||ve}function c(){}function h(S){return""+S}function u(S){try{h(S);var I=!1}catch{I=!0}if(I){I=console;var U=I.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return U.call(I,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),h(S)}}function l(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===fa?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case A:return"Fragment";case H:return"Profiler";case N:return"StrictMode";case et:return"Suspense";case Tt:return"SuspenseList";case ke:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case F:return"Portal";case ct:return S.displayName||"Context";case K:return(S._context.displayName||"Context")+".Consumer";case ft:var I=S.render;return S=S.displayName,S||(S=I.displayName||I.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case lt:return I=S.displayName||null,I!==null?I:l(S.type)||"Memo";case Mt:I=S._payload,S=S._init;try{return l(S(I))}catch{}}return null}function d(S){if(S===A)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===Mt)return"<...>";try{var I=l(S);return I?"<"+I+">":"<...>"}catch{return"<...>"}}function f(){var S=dt.A;return S===null?null:S.getOwner()}function p(){return Error("react-stack-top-frame")}function m(S){if(Qt.call(S,"key")){var I=Object.getOwnPropertyDescriptor(S,"key").get;if(I&&I.isReactWarning)return!1}return S.key!==void 0}function b(S,I){function U(){ma||(ma=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",I))}U.isReactWarning=!0,Object.defineProperty(S,"key",{get:U,configurable:!0})}function g(){var S=l(this.type);return ga[S]||(ga[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function w(S,I,U,G,J,gt){var pt=U.ref;return S={$$typeof:Y,type:S,key:I,props:U,_owner:G},(pt!==void 0?pt:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:g}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:gt}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function x(S,I){return I=w(S.type,I,S.props,S._owner,S._debugStack,S._debugTask),S._store&&(I._store.validated=S._store.validated),I}function v(S){E(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===Mt&&(S._payload.status==="fulfilled"?E(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function E(S){return typeof S=="object"&&S!==null&&S.$$typeof===Y}function _(S){var I={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(U){return I[U]})}function D(S,I){return typeof S=="object"&&S!==null&&S.key!=null?(u(S.key),_(""+S.key)):I.toString(36)}function z(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(c,c):(S.status="pending",S.then(function(I){S.status==="pending"&&(S.status="fulfilled",S.value=I)},function(I){S.status==="pending"&&(S.status="rejected",S.reason=I)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function O(S,I,U,G,J){var gt=typeof S;(gt==="undefined"||gt==="boolean")&&(S=null);var pt=!1;if(S===null)pt=!0;else switch(gt){case"bigint":case"string":case"number":pt=!0;break;case"object":switch(S.$$typeof){case Y:case F:pt=!0;break;case Mt:return pt=S._init,O(pt(S._payload),I,U,G,J)}}if(pt){pt=S,J=J(pt);var Pt=G===""?"."+D(pt,0):G;return ci(J)?(U="",Pt!=null&&(U=Pt.replace(ui,"$&/")+"/"),O(J,I,U,"",function(Xe){return Xe})):J!=null&&(E(J)&&(J.key!=null&&(pt&&pt.key===J.key||u(J.key)),U=x(J,U+(J.key==null||pt&&pt.key===J.key?"":(""+J.key).replace(ui,"$&/")+"/")+Pt),G!==""&&pt!=null&&E(pt)&&pt.key==null&&pt._store&&!pt._store.validated&&(U._store.validated=2),J=U),I.push(J)),1}if(pt=0,Pt=G===""?".":G+":",ci(S))for(var yt=0;yt<S.length;yt++)G=S[yt],gt=Pt+D(G,yt),pt+=O(G,I,U,gt,J);else if(yt=r(S),typeof yt=="function")for(yt===S.entries&&(hi||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),hi=!0),S=yt.call(S),yt=0;!(G=S.next()).done;)G=G.value,gt=Pt+D(G,yt++),pt+=O(G,I,U,gt,J);else if(gt==="object"){if(typeof S.then=="function")return O(z(S),I,U,G,J);throw I=String(S),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return pt}function L(S,I,U){if(S==null)return S;var G=[],J=0;return O(S,G,"","",function(gt){return I.call(U,gt,J++)}),G}function $(S){if(S._status===-1){var I=S._ioInfo;I!=null&&(I.start=I.end=performance.now()),I=S._result;var U=I();if(U.then(function(J){if(S._status===0||S._status===-1){S._status=1,S._result=J;var gt=S._ioInfo;gt!=null&&(gt.end=performance.now()),U.status===void 0&&(U.status="fulfilled",U.value=J)}},function(J){if(S._status===0||S._status===-1){S._status=2,S._result=J;var gt=S._ioInfo;gt!=null&&(gt.end=performance.now()),U.status===void 0&&(U.status="rejected",U.reason=J)}}),I=S._ioInfo,I!=null){I.value=U;var G=U.displayName;typeof G=="string"&&(I.name=G)}S._status===-1&&(S._status=0,S._result=U)}if(S._status===1)return I=S._result,I===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
48
48
 
49
49
  Your code should look like:
50
50
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -56,26 +56,26 @@ Your code should look like:
56
56
  1. You might have mismatching versions of React and the renderer (such as React DOM)
57
57
  2. You might be breaking the Rules of Hooks
58
58
  3. You might have more than one copy of React in the same app
59
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),S}function Q(){dt.asyncTransitions--}function rt(S){if(Hn===null)try{var I=("require"+Math.random()).slice(0,7);Hn=(n&&n[I]).call(n,"timers").setImmediate}catch{Hn=function(G){xr===!1&&(xr=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var J=new MessageChannel;J.port1.onmessage=G,J.port2.postMessage(void 0)}}return Hn(S)}function ot(S){return 1<S.length&&typeof AggregateError=="function"?new AggregateError(S):S[0]}function nt(S,I){I!==ns-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ns=I}function tt(S,I,U){var G=dt.actQueue;if(G!==null)if(G.length!==0)try{bt(G),rt(function(){return tt(S,I,U)});return}catch(J){dt.thrownErrors.push(J)}else dt.actQueue=null;0<dt.thrownErrors.length?(G=ot(dt.thrownErrors),dt.thrownErrors.length=0,U(G)):I(S)}function bt(S){if(!fi){fi=!0;var I=0;try{for(;I<S.length;I++){var U=S[I];do{dt.didUsePromise=!1;var G=U(!1);if(G!==null){if(dt.didUsePromise){S[I]=U,S.splice(0,I);return}U=G}else break}while(1)}S.length=0}catch(J){S.splice(0,I+1),dt.thrownErrors.push(J)}finally{fi=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),ct=Symbol.for("react.context"),ft=Symbol.for("react.forward_ref"),et=Symbol.for("react.suspense"),Tt=Symbol.for("react.suspense_list"),lt=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),ke=Symbol.for("react.activity"),Xt=Symbol.iterator,Pe={},ve={isMounted:function(){return!1},enqueueForceUpdate:function(S){s(S,"forceUpdate")},enqueueReplaceState:function(S){s(S,"replaceState")},enqueueSetState:function(S){s(S,"setState")}},V=Object.assign,At={};Object.freeze(At),i.prototype.isReactComponent={},i.prototype.setState=function(S,I){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,I,"setState")},i.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};var Dt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(Sr in Dt)Dt.hasOwnProperty(Sr)&&e(Sr,Dt[Sr]);o.prototype=i.prototype,Dt=a.prototype=new o,Dt.constructor=a,V(Dt,i.prototype),Dt.isPureReactComponent=!0;var ci=Array.isArray,fa=Symbol.for("react.client.reference"),dt={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Qt=Object.prototype.hasOwnProperty,da=console.createTask?console.createTask:function(){return null};Dt={react_stack_bottom_frame:function(S){return S()}};var ma,pa,ga={},Rl=Dt.react_stack_bottom_frame.bind(Dt,p)(),ya=da(d(p)),hi=!1,ui=/\/+/g,li=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},xr=!1,Hn=null,ns=0,rs=!1,fi=!1,ba=typeof queueMicrotask=="function"?function(S){queueMicrotask(function(){return queueMicrotask(S)})}:rt;Dt=Object.freeze({__proto__:null,c:function(S){return j().useMemoCache(S)}});var Sr={map:L,forEach:function(S,I,U){L(S,function(){I.apply(this,arguments)},U)},count:function(S){var I=0;return L(S,function(){I++}),I},toArray:function(S){return L(S,function(I){return I})||[]},only:function(S){if(!E(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};t.Activity=ke,t.Children=Sr,t.Component=i,t.Fragment=A,t.Profiler=H,t.PureComponent=a,t.StrictMode=N,t.Suspense=et,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=dt,t.__COMPILER_RUNTIME=Dt,t.act=function(S){var I=dt.actQueue,U=ns;ns++;var G=dt.actQueue=I!==null?I:[],J=!1;try{var gt=S()}catch(yt){dt.thrownErrors.push(yt)}if(0<dt.thrownErrors.length)throw nt(I,U),S=ot(dt.thrownErrors),dt.thrownErrors.length=0,S;if(gt!==null&&typeof gt=="object"&&typeof gt.then=="function"){var pt=gt;return ba(function(){J||rs||(rs=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(yt,Xe){J=!0,pt.then(function(qn){if(nt(I,U),U===0){try{bt(G),rt(function(){return tt(qn,yt,Xe)})}catch(Ll){dt.thrownErrors.push(Ll)}if(0<dt.thrownErrors.length){var kl=ot(dt.thrownErrors);dt.thrownErrors.length=0,Xe(kl)}}else yt(qn)},function(qn){nt(I,U),0<dt.thrownErrors.length&&(qn=ot(dt.thrownErrors),dt.thrownErrors.length=0),Xe(qn)})}}}var Pt=gt;if(nt(I,U),U===0&&(bt(G),G.length!==0&&ba(function(){J||rs||(rs=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),dt.actQueue=null),0<dt.thrownErrors.length)throw S=ot(dt.thrownErrors),dt.thrownErrors.length=0,S;return{then:function(yt,Xe){J=!0,U===0?(dt.actQueue=G,rt(function(){return tt(Pt,yt,Xe)})):yt(Pt)}}},t.cache=function(S){return function(){return S.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var S=dt.getCurrentStack;return S===null?null:S()},t.cloneElement=function(S,I,U){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var G=V({},S.props),J=S.key,gt=S._owner;if(I!=null){var pt;t:{if(Qt.call(I,"ref")&&(pt=Object.getOwnPropertyDescriptor(I,"ref").get)&&pt.isReactWarning){pt=!1;break t}pt=I.ref!==void 0}pt&&(gt=f()),m(I)&&(u(I.key),J=""+I.key);for(Pt in I)!Qt.call(I,Pt)||Pt==="key"||Pt==="__self"||Pt==="__source"||Pt==="ref"&&I.ref===void 0||(G[Pt]=I[Pt])}var Pt=arguments.length-2;if(Pt===1)G.children=U;else if(1<Pt){pt=Array(Pt);for(var yt=0;yt<Pt;yt++)pt[yt]=arguments[yt+2];G.children=pt}for(G=w(S.type,J,G,gt,S._debugStack,S._debugTask),J=2;J<arguments.length;J++)v(arguments[J]);return G},t.createContext=function(S){return S={$$typeof:ct,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:K,_context:S},S._currentRenderer=null,S._currentRenderer2=null,S},t.createElement=function(S,I,U){for(var G=2;G<arguments.length;G++)v(arguments[G]);G={};var J=null;if(I!=null)for(yt in pa||!("__self"in I)||"key"in I||(pa=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),m(I)&&(u(I.key),J=""+I.key),I)Qt.call(I,yt)&&yt!=="key"&&yt!=="__self"&&yt!=="__source"&&(G[yt]=I[yt]);var gt=arguments.length-2;if(gt===1)G.children=U;else if(1<gt){for(var pt=Array(gt),Pt=0;Pt<gt;Pt++)pt[Pt]=arguments[Pt+2];Object.freeze&&Object.freeze(pt),G.children=pt}if(S&&S.defaultProps)for(yt in gt=S.defaultProps,gt)G[yt]===void 0&&(G[yt]=gt[yt]);J&&b(G,typeof S=="function"?S.displayName||S.name||"Unknown":S);var yt=1e4>dt.recentlyCreatedOwnerStacks++;return w(S,J,G,f(),yt?Error("react-stack-top-frame"):Rl,yt?da(d(S)):ya)},t.createRef=function(){var S={current:null};return Object.seal(S),S},t.forwardRef=function(S){S!=null&&S.$$typeof===lt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof S!="function"?console.error("forwardRef requires a render function but was given %s.",S===null?"null":typeof S):S.length!==0&&S.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",S.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),S!=null&&S.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var I={$$typeof:ft,render:S},U;return Object.defineProperty(I,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(G){U=G,S.name||S.displayName||(Object.defineProperty(S,"name",{value:G}),S.displayName=G)}}),I},t.isValidElement=E,t.lazy=function(S){S={_status:-1,_result:S};var I={$$typeof:Mt,_payload:S,_init:$},U={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return S._ioInfo=U,I._debugInfo=[{awaited:U}],I},t.memo=function(S,I){S==null&&console.error("memo: The first argument must be a component. Instead received: %s",S===null?"null":typeof S),I={$$typeof:lt,type:S,compare:I===void 0?null:I};var U;return Object.defineProperty(I,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(G){U=G,S.name||S.displayName||(Object.defineProperty(S,"name",{value:G}),S.displayName=G)}}),I},t.startTransition=function(S){var I=dt.T,U={};U._updatedFibers=new Set,dt.T=U;try{var G=S(),J=dt.S;J!==null&&J(U,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&(dt.asyncTransitions++,G.then(Q,Q),G.then(c,li))}catch(gt){li(gt)}finally{I===null&&U._updatedFibers&&(S=U._updatedFibers.size,U._updatedFibers.clear(),10<S&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),I!==null&&U.types!==null&&(I.types!==null&&I.types!==U.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),I.types=U.types),dt.T=I}},t.unstable_useCacheRefresh=function(){return j().useCacheRefresh()},t.use=function(S){return j().use(S)},t.useActionState=function(S,I,U){return j().useActionState(S,I,U)},t.useCallback=function(S,I){return j().useCallback(S,I)},t.useContext=function(S){var I=j();return S.$$typeof===K&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),I.useContext(S)},t.useDebugValue=function(S,I){return j().useDebugValue(S,I)},t.useDeferredValue=function(S,I){return j().useDeferredValue(S,I)},t.useEffect=function(S,I){return S==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),j().useEffect(S,I)},t.useEffectEvent=function(S){return j().useEffectEvent(S)},t.useId=function(){return j().useId()},t.useImperativeHandle=function(S,I,U){return j().useImperativeHandle(S,I,U)},t.useInsertionEffect=function(S,I){return S==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),j().useInsertionEffect(S,I)},t.useLayoutEffect=function(S,I){return S==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),j().useLayoutEffect(S,I)},t.useMemo=function(S,I){return j().useMemo(S,I)},t.useOptimistic=function(S,I){return j().useOptimistic(S,I)},t.useReducer=function(S,I,U){return j().useReducer(S,I,U)},t.useRef=function(S){return j().useRef(S)},t.useState=function(S){return j().useState(S)},t.useSyncExternalStore=function(S,I,U){return j().useSyncExternalStore(S,I,U)},t.useTransition=function(){return j().useTransition()},t.version="19.2.5",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(Ms,Ms.exports)),Ms.exports}({}).NODE_ENV==="production"?eh.exports=AS():eh.exports=MS();var St=eh.exports;const DS=Er({__proto__:null,default:pc(St)},[St]);/**
59
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),S}function Q(){dt.asyncTransitions--}function rt(S){if(Hn===null)try{var I=("require"+Math.random()).slice(0,7);Hn=(n&&n[I]).call(n,"timers").setImmediate}catch{Hn=function(G){xr===!1&&(xr=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var J=new MessageChannel;J.port1.onmessage=G,J.port2.postMessage(void 0)}}return Hn(S)}function ot(S){return 1<S.length&&typeof AggregateError=="function"?new AggregateError(S):S[0]}function nt(S,I){I!==ns-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ns=I}function tt(S,I,U){var G=dt.actQueue;if(G!==null)if(G.length!==0)try{bt(G),rt(function(){return tt(S,I,U)});return}catch(J){dt.thrownErrors.push(J)}else dt.actQueue=null;0<dt.thrownErrors.length?(G=ot(dt.thrownErrors),dt.thrownErrors.length=0,U(G)):I(S)}function bt(S){if(!fi){fi=!0;var I=0;try{for(;I<S.length;I++){var U=S[I];do{dt.didUsePromise=!1;var G=U(!1);if(G!==null){if(dt.didUsePromise){S[I]=U,S.splice(0,I);return}U=G}else break}while(1)}S.length=0}catch(J){S.splice(0,I+1),dt.thrownErrors.push(J)}finally{fi=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),ct=Symbol.for("react.context"),ft=Symbol.for("react.forward_ref"),et=Symbol.for("react.suspense"),Tt=Symbol.for("react.suspense_list"),lt=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),ke=Symbol.for("react.activity"),Xt=Symbol.iterator,Pe={},ve={isMounted:function(){return!1},enqueueForceUpdate:function(S){s(S,"forceUpdate")},enqueueReplaceState:function(S){s(S,"replaceState")},enqueueSetState:function(S){s(S,"setState")}},V=Object.assign,At={};Object.freeze(At),i.prototype.isReactComponent={},i.prototype.setState=function(S,I){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,I,"setState")},i.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};var Dt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(Sr in Dt)Dt.hasOwnProperty(Sr)&&e(Sr,Dt[Sr]);o.prototype=i.prototype,Dt=a.prototype=new o,Dt.constructor=a,V(Dt,i.prototype),Dt.isPureReactComponent=!0;var ci=Array.isArray,fa=Symbol.for("react.client.reference"),dt={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Qt=Object.prototype.hasOwnProperty,da=console.createTask?console.createTask:function(){return null};Dt={react_stack_bottom_frame:function(S){return S()}};var ma,pa,ga={},kl=Dt.react_stack_bottom_frame.bind(Dt,p)(),ya=da(d(p)),hi=!1,ui=/\/+/g,li=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},xr=!1,Hn=null,ns=0,rs=!1,fi=!1,ba=typeof queueMicrotask=="function"?function(S){queueMicrotask(function(){return queueMicrotask(S)})}:rt;Dt=Object.freeze({__proto__:null,c:function(S){return j().useMemoCache(S)}});var Sr={map:L,forEach:function(S,I,U){L(S,function(){I.apply(this,arguments)},U)},count:function(S){var I=0;return L(S,function(){I++}),I},toArray:function(S){return L(S,function(I){return I})||[]},only:function(S){if(!E(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};t.Activity=ke,t.Children=Sr,t.Component=i,t.Fragment=A,t.Profiler=H,t.PureComponent=a,t.StrictMode=N,t.Suspense=et,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=dt,t.__COMPILER_RUNTIME=Dt,t.act=function(S){var I=dt.actQueue,U=ns;ns++;var G=dt.actQueue=I!==null?I:[],J=!1;try{var gt=S()}catch(yt){dt.thrownErrors.push(yt)}if(0<dt.thrownErrors.length)throw nt(I,U),S=ot(dt.thrownErrors),dt.thrownErrors.length=0,S;if(gt!==null&&typeof gt=="object"&&typeof gt.then=="function"){var pt=gt;return ba(function(){J||rs||(rs=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(yt,Xe){J=!0,pt.then(function(qn){if(nt(I,U),U===0){try{bt(G),rt(function(){return tt(qn,yt,Xe)})}catch(Nl){dt.thrownErrors.push(Nl)}if(0<dt.thrownErrors.length){var Ll=ot(dt.thrownErrors);dt.thrownErrors.length=0,Xe(Ll)}}else yt(qn)},function(qn){nt(I,U),0<dt.thrownErrors.length&&(qn=ot(dt.thrownErrors),dt.thrownErrors.length=0),Xe(qn)})}}}var Pt=gt;if(nt(I,U),U===0&&(bt(G),G.length!==0&&ba(function(){J||rs||(rs=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),dt.actQueue=null),0<dt.thrownErrors.length)throw S=ot(dt.thrownErrors),dt.thrownErrors.length=0,S;return{then:function(yt,Xe){J=!0,U===0?(dt.actQueue=G,rt(function(){return tt(Pt,yt,Xe)})):yt(Pt)}}},t.cache=function(S){return function(){return S.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var S=dt.getCurrentStack;return S===null?null:S()},t.cloneElement=function(S,I,U){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var G=V({},S.props),J=S.key,gt=S._owner;if(I!=null){var pt;t:{if(Qt.call(I,"ref")&&(pt=Object.getOwnPropertyDescriptor(I,"ref").get)&&pt.isReactWarning){pt=!1;break t}pt=I.ref!==void 0}pt&&(gt=f()),m(I)&&(u(I.key),J=""+I.key);for(Pt in I)!Qt.call(I,Pt)||Pt==="key"||Pt==="__self"||Pt==="__source"||Pt==="ref"&&I.ref===void 0||(G[Pt]=I[Pt])}var Pt=arguments.length-2;if(Pt===1)G.children=U;else if(1<Pt){pt=Array(Pt);for(var yt=0;yt<Pt;yt++)pt[yt]=arguments[yt+2];G.children=pt}for(G=w(S.type,J,G,gt,S._debugStack,S._debugTask),J=2;J<arguments.length;J++)v(arguments[J]);return G},t.createContext=function(S){return S={$$typeof:ct,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:K,_context:S},S._currentRenderer=null,S._currentRenderer2=null,S},t.createElement=function(S,I,U){for(var G=2;G<arguments.length;G++)v(arguments[G]);G={};var J=null;if(I!=null)for(yt in pa||!("__self"in I)||"key"in I||(pa=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),m(I)&&(u(I.key),J=""+I.key),I)Qt.call(I,yt)&&yt!=="key"&&yt!=="__self"&&yt!=="__source"&&(G[yt]=I[yt]);var gt=arguments.length-2;if(gt===1)G.children=U;else if(1<gt){for(var pt=Array(gt),Pt=0;Pt<gt;Pt++)pt[Pt]=arguments[Pt+2];Object.freeze&&Object.freeze(pt),G.children=pt}if(S&&S.defaultProps)for(yt in gt=S.defaultProps,gt)G[yt]===void 0&&(G[yt]=gt[yt]);J&&b(G,typeof S=="function"?S.displayName||S.name||"Unknown":S);var yt=1e4>dt.recentlyCreatedOwnerStacks++;return w(S,J,G,f(),yt?Error("react-stack-top-frame"):kl,yt?da(d(S)):ya)},t.createRef=function(){var S={current:null};return Object.seal(S),S},t.forwardRef=function(S){S!=null&&S.$$typeof===lt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof S!="function"?console.error("forwardRef requires a render function but was given %s.",S===null?"null":typeof S):S.length!==0&&S.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",S.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),S!=null&&S.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var I={$$typeof:ft,render:S},U;return Object.defineProperty(I,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(G){U=G,S.name||S.displayName||(Object.defineProperty(S,"name",{value:G}),S.displayName=G)}}),I},t.isValidElement=E,t.lazy=function(S){S={_status:-1,_result:S};var I={$$typeof:Mt,_payload:S,_init:$},U={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return S._ioInfo=U,I._debugInfo=[{awaited:U}],I},t.memo=function(S,I){S==null&&console.error("memo: The first argument must be a component. Instead received: %s",S===null?"null":typeof S),I={$$typeof:lt,type:S,compare:I===void 0?null:I};var U;return Object.defineProperty(I,"displayName",{enumerable:!1,configurable:!0,get:function(){return U},set:function(G){U=G,S.name||S.displayName||(Object.defineProperty(S,"name",{value:G}),S.displayName=G)}}),I},t.startTransition=function(S){var I=dt.T,U={};U._updatedFibers=new Set,dt.T=U;try{var G=S(),J=dt.S;J!==null&&J(U,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&(dt.asyncTransitions++,G.then(Q,Q),G.then(c,li))}catch(gt){li(gt)}finally{I===null&&U._updatedFibers&&(S=U._updatedFibers.size,U._updatedFibers.clear(),10<S&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),I!==null&&U.types!==null&&(I.types!==null&&I.types!==U.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),I.types=U.types),dt.T=I}},t.unstable_useCacheRefresh=function(){return j().useCacheRefresh()},t.use=function(S){return j().use(S)},t.useActionState=function(S,I,U){return j().useActionState(S,I,U)},t.useCallback=function(S,I){return j().useCallback(S,I)},t.useContext=function(S){var I=j();return S.$$typeof===K&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),I.useContext(S)},t.useDebugValue=function(S,I){return j().useDebugValue(S,I)},t.useDeferredValue=function(S,I){return j().useDeferredValue(S,I)},t.useEffect=function(S,I){return S==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),j().useEffect(S,I)},t.useEffectEvent=function(S){return j().useEffectEvent(S)},t.useId=function(){return j().useId()},t.useImperativeHandle=function(S,I,U){return j().useImperativeHandle(S,I,U)},t.useInsertionEffect=function(S,I){return S==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),j().useInsertionEffect(S,I)},t.useLayoutEffect=function(S,I){return S==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),j().useLayoutEffect(S,I)},t.useMemo=function(S,I){return j().useMemo(S,I)},t.useOptimistic=function(S,I){return j().useOptimistic(S,I)},t.useReducer=function(S,I,U){return j().useReducer(S,I,U)},t.useRef=function(S){return j().useRef(S)},t.useState=function(S){return j().useState(S)},t.useSyncExternalStore=function(S,I,U){return j().useSyncExternalStore(S,I,U)},t.useTransition=function(){return j().useTransition()},t.version="19.2.5",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()}(Ms,Ms.exports)),Ms.exports}({}).NODE_ENV==="production"?eh.exports=MS():eh.exports=DS();var St=eh.exports;const nh=pc(St),OS=Er({__proto__:null,default:nh},[St]);/**
60
60
  * @vue/shared v3.5.13
61
61
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
62
62
  * @license MIT
63
- **//*! #__NO_SIDE_EFFECTS__ */function OS(n){const t=Object.create(null);for(const e of n.split(","))t[e]=1;return e=>e in t}const Ie={}.NODE_ENV!=="production"?Object.freeze({}):{},Ds=()=>{},Be=Object.assign,IS=Object.prototype.hasOwnProperty,Ut=(n,t)=>IS.call(n,t),re=Array.isArray,Nr=n=>co(n)==="[object Map]",RS=n=>co(n)==="[object Set]",se=n=>typeof n=="function",ao=n=>typeof n=="string",Os=n=>typeof n=="symbol",Ze=n=>n!==null&&typeof n=="object",kS=n=>(Ze(n)||se(n))&&se(n.then)&&se(n.catch),LS=Object.prototype.toString,co=n=>LS.call(n),Cm=n=>co(n).slice(8,-1),NS=n=>co(n)==="[object Object]",nh=n=>ao(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,zS=(n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))})(n=>n.charAt(0).toUpperCase()+n.slice(1)),Nn=(n,t)=>!Object.is(n,t),VS=(n,t,e,r=!1)=>{Object.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:r,value:e})};let Tm;const ho=()=>Tm||(Tm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});/**
63
+ **//*! #__NO_SIDE_EFFECTS__ */function IS(n){const t=Object.create(null);for(const e of n.split(","))t[e]=1;return e=>e in t}const Ie={}.NODE_ENV!=="production"?Object.freeze({}):{},Ds=()=>{},Be=Object.assign,RS=Object.prototype.hasOwnProperty,Ut=(n,t)=>RS.call(n,t),re=Array.isArray,Nr=n=>co(n)==="[object Map]",kS=n=>co(n)==="[object Set]",se=n=>typeof n=="function",ao=n=>typeof n=="string",Os=n=>typeof n=="symbol",Ze=n=>n!==null&&typeof n=="object",LS=n=>(Ze(n)||se(n))&&se(n.then)&&se(n.catch),NS=Object.prototype.toString,co=n=>NS.call(n),Tm=n=>co(n).slice(8,-1),zS=n=>co(n)==="[object Object]",rh=n=>ao(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,VS=(n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))})(n=>n.charAt(0).toUpperCase()+n.slice(1)),Nn=(n,t)=>!Object.is(n,t),FS=(n,t,e,r=!1)=>{Object.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:r,value:e})};let Pm;const ho=()=>Pm||(Pm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});/**
64
64
  * @vue/reactivity v3.5.13
65
65
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
66
66
  * @license MIT
67
- **/function mn(n,...t){console.warn(`[Vue warn] ${n}`,...t)}let _t;const rh=new WeakSet;class FS{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,rh.has(this)&&(rh.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Am(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Rm(this),Mm(this);const t=_t,e=$e;_t=this,$e=!0;try{return this.fn()}finally{({}).NODE_ENV!=="production"&&_t!==this&&mn("Active effect was not restored correctly - this is likely a Vue internal bug."),Dm(this),_t=t,$e=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ah(t);this.deps=this.depsTail=void 0,Rm(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?rh.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){oh(this)&&this.run()}get dirty(){return oh(this)}}let Pm=0,Is,Rs;function Am(n,t=!1){if(n.flags|=8,t){n.next=Rs,Rs=n;return}n.next=Is,Is=n}function sh(){Pm++}function ih(){if(--Pm>0)return;if(Rs){let t=Rs;for(Rs=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Is;){let t=Is;for(Is=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){n||(n=r)}t=e}}if(n)throw n}function Mm(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Dm(n){let t,e=n.depsTail,r=e;for(;r;){const s=r.prevDep;r.version===-1?(r===e&&(e=s),ah(r),BS(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}n.deps=t,n.depsTail=e}function oh(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Om(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function Om(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===ks))return;n.globalVersion=ks;const t=n.dep;if(n.flags|=2,t.version>0&&!n.isSSR&&n.deps&&!oh(n)){n.flags&=-3;return}const e=_t,r=$e;_t=n,$e=!0;try{Mm(n);const s=n.fn(n._value);(t.version===0||Nn(s,n._value))&&(n._value=s,t.version++)}catch(s){throw t.version++,s}finally{_t=e,$e=r,Dm(n),n.flags&=-3}}function ah(n,t=!1){const{dep:e,prevSub:r,nextSub:s}=n;if(r&&(r.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=r,n.nextSub=void 0),{}.NODE_ENV!=="production"&&e.subsHead===n&&(e.subsHead=s),e.subs===n&&(e.subs=r,!r&&e.computed)){e.computed.flags&=-5;for(let i=e.computed.deps;i;i=i.nextDep)ah(i,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function BS(n){const{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}let $e=!0;const Im=[];function uo(){Im.push($e),$e=!1}function lo(){const n=Im.pop();$e=n===void 0?!0:n}function Rm(n){const{cleanup:t}=n;if(n.cleanup=void 0,t){const e=_t;_t=void 0;try{t()}finally{_t=e}}}let ks=0;class $S{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ch{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,{}.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!_t||!$e||_t===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==_t)e=this.activeLink=new $S(_t,this),_t.deps?(e.prevDep=_t.depsTail,_t.depsTail.nextDep=e,_t.depsTail=e):_t.deps=_t.depsTail=e,km(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const r=e.nextDep;r.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=r),e.prevDep=_t.depsTail,e.nextDep=void 0,_t.depsTail.nextDep=e,_t.depsTail=e,_t.deps===e&&(_t.deps=r)}return{}.NODE_ENV!=="production"&&_t.onTrack&&_t.onTrack(Be({effect:_t},t)),e}trigger(t){this.version++,ks++,this.notify(t)}notify(t){sh();try{if({}.NODE_ENV!=="production")for(let e=this.subsHead;e;e=e.nextSub)e.sub.onTrigger&&!(e.sub.flags&8)&&e.sub.onTrigger(Be({effect:e.sub},t));for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ih()}}}function km(n){if(n.dep.sc++,n.sub.flags&4){const t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)km(r)}const e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),{}.NODE_ENV!=="production"&&n.dep.subsHead===void 0&&(n.dep.subsHead=n),n.dep.subs=n}}const hh=new WeakMap,ur=Symbol({}.NODE_ENV!=="production"?"Object iterate":""),uh=Symbol({}.NODE_ENV!=="production"?"Map keys iterate":""),Ls=Symbol({}.NODE_ENV!=="production"?"Array iterate":"");function ie(n,t,e){if($e&&_t){let r=hh.get(n);r||hh.set(n,r=new Map);let s=r.get(e);s||(r.set(e,s=new ch),s.map=r,s.key=e),{}.NODE_ENV!=="production"?s.track({target:n,type:t,key:e}):s.track()}}function zn(n,t,e,r,s,i){const o=hh.get(n);if(!o){ks++;return}const a=c=>{c&&({}.NODE_ENV!=="production"?c.trigger({target:n,type:t,key:e,newValue:r,oldValue:s,oldTarget:i}):c.trigger())};if(sh(),t==="clear")o.forEach(a);else{const c=re(n),h=c&&nh(e);if(c&&e==="length"){const u=Number(r);o.forEach((l,d)=>{(d==="length"||d===Ls||!Os(d)&&d>=u)&&a(l)})}else switch((e!==void 0||o.has(void 0))&&a(o.get(e)),h&&a(o.get(Ls)),t){case"add":c?h&&a(o.get("length")):(a(o.get(ur)),Nr(n)&&a(o.get(uh)));break;case"delete":c||(a(o.get(ur)),Nr(n)&&a(o.get(uh)));break;case"set":Nr(n)&&a(o.get(ur));break}}ih()}function zr(n){const t=xt(n);return t===n?t:(ie(t,"iterate",Ls),pe(n)?t:t.map(ce))}function lh(n){return ie(n=xt(n),"iterate",Ls),n}const US={__proto__:null,[Symbol.iterator](){return fh(this,Symbol.iterator,ce)},concat(...n){return zr(this).concat(...n.map(t=>re(t)?zr(t):t))},entries(){return fh(this,"entries",n=>(n[1]=ce(n[1]),n))},every(n,t){return pn(this,"every",n,t,void 0,arguments)},filter(n,t){return pn(this,"filter",n,t,e=>e.map(ce),arguments)},find(n,t){return pn(this,"find",n,t,ce,arguments)},findIndex(n,t){return pn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return pn(this,"findLast",n,t,ce,arguments)},findLastIndex(n,t){return pn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return pn(this,"forEach",n,t,void 0,arguments)},includes(...n){return dh(this,"includes",n)},indexOf(...n){return dh(this,"indexOf",n)},join(n){return zr(this).join(n)},lastIndexOf(...n){return dh(this,"lastIndexOf",n)},map(n,t){return pn(this,"map",n,t,void 0,arguments)},pop(){return Ns(this,"pop")},push(...n){return Ns(this,"push",n)},reduce(n,...t){return Lm(this,"reduce",n,t)},reduceRight(n,...t){return Lm(this,"reduceRight",n,t)},shift(){return Ns(this,"shift")},some(n,t){return pn(this,"some",n,t,void 0,arguments)},splice(...n){return Ns(this,"splice",n)},toReversed(){return zr(this).toReversed()},toSorted(n){return zr(this).toSorted(n)},toSpliced(...n){return zr(this).toSpliced(...n)},unshift(...n){return Ns(this,"unshift",n)},values(){return fh(this,"values",ce)}};function fh(n,t,e){const r=lh(n),s=r[t]();return r!==n&&!pe(n)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=e(i.value)),i}),s}const YS=Array.prototype;function pn(n,t,e,r,s,i){const o=lh(n),a=o!==n&&!pe(n),c=o[t];if(c!==YS[t]){const l=c.apply(n,i);return a?ce(l):l}let h=e;o!==n&&(a?h=function(l,d){return e.call(this,ce(l),d,n)}:e.length>2&&(h=function(l,d){return e.call(this,l,d,n)}));const u=c.call(o,h,r);return a&&s?s(u):u}function Lm(n,t,e,r){const s=lh(n);let i=e;return s!==n&&(pe(n)?e.length>3&&(i=function(o,a,c){return e.call(this,o,a,c,n)}):i=function(o,a,c){return e.call(this,o,ce(a),c,n)}),s[t](i,...r)}function dh(n,t,e){const r=xt(n);ie(r,"iterate",Ls);const s=r[t](...e);return(s===-1||s===!1)&&s_(e[0])?(e[0]=xt(e[0]),r[t](...e)):s}function Ns(n,t,e=[]){uo(),sh();const r=xt(n)[t].apply(n,e);return ih(),lo(),r}const jS=OS("__proto__,__v_isRef,__isVue"),Nm=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Os));function GS(n){Os(n)||(n=String(n));const t=xt(this);return ie(t,"has",n),t.hasOwnProperty(n)}class zm{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,r){if(e==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(e==="__v_isReactive")return!s;if(e==="__v_isReadonly")return s;if(e==="__v_isShallow")return i;if(e==="__v_raw")return r===(s?i?Um:$m:i?e_:Bm).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=re(t);if(!s){let c;if(o&&(c=US[e]))return c;if(e==="hasOwnProperty")return GS}const a=Reflect.get(t,e,ge(t)?t:r);return(Os(e)?Nm.has(e):jS(e))||(s||ie(t,"get",e),i)?a:ge(a)?o&&nh(e)?a:a.value:Ze(a)?s?gh(a):Ym(a):a}}class XS extends zm{constructor(t=!1){super(!1,t)}set(t,e,r,s){let i=t[e];if(!this._isShallow){const c=gn(i);if(!pe(r)&&!gn(r)&&(i=xt(i),r=xt(r)),!re(t)&&ge(i)&&!ge(r))return c?!1:(i.value=r,!0)}const o=re(t)&&nh(e)?Number(e)<t.length:Ut(t,e),a=Reflect.set(t,e,r,ge(t)?t:s);return t===xt(s)&&(o?Nn(r,i)&&zn(t,"set",e,r,i):zn(t,"add",e,r)),a}deleteProperty(t,e){const r=Ut(t,e),s=t[e],i=Reflect.deleteProperty(t,e);return i&&r&&zn(t,"delete",e,void 0,s),i}has(t,e){const r=Reflect.has(t,e);return(!Os(e)||!Nm.has(e))&&ie(t,"has",e),r}ownKeys(t){return ie(t,"iterate",re(t)?"length":ur),Reflect.ownKeys(t)}}class Vm extends zm{constructor(t=!1){super(!0,t)}set(t,e){return{}.NODE_ENV!=="production"&&mn(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0}deleteProperty(t,e){return{}.NODE_ENV!=="production"&&mn(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}}const WS=new XS,HS=new Vm,qS=new Vm(!0),mh=n=>n,fo=n=>Reflect.getPrototypeOf(n);function KS(n,t,e){return function(...r){const s=this.__v_raw,i=xt(s),o=Nr(i),a=n==="entries"||n===Symbol.iterator&&o,c=n==="keys"&&o,h=s[n](...r),u=e?mh:t?bh:ce;return!t&&ie(i,"iterate",c?uh:ur),{next(){const{value:l,done:d}=h.next();return d?{value:l,done:d}:{value:a?[u(l[0]),u(l[1])]:u(l),done:d}},[Symbol.iterator](){return this}}}}function mo(n){return function(...t){if({}.NODE_ENV!=="production"){const e=t[0]?`on key "${t[0]}" `:"";mn(`${zS(n)} operation ${e}failed: target is readonly.`,xt(this))}return n==="delete"?!1:n==="clear"?void 0:this}}function JS(n,t){const e={get(s){const i=this.__v_raw,o=xt(i),a=xt(s);n||(Nn(s,a)&&ie(o,"get",s),ie(o,"get",a));const{has:c}=fo(o),h=t?mh:n?bh:ce;if(c.call(o,s))return h(i.get(s));if(c.call(o,a))return h(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!n&&ie(xt(s),"iterate",ur),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=xt(i),a=xt(s);return n||(Nn(s,a)&&ie(o,"has",s),ie(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,c=xt(a),h=t?mh:n?bh:ce;return!n&&ie(c,"iterate",ur),a.forEach((u,l)=>s.call(i,h(u),h(l),o))}};return Be(e,n?{add:mo("add"),set:mo("set"),delete:mo("delete"),clear:mo("clear")}:{add(s){!t&&!pe(s)&&!gn(s)&&(s=xt(s));const i=xt(this);return fo(i).has.call(i,s)||(i.add(s),zn(i,"add",s,s)),this},set(s,i){!t&&!pe(i)&&!gn(i)&&(i=xt(i));const o=xt(this),{has:a,get:c}=fo(o);let h=a.call(o,s);h?{}.NODE_ENV!=="production"&&Fm(o,a,s):(s=xt(s),h=a.call(o,s));const u=c.call(o,s);return o.set(s,i),h?Nn(i,u)&&zn(o,"set",s,i,u):zn(o,"add",s,i),this},delete(s){const i=xt(this),{has:o,get:a}=fo(i);let c=o.call(i,s);c?{}.NODE_ENV!=="production"&&Fm(i,o,s):(s=xt(s),c=o.call(i,s));const h=a?a.call(i,s):void 0,u=i.delete(s);return c&&zn(i,"delete",s,void 0,h),u},clear(){const s=xt(this),i=s.size!==0,o={}.NODE_ENV!=="production"?Nr(s)?new Map(s):new Set(s):void 0,a=s.clear();return i&&zn(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=KS(s,n,t)}),e}function ph(n,t){const e=JS(n,t);return(r,s,i)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?r:Reflect.get(Ut(e,s)&&s in r?e:r,s,i)}const ZS={get:ph(!1,!1)},QS={get:ph(!0,!1)},t_={get:ph(!0,!0)};function Fm(n,t,e){const r=xt(e);if(r!==e&&t.call(n,r)){const s=Cm(n);mn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Bm=new WeakMap,e_=new WeakMap,$m=new WeakMap,Um=new WeakMap;function n_(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function r_(n){return n.__v_skip||!Object.isExtensible(n)?0:n_(Cm(n))}function Ym(n){return gn(n)?n:yh(n,!1,WS,ZS,Bm)}function gh(n){return yh(n,!0,HS,QS,$m)}function po(n){return yh(n,!0,qS,t_,Um)}function yh(n,t,e,r,s){if(!Ze(n))return{}.NODE_ENV!=="production"&&mn(`value cannot be made ${t?"readonly":"reactive"}: ${String(n)}`),n;if(n.__v_raw&&!(t&&n.__v_isReactive))return n;const i=s.get(n);if(i)return i;const o=r_(n);if(o===0)return n;const a=new Proxy(n,o===2?r:e);return s.set(n,a),a}function Vr(n){return gn(n)?Vr(n.__v_raw):!!(n&&n.__v_isReactive)}function gn(n){return!!(n&&n.__v_isReadonly)}function pe(n){return!!(n&&n.__v_isShallow)}function s_(n){return n?!!n.__v_raw:!1}function xt(n){const t=n&&n.__v_raw;return t?xt(t):n}function i_(n){return!Ut(n,"__v_skip")&&Object.isExtensible(n)&&VS(n,"__v_skip",!0),n}const ce=n=>Ze(n)?Ym(n):n,bh=n=>Ze(n)?gh(n):n;function ge(n){return n?n.__v_isRef===!0:!1}function jm(n){return Gm(n,!1)}function o_(n){return Gm(n,!0)}function Gm(n,t){return ge(n)?n:new a_(n,t)}class a_{constructor(t,e){this.dep=new ch,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:xt(t),this._value=e?t:ce(t),this.__v_isShallow=e}get value(){return{}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const e=this._rawValue,r=this.__v_isShallow||pe(t)||gn(t);t=r?t:xt(t),Nn(t,e)&&(this._rawValue=t,this._value=r?t:ce(t),{}.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:e}):this.dep.trigger())}}function c_(n){return ge(n)?n.value:n}const h_={get:(n,t,e)=>t==="__v_raw"?n:c_(Reflect.get(n,t,e)),set:(n,t,e,r)=>{const s=n[t];return ge(s)&&!ge(e)?(s.value=e,!0):Reflect.set(n,t,e,r)}};function u_(n){return Vr(n)?n:new Proxy(n,h_)}class l_{constructor(t,e,r){this.fn=t,this.setter=e,this._value=void 0,this.dep=new ch(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ks-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&_t!==this)return Am(this,!0),!0}get value(){const t={}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Om(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):{}.NODE_ENV!=="production"&&mn("Write operation failed: computed value is readonly")}}function f_(n,t,e=!1){let r,s;se(n)?r=n:(r=n.get,s=n.set);const i=new l_(r,s,e);return{}.NODE_ENV!=="production"&&t&&!e&&(i.onTrack=t.onTrack,i.onTrigger=t.onTrigger),i}const go={},yo=new WeakMap;let lr;function d_(n,t=!1,e=lr){if(e){let r=yo.get(e);r||yo.set(e,r=[]),r.push(n)}else({}).NODE_ENV!=="production"&&!t&&mn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function m_(n,t,e=Ie){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:c}=e,h=v=>{(e.onWarn||mn)("Invalid watch source: ",v,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=v=>s?v:pe(v)||s===!1||s===0?Vn(v,1):Vn(v);let l,d,f,p,m=!1,b=!1;if(ge(n)?(d=()=>n.value,m=pe(n)):Vr(n)?(d=()=>u(n),m=!0):re(n)?(b=!0,m=n.some(v=>Vr(v)||pe(v)),d=()=>n.map(v=>{if(ge(v))return v.value;if(Vr(v))return u(v);if(se(v))return c?c(v,2):v();({}).NODE_ENV!=="production"&&h(v)})):se(n)?t?d=c?()=>c(n,2):n:d=()=>{if(f){uo();try{f()}finally{lo()}}const v=lr;lr=l;try{return c?c(n,3,[p]):n(p)}finally{lr=v}}:(d=Ds,{}.NODE_ENV!=="production"&&h(n)),t&&s){const v=d,E=s===!0?1/0:s;d=()=>Vn(v(),E)}const g=()=>{l.stop()};if(i&&t){const v=t;t=(...E)=>{v(...E),g()}}let w=b?new Array(n.length).fill(go):go;const x=v=>{if(!(!(l.flags&1)||!l.dirty&&!v))if(t){const E=l.run();if(s||m||(b?E.some((_,D)=>Nn(_,w[D])):Nn(E,w))){f&&f();const _=lr;lr=l;try{const D=[E,w===go?void 0:b&&w[0]===go?[]:w,p];c?c(t,3,D):t(...D),w=E}finally{lr=_}}}else l.run()};return a&&a(x),l=new FS(d),l.scheduler=o?()=>o(x,!1):x,p=v=>d_(v,!1,l),f=l.onStop=()=>{const v=yo.get(l);if(v){if(c)c(v,4);else for(const E of v)E();yo.delete(l)}},{}.NODE_ENV!=="production"&&(l.onTrack=e.onTrack,l.onTrigger=e.onTrigger),t?r?x(!0):w=l.run():o?o(x.bind(null,!0),!0):l.run(),g.pause=l.pause.bind(l),g.resume=l.resume.bind(l),g.stop=g,g}function Vn(n,t=1/0,e){if(t<=0||!Ze(n)||n.__v_skip||(e=e||new Set,e.has(n)))return n;if(e.add(n),t--,ge(n))Vn(n.value,t,e);else if(re(n))for(let r=0;r<n.length;r++)Vn(n[r],t,e);else if(RS(n)||Nr(n))n.forEach(r=>{Vn(r,t,e)});else if(NS(n)){for(const r in n)Vn(n[r],t,e);for(const r of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Vn(n[r],t,e)}return n}/**
67
+ **/function mn(n,...t){console.warn(`[Vue warn] ${n}`,...t)}let _t;const sh=new WeakSet;class BS{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,sh.has(this)&&(sh.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Mm(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,km(this),Dm(this);const t=_t,e=$e;_t=this,$e=!0;try{return this.fn()}finally{({}).NODE_ENV!=="production"&&_t!==this&&mn("Active effect was not restored correctly - this is likely a Vue internal bug."),Om(this),_t=t,$e=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ch(t);this.deps=this.depsTail=void 0,km(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?sh.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ah(this)&&this.run()}get dirty(){return ah(this)}}let Am=0,Is,Rs;function Mm(n,t=!1){if(n.flags|=8,t){n.next=Rs,Rs=n;return}n.next=Is,Is=n}function ih(){Am++}function oh(){if(--Am>0)return;if(Rs){let t=Rs;for(Rs=void 0;t;){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Is;){let t=Is;for(Is=void 0;t;){const e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){n||(n=r)}t=e}}if(n)throw n}function Dm(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Om(n){let t,e=n.depsTail,r=e;for(;r;){const s=r.prevDep;r.version===-1?(r===e&&(e=s),ch(r),$S(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}n.deps=t,n.depsTail=e}function ah(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Im(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function Im(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===ks))return;n.globalVersion=ks;const t=n.dep;if(n.flags|=2,t.version>0&&!n.isSSR&&n.deps&&!ah(n)){n.flags&=-3;return}const e=_t,r=$e;_t=n,$e=!0;try{Dm(n);const s=n.fn(n._value);(t.version===0||Nn(s,n._value))&&(n._value=s,t.version++)}catch(s){throw t.version++,s}finally{_t=e,$e=r,Om(n),n.flags&=-3}}function ch(n,t=!1){const{dep:e,prevSub:r,nextSub:s}=n;if(r&&(r.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=r,n.nextSub=void 0),{}.NODE_ENV!=="production"&&e.subsHead===n&&(e.subsHead=s),e.subs===n&&(e.subs=r,!r&&e.computed)){e.computed.flags&=-5;for(let i=e.computed.deps;i;i=i.nextDep)ch(i,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function $S(n){const{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}let $e=!0;const Rm=[];function uo(){Rm.push($e),$e=!1}function lo(){const n=Rm.pop();$e=n===void 0?!0:n}function km(n){const{cleanup:t}=n;if(n.cleanup=void 0,t){const e=_t;_t=void 0;try{t()}finally{_t=e}}}let ks=0;class US{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hh{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,{}.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!_t||!$e||_t===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==_t)e=this.activeLink=new US(_t,this),_t.deps?(e.prevDep=_t.depsTail,_t.depsTail.nextDep=e,_t.depsTail=e):_t.deps=_t.depsTail=e,Lm(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){const r=e.nextDep;r.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=r),e.prevDep=_t.depsTail,e.nextDep=void 0,_t.depsTail.nextDep=e,_t.depsTail=e,_t.deps===e&&(_t.deps=r)}return{}.NODE_ENV!=="production"&&_t.onTrack&&_t.onTrack(Be({effect:_t},t)),e}trigger(t){this.version++,ks++,this.notify(t)}notify(t){ih();try{if({}.NODE_ENV!=="production")for(let e=this.subsHead;e;e=e.nextSub)e.sub.onTrigger&&!(e.sub.flags&8)&&e.sub.onTrigger(Be({effect:e.sub},t));for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{oh()}}}function Lm(n){if(n.dep.sc++,n.sub.flags&4){const t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Lm(r)}const e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),{}.NODE_ENV!=="production"&&n.dep.subsHead===void 0&&(n.dep.subsHead=n),n.dep.subs=n}}const uh=new WeakMap,ur=Symbol({}.NODE_ENV!=="production"?"Object iterate":""),lh=Symbol({}.NODE_ENV!=="production"?"Map keys iterate":""),Ls=Symbol({}.NODE_ENV!=="production"?"Array iterate":"");function ie(n,t,e){if($e&&_t){let r=uh.get(n);r||uh.set(n,r=new Map);let s=r.get(e);s||(r.set(e,s=new hh),s.map=r,s.key=e),{}.NODE_ENV!=="production"?s.track({target:n,type:t,key:e}):s.track()}}function zn(n,t,e,r,s,i){const o=uh.get(n);if(!o){ks++;return}const a=c=>{c&&({}.NODE_ENV!=="production"?c.trigger({target:n,type:t,key:e,newValue:r,oldValue:s,oldTarget:i}):c.trigger())};if(ih(),t==="clear")o.forEach(a);else{const c=re(n),h=c&&rh(e);if(c&&e==="length"){const u=Number(r);o.forEach((l,d)=>{(d==="length"||d===Ls||!Os(d)&&d>=u)&&a(l)})}else switch((e!==void 0||o.has(void 0))&&a(o.get(e)),h&&a(o.get(Ls)),t){case"add":c?h&&a(o.get("length")):(a(o.get(ur)),Nr(n)&&a(o.get(lh)));break;case"delete":c||(a(o.get(ur)),Nr(n)&&a(o.get(lh)));break;case"set":Nr(n)&&a(o.get(ur));break}}oh()}function zr(n){const t=xt(n);return t===n?t:(ie(t,"iterate",Ls),pe(n)?t:t.map(ce))}function fh(n){return ie(n=xt(n),"iterate",Ls),n}const YS={__proto__:null,[Symbol.iterator](){return dh(this,Symbol.iterator,ce)},concat(...n){return zr(this).concat(...n.map(t=>re(t)?zr(t):t))},entries(){return dh(this,"entries",n=>(n[1]=ce(n[1]),n))},every(n,t){return pn(this,"every",n,t,void 0,arguments)},filter(n,t){return pn(this,"filter",n,t,e=>e.map(ce),arguments)},find(n,t){return pn(this,"find",n,t,ce,arguments)},findIndex(n,t){return pn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return pn(this,"findLast",n,t,ce,arguments)},findLastIndex(n,t){return pn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return pn(this,"forEach",n,t,void 0,arguments)},includes(...n){return mh(this,"includes",n)},indexOf(...n){return mh(this,"indexOf",n)},join(n){return zr(this).join(n)},lastIndexOf(...n){return mh(this,"lastIndexOf",n)},map(n,t){return pn(this,"map",n,t,void 0,arguments)},pop(){return Ns(this,"pop")},push(...n){return Ns(this,"push",n)},reduce(n,...t){return Nm(this,"reduce",n,t)},reduceRight(n,...t){return Nm(this,"reduceRight",n,t)},shift(){return Ns(this,"shift")},some(n,t){return pn(this,"some",n,t,void 0,arguments)},splice(...n){return Ns(this,"splice",n)},toReversed(){return zr(this).toReversed()},toSorted(n){return zr(this).toSorted(n)},toSpliced(...n){return zr(this).toSpliced(...n)},unshift(...n){return Ns(this,"unshift",n)},values(){return dh(this,"values",ce)}};function dh(n,t,e){const r=fh(n),s=r[t]();return r!==n&&!pe(n)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=e(i.value)),i}),s}const jS=Array.prototype;function pn(n,t,e,r,s,i){const o=fh(n),a=o!==n&&!pe(n),c=o[t];if(c!==jS[t]){const l=c.apply(n,i);return a?ce(l):l}let h=e;o!==n&&(a?h=function(l,d){return e.call(this,ce(l),d,n)}:e.length>2&&(h=function(l,d){return e.call(this,l,d,n)}));const u=c.call(o,h,r);return a&&s?s(u):u}function Nm(n,t,e,r){const s=fh(n);let i=e;return s!==n&&(pe(n)?e.length>3&&(i=function(o,a,c){return e.call(this,o,a,c,n)}):i=function(o,a,c){return e.call(this,o,ce(a),c,n)}),s[t](i,...r)}function mh(n,t,e){const r=xt(n);ie(r,"iterate",Ls);const s=r[t](...e);return(s===-1||s===!1)&&i_(e[0])?(e[0]=xt(e[0]),r[t](...e)):s}function Ns(n,t,e=[]){uo(),ih();const r=xt(n)[t].apply(n,e);return oh(),lo(),r}const GS=IS("__proto__,__v_isRef,__isVue"),zm=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Os));function XS(n){Os(n)||(n=String(n));const t=xt(this);return ie(t,"has",n),t.hasOwnProperty(n)}class Vm{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,r){if(e==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(e==="__v_isReactive")return!s;if(e==="__v_isReadonly")return s;if(e==="__v_isShallow")return i;if(e==="__v_raw")return r===(s?i?Ym:Um:i?n_:$m).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=re(t);if(!s){let c;if(o&&(c=YS[e]))return c;if(e==="hasOwnProperty")return XS}const a=Reflect.get(t,e,ge(t)?t:r);return(Os(e)?zm.has(e):GS(e))||(s||ie(t,"get",e),i)?a:ge(a)?o&&rh(e)?a:a.value:Ze(a)?s?yh(a):jm(a):a}}class WS extends Vm{constructor(t=!1){super(!1,t)}set(t,e,r,s){let i=t[e];if(!this._isShallow){const c=gn(i);if(!pe(r)&&!gn(r)&&(i=xt(i),r=xt(r)),!re(t)&&ge(i)&&!ge(r))return c?!1:(i.value=r,!0)}const o=re(t)&&rh(e)?Number(e)<t.length:Ut(t,e),a=Reflect.set(t,e,r,ge(t)?t:s);return t===xt(s)&&(o?Nn(r,i)&&zn(t,"set",e,r,i):zn(t,"add",e,r)),a}deleteProperty(t,e){const r=Ut(t,e),s=t[e],i=Reflect.deleteProperty(t,e);return i&&r&&zn(t,"delete",e,void 0,s),i}has(t,e){const r=Reflect.has(t,e);return(!Os(e)||!zm.has(e))&&ie(t,"has",e),r}ownKeys(t){return ie(t,"iterate",re(t)?"length":ur),Reflect.ownKeys(t)}}class Fm extends Vm{constructor(t=!1){super(!0,t)}set(t,e){return{}.NODE_ENV!=="production"&&mn(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0}deleteProperty(t,e){return{}.NODE_ENV!=="production"&&mn(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}}const HS=new WS,qS=new Fm,KS=new Fm(!0),ph=n=>n,fo=n=>Reflect.getPrototypeOf(n);function JS(n,t,e){return function(...r){const s=this.__v_raw,i=xt(s),o=Nr(i),a=n==="entries"||n===Symbol.iterator&&o,c=n==="keys"&&o,h=s[n](...r),u=e?ph:t?vh:ce;return!t&&ie(i,"iterate",c?lh:ur),{next(){const{value:l,done:d}=h.next();return d?{value:l,done:d}:{value:a?[u(l[0]),u(l[1])]:u(l),done:d}},[Symbol.iterator](){return this}}}}function mo(n){return function(...t){if({}.NODE_ENV!=="production"){const e=t[0]?`on key "${t[0]}" `:"";mn(`${VS(n)} operation ${e}failed: target is readonly.`,xt(this))}return n==="delete"?!1:n==="clear"?void 0:this}}function ZS(n,t){const e={get(s){const i=this.__v_raw,o=xt(i),a=xt(s);n||(Nn(s,a)&&ie(o,"get",s),ie(o,"get",a));const{has:c}=fo(o),h=t?ph:n?vh:ce;if(c.call(o,s))return h(i.get(s));if(c.call(o,a))return h(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!n&&ie(xt(s),"iterate",ur),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=xt(i),a=xt(s);return n||(Nn(s,a)&&ie(o,"has",s),ie(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,c=xt(a),h=t?ph:n?vh:ce;return!n&&ie(c,"iterate",ur),a.forEach((u,l)=>s.call(i,h(u),h(l),o))}};return Be(e,n?{add:mo("add"),set:mo("set"),delete:mo("delete"),clear:mo("clear")}:{add(s){!t&&!pe(s)&&!gn(s)&&(s=xt(s));const i=xt(this);return fo(i).has.call(i,s)||(i.add(s),zn(i,"add",s,s)),this},set(s,i){!t&&!pe(i)&&!gn(i)&&(i=xt(i));const o=xt(this),{has:a,get:c}=fo(o);let h=a.call(o,s);h?{}.NODE_ENV!=="production"&&Bm(o,a,s):(s=xt(s),h=a.call(o,s));const u=c.call(o,s);return o.set(s,i),h?Nn(i,u)&&zn(o,"set",s,i,u):zn(o,"add",s,i),this},delete(s){const i=xt(this),{has:o,get:a}=fo(i);let c=o.call(i,s);c?{}.NODE_ENV!=="production"&&Bm(i,o,s):(s=xt(s),c=o.call(i,s));const h=a?a.call(i,s):void 0,u=i.delete(s);return c&&zn(i,"delete",s,void 0,h),u},clear(){const s=xt(this),i=s.size!==0,o={}.NODE_ENV!=="production"?Nr(s)?new Map(s):new Set(s):void 0,a=s.clear();return i&&zn(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=JS(s,n,t)}),e}function gh(n,t){const e=ZS(n,t);return(r,s,i)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?r:Reflect.get(Ut(e,s)&&s in r?e:r,s,i)}const QS={get:gh(!1,!1)},t_={get:gh(!0,!1)},e_={get:gh(!0,!0)};function Bm(n,t,e){const r=xt(e);if(r!==e&&t.call(n,r)){const s=Tm(n);mn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const $m=new WeakMap,n_=new WeakMap,Um=new WeakMap,Ym=new WeakMap;function r_(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function s_(n){return n.__v_skip||!Object.isExtensible(n)?0:r_(Tm(n))}function jm(n){return gn(n)?n:bh(n,!1,HS,QS,$m)}function yh(n){return bh(n,!0,qS,t_,Um)}function po(n){return bh(n,!0,KS,e_,Ym)}function bh(n,t,e,r,s){if(!Ze(n))return{}.NODE_ENV!=="production"&&mn(`value cannot be made ${t?"readonly":"reactive"}: ${String(n)}`),n;if(n.__v_raw&&!(t&&n.__v_isReactive))return n;const i=s.get(n);if(i)return i;const o=s_(n);if(o===0)return n;const a=new Proxy(n,o===2?r:e);return s.set(n,a),a}function Vr(n){return gn(n)?Vr(n.__v_raw):!!(n&&n.__v_isReactive)}function gn(n){return!!(n&&n.__v_isReadonly)}function pe(n){return!!(n&&n.__v_isShallow)}function i_(n){return n?!!n.__v_raw:!1}function xt(n){const t=n&&n.__v_raw;return t?xt(t):n}function o_(n){return!Ut(n,"__v_skip")&&Object.isExtensible(n)&&FS(n,"__v_skip",!0),n}const ce=n=>Ze(n)?jm(n):n,vh=n=>Ze(n)?yh(n):n;function ge(n){return n?n.__v_isRef===!0:!1}function Gm(n){return Xm(n,!1)}function a_(n){return Xm(n,!0)}function Xm(n,t){return ge(n)?n:new c_(n,t)}class c_{constructor(t,e){this.dep=new hh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:xt(t),this._value=e?t:ce(t),this.__v_isShallow=e}get value(){return{}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const e=this._rawValue,r=this.__v_isShallow||pe(t)||gn(t);t=r?t:xt(t),Nn(t,e)&&(this._rawValue=t,this._value=r?t:ce(t),{}.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:e}):this.dep.trigger())}}function h_(n){return ge(n)?n.value:n}const u_={get:(n,t,e)=>t==="__v_raw"?n:h_(Reflect.get(n,t,e)),set:(n,t,e,r)=>{const s=n[t];return ge(s)&&!ge(e)?(s.value=e,!0):Reflect.set(n,t,e,r)}};function l_(n){return Vr(n)?n:new Proxy(n,u_)}class f_{constructor(t,e,r){this.fn=t,this.setter=e,this._value=void 0,this.dep=new hh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ks-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!e,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&_t!==this)return Mm(this,!0),!0}get value(){const t={}.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Im(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):{}.NODE_ENV!=="production"&&mn("Write operation failed: computed value is readonly")}}function d_(n,t,e=!1){let r,s;se(n)?r=n:(r=n.get,s=n.set);const i=new f_(r,s,e);return{}.NODE_ENV!=="production"&&t&&!e&&(i.onTrack=t.onTrack,i.onTrigger=t.onTrigger),i}const go={},yo=new WeakMap;let lr;function m_(n,t=!1,e=lr){if(e){let r=yo.get(e);r||yo.set(e,r=[]),r.push(n)}else({}).NODE_ENV!=="production"&&!t&&mn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function p_(n,t,e=Ie){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:c}=e,h=v=>{(e.onWarn||mn)("Invalid watch source: ",v,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=v=>s?v:pe(v)||s===!1||s===0?Vn(v,1):Vn(v);let l,d,f,p,m=!1,b=!1;if(ge(n)?(d=()=>n.value,m=pe(n)):Vr(n)?(d=()=>u(n),m=!0):re(n)?(b=!0,m=n.some(v=>Vr(v)||pe(v)),d=()=>n.map(v=>{if(ge(v))return v.value;if(Vr(v))return u(v);if(se(v))return c?c(v,2):v();({}).NODE_ENV!=="production"&&h(v)})):se(n)?t?d=c?()=>c(n,2):n:d=()=>{if(f){uo();try{f()}finally{lo()}}const v=lr;lr=l;try{return c?c(n,3,[p]):n(p)}finally{lr=v}}:(d=Ds,{}.NODE_ENV!=="production"&&h(n)),t&&s){const v=d,E=s===!0?1/0:s;d=()=>Vn(v(),E)}const g=()=>{l.stop()};if(i&&t){const v=t;t=(...E)=>{v(...E),g()}}let w=b?new Array(n.length).fill(go):go;const x=v=>{if(!(!(l.flags&1)||!l.dirty&&!v))if(t){const E=l.run();if(s||m||(b?E.some((_,D)=>Nn(_,w[D])):Nn(E,w))){f&&f();const _=lr;lr=l;try{const D=[E,w===go?void 0:b&&w[0]===go?[]:w,p];c?c(t,3,D):t(...D),w=E}finally{lr=_}}}else l.run()};return a&&a(x),l=new BS(d),l.scheduler=o?()=>o(x,!1):x,p=v=>m_(v,!1,l),f=l.onStop=()=>{const v=yo.get(l);if(v){if(c)c(v,4);else for(const E of v)E();yo.delete(l)}},{}.NODE_ENV!=="production"&&(l.onTrack=e.onTrack,l.onTrigger=e.onTrigger),t?r?x(!0):w=l.run():o?o(x.bind(null,!0),!0):l.run(),g.pause=l.pause.bind(l),g.resume=l.resume.bind(l),g.stop=g,g}function Vn(n,t=1/0,e){if(t<=0||!Ze(n)||n.__v_skip||(e=e||new Set,e.has(n)))return n;if(e.add(n),t--,ge(n))Vn(n.value,t,e);else if(re(n))for(let r=0;r<n.length;r++)Vn(n[r],t,e);else if(kS(n)||Nr(n))n.forEach(r=>{Vn(r,t,e)});else if(zS(n)){for(const r in n)Vn(n[r],t,e);for(const r of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Vn(n[r],t,e)}return n}/**
68
68
  * @vue/runtime-core v3.5.13
69
69
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
70
70
  * @license MIT
71
- **/const fr=[];function p_(n){fr.push(n)}function g_(){fr.pop()}let vh=!1;function Kt(n,...t){if(vh)return;vh=!0,uo();const e=fr.length?fr[fr.length-1].component:null,r=e&&e.appContext.config.warnHandler,s=y_();if(r)bo(r,e,11,[n+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),e&&e.proxy,s.map(({vnode:i})=>`at <${lp(e,i.type)}>`).join(`
71
+ **/const fr=[];function g_(n){fr.push(n)}function y_(){fr.pop()}let wh=!1;function Kt(n,...t){if(wh)return;wh=!0,uo();const e=fr.length?fr[fr.length-1].component:null,r=e&&e.appContext.config.warnHandler,s=b_();if(r)bo(r,e,11,[n+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),e&&e.proxy,s.map(({vnode:i})=>`at <${fp(e,i.type)}>`).join(`
72
72
  `),s]);else{const i=[`[Vue warn]: ${n}`,...t];s.length&&i.push(`
73
- `,...b_(s)),console.warn(...i)}lo(),vh=!1}function y_(){let n=fr[fr.length-1];if(!n)return[];const t=[];for(;n;){const e=t[0];e&&e.vnode===n?e.recurseCount++:t.push({vnode:n,recurseCount:0});const r=n.component&&n.component.parent;n=r&&r.vnode}return t}function b_(n){const t=[];return n.forEach((e,r)=>{t.push(...r===0?[]:[`
74
- `],...v_(e))}),t}function v_({vnode:n,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",r=n.component?n.component.parent==null:!1,s=` at <${lp(n.component,n.type,r)}`,i=">"+e;return n.props?[s,...w_(n.props),i]:[s+i]}function w_(n){const t=[],e=Object.keys(n);return e.slice(0,3).forEach(r=>{t.push(...Xm(r,n[r]))}),e.length>3&&t.push(" ..."),t}function Xm(n,t,e){return ao(t)?(t=JSON.stringify(t),e?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${n}=${t}`]:ge(t)?(t=Xm(n,xt(t.value),!0),e?t:[`${n}=Ref<`,t,">"]):se(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=xt(t),e?t:[`${n}=`,t])}const Wm={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function bo(n,t,e,r){try{return r?n(...r):n()}catch(s){wh(s,t,e)}}function Hm(n,t,e,r){if(se(n)){const s=bo(n,t,e,r);return s&&kS(s)&&s.catch(i=>{wh(i,t,e)}),s}if(re(n)){const s=[];for(let i=0;i<n.length;i++)s.push(Hm(n[i],t,e,r));return s}else({}).NODE_ENV!=="production"&&Kt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof n}`)}function wh(n,t,e,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ie;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?Wm[e]:`https://vuejs.org/error-reference/#runtime-${e}`;for(;a;){const u=a.ec;if(u){for(let l=0;l<u.length;l++)if(u[l](n,c,h)===!1)return}a=a.parent}if(i){uo(),bo(i,null,10,[n,c,h]),lo();return}}x_(n,e,s,r,o)}function x_(n,t,e,r=!0,s=!1){if({}.NODE_ENV!=="production"){const i=Wm[t];if(e&&p_(e),Kt(`Unhandled error${i?` during execution of ${i}`:""}`),e&&g_(),r)throw n;console.error(n)}else{if(s)throw n;console.error(n)}}const Re=[];let yn=-1;const Fr=[];let Fn=null,Br=0;const qm=Promise.resolve();let vo=null;const S_=100;function Km(n){const t=vo||qm;return n?t.then(this?n.bind(this):n):t}function __(n){let t=yn+1,e=Re.length;for(;t<e;){const r=t+e>>>1,s=Re[r],i=zs(s);i<n||i===n&&s.flags&2?t=r+1:e=r}return t}function xh(n){if(!(n.flags&1)){const t=zs(n),e=Re[Re.length-1];!e||!(n.flags&2)&&t>=zs(e)?Re.push(n):Re.splice(__(t),0,n),n.flags|=1,Jm()}}function Jm(){vo||(vo=qm.then(Qm))}function Zm(n){re(n)?Fr.push(...n):Fn&&n.id===-1?Fn.splice(Br+1,0,n):n.flags&1||(Fr.push(n),n.flags|=1),Jm()}function E_(n){if(Fr.length){const t=[...new Set(Fr)].sort((e,r)=>zs(e)-zs(r));if(Fr.length=0,Fn){Fn.push(...t);return}for(Fn=t,{}.NODE_ENV!=="production"&&(n=n||new Map),Br=0;Br<Fn.length;Br++){const e=Fn[Br];({}).NODE_ENV!=="production"&&tp(n,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}Fn=null,Br=0}}const zs=n=>n.id==null?n.flags&2?-1:1/0:n.id;function Qm(n){({}).NODE_ENV!=="production"&&(n=n||new Map);const t={}.NODE_ENV!=="production"?e=>tp(n,e):Ds;try{for(yn=0;yn<Re.length;yn++){const e=Re[yn];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),bo(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;yn<Re.length;yn++){const e=Re[yn];e&&(e.flags&=-2)}yn=-1,Re.length=0,E_(n),vo=null,(Re.length||Fr.length)&&Qm(n)}}function tp(n,t){const e=n.get(t)||0;if(e>S_){const r=t.i,s=r&&up(r.type);return wh(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return n.set(t,e+1),!1}const Sh=new Map;({}).NODE_ENV!=="production"&&(ho().__VUE_HMR_RUNTIME__={createRecord:_h(C_),rerender:_h(T_),reload:_h(P_)});const wo=new Map;function C_(n,t){return wo.has(n)?!1:(wo.set(n,{initialDef:xo(t),instances:new Set}),!0)}function xo(n){return W_(n)?n.__vccOpts:n}function T_(n,t){const e=wo.get(n);e&&(e.initialDef.render=t,[...e.instances].forEach(r=>{t&&(r.render=t,xo(r.type).render=t),r.renderCache=[],r.update()}))}function P_(n,t){const e=wo.get(n);if(!e)return;t=xo(t),ep(e.initialDef,t);const r=[...e.instances];for(let s=0;s<r.length;s++){const i=r[s],o=xo(i.type);let a=Sh.get(o);a||(o!==e.initialDef&&ep(o,t),Sh.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(t.styles),a.delete(i)):i.parent?xh(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}Zm(()=>{Sh.clear()})}function ep(n,t){Be(n,t);for(const e in n)e!=="__file"&&!(e in t)&&delete n[e]}function _h(n){return(t,e)=>{try{return n(t,e)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let So=null;ho().requestIdleCallback,ho().cancelIdleCallback;const Eh=n=>n?Y_(n)?j_(n):Eh(n.parent):null,Vs=Be(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>({}).NODE_ENV!=="production"?po(n.props):n.props,$attrs:n=>({}).NODE_ENV!=="production"?po(n.attrs):n.attrs,$slots:n=>({}).NODE_ENV!=="production"?po(n.slots):n.slots,$refs:n=>({}).NODE_ENV!=="production"?po(n.refs):n.refs,$parent:n=>Eh(n.parent),$root:n=>Eh(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>D_(n),$forceUpdate:n=>n.f||(n.f=()=>{xh(n.update)}),$nextTick:n=>n.n||(n.n=Km.bind(n.proxy)),$watch:n=>F_.bind(n)}),A_=n=>n==="_"||n==="$",Ch=(n,t)=>n!==Ie&&!n.__isScriptSetup&&Ut(n,t),M_={get({_:n},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:c}=n;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let h;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return s[t];case 4:return e[t];case 3:return i[t]}else{if(Ch(r,t))return o[t]=1,r[t];if(s!==Ie&&Ut(s,t))return o[t]=2,s[t];if((h=n.propsOptions[0])&&Ut(h,t))return o[t]=3,i[t];if(e!==Ie&&Ut(e,t))return o[t]=4,e[t];o[t]=0}}const u=Vs[t];let l,d;if(u)return t==="$attrs"?ie(n.attrs,"get",""):{}.NODE_ENV!=="production"&&t==="$slots"&&ie(n,"get",t),u(n);if((l=a.__cssModules)&&(l=l[t]))return l;if(e!==Ie&&Ut(e,t))return o[t]=4,e[t];if(d=c.config.globalProperties,Ut(d,t))return d[t];({}).NODE_ENV!=="production"&&So&&(!ao(t)||t.indexOf("__v")!==0)&&(s!==Ie&&A_(t[0])&&Ut(s,t)?Kt(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):n===So&&Kt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:n},t,e){const{data:r,setupState:s,ctx:i}=n;return Ch(s,t)?(s[t]=e,!0):{}.NODE_ENV!=="production"&&s.__isScriptSetup&&Ut(s,t)?(Kt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Ie&&Ut(r,t)?(r[t]=e,!0):Ut(n.props,t)?({}.NODE_ENV!=="production"&&Kt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in n?({}.NODE_ENV!=="production"&&Kt(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in n.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:e}):i[t]=e,!0)},has({_:{data:n,setupState:t,accessCache:e,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!e[o]||n!==Ie&&Ut(n,o)||Ch(t,o)||(a=i[0])&&Ut(a,o)||Ut(r,o)||Ut(Vs,o)||Ut(s.config.globalProperties,o)},defineProperty(n,t,e){return e.get!=null?n._.accessCache[t]=0:Ut(e,"value")&&this.set(n,t,e.value,null),Reflect.defineProperty(n,t,e)}};({}).NODE_ENV!=="production"&&(M_.ownKeys=n=>(Kt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(n)));function np(n){return re(n)?n.reduce((t,e)=>(t[e]=null,t),{}):n}function D_(n){const t=n.type,{mixins:e,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=n.appContext,a=i.get(t);let c;return a?c=a:!s.length&&!e&&!r?c=t:(c={},s.length&&s.forEach(h=>_o(c,h,o,!0)),_o(c,t,o)),Ze(t)&&i.set(t,c),c}function _o(n,t,e,r=!1){const{mixins:s,extends:i}=t;i&&_o(n,i,e,!0),s&&s.forEach(o=>_o(n,o,e,!0));for(const o in t)if(r&&o==="expose")({}).NODE_ENV!=="production"&&Kt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=O_[o]||e&&e[o];n[o]=a?a(n[o],t[o]):t[o]}return n}const O_={data:rp,props:ip,emits:ip,methods:Fs,computed:Fs,beforeCreate:he,created:he,beforeMount:he,mounted:he,beforeUpdate:he,updated:he,beforeDestroy:he,beforeUnmount:he,destroyed:he,unmounted:he,activated:he,deactivated:he,errorCaptured:he,serverPrefetch:he,components:Fs,directives:Fs,watch:R_,provide:rp,inject:I_};function rp(n,t){return t?n?function(){return Be(se(n)?n.call(this,this):n,se(t)?t.call(this,this):t)}:t:n}function I_(n,t){return Fs(sp(n),sp(t))}function sp(n){if(re(n)){const t={};for(let e=0;e<n.length;e++)t[n[e]]=n[e];return t}return n}function he(n,t){return n?[...new Set([].concat(n,t))]:t}function Fs(n,t){return n?Be(Object.create(null),n,t):t}function ip(n,t){return n?re(n)&&re(t)?[...new Set([...n,...t])]:Be(Object.create(null),np(n),np(t??{})):t}function R_(n,t){if(!n)return t;if(!t)return n;const e=Be(Object.create(null),n);for(const r in t)e[r]=he(n[r],t[r]);return e}let k_=null;function op(n,t,e=!1){const r=Bs||So;if(r||k_){const s=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return e&&se(t)?t.call(r&&r.proxy):t;({}).NODE_ENV!=="production"&&Kt(`injection "${String(n)}" not found.`)}else({}).NODE_ENV!=="production"&&Kt("inject() can only be used inside setup() or functional components.")}const L_=$_,N_=Symbol.for("v-scx"),z_=()=>{{const n=op(N_);return n||{}.NODE_ENV!=="production"&&Kt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),n}};function V_(n,t,e){return{}.NODE_ENV!=="production"&&!se(t)&&Kt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),cp(n,t,e)}function cp(n,t,e=Ie){const{immediate:r,deep:s,flush:i,once:o}=e;({}).NODE_ENV!=="production"&&!t&&(r!==void 0&&Kt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Kt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Kt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Be({},e);({}).NODE_ENV!=="production"&&(a.onWarn=Kt);const c=t&&r||!t&&i!=="post";let h;if(Eo){if(i==="sync"){const f=z_();h=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=Ds,f.resume=Ds,f.pause=Ds,f}}const u=Bs;a.call=(f,p,m)=>Hm(f,u,p,m);let l=!1;i==="post"?a.scheduler=f=>{L_(f,u&&u.suspense)}:i!=="sync"&&(l=!0,a.scheduler=(f,p)=>{p?f():xh(f)}),a.augmentJob=f=>{t&&(f.flags|=4),l&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=m_(n,t,a);return Eo&&(h?h.push(d):c&&d()),d}function F_(n,t,e){const r=this.proxy,s=ao(n)?n.includes(".")?B_(r,n):()=>r[n]:n.bind(r,r);let i;se(t)?i=t:(i=t.handler,e=t);const o=U_(this),a=cp(s,i.bind(r),e);return o(),a}function B_(n,t){const e=t.split(".");return()=>{let r=n;for(let s=0;s<e.length&&r;s++)r=r[e[s]];return r}}function $_(n,t){t&&t.pendingBranch?re(n)?t.effects.push(...n):t.effects.push(n):Zm(n)}let Bs=null;const hp=()=>Bs||So;let Th;{const n=ho(),t=(e,r)=>{let s;return(s=n[e])||(s=n[e]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Th=t("__VUE_INSTANCE_SETTERS__",e=>Bs=e),t("__VUE_SSR_SETTERS__",e=>Eo=e)}const U_=n=>{const t=Bs;return Th(n),n.scope.on(),()=>{n.scope.off(),Th(t)}};function Y_(n){return n.vnode.shapeFlag&4}let Eo=!1;function j_(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(u_(i_(n.exposed)),{get(t,e){if(e in t)return t[e];if(e in Vs)return Vs[e](n)},has(t,e){return e in t||e in Vs}})):n.proxy}const G_=/(?:^|[-_])(\w)/g,X_=n=>n.replace(G_,t=>t.toUpperCase()).replace(/[-_]/g,"");function up(n,t=!0){return se(n)?n.displayName||n.name:n.name||t&&n.__name}function lp(n,t,e=!1){let r=up(t);if(!r&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&n&&n.parent){const s=i=>{for(const o in i)if(i[o]===t)return o};r=s(n.components||n.parent.type.components)||s(n.appContext.components)}return r?X_(r):e?"App":"Anonymous"}function W_(n){return se(n)&&"__vccOpts"in n}const fp=(n,t)=>{const e=f_(n,t,Eo);if({}.NODE_ENV!=="production"){const r=hp();r&&r.appContext.config.warnRecursiveComputed&&(e._warnRecursive=!0)}return e};function H_(){if({}.NODE_ENV==="production"||typeof window>"u")return;const n={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(l){return Ze(l)?l.__isVue?["div",n,"VueInstance"]:ge(l)?["div",{},["span",n,u(l)],"<",a("_value"in l?l._value:l),">"]:Vr(l)?["div",{},["span",n,pe(l)?"ShallowReactive":"Reactive"],"<",a(l),`>${gn(l)?" (readonly)":""}`]:gn(l)?["div",{},["span",n,pe(l)?"ShallowReadonly":"Readonly"],"<",a(l),">"]:null:null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...i(l.$)]}};function i(l){const d=[];l.type.props&&l.props&&d.push(o("props",xt(l.props))),l.setupState!==Ie&&d.push(o("setup",l.setupState)),l.data!==Ie&&d.push(o("data",xt(l.data)));const f=c(l,"computed");f&&d.push(o("computed",f));const p=c(l,"inject");return p&&d.push(o("injected",p)),d.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),d}function o(l,d){return d=Be({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",r,f+": "],a(d[f],!1)])]]:["span",{}]}function a(l,d=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",e,JSON.stringify(l)]:typeof l=="boolean"?["span",r,l]:Ze(l)?["object",{object:d?xt(l):l}]:["span",e,String(l)]}function c(l,d){const f=l.type;if(se(f))return;const p={};for(const m in l.ctx)h(f,m,d)&&(p[m]=l.ctx[m]);return p}function h(l,d,f){const p=l[f];if(re(p)&&p.includes(d)||Ze(p)&&d in p||l.extends&&h(l.extends,d,f)||l.mixins&&l.mixins.some(m=>h(m,d,f)))return!0}function u(l){return pe(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}/**
73
+ `,...v_(s)),console.warn(...i)}lo(),wh=!1}function b_(){let n=fr[fr.length-1];if(!n)return[];const t=[];for(;n;){const e=t[0];e&&e.vnode===n?e.recurseCount++:t.push({vnode:n,recurseCount:0});const r=n.component&&n.component.parent;n=r&&r.vnode}return t}function v_(n){const t=[];return n.forEach((e,r)=>{t.push(...r===0?[]:[`
74
+ `],...w_(e))}),t}function w_({vnode:n,recurseCount:t}){const e=t>0?`... (${t} recursive calls)`:"",r=n.component?n.component.parent==null:!1,s=` at <${fp(n.component,n.type,r)}`,i=">"+e;return n.props?[s,...x_(n.props),i]:[s+i]}function x_(n){const t=[],e=Object.keys(n);return e.slice(0,3).forEach(r=>{t.push(...Wm(r,n[r]))}),e.length>3&&t.push(" ..."),t}function Wm(n,t,e){return ao(t)?(t=JSON.stringify(t),e?t:[`${n}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${n}=${t}`]:ge(t)?(t=Wm(n,xt(t.value),!0),e?t:[`${n}=Ref<`,t,">"]):se(t)?[`${n}=fn${t.name?`<${t.name}>`:""}`]:(t=xt(t),e?t:[`${n}=`,t])}const Hm={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function bo(n,t,e,r){try{return r?n(...r):n()}catch(s){xh(s,t,e)}}function qm(n,t,e,r){if(se(n)){const s=bo(n,t,e,r);return s&&LS(s)&&s.catch(i=>{xh(i,t,e)}),s}if(re(n)){const s=[];for(let i=0;i<n.length;i++)s.push(qm(n[i],t,e,r));return s}else({}).NODE_ENV!=="production"&&Kt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof n}`)}function xh(n,t,e,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ie;if(t){let a=t.parent;const c=t.proxy,h={}.NODE_ENV!=="production"?Hm[e]:`https://vuejs.org/error-reference/#runtime-${e}`;for(;a;){const u=a.ec;if(u){for(let l=0;l<u.length;l++)if(u[l](n,c,h)===!1)return}a=a.parent}if(i){uo(),bo(i,null,10,[n,c,h]),lo();return}}S_(n,e,s,r,o)}function S_(n,t,e,r=!0,s=!1){if({}.NODE_ENV!=="production"){const i=Hm[t];if(e&&g_(e),Kt(`Unhandled error${i?` during execution of ${i}`:""}`),e&&y_(),r)throw n;console.error(n)}else{if(s)throw n;console.error(n)}}const Re=[];let yn=-1;const Fr=[];let Fn=null,Br=0;const Km=Promise.resolve();let vo=null;const __=100;function Jm(n){const t=vo||Km;return n?t.then(this?n.bind(this):n):t}function E_(n){let t=yn+1,e=Re.length;for(;t<e;){const r=t+e>>>1,s=Re[r],i=zs(s);i<n||i===n&&s.flags&2?t=r+1:e=r}return t}function Sh(n){if(!(n.flags&1)){const t=zs(n),e=Re[Re.length-1];!e||!(n.flags&2)&&t>=zs(e)?Re.push(n):Re.splice(E_(t),0,n),n.flags|=1,Zm()}}function Zm(){vo||(vo=Km.then(tp))}function Qm(n){re(n)?Fr.push(...n):Fn&&n.id===-1?Fn.splice(Br+1,0,n):n.flags&1||(Fr.push(n),n.flags|=1),Zm()}function C_(n){if(Fr.length){const t=[...new Set(Fr)].sort((e,r)=>zs(e)-zs(r));if(Fr.length=0,Fn){Fn.push(...t);return}for(Fn=t,{}.NODE_ENV!=="production"&&(n=n||new Map),Br=0;Br<Fn.length;Br++){const e=Fn[Br];({}).NODE_ENV!=="production"&&ep(n,e)||(e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2)}Fn=null,Br=0}}const zs=n=>n.id==null?n.flags&2?-1:1/0:n.id;function tp(n){({}).NODE_ENV!=="production"&&(n=n||new Map);const t={}.NODE_ENV!=="production"?e=>ep(n,e):Ds;try{for(yn=0;yn<Re.length;yn++){const e=Re[yn];if(e&&!(e.flags&8)){if({}.NODE_ENV!=="production"&&t(e))continue;e.flags&4&&(e.flags&=-2),bo(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2)}}}finally{for(;yn<Re.length;yn++){const e=Re[yn];e&&(e.flags&=-2)}yn=-1,Re.length=0,C_(n),vo=null,(Re.length||Fr.length)&&tp(n)}}function ep(n,t){const e=n.get(t)||0;if(e>__){const r=t.i,s=r&&lp(r.type);return xh(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return n.set(t,e+1),!1}const _h=new Map;({}).NODE_ENV!=="production"&&(ho().__VUE_HMR_RUNTIME__={createRecord:Eh(T_),rerender:Eh(P_),reload:Eh(A_)});const wo=new Map;function T_(n,t){return wo.has(n)?!1:(wo.set(n,{initialDef:xo(t),instances:new Set}),!0)}function xo(n){return H_(n)?n.__vccOpts:n}function P_(n,t){const e=wo.get(n);e&&(e.initialDef.render=t,[...e.instances].forEach(r=>{t&&(r.render=t,xo(r.type).render=t),r.renderCache=[],r.update()}))}function A_(n,t){const e=wo.get(n);if(!e)return;t=xo(t),np(e.initialDef,t);const r=[...e.instances];for(let s=0;s<r.length;s++){const i=r[s],o=xo(i.type);let a=_h.get(o);a||(o!==e.initialDef&&np(o,t),_h.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(t.styles),a.delete(i)):i.parent?Sh(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}Qm(()=>{_h.clear()})}function np(n,t){Be(n,t);for(const e in n)e!=="__file"&&!(e in t)&&delete n[e]}function Eh(n){return(t,e)=>{try{return n(t,e)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let So=null;ho().requestIdleCallback,ho().cancelIdleCallback;const Ch=n=>n?j_(n)?G_(n):Ch(n.parent):null,Vs=Be(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>({}).NODE_ENV!=="production"?po(n.props):n.props,$attrs:n=>({}).NODE_ENV!=="production"?po(n.attrs):n.attrs,$slots:n=>({}).NODE_ENV!=="production"?po(n.slots):n.slots,$refs:n=>({}).NODE_ENV!=="production"?po(n.refs):n.refs,$parent:n=>Ch(n.parent),$root:n=>Ch(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>O_(n),$forceUpdate:n=>n.f||(n.f=()=>{Sh(n.update)}),$nextTick:n=>n.n||(n.n=Jm.bind(n.proxy)),$watch:n=>B_.bind(n)}),M_=n=>n==="_"||n==="$",Th=(n,t)=>n!==Ie&&!n.__isScriptSetup&&Ut(n,t),D_={get({_:n},t){if(t==="__v_skip")return!0;const{ctx:e,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:c}=n;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let h;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return s[t];case 4:return e[t];case 3:return i[t]}else{if(Th(r,t))return o[t]=1,r[t];if(s!==Ie&&Ut(s,t))return o[t]=2,s[t];if((h=n.propsOptions[0])&&Ut(h,t))return o[t]=3,i[t];if(e!==Ie&&Ut(e,t))return o[t]=4,e[t];o[t]=0}}const u=Vs[t];let l,d;if(u)return t==="$attrs"?ie(n.attrs,"get",""):{}.NODE_ENV!=="production"&&t==="$slots"&&ie(n,"get",t),u(n);if((l=a.__cssModules)&&(l=l[t]))return l;if(e!==Ie&&Ut(e,t))return o[t]=4,e[t];if(d=c.config.globalProperties,Ut(d,t))return d[t];({}).NODE_ENV!=="production"&&So&&(!ao(t)||t.indexOf("__v")!==0)&&(s!==Ie&&M_(t[0])&&Ut(s,t)?Kt(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):n===So&&Kt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:n},t,e){const{data:r,setupState:s,ctx:i}=n;return Th(s,t)?(s[t]=e,!0):{}.NODE_ENV!=="production"&&s.__isScriptSetup&&Ut(s,t)?(Kt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Ie&&Ut(r,t)?(r[t]=e,!0):Ut(n.props,t)?({}.NODE_ENV!=="production"&&Kt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in n?({}.NODE_ENV!=="production"&&Kt(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in n.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:e}):i[t]=e,!0)},has({_:{data:n,setupState:t,accessCache:e,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!e[o]||n!==Ie&&Ut(n,o)||Th(t,o)||(a=i[0])&&Ut(a,o)||Ut(r,o)||Ut(Vs,o)||Ut(s.config.globalProperties,o)},defineProperty(n,t,e){return e.get!=null?n._.accessCache[t]=0:Ut(e,"value")&&this.set(n,t,e.value,null),Reflect.defineProperty(n,t,e)}};({}).NODE_ENV!=="production"&&(D_.ownKeys=n=>(Kt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(n)));function rp(n){return re(n)?n.reduce((t,e)=>(t[e]=null,t),{}):n}function O_(n){const t=n.type,{mixins:e,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=n.appContext,a=i.get(t);let c;return a?c=a:!s.length&&!e&&!r?c=t:(c={},s.length&&s.forEach(h=>_o(c,h,o,!0)),_o(c,t,o)),Ze(t)&&i.set(t,c),c}function _o(n,t,e,r=!1){const{mixins:s,extends:i}=t;i&&_o(n,i,e,!0),s&&s.forEach(o=>_o(n,o,e,!0));for(const o in t)if(r&&o==="expose")({}).NODE_ENV!=="production"&&Kt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=I_[o]||e&&e[o];n[o]=a?a(n[o],t[o]):t[o]}return n}const I_={data:sp,props:op,emits:op,methods:Fs,computed:Fs,beforeCreate:he,created:he,beforeMount:he,mounted:he,beforeUpdate:he,updated:he,beforeDestroy:he,beforeUnmount:he,destroyed:he,unmounted:he,activated:he,deactivated:he,errorCaptured:he,serverPrefetch:he,components:Fs,directives:Fs,watch:k_,provide:sp,inject:R_};function sp(n,t){return t?n?function(){return Be(se(n)?n.call(this,this):n,se(t)?t.call(this,this):t)}:t:n}function R_(n,t){return Fs(ip(n),ip(t))}function ip(n){if(re(n)){const t={};for(let e=0;e<n.length;e++)t[n[e]]=n[e];return t}return n}function he(n,t){return n?[...new Set([].concat(n,t))]:t}function Fs(n,t){return n?Be(Object.create(null),n,t):t}function op(n,t){return n?re(n)&&re(t)?[...new Set([...n,...t])]:Be(Object.create(null),rp(n),rp(t??{})):t}function k_(n,t){if(!n)return t;if(!t)return n;const e=Be(Object.create(null),n);for(const r in t)e[r]=he(n[r],t[r]);return e}let L_=null;function cp(n,t,e=!1){const r=Bs||So;if(r||L_){const s=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return e&&se(t)?t.call(r&&r.proxy):t;({}).NODE_ENV!=="production"&&Kt(`injection "${String(n)}" not found.`)}else({}).NODE_ENV!=="production"&&Kt("inject() can only be used inside setup() or functional components.")}const N_=U_,z_=Symbol.for("v-scx"),V_=()=>{{const n=cp(z_);return n||{}.NODE_ENV!=="production"&&Kt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),n}};function F_(n,t,e){return{}.NODE_ENV!=="production"&&!se(t)&&Kt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),hp(n,t,e)}function hp(n,t,e=Ie){const{immediate:r,deep:s,flush:i,once:o}=e;({}).NODE_ENV!=="production"&&!t&&(r!==void 0&&Kt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Kt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Kt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Be({},e);({}).NODE_ENV!=="production"&&(a.onWarn=Kt);const c=t&&r||!t&&i!=="post";let h;if(Eo){if(i==="sync"){const f=V_();h=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=Ds,f.resume=Ds,f.pause=Ds,f}}const u=Bs;a.call=(f,p,m)=>qm(f,u,p,m);let l=!1;i==="post"?a.scheduler=f=>{N_(f,u&&u.suspense)}:i!=="sync"&&(l=!0,a.scheduler=(f,p)=>{p?f():Sh(f)}),a.augmentJob=f=>{t&&(f.flags|=4),l&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=p_(n,t,a);return Eo&&(h?h.push(d):c&&d()),d}function B_(n,t,e){const r=this.proxy,s=ao(n)?n.includes(".")?$_(r,n):()=>r[n]:n.bind(r,r);let i;se(t)?i=t:(i=t.handler,e=t);const o=Y_(this),a=hp(s,i.bind(r),e);return o(),a}function $_(n,t){const e=t.split(".");return()=>{let r=n;for(let s=0;s<e.length&&r;s++)r=r[e[s]];return r}}function U_(n,t){t&&t.pendingBranch?re(n)?t.effects.push(...n):t.effects.push(n):Qm(n)}let Bs=null;const up=()=>Bs||So;let Ph;{const n=ho(),t=(e,r)=>{let s;return(s=n[e])||(s=n[e]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Ph=t("__VUE_INSTANCE_SETTERS__",e=>Bs=e),t("__VUE_SSR_SETTERS__",e=>Eo=e)}const Y_=n=>{const t=Bs;return Ph(n),n.scope.on(),()=>{n.scope.off(),Ph(t)}};function j_(n){return n.vnode.shapeFlag&4}let Eo=!1;function G_(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(l_(o_(n.exposed)),{get(t,e){if(e in t)return t[e];if(e in Vs)return Vs[e](n)},has(t,e){return e in t||e in Vs}})):n.proxy}const X_=/(?:^|[-_])(\w)/g,W_=n=>n.replace(X_,t=>t.toUpperCase()).replace(/[-_]/g,"");function lp(n,t=!0){return se(n)?n.displayName||n.name:n.name||t&&n.__name}function fp(n,t,e=!1){let r=lp(t);if(!r&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&n&&n.parent){const s=i=>{for(const o in i)if(i[o]===t)return o};r=s(n.components||n.parent.type.components)||s(n.appContext.components)}return r?W_(r):e?"App":"Anonymous"}function H_(n){return se(n)&&"__vccOpts"in n}const dp=(n,t)=>{const e=d_(n,t,Eo);if({}.NODE_ENV!=="production"){const r=up();r&&r.appContext.config.warnRecursiveComputed&&(e._warnRecursive=!0)}return e};function q_(){if({}.NODE_ENV==="production"||typeof window>"u")return;const n={style:"color:#3ba776"},t={style:"color:#1677ff"},e={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(l){return Ze(l)?l.__isVue?["div",n,"VueInstance"]:ge(l)?["div",{},["span",n,u(l)],"<",a("_value"in l?l._value:l),">"]:Vr(l)?["div",{},["span",n,pe(l)?"ShallowReactive":"Reactive"],"<",a(l),`>${gn(l)?" (readonly)":""}`]:gn(l)?["div",{},["span",n,pe(l)?"ShallowReadonly":"Readonly"],"<",a(l),">"]:null:null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...i(l.$)]}};function i(l){const d=[];l.type.props&&l.props&&d.push(o("props",xt(l.props))),l.setupState!==Ie&&d.push(o("setup",l.setupState)),l.data!==Ie&&d.push(o("data",xt(l.data)));const f=c(l,"computed");f&&d.push(o("computed",f));const p=c(l,"inject");return p&&d.push(o("injected",p)),d.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),d}function o(l,d){return d=Be({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",r,f+": "],a(d[f],!1)])]]:["span",{}]}function a(l,d=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",e,JSON.stringify(l)]:typeof l=="boolean"?["span",r,l]:Ze(l)?["object",{object:d?xt(l):l}]:["span",e,String(l)]}function c(l,d){const f=l.type;if(se(f))return;const p={};for(const m in l.ctx)h(f,m,d)&&(p[m]=l.ctx[m]);return p}function h(l,d,f){const p=l[f];if(re(p)&&p.includes(d)||Ze(p)&&d in p||l.extends&&h(l.extends,d,f)||l.mixins&&l.mixins.some(m=>h(m,d,f)))return!0}function u(l){return pe(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}/**
75
75
  * vue v3.5.13
76
76
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
77
77
  * @license MIT
78
- **/function q_(){H_()}({}).NODE_ENV!=="production"&&q_();function K_(n){const[t,e]=St.useState(n),r=St.useRef(t),s=St.useRef(za()),i=St.useCallback(o=>{e(a=>{const c=typeof o=="function"?o(a):o;return Object.is(a,c)?a:(r.current=c,s.current.emit(c),c)})},[]);return St.useMemo(()=>({getState:()=>r.current,setState:i,subscribe:o=>{Zn(()=>o(r.current));const a=s.current.subscribe(c=>{Zn(()=>o(c))});return()=>a()}}),[])}function J_(n){const t=jm(n),e=za();return{getState:()=>t.value,setState:s=>{const i=typeof s=="function"?s(t.value):s;Object.is(t.value,i)||(t.value=i,e.emit(i))},subscribe:s=>(Zn(()=>s(t.value)),e.subscribe(i=>{Zn(()=>s(i))}))}}function Z_(n){const t=new Wi(n);return{getState:()=>t.value,setState:e=>{const r=t.value,s=typeof e=="function"?e(r):e;Object.is(r,s)||t.next(s)},subscribe:e=>{const r=t.subscribe(s=>{Zn(()=>e(s))});return()=>r.unsubscribe()}}}function Ph(n,t){let e=n;const r=za();return{getState:()=>e,setState:s=>{const i=typeof s=="function"?s(e):s;Object.is(e,i)||t?.beforeChange&&!t.beforeChange(i)||(e=i,r.emit(e))},subscribe:s=>{Zn(()=>s(e));const i=r.subscribe(o=>{Zn(()=>s(o))});return()=>i()}}}function dp(n){const t=n.initState||{};let e=n.reducer;if(n.enhancer)return n.enhancer(dp)({reducer:e,initState:t});const r=Ph(t),s=o=>{const a=e(r.getState(),o);r.setState(a)},i=o=>{e=o,s({type:Symbol()})};return s({type:Symbol()}),{getState:r.getState,dispatch:s,subscribe:r.subscribe,replaceReducer:i}}function Q_(n,t=!0){const e=Object.keys(n);return(r={},s)=>{const i=t?{...r}:r;for(const o of e){const a=n[o](i[o]??{},s);if(a===void 0)throw new Error(`Reducer "${o}" returned undefined`);i[o]=a}return i}}function tE(...n){return t=>e=>{const r=t(e);let s=r.dispatch;const i={getState:r.getState,dispatch:s},o=n.map(a=>a(i));return s=K1(...o)(s),r.dispatch=s,r}}function eE(n){const t=new Wi(void 0),e=new un;let r=null,s=!1,i=!1;return{middleware(o){return s?a=>a:(s=!0,t.next(o.getState()),a=>c=>{const h=a(c);return t.next(o.getState()),e.next(c),h})},run(o,a){if(!s)throw new Error("EpicMiddleware should applyMiddleware() to store before");if(i)throw new Error("EpicMiddleware destroyed");return r||(r=o(e,t,{...n?.dependencies??{},dispatch:a.dispatch}).pipe(Kd((c,h)=>(cb("[Epic Error]",c),h))).subscribe({next(c){a.dispatch(c)},error(c){console.error("[Epic Fatal Error]",c)}}),r)},destroy(){i=!0,r?.unsubscribe(),r=null,e.complete(),t.complete()}}}function nE(...n){return(t,e,r)=>qi(...n.map(s=>s(t,e,r)))}function rE(...n){return Nc(t=>n.includes(t.type))}function sE(){return{middleware(n){return t=>e=>typeof e=="function"?e(n.dispatch,n.getState):t(e)}}}const iE=n=>{let t=0;return e=>r=>{pf.start(`--- ${++t}: action(${String(r.type)}) ---`),Pn(`action: ${Ci(r)}`),Pn(`old-state: ${Ci(n.getState())}`),e(r),Pn(`new-state: ${Ci(n.getState())}`),pf.end()}},oE=n=>t=>e=>{try{t(e)}catch(r){throw Pn(`Reducer错误报告: ${r}`),r}},aE=n=>t=>e=>{const r=`dispatch(${String(e.type)}) execute time`;gf.start(r),t(e),gf.end(r)};function cE(n="",t){const{OPERATION_DELIMITER:e="/",KEY_DELIMITER:r=",",KEY_VALUE_DELIMITER:s=":"}=t||{};return n.split(e).filter(i=>i!=="").reduce((i,o)=>{const[a,...c]=o.split(r);if(c.length===0){const[h,u]=a.split(s);i.push({type:h,payload:u!==void 0?decodeURIComponent(u):!0})}else{if(a.indexOf(s)!==-1)throw new Error(`"${a}" is invalid`);i.push(c.reduce((h,u)=>{const[l,d]=u.split(s);return h[l]=d!==void 0?decodeURIComponent(d):!0,h},{type:a}))}return i},[])}function hE(n){const t=Symbol("AppStore");function e(){const c=o_(n.getState());n.subscribe(l=>{c.value=l});const h=hp();if(!h)throw new Error("provideAppStore must be called in setup()");const u={store:n,stateRef:c};h.appContext.provides[t]=u}function r(){const c=op(t);if(!c)throw new ReferenceError("createVueAppStoreContext's hooks cannot be called before provideAppStore()");return c}function s(){const{store:c}=r();return c}function i(c){const{stateRef:h}=r();return c?fp(()=>c(h.value)):gh(h)}function o(){const c=s();if(bi(c))throw new Error("useSetAppState is only supported for StateStoreLike");return c.setState.bind(c)}function a(){const c=s();if(!bi(c))throw new Error("useDispatch is only supported for ReduxStore");return c.dispatch.bind(c)}return{provideAppStore:e,useAppStore:s,useAppState:i,useSetAppState:o,useDispatch:a}}function uE(n){const t=n.value(),e=is(t);if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const r=jm(e?t:n.defaultValue),s=fp(()=>e?n.value():r.value);let i=!1;V_(n.value,c=>{if(!i&&is(c)!==e){i=!0,console.warn("[useVueControllableState] can't switch between controlled and uncontrolled mode.");return}},{});let o=0;async function a(c){const h=++o,u=typeof c=="function"?c(s.value):c;n.beforeChange&&!await n.beforeChange(u)||h===o&&(e||(r.value=u),n.onChange?.(u),await Km())}return[s,a]}const Co=Pw(DS);function lE(n){const t=St.useRef(null);return t.current===null&&(t.current=n()),t.current}function fE(n,t){n.indexOf(t)===-1&&n.push(t)}function Ah(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}const Bn=(n,t,e)=>e>t?t:e<n?n:e;function Mh(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let $r=()=>{},$n=()=>{};typeof process<"u"&&{}.NODE_ENV!=="production"&&($r=(n,t,e)=>{!n&&typeof console<"u"&&console.warn(Mh(t,e))},$n=(n,t,e)=>{if(!n)throw new Error(Mh(t,e))});const Un={},mp=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),dE=n=>typeof n=="object"&&n!==null,pp=n=>/^0[^.\s]+$/u.test(n);function gp(n){let t;return()=>(t===void 0&&(t=n()),t)}const Ur=n=>n,Dh=(...n)=>n.reduce((t,e)=>r=>e(t(r))),Oh=(n,t,e)=>{const r=t-n;return r?(e-n)/r:1};class yp{constructor(){this.subscriptions=[]}add(t){return fE(this.subscriptions,t),()=>Ah(this.subscriptions,t)}notify(t,e,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,e,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,e,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=n=>n*1e3,Ue=n=>n/1e3,bp=(n,t)=>t?n*(1e3/t):0,vp=new Set;function wp(n,t,e){n||vp.has(t)||(console.warn(Mh(t,e)),vp.add(t))}const mE=(n,t,e)=>{const r=t-n;return((e-n)%r+r)%r+n},xp=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,pE=1e-7,gE=12;function yE(n,t,e,r,s){let i,o,a=0;do o=t+(e-t)/2,i=xp(o,r,s)-n,i>0?e=o:t=o;while(Math.abs(i)>pE&&++a<gE);return o}function $s(n,t,e,r){if(n===t&&e===r)return Ur;const s=i=>yE(i,0,1,n,e);return i=>i===0||i===1?i:xp(s(i),t,r)}const Sp=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,Ih=n=>t=>1-n(1-t),_p=$s(.33,1.53,.69,.99),Rh=Ih(_p),Ep=Sp(Rh),Cp=n=>n>=1?1:(n*=2)<1?.5*Rh(n):.5*(2-Math.pow(2,-10*(n-1))),kh=n=>1-Math.sin(Math.acos(n)),bE=Ih(kh),Tp=Sp(kh),vE=$s(.42,0,1,1),wE=$s(0,0,.58,1),Pp=$s(.42,0,.58,1),Ap=n=>Array.isArray(n)&&typeof n[0]!="number";function Mp(n,t){return Ap(n)?n[mE(0,n.length,t)]:n}const Dp=n=>Array.isArray(n)&&typeof n[0]=="number",Op={linear:Ur,easeIn:vE,easeInOut:Pp,easeOut:wE,circIn:kh,circInOut:Tp,circOut:bE,backIn:Rh,backInOut:Ep,backOut:_p,anticipate:Cp},xE=n=>typeof n=="string",Ip=n=>{if(Dp(n)){$n(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,e,r,s]=n;return $s(t,e,r,s)}else if(xE(n))return $n(Op[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),Op[n];return n},To=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function SE(n){let t=new Set,e=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(h){i.has(h)&&(c.schedule(h),n()),h(o)}const c={schedule:(h,u=!1,l=!1)=>{const f=l&&r?t:e;return u&&i.add(h),f.add(h),h},cancel:h=>{e.delete(h),i.delete(h)},process:h=>{if(o=h,r){s=!0;return}r=!0;const u=t;t=e,e=u,t.forEach(a),t.clear(),r=!1,s&&(s=!1,c.process(h))}};return c}const _E=40;function Rp(n,t){let e=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,o=To.reduce((x,v)=>(x[v]=SE(i),x),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:u,update:l,preRender:d,render:f,postRender:p}=o,m=()=>{const x=Un.useManualTiming,v=x?s.timestamp:performance.now();e=!1,x||(s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,_E),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),c.process(s),h.process(s),u.process(s),l.process(s),d.process(s),f.process(s),p.process(s),s.isProcessing=!1,e&&t&&(r=!1,n(m))},b=()=>{e=!0,r=!0,s.isProcessing||n(m)};return{schedule:To.reduce((x,v)=>{const E=o[v];return x[v]=(_,D=!1,z=!1)=>(e||b(),E.schedule(_,D,z)),x},{}),cancel:x=>{for(let v=0;v<To.length;v++)o[To[v]].cancel(x)},state:s,steps:o}}const{schedule:Qe,cancel:Lh,state:Po,steps:jD}=Rp(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ur,!0);let Ao;function EE(){Ao=void 0}const _e={now:()=>(Ao===void 0&&_e.set(Po.isProcessing||Un.useManualTiming?Po.timestamp:performance.now()),Ao),set:n=>{Ao=n,queueMicrotask(EE)}},kp=n=>t=>typeof t=="string"&&t.startsWith(n),Lp=kp("--"),CE=kp("var(--"),Nh=n=>CE(n)?TE.test(n.split("/*")[0].trim()):!1,TE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Np(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Yr={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Us={...Yr,transform:n=>Bn(0,1,n)},Mo={...Yr,default:1},Ys=n=>Math.round(n*1e5)/1e5,zh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PE(n){return n==null}const AE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vh=(n,t)=>e=>!!(typeof e=="string"&&AE.test(e)&&e.startsWith(n)||t&&!PE(e)&&Object.prototype.hasOwnProperty.call(e,t)),zp=(n,t,e)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(zh);return{[n]:parseFloat(s),[t]:parseFloat(i),[e]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ME=n=>Bn(0,255,n),Fh={...Yr,transform:n=>Math.round(ME(n))},dr={test:Vh("rgb","red"),parse:zp("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:r=1})=>"rgba("+Fh.transform(n)+", "+Fh.transform(t)+", "+Fh.transform(e)+", "+Ys(Us.transform(r))+")"};function DE(n){let t="",e="",r="",s="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),r=n.substring(5,7),s=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),r=n.substring(3,4),s=n.substring(4,5),t+=t,e+=e,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Bh={test:Vh("#"),parse:DE,transform:dr.transform},js=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),bn=js("deg"),jr=js("%"),q=js("px"),OE=js("vh"),IE=js("vw"),Vp=(()=>({...jr,parse:n=>jr.parse(n)/100,transform:n=>jr.transform(n*100)}))(),Gr={test:Vh("hsl","hue"),parse:zp("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:r=1})=>"hsla("+Math.round(n)+", "+jr.transform(Ys(t))+", "+jr.transform(Ys(e))+", "+Ys(Us.transform(r))+")"},Yt={test:n=>dr.test(n)||Bh.test(n)||Gr.test(n),parse:n=>dr.test(n)?dr.parse(n):Gr.test(n)?Gr.parse(n):Bh.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?dr.transform(n):Gr.transform(n),getAnimatableNone:n=>{const t=Yt.parse(n);return t.alpha=0,Yt.transform(t)}},RE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function kE(n){return isNaN(n)&&typeof n=="string"&&(n.match(zh)?.length||0)+(n.match(RE)?.length||0)>0}const Fp="number",Bp="color",LE="var",NE="var(",$p="${}",zE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Xr(n){const t=n.toString(),e=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(zE,c=>(Yt.test(c)?(r.color.push(i),s.push(Bp),e.push(Yt.parse(c))):c.startsWith(NE)?(r.var.push(i),s.push(LE),e.push(c)):(r.number.push(i),s.push(Fp),e.push(parseFloat(c))),++i,$p)).split($p);return{values:e,split:a,indexes:r,types:s}}function VE(n){return Xr(n).values}function Up({split:n,types:t}){const e=n.length;return r=>{let s="";for(let i=0;i<e;i++)if(s+=n[i],r[i]!==void 0){const o=t[i];o===Fp?s+=Ys(r[i]):o===Bp?s+=Yt.transform(r[i]):s+=r[i]}return s}}function FE(n){return Up(Xr(n))}const BE=n=>typeof n=="number"?0:Yt.test(n)?Yt.getAnimatableNone(n):n,$E=(n,t)=>typeof n=="number"?t?.trim().endsWith("/")?n:0:BE(n);function UE(n){const t=Xr(n);return Up(t)(t.values.map((r,s)=>$E(r,t.split[s])))}const Ye={test:kE,parse:VE,createTransformer:FE,getAnimatableNone:UE};function $h(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function YE({hue:n,saturation:t,lightness:e,alpha:r}){n/=360,t/=100,e/=100;let s=0,i=0,o=0;if(!t)s=i=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;s=$h(c,a,n+1/3),i=$h(c,a,n),o=$h(c,a,n-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Do(n,t){return e=>e>0?t:n}const Wr=(n,t,e)=>n+(t-n)*e,Uh=(n,t,e)=>{const r=n*n,s=e*(t*t-r)+r;return s<0?0:Math.sqrt(s)},jE=[Bh,dr,Gr],GE=n=>jE.find(t=>t.test(n));function Yp(n){const t=GE(n);if($r(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let e=t.parse(n);return t===Gr&&(e=YE(e)),e}const jp=(n,t)=>{const e=Yp(n),r=Yp(t);if(!e||!r)return Do(n,t);const s={...e};return i=>(s.red=Uh(e.red,r.red,i),s.green=Uh(e.green,r.green,i),s.blue=Uh(e.blue,r.blue,i),s.alpha=Wr(e.alpha,r.alpha,i),dr.transform(s))},Yh=new Set(["none","hidden"]);function XE(n,t){return Yh.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}function WE(n,t){return e=>Wr(n,t,e)}function jh(n){return typeof n=="number"?WE:typeof n=="string"?Nh(n)?Do:Yt.test(n)?jp:KE:Array.isArray(n)?Gp:typeof n=="object"?Yt.test(n)?jp:HE:Do}function Gp(n,t){const e=[...n],r=e.length,s=n.map((i,o)=>jh(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)e[o]=s[o](i);return e}}function HE(n,t){const e={...n,...t},r={};for(const s in e)n[s]!==void 0&&t[s]!==void 0&&(r[s]=jh(n[s])(n[s],t[s]));return s=>{for(const i in r)e[i]=r[i](s);return e}}function qE(n,t){const e=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=n.indexes[i][r[i]],a=n.values[o]??0;e[s]=a,r[i]++}return e}const KE=(n,t)=>{const e=Ye.createTransformer(t),r=Xr(n),s=Xr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Yh.has(n)&&!s.values.length||Yh.has(t)&&!r.values.length?XE(n,t):Dh(Gp(qE(r,s),s.values),e):($r(!0,`Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Do(n,t))};function Xp(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?Wr(n,t,e):jh(n)(n,t)}const JE=n=>{const t=({timestamp:e})=>n(e);return{start:(e=!0)=>Qe.update(t,e),stop:()=>Lh(t),now:()=>Po.isProcessing?Po.timestamp:_e.now()}},Wp=(n,t,e=10)=>{let r="";const s=Math.max(Math.round(t/e),2);for(let i=0;i<s;i++)r+=Math.round(n(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Oo=2e4;function Gh(n){let t=0;const e=50;let r=n.next(t);for(;!r.done&&t<Oo;)t+=e,r=n.next(t);return t>=Oo?1/0:t}function Hp(n,t=100,e){const r=e({...n,keyframes:[0,t]}),s=Math.min(Gh(r),Oo);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Ue(s)}}const Lt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Xh(n,t){return n*Math.sqrt(1-t*t)}const ZE=12;function QE(n,t,e){let r=e;for(let s=1;s<ZE;s++)r=r-n(r)/t(r);return r}const Wh=.001;function tC({duration:n=Lt.duration,bounce:t=Lt.bounce,velocity:e=Lt.velocity,mass:r=Lt.mass}){let s,i;$r(n<=Se(Lt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Bn(Lt.minDamping,Lt.maxDamping,o),n=Bn(Lt.minDuration,Lt.maxDuration,Ue(n)),o<1?(s=h=>{const u=h*o,l=u*n,d=u-e,f=Xh(h,o),p=Math.exp(-l);return Wh-d/f*p},i=h=>{const l=h*o*n,d=l*e+e,f=Math.pow(o,2)*Math.pow(h,2)*n,p=Math.exp(-l),m=Xh(Math.pow(h,2),o);return(-s(h)+Wh>0?-1:1)*((d-f)*p)/m}):(s=h=>{const u=Math.exp(-h*n),l=(h-e)*n+1;return-Wh+u*l},i=h=>{const u=Math.exp(-h*n),l=(e-h)*(n*n);return u*l});const a=5/n,c=QE(s,i,a);if(n=Se(n),isNaN(c))return{stiffness:Lt.stiffness,damping:Lt.damping,duration:n};{const h=Math.pow(c,2)*r;return{stiffness:h,damping:o*2*Math.sqrt(r*h),duration:n}}}const eC=["duration","bounce"],nC=["stiffness","damping","mass"];function qp(n,t){return t.some(e=>n[e]!==void 0)}function rC(n){let t={velocity:Lt.velocity,stiffness:Lt.stiffness,damping:Lt.damping,mass:Lt.mass,isResolvedFromDuration:!1,...n};if(!qp(n,nC)&&qp(n,eC))if(t.velocity=0,n.visualDuration){const e=n.visualDuration,r=2*Math.PI/(e*1.2),s=r*r,i=2*Bn(.05,1,1-(n.bounce||0))*Math.sqrt(s);t={...t,mass:Lt.mass,stiffness:s,damping:i}}else{const e=tC({...n,velocity:0});t={...t,...e,mass:Lt.mass},t.isResolvedFromDuration=!0}return t}function Gs(n=Lt.visualDuration,t=Lt.bounce){const e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:r,restDelta:s}=e;const i=e.keyframes[0],o=e.keyframes[e.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:h,mass:u,duration:l,velocity:d,isResolvedFromDuration:f}=rC({...e,velocity:-Ue(e.velocity||0)}),p=d||0,m=h/(2*Math.sqrt(c*u)),b=o-i,g=Ue(Math.sqrt(c/u)),w=Math.abs(b)<5;r||(r=w?Lt.restSpeed.granular:Lt.restSpeed.default),s||(s=w?Lt.restDelta.granular:Lt.restDelta.default);let x,v,E,_,D,z;if(m<1)E=Xh(g,m),_=(p+m*g*b)/E,x=L=>{const $=Math.exp(-m*g*L);return o-$*(_*Math.sin(E*L)+b*Math.cos(E*L))},D=m*g*_+b*E,z=m*g*b-_*E,v=L=>Math.exp(-m*g*L)*(D*Math.sin(E*L)+z*Math.cos(E*L));else if(m===1){x=$=>o-Math.exp(-g*$)*(b+(p+g*b)*$);const L=p+g*b;v=$=>Math.exp(-g*$)*(g*L*$-p)}else{const L=g*Math.sqrt(m*m-1);x=rt=>{const ot=Math.exp(-m*g*rt),nt=Math.min(L*rt,300);return o-ot*((p+m*g*b)*Math.sinh(nt)+L*b*Math.cosh(nt))/L};const $=(p+m*g*b)/L,j=m*g*$-b*L,Q=m*g*b-$*L;v=rt=>{const ot=Math.exp(-m*g*rt),nt=Math.min(L*rt,300);return ot*(j*Math.sinh(nt)+Q*Math.cosh(nt))}}const O={calculatedDuration:f&&l||null,velocity:L=>Se(v(L)),next:L=>{if(!f&&m<1){const j=Math.exp(-m*g*L),Q=Math.sin(E*L),rt=Math.cos(E*L),ot=o-j*(_*Q+b*rt),nt=Se(j*(D*Q+z*rt));return a.done=Math.abs(nt)<=r&&Math.abs(o-ot)<=s,a.value=a.done?o:ot,a}const $=x(L);if(f)a.done=L>=l;else{const j=Se(v(L));a.done=Math.abs(j)<=r&&Math.abs(o-$)<=s}return a.value=a.done?o:$,a},toString:()=>{const L=Math.min(Gh(O),Oo),$=Wp(j=>O.next(L*j).value,L,30);return L+"ms "+$},toTransition:()=>{}};return O}Gs.applyToOptions=n=>{const t=Hp(n,100,Gs);return n.ease=t.ease,n.duration=Se(t.duration),n.type="keyframes",n};const sC=5;function Kp(n,t,e){const r=Math.max(t-sC,0);return bp(e-n(r),t-r)}function Hh({keyframes:n,velocity:t=0,power:e=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:h=.5,restSpeed:u}){const l=n[0],d={done:!1,value:l},f=z=>a!==void 0&&z<a||c!==void 0&&z>c,p=z=>a===void 0?c:c===void 0||Math.abs(a-z)<Math.abs(c-z)?a:c;let m=e*t;const b=l+m,g=o===void 0?b:o(b);g!==b&&(m=g-l);const w=z=>-m*Math.exp(-z/r),x=z=>g+w(z),v=z=>{const O=w(z),L=x(z);d.done=Math.abs(O)<=h,d.value=d.done?g:L};let E,_;const D=z=>{f(d.value)&&(E=z,_=Gs({keyframes:[d.value,p(d.value)],velocity:Kp(x,z,d.value),damping:s,stiffness:i,restDelta:h,restSpeed:u}))};return D(0),{calculatedDuration:null,next:z=>{let O=!1;return!_&&E===void 0&&(O=!0,v(z),D(z)),E!==void 0&&z>=E?_.next(z-E):(!O&&v(z),d)}}}function iC(n,t,e){const r=[],s=e||Un.mix||Xp,i=n.length-1;for(let o=0;o<i;o++){let a=s(n[o],n[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ur:t;a=Dh(c,a)}r.push(a)}return r}function oC(n,t,{clamp:e=!0,ease:r,mixer:s}={}){const i=n.length;if($n(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=n[0]===n[1];n[0]>n[i-1]&&(n=[...n].reverse(),t=[...t].reverse());const a=iC(t,r,s),c=a.length,h=u=>{if(o&&u<n[0])return t[0];let l=0;if(c>1)for(;l<n.length-2&&!(u<n[l+1]);l++);const d=Oh(n[l],n[l+1],u);return a[l](d)};return e?u=>h(Bn(n[0],n[i-1],u)):h}function Jp(n,t){const e=n[n.length-1];for(let r=1;r<=t;r++){const s=Oh(0,t,r);n.push(Wr(e,1,s))}}function Zp(n){const t=[0];return Jp(t,n.length-1),t}function aC(n,t){return n.map(e=>e*t)}function cC(n,t){return n.map(()=>t||Pp).splice(0,n.length-1)}function Hr({duration:n=300,keyframes:t,times:e,ease:r="easeInOut"}){const s=Ap(r)?r.map(Ip):Ip(r),i={done:!1,value:t[0]},o=aC(e&&e.length===t.length?e:Zp(t),n),a=oC(o,t,{ease:Array.isArray(s)?s:cC(t,s)});return{calculatedDuration:n,next:c=>(i.value=a(c),i.done=c>=n,i)}}const hC=n=>n!==null;function Io(n,{repeat:t,repeatType:e="loop"},r,s=1){const i=n.filter(hC),a=s<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const uC={decay:Hh,inertia:Hh,tween:Hr,keyframes:Hr,spring:Gs};function Qp(n){typeof n.type=="string"&&(n.type=uC[n.type])}class qh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const lC=n=>n/100;class Ro extends qh{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==_e.now()&&this.tick(_e.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Qp(t);const{type:e=Hr,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=e||Hr;({}).NODE_ENV!=="production"&&c!==Hr&&$n(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Hr&&typeof a[0]!="number"&&(this.mixKeyframes=Dh(lC,Xp(a[0],a[1])),a=[0,100]);const h=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),h.calculatedDuration===null&&(h.calculatedDuration=Gh(h));const{calculatedDuration:u}=h;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=h}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:u,repeat:l,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-h*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,v=r;if(l){const z=Math.min(this.currentTime,s)/a;let O=Math.floor(z),L=z%1;!L&&z>=1&&(L=1),L===1&&O--,O=Math.min(O,l+1),!!(O%2)&&(d==="reverse"?(L=1-L,f&&(L-=f/a)):d==="mirror"&&(v=o)),x=Bn(0,1,L)*a}let E;w?(this.delayState.value=u[0],E=this.delayState):E=v.next(x),i&&!w&&(E.value=i(E.value));let{done:_}=E;!w&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return D&&p!==Hh&&(E.value=Io(u,this.options,b,this.speed)),m&&m(E.value),D&&this.finish(),E}then(t,e){return this.finished.then(t,e)}get duration(){return Ue(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ue(t)}get time(){return Ue(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const e=this.generator.next(t).value;return Kp(r=>this.generator.next(r).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(_e.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=Ue(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=JE,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=e??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_e.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function fC(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const mr=n=>n*180/Math.PI,Kh=n=>{const t=mr(Math.atan2(n[1],n[0]));return Jh(t)},dC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Kh,rotateZ:Kh,skewX:n=>mr(Math.atan(n[1])),skewY:n=>mr(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Jh=n=>(n=n%360,n<0&&(n+=360),n),tg=Kh,eg=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),ng=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),mC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eg,scaleY:ng,scale:n=>(eg(n)+ng(n))/2,rotateX:n=>Jh(mr(Math.atan2(n[6],n[5]))),rotateY:n=>Jh(mr(Math.atan2(-n[2],n[0]))),rotateZ:tg,rotate:tg,skewX:n=>mr(Math.atan(n[4])),skewY:n=>mr(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function Zh(n){return n.includes("scale")?1:0}function Qh(n,t){if(!n||n==="none")return Zh(t);const e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(e)r=mC,s=e;else{const a=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dC,s=a}if(!s)return Zh(t);const i=r[t],o=s[1].split(",").map(gC);return typeof i=="function"?i(o):o[i]}const pC=(n,t)=>{const{transform:e="none"}=getComputedStyle(n);return Qh(e,t)};function gC(n){return parseFloat(n.trim())}const qr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kr=(()=>new Set([...qr,"pathRotation"]))(),rg=n=>n===Yr||n===q,yC=new Set(["x","y","z"]),bC=qr.filter(n=>!yC.has(n));function vC(n){const t=[];return bC.forEach(e=>{const r=n.getValue(e);r!==void 0&&(t.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))}),t}const Yn={width:({x:n},{paddingLeft:t="0",paddingRight:e="0",boxSizing:r})=>{const s=n.max-n.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(e)},height:({y:n},{paddingTop:t="0",paddingBottom:e="0",boxSizing:r})=>{const s=n.max-n.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(e)},top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>Qh(t,"x"),y:(n,{transform:t})=>Qh(t,"y")};Yn.translateX=Yn.x,Yn.translateY=Yn.y;const pr=new Set;let tu=!1,eu=!1,nu=!1;function sg(){if(eu){const n=Array.from(pr).filter(r=>r.needsMeasurement),t=new Set(n.map(r=>r.element)),e=new Map;t.forEach(r=>{const s=vC(r);s.length&&(e.set(r,s),r.render())}),n.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=e.get(r);s&&s.forEach(([i,o])=>{r.getValue(i)?.set(o)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}eu=!1,tu=!1,pr.forEach(n=>n.complete(nu)),pr.clear()}function ig(){pr.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(eu=!0)})}function wC(){nu=!0,ig(),sg(),nu=!1}class ru{constructor(t,e,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(pr.add(this),tu||(tu=!0,Qe.read(ig),Qe.resolveKeyframes(sg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:r,motionValue:s}=this;if(t[0]===null){const i=s?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&e){const a=r.readValue(e,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}fC(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pr.delete(this)}cancel(){this.state==="scheduled"&&(pr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xC=n=>n.startsWith("--");function og(n,t,e){xC(t)?n.style.setProperty(t,e):n.style[t]=e}const SC={};function ag(n,t){const e=gp(n);return()=>SC[t]??e()}const _C=ag(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),cg=ag(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xs=([n,t,e,r])=>`cubic-bezier(${n}, ${t}, ${e}, ${r})`,hg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xs([0,.65,.55,1]),circOut:Xs([.55,0,1,.45]),backIn:Xs([.31,.01,.66,-.59]),backOut:Xs([.33,1.53,.69,.99])};function ug(n,t){if(n)return typeof n=="function"?cg()?Wp(n,t):"ease-out":Dp(n)?Xs(n):Array.isArray(n)?n.map(e=>ug(e,t)||hg.easeOut):hg[n]}function EC(n,t,e,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},h=void 0){const u={[t]:e};c&&(u.offset=c);const l=ug(a,s);Array.isArray(l)&&(u.easing=l);const d={delay:r,duration:s,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return h&&(d.pseudoElement=h),n.animate(u,d)}function su(n){return typeof n=="function"&&"applyToOptions"in n}function CC({type:n,...t}){return su(n)&&cg()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lg extends qh{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,$n(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const h=CC(t);this.animation=EC(e,r,s,h,i),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Io(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),og(e,r,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ue(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ue(t)}get time(){return Ue(Number(this.animation.currentTime)||0)}set time(t){const e=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Se(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_C()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),r&&(this.animation.rangeEnd=r),Ur):s(this)}}const fg={anticipate:Cp,backInOut:Ep,circInOut:Tp};function TC(n){return n in fg}function PC(n){typeof n.ease=="string"&&TC(n.ease)&&(n.ease=fg[n.ease])}const iu=10;class AC extends lg{constructor(t){PC(t),Qp(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!e)return;if(t!==void 0){e.set(t);return}const a=new Ro({...o,autoplay:!1}),c=Math.max(iu,_e.now()-this.startTime),h=Bn(0,iu,c-iu),u=a.sample(c).value,{name:l}=this.options;i&&l&&og(i,l,u),e.setWithVelocity(a.sample(Math.max(0,c-h)).value,u,h),a.stop()}}const dg=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Ye.test(n)||n==="0")&&!n.startsWith("url("));function MC(n){const t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function DC(n,t,e,r){const s=n[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=n[n.length-1],o=dg(s,t),a=dg(i,t);return $r(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:MC(n)||(e==="spring"||su(e))&&r}function ou(n){n.duration=0,n.type="keyframes"}const mg=new Set(["opacity","clipPath","filter","transform"]),OC=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function IC(n){for(let t=0;t<n.length;t++)if(typeof n[t]=="string"&&OC.test(n[t]))return!0;return!1}const RC=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),kC=gp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function LC(n){const{motionValue:t,name:e,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:u}=t.owner.getProps();return kC()&&e&&(mg.has(e)||RC.has(e)&&IC(a))&&(e!=="transform"||!u)&&!h&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const NC=40;class zC extends qh{constructor({autoplay:t=!0,delay:e=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:h,element:u,...l}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_e.now();const d={autoplay:t,delay:e,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:h,element:u,...l},f=u?.KeyframeResolver||ru;this.keyframeResolver=new f(a,(p,m,b)=>this.onKeyframesResolved(p,m,d,!b),c,h,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,r,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:h,onUpdate:u}=r;this.resolvedAt=_e.now();let l=!0;DC(t,i,o,a)||(l=!1,(Un.instantAnimations||!c)&&u?.(Io(t,r,e)),t[0]=t[t.length-1],ou(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>NC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...r,keyframes:t},p=l&&!h&&LC(f),m=f.motionValue?.owner?.current;let b;if(p)try{b=new AC({...f,element:m})}catch{b=new Ro(f)}else b=new Ro(f);b.finished.then(()=>{this.notifyFinished()}).catch(Ur),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),wC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class VC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=e}attachTimeline(t){const e=this.animations.map(r=>r.attachTimeline(t));return()=>{e.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return pg(this.animations,"duration")}get iterationDuration(){return pg(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function pg(n,t){let e=0;for(let r=0;r<n.length;r++){const s=n[r][t];s!==null&&s>e&&(e=s)}return e}class FC extends VC{then(t,e){return this.finished.finally(t).then(()=>{})}}const gg=30,BC=n=>!isNaN(parseFloat(n));class $C{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=_e.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=_e.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=BC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return{}.NODE_ENV!=="production"&&wp(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new yp);const r=this.events[t].add(e);return t==="change"?()=>{r(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,r){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_e.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>gg)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,gg);return bp(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gr(n,t){return new $C(n,t)}function yg(n,t){if(n?.inherit&&t){const{inherit:e,...r}=n;return{...t,...r}}return n}function bg(n,t){const e=n?.[t]??n?.default??n;return e!==n?yg(e,n):e}const UC={type:"spring",stiffness:500,damping:25,restSpeed:10},YC=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),jC={type:"keyframes",duration:.8},GC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XC=(n,{keyframes:t})=>t.length>2?jC:Kr.has(n)?n.startsWith("scale")?YC(t[1]):UC:GC,WC=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function HC(n){for(const t in n)if(!WC.has(t))return!0;return!1}const vg=(n,t,e,r={},s,i)=>o=>{const a=bg(r,n)||{},c=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Se(c);const u={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-h,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:n,motionValue:t,element:i?void 0:s};HC(a)||Object.assign(u,XC(n,u)),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let l=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ou(u),u.delay===0&&(l=!0)),(Un.instantAnimations||Un.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(l=!0,ou(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,l&&!i&&t.get()!==void 0){const d=Io(u.keyframes,a);if(d!==void 0){Qe.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Ro(u):new zC(u)},qC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KC(n){const t=qC.exec(n);if(!t)return[,];const[,e,r,s]=t;return[`--${e??r}`,s]}const JC=4;function wg(n,t,e=1){$n(e<=JC,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=KC(n);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return mp(o)?parseFloat(o):o}return Nh(s)?wg(s,t,e+1):s}function xg(n){const t=[{},{}];return n?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function Sg(n,t,e,r){if(typeof t=="function"){const[s,i]=xg(r);t=t(e!==void 0?e:n.custom,s,i)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[s,i]=xg(r);t=t(e!==void 0?e:n.custom,s,i)}return t}function ZC(n,t,e){const r=n.getProps();return Sg(r,t,e!==void 0?e:r.custom,n)}const _g=new Set(["width","height","top","left","right","bottom",...qr]),QC=n=>Array.isArray(n);function tT(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,gr(e))}function eT(n){return QC(n)?n[n.length-1]||0:n}function nT(n,t){const e=ZC(n,t);let{transitionEnd:r={},transition:s={},...i}=e||{};i={...i,...r};for(const o in i){const a=eT(i[o]);tT(n,o,a)}}const ue=n=>!!(n&&n.getVelocity);function rT(n){return!!(ue(n)&&n.add)}function sT(n,t){const e=n.getValue("willChange");if(rT(e))return e.add(t);if(!e&&Un.WillChange){const r=new Un.WillChange("auto");n.addValue("willChange",r),r.add(t)}}function au(n){return n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const iT="data-"+au("framerAppearId");function oT(n){return n.props[iT]}function aT({protectedKeys:n,needsAnimating:t},e){const r=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,r}function cT(n,t,{delay:e=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const c=n.getDefaultTransition();i=i?yg(i,c):c;const h=i?.reduceMotion,u=i?.skipAnimations;r&&(i=r);const l=[],d=s&&n.animationState&&n.animationState.getState()[s],f=i?.path;f&&f.animateVisualElement(n,a,i,e,l);for(const p in a){const m=n.getValue(p,n.latestValues[p]??null),b=a[p];if(b===void 0||d&&aT(d,p))continue;const g={delay:e,...bg(i||{},p)};u&&(g.skipAnimations=!0);const w=m.get();if(w!==void 0&&!m.isAnimating()&&!Array.isArray(b)&&b===w&&!g.velocity){Qe.update(()=>m.set(b));continue}let x=!1;if(window.MotionHandoffAnimation){const _=oT(n);if(_){const D=window.MotionHandoffAnimation(_,p,Qe);D!==null&&(g.startTime=D,x=!0)}}sT(n,p);const v=h??n.shouldReduceMotion;m.start(vg(p,m,b,v&&_g.has(p)?{type:!1}:g,n,x));const E=m.animation;E&&l.push(E)}if(o){const p=()=>Qe.update(()=>{o&&nT(n,o)});l.length?Promise.all(l).then(p):p()}return l}const hT={test:n=>n==="auto",parse:n=>n},Eg=n=>t=>t.test(n),Cg=[Yr,q,jr,bn,IE,OE,hT],Tg=n=>Cg.find(Eg(n));function uT(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||pp(n):!0}const lT=new Set(["brightness","contrast","saturate","opacity"]);function fT(n){const[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[r]=e.match(zh)||[];if(!r)return n;const s=e.replace(r,"");let i=lT.has(t)?1:0;return r!==e&&(i*=100),t+"("+i+s+")"}const dT=/\b([a-z-]*)\(.*?\)/gu,cu={...Ye,getAnimatableNone:n=>{const t=n.match(dT);return t?t.map(fT).join(" "):n}},hu={...Ye,getAnimatableNone:n=>{const t=Ye.parse(n);return Ye.createTransformer(n)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Pg={...Yr,transform:Math.round},ko={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:bn,pathRotation:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:Mo,scaleX:Mo,scaleY:Mo,scaleZ:Mo,skew:bn,skewX:bn,skewY:bn,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Us,originX:Vp,originY:Vp,originZ:q},zIndex:Pg,fillOpacity:Us,strokeOpacity:Us,numOctaves:Pg},mT={...ko,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:cu,WebkitFilter:cu,mask:hu,WebkitMask:hu},Ag=n=>mT[n],pT=new Set([cu,hu]);function Mg(n,t){let e=Ag(n);return pT.has(e)||(e=Ye),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const gT=new Set(["auto","none","0"]);function yT(n,t,e){let r=0,s;for(;r<n.length&&!s;){const i=n[r];typeof i=="string"&&!gT.has(i)&&Xr(i).values.length&&(s=n[r]),r++}if(s&&e)for(const i of t)n[i]=Mg(e,s)}class bT extends ru{constructor(t,e,r,s,i){super(t,e,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:r}=this;if(!e||!e.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Nh(l))){const d=wg(l,e.current);d!==void 0&&(t[u]=d),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!_g.has(r)||t.length!==2)return;const[s,i]=t,o=Tg(s),a=Tg(i),c=Np(s),h=Np(i);if(c!==h&&Yn[r]){this.needsMeasurement=!0;return}if(o!==a)if(rg(o)&&rg(a))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else Yn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||uT(t[s]))&&r.push(s);r.length&&yT(t,r,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Yn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Yn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function vT(n,t,e){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;t&&(r=t.current);const s=e?.[n]??r.querySelectorAll(n);return s?Array.from(s):[]}return Array.from(n).filter(r=>r!=null)}const uu=(n,t)=>t&&typeof n=="number"?t.transform(n):n,{schedule:wT,cancel:WD}=Rp(queueMicrotask,!1);function Dg(n){return dE(n)&&"ownerSVGElement"in n}function xT(n){return Dg(n)&&n.tagName==="svg"}const ST=[...Cg,Yt,Ye],_T=n=>ST.find(Eg(n)),Og=()=>({min:0,max:0}),lu=()=>({x:Og(),y:Og()}),Ws=new WeakMap;function ET(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function CT(n){return typeof n=="string"||Array.isArray(n)}const TT=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Ig(n){return ET(n.animate)||TT.some(t=>CT(n[t]))}function PT(n){return!!(Ig(n)||n.variants)}function AT(n,t,e){for(const r in t){const s=t[r],i=e[r];if(ue(s))n.addValue(r,s);else if(ue(i))n.addValue(r,gr(s,{owner:n}));else if(i!==s)if(n.hasValue(r)){const o=n.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=n.getStaticValue(r);n.addValue(r,gr(o!==void 0?o:s,{owner:n}))}}for(const r in e)t[r]===void 0&&n.removeValue(r);return t}const fu={current:null},Rg={current:!1},MT=typeof window<"u";function DT(){if(Rg.current=!0,!!MT)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>fu.current=n.matches;n.addEventListener("change",t),t()}else fu.current=!1}const kg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Lg={};class Ng{scrapeMotionValuesFromProps(t,e,r){return{}}constructor({parent:t,props:e,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ru,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=_e.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:h,renderState:u}=a;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Ig(e),this.isVariantNode=PT(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const f in d){const p=d[f];h[f]!==void 0&&ue(p)&&p.set(h[f])}}mount(t){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=t,Ws.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,r)=>this.bindToMotionValue(r,e)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Rg.current||DT(),this.shouldReduceMotion=fu.current),{}.NODE_ENV!=="production"&&wp(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Lh(this.notifyUpdate),Lh(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&mg.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:h,duration:u}=e.accelerate,l=new lg({element:this.current,name:t,keyframes:a,times:c,ease:h,duration:Se(u)}),d=o(l);this.valueSubscriptions.set(t,()=>{d(),l.cancel()});return}const r=Kr.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Lg){const e=Lg[t];if(!e)continue;const{isEnabled:r,Feature:s}=e;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lu()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let r=0;r<kg.length;r++){const s=kg[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=AT(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const r=this.values.get(t);e!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&e!==void 0&&(r=gr(e===null?void 0:e,{owner:this}),this.addValue(t,r)),r}readValue(t,e){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(mp(r)||pp(r))?r=parseFloat(r):!_T(r)&&Ye.test(e)&&(r=Mg(t,e)),this.setBaseTarget(t,ue(r)?r.get():r)),ue(r)?r.get():r}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let r;if(typeof e=="string"||typeof e=="object"){const i=Sg(this.props,e,this.presenceContext?.custom);i&&(r=i[t])}if(e&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ue(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new yp),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){wT.render(this.render)}}class zg extends Ng{constructor(){super(...arguments),this.KeyframeResolver=bT}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){const r=t.style;return r?r[e]:void 0}removeValueFromRenderState(t,{vars:e,style:r}){delete e[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ue(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function OT({top:n,left:t,right:e,bottom:r}){return{x:{min:t,max:e},y:{min:n,max:r}}}function IT(n,t){if(!t)return n;const e=t({x:n.left,y:n.top}),r=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:r.y,right:r.x}}function RT(n,t){return OT(IT(n.getBoundingClientRect(),t))}const kT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},LT=qr.length;function NT(n,t,e){let r="",s=!0;for(let o=0;o<LT;o++){const a=qr[o],c=n[a];if(c===void 0)continue;let h=!0;if(typeof c=="number")h=c===(a.startsWith("scale")?1:0);else{const u=parseFloat(c);h=a.startsWith("scale")?u===1:u===0}if(!h||e){const u=uu(c,ko[a]);if(!h){s=!1;const l=kT[a]||a;r+=`${l}(${u}) `}e&&(t[a]=u)}}const i=n.pathRotation;return i&&(s=!1,r+=`rotate(${uu(i,ko.pathRotation)}) `),r=r.trim(),e?r=e(t,s?"":r):s&&(r="none"),r}function Vg(n,t,e){const{style:r,vars:s,transformOrigin:i}=n;let o=!1,a=!1;for(const c in t){const h=t[c];if(Kr.has(c)){o=!0;continue}else if(Lp(c)){s[c]=h;continue}else{const u=uu(h,ko[c]);c.startsWith("origin")?(a=!0,i[c]=u):r[c]=u}}if(t.transform||(o||e?r.transform=NT(t,n.transform,e):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:u=0}=i;r.transformOrigin=`${c} ${h} ${u}`}}function Fg(n,{style:t,vars:e},r,s){const i=n.style;let o;for(o in t)i[o]=t[o];s?.applyProjectionStyles(i,r);for(o in e)i.setProperty(o,e[o])}function Bg(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const Hs={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(q.test(n))n=parseFloat(n);else return n;const e=Bg(n,t.target.x),r=Bg(n,t.target.y);return`${e}% ${r}%`}},zT={correct:(n,{treeScale:t,projectionDelta:e})=>{const r=n,s=Ye.parse(n);if(s.length>5)return r;const i=Ye.createTransformer(n),o=typeof s[0]!="number"?1:0,a=e.x.scale*t.x,c=e.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const h=Wr(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=h),typeof s[3+o]=="number"&&(s[3+o]/=h),i(s)}},VT={borderRadius:{...Hs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hs,borderTopRightRadius:Hs,borderBottomLeftRadius:Hs,borderBottomRightRadius:Hs,boxShadow:zT};function FT(n,{layout:t,layoutId:e}){return Kr.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!VT[n]||n==="opacity")}function $g(n,t,e){const r=n.style,s=t?.style,i={};if(!r)return i;for(const o in r)(ue(r[o])||s&&ue(s[o])||FT(o,n)||e?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}function BT(n){return window.getComputedStyle(n)}class $T extends zg{constructor(){super(...arguments),this.type="html",this.renderInstance=Fg}readValueFromInstance(t,e){if(Kr.has(e))return this.projection?.isProjecting?Zh(e):pC(t,e);{const r=BT(t),s=(Lp(e)?r.getPropertyValue(e):r[e])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:e}){return RT(t,e)}build(t,e,r){Vg(t,e,r.transformTemplate)}scrapeMotionValuesFromProps(t,e,r){return $g(t,e,r)}}function UT(n,t){return n in t}class YT extends Ng{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(UT(e,t)){const r=t[e];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return lu()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const jT={offset:"stroke-dashoffset",array:"stroke-dasharray"},GT={offset:"strokeDashoffset",array:"strokeDasharray"};function XT(n,t,e=1,r=0,s=!0){n.pathLength=1;const i=s?jT:GT;n[i.offset]=`${-r}`,n[i.array]=`${t} ${e}`}const WT=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function HT(n,{attrX:t,attrY:e,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},c,h,u){if(Vg(n,a,h),c){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:l,style:d}=n;l.transform&&(d.transform=l.transform,delete l.transform),(d.transform||l.transformOrigin)&&(d.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete l.transformBox);for(const f of WT)l[f]!==void 0&&(d[f]=l[f],delete l[f]);t!==void 0&&(l.x=t),e!==void 0&&(l.y=e),r!==void 0&&(l.scale=r),s!==void 0&&XT(l,s,i,o,!1)}const Ug=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),qT=n=>typeof n=="string"&&n.toLowerCase()==="svg";function KT(n,t,e,r){Fg(n,t,void 0,r);for(const s in t.attrs)n.setAttribute(Ug.has(s)?s:au(s),t.attrs[s])}function JT(n,t,e){const r=$g(n,t,e);for(const s in n)if(ue(n[s])||ue(t[s])){const i=qr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=n[s]}return r}class ZT extends zg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lu}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Kr.has(e)){const r=Ag(e);return r&&r.default||0}return e=Ug.has(e)?e:au(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,r){return JT(t,e,r)}build(t,e,r){HT(t,e,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,e,r,s){KT(t,e,r,s)}mount(t){this.isSVGTag=qT(t.tagName),super.mount(t)}}function QT(n,t,e){const r=ue(n)?n:gr(n);return r.start(vg("",r,t,e)),r.animation}const tP=St.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function eP(n,t,e){St.useInsertionEffect(()=>n.on(t,e),[n,t,e])}function nP(n){const t=lE(()=>gr(n)),{isStatic:e}=St.useContext(tP);if(e){const[,r]=St.useState(n);St.useEffect(()=>t.on("change",r),[])}return t}function du(n){return typeof n=="object"&&!Array.isArray(n)}function Yg(n,t,e,r){return n==null?[]:typeof n=="string"&&du(t)?vT(n,e,r):n instanceof NodeList?Array.from(n):Array.isArray(n)?n.filter(s=>s!=null):[n]}function rP(n,t,e){return n*(t+1)+e*t}function jg(n,t,e,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,n+parseFloat(t)):t==="<"?e:t.startsWith("<")?Math.max(0,e+parseFloat(t.slice(1))):r.get(t)??n}function sP(n,t,e){for(let r=0;r<n.length;r++){const s=n[r];s.at>t&&s.at<e&&(Ah(n,s),r--)}}function iP(n,t,e,r,s,i){sP(n,s,i);for(let o=0;o<t.length;o++)n.push({value:t[o],at:Wr(s,i,r[o]),easing:Mp(e,o)})}function oP(n,t,e=0){const r=t+1+t*e;for(let s=0;s<n.length;s++)n[s]=n[s]/r}function aP(n,t){return n.at===t.at?n.value===null?1:t.value===null?-1:0:n.at-t.at}const cP="easeInOut",mu=20;function hP(n,{defaultTransition:t={},...e}={},r,s){const i=t.duration||.3,o=new Map,a=new Map,c={},h=new Map;let u=0,l=0,d=0;for(let f=0;f<n.length;f++){const p=n[f];if(typeof p=="string"){h.set(p,l);continue}else if(!Array.isArray(p)){h.set(p.name,jg(l,p.at,u,h));continue}let[m,b,g={}]=p;g.at!==void 0&&(l=jg(l,g.at,u,h));let w=0;const x=(v,E,_,D=0,z=0)=>{const O=uP(v),{delay:L=0,times:$=Zp(O),type:j=t.type||"keyframes",repeat:Q,repeatType:rt,repeatDelay:ot=0,...nt}=E;let{ease:tt=t.ease||"easeOut",duration:bt}=E;const Y=typeof L=="function"?L(D,z):L,F=O.length,A=su(j)?j:s?.[j||"keyframes"];if(F<=2&&A){let ct=100;if(F===2&&dP(O)){const Tt=O[1]-O[0];ct=Math.abs(Tt)}const ft={...t,...nt};bt!==void 0&&(ft.duration=Se(bt));const et=Hp(ft,ct,A);tt=et.ease,bt=et.duration}bt??(bt=i);const N=l+Y;$.length===1&&$[0]===0&&($[1]=1);const H=$.length-O.length;if(H>0&&Jp($,H),O.length===1&&O.unshift(null),Q&&$r(Q<mu,`Sequence segments can't repeat ${Q} times — ignoring repeat option. Use a value below ${mu} or apply repeat at the sequence level instead.`),Q&&Q<mu){const ct=bt>0?ot/bt:0;bt=rP(bt,Q,ot);const ft=[...O],et=[...$];tt=Array.isArray(tt)?[...tt]:[tt];const Tt=[...tt],lt=rt==="reverse"||rt==="mirror";let Mt=ft,ke=Tt;lt&&(Mt=[...ft].reverse(),rt==="reverse"&&(ke=[...Tt].reverse().map(Xt=>typeof Xt=="function"?Ih(Xt):Xt)));for(let Xt=0;Xt<Q;Xt++){const Pe=lt&&Xt%2===0,ve=Pe?Mt:ft,V=Pe?ke:Tt,At=(Xt+1)*(1+ct);ct>0&&(O.push(O[O.length-1]),$.push(At),tt.push("linear")),O.push(...ve);for(let Dt=0;Dt<ve.length;Dt++)$.push(et[Dt]+At),tt.push(Dt===0?"linear":Mp(V,Dt-1))}oP($,Q,ct)}const K=N+bt;iP(_,O,tt,$,N,K),w=Math.max(Y+bt,w),d=Math.max(K,d)};if(ue(m)){const v=Gg(m,a);x(b,g,Xg("default",v))}else{const v=Yg(m,b,r,c),E=v.length;for(let _=0;_<E;_++){b=b,g=g;const D=v[_],z=Gg(D,a);for(const O in b)x(b[O],lP(g,O),Xg(O,z),_,E)}}u=l,l+=w}return a.forEach((f,p)=>{for(const m in f){const b=f[m];b.sort(aP);const g=[],w=[],x=[];for(let D=0;D<b.length;D++){const{at:z,value:O,easing:L}=b[D];g.push(O),w.push(Oh(0,d,z)),x.push(L||"easeOut")}w[0]!==0&&(w.unshift(0),g.unshift(g[0]),x.unshift(cP)),w[w.length-1]!==1&&(w.push(1),g.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const v=o.get(p);v.keyframes[m]=g;const{type:E,..._}=t;v.transition[m]={..._,duration:d,ease:x,times:w,...e}}}),o}function Gg(n,t){return!t.has(n)&&t.set(n,{}),t.get(n)}function Xg(n,t){return t[n]||(t[n]=[]),t[n]}function uP(n){return Array.isArray(n)?n:[n]}function lP(n,t){return n&&n[t]?{...n,...n[t]}:{...n}}const fP=n=>typeof n=="number",dP=n=>n.every(fP);function mP(n){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=Dg(n)&&!xT(n)?new ZT(t):new $T(t);e.mount(n),Ws.set(n,e)}function pP(n){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new YT(t);e.mount(n),Ws.set(n,e)}function gP(n,t){return ue(n)||typeof n=="number"||typeof n=="string"&&!du(t)}function Wg(n,t,e,r){const s=[];if(gP(n,t))s.push(QT(n,du(t)&&t.default||t,e&&(e.default||e)));else{if(n==null)return s;const i=Yg(n,t,r),o=i.length;$n(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const c=i[a],h=c instanceof Element?mP:pP;Ws.has(c)||h(c);const u=Ws.get(c),l={...e};"delay"in l&&typeof l.delay=="function"&&(l.delay=l.delay(a,o)),s.push(...cT(u,{...t,transition:l},{}))}}return s}function yP(n,t,e){const r=[],s=n.map(o=>{if(Array.isArray(o)&&typeof o[0]=="function"){const a=o[0],c=gr(0);return c.on("change",a),o.length===1?[c,[0,1]]:o.length===2?[c,[0,1],o[1]]:[c,o[1],o[2]]}return o});return hP(s,t,e,{spring:Gs}).forEach(({keyframes:o,transition:a},c)=>{r.push(...Wg(c,o,a))}),r}function bP(n){return Array.isArray(n)&&n.some(Array.isArray)}function vP(n={}){const{scope:t,reduceMotion:e,skipAnimations:r}=n;function s(i,o,a){let c=[],h;const u={};if(e!==void 0&&(u.reduceMotion=e),r!==void 0&&(u.skipAnimations=r),bP(i)){const{onComplete:d,...f}=o||{};typeof d=="function"&&(h=d),c=yP(i,{...u,...f},t)}else{const{onComplete:d,...f}=a||{};typeof d=="function"&&(h=d),c=Wg(i,o,{...u,...f},t)}const l=new FC(c);return h&&l.finished.then(h),t&&(t.animations.push(l),l.finished.then(()=>{Ah(t.animations,l)})),l}return s}const pu=vP(),Hg="0%",wP="100%",qg="20%",gu="80%",qs="#0000",je="#000";function xP(n){const t=nP(`linear-gradient(90deg, ${je}, ${je} ${Hg}, ${je} ${gu}, ${qs})`);return eP(n,"change",e=>{e===0?pu(t,`linear-gradient(90deg, ${je}, ${je} ${Hg}, ${je} ${gu}, ${qs})`):e===1?pu(t,`linear-gradient(90deg, ${qs}, ${je} ${qg}, ${je} ${wP}, ${je})`):(n.getPrevious()===0||n.getPrevious()===1)&&pu(t,`linear-gradient(90deg, ${qs}, ${je} ${qg}, ${je} ${gu}, ${qs})`)}),t}var yu={exports:{}},bu={},Lo={exports:{}},vu={};/**
78
+ **/function K_(){q_()}({}).NODE_ENV!=="production"&&K_();function J_(n){const[t,e]=St.useState(n),r=St.useRef(t),s=St.useRef(za()),i=St.useCallback(o=>{e(a=>{const c=typeof o=="function"?o(a):o;return Object.is(a,c)?a:(r.current=c,s.current.emit(c),c)})},[]);return St.useMemo(()=>({getState:()=>r.current,setState:i,subscribe:o=>{Zn(()=>o(r.current));const a=s.current.subscribe(c=>{Zn(()=>o(c))});return()=>a()}}),[])}function Z_(n){const t=Gm(n),e=za();return{getState:()=>t.value,setState:s=>{const i=typeof s=="function"?s(t.value):s;Object.is(t.value,i)||(t.value=i,e.emit(i))},subscribe:s=>(Zn(()=>s(t.value)),e.subscribe(i=>{Zn(()=>s(i))}))}}function Q_(n){const t=new Wi(n);return{getState:()=>t.value,setState:e=>{const r=t.value,s=typeof e=="function"?e(r):e;Object.is(r,s)||t.next(s)},subscribe:e=>{const r=t.subscribe(s=>{Zn(()=>e(s))});return()=>r.unsubscribe()}}}function Ah(n,t){let e=n;const r=za();return{getState:()=>e,setState:s=>{const i=typeof s=="function"?s(e):s;Object.is(e,i)||t?.beforeChange&&!t.beforeChange(i)||(e=i,r.emit(e))},subscribe:s=>{Zn(()=>s(e));const i=r.subscribe(o=>{Zn(()=>s(o))});return()=>i()}}}function mp(n){const t=n.initState||{};let e=n.reducer;if(n.enhancer)return n.enhancer(mp)({reducer:e,initState:t});const r=Ah(t),s=o=>{const a=e(r.getState(),o);r.setState(a)},i=o=>{e=o,s({type:Symbol()})};return s({type:Symbol()}),{getState:r.getState,dispatch:s,subscribe:r.subscribe,replaceReducer:i}}function tE(n,t=!0){const e=Object.keys(n);return(r={},s)=>{const i=t?{...r}:r;for(const o of e){const a=n[o](i[o]??{},s);if(a===void 0)throw new Error(`Reducer "${o}" returned undefined`);i[o]=a}return i}}function eE(...n){return t=>e=>{const r=t(e);let s=r.dispatch;const i={getState:r.getState,dispatch:s},o=n.map(a=>a(i));return s=J1(...o)(s),r.dispatch=s,r}}function nE(n){const t=new Wi(void 0),e=new un;let r=null,s=!1,i=!1;return{middleware(o){return s?a=>a:(s=!0,t.next(o.getState()),a=>c=>{const h=a(c);return t.next(o.getState()),e.next(c),h})},run(o,a){if(!s)throw new Error("EpicMiddleware should applyMiddleware() to store before");if(i)throw new Error("EpicMiddleware destroyed");return r||(r=o(e,t,{...n?.dependencies??{},dispatch:a.dispatch}).pipe(Jd((c,h)=>(hb("[Epic Error]",c),h))).subscribe({next(c){a.dispatch(c)},error(c){console.error("[Epic Fatal Error]",c)}}),r)},destroy(){i=!0,r?.unsubscribe(),r=null,e.complete(),t.complete()}}}function rE(...n){return(t,e,r)=>qi(...n.map(s=>s(t,e,r)))}function sE(...n){return Nc(t=>n.includes(t.type))}function iE(){return{middleware(n){return t=>e=>typeof e=="function"?e(n.dispatch,n.getState):t(e)}}}const oE=n=>{let t=0;return e=>r=>{gf.start(`--- ${++t}: action(${String(r.type)}) ---`),Pn(`action: ${Ci(r)}`),Pn(`old-state: ${Ci(n.getState())}`),e(r),Pn(`new-state: ${Ci(n.getState())}`),gf.end()}},aE=n=>t=>e=>{try{t(e)}catch(r){throw Pn(`Reducer错误报告: ${r}`),r}},cE=n=>t=>e=>{const r=`dispatch(${String(e.type)}) execute time`;yf.start(r),t(e),yf.end(r)};function hE(n="",t){const{OPERATION_DELIMITER:e="/",KEY_DELIMITER:r=",",KEY_VALUE_DELIMITER:s=":"}=t||{};return n.split(e).filter(i=>i!=="").reduce((i,o)=>{const[a,...c]=o.split(r);if(c.length===0){const[h,u]=a.split(s);i.push({type:h,payload:u!==void 0?decodeURIComponent(u):!0})}else{if(a.indexOf(s)!==-1)throw new Error(`"${a}" is invalid`);i.push(c.reduce((h,u)=>{const[l,d]=u.split(s);return h[l]=d!==void 0?decodeURIComponent(d):!0,h},{type:a}))}return i},[])}function uE(n){const t=Symbol("AppStore");function e(){const c=a_(n.getState());n.subscribe(l=>{c.value=l});const h=up();if(!h)throw new Error("provideAppStore must be called in setup()");const u={store:n,stateRef:c};h.appContext.provides[t]=u}function r(){const c=cp(t);if(!c)throw new ReferenceError("createVueAppStoreContext's hooks cannot be called before provideAppStore()");return c}function s(){const{store:c}=r();return c}function i(c){const{stateRef:h}=r();return c?dp(()=>c(h.value)):yh(h)}function o(){const c=s();if(bi(c))throw new Error("useSetAppState is only supported for StateStoreLike");return c.setState.bind(c)}function a(){const c=s();if(!bi(c))throw new Error("useDispatch is only supported for ReduxStore");return c.dispatch.bind(c)}return{provideAppStore:e,useAppStore:s,useAppState:i,useSetAppState:o,useDispatch:a}}function lE(n){const t=n.value(),e=is(t);if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const r=Gm(e?t:n.defaultValue),s=dp(()=>e?n.value():r.value);let i=!1;F_(n.value,c=>{if(!i&&is(c)!==e){i=!0,console.warn("[useVueControllableState] can't switch between controlled and uncontrolled mode.");return}},{});let o=0;async function a(c){const h=++o,u=typeof c=="function"?c(s.value):c;n.beforeChange&&!await n.beforeChange(u)||h===o&&(e||(r.value=u),n.onChange?.(u),await Jm())}return[s,a]}const Co=Aw(OS);function fE(n){const t=St.useRef(null);return t.current===null&&(t.current=n()),t.current}function dE(n,t){n.indexOf(t)===-1&&n.push(t)}function Mh(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}const Bn=(n,t,e)=>e>t?t:e<n?n:e;function Dh(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let $r=()=>{},$n=()=>{};typeof process<"u"&&{}.NODE_ENV!=="production"&&($r=(n,t,e)=>{!n&&typeof console<"u"&&console.warn(Dh(t,e))},$n=(n,t,e)=>{if(!n)throw new Error(Dh(t,e))});const Un={},pp=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),mE=n=>typeof n=="object"&&n!==null,gp=n=>/^0[^.\s]+$/u.test(n);function yp(n){let t;return()=>(t===void 0&&(t=n()),t)}const Ur=n=>n,Oh=(...n)=>n.reduce((t,e)=>r=>e(t(r))),Ih=(n,t,e)=>{const r=t-n;return r?(e-n)/r:1};class bp{constructor(){this.subscriptions=[]}add(t){return dE(this.subscriptions,t),()=>Mh(this.subscriptions,t)}notify(t,e,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,e,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,e,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=n=>n*1e3,Ue=n=>n/1e3,vp=(n,t)=>t?n*(1e3/t):0,wp=new Set;function xp(n,t,e){n||wp.has(t)||(console.warn(Dh(t,e)),wp.add(t))}const pE=(n,t,e)=>{const r=t-n;return((e-n)%r+r)%r+n},Sp=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,gE=1e-7,yE=12;function bE(n,t,e,r,s){let i,o,a=0;do o=t+(e-t)/2,i=Sp(o,r,s)-n,i>0?e=o:t=o;while(Math.abs(i)>gE&&++a<yE);return o}function $s(n,t,e,r){if(n===t&&e===r)return Ur;const s=i=>bE(i,0,1,n,e);return i=>i===0||i===1?i:Sp(s(i),t,r)}const _p=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,Rh=n=>t=>1-n(1-t),Ep=$s(.33,1.53,.69,.99),kh=Rh(Ep),Cp=_p(kh),Tp=n=>n>=1?1:(n*=2)<1?.5*kh(n):.5*(2-Math.pow(2,-10*(n-1))),Lh=n=>1-Math.sin(Math.acos(n)),vE=Rh(Lh),Pp=_p(Lh),wE=$s(.42,0,1,1),xE=$s(0,0,.58,1),Ap=$s(.42,0,.58,1),Mp=n=>Array.isArray(n)&&typeof n[0]!="number";function Dp(n,t){return Mp(n)?n[pE(0,n.length,t)]:n}const Op=n=>Array.isArray(n)&&typeof n[0]=="number",Ip={linear:Ur,easeIn:wE,easeInOut:Ap,easeOut:xE,circIn:Lh,circInOut:Pp,circOut:vE,backIn:kh,backInOut:Cp,backOut:Ep,anticipate:Tp},SE=n=>typeof n=="string",Rp=n=>{if(Op(n)){$n(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,e,r,s]=n;return $s(t,e,r,s)}else if(SE(n))return $n(Ip[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),Ip[n];return n},To=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _E(n){let t=new Set,e=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(h){i.has(h)&&(c.schedule(h),n()),h(o)}const c={schedule:(h,u=!1,l=!1)=>{const f=l&&r?t:e;return u&&i.add(h),f.add(h),h},cancel:h=>{e.delete(h),i.delete(h)},process:h=>{if(o=h,r){s=!0;return}r=!0;const u=t;t=e,e=u,t.forEach(a),t.clear(),r=!1,s&&(s=!1,c.process(h))}};return c}const EE=40;function kp(n,t){let e=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,o=To.reduce((x,v)=>(x[v]=_E(i),x),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:u,update:l,preRender:d,render:f,postRender:p}=o,m=()=>{const x=Un.useManualTiming,v=x?s.timestamp:performance.now();e=!1,x||(s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,EE),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),c.process(s),h.process(s),u.process(s),l.process(s),d.process(s),f.process(s),p.process(s),s.isProcessing=!1,e&&t&&(r=!1,n(m))},b=()=>{e=!0,r=!0,s.isProcessing||n(m)};return{schedule:To.reduce((x,v)=>{const E=o[v];return x[v]=(_,D=!1,z=!1)=>(e||b(),E.schedule(_,D,z)),x},{}),cancel:x=>{for(let v=0;v<To.length;v++)o[To[v]].cancel(x)},state:s,steps:o}}const{schedule:Qe,cancel:Nh,state:Po,steps:jD}=kp(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ur,!0);let Ao;function CE(){Ao=void 0}const _e={now:()=>(Ao===void 0&&_e.set(Po.isProcessing||Un.useManualTiming?Po.timestamp:performance.now()),Ao),set:n=>{Ao=n,queueMicrotask(CE)}},Lp=n=>t=>typeof t=="string"&&t.startsWith(n),Np=Lp("--"),TE=Lp("var(--"),zh=n=>TE(n)?PE.test(n.split("/*")[0].trim()):!1,PE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zp(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Yr={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Us={...Yr,transform:n=>Bn(0,1,n)},Mo={...Yr,default:1},Ys=n=>Math.round(n*1e5)/1e5,Vh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AE(n){return n==null}const ME=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fh=(n,t)=>e=>!!(typeof e=="string"&&ME.test(e)&&e.startsWith(n)||t&&!AE(e)&&Object.prototype.hasOwnProperty.call(e,t)),Vp=(n,t,e)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Vh);return{[n]:parseFloat(s),[t]:parseFloat(i),[e]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},DE=n=>Bn(0,255,n),Bh={...Yr,transform:n=>Math.round(DE(n))},dr={test:Fh("rgb","red"),parse:Vp("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:r=1})=>"rgba("+Bh.transform(n)+", "+Bh.transform(t)+", "+Bh.transform(e)+", "+Ys(Us.transform(r))+")"};function OE(n){let t="",e="",r="",s="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),r=n.substring(5,7),s=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),r=n.substring(3,4),s=n.substring(4,5),t+=t,e+=e,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const $h={test:Fh("#"),parse:OE,transform:dr.transform},js=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),bn=js("deg"),jr=js("%"),q=js("px"),IE=js("vh"),RE=js("vw"),Fp=(()=>({...jr,parse:n=>jr.parse(n)/100,transform:n=>jr.transform(n*100)}))(),Gr={test:Fh("hsl","hue"),parse:Vp("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:r=1})=>"hsla("+Math.round(n)+", "+jr.transform(Ys(t))+", "+jr.transform(Ys(e))+", "+Ys(Us.transform(r))+")"},Yt={test:n=>dr.test(n)||$h.test(n)||Gr.test(n),parse:n=>dr.test(n)?dr.parse(n):Gr.test(n)?Gr.parse(n):$h.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?dr.transform(n):Gr.transform(n),getAnimatableNone:n=>{const t=Yt.parse(n);return t.alpha=0,Yt.transform(t)}},kE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function LE(n){return isNaN(n)&&typeof n=="string"&&(n.match(Vh)?.length||0)+(n.match(kE)?.length||0)>0}const Bp="number",$p="color",NE="var",zE="var(",Up="${}",VE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Xr(n){const t=n.toString(),e=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(VE,c=>(Yt.test(c)?(r.color.push(i),s.push($p),e.push(Yt.parse(c))):c.startsWith(zE)?(r.var.push(i),s.push(NE),e.push(c)):(r.number.push(i),s.push(Bp),e.push(parseFloat(c))),++i,Up)).split(Up);return{values:e,split:a,indexes:r,types:s}}function FE(n){return Xr(n).values}function Yp({split:n,types:t}){const e=n.length;return r=>{let s="";for(let i=0;i<e;i++)if(s+=n[i],r[i]!==void 0){const o=t[i];o===Bp?s+=Ys(r[i]):o===$p?s+=Yt.transform(r[i]):s+=r[i]}return s}}function BE(n){return Yp(Xr(n))}const $E=n=>typeof n=="number"?0:Yt.test(n)?Yt.getAnimatableNone(n):n,UE=(n,t)=>typeof n=="number"?t?.trim().endsWith("/")?n:0:$E(n);function YE(n){const t=Xr(n);return Yp(t)(t.values.map((r,s)=>UE(r,t.split[s])))}const Ye={test:LE,parse:FE,createTransformer:BE,getAnimatableNone:YE};function Uh(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function jE({hue:n,saturation:t,lightness:e,alpha:r}){n/=360,t/=100,e/=100;let s=0,i=0,o=0;if(!t)s=i=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;s=Uh(c,a,n+1/3),i=Uh(c,a,n),o=Uh(c,a,n-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Do(n,t){return e=>e>0?t:n}const Wr=(n,t,e)=>n+(t-n)*e,Yh=(n,t,e)=>{const r=n*n,s=e*(t*t-r)+r;return s<0?0:Math.sqrt(s)},GE=[$h,dr,Gr],XE=n=>GE.find(t=>t.test(n));function jp(n){const t=XE(n);if($r(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let e=t.parse(n);return t===Gr&&(e=jE(e)),e}const Gp=(n,t)=>{const e=jp(n),r=jp(t);if(!e||!r)return Do(n,t);const s={...e};return i=>(s.red=Yh(e.red,r.red,i),s.green=Yh(e.green,r.green,i),s.blue=Yh(e.blue,r.blue,i),s.alpha=Wr(e.alpha,r.alpha,i),dr.transform(s))},jh=new Set(["none","hidden"]);function WE(n,t){return jh.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}function HE(n,t){return e=>Wr(n,t,e)}function Gh(n){return typeof n=="number"?HE:typeof n=="string"?zh(n)?Do:Yt.test(n)?Gp:JE:Array.isArray(n)?Xp:typeof n=="object"?Yt.test(n)?Gp:qE:Do}function Xp(n,t){const e=[...n],r=e.length,s=n.map((i,o)=>Gh(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)e[o]=s[o](i);return e}}function qE(n,t){const e={...n,...t},r={};for(const s in e)n[s]!==void 0&&t[s]!==void 0&&(r[s]=Gh(n[s])(n[s],t[s]));return s=>{for(const i in r)e[i]=r[i](s);return e}}function KE(n,t){const e=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=n.indexes[i][r[i]],a=n.values[o]??0;e[s]=a,r[i]++}return e}const JE=(n,t)=>{const e=Ye.createTransformer(t),r=Xr(n),s=Xr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?jh.has(n)&&!s.values.length||jh.has(t)&&!r.values.length?WE(n,t):Oh(Xp(KE(r,s),s.values),e):($r(!0,`Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Do(n,t))};function Wp(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?Wr(n,t,e):Gh(n)(n,t)}const ZE=n=>{const t=({timestamp:e})=>n(e);return{start:(e=!0)=>Qe.update(t,e),stop:()=>Nh(t),now:()=>Po.isProcessing?Po.timestamp:_e.now()}},Hp=(n,t,e=10)=>{let r="";const s=Math.max(Math.round(t/e),2);for(let i=0;i<s;i++)r+=Math.round(n(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Oo=2e4;function Xh(n){let t=0;const e=50;let r=n.next(t);for(;!r.done&&t<Oo;)t+=e,r=n.next(t);return t>=Oo?1/0:t}function qp(n,t=100,e){const r=e({...n,keyframes:[0,t]}),s=Math.min(Xh(r),Oo);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Ue(s)}}const Lt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Wh(n,t){return n*Math.sqrt(1-t*t)}const QE=12;function tC(n,t,e){let r=e;for(let s=1;s<QE;s++)r=r-n(r)/t(r);return r}const Hh=.001;function eC({duration:n=Lt.duration,bounce:t=Lt.bounce,velocity:e=Lt.velocity,mass:r=Lt.mass}){let s,i;$r(n<=Se(Lt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Bn(Lt.minDamping,Lt.maxDamping,o),n=Bn(Lt.minDuration,Lt.maxDuration,Ue(n)),o<1?(s=h=>{const u=h*o,l=u*n,d=u-e,f=Wh(h,o),p=Math.exp(-l);return Hh-d/f*p},i=h=>{const l=h*o*n,d=l*e+e,f=Math.pow(o,2)*Math.pow(h,2)*n,p=Math.exp(-l),m=Wh(Math.pow(h,2),o);return(-s(h)+Hh>0?-1:1)*((d-f)*p)/m}):(s=h=>{const u=Math.exp(-h*n),l=(h-e)*n+1;return-Hh+u*l},i=h=>{const u=Math.exp(-h*n),l=(e-h)*(n*n);return u*l});const a=5/n,c=tC(s,i,a);if(n=Se(n),isNaN(c))return{stiffness:Lt.stiffness,damping:Lt.damping,duration:n};{const h=Math.pow(c,2)*r;return{stiffness:h,damping:o*2*Math.sqrt(r*h),duration:n}}}const nC=["duration","bounce"],rC=["stiffness","damping","mass"];function Kp(n,t){return t.some(e=>n[e]!==void 0)}function sC(n){let t={velocity:Lt.velocity,stiffness:Lt.stiffness,damping:Lt.damping,mass:Lt.mass,isResolvedFromDuration:!1,...n};if(!Kp(n,rC)&&Kp(n,nC))if(t.velocity=0,n.visualDuration){const e=n.visualDuration,r=2*Math.PI/(e*1.2),s=r*r,i=2*Bn(.05,1,1-(n.bounce||0))*Math.sqrt(s);t={...t,mass:Lt.mass,stiffness:s,damping:i}}else{const e=eC({...n,velocity:0});t={...t,...e,mass:Lt.mass},t.isResolvedFromDuration=!0}return t}function Gs(n=Lt.visualDuration,t=Lt.bounce){const e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:r,restDelta:s}=e;const i=e.keyframes[0],o=e.keyframes[e.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:h,mass:u,duration:l,velocity:d,isResolvedFromDuration:f}=sC({...e,velocity:-Ue(e.velocity||0)}),p=d||0,m=h/(2*Math.sqrt(c*u)),b=o-i,g=Ue(Math.sqrt(c/u)),w=Math.abs(b)<5;r||(r=w?Lt.restSpeed.granular:Lt.restSpeed.default),s||(s=w?Lt.restDelta.granular:Lt.restDelta.default);let x,v,E,_,D,z;if(m<1)E=Wh(g,m),_=(p+m*g*b)/E,x=L=>{const $=Math.exp(-m*g*L);return o-$*(_*Math.sin(E*L)+b*Math.cos(E*L))},D=m*g*_+b*E,z=m*g*b-_*E,v=L=>Math.exp(-m*g*L)*(D*Math.sin(E*L)+z*Math.cos(E*L));else if(m===1){x=$=>o-Math.exp(-g*$)*(b+(p+g*b)*$);const L=p+g*b;v=$=>Math.exp(-g*$)*(g*L*$-p)}else{const L=g*Math.sqrt(m*m-1);x=rt=>{const ot=Math.exp(-m*g*rt),nt=Math.min(L*rt,300);return o-ot*((p+m*g*b)*Math.sinh(nt)+L*b*Math.cosh(nt))/L};const $=(p+m*g*b)/L,j=m*g*$-b*L,Q=m*g*b-$*L;v=rt=>{const ot=Math.exp(-m*g*rt),nt=Math.min(L*rt,300);return ot*(j*Math.sinh(nt)+Q*Math.cosh(nt))}}const O={calculatedDuration:f&&l||null,velocity:L=>Se(v(L)),next:L=>{if(!f&&m<1){const j=Math.exp(-m*g*L),Q=Math.sin(E*L),rt=Math.cos(E*L),ot=o-j*(_*Q+b*rt),nt=Se(j*(D*Q+z*rt));return a.done=Math.abs(nt)<=r&&Math.abs(o-ot)<=s,a.value=a.done?o:ot,a}const $=x(L);if(f)a.done=L>=l;else{const j=Se(v(L));a.done=Math.abs(j)<=r&&Math.abs(o-$)<=s}return a.value=a.done?o:$,a},toString:()=>{const L=Math.min(Xh(O),Oo),$=Hp(j=>O.next(L*j).value,L,30);return L+"ms "+$},toTransition:()=>{}};return O}Gs.applyToOptions=n=>{const t=qp(n,100,Gs);return n.ease=t.ease,n.duration=Se(t.duration),n.type="keyframes",n};const iC=5;function Jp(n,t,e){const r=Math.max(t-iC,0);return vp(e-n(r),t-r)}function qh({keyframes:n,velocity:t=0,power:e=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:h=.5,restSpeed:u}){const l=n[0],d={done:!1,value:l},f=z=>a!==void 0&&z<a||c!==void 0&&z>c,p=z=>a===void 0?c:c===void 0||Math.abs(a-z)<Math.abs(c-z)?a:c;let m=e*t;const b=l+m,g=o===void 0?b:o(b);g!==b&&(m=g-l);const w=z=>-m*Math.exp(-z/r),x=z=>g+w(z),v=z=>{const O=w(z),L=x(z);d.done=Math.abs(O)<=h,d.value=d.done?g:L};let E,_;const D=z=>{f(d.value)&&(E=z,_=Gs({keyframes:[d.value,p(d.value)],velocity:Jp(x,z,d.value),damping:s,stiffness:i,restDelta:h,restSpeed:u}))};return D(0),{calculatedDuration:null,next:z=>{let O=!1;return!_&&E===void 0&&(O=!0,v(z),D(z)),E!==void 0&&z>=E?_.next(z-E):(!O&&v(z),d)}}}function oC(n,t,e){const r=[],s=e||Un.mix||Wp,i=n.length-1;for(let o=0;o<i;o++){let a=s(n[o],n[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ur:t;a=Oh(c,a)}r.push(a)}return r}function aC(n,t,{clamp:e=!0,ease:r,mixer:s}={}){const i=n.length;if($n(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=n[0]===n[1];n[0]>n[i-1]&&(n=[...n].reverse(),t=[...t].reverse());const a=oC(t,r,s),c=a.length,h=u=>{if(o&&u<n[0])return t[0];let l=0;if(c>1)for(;l<n.length-2&&!(u<n[l+1]);l++);const d=Ih(n[l],n[l+1],u);return a[l](d)};return e?u=>h(Bn(n[0],n[i-1],u)):h}function Zp(n,t){const e=n[n.length-1];for(let r=1;r<=t;r++){const s=Ih(0,t,r);n.push(Wr(e,1,s))}}function Qp(n){const t=[0];return Zp(t,n.length-1),t}function cC(n,t){return n.map(e=>e*t)}function hC(n,t){return n.map(()=>t||Ap).splice(0,n.length-1)}function Hr({duration:n=300,keyframes:t,times:e,ease:r="easeInOut"}){const s=Mp(r)?r.map(Rp):Rp(r),i={done:!1,value:t[0]},o=cC(e&&e.length===t.length?e:Qp(t),n),a=aC(o,t,{ease:Array.isArray(s)?s:hC(t,s)});return{calculatedDuration:n,next:c=>(i.value=a(c),i.done=c>=n,i)}}const uC=n=>n!==null;function Io(n,{repeat:t,repeatType:e="loop"},r,s=1){const i=n.filter(uC),a=s<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const lC={decay:qh,inertia:qh,tween:Hr,keyframes:Hr,spring:Gs};function tg(n){typeof n.type=="string"&&(n.type=lC[n.type])}class Kh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const fC=n=>n/100;class Ro extends Kh{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==_e.now()&&this.tick(_e.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;tg(t);const{type:e=Hr,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=e||Hr;({}).NODE_ENV!=="production"&&c!==Hr&&$n(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Hr&&typeof a[0]!="number"&&(this.mixKeyframes=Oh(fC,Wp(a[0],a[1])),a=[0,100]);const h=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),h.calculatedDuration===null&&(h.calculatedDuration=Xh(h));const{calculatedDuration:u}=h;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=h}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:u,repeat:l,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-h*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,v=r;if(l){const z=Math.min(this.currentTime,s)/a;let O=Math.floor(z),L=z%1;!L&&z>=1&&(L=1),L===1&&O--,O=Math.min(O,l+1),!!(O%2)&&(d==="reverse"?(L=1-L,f&&(L-=f/a)):d==="mirror"&&(v=o)),x=Bn(0,1,L)*a}let E;w?(this.delayState.value=u[0],E=this.delayState):E=v.next(x),i&&!w&&(E.value=i(E.value));let{done:_}=E;!w&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return D&&p!==qh&&(E.value=Io(u,this.options,b,this.speed)),m&&m(E.value),D&&this.finish(),E}then(t,e){return this.finished.then(t,e)}get duration(){return Ue(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ue(t)}get time(){return Ue(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const e=this.generator.next(t).value;return Jp(r=>this.generator.next(r).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(_e.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=Ue(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ZE,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=e??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_e.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function dC(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const mr=n=>n*180/Math.PI,Jh=n=>{const t=mr(Math.atan2(n[1],n[0]));return Zh(t)},mC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Jh,rotateZ:Jh,skewX:n=>mr(Math.atan(n[1])),skewY:n=>mr(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Zh=n=>(n=n%360,n<0&&(n+=360),n),eg=Jh,ng=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),rg=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),pC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ng,scaleY:rg,scale:n=>(ng(n)+rg(n))/2,rotateX:n=>Zh(mr(Math.atan2(n[6],n[5]))),rotateY:n=>Zh(mr(Math.atan2(-n[2],n[0]))),rotateZ:eg,rotate:eg,skewX:n=>mr(Math.atan(n[4])),skewY:n=>mr(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function Qh(n){return n.includes("scale")?1:0}function tu(n,t){if(!n||n==="none")return Qh(t);const e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(e)r=pC,s=e;else{const a=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=mC,s=a}if(!s)return Qh(t);const i=r[t],o=s[1].split(",").map(yC);return typeof i=="function"?i(o):o[i]}const gC=(n,t)=>{const{transform:e="none"}=getComputedStyle(n);return tu(e,t)};function yC(n){return parseFloat(n.trim())}const qr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kr=(()=>new Set([...qr,"pathRotation"]))(),sg=n=>n===Yr||n===q,bC=new Set(["x","y","z"]),vC=qr.filter(n=>!bC.has(n));function wC(n){const t=[];return vC.forEach(e=>{const r=n.getValue(e);r!==void 0&&(t.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))}),t}const Yn={width:({x:n},{paddingLeft:t="0",paddingRight:e="0",boxSizing:r})=>{const s=n.max-n.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(e)},height:({y:n},{paddingTop:t="0",paddingBottom:e="0",boxSizing:r})=>{const s=n.max-n.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(e)},top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>tu(t,"x"),y:(n,{transform:t})=>tu(t,"y")};Yn.translateX=Yn.x,Yn.translateY=Yn.y;const pr=new Set;let eu=!1,nu=!1,ru=!1;function ig(){if(nu){const n=Array.from(pr).filter(r=>r.needsMeasurement),t=new Set(n.map(r=>r.element)),e=new Map;t.forEach(r=>{const s=wC(r);s.length&&(e.set(r,s),r.render())}),n.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=e.get(r);s&&s.forEach(([i,o])=>{r.getValue(i)?.set(o)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}nu=!1,eu=!1,pr.forEach(n=>n.complete(ru)),pr.clear()}function og(){pr.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(nu=!0)})}function xC(){ru=!0,og(),ig(),ru=!1}class su{constructor(t,e,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(pr.add(this),eu||(eu=!0,Qe.read(og),Qe.resolveKeyframes(ig))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:r,motionValue:s}=this;if(t[0]===null){const i=s?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&e){const a=r.readValue(e,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}dC(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pr.delete(this)}cancel(){this.state==="scheduled"&&(pr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const SC=n=>n.startsWith("--");function ag(n,t,e){SC(t)?n.style.setProperty(t,e):n.style[t]=e}const _C={};function cg(n,t){const e=yp(n);return()=>_C[t]??e()}const EC=cg(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),hg=cg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xs=([n,t,e,r])=>`cubic-bezier(${n}, ${t}, ${e}, ${r})`,ug={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xs([0,.65,.55,1]),circOut:Xs([.55,0,1,.45]),backIn:Xs([.31,.01,.66,-.59]),backOut:Xs([.33,1.53,.69,.99])};function lg(n,t){if(n)return typeof n=="function"?hg()?Hp(n,t):"ease-out":Op(n)?Xs(n):Array.isArray(n)?n.map(e=>lg(e,t)||ug.easeOut):ug[n]}function CC(n,t,e,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},h=void 0){const u={[t]:e};c&&(u.offset=c);const l=lg(a,s);Array.isArray(l)&&(u.easing=l);const d={delay:r,duration:s,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return h&&(d.pseudoElement=h),n.animate(u,d)}function iu(n){return typeof n=="function"&&"applyToOptions"in n}function TC({type:n,...t}){return iu(n)&&hg()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fg extends Kh{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,$n(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const h=TC(t);this.animation=CC(e,r,s,h,i),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Io(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),ag(e,r,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ue(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ue(t)}get time(){return Ue(Number(this.animation.currentTime)||0)}set time(t){const e=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Se(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&EC()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),r&&(this.animation.rangeEnd=r),Ur):s(this)}}const dg={anticipate:Tp,backInOut:Cp,circInOut:Pp};function PC(n){return n in dg}function AC(n){typeof n.ease=="string"&&PC(n.ease)&&(n.ease=dg[n.ease])}const ou=10;class MC extends fg{constructor(t){AC(t),tg(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!e)return;if(t!==void 0){e.set(t);return}const a=new Ro({...o,autoplay:!1}),c=Math.max(ou,_e.now()-this.startTime),h=Bn(0,ou,c-ou),u=a.sample(c).value,{name:l}=this.options;i&&l&&ag(i,l,u),e.setWithVelocity(a.sample(Math.max(0,c-h)).value,u,h),a.stop()}}const mg=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Ye.test(n)||n==="0")&&!n.startsWith("url("));function DC(n){const t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function OC(n,t,e,r){const s=n[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=n[n.length-1],o=mg(s,t),a=mg(i,t);return $r(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:DC(n)||(e==="spring"||iu(e))&&r}function au(n){n.duration=0,n.type="keyframes"}const pg=new Set(["opacity","clipPath","filter","transform"]),IC=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function RC(n){for(let t=0;t<n.length;t++)if(typeof n[t]=="string"&&IC.test(n[t]))return!0;return!1}const kC=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),LC=yp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function NC(n){const{motionValue:t,name:e,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:u}=t.owner.getProps();return LC()&&e&&(pg.has(e)||kC.has(e)&&RC(a))&&(e!=="transform"||!u)&&!h&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const zC=40;class VC extends Kh{constructor({autoplay:t=!0,delay:e=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:h,element:u,...l}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_e.now();const d={autoplay:t,delay:e,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:h,element:u,...l},f=u?.KeyframeResolver||su;this.keyframeResolver=new f(a,(p,m,b)=>this.onKeyframesResolved(p,m,d,!b),c,h,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,r,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:h,onUpdate:u}=r;this.resolvedAt=_e.now();let l=!0;OC(t,i,o,a)||(l=!1,(Un.instantAnimations||!c)&&u?.(Io(t,r,e)),t[0]=t[t.length-1],au(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>zC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...r,keyframes:t},p=l&&!h&&NC(f),m=f.motionValue?.owner?.current;let b;if(p)try{b=new MC({...f,element:m})}catch{b=new Ro(f)}else b=new Ro(f);b.finished.then(()=>{this.notifyFinished()}).catch(Ur),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),xC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class FC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=e}attachTimeline(t){const e=this.animations.map(r=>r.attachTimeline(t));return()=>{e.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return gg(this.animations,"duration")}get iterationDuration(){return gg(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function gg(n,t){let e=0;for(let r=0;r<n.length;r++){const s=n[r][t];s!==null&&s>e&&(e=s)}return e}class BC extends FC{then(t,e){return this.finished.finally(t).then(()=>{})}}const yg=30,$C=n=>!isNaN(parseFloat(n));class UC{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=_e.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=_e.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=$C(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return{}.NODE_ENV!=="production"&&xp(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new bp);const r=this.events[t].add(e);return t==="change"?()=>{r(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,r){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_e.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>yg)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,yg);return vp(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gr(n,t){return new UC(n,t)}function bg(n,t){if(n?.inherit&&t){const{inherit:e,...r}=n;return{...t,...r}}return n}function vg(n,t){const e=n?.[t]??n?.default??n;return e!==n?bg(e,n):e}const YC={type:"spring",stiffness:500,damping:25,restSpeed:10},jC=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),GC={type:"keyframes",duration:.8},XC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WC=(n,{keyframes:t})=>t.length>2?GC:Kr.has(n)?n.startsWith("scale")?jC(t[1]):YC:XC,HC=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function qC(n){for(const t in n)if(!HC.has(t))return!0;return!1}const wg=(n,t,e,r={},s,i)=>o=>{const a=vg(r,n)||{},c=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Se(c);const u={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-h,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:n,motionValue:t,element:i?void 0:s};qC(a)||Object.assign(u,WC(n,u)),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let l=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(au(u),u.delay===0&&(l=!0)),(Un.instantAnimations||Un.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(l=!0,au(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,l&&!i&&t.get()!==void 0){const d=Io(u.keyframes,a);if(d!==void 0){Qe.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Ro(u):new VC(u)},KC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function JC(n){const t=KC.exec(n);if(!t)return[,];const[,e,r,s]=t;return[`--${e??r}`,s]}const ZC=4;function xg(n,t,e=1){$n(e<=ZC,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=JC(n);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return pp(o)?parseFloat(o):o}return zh(s)?xg(s,t,e+1):s}function Sg(n){const t=[{},{}];return n?.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function _g(n,t,e,r){if(typeof t=="function"){const[s,i]=Sg(r);t=t(e!==void 0?e:n.custom,s,i)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[s,i]=Sg(r);t=t(e!==void 0?e:n.custom,s,i)}return t}function QC(n,t,e){const r=n.getProps();return _g(r,t,e!==void 0?e:r.custom,n)}const Eg=new Set(["width","height","top","left","right","bottom",...qr]),tT=n=>Array.isArray(n);function eT(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,gr(e))}function nT(n){return tT(n)?n[n.length-1]||0:n}function rT(n,t){const e=QC(n,t);let{transitionEnd:r={},transition:s={},...i}=e||{};i={...i,...r};for(const o in i){const a=nT(i[o]);eT(n,o,a)}}const ue=n=>!!(n&&n.getVelocity);function sT(n){return!!(ue(n)&&n.add)}function iT(n,t){const e=n.getValue("willChange");if(sT(e))return e.add(t);if(!e&&Un.WillChange){const r=new Un.WillChange("auto");n.addValue("willChange",r),r.add(t)}}function cu(n){return n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const oT="data-"+cu("framerAppearId");function aT(n){return n.props[oT]}function cT({protectedKeys:n,needsAnimating:t},e){const r=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,r}function hT(n,t,{delay:e=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const c=n.getDefaultTransition();i=i?bg(i,c):c;const h=i?.reduceMotion,u=i?.skipAnimations;r&&(i=r);const l=[],d=s&&n.animationState&&n.animationState.getState()[s],f=i?.path;f&&f.animateVisualElement(n,a,i,e,l);for(const p in a){const m=n.getValue(p,n.latestValues[p]??null),b=a[p];if(b===void 0||d&&cT(d,p))continue;const g={delay:e,...vg(i||{},p)};u&&(g.skipAnimations=!0);const w=m.get();if(w!==void 0&&!m.isAnimating()&&!Array.isArray(b)&&b===w&&!g.velocity){Qe.update(()=>m.set(b));continue}let x=!1;if(window.MotionHandoffAnimation){const _=aT(n);if(_){const D=window.MotionHandoffAnimation(_,p,Qe);D!==null&&(g.startTime=D,x=!0)}}iT(n,p);const v=h??n.shouldReduceMotion;m.start(wg(p,m,b,v&&Eg.has(p)?{type:!1}:g,n,x));const E=m.animation;E&&l.push(E)}if(o){const p=()=>Qe.update(()=>{o&&rT(n,o)});l.length?Promise.all(l).then(p):p()}return l}const uT={test:n=>n==="auto",parse:n=>n},Cg=n=>t=>t.test(n),Tg=[Yr,q,jr,bn,RE,IE,uT],Pg=n=>Tg.find(Cg(n));function lT(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||gp(n):!0}const fT=new Set(["brightness","contrast","saturate","opacity"]);function dT(n){const[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[r]=e.match(Vh)||[];if(!r)return n;const s=e.replace(r,"");let i=fT.has(t)?1:0;return r!==e&&(i*=100),t+"("+i+s+")"}const mT=/\b([a-z-]*)\(.*?\)/gu,hu={...Ye,getAnimatableNone:n=>{const t=n.match(mT);return t?t.map(dT).join(" "):n}},uu={...Ye,getAnimatableNone:n=>{const t=Ye.parse(n);return Ye.createTransformer(n)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Ag={...Yr,transform:Math.round},ko={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:bn,pathRotation:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:Mo,scaleX:Mo,scaleY:Mo,scaleZ:Mo,skew:bn,skewX:bn,skewY:bn,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Us,originX:Fp,originY:Fp,originZ:q},zIndex:Ag,fillOpacity:Us,strokeOpacity:Us,numOctaves:Ag},pT={...ko,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:hu,WebkitFilter:hu,mask:uu,WebkitMask:uu},Mg=n=>pT[n],gT=new Set([hu,uu]);function Dg(n,t){let e=Mg(n);return gT.has(e)||(e=Ye),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const yT=new Set(["auto","none","0"]);function bT(n,t,e){let r=0,s;for(;r<n.length&&!s;){const i=n[r];typeof i=="string"&&!yT.has(i)&&Xr(i).values.length&&(s=n[r]),r++}if(s&&e)for(const i of t)n[i]=Dg(e,s)}class vT extends su{constructor(t,e,r,s,i){super(t,e,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:r}=this;if(!e||!e.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),zh(l))){const d=xg(l,e.current);d!==void 0&&(t[u]=d),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Eg.has(r)||t.length!==2)return;const[s,i]=t,o=Pg(s),a=Pg(i),c=zp(s),h=zp(i);if(c!==h&&Yn[r]){this.needsMeasurement=!0;return}if(o!==a)if(sg(o)&&sg(a))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else Yn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||lT(t[s]))&&r.push(s);r.length&&bT(t,r,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Yn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Yn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function wT(n,t,e){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;t&&(r=t.current);const s=e?.[n]??r.querySelectorAll(n);return s?Array.from(s):[]}return Array.from(n).filter(r=>r!=null)}const lu=(n,t)=>t&&typeof n=="number"?t.transform(n):n,{schedule:xT,cancel:WD}=kp(queueMicrotask,!1);function Og(n){return mE(n)&&"ownerSVGElement"in n}function ST(n){return Og(n)&&n.tagName==="svg"}const _T=[...Tg,Yt,Ye],ET=n=>_T.find(Cg(n)),Ig=()=>({min:0,max:0}),fu=()=>({x:Ig(),y:Ig()}),Ws=new WeakMap;function CT(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function TT(n){return typeof n=="string"||Array.isArray(n)}const PT=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Rg(n){return CT(n.animate)||PT.some(t=>TT(n[t]))}function AT(n){return!!(Rg(n)||n.variants)}function MT(n,t,e){for(const r in t){const s=t[r],i=e[r];if(ue(s))n.addValue(r,s);else if(ue(i))n.addValue(r,gr(s,{owner:n}));else if(i!==s)if(n.hasValue(r)){const o=n.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=n.getStaticValue(r);n.addValue(r,gr(o!==void 0?o:s,{owner:n}))}}for(const r in e)t[r]===void 0&&n.removeValue(r);return t}const du={current:null},kg={current:!1},DT=typeof window<"u";function OT(){if(kg.current=!0,!!DT)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>du.current=n.matches;n.addEventListener("change",t),t()}else du.current=!1}const Lg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ng={};class zg{scrapeMotionValuesFromProps(t,e,r){return{}}constructor({parent:t,props:e,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=su,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=_e.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:h,renderState:u}=a;this.latestValues=h,this.baseTarget={...h},this.initialValues=e.initial?{...h}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Rg(e),this.isVariantNode=AT(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const f in d){const p=d[f];h[f]!==void 0&&ue(p)&&p.set(h[f])}}mount(t){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=t,Ws.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,r)=>this.bindToMotionValue(r,e)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(kg.current||OT(),this.shouldReduceMotion=du.current),{}.NODE_ENV!=="production"&&xp(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Nh(this.notifyUpdate),Nh(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&pg.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:h,duration:u}=e.accelerate,l=new fg({element:this.current,name:t,keyframes:a,times:c,ease:h,duration:Se(u)}),d=o(l);this.valueSubscriptions.set(t,()=>{d(),l.cancel()});return}const r=Kr.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ng){const e=Ng[t];if(!e)continue;const{isEnabled:r,Feature:s}=e;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fu()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let r=0;r<Lg.length;r++){const s=Lg[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=MT(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const r=this.values.get(t);e!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&e!==void 0&&(r=gr(e===null?void 0:e,{owner:this}),this.addValue(t,r)),r}readValue(t,e){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(pp(r)||gp(r))?r=parseFloat(r):!ET(r)&&Ye.test(e)&&(r=Dg(t,e)),this.setBaseTarget(t,ue(r)?r.get():r)),ue(r)?r.get():r}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let r;if(typeof e=="string"||typeof e=="object"){const i=_g(this.props,e,this.presenceContext?.custom);i&&(r=i[t])}if(e&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ue(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new bp),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){xT.render(this.render)}}class Vg extends zg{constructor(){super(...arguments),this.KeyframeResolver=vT}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){const r=t.style;return r?r[e]:void 0}removeValueFromRenderState(t,{vars:e,style:r}){delete e[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ue(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function IT({top:n,left:t,right:e,bottom:r}){return{x:{min:t,max:e},y:{min:n,max:r}}}function RT(n,t){if(!t)return n;const e=t({x:n.left,y:n.top}),r=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:r.y,right:r.x}}function kT(n,t){return IT(RT(n.getBoundingClientRect(),t))}const LT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},NT=qr.length;function zT(n,t,e){let r="",s=!0;for(let o=0;o<NT;o++){const a=qr[o],c=n[a];if(c===void 0)continue;let h=!0;if(typeof c=="number")h=c===(a.startsWith("scale")?1:0);else{const u=parseFloat(c);h=a.startsWith("scale")?u===1:u===0}if(!h||e){const u=lu(c,ko[a]);if(!h){s=!1;const l=LT[a]||a;r+=`${l}(${u}) `}e&&(t[a]=u)}}const i=n.pathRotation;return i&&(s=!1,r+=`rotate(${lu(i,ko.pathRotation)}) `),r=r.trim(),e?r=e(t,s?"":r):s&&(r="none"),r}function Fg(n,t,e){const{style:r,vars:s,transformOrigin:i}=n;let o=!1,a=!1;for(const c in t){const h=t[c];if(Kr.has(c)){o=!0;continue}else if(Np(c)){s[c]=h;continue}else{const u=lu(h,ko[c]);c.startsWith("origin")?(a=!0,i[c]=u):r[c]=u}}if(t.transform||(o||e?r.transform=zT(t,n.transform,e):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:u=0}=i;r.transformOrigin=`${c} ${h} ${u}`}}function Bg(n,{style:t,vars:e},r,s){const i=n.style;let o;for(o in t)i[o]=t[o];s?.applyProjectionStyles(i,r);for(o in e)i.setProperty(o,e[o])}function $g(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const Hs={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(q.test(n))n=parseFloat(n);else return n;const e=$g(n,t.target.x),r=$g(n,t.target.y);return`${e}% ${r}%`}},VT={correct:(n,{treeScale:t,projectionDelta:e})=>{const r=n,s=Ye.parse(n);if(s.length>5)return r;const i=Ye.createTransformer(n),o=typeof s[0]!="number"?1:0,a=e.x.scale*t.x,c=e.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const h=Wr(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=h),typeof s[3+o]=="number"&&(s[3+o]/=h),i(s)}},FT={borderRadius:{...Hs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hs,borderTopRightRadius:Hs,borderBottomLeftRadius:Hs,borderBottomRightRadius:Hs,boxShadow:VT};function BT(n,{layout:t,layoutId:e}){return Kr.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!FT[n]||n==="opacity")}function Ug(n,t,e){const r=n.style,s=t?.style,i={};if(!r)return i;for(const o in r)(ue(r[o])||s&&ue(s[o])||BT(o,n)||e?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}function $T(n){return window.getComputedStyle(n)}class UT extends Vg{constructor(){super(...arguments),this.type="html",this.renderInstance=Bg}readValueFromInstance(t,e){if(Kr.has(e))return this.projection?.isProjecting?Qh(e):gC(t,e);{const r=$T(t),s=(Np(e)?r.getPropertyValue(e):r[e])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:e}){return kT(t,e)}build(t,e,r){Fg(t,e,r.transformTemplate)}scrapeMotionValuesFromProps(t,e,r){return Ug(t,e,r)}}function YT(n,t){return n in t}class jT extends zg{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(YT(e,t)){const r=t[e];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return fu()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const GT={offset:"stroke-dashoffset",array:"stroke-dasharray"},XT={offset:"strokeDashoffset",array:"strokeDasharray"};function WT(n,t,e=1,r=0,s=!0){n.pathLength=1;const i=s?GT:XT;n[i.offset]=`${-r}`,n[i.array]=`${t} ${e}`}const HT=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qT(n,{attrX:t,attrY:e,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},c,h,u){if(Fg(n,a,h),c){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:l,style:d}=n;l.transform&&(d.transform=l.transform,delete l.transform),(d.transform||l.transformOrigin)&&(d.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete l.transformBox);for(const f of HT)l[f]!==void 0&&(d[f]=l[f],delete l[f]);t!==void 0&&(l.x=t),e!==void 0&&(l.y=e),r!==void 0&&(l.scale=r),s!==void 0&&WT(l,s,i,o,!1)}const Yg=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),KT=n=>typeof n=="string"&&n.toLowerCase()==="svg";function JT(n,t,e,r){Bg(n,t,void 0,r);for(const s in t.attrs)n.setAttribute(Yg.has(s)?s:cu(s),t.attrs[s])}function ZT(n,t,e){const r=Ug(n,t,e);for(const s in n)if(ue(n[s])||ue(t[s])){const i=qr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=n[s]}return r}class QT extends Vg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fu}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Kr.has(e)){const r=Mg(e);return r&&r.default||0}return e=Yg.has(e)?e:cu(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,r){return ZT(t,e,r)}build(t,e,r){qT(t,e,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,e,r,s){JT(t,e,r,s)}mount(t){this.isSVGTag=KT(t.tagName),super.mount(t)}}function tP(n,t,e){const r=ue(n)?n:gr(n);return r.start(wg("",r,t,e)),r.animation}const eP=St.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function nP(n,t,e){St.useInsertionEffect(()=>n.on(t,e),[n,t,e])}function rP(n){const t=fE(()=>gr(n)),{isStatic:e}=St.useContext(eP);if(e){const[,r]=St.useState(n);St.useEffect(()=>t.on("change",r),[])}return t}function mu(n){return typeof n=="object"&&!Array.isArray(n)}function jg(n,t,e,r){return n==null?[]:typeof n=="string"&&mu(t)?wT(n,e,r):n instanceof NodeList?Array.from(n):Array.isArray(n)?n.filter(s=>s!=null):[n]}function sP(n,t,e){return n*(t+1)+e*t}function Gg(n,t,e,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,n+parseFloat(t)):t==="<"?e:t.startsWith("<")?Math.max(0,e+parseFloat(t.slice(1))):r.get(t)??n}function iP(n,t,e){for(let r=0;r<n.length;r++){const s=n[r];s.at>t&&s.at<e&&(Mh(n,s),r--)}}function oP(n,t,e,r,s,i){iP(n,s,i);for(let o=0;o<t.length;o++)n.push({value:t[o],at:Wr(s,i,r[o]),easing:Dp(e,o)})}function aP(n,t,e=0){const r=t+1+t*e;for(let s=0;s<n.length;s++)n[s]=n[s]/r}function cP(n,t){return n.at===t.at?n.value===null?1:t.value===null?-1:0:n.at-t.at}const hP="easeInOut",pu=20;function uP(n,{defaultTransition:t={},...e}={},r,s){const i=t.duration||.3,o=new Map,a=new Map,c={},h=new Map;let u=0,l=0,d=0;for(let f=0;f<n.length;f++){const p=n[f];if(typeof p=="string"){h.set(p,l);continue}else if(!Array.isArray(p)){h.set(p.name,Gg(l,p.at,u,h));continue}let[m,b,g={}]=p;g.at!==void 0&&(l=Gg(l,g.at,u,h));let w=0;const x=(v,E,_,D=0,z=0)=>{const O=lP(v),{delay:L=0,times:$=Qp(O),type:j=t.type||"keyframes",repeat:Q,repeatType:rt,repeatDelay:ot=0,...nt}=E;let{ease:tt=t.ease||"easeOut",duration:bt}=E;const Y=typeof L=="function"?L(D,z):L,F=O.length,A=iu(j)?j:s?.[j||"keyframes"];if(F<=2&&A){let ct=100;if(F===2&&mP(O)){const Tt=O[1]-O[0];ct=Math.abs(Tt)}const ft={...t,...nt};bt!==void 0&&(ft.duration=Se(bt));const et=qp(ft,ct,A);tt=et.ease,bt=et.duration}bt??(bt=i);const N=l+Y;$.length===1&&$[0]===0&&($[1]=1);const H=$.length-O.length;if(H>0&&Zp($,H),O.length===1&&O.unshift(null),Q&&$r(Q<pu,`Sequence segments can't repeat ${Q} times — ignoring repeat option. Use a value below ${pu} or apply repeat at the sequence level instead.`),Q&&Q<pu){const ct=bt>0?ot/bt:0;bt=sP(bt,Q,ot);const ft=[...O],et=[...$];tt=Array.isArray(tt)?[...tt]:[tt];const Tt=[...tt],lt=rt==="reverse"||rt==="mirror";let Mt=ft,ke=Tt;lt&&(Mt=[...ft].reverse(),rt==="reverse"&&(ke=[...Tt].reverse().map(Xt=>typeof Xt=="function"?Rh(Xt):Xt)));for(let Xt=0;Xt<Q;Xt++){const Pe=lt&&Xt%2===0,ve=Pe?Mt:ft,V=Pe?ke:Tt,At=(Xt+1)*(1+ct);ct>0&&(O.push(O[O.length-1]),$.push(At),tt.push("linear")),O.push(...ve);for(let Dt=0;Dt<ve.length;Dt++)$.push(et[Dt]+At),tt.push(Dt===0?"linear":Dp(V,Dt-1))}aP($,Q,ct)}const K=N+bt;oP(_,O,tt,$,N,K),w=Math.max(Y+bt,w),d=Math.max(K,d)};if(ue(m)){const v=Xg(m,a);x(b,g,Wg("default",v))}else{const v=jg(m,b,r,c),E=v.length;for(let _=0;_<E;_++){b=b,g=g;const D=v[_],z=Xg(D,a);for(const O in b)x(b[O],fP(g,O),Wg(O,z),_,E)}}u=l,l+=w}return a.forEach((f,p)=>{for(const m in f){const b=f[m];b.sort(cP);const g=[],w=[],x=[];for(let D=0;D<b.length;D++){const{at:z,value:O,easing:L}=b[D];g.push(O),w.push(Ih(0,d,z)),x.push(L||"easeOut")}w[0]!==0&&(w.unshift(0),g.unshift(g[0]),x.unshift(hP)),w[w.length-1]!==1&&(w.push(1),g.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const v=o.get(p);v.keyframes[m]=g;const{type:E,..._}=t;v.transition[m]={..._,duration:d,ease:x,times:w,...e}}}),o}function Xg(n,t){return!t.has(n)&&t.set(n,{}),t.get(n)}function Wg(n,t){return t[n]||(t[n]=[]),t[n]}function lP(n){return Array.isArray(n)?n:[n]}function fP(n,t){return n&&n[t]?{...n,...n[t]}:{...n}}const dP=n=>typeof n=="number",mP=n=>n.every(dP);function pP(n){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=Og(n)&&!ST(n)?new QT(t):new UT(t);e.mount(n),Ws.set(n,e)}function gP(n){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new jT(t);e.mount(n),Ws.set(n,e)}function yP(n,t){return ue(n)||typeof n=="number"||typeof n=="string"&&!mu(t)}function Hg(n,t,e,r){const s=[];if(yP(n,t))s.push(tP(n,mu(t)&&t.default||t,e&&(e.default||e)));else{if(n==null)return s;const i=jg(n,t,r),o=i.length;$n(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const c=i[a],h=c instanceof Element?pP:gP;Ws.has(c)||h(c);const u=Ws.get(c),l={...e};"delay"in l&&typeof l.delay=="function"&&(l.delay=l.delay(a,o)),s.push(...hT(u,{...t,transition:l},{}))}}return s}function bP(n,t,e){const r=[],s=n.map(o=>{if(Array.isArray(o)&&typeof o[0]=="function"){const a=o[0],c=gr(0);return c.on("change",a),o.length===1?[c,[0,1]]:o.length===2?[c,[0,1],o[1]]:[c,o[1],o[2]]}return o});return uP(s,t,e,{spring:Gs}).forEach(({keyframes:o,transition:a},c)=>{r.push(...Hg(c,o,a))}),r}function vP(n){return Array.isArray(n)&&n.some(Array.isArray)}function wP(n={}){const{scope:t,reduceMotion:e,skipAnimations:r}=n;function s(i,o,a){let c=[],h;const u={};if(e!==void 0&&(u.reduceMotion=e),r!==void 0&&(u.skipAnimations=r),vP(i)){const{onComplete:d,...f}=o||{};typeof d=="function"&&(h=d),c=bP(i,{...u,...f},t)}else{const{onComplete:d,...f}=a||{};typeof d=="function"&&(h=d),c=Hg(i,o,{...u,...f},t)}const l=new BC(c);return h&&l.finished.then(h),t&&(t.animations.push(l),l.finished.then(()=>{Mh(t.animations,l)})),l}return s}const gu=wP(),qg="0%",xP="100%",Kg="20%",yu="80%",qs="#0000",je="#000";function SP(n){const t=rP(`linear-gradient(90deg, ${je}, ${je} ${qg}, ${je} ${yu}, ${qs})`);return nP(n,"change",e=>{e===0?gu(t,`linear-gradient(90deg, ${je}, ${je} ${qg}, ${je} ${yu}, ${qs})`):e===1?gu(t,`linear-gradient(90deg, ${qs}, ${je} ${Kg}, ${je} ${xP}, ${je})`):(n.getPrevious()===0||n.getPrevious()===1)&&gu(t,`linear-gradient(90deg, ${qs}, ${je} ${Kg}, ${je} ${yu}, ${qs})`)}),t}var bu={exports:{}},vu={},Lo={exports:{}},wu={};/**
79
79
  * @license React
80
80
  * use-sync-external-store-shim.production.js
81
81
  *
@@ -83,7 +83,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
83
83
  *
84
84
  * This source code is licensed under the MIT license found in the
85
85
  * LICENSE file in the root directory of this source tree.
86
- */var Kg;function SP(){if(Kg)return vu;Kg=1;var n=Co;function t(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var e=typeof Object.is=="function"?Object.is:t,r=n.useState,s=n.useEffect,i=n.useLayoutEffect,o=n.useDebugValue;function a(l,d){var f=d(),p=r({inst:{value:f,getSnapshot:d}}),m=p[0].inst,b=p[1];return i(function(){m.value=f,m.getSnapshot=d,c(m)&&b({inst:m})},[l,f,d]),s(function(){return c(m)&&b({inst:m}),l(function(){c(m)&&b({inst:m})})},[l]),o(f),f}function c(l){var d=l.getSnapshot;l=l.value;try{var f=d();return!e(l,f)}catch{return!0}}function h(l,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:a;return vu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:u,vu}var wu={};/**
86
+ */var Jg;function _P(){if(Jg)return wu;Jg=1;var n=Co;function t(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var e=typeof Object.is=="function"?Object.is:t,r=n.useState,s=n.useEffect,i=n.useLayoutEffect,o=n.useDebugValue;function a(l,d){var f=d(),p=r({inst:{value:f,getSnapshot:d}}),m=p[0].inst,b=p[1];return i(function(){m.value=f,m.getSnapshot=d,c(m)&&b({inst:m})},[l,f,d]),s(function(){return c(m)&&b({inst:m}),l(function(){c(m)&&b({inst:m})})},[l]),o(f),f}function c(l){var d=l.getSnapshot;l=l.value;try{var f=d();return!e(l,f)}catch{return!0}}function h(l,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:a;return wu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:u,wu}var xu={};/**
87
87
  * @license React
88
88
  * use-sync-external-store-shim.development.js
89
89
  *
@@ -91,7 +91,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
91
91
  *
92
92
  * This source code is licensed under the MIT license found in the
93
93
  * LICENSE file in the root directory of this source tree.
94
- */var Jg;function _P(){return Jg||(Jg=1,{}.NODE_ENV!=="production"&&function(){function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||s.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!l){var b=p();i(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}b=o({inst:{value:m,getSnapshot:p}});var g=b[0].inst,w=b[1];return c(function(){g.value=m,g.getSnapshot=p,e(g)&&w({inst:g})},[f,m,p]),a(function(){return e(g)&&w({inst:g}),f(function(){e(g)&&w({inst:g})})},[f]),h(m),m}function e(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!i(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=Co,i=typeof Object.is=="function"?Object.is:n,o=s.useState,a=s.useEffect,c=s.useLayoutEffect,h=s.useDebugValue,u=!1,l=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;wu.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),wu}var Zg;function Qg(){return Zg||(Zg=1,{}.NODE_ENV==="production"?Lo.exports=SP():Lo.exports=_P()),Lo.exports}/**
94
+ */var Zg;function EP(){return Zg||(Zg=1,{}.NODE_ENV!=="production"&&function(){function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||s.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!l){var b=p();i(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}b=o({inst:{value:m,getSnapshot:p}});var g=b[0].inst,w=b[1];return c(function(){g.value=m,g.getSnapshot=p,e(g)&&w({inst:g})},[f,m,p]),a(function(){return e(g)&&w({inst:g}),f(function(){e(g)&&w({inst:g})})},[f]),h(m),m}function e(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!i(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=Co,i=typeof Object.is=="function"?Object.is:n,o=s.useState,a=s.useEffect,c=s.useLayoutEffect,h=s.useDebugValue,u=!1,l=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;xu.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),xu}var Qg;function t0(){return Qg||(Qg=1,{}.NODE_ENV==="production"?Lo.exports=_P():Lo.exports=EP()),Lo.exports}/**
95
95
  * @license React
96
96
  * use-sync-external-store-shim/with-selector.production.js
97
97
  *
@@ -99,7 +99,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
99
99
  *
100
100
  * This source code is licensed under the MIT license found in the
101
101
  * LICENSE file in the root directory of this source tree.
102
- */var t0;function EP(){if(t0)return bu;t0=1;var n=Co,t=Qg();function e(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}var r=typeof Object.is=="function"?Object.is:e,s=t.useSyncExternalStore,i=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return bu.useSyncExternalStoreWithSelector=function(h,u,l,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!w){if(w=!0,x=_,_=d(_),f!==void 0&&m.hasValue){var D=m.value;if(f(D,_))return v=D}return v=_}if(D=v,r(x,_))return D;var z=d(_);return f!==void 0&&f(D,z)?(x=_,D):(x=_,v=z)}var w=!1,x,v,E=l===void 0?null:l;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,l,d,f]);var b=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},bu}var xu={};/**
102
+ */var e0;function CP(){if(e0)return vu;e0=1;var n=Co,t=t0();function e(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}var r=typeof Object.is=="function"?Object.is:e,s=t.useSyncExternalStore,i=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return vu.useSyncExternalStoreWithSelector=function(h,u,l,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!w){if(w=!0,x=_,_=d(_),f!==void 0&&m.hasValue){var D=m.value;if(f(D,_))return v=D}return v=_}if(D=v,r(x,_))return D;var z=d(_);return f!==void 0&&f(D,z)?(x=_,D):(x=_,v=z)}var w=!1,x,v,E=l===void 0?null:l;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,l,d,f]);var b=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},vu}var Su={};/**
103
103
  * @license React
104
104
  * use-sync-external-store-shim/with-selector.development.js
105
105
  *
@@ -107,18 +107,18 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
107
107
  *
108
108
  * This source code is licensed under the MIT license found in the
109
109
  * LICENSE file in the root directory of this source tree.
110
- */var e0;function CP(){return e0||(e0=1,{}.NODE_ENV!=="production"&&function(){function n(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Co,e=Qg(),r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;xu.useSyncExternalStoreWithSelector=function(h,u,l,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!w){if(w=!0,x=_,_=d(_),f!==void 0&&m.hasValue){var D=m.value;if(f(D,_))return v=D}return v=_}if(D=v,r(x,_))return D;var z=d(_);return f!==void 0&&f(D,z)?(x=_,D):(x=_,v=z)}var w=!1,x,v,E=l===void 0?null:l;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,l,d,f]);var b=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),xu}({}).NODE_ENV==="production"?yu.exports=EP():yu.exports=CP();var TP=yu.exports;function PP(n){const t=St.createContext(null);function e({children:a}){return React.createElement(t.Provider,{value:n},a)}function r(){const a=St.useContext(t);if(!a)throw new ReferenceError("createReactAppStoreContext's hooks cannot be called outside of AppStoreProvider");return a}function s(a,c){const h=r(),u=l=>h.subscribe(()=>l());return a?TP.useSyncExternalStoreWithSelector(u,h.getState,h.getState,a,c):St.useSyncExternalStore(u,h.getState,h.getState)}function i(){const a=r();if(bi(a))throw new Error("useSetAppState is only supported for StateStoreLike");return a.setState.bind(a)}function o(){const a=r();if(!bi(a))throw new Error("useDispatch is only supported for ReduxStore");return a.dispatch.bind(a)}return{AppStoreProvider:e,useAppStore:r,useAppState:s,useSetAppState:i,useDispatch:o}}function AP(n){const e=St.useRef(is(n.value)).current;if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const[r,s]=St.useState(()=>e?n.value:n.defaultValue),i=e?n.value:r,o=St.useRef(i);o.current=i;const a=St.useRef(!1);St.useEffect(()=>{!a.current&&is(n.value)!==e&&(a.current=!0,console.warn("[useReactControllableState] can't switch between controlled and uncontrolled mode."))},[n.value]);const c=St.useRef(n.beforeChange);c.current=n.beforeChange;const h=St.useRef(n.onChange);h.current=n.onChange;const u=St.useRef(0),l=St.useCallback(async d=>{const f=++u.current,p=typeof d=="function"?d(o.current):d;c.current&&!await c.current(p)||f===u.current&&(e||s(p),h.current?.(p))},[]);return[i,l]}var n0=Symbol.for("immer-nothing"),r0=Symbol.for("immer-draftable"),le=Symbol.for("immer-state"),MP={}.NODE_ENV!=="production"?[function(n){return`The plugin for '${n}' has not been loaded into Immer. To enable the plugin, import and call \`enable${n}()\` when initializing your application.`},function(n){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${n}'`},"This object has been frozen and should not be mutated",function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(n){return`'current' expects a draft, got: ${n}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(n){return`'original' expects a draft, got: ${n}`}]:[];function Ee(n,...t){if({}.NODE_ENV!=="production"){const e=MP[n],r=yr(e)?e.apply(null,t):e;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Ce=Object,Jr=Ce.getPrototypeOf,No="constructor",zo="prototype",Su="configurable",Vo="enumerable",Fo="writable",Ks="value",jn=n=>!!n&&!!n[le];function vn(n){return n?i0(n)||Uo(n)||!!n[r0]||!!n[No]?.[r0]||Yo(n)||jo(n):!1}var DP=Ce[zo][No].toString(),s0=new WeakMap;function i0(n){if(!n||!Eu(n))return!1;const t=Jr(n);if(t===null||t===Ce[zo])return!0;const e=Ce.hasOwnProperty.call(t,No)&&t[No];if(e===Object)return!0;if(!yr(e))return!1;let r=s0.get(e);return r===void 0&&(r=Function.toString.call(e),s0.set(e,r)),r===DP}function Bo(n,t,e=!0){Js(n)===0?(e?Reflect.ownKeys(n):Ce.keys(n)).forEach(s=>{t(s,n[s],n)}):n.forEach((r,s)=>t(s,r,n))}function Js(n){const t=n[le];return t?t.type_:Uo(n)?1:Yo(n)?2:jo(n)?3:0}var o0=(n,t,e=Js(n))=>e===2?n.has(t):Ce[zo].hasOwnProperty.call(n,t),_u=(n,t,e=Js(n))=>e===2?n.get(t):n[t],$o=(n,t,e,r=Js(n))=>{r===2?n.set(t,e):r===3?n.add(e):n[t]=e};function OP(n,t){return n===t?n!==0||1/n===1/t:n!==n&&t!==t}var Uo=Array.isArray,Yo=n=>n instanceof Map,jo=n=>n instanceof Set,Eu=n=>typeof n=="object",yr=n=>typeof n=="function",Cu=n=>typeof n=="boolean";function IP(n){const t=+n;return Number.isInteger(t)&&String(t)===n}var wn=n=>n.copy_||n.base_,Tu=n=>n.modified_?n.copy_:n.base_;function Pu(n,t){if(Yo(n))return new Map(n);if(jo(n))return new Set(n);if(Uo(n))return Array[zo].slice.call(n);const e=i0(n);if(t===!0||t==="class_only"&&!e){const r=Ce.getOwnPropertyDescriptors(n);delete r[le];let s=Reflect.ownKeys(r);for(let i=0;i<s.length;i++){const o=s[i],a=r[o];a[Fo]===!1&&(a[Fo]=!0,a[Su]=!0),(a.get||a.set)&&(r[o]={[Su]:!0,[Fo]:!0,[Vo]:a[Vo],[Ks]:n[o]})}return Ce.create(Jr(n),r)}else{const r=Jr(n);if(r!==null&&e)return{...n};const s=Ce.create(r);return Ce.assign(s,n)}}function Zs(n,t=!1){return Xo(n)||jn(n)||!vn(n)||(Js(n)>1&&Ce.defineProperties(n,{set:Go,add:Go,clear:Go,delete:Go}),Ce.freeze(n),t&&Bo(n,(e,r)=>{Zs(r,!0)},!1)),n}function RP(){Ee(2)}var Go={[Ks]:RP};function Xo(n){return n===null||!Eu(n)?!0:Ce.isFrozen(n)}var Wo="MapSet",Au="Patches",a0="ArrayMethods",c0={};function br(n){const t=c0[n];return t||Ee(0,n),t}var h0=n=>!!c0[n],Qs,u0=()=>Qs,kP=(n,t)=>({drafts_:[],parent_:n,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:h0(Wo)?br(Wo):void 0,arrayMethodsPlugin_:h0(a0)?br(a0):void 0});function l0(n,t){t&&(n.patchPlugin_=br(Au),n.patches_=[],n.inversePatches_=[],n.patchListener_=t)}function Mu(n){Du(n),n.drafts_.forEach(LP),n.drafts_=null}function Du(n){n===Qs&&(Qs=n.parent_)}var f0=n=>Qs=kP(Qs,n);function LP(n){const t=n[le];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function d0(n,t){t.unfinalizedDrafts_=t.drafts_.length;const e=t.drafts_[0];if(n!==void 0&&n!==e){e[le].modified_&&(Mu(t),Ee(4)),vn(n)&&(n=m0(t,n));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(e[le].base_,n,t)}else n=m0(t,e);return NP(t,n,!0),Mu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),n!==n0?n:void 0}function m0(n,t){if(Xo(t))return t;const e=t[le];if(!e)return qo(t,n.handledSet_,n);if(!Ho(e,n))return t;if(!e.modified_)return e.base_;if(!e.finalized_){const{callbacks_:r}=e;if(r)for(;r.length>0;)r.pop()(n);y0(e,n)}return e.copy_}function NP(n,t,e=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Zs(t,e)}function p0(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var Ho=(n,t)=>n.scope_===t,zP=[];function g0(n,t,e,r){const s=wn(n),i=n.type_;if(r!==void 0&&_u(s,r,i)===t){$o(s,r,e,i);return}if(!n.draftLocations_){const a=n.draftLocations_=new Map;Bo(s,(c,h)=>{if(jn(h)){const u=a.get(h)||[];u.push(c),a.set(h,u)}})}const o=n.draftLocations_.get(t)??zP;for(const a of o)$o(s,a,e,i)}function VP(n,t,e){n.callbacks_.push(function(s){const i=t;if(!i||!Ho(i,s))return;s.mapSetPlugin_?.fixSetContents(i);const o=Tu(i);g0(n,i.draft_??i,o,e),y0(i,s)})}function y0(n,t){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const s=r.getPath(n);s&&r.generatePatches_(n,s,t)}p0(n)}}function FP(n,t,e){const{scope_:r}=n;if(jn(e)){const s=e[le];Ho(s,r)&&s.callbacks_.push(function(){Jo(n);const o=Tu(s);g0(n,e,o,t)})}else vn(e)&&n.callbacks_.push(function(){const i=wn(n);n.type_===3?i.has(e)&&qo(e,r.handledSet_,r):_u(i,t,n.type_)===e&&r.drafts_.length>1&&(n.assigned_.get(t)??!1)===!0&&n.copy_&&qo(_u(n.copy_,t,n.type_),r.handledSet_,r)})}function qo(n,t,e){return!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||jn(n)||t.has(n)||!vn(n)||Xo(n)||(t.add(n),Bo(n,(r,s)=>{if(jn(s)){const i=s[le];if(Ho(i,e)){const o=Tu(i);$o(n,r,o,n.type_),p0(i)}}else vn(s)&&qo(s,t,e)})),n}function BP(n,t){const e=Uo(n),r={type_:e?1:0,scope_:t?t.scope_:u0(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,i=Ko;e&&(s=[r],i=ti);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,[a,r]}var Ko={get(n,t){if(t===le)return n;let e=n.scope_.arrayMethodsPlugin_;const r=n.type_===1&&typeof t=="string";if(r&&e?.isArrayOperationMethod(t))return e.createMethodInterceptor(n,t);const s=wn(n);if(!o0(s,t,n.type_))return $P(n,s,t);const i=s[t];if(n.finalized_||!vn(i)||r&&n.operationMethod&&e?.isMutatingArrayMethod(n.operationMethod)&&IP(t))return i;if(i===Ou(n.base_,t)){Jo(n);const o=n.type_===1?+t:t,a=Ru(n.scope_,i,n,o);return n.copy_[o]=a}return i},has(n,t){return t in wn(n)},ownKeys(n){return Reflect.ownKeys(wn(n))},set(n,t,e){const r=b0(wn(n),t);if(r?.set)return r.set.call(n.draft_,e),!0;if(!n.modified_){const s=Ou(wn(n),t),i=s?.[le];if(i&&i.base_===e)return n.copy_[t]=e,n.assigned_.set(t,!1),!0;if(OP(e,s)&&(e!==void 0||o0(n.base_,t,n.type_)))return!0;Jo(n),Iu(n)}return n.copy_[t]===e&&(e!==void 0||t in n.copy_)||Number.isNaN(e)&&Number.isNaN(n.copy_[t])||(n.copy_[t]=e,n.assigned_.set(t,!0),FP(n,t,e)),!0},deleteProperty(n,t){return Jo(n),Ou(n.base_,t)!==void 0||t in n.base_?(n.assigned_.set(t,!1),Iu(n)):n.assigned_.delete(t),n.copy_&&delete n.copy_[t],!0},getOwnPropertyDescriptor(n,t){const e=wn(n),r=Reflect.getOwnPropertyDescriptor(e,t);return r&&{[Fo]:!0,[Su]:n.type_!==1||t!=="length",[Vo]:r[Vo],[Ks]:e[t]}},defineProperty(){Ee(11)},getPrototypeOf(n){return Jr(n.base_)},setPrototypeOf(){Ee(12)}},ti={};for(let n in Ko){let t=Ko[n];ti[n]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}ti.deleteProperty=function(n,t){return{}.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Ee(13),ti.set.call(this,n,t,void 0)},ti.set=function(n,t,e){return{}.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Ee(14),Ko.set.call(this,n[0],t,e,n[0])};function Ou(n,t){const e=n[le];return(e?wn(e):n)[t]}function $P(n,t,e){const r=b0(t,e);return r?Ks in r?r[Ks]:r.get?.call(n.draft_):void 0}function b0(n,t){if(!(t in n))return;let e=Jr(n);for(;e;){const r=Object.getOwnPropertyDescriptor(e,t);if(r)return r;e=Jr(e)}}function Iu(n){n.modified_||(n.modified_=!0,n.parent_&&Iu(n.parent_))}function Jo(n){n.copy_||(n.assigned_=new Map,n.copy_=Pu(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var UP=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,r)=>{if(yr(t)&&!yr(e)){const i=e;e=t;const o=this;return function(c=i,...h){return o.produce(c,u=>e.call(this,u,...h))}}yr(e)||Ee(6),r!==void 0&&!yr(r)&&Ee(7);let s;if(vn(t)){const i=f0(this),o=Ru(i,t,void 0);let a=!0;try{s=e(o),a=!1}finally{a?Mu(i):Du(i)}return l0(i,r),d0(s,i)}else if(!t||!Eu(t)){if(s=e(t),s===void 0&&(s=t),s===n0&&(s=void 0),this.autoFreeze_&&Zs(s,!0),r){const i=[],o=[];br(Au).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),r(i,o)}return s}else Ee(1,t)},this.produceWithPatches=(t,e)=>{if(yr(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let r,s;return[this.produce(t,e,(o,a)=>{r=o,s=a}),r,s]},Cu(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),Cu(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),Cu(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){vn(n)||Ee(8),jn(n)&&(n=YP(n));const t=f0(this),e=Ru(t,n,void 0);return e[le].isManual_=!0,Du(t),e}finishDraft(n,t){const e=n&&n[le];(!e||!e.isManual_)&&Ee(9);const{scope_:r}=e;return l0(r,t),d0(void 0,r)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,t){let e;for(e=t.length-1;e>=0;e--){const s=t[e];if(s.path.length===0&&s.op==="replace"){n=s.value;break}}e>-1&&(t=t.slice(e+1));const r=br(Au).applyPatches_;return jn(n)?r(n,t):this.produce(n,s=>r(s,t))}};function Ru(n,t,e,r){const[s,i]=Yo(t)?br(Wo).proxyMap_(t,e):jo(t)?br(Wo).proxySet_(t,e):BP(t,e);return(e?.scope_??u0()).drafts_.push(s),i.callbacks_=e?.callbacks_??[],i.key_=r,e&&r!==void 0?VP(e,i,r):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:h}=c;i.modified_&&h&&h.generatePatches_(i,[],c)}),s}function YP(n){return jn(n)||Ee(10,n),v0(n)}function v0(n){if(!vn(n)||Xo(n))return n;const t=n[le];let e,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,e=Pu(n,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else e=Pu(n,!0);return Bo(e,(s,i)=>{$o(e,s,v0(i))},r),t&&(t.finalized_=!1),e}var jP=new UP,w0=jP.produce;function GP(n){const[t,e]=St.useState(()=>Zs(typeof n=="function"?n():n,!0));return[t,St.useCallback(r=>{e(typeof r=="function"?w0(r):Zs(r))},[])]}function XP(n,t,e){const r=St.useMemo(()=>w0(n),[n]);return St.useReducer(r,t,e)}function WP(n){const[t,e]=St.useState({width:0,height:0});return St.useLayoutEffect(()=>{n.current&&e(()=>({width:n.current.offsetWidth,height:n.current.offsetHeight}))},[n]),t}let ku=class{x;y;toX;toY;constructor(t){this.x=at(t?.x||0,2),this.y=at(t?.y||0,2),this.toX=at(t?.toX||0,2),this.toY=at(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=ze(this.x,this.y,this.toX,this.toY);if(e===0){const r=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:r,y:s,width:i-r,height:o-s}}else{const r=Math.sin(e),s=Math.cos(e),i=s*this.x-r*this.y,o=s*this.toX-r*this.toY,a=s*this.y+r*this.x,c=s*this.toY+r*this.toX;return{x:at(Math.min(i,o),t),y:at(Math.min(a,c),t),width:at(Math.max(i,o)-Math.min(i,o),t),height:at(Math.max(a,c)-Math.min(a,c),t)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,r=this.y,s=t.toX,i=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-r)/o,h=(t.y-i)/a;if(o){if(!a)return{x:s,y:c*(s-e)+r}}else return{x:e,y:h*(e-s)+i};const u=(-h*s+i+c*e-r)/(c-h),l=c*(u-e)+r;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class Lu extends ku{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=at(t.rx,2),this.ry=at(t.ry,2),this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,r,s,i,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,r,s,i,o,a,c,!this.sweepFlag)}convert(t,e,r,s,i,o,a,c,h){const u=a/180*Math.PI,l=(t-r)/2,d=(e-s)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,m=f*f/(i*i)+p*p/(o*o);if(m>1){const $=Math.sqrt(m);throw i=$*i,o=$*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const b=Math.sqrt((i*i*o*o-i*i*p*p-o*o*f*f)/(i*i*p*p+o*o*f*f)),g=c!=h?1:-1,w=g*b*i*p/o,x=g*b*-o*f/i,v=(t+r)/2,E=(e+s)/2,_=Math.cos(u)*w-Math.sin(u)*x+v,D=Math.sin(u)*w+Math.cos(u)*x+E,z=($,j,Q,rt)=>($*rt>=j*Q?1:-1)*Math.acos(($*Q+j*rt)/(Math.sqrt($*$+j*j)*Math.sqrt(Q*Q+rt*rt))),O=z(1,0,t-_,e-D)-u,L=z(t-_,e-D,r-_,s-D);return[_,D,i,o,u,O,O+L]}}class HP extends ku{cx;cy;isLineThrough;constructor(t){super(t),this.cx=at(t.cx,2),this.cy=at(t.cy,2),this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,r=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],r=[this.y,this.toY];let s,i,o,a;for(let u=0;u<2;++u)s=u==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=u==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=u==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-i/(2*s),0<a&&a<1&&[e,r][u].push(s*a*a+i*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...r)},h={x:Math.max(0,...e),y:Math.max(0,...r)};return{x:at(c.x,t),y:at(c.y,t),width:at(h.x-c.x,t),height:at(h.y-c.y,t)}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const qP=HP;class Jt extends ku{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=at(t.c1x,2),this.c1y=at(t.c1y,2),this.c2x=at(t.c2x,2),this.c2y=at(t.c2y,2)}clone(){return new Jt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(t=2){let e=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),r=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,i=(-r+Math.sqrt(r*r-4*e*s))/2/e,o=(-r-Math.sqrt(r*r-4*e*s))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const u=[];Math.abs(i)>1e12&&(i=.5),Math.abs(o)>1e12&&(o=.5),i>=0&&i<=1&&(h=this.interpolate(i),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),e=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),r=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,i=(-r+Math.sqrt(r*r-4*e*s))/2/e,o=(-r-Math.sqrt(r*r-4*e*s))/2/e,Math.abs(i)>1e12&&(i=.5),Math.abs(o)>1e12&&(o=.5),i>=0&&i<=1&&(h=this.interpolate(i),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y}));const l=[],d=u.length;for(let m=0;m<d;m++){for(let b=m+1;b<d;b++)u[m].X===u[b].X&&u[m].Y===u[b].Y&&(b=++m);l.push({X:u[m].X,Y:u[m].Y})}const f={x:Math.min(...c),y:Math.min(...a)},p={x:Math.max(...c),y:Math.max(...a)};return{x:at(f.x,t),y:at(f.y,t),width:at(p.x-f.x,t),height:at(p.y-f.y,t),dots:l}}static base3(t,e,r,s,i){const o=-3*e+9*r-9*s+3*i,a=t*o+6*e-12*r+6*s;return t*a-3*e+3*r}static bezlen(t,e,r,s,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=u*l[p]+u,b=Jt.base3(m,t,r,i,a),g=Jt.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(b*b+g*g)}return u*f}length(t=1){return Jt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getPointAtSegmentLength(t){const e=this.getTatLen(t),r=1-e,s=Math.pow(r,3),i=Math.pow(r,2),o=e*e,a=o*e,c=s*this.x+i*3*e*this.c1x+r*3*e*e*this.c2x+a*this.toX,h=s*this.y+i*3*e*this.c1y+r*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=r*this.x+e*this.c1x,m=r*this.y+e*this.c1y,b=r*this.c2x+e*this.toX,g=r*this.c2y+e*this.toY,w=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:m},end:{x:b,y:g},alpha:w}}getTatLen(t){const e=this.x,r=this.y,s=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Jt.bezlen(e,r,s,i,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=Jt.bezlen(e,r,s,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=Jt.bezlen(e,r,s,i,o,a,c,h,d);return d}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}}class x0 extends Va{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=o1(this.source);if(t===0){this.emit("finish");return}let e,r,s=ql(this.source,0);for(let i=1;i<t;i++)e=r,r=s,s=ql(this.source,i),this.raw+=r,r&&this.step(r,s,e);s&&this.step(s,void 0,r),this.emit("finish")}step(t,e,r){t==`
111
- `&&this.emit("newline"),this.act(t,e,r)}act(t,e,r){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":rn("whitespace",t)?(this.textchunk+=S0(this.entity),this.mode="text"):t==";"?(this.textchunk+=S0(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(r=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(r=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,r)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&r=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!rn("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,r)}break;case"close tag name start":rn("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,r));break;case"close tag name":if(rn("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(rn("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":rn("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,r));break;case"attr":if(rn("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!rn("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,r)}break;case"attr value":if(rn("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&r!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function S0(n){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return n.charAt(0)=="#"?n.charAt(1).toLowerCase()=="x"?e=parseInt(n.substring(2),16):e=parseInt(n.substring(1),10):e=t[n],e?String.fromCharCode(e):"&"+n}var _0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function E0(n,t={}){var e=1,r=1;function s(Y){var F=Y.match(/\n/g);F&&(e+=F.length);var A=Y.lastIndexOf(`
112
- `);r=~A?Y.length-A:r+Y.length}function i(){var Y={line:e,column:r};return function(F){return F.position=new o(Y),p(),F}}function o(Y){this.start=Y,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;var a=[];function c(Y){var F=new Error(t.source+":"+e+":"+r+": "+Y);if(F.reason=Y,F.filename=t.source,F.line=e,F.column=r,F.source=n,t.silent)a.push(F);else throw F}function h(){var Y=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:Y,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var Y,F=[];for(p(),m(F);n.length&&n.charAt(0)!="}"&&(Y=tt()||bt());)Y!==!1&&(F.push(Y),m(F));return F}function f(Y){var F=Y.exec(n);if(F){var A=F[0];return s(A),n=n.slice(A.length),F}}function p(){f(/^\s*/)}function m(Y){var F;for(Y=Y||[];F=b();)F!==!1&&Y.push(F);return Y}function b(){var Y=i();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var F=2;n.charAt(F)!=""&&(n.charAt(F)!="*"||n.charAt(F+1)!="/");)++F;if(F+=2,n.charAt(F-1)==="")return c("End of comment missing");var A=n.slice(2,F-2);return r+=2,s(A),n=n.slice(F),r+=2,Y({type:"comment",comment:A})}}function g(){var Y=f(/^([^{]+)/);if(Y)return xn(Y[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(F){return F.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(F){return F.replace(/\u200C/g,",")})}function w(){var Y=i(),F=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(F){if(F=xn(F[0]),!f(/^:\s*/))return c("property missing ':'");var A=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),N=Y({type:"declaration",property:F.replace(_0,""),value:A?xn(A[0]).replace(_0,""):""});return f(/^[;\s]*/),N}}function x(){var Y=[];if(!u())return c("missing '{'");m(Y);for(var F;F=w();)F!==!1&&(Y.push(F),m(Y));return l()?Y:c("missing '}'")}function v(){for(var Y,F=[],A=i();Y=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)F.push(Y[1]),f(/^,\s*/);if(F.length)return A({type:"keyframe",values:F,declarations:x()})}function E(){var Y=i(),F=f(/^@([-\w]+)?keyframes\s*/);if(F){var A=F[1];if(F=f(/^([-\w]+)\s*/),!F)return c("@keyframes missing name");var N=F[1];if(!u())return c("@keyframes missing '{'");for(var H,K=m();H=v();)K.push(H),K=K.concat(m());return l()?Y({type:"keyframes",name:N,vendor:A,keyframes:K}):c("@keyframes missing '}'")}}function _(){var Y=i(),F=f(/^@supports *([^{]+)/);if(F){var A=xn(F[1]);if(!u())return c("@supports missing '{'");var N=m().concat(d());return l()?Y({type:"supports",supports:A,rules:N}):c("@supports missing '}'")}}function D(){var Y=i(),F=f(/^@host\s*/);if(F){if(!u())return c("@host missing '{'");var A=m().concat(d());return l()?Y({type:"host",rules:A}):c("@host missing '}'")}}function z(){var Y=i(),F=f(/^@media *([^{]+)/);if(F){var A=xn(F[1]);if(!u())return c("@media missing '{'");var N=m().concat(d());return l()?Y({type:"media",media:A,rules:N}):c("@media missing '}'")}}function O(){var Y=i(),F=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(F)return Y({type:"custom-media",name:xn(F[1]),media:xn(F[2])})}function L(){var Y=i(),F=f(/^@page */);if(F){var A=g()||[];if(!u())return c("@page missing '{'");for(var N=m(),H;H=w();)N.push(H),N=N.concat(m());return l()?Y({type:"page",selectors:A,declarations:N}):c("@page missing '}'")}}function $(){var Y=i(),F=f(/^@([-\w]+)?document *([^{]+)/);if(F){var A=xn(F[1]),N=xn(F[2]);if(!u())return c("@document missing '{'");var H=m().concat(d());return l()?Y({type:"document",document:N,vendor:A,rules:H}):c("@document missing '}'")}}function j(){var Y=i(),F=f(/^@font-face\s*/);if(F){if(!u())return c("@font-face missing '{'");for(var A=m(),N;N=w();)A.push(N),A=A.concat(m());return l()?Y({type:"font-face",declarations:A}):c("@font-face missing '}'")}}var Q=nt("import"),rt=nt("charset"),ot=nt("namespace");function nt(Y){var F=new RegExp("^@"+Y+"\\s*([^;]+);");return function(){var A=i(),N=f(F);if(N){var H={type:Y};return H[Y]=N[1].trim(),A(H)}}}function tt(){if(n[0]=="@")return E()||z()||O()||_()||Q()||rt()||ot()||$()||L()||D()||j()}function bt(){var Y=i(),F=g();return F?(m(),Y({type:"rule",selectors:F,declarations:x()})):c("selector missing")}return Nu(h())}function xn(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Nu(n,t){var e=n&&typeof n.type=="string",r=e?n:t;for(var s in n){var i=n[s];Array.isArray(i)?i.forEach(function(o){Nu(o,r)}):i&&typeof i=="object"&&Nu(i,r)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class C0 extends x0{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,r)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,r)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const r=E0(e);for(const s of r.stylesheet.rules)for(const i of s.declarations)for(const o of s.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${i.property}:${i.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,r)=>{let s=this.groups.length;for(;s--;)if(this.groups[s]!=this.currentItem){let i="",o="";for(const a in this.groups[s])a=="transform"?i=this.groups[s].transform:a=="class"&&this.globalStyles["."+this.groups[s][a]]?o=this.globalStyles["."+this.groups[s][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[s][a]]?o=this.globalStyles["#"+this.groups[s][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[s][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=i:this.currentItem.transform+=" "+i,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),Vu(this.currentItem.style,this.currentItem,Fu)}switch(this.processAttrs(e,r),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let r=[],s;switch(t){case"svg":let i="",o="";if(e.width&&e.height)i=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(i=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}i&&o&&this.items.push({type:"viewbox",width:i,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":s={},e.style&&Vu(e.style,s),s.offset=s.offset||e.offset,s.color=s["stop-color"]||e["stop-color"],s.opacity=s["stop-opacity"]||e["stop-opacity"],~(s.offset+"").indexOf("%")?s.offset=parseFloat(s.offset):s.offset=parseFloat(s.offset)*100,s.offset=+s.offset.toFixed(2),this.grad.stops.push(s);break;case"linearGradient":this.grad.angle=(360+zu(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),r=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?r.push(s.color+":"+s.offset):r.push(s.color);this.idtops[this.grad.id]=r.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":r=[];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?r.push(s.color+":"+s.offset):r.push(s.color);this.idtops[this.grad.id]=r.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const i in e){const o=e[i];if(Fu.includes(i)&&(this.currentItem[i]=o),i==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:i,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:i,stops:[]})),i==="style"&&Vu(o,this.currentItem,Fu),i==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),i==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}i==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),i==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),i==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function zu(n,t,e,r,s,i){if(typeof s>"u"||typeof i>"u"){const o=n-e,a=t-r;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return zu(n,t,s,i)-zu(e,r,s,i)}function Vu(n,t,e){const r=(n+"").split(";"),s=/^\s+|\s+$/g;for(let i=0,o=r.length;i<o;i++){const a=r[i].split(":"),c=a[0].replace(s,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(s,""))}}const Fu=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class fe{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?ro(t):t||[],r=Kc(so(e));for(let s=0,i=r.length;s<i;s++){const o=r[s];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new Jt({x:this.prevPathX,y:this.prevPathY,c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(this.isUpdatedSVGPathData=!0,this.isUpdatedSVGPathD=!0,this.isUpdatedBoundingClientRect=!0,this.isUpdatedPolymorphPoints=!0,this.isUpdatedTotalLength=!0,t instanceof Lu){no(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,m,b,g]=h;this.normalizedLines.push(new Jt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:b,toY:g})),this.prevPathX=b,this.prevPathY=g});return}if(t instanceof Jt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,r,s,i,o,a;t instanceof qP?[e,r,s,i,o,a]=Es(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,r,s,i,o,a]=hr(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Jt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:r,c2x:s,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new fe,r=t.length;if(r){e.prevPathX=t[0],e.prevPathY=t[1];for(let s=2;s+5<r;s+=6)e._appendLine(new Jt({x:e.prevPathX,y:e.prevPathY,c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}))}return e}static fromLines(t){const e=new fe,r=t.length;if(r){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let s=0;s<r;s++)e._appendLine(t[s])}return e}clone(){return fe.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,r=this.normalizedLines.length;e<r;e++){const s=this.normalizedLines[e];e==0&&t.push(["M",s.x,s.y]),t.push(...s.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=qc(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,r=this.normalizedLines.length;e<r;e++){const s=this.normalizedLines[e];e==0&&t.moveTo(s.x,s.y),s.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],r=[];if(this.normalizedLines.forEach(s=>{const i=s.getBoundingClientRect(t);e.push(i.x,i.x+i.width),r.push(i.y,i.y+i.height)}),e.length==0||r.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const s=Math.min(...e),i=Math.min(...r),o=Math.max(...e),a=Math.max(...r);this.cachedBoundingClientRect={x:at(s,t),y:at(i,t),width:at(o-s,t),height:at(a-i,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:at(e.x+e.width*.5,t),y:at(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new Zt,e.translate(t.x||0,t.y||0),e.rotate(t.degree||0,t.centerX,t.centerY),e.scale(t.scaleX||1,t.scaleY||1,t.centerX,t.centerY)),e.isIdentity?this.clone():fe.fromLines(this.normalizedLines.map(r=>{let s=r.x,i=r.y,o=r.c1x,a=r.c1y,c=r.c2x,h=r.c2y,u=r.toX,l=r.toY;return{x:s,y:i}=e.transformPoint({x:s,y:i}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:c,y:h}=e.transformPoint({x:c,y:h}),{x:u,y:l}=e.transformPoint({x:u,y:l}),new Jt({x:s,y:i,c1x:o,c1y:a,c2x:c,c2y:h,toX:u,toY:l})}))}cachedTotalLength;getTotalLength(){return(typeof this.cachedTotalLength!="number"||this.isUpdatedTotalLength)&&(this.cachedTotalLength=Math.round(this.normalizedLines.reduce((t,e)=>t+=e.length(),0)),this.isUpdatedTotalLength=!1),this.cachedTotalLength}getPointAtLength(t){let e=0,r=0;const s=this.normalizedLines.length;for(let i=0;i<s;i++){const o=this.normalizedLines[i];if(r=o.length(),e+r>=t)return o.getPointAtSegmentLength(t-e);e+=r}return this.normalizedLines[s-1].getPointAtSegmentLength(r)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let r=t*e,s=this.normalizedLines[0];if(r--,r>1)for(let i=1;i<e&&(s=this.normalizedLines[i],r>1);i++)r-=1;return s.interpolate(r)}}getSubPathD(t,e,r=1e-6){const s=this.getSubPathDAtLength(e,!0);return Oa(r)(t,0)?s:s.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const r=new fe;let s=0,i=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(r.prevPathX=c.x,r.prevPathY=c.y);const h=c.length();if(s+h>t&&!i){i=!0;const u=c.getPointAtSegmentLength(t-s);if(r._appendLine(new Jt({x:r.prevPathX,y:r.prevPathY,c1x:u.start.x,c1y:u.start.y,c2x:u.m.x,c2y:u.m.y,toX:u.x,toY:u.y})),e)return r;r.normalizedLines=[],r._appendLine(new Jt({x:r.prevPathX,y:r.prevPathY,c1x:u.n.x,c1y:u.n.y,c2x:u.end.x,c2y:u.end.y,toX:c.toX,toY:c.toY})),s+=h;continue}r._appendLine(c),s+=h}return r}closestPoint(t,e){const r=this.getTotalLength();let s={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=r;h+=a){const u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(s=u,i=h,o=l)}for(a/=2;a>.5;){const h=i-a,u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),d=i+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&l<o?(s=u,i=h,o=l):d<=r&&p<o?(s=f,i=d,o=p):a/=2}const c=this.getPointAtLength(i+(i===r?-.1:.1));return{point:s,rotation:i>=r?ze(c.x,c.y,s.x,s.y):ze(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}cachedPolymorphPoints=[];getPolymorphPoints(){if(this.isUpdatedPolymorphPoints){if(this.normalizedLines.length){const t=this.normalizedLines[0];this.cachedPolymorphPoints=[t.x,t.y].concat(this.normalizedLines.reduce((e,r)=>e.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),r=e.length;if(r){let s=e[r-2],i=e[r-1];for(let o=0;o<r;o+=6)t+=tr(e[o],e[o+1],s,i),s=e[o],i=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,r=this.getPolymorphPoints(),s=r.length;if(s){const i=[];let o=e-s;const a=Math.ceil(e/s);i.push(["M",r[0],r[1]]);let c=2;for(;c+5<=s-1;){const h=r[c++],u=r[c++],l=r[c++],d=r[c++],f=r[c++],p=r[c++];i.push(["C",h,u,l,d,f,p]);let m=0;for(;m<a&&o>0;)i.push(["C",f,p,f,p,f,p]),o-=6,m++}return new fe(i)}else return fe.fromPolymorphPoints(t)}static getInterpolator(t,e){return r=>{const s=Oa(Number.EPSILON);return s(r,0)?t.clone():s(r,1)?e.clone():fe.fromPolymorphPoints(V1(t.getPolymorphPoints(),e.getPolymorphPoints(),r).map(i=>at(i,2)))}}}const T0=KP("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function KP(n,t=10){const e={},r=n.split(",");for(let s=0;s<r.length;s+=2){const i="&"+r[s+1]+";",o=parseInt(r[s],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function de(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function Zo(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function JP(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function ZP(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ei={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class Bu{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",de("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}}class P0{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class Qo{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:r=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d")):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.width=e||t?.width||0,this.height=r||t?.height||0,this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ei);for(let e=0,r=t.length;e<r;e++){const s=t[e];this[s]=ei[s].canvas}}__getStyleState(){const t={},e=Object.keys(ei);for(let r=0,s=e.length;r<s;r++){const i=e[r];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,s=e.length;r<s;r++){const i=e[r];this[i]=t[i]}}__createElement(t,e={},r=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);r&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(i=>{i.setAttribute(t,"")}));const s=Object.keys(ei);for(let i=0;i<s.length;i++){const o=ei[s[i]],a=this[s[i]];if(o.apply){if(a instanceof P0){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,de("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Bu)e.setAttribute(o.apply,de("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,de("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(s[i]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const s=Object.keys(T0);for(let i=0,o=s.length;i<o;i++){const a=s[i],c=T0[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(de("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(de("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(de("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,s,i,o){this.__addTransform(de("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:s,e:i,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(de("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(de("L {x} {y}",this.__currentPosition)):this.__addPathCommand(de("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,s,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(de("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:s,x:i,y:o}))}quadraticCurveTo(t,e,r,s){this.__currentPosition={x:r,y:s},this.__addPathCommand(de("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,s,i){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===r&&e===s||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([r-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(l/2),p=t+f*d[0],m=e+f*d[1],b=[-c[1],c[0]],g=[h[1],-h[0]],w=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},x=w(b),v=w(g);this.lineTo(p+b[0]*i,m+b[1]*i),this.arc(p,m,i,x,v)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),r=this.__rootSVG.childNodes[1],s=r.childNodes;for(let i=s.length-1;i>=0;i--)s[i]&&r.removeChild(s[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,r,s){if(t===0&&e===0&&r===this.width&&s===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:r,height:s,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,r,s){const i=this.__createElement("linearGradient",{id:Zo(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new Bu(i,this)}createRadialGradient(t,e,r,s,i,o){const a=this.__createElement("radialGradient",{id:Zo(this.__ids),cx:s+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Bu(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),r={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(r.decoration="underline"),this.__fontHref&&(r.href=this.__fontHref),r}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,s){const i=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:e,y:r,"text-anchor":JP(this.textAlign),"dominant-baseline":ZP(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(i,a))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,s,i,o){if(s===i)return;s=s%(2*Math.PI),i=i%(2*Math.PI),s===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+r*Math.cos(i),c=e+r*Math.sin(i),h=t+r*Math.cos(s),u=e+r*Math.sin(s),l=o?0:1;let d=0,f=i-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(de("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=Zo(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",de("url(#{id})",{id:r})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],r,s,i,o,a=0,c=0,h,u,l,d,f,p,m,b;if(t.length===3)r=t[1],s=t[2],h=e.width,u=e.height,i=h,o=u;else if(t.length===5)r=t[1],s=t[2],i=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],r=t[5],s=t[6],i=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const g=this.__closestGroupOrSvg();this.__currentElement;const w="translate("+r+", "+s+")";if(e instanceof Qo){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)b=d.childNodes[0].getAttribute("id"),this.__ids[b]=b,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let v;x?v=x+" "+w:v=w,f.setAttribute("transform",v),g.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",i),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=i,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,i,o),e=m),p.setAttribute("transform",w),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),g.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=Zo(this.__ids);let i;return r.setAttribute("id",s),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(i=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(i),this.__SVGdefs.appendChild(r)):t instanceof Qo&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new P0(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class $u{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,r,s=!1,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Qo({canvas:this.canvas,width:e||this.canvas.width,height:r||this.canvas.height})),this.enablePath2D=typeof i=="boolean"?i:!1}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,r,s){return this.context.fillRect(t,e,r,s),this.customContext&&this.customContext.fillRect(t,e,r,s),this}fillText(t,e,r,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,r,s),this.customContext&&this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,r,s){return this.context.strokeText(t,e,r,s),this.customContext&&this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,s){return this.context.strokeRect(t,e,r,s),this.customContext&&this.customContext.strokeRect(t,e,r,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,r=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,r,s),this.customContext&&this.customContext.clearRect(t,e,r,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D),this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.currentPath2D=this.path2Ds.pop()||new Path2D),this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.enablePath2D&&this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){if(this.enablePath2D){const r=new Path2D;r.addPath(t,e),this.currentPath2D=r}}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix=this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,r=0){return this.translate(e,r),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-r),this.changePath2D(),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-r,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.enablePath2D&&this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.enablePath2D&&this.currentPath2D.lineTo(t,e),this}arc(t,e,r,s,i,o){return this.context.arc(t,e,r,s,i,o),this.customContext&&this.customContext.arc(t,e,r,s,i,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,r,s,i,o),this}arcTo(t,e,r,s,i){return this.context.arcTo(t,e,r,s,i),this.customContext&&this.customContext.arcTo(t,e,r,s,i),this.enablePath2D&&this.currentPath2D.arcTo(t,e,r,s,i),this}ellipse(t,e,r,s,i,o,a,c){return this.context.ellipse(t,e,r,s,i,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,r,s,i,o,a,c),this}quadraticCurveTo(t,e,r,s){return this.context.quadraticCurveTo(t,e,r,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,r,s),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,r,s),this}bezierCurveTo(t,e,r,s,i,o){return this.context.bezierCurveTo(t,e,r,s,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,r,s,i,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,r,s,i,o),this}rect(t,e,r,s){return this.context.rect(t,e,r,s),this.customContext&&this.customContext.rect(t,e,r,s),this.enablePath2D&&this.currentPath2D.rect(t,e,r,s),this}createLinearGradient(t,e,r,s,i){const o=this.context.createLinearGradient(t,e,r,s);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,r,s,i,o,a){const c=this.context.createRadialGradient(t,e,r,s,i,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const r=e[0],s=e[1];this.context.drawImage(t,r,s)}else if(e.length===4){const r=e[0],s=e[1],i=e[2],o=e[3];this.context.drawImage(t,r,s,i,o)}else if(e.length===8){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,r,s,i,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,r=this.canvas.width,s=this.canvas.height,i){return this.context.getImageData(t,e,r,s,i)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}let Ft=class Gl{shouldUpdatePathD=!1;shouldUpdateTransformPathD=!1;shouldUpdateSVGElInDraw=!1;shouldUpdateMInDraw=!0;shouldUpdateAttrsInDraw=!0;shouldUpdateStyleInDraw=!0;id;initD;d;parent;attrs={};style={};initCenterX;initCenterY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;interactive;drag;transform$=new un;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=Pf(),this.initD=t?.initD,this.setAttr({stroke:"none",fill:"none"}),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.transformSubscription=this.transform$.subscribe(()=>{this.shouldUpdateTransformPathD=!0,this.shouldUpdateMInDraw=!0})}destroy(){this.transformSubscription.unsubscribe()}moveTo(t,e){const r=this._x,s=this._y;(r!==t||s!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-r,dY:e-s}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x!==t&&(this.transform$.next({dX:t-this._x}),this._x=t)}get y(){return this._y}set y(t){this._y!==t&&(this.transform$.next({dY:t-this._y}),this._y=t)}rotateTo(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}scaleTo(t,e){const r=this._scaleX,s=this._scaleY;(this._scaleX!==t||this._scaleY!==(e||t))&&(this._scaleX=t,this._scaleY=e||t,this.transform$.next({dScaleX:this._scaleX/r,dScaleY:this._scaleY/s}))}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX!==t&&(this.transform$.next({dScaleX:t/this._scaleX}),this._scaleX=t)}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY!==t&&(this.transform$.next({dScaleY:t/this._scaleY}),this._scaleY=t)}pathD(t){return t?(this.d=t,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0):this.initD?this.d||(this.d=this.initD instanceof fe?this.initD:new fe(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new fe(this.toSVGPathData()),this.shouldUpdatePathD=!1,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0),this.d}cachedTransformedPathD;transformPathD(){if(!this.m){const{x:t,y:e}=this.transformOrigin();let r=0,s=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);r=o.x,s=o.y}const i=new Zt;i.translate(this.x+(this.parent?.dX||0),this.y+(this.parent?.dY||0)),i.rotate(this.degree,t,e),i.scale(this.scaleX,this.scaleY,t,e),this.parent?.dDegree&&i.rotate(this.parent.dDegree,r,s),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&i.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,r,s),this.m=i}return(this.shouldUpdateTransformPathD||!this.cachedTransformedPathD)&&(this.cachedTransformedPathD=this.pathD().transform({m:this.m}),this.shouldUpdateTransformPathD=!1),this.cachedTransformedPathD}getBaseOptions(){return{initD:this.initD,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,interactive:this.interactive,drag:{...this.drag}}}clone(){return this.cloneShape()}cloneShape(){return new Gl(this.getBaseOptions())}update(t){this.shouldUpdatePathD=!0}toSVGEl(){return null}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getRealBoundingClientRect(t=2){return this.transformPathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}getRealBoundingClientRectCenter(t=2){return this.transformPathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let r=0,s=0;if(this.parent&&!t){const i=this.parent.combo.getBoundingClientRectCenter(e);r=i.x-this.parent.dX,s=i.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const i=this.getBoundingClientRectCenter(e);r=i.x,s=i.y}else r=this.initCenterX||0,s=this.initCenterY||0;return{x:r,y:s}}isPointInPath(t,e,r){if(t instanceof $u)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,r);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const i=s.inverse();return this.el.isPointInFill({x:i.a*e+i.c*r+i.e,y:i.b*e+i.d*r+i.f})}}return!1}isPointInStroke(t,e,r){if(t instanceof $u)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,r);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const i=s.inverse();return this.el.isPointInStroke({x:i.a*e+i.c*r+i.e,y:i.b*e+i.d*r+i.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const r in t){const s=t[r];s&&s!=this.getAttr(r)&&(this.attrs[Wt(r)]=s,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[Wt(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[Wt(t)]||e}hasAttr(t){return!!this.getAttr(t)}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const r=t?.friction||1;this.vx*=r,this.vy*=r,this.move(this.vx,this.vy)}animateEaseTo(t,e){const r=e?.easing||.05,s=t.x-this.x,i=t.y-this.y;this.vx=s*r,this.vy=i*r,this.animate(e)}animateSpringTo(t,e){const r=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(s=>{const i=s.x-this.x,o=s.y-this.y,a=i*r,c=o*r;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const r=e?.springLength||100,s=e?.spring||5e-4,i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<r){const c=i*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/r}return 0}followTo(t,e=3){this.rotateTo(ee(ze(this.x,this.y,t.x,t.y)));const{dx:r,dy:s}=er(wt(this.degree),e);this.vx=r,this.vy=s,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(ee(ze(this.x,this.y,t.x,t.y)));const{dx:r,dy:s}=er(wt(this.degree),e);this.ax=r,this.ay=s,this.animate()}gravitateTo(t){const e=t.x-this.x,r=t.y-this.y,s=e*e+r*r,i=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/i,c=o*r/i;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){const e=t.x-this.x,r=t.y-this.y,s=Math.sqrt(e*e+r*r),{x:i,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:u}=t.getBoundingClientRectCenter(),{x:l,y:d,width:f,height:p}=this.getBoundingClientRect(),{x:m,y:b}=this.getBoundingClientRectCenter();if(s<Math.abs(h-i)+Math.abs(m-l)||s<Math.abs(u-o)+Math.abs(b-d)){const g=Math.atan2(r,e),w={x:0,y:0},x=Ge(-g,e,r),v=Ge(-g,this.vx,this.vy),E=Ge(-g,t.vx,t.vy),_=v.x-E.x;v.x=((this.mass-t.mass)*v.x+2*t.mass*E.x)/(this.mass+t.mass),E.x=_+v.x;const D=Math.abs(v.x)+Math.abs(E.x),z=this.ballRadius+t.ballRadius-Math.abs(w.x-x.x);w.x+=v.x/D*z,x.x+=E.x/D*z;const O=Ge(g,w.x,w.y),L=Ge(g,x.x,x.y);t.moveTo(this.x+L.x,this.y+L.y),this.moveTo(this.x+O.x,this.y+O.y);const $=Ge(g,v.x,v.y),j=Ge(g,E.x,E.y);this.vx=$.x,this.vy=$.y,t.vx=j.x,t.vy=j.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,r=t.wall.x,s=t.wall.y,i=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:c,width:h,height:u}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>i?this.moveXTo(r-(a+h)):this.x+a+h<r&&this.moveXTo(i-a),this.y+c>o?this.moveYTo(s-(c+u)):this.y+c+u<s&&this.moveYTo(o-c)):(this.x+a+h>i?(this.moveXTo(i-(a+h)),this.vx*=e):this.x+a<r&&(this.moveXTo(r+(a+h)),this.vx*=e),this.y+c+u>o?(this.moveYTo(o-(c+u)),this.vy*=e):this.y+c<s&&(this.moveYTo(s+(c+u)),this.vy*=e))}getTotalLength(){return this.transformPathD().getTotalLength()}getPointAtLength(t){return this.transformPathD().getPointAtLength(t)}interpolate(t){return this.transformPathD().interpolate(t)}trailPath(t=0,e=1){const r=this.getTotalLength(),s=t*r,i=e*r;return{subPathD:this.transformPathD().getSubPathD(s,i),point:this.getPointAtLength(i)}}strokeDashTween(t=1e3,e){const r=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${r} ${r}`,strokeDashoffset:`${r}`});const s=e?.onUpdate,i=new As({frameDuration:t});i.addTween({offset:r},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+at(o.offset,2)),s?.(o,a)}})),i.play()}static generateRosetta(t,e,r,s,i){if(i==0)throw new Error("no dividing by zero, please");const o=[],a=360/i;for(let c=0;c<i;c+=1){const h=a*c*Math.PI/180,u=t+2*r*Math.cos(h),l=e+2*r*Math.sin(h);o.push(new Lu({x:t,y:e,rx:r,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),o.push(new Lu({x:u,y:l,rx:r,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new Gl({initD:fe.fromLines(o)})}};class ye{shapes=[];svg;forceWidth;attrs={};style={};initCenterX;initCenterY;x;y;degree;scaleX;scaleY;interactive;drag;constructor(t){if(this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this.x=t?.x||0,this.y=t?.y||0,this.degree=t?.degree||0,this.scaleX=1,this.scaleY=1,t?.scale!==void 0&&(this.scaleX=t.scale,this.scaleY=t.scale),t?.scaleX!==void 0&&(this.scaleX=t.scaleX),t?.scaleY!==void 0&&(this.scaleY=t.scaleY),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.svg=t?.svg,this.forceWidth=t?.forceWidth,t?.svg){this.initCenterX=0,this.initCenterY=0;let e=0,r=0,s=0,i=0;const o=new C0(t.svg).parse();for(let a=0,c=o.length;a<c;a++){const h=o[a];if(h.type=="viewbox"&&h.width&&h.height){if(e=parseFloat(h.width),r=parseFloat(h.height),t.forceWidth){const p=e/r;s=t.forceWidth,i=s/p}else s=e,i=r;continue}if(h.type!="path"||!Hc(h.path))continue;const u={};for(const p in h)p==="type"||p==="path"||p==="transform"||(u[p]=h[p]);const l=so(ro(h.path)),d=[];let f=[];for(let p=0,m=l.length;p<m;p++){const b=l[p];f.push(b),b[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(p=>{const m=new Ft({attrs:u,initD:p});if(h.transform){const g=R0(h.transform).split();m.moveTo(g.x,g.y),m.rotateTo(g.degree),m.scaleTo(g.scaleX,g.scaleY)}this.addShape(m)})}s&&e&&i&&r&&this.comboScale(s/e,i/r,!0)}}destroy(){this.shapes.forEach(t=>t.destroy())}getBaseOptions(){return{svg:this.svg,forceWidth:this.forceWidth,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this.x,y:this.y,degree:this.degree,scaleX:this.scaleX,scaleY:this.scaleY,interactive:this.interactive,drag:{...this.drag}}}clone(){const t=this.cloneShapeCombo();return t.shapes=this.shapes.map(e=>{const r=e.clone();return e.parent&&(r.parent={...e.parent,combo:t}),r}),t}cloneShapeCombo(){return new ye(this.getBaseOptions())}update(t){this.shapes.forEach(e=>e.update(t))}addShape(t,e){e?.notCopyFromCombo!==!0&&(t.setAttr(this.attrs),t.setStyle(this.style),t.interactive=t.interactive||this.interactive,t.drag={...this.drag,...t.drag}),t.parent={combo:this,dX:e?.dX||0,dY:e?.dY||0,dDegree:e?.dDegree||0,dScaleX:e?.dScaleX||1,dScaleY:e?.dScaleY||1},this.shapes.push(t)}comboMove(t,e,r=!1){r||(this.x+=t,this.y+=e),this.shapes.forEach(s=>{s.move(t,e)})}comboRotate(t,e=!1){e||(this.degree+=t),this.shapes.forEach(r=>{r.rotate(t)})}comboScale(t,e,r=!1){r||(this.scaleX*=t,this.scaleY*=e||t),this.shapes.forEach(s=>{s.scale(t,e)})}comboTransform(t,e=!1){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0,e),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0,e),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1,e)}getBoundingClientRect(t=2){const e=[],r=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)}),e.length==0||r.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min(...e),i=Math.min(...r),o=Math.max(...e),a=Math.max(...r);return{x:at(s,t),y:at(i,t),width:at(o-s,t),height:at(a-i,t)}}getBoundingClientRectCenter(t=2){if(typeof this.initCenterX=="number"&&typeof this.initCenterY=="number")return{x:this.initCenterX,y:this.initCenterY};const e=this.getBoundingClientRect(t);return{x:at(e.x+e.width*.5,t),y:at(e.y+e.height*.5,t)}}setStyle(t){Object.assign(this.style,t),this.shapes.forEach(e=>{e.setStyle(t)})}setAttr(t,e){if(typeof t!="string"){for(const r in t){const s=t[r];s&&s!=this.getAttr(r)&&(this.attrs[Wt(r)]=s)}this.shapes.forEach(r=>{r.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[Wt(t)]=e,this.shapes.forEach(r=>{r.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[Wt(t)]||e}hasAttr(t){return!!this.getAttr(t)}sort(){this.shapes.map(t=>({shape:t,perimeter:t.transformPathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,r=this.shapes.length;if(e<r)return t.expendTo(this);for(let s=r;s<e;s++){const i=t.shapes[s];this.addShape(new Ft({initD:i.pathD().clone()}),{dX:i.x-this.x,dY:i.y-this.y,dDegree:i.degree-this.degree,dScaleX:i.scaleX/this.scaleX,dScaleY:i.scaleY/this.scaleY,notCopyFromCombo:!0})}}strokeDashTween(t,e){switch(e?.type){case"sequence":this.shapes.forEach((o,a)=>{o.strokeDashTween(t,{...e,delay:a,onStart:()=>{a==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{a==this.shapes.length-1&&e?.onGroupComplete?.()}})});break;case"parallel":default:const r=new As({frameDuration:t}),s={},i={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();s[`offset_${a}`]=c,i[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),r.addTween(s,i,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=Ia(c).number;this.shapes[h].setAttr("strokeDashoffset",""+at(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),r.play();break}}}function QP(n,t,e=5){const r=Oa(e);(!r(n.x,t.current.x)||!r(n.y,t.current.y))&&n.followTo(t.current)}function tA(n,t,e){n.drag&&n.drag.enable&&!n.isDragging&&n.animateEaseTo(t,e)}function eA(n,t){const e=[],r=n.length;for(let s=0;s<r;s++){const i=n[s];if(t?.springLength){const o=t?.springLength||100;i.isDragging||n.filter(a=>a.id!==i.id).forEach(a=>{const c=ze(i.x,i.y,a.x,a.y);i.animateSpringTo({x:a.x-Math.cos(c)*o,y:a.y-Math.sin(c)*o},t)})}else t?.spring?s>0&&i.animateSpringTo(n[s-1],t):i.animate(t);if(t?.wall&&i.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=s+1;o<r;o++)t?.enableCollision&&i.checkCollision(n[o]),t?.enableGravityBetweenObjects&&i.gravitateTo(n[o]),t?.enableSpringMassAlpha&&e.push([i.x,i.y,n[o].x,n[o].y,i.getSpringMassAlphaTo(n[o],t)])}return e}function A0(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let s=0;s<t;s++){const i=n[s].transformPathD(),o=n[s+1].transformPathD(),a=i.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[s]=fe.getInterpolator(i.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const r=new Ft({initD:""});return s=>{const i=at(t*s,6),o=Math.min(Math.floor(i),t-1),a=at(i-o,6);return r.pathD(e[o](a)),r.setAttr(n[o+1].attrs),r}}function nA(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];n.forEach(o=>{let a;o instanceof ye?(a=o,a.sort()):(a=new ye,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const r=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((c,h)=>{r[h]=r[h]||[],r[h][a]=c})});const s=[];r.forEach(o=>{s.push(A0(o))});const i=new ye;return s.forEach(o=>{i.addShape(o(0))}),o=>(s.forEach(a=>{a(o)}),i)}function rA(n,t=6e3,e){const r=n.findIndex(a=>a instanceof ye)>=0?nA(n):A0(n),s=r(0),i=e?.onUpdate,o=new As({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{i?.(a,c),r(a.t),e?.shapeOrCombo?.(s,a.t)}})),o.play(),s}class sA{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new Wi(null);resizeSubscription;mpg=wr();mouseSubscription;shapes=[];shapeTap$=new Wi(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",r=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&$0(this.PARENT_EL),e=="svg"&&(this.SVG_EL=Ln("svg"),ts(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=G0("canvas"),ts(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=vl(this.PARENT_EL).subscribe(s=>{this.rect.x=s.x,this.rect.y=s.y,this.rect.width=s.width,this.rect.height=s.height,this.SVG_EL&&An(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(An(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new $u(this.CANVAS_EL,this.rect.width,this.rect.height,r)),this.size$.next(s)}),this.mouseSubscription=dy(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{createMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=ey(this.PARENT_EL).subscribe(s=>{for(const i of this.shapes)if(i.isMouseIn){this.shapeTap$.next(i);break}})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe(),this.tapSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}draw(...t){if(t.length){const e=[];t.forEach(r=>{r instanceof ye?e.push(...r.shapes):e.push(r)}),this.SVG_EL&&this.shapes.filter(r=>e.findIndex(s=>s.id==r.id)==-1).forEach(r=>{r.el&&(r.el.remove(),delete r.el)}),$1(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:r,y:s}=e.transformOrigin();let i=0,o=0;if(e.parent?.dDegree||e.parent?.dScaleX!==1||e.parent?.dScaleY!==1){const a=e.transformOrigin(!0);i=a.x,o=a.y}if(e.shouldUpdatePathD&&e.pathD(),this.SVG_EL){if(!e.el||e.shouldUpdateSVGElInDraw){const a=e.toSVGEl();e.el?a&&(e.el.remove(),e.el=a,ts(this.SVG_EL,e.el),An(e.el,{id:e.id})):(e.el=a||Wc(),ts(this.SVG_EL,e.el),An(e.el,{id:e.id})),mm(e.el)&&An(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(sf(e.attrs)||An(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(sf(e.style)||Or(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new Zt;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,r,s),a.scale(e.scaleX,e.scaleY,r,s),e.parent?.dDegree&&a.rotate(e.parent.dDegree,i,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&a.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,i,o),An(e.el,{transform:a.toString()}),e.m=a,e.shouldUpdateMInDraw=!1}}if(this.ctx&&(this.ctx.save(),this.ctx.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),this.ctx.rotate(wt(e.degree),r,s),this.ctx.scale(e.scaleX,e.scaleY,r,s),e.parent?.dDegree&&this.ctx.rotate(wt(e.parent.dDegree),i,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&this.ctx.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,i,o),e.m=this.ctx.currentMatrix,_d(this.ctx,e.attrs),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),e.interactive?this.SVG_EL?e.isMouseIn=e.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?e.isMouseIn=e.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):e.isMouseIn=!1:e.isMouseIn=!1,e.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=e.id),e.isDragging=e.id==this.draggingShapeId,this.mpg.current.isDown&&(e.isDragging||!this.draggingShapeId&&e.isMouseIn&&e.drag&&e.drag.enable)){this.setCursor("grabbing"),e.isDragging=!0,this.draggingShapeId=e.id;let a=this.mpg.current.x-this.mpg.start.x,c=this.mpg.current.y-this.mpg.start.y;if(a||c){if(e.drag&&e.drag.enable&&e.drag.alongPath){const h=e.drag.alongPath.transform({m:e.m}).closestPoint(this.mpg.current.x,this.mpg.current.y);a=h.point.x-e.x,c=h.point.y-e.y}(a||c)&&(e.move(a,c),e.parent?.combo.shapes.forEach(h=>{h.drag?.followSibling&&h!==e&&h.move(a,c)}))}this.mpg.setStart(this.mpg.current)}else e.isMouseIn&&e.drag&&e.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}clear(){this.shapes.forEach(t=>{t.el&&(t.el.remove(),delete t.el)}),this.ctx&&this.ctx.clearRect(),this.shapes=[]}drawMouseMoveLine(t){const e=t?.brushSize||4,r=t?.brushColor||"#000000";let s=!1;const i=aa(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{s=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=r,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(s?this.ctx.lineTo(o.current.x,o.current.y):(s=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{i.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,r=t?.brushDensity||50,s=t?.brushColor||"#000000",i=new Ne(s),o=i.r,a=i.g,c=i.b,h=aa(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(u=>{if(this.ctx){const l=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),d=l.data;for(let f=0;f<r;f++){const p=Math.random()*Math.PI*2,m=Math.random()*e,b=u.current.x+Math.cos(p)*m|0,g=u.current.y+Math.sin(p)*m|0,w=(b+g*l.width)*4;d[w]=o,d[w+1]=a,d[w+2]=c,d[w+3]=255}this.ctx.putImageData(l)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&pm(this.SVG_EL)}}class vr extends Ft{lineLength;startColor;endColor;constructor(t){super({...t,centerX:0,centerY:0}),this.lineLength=t?.lineLength||0,this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.startColor||this.getAttr("stroke")||"#000000"})}cloneShape(){return new vr({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=ee(ze(this.x,this.y,t.x,t.y)),r=tr(this.x,this.y,t.x,t.y);(e!=this.degree||r!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),r!=this.lineLength&&(this.lineLength=r),this.shouldUpdatePathD=!0)}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}getBoundingClientRect(){return{x:0,y:0,width:this.lineLength,height:parseFloat(this.getAttr("strokeWidth"))}}toSVGPathData(){return[["m",0,0],["l",this.lineLength,0]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.lineLength,0,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.lineLength,0)}intersection(t){const e=this.transformPathD().normalizedLines[0],r=t.transformPathD().normalizedLines[0];return e.intersection(r)}}class Uu extends Ft{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new Uu({...super.getBaseOptions(),cx:this.cx,cy:this.cy,toX:this.toX,toY:this.toY,isLineThrough:this.isLineThrough})}update(t){typeof t.cx=="number"&&(this.cx=t.cx,this.shouldUpdatePathD=!0),typeof t.cy=="number"&&(this.cy=t.cy,this.shouldUpdatePathD=!0),typeof t.toX=="number"&&(this.toX=t.toX,this.shouldUpdatePathD=!0),typeof t.toY=="number"&&(this.toY=t.toY,this.shouldUpdatePathD=!0),typeof t.isLineThrough=="boolean"&&(this.isLineThrough=t.isLineThrough,this.shouldUpdatePathD=!0)}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(0+this.toX)/2,e=this.cy*2-(0+this.toY)/2;return[["m",0,0],["q",t,e,this.toX,this.toY]]}else return[["m",0,0],["q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(0+this.toX)/2,r=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class ta extends Ft{points;isStraight;constructor(t){super(t),this.points=t?.points||[],this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new ta({...super.getBaseOptions(),points:[...this.points],isStraight:this.isStraight})}update(t){"points"in t&&(this.points=[...t.points||this.points],this.shouldUpdatePathD=!0),typeof t.isStraight=="boolean"&&(this.isStraight=t.isStraight,this.shouldUpdatePathD=!0)}toSVGPathData(){const t=[];if(this.points.length<3)return t;const e=this.points.length;if(this.isStraight){t.push(["m",this.points[0].x,this.points[0].y]);for(let r=1;r<=e-1;r++)t.push(["l",this.points[r].x-this.points[r-1].x,this.points[r].y-this.points[r-1].y]);t.push(["z"])}else{const r=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;let i=r,o=s;t.push(["m",i,o]);for(let a=0;a<e-1;a++){const c=(this.points[a].x+this.points[a+1].x)/2,h=(this.points[a].y+this.points[a+1].y)/2;t.push(["q",this.points[a].x-i,this.points[a].y-o,c-i,h-o]),i=c,o=h}t.push(["q",this.points[e-1].x-i,this.points[e-1].y-o,r-i,s-o])}return t}toCanvasContext(t){if(this.points.length<3)return;t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let r=1;r<=e-1;r++)t.lineTo(this.points[r].x,this.points[r].y);t.closePath()}else{const r=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(r,s);for(let i=0;i<e-1;i++){const o=(this.points[i].x+this.points[i+1].x)/2,a=(this.points[i].y+this.points[i+1].y)/2;t.quadraticCurveTo(this.points[i].x,this.points[i].y,o,a)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,r,s)}}isPointInShape(t){const e=this.points.length;let r=!1;const s=2e-10;for(let i=0,o=e-1;i<e;o=i,i++){const a=this.points[i].x,c=this.points[i].y,h=this.points[o].x,u=this.points[o].y;if(a===t.x&&c===t.y||h===t.x&&u===t.y||t.y===c&&t.y===u)return!0;if(t.y>=c&&t.y<u||t.y<c&&t.y>=u){const l=(h-a)/(u-c),d=a+l*(t.y-c);if(d===t.x||Math.abs(d-t.x)<s)return!0;d>t.x&&(r=!r)}}return r}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}static generate(t,e,r,s){const i=[];for(let o=0;o<s;o++){const a=o/s*2*Math.PI,{dx:c,dy:h}=er(a,r);i.push({x:t+c,y:e+h})}return new ta({points:i})}}class Yu extends ye{length=100;constructor(t){super(t);const e=new vr({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const r=new vr({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(r,{dX:90-Math.random()*40,dDegree:Math.random()*70});const s=new vr({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(s,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new Yu(super.getBaseOptions())}}class Zr extends Ft{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new Zr({...super.getBaseOptions(),ballRadius:this.ballRadius})}update(t){typeof t.ballRadius=="number"&&(this.ballRadius=t.ballRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:-this.ballRadius,y:-this.ballRadius,width:this.ballRadius*2,height:this.ballRadius*2}}toSVGEl(){const t=Ln("circle");return this.setAttr({cx:"0",cy:"0",r:String(this.ballRadius)}),t}toSVGPathData(){return this.ballRadius?[["m",0,-this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,2*this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,-2*this.ballRadius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.ballRadius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.ballRadius===t.ballRadius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return Qa(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const r=t/e;this.scalar(r)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,r=this.y;return{x:r*t.x-e*t.y,y:e*t.y-r*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}}class ju extends Ft{constructor(t){super(t)}cloneShape(){return new ju({...super.getBaseOptions()})}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class Gn extends Ft{rectWidth;rectHeight;rectBorderRadius;constructor(t){super(t),this.rectWidth=t.rectWidth||0,this.rectHeight=t.rectHeight||0,this.rectBorderRadius=t.rectBorderRadius||0}cloneShape(){return new Gn({...super.getBaseOptions(),rectWidth:this.rectWidth,rectHeight:this.rectHeight,rectBorderRadius:this.rectBorderRadius})}update(t){typeof t.rectWidth=="number"&&(this.rectWidth=t.rectWidth,this.shouldUpdatePathD=!0),typeof t.rectHeight=="number"&&(this.rectHeight=t.rectHeight,this.shouldUpdatePathD=!0),typeof t.rectBorderRadius=="number"&&(this.rectBorderRadius=t.rectBorderRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:0,y:0,width:this.rectWidth,height:this.rectHeight}}toSVGEl(){const t=Ln("rect");return this.setAttr({x:"0",y:"0",width:String(this.rectWidth),height:String(this.rectHeight),rx:String(this.rectBorderRadius),ry:String(this.rectBorderRadius)}),t}toSVGPathData(){return this.rectBorderRadius?[["m",this.rectBorderRadius,0],["l",this.rectWidth-this.rectBorderRadius*2,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,this.rectBorderRadius],["l",0,this.rectHeight-this.rectBorderRadius*2],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,this.rectBorderRadius],["l",this.rectBorderRadius*2-this.rectWidth,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,-this.rectBorderRadius],["l",0,this.rectBorderRadius*2-this.rectHeight],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,-this.rectBorderRadius],["z"]]:[["m",0,0],["l",this.rectWidth,0],["l",0,this.rectHeight],["l",-this.rectWidth,0],["z"]]}toCanvasContext(t){t.beginPath(),this.rectBorderRadius<=0?t.rect(0,0,this.rectWidth,this.rectHeight):(t.moveTo(0,this.rectBorderRadius),t.lineTo(0,this.rectHeight-this.rectBorderRadius),t.quadraticCurveTo(0,this.rectHeight,this.rectBorderRadius,this.rectHeight),t.lineTo(this.rectWidth-this.rectBorderRadius,this.rectHeight),t.quadraticCurveTo(this.rectWidth,this.rectHeight,this.rectWidth,this.rectHeight-this.rectBorderRadius),t.lineTo(this.rectWidth,this.rectBorderRadius),t.quadraticCurveTo(this.rectWidth,0,this.rectWidth-this.rectBorderRadius,0),t.lineTo(this.rectBorderRadius,0),t.quadraticCurveTo(0,0,0,this.rectBorderRadius)),t.closePath()}static fromCubicBezier(t,e,r,s,i,o,a,c){const u=new Jt({x:t,y:e,c1x:r,c1y:s,c2x:i,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new Gn({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.height})}eq(t){return this.x===t.x&&this.y===t.y&&this.rectWidth===t.rectWidth&&this.rectHeight===t.rectHeight&&this.rectBorderRadius===t.rectBorderRadius}intersection(t){return!(this.x+this.rectWidth<t.x||t.x+t.rectWidth<this.x||this.y+this.rectHeight<t.y||t.y+t.rectHeight<this.y)}isPointInShape(t){return t.x>=this.x&&t.x<=this.x+this.rectWidth&&t.y>=this.y&&t.y<=this.y+this.rectHeight}}class Gu extends Ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Gu({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class Xu extends Ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new Xu({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class Wu extends Ft{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Wu({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const r=288+e*144,s=this.r*Math.cos(wt(r)),i=this.r*Math.sin(wt(r));t.push(["l",s,i])}return t}}class Hu extends Ft{constructor(t){super(t)}cloneShape(){return new Hu({...super.getBaseOptions()})}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class qu extends Ft{constructor(t){super(t)}cloneShape(){return new qu({...super.getBaseOptions()})}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,2*15],["a",15,15,0,1,1,0,-2*15]]}}class Ku extends Ft{constructor(t){super({...t,initD:"m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"})}cloneShape(){return new Ku({...super.getBaseOptions()})}}class Ju extends Ft{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Ju({...super.getBaseOptions(),rx:this.rx,ry:this.ry})}getBoundingClientRect(){return{x:this.x-this.rx,y:this.y-this.ry,width:this.rx*2,height:this.ry*2}}toSVGEl(){const t=Ln("ellipse");return this.setAttr({cx:"0",cy:"0",rx:String(this.rx),ry:String(this.ry)}),t}toSVGPathData(){return[["m",0,-this.ry],["a",this.rx,this.ry,0,1,1,0,2*this.ry],["a",this.rx,this.ry,0,1,1,0,-2*this.ry],["z"]]}toCanvasContext(t){t.beginPath(),t.ellipse(0,0,this.rx,this.ry,0,0,2*Math.PI,!0),t.closePath()}}class Zu extends ye{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new Ft({initD:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]],drag:{followSibling:!0}}),this.showFlame&&this.addShape(this.flame),this.ship=new Ft({initD:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]],drag:{followSibling:!0}}),this.addShape(this.ship)}cloneShapeCombo(){return new Zu({...super.getBaseOptions(),showFlame:this.showFlame})}update(t){typeof t?.showFlame=="boolean"&&(this.shapes=[],this.showFlame=t?.showFlame,this.showFlame&&this.addShape(this.flame),this.addShape(this.ship))}}class Qu extends ye{width;height;cornerRadius;constructor(t){super(t),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const e=new Gn({drag:{followSibling:!0},rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(e,{dX:0-this.cornerRadius,dY:0-this.height*.5});const r=new Zr({drag:{followSibling:!0},ballRadius:2});this.addShape(r);const s=new Zr({drag:{followSibling:!0},ballRadius:2});this.addShape(s,{dX:0+this.width})}cloneShapeCombo(){return new Qu({...super.getBaseOptions(),segmentWidth:this.width,segmentHeight:this.height,segmentCornerRadius:this.cornerRadius})}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(wt(t.degree))*this.width,y:t.y+Math.sin(wt(t.degree))*this.width}}}class tl extends ye{options;value$=new un;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,r=t?.sliderMax||100,s=t?.sliderStep||1,i=F1(e,r,s),o=i(typeof t?.sliderDefaultValue=="number"?st(t.sliderDefaultValue,e,r):e);this.value$.next(o);const a=o/(r-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,u=h*.5,l=h*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",p=new Gn({rectWidth:c,rectHeight:h,rectBorderRadius:u,attrs:{fill:d},drag:{enable:!1}});this.addShape(p);const m=new Gn({rectWidth:c*a,rectHeight:h,rectBorderRadius:u,attrs:{fill:f},drag:{enable:!1}});this.addShape(m);const b=new Zr({x:c*a,y:u,ballRadius:l,attrs:{fill:f},drag:{enable:!0,alongPath:new fe([["m",0,0],["l",c,0]])}});this.addShape(b),this.subscription=b.transform$.subscribe(({dX:g})=>{console.log(g);const w=(b.x-p.x)/c;m.update({rectWidth:c*w}),this.value$.next(i(w*(r-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new tl({...super.getBaseOptions(),...this.options})}}class ni extends Ft{half;lineWidth;radius;startDegree;endDegree;percent=0;percentDegree=0;startColor;endColor;constructor(t){super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t.lineWidth;const e=t.width||0,r=t.height||0,s=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const i=Math.min(e/2,r)-this.lineWidth;this.radius=Math.max(0,i-i*Math.sin(wt(s)))}else this.radius=Math.max(0,Math.min(e/2,r/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=r-this.lineWidth-this.radius*Math.sin(wt(s)):this.y=r/2),t.forceCoordinate?(this.startDegree=t.startDegree,this.endDegree=t.endDegree):(this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree),this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({"stroke-linecap":"round","stroke-width":String(this.lineWidth),stroke:this.startColor||"#000000"}),this.setPercent(t.percent||1)}cloneShape(){return new ni({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,radius:this.radius,forceCoordinate:!0,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:this.percent})}setPercent(t){this.percent=Math.max(0,t),this.percentDegree=this.startDegree+(this.endDegree-this.startDegree)*t}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){const{dx:t,dy:e}=er(wt(this.startDegree),this.radius),{dx:r,dy:s}=er(wt(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,r-t,s-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const r=this.radius-this.radius*Math.cos(Math.PI*this.percent),s=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+r,-s,{0:this.startColor,1:this.endColor})}else{const r=this.radius*Math.sin(2*Math.PI*this.percent),s=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,r,-s,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,wt(this.startDegree),wt(this.percentDegree),!1)}}class el extends ye{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t){if(super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t?.lineWidth||12,this.width=t.width,this.height=t.height,this.bgColor=t?.bgColor,this.startColor=t?.startColor,this.endColor=t?.endColor,this.half?(this.startDegree=t?.startDegree||-90-15,this.endDegree=t?.endDegree||90+15):(this.startDegree=t?.startDegree||0,this.endDegree=t?.endDegree||360),this.percent=t?.percent||0,this.ringBg=new ni({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.bgColor,percent:1}),this.addShape(this.ringBg),this.ring=new ni({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:0}),this.addShape(this.ring),this.indicatorLineCount=22+1,this.half){const i=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new vr({lineLength:17,startColor:this.startColor,endColor:this.endColor,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(a);const c=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*o;this.addShape(a,{dX:this.ringBg.x+Math.cos(wt(c))*i,dY:this.ringBg.y+Math.sin(wt(c))*i,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new el({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,width:this.width,height:this.height,bgColor:this.bgColor,startColor:this.startColor,endColor:this.endColor,startDegree:this.startDegree,endDegree:this.endDegree,percent:this.percent})}setPercent(t){if(this.percent=Math.max(0,t),this.ring.setPercent(t),this.half)for(let e=0;e<this.indicatorLineCount;e++)e/(this.indicatorLineCount-1)<=this.percent?this.lines[e].enableGradient(this.startColor,this.endColor):this.lines[e].disableGradient(this.bgColor)}}class Qr extends Ft{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.attrs});const e=Ia(this.getAttr("fontSize"),10).number,r=Ia(this.getAttr("fontWeight"),400).number,s=Qr.measureText(this.text,e,r);this.width=s.width,this.height=s.height}cloneShape(){return new Qr({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=Ln("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
110
+ */var n0;function TP(){return n0||(n0=1,{}.NODE_ENV!=="production"&&function(){function n(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Co,e=t0(),r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;Su.useSyncExternalStoreWithSelector=function(h,u,l,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!w){if(w=!0,x=_,_=d(_),f!==void 0&&m.hasValue){var D=m.value;if(f(D,_))return v=D}return v=_}if(D=v,r(x,_))return D;var z=d(_);return f!==void 0&&f(D,z)?(x=_,D):(x=_,v=z)}var w=!1,x,v,E=l===void 0?null:l;return[function(){return g(u())},E===null?void 0:function(){return g(E())}]},[u,l,d,f]);var b=s(h,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Su}({}).NODE_ENV==="production"?bu.exports=CP():bu.exports=TP();var PP=bu.exports;function AP(n){const t=St.createContext(null);function e({children:a}){return React.createElement(t.Provider,{value:n},a)}function r(){const a=St.useContext(t);if(!a)throw new ReferenceError("createReactAppStoreContext's hooks cannot be called outside of AppStoreProvider");return a}function s(a,c){const h=r(),u=l=>h.subscribe(()=>l());return a?PP.useSyncExternalStoreWithSelector(u,h.getState,h.getState,a,c):St.useSyncExternalStore(u,h.getState,h.getState)}function i(){const a=r();if(bi(a))throw new Error("useSetAppState is only supported for StateStoreLike");return a.setState.bind(a)}function o(){const a=r();if(!bi(a))throw new Error("useDispatch is only supported for ReduxStore");return a.dispatch.bind(a)}return{AppStoreProvider:e,useAppStore:r,useAppState:s,useSetAppState:i,useDispatch:o}}function MP(n){const e=St.useRef(is(n.value)).current;if(!e&&!("defaultValue"in n))throw new Error("defaultValue is required in uncontrolled mode");if(e&&!("onChange"in n))throw new Error("onChange is required in controlled mode");const[r,s]=St.useState(()=>e?n.value:n.defaultValue),i=e?n.value:r,o=St.useRef(i);o.current=i;const a=St.useRef(!1);St.useEffect(()=>{!a.current&&is(n.value)!==e&&(a.current=!0,console.warn("[useReactControllableState] can't switch between controlled and uncontrolled mode."))},[n.value]);const c=St.useRef(n.beforeChange);c.current=n.beforeChange;const h=St.useRef(n.onChange);h.current=n.onChange;const u=St.useRef(0),l=St.useCallback(async d=>{const f=++u.current,p=typeof d=="function"?d(o.current):d;c.current&&!await c.current(p)||f===u.current&&(e||s(p),h.current?.(p))},[]);return[i,l]}var r0=Symbol.for("immer-nothing"),s0=Symbol.for("immer-draftable"),le=Symbol.for("immer-state"),DP={}.NODE_ENV!=="production"?[function(n){return`The plugin for '${n}' has not been loaded into Immer. To enable the plugin, import and call \`enable${n}()\` when initializing your application.`},function(n){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${n}'`},"This object has been frozen and should not be mutated",function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(n){return`'current' expects a draft, got: ${n}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(n){return`'original' expects a draft, got: ${n}`}]:[];function Ee(n,...t){if({}.NODE_ENV!=="production"){const e=DP[n],r=yr(e)?e.apply(null,t):e;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Ce=Object,Jr=Ce.getPrototypeOf,No="constructor",zo="prototype",_u="configurable",Vo="enumerable",Fo="writable",Ks="value",jn=n=>!!n&&!!n[le];function vn(n){return n?o0(n)||Uo(n)||!!n[s0]||!!n[No]?.[s0]||Yo(n)||jo(n):!1}var OP=Ce[zo][No].toString(),i0=new WeakMap;function o0(n){if(!n||!Cu(n))return!1;const t=Jr(n);if(t===null||t===Ce[zo])return!0;const e=Ce.hasOwnProperty.call(t,No)&&t[No];if(e===Object)return!0;if(!yr(e))return!1;let r=i0.get(e);return r===void 0&&(r=Function.toString.call(e),i0.set(e,r)),r===OP}function Bo(n,t,e=!0){Js(n)===0?(e?Reflect.ownKeys(n):Ce.keys(n)).forEach(s=>{t(s,n[s],n)}):n.forEach((r,s)=>t(s,r,n))}function Js(n){const t=n[le];return t?t.type_:Uo(n)?1:Yo(n)?2:jo(n)?3:0}var a0=(n,t,e=Js(n))=>e===2?n.has(t):Ce[zo].hasOwnProperty.call(n,t),Eu=(n,t,e=Js(n))=>e===2?n.get(t):n[t],$o=(n,t,e,r=Js(n))=>{r===2?n.set(t,e):r===3?n.add(e):n[t]=e};function IP(n,t){return n===t?n!==0||1/n===1/t:n!==n&&t!==t}var Uo=Array.isArray,Yo=n=>n instanceof Map,jo=n=>n instanceof Set,Cu=n=>typeof n=="object",yr=n=>typeof n=="function",Tu=n=>typeof n=="boolean";function RP(n){const t=+n;return Number.isInteger(t)&&String(t)===n}var wn=n=>n.copy_||n.base_,Pu=n=>n.modified_?n.copy_:n.base_;function Au(n,t){if(Yo(n))return new Map(n);if(jo(n))return new Set(n);if(Uo(n))return Array[zo].slice.call(n);const e=o0(n);if(t===!0||t==="class_only"&&!e){const r=Ce.getOwnPropertyDescriptors(n);delete r[le];let s=Reflect.ownKeys(r);for(let i=0;i<s.length;i++){const o=s[i],a=r[o];a[Fo]===!1&&(a[Fo]=!0,a[_u]=!0),(a.get||a.set)&&(r[o]={[_u]:!0,[Fo]:!0,[Vo]:a[Vo],[Ks]:n[o]})}return Ce.create(Jr(n),r)}else{const r=Jr(n);if(r!==null&&e)return{...n};const s=Ce.create(r);return Ce.assign(s,n)}}function Zs(n,t=!1){return Xo(n)||jn(n)||!vn(n)||(Js(n)>1&&Ce.defineProperties(n,{set:Go,add:Go,clear:Go,delete:Go}),Ce.freeze(n),t&&Bo(n,(e,r)=>{Zs(r,!0)},!1)),n}function kP(){Ee(2)}var Go={[Ks]:kP};function Xo(n){return n===null||!Cu(n)?!0:Ce.isFrozen(n)}var Wo="MapSet",Mu="Patches",c0="ArrayMethods",h0={};function br(n){const t=h0[n];return t||Ee(0,n),t}var u0=n=>!!h0[n],Qs,l0=()=>Qs,LP=(n,t)=>({drafts_:[],parent_:n,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:u0(Wo)?br(Wo):void 0,arrayMethodsPlugin_:u0(c0)?br(c0):void 0});function f0(n,t){t&&(n.patchPlugin_=br(Mu),n.patches_=[],n.inversePatches_=[],n.patchListener_=t)}function Du(n){Ou(n),n.drafts_.forEach(NP),n.drafts_=null}function Ou(n){n===Qs&&(Qs=n.parent_)}var d0=n=>Qs=LP(Qs,n);function NP(n){const t=n[le];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function m0(n,t){t.unfinalizedDrafts_=t.drafts_.length;const e=t.drafts_[0];if(n!==void 0&&n!==e){e[le].modified_&&(Du(t),Ee(4)),vn(n)&&(n=p0(t,n));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(e[le].base_,n,t)}else n=p0(t,e);return zP(t,n,!0),Du(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),n!==r0?n:void 0}function p0(n,t){if(Xo(t))return t;const e=t[le];if(!e)return qo(t,n.handledSet_,n);if(!Ho(e,n))return t;if(!e.modified_)return e.base_;if(!e.finalized_){const{callbacks_:r}=e;if(r)for(;r.length>0;)r.pop()(n);b0(e,n)}return e.copy_}function zP(n,t,e=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Zs(t,e)}function g0(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var Ho=(n,t)=>n.scope_===t,VP=[];function y0(n,t,e,r){const s=wn(n),i=n.type_;if(r!==void 0&&Eu(s,r,i)===t){$o(s,r,e,i);return}if(!n.draftLocations_){const a=n.draftLocations_=new Map;Bo(s,(c,h)=>{if(jn(h)){const u=a.get(h)||[];u.push(c),a.set(h,u)}})}const o=n.draftLocations_.get(t)??VP;for(const a of o)$o(s,a,e,i)}function FP(n,t,e){n.callbacks_.push(function(s){const i=t;if(!i||!Ho(i,s))return;s.mapSetPlugin_?.fixSetContents(i);const o=Pu(i);y0(n,i.draft_??i,o,e),b0(i,s)})}function b0(n,t){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const s=r.getPath(n);s&&r.generatePatches_(n,s,t)}g0(n)}}function BP(n,t,e){const{scope_:r}=n;if(jn(e)){const s=e[le];Ho(s,r)&&s.callbacks_.push(function(){Jo(n);const o=Pu(s);y0(n,e,o,t)})}else vn(e)&&n.callbacks_.push(function(){const i=wn(n);n.type_===3?i.has(e)&&qo(e,r.handledSet_,r):Eu(i,t,n.type_)===e&&r.drafts_.length>1&&(n.assigned_.get(t)??!1)===!0&&n.copy_&&qo(Eu(n.copy_,t,n.type_),r.handledSet_,r)})}function qo(n,t,e){return!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||jn(n)||t.has(n)||!vn(n)||Xo(n)||(t.add(n),Bo(n,(r,s)=>{if(jn(s)){const i=s[le];if(Ho(i,e)){const o=Pu(i);$o(n,r,o,n.type_),g0(i)}}else vn(s)&&qo(s,t,e)})),n}function $P(n,t){const e=Uo(n),r={type_:e?1:0,scope_:t?t.scope_:l0(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,i=Ko;e&&(s=[r],i=ti);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,[a,r]}var Ko={get(n,t){if(t===le)return n;let e=n.scope_.arrayMethodsPlugin_;const r=n.type_===1&&typeof t=="string";if(r&&e?.isArrayOperationMethod(t))return e.createMethodInterceptor(n,t);const s=wn(n);if(!a0(s,t,n.type_))return UP(n,s,t);const i=s[t];if(n.finalized_||!vn(i)||r&&n.operationMethod&&e?.isMutatingArrayMethod(n.operationMethod)&&RP(t))return i;if(i===Iu(n.base_,t)){Jo(n);const o=n.type_===1?+t:t,a=ku(n.scope_,i,n,o);return n.copy_[o]=a}return i},has(n,t){return t in wn(n)},ownKeys(n){return Reflect.ownKeys(wn(n))},set(n,t,e){const r=v0(wn(n),t);if(r?.set)return r.set.call(n.draft_,e),!0;if(!n.modified_){const s=Iu(wn(n),t),i=s?.[le];if(i&&i.base_===e)return n.copy_[t]=e,n.assigned_.set(t,!1),!0;if(IP(e,s)&&(e!==void 0||a0(n.base_,t,n.type_)))return!0;Jo(n),Ru(n)}return n.copy_[t]===e&&(e!==void 0||t in n.copy_)||Number.isNaN(e)&&Number.isNaN(n.copy_[t])||(n.copy_[t]=e,n.assigned_.set(t,!0),BP(n,t,e)),!0},deleteProperty(n,t){return Jo(n),Iu(n.base_,t)!==void 0||t in n.base_?(n.assigned_.set(t,!1),Ru(n)):n.assigned_.delete(t),n.copy_&&delete n.copy_[t],!0},getOwnPropertyDescriptor(n,t){const e=wn(n),r=Reflect.getOwnPropertyDescriptor(e,t);return r&&{[Fo]:!0,[_u]:n.type_!==1||t!=="length",[Vo]:r[Vo],[Ks]:e[t]}},defineProperty(){Ee(11)},getPrototypeOf(n){return Jr(n.base_)},setPrototypeOf(){Ee(12)}},ti={};for(let n in Ko){let t=Ko[n];ti[n]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}ti.deleteProperty=function(n,t){return{}.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Ee(13),ti.set.call(this,n,t,void 0)},ti.set=function(n,t,e){return{}.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Ee(14),Ko.set.call(this,n[0],t,e,n[0])};function Iu(n,t){const e=n[le];return(e?wn(e):n)[t]}function UP(n,t,e){const r=v0(t,e);return r?Ks in r?r[Ks]:r.get?.call(n.draft_):void 0}function v0(n,t){if(!(t in n))return;let e=Jr(n);for(;e;){const r=Object.getOwnPropertyDescriptor(e,t);if(r)return r;e=Jr(e)}}function Ru(n){n.modified_||(n.modified_=!0,n.parent_&&Ru(n.parent_))}function Jo(n){n.copy_||(n.assigned_=new Map,n.copy_=Au(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var YP=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,r)=>{if(yr(t)&&!yr(e)){const i=e;e=t;const o=this;return function(c=i,...h){return o.produce(c,u=>e.call(this,u,...h))}}yr(e)||Ee(6),r!==void 0&&!yr(r)&&Ee(7);let s;if(vn(t)){const i=d0(this),o=ku(i,t,void 0);let a=!0;try{s=e(o),a=!1}finally{a?Du(i):Ou(i)}return f0(i,r),m0(s,i)}else if(!t||!Cu(t)){if(s=e(t),s===void 0&&(s=t),s===r0&&(s=void 0),this.autoFreeze_&&Zs(s,!0),r){const i=[],o=[];br(Mu).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),r(i,o)}return s}else Ee(1,t)},this.produceWithPatches=(t,e)=>{if(yr(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let r,s;return[this.produce(t,e,(o,a)=>{r=o,s=a}),r,s]},Tu(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),Tu(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),Tu(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){vn(n)||Ee(8),jn(n)&&(n=jP(n));const t=d0(this),e=ku(t,n,void 0);return e[le].isManual_=!0,Ou(t),e}finishDraft(n,t){const e=n&&n[le];(!e||!e.isManual_)&&Ee(9);const{scope_:r}=e;return f0(r,t),m0(void 0,r)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,t){let e;for(e=t.length-1;e>=0;e--){const s=t[e];if(s.path.length===0&&s.op==="replace"){n=s.value;break}}e>-1&&(t=t.slice(e+1));const r=br(Mu).applyPatches_;return jn(n)?r(n,t):this.produce(n,s=>r(s,t))}};function ku(n,t,e,r){const[s,i]=Yo(t)?br(Wo).proxyMap_(t,e):jo(t)?br(Wo).proxySet_(t,e):$P(t,e);return(e?.scope_??l0()).drafts_.push(s),i.callbacks_=e?.callbacks_??[],i.key_=r,e&&r!==void 0?FP(e,i,r):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:h}=c;i.modified_&&h&&h.generatePatches_(i,[],c)}),s}function jP(n){return jn(n)||Ee(10,n),w0(n)}function w0(n){if(!vn(n)||Xo(n))return n;const t=n[le];let e,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,e=Au(n,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else e=Au(n,!0);return Bo(e,(s,i)=>{$o(e,s,w0(i))},r),t&&(t.finalized_=!1),e}var GP=new YP,x0=GP.produce;console.log("core-web react",nh.version,nh);function XP(n){const[t,e]=St.useState(()=>Zs(typeof n=="function"?n():n,!0));return[t,St.useCallback(r=>{e(typeof r=="function"?x0(r):Zs(r))},[])]}function WP(n,t,e){const r=St.useMemo(()=>x0(n),[n]);return St.useReducer(r,t,e)}function HP(n){const[t,e]=St.useState({width:0,height:0});return St.useLayoutEffect(()=>{n.current&&e(()=>({width:n.current.offsetWidth,height:n.current.offsetHeight}))},[n]),t}let Lu=class{x;y;toX;toY;constructor(t){this.x=at(t?.x||0,2),this.y=at(t?.y||0,2),this.toX=at(t?.toX||0,2),this.toY=at(t?.toY||0,2)}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(t=2){const e=ze(this.x,this.y,this.toX,this.toY);if(e===0){const r=Math.min(this.x,this.toX),s=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),o=Math.max(this.y,this.toY);return{x:r,y:s,width:i-r,height:o-s}}else{const r=Math.sin(e),s=Math.cos(e),i=s*this.x-r*this.y,o=s*this.toX-r*this.toY,a=s*this.y+r*this.x,c=s*this.toY+r*this.toX;return{x:at(Math.min(i,o),t),y:at(Math.min(a,c),t),width:at(Math.max(i,o)-Math.min(i,o),t),height:at(Math.max(a,c)-Math.min(a,c),t)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,r=this.y,s=t.toX,i=t.toY,o=this.toX-e,a=t.x-s;if(!o&&!a)return null;const c=(this.toY-r)/o,h=(t.y-i)/a;if(o){if(!a)return{x:s,y:c*(s-e)+r}}else return{x:e,y:h*(e-s)+i};const u=(-h*s+i+c*e-r)/(c-h),l=c*(u-e)+r;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class Nu extends Lu{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=at(t.rx,2),this.ry=at(t.ry,2),this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,r,s,i,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,r,s,i,o,a,c,!this.sweepFlag)}convert(t,e,r,s,i,o,a,c,h){const u=a/180*Math.PI,l=(t-r)/2,d=(e-s)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,m=f*f/(i*i)+p*p/(o*o);if(m>1){const $=Math.sqrt(m);throw i=$*i,o=$*o,new Error(`Radii are too small to build an arc. Correcting them to ${i}/${o}.`)}const b=Math.sqrt((i*i*o*o-i*i*p*p-o*o*f*f)/(i*i*p*p+o*o*f*f)),g=c!=h?1:-1,w=g*b*i*p/o,x=g*b*-o*f/i,v=(t+r)/2,E=(e+s)/2,_=Math.cos(u)*w-Math.sin(u)*x+v,D=Math.sin(u)*w+Math.cos(u)*x+E,z=($,j,Q,rt)=>($*rt>=j*Q?1:-1)*Math.acos(($*Q+j*rt)/(Math.sqrt($*$+j*j)*Math.sqrt(Q*Q+rt*rt))),O=z(1,0,t-_,e-D)-u,L=z(t-_,e-D,r-_,s-D);return[_,D,i,o,u,O,O+L]}}class qP extends Lu{cx;cy;isLineThrough;constructor(t){super(t),this.cx=at(t.cx,2),this.cy=at(t.cy,2),this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,r=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(t=2){const e=[this.x,this.toX],r=[this.y,this.toY];let s,i,o,a;for(let u=0;u<2;++u)s=u==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=u==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,o=u==0?this.x:this.y,Math.abs(s)>1e-12&&(a=-i/(2*s),0<a&&a<1&&[e,r][u].push(s*a*a+i*a+o));const c={x:Math.min(0,...e),y:Math.min(0,...r)},h={x:Math.max(0,...e),y:Math.max(0,...r)};return{x:at(c.x,t),y:at(c.y,t),width:at(h.x-c.x,t),height:at(h.y-c.y,t)}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const KP=qP;class Jt extends Lu{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=at(t.c1x,2),this.c1y=at(t.c1y,2),this.c2x=at(t.c2x,2),this.c2y=at(t.c2y,2)}clone(){return new Jt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(t=2){let e=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),r=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),s=this.x-this.c1x,i=(-r+Math.sqrt(r*r-4*e*s))/2/e,o=(-r-Math.sqrt(r*r-4*e*s))/2/e;const a=[this.y,this.toY],c=[this.x,this.toX];let h;const u=[];Math.abs(i)>1e12&&(i=.5),Math.abs(o)>1e12&&(o=.5),i>=0&&i<=1&&(h=this.interpolate(i),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),e=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),r=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),s=this.y-this.c1y,i=(-r+Math.sqrt(r*r-4*e*s))/2/e,o=(-r-Math.sqrt(r*r-4*e*s))/2/e,Math.abs(i)>1e12&&(i=.5),Math.abs(o)>1e12&&(o=.5),i>=0&&i<=1&&(h=this.interpolate(i),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y})),o>=0&&o<=1&&(h=this.interpolate(o),c.push(h.x),a.push(h.y),u.push({X:h.x,Y:h.y}));const l=[],d=u.length;for(let m=0;m<d;m++){for(let b=m+1;b<d;b++)u[m].X===u[b].X&&u[m].Y===u[b].Y&&(b=++m);l.push({X:u[m].X,Y:u[m].Y})}const f={x:Math.min(...c),y:Math.min(...a)},p={x:Math.max(...c),y:Math.max(...a)};return{x:at(f.x,t),y:at(f.y,t),width:at(p.x-f.x,t),height:at(p.y-f.y,t),dots:l}}static base3(t,e,r,s,i){const o=-3*e+9*r-9*s+3*i,a=t*o+6*e-12*r+6*s;return t*a-3*e+3*r}static bezlen(t,e,r,s,i,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const m=u*l[p]+u,b=Jt.base3(m,t,r,i,a),g=Jt.base3(m,e,s,o,c);f+=d[p]*Math.sqrt(b*b+g*g)}return u*f}length(t=1){return Jt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getPointAtSegmentLength(t){const e=this.getTatLen(t),r=1-e,s=Math.pow(r,3),i=Math.pow(r,2),o=e*e,a=o*e,c=s*this.x+i*3*e*this.c1x+r*3*e*e*this.c2x+a*this.toX,h=s*this.y+i*3*e*this.c1y+r*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=r*this.x+e*this.c1x,m=r*this.y+e*this.c1y,b=r*this.c2x+e*this.toX,g=r*this.c2y+e*this.toY,w=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:m},end:{x:b,y:g},alpha:w}}getTatLen(t){const e=this.x,r=this.y,s=this.c1x,i=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||Jt.bezlen(e,r,s,i,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=Jt.bezlen(e,r,s,i,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=Jt.bezlen(e,r,s,i,o,a,c,h,d);return d}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}}class S0 extends Va{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=a1(this.source);if(t===0){this.emit("finish");return}let e,r,s=Kl(this.source,0);for(let i=1;i<t;i++)e=r,r=s,s=Kl(this.source,i),this.raw+=r,r&&this.step(r,s,e);s&&this.step(s,void 0,r),this.emit("finish")}step(t,e,r){t==`
111
+ `&&this.emit("newline"),this.act(t,e,r)}act(t,e,r){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":rn("whitespace",t)?(this.textchunk+=_0(this.entity),this.mode="text"):t==";"?(this.textchunk+=_0(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(r=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(r=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,r)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&r=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!rn("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,r)}break;case"close tag name start":rn("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,r));break;case"close tag name":if(rn("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(rn("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":rn("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,r));break;case"attr":if(rn("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!rn("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,r)}break;case"attr value":if(rn("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&r!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function _0(n){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return n.charAt(0)=="#"?n.charAt(1).toLowerCase()=="x"?e=parseInt(n.substring(2),16):e=parseInt(n.substring(1),10):e=t[n],e?String.fromCharCode(e):"&"+n}var E0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function C0(n,t={}){var e=1,r=1;function s(Y){var F=Y.match(/\n/g);F&&(e+=F.length);var A=Y.lastIndexOf(`
112
+ `);r=~A?Y.length-A:r+Y.length}function i(){var Y={line:e,column:r};return function(F){return F.position=new o(Y),p(),F}}function o(Y){this.start=Y,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;var a=[];function c(Y){var F=new Error(t.source+":"+e+":"+r+": "+Y);if(F.reason=Y,F.filename=t.source,F.line=e,F.column=r,F.source=n,t.silent)a.push(F);else throw F}function h(){var Y=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:Y,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var Y,F=[];for(p(),m(F);n.length&&n.charAt(0)!="}"&&(Y=tt()||bt());)Y!==!1&&(F.push(Y),m(F));return F}function f(Y){var F=Y.exec(n);if(F){var A=F[0];return s(A),n=n.slice(A.length),F}}function p(){f(/^\s*/)}function m(Y){var F;for(Y=Y||[];F=b();)F!==!1&&Y.push(F);return Y}function b(){var Y=i();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var F=2;n.charAt(F)!=""&&(n.charAt(F)!="*"||n.charAt(F+1)!="/");)++F;if(F+=2,n.charAt(F-1)==="")return c("End of comment missing");var A=n.slice(2,F-2);return r+=2,s(A),n=n.slice(F),r+=2,Y({type:"comment",comment:A})}}function g(){var Y=f(/^([^{]+)/);if(Y)return xn(Y[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(F){return F.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(F){return F.replace(/\u200C/g,",")})}function w(){var Y=i(),F=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(F){if(F=xn(F[0]),!f(/^:\s*/))return c("property missing ':'");var A=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),N=Y({type:"declaration",property:F.replace(E0,""),value:A?xn(A[0]).replace(E0,""):""});return f(/^[;\s]*/),N}}function x(){var Y=[];if(!u())return c("missing '{'");m(Y);for(var F;F=w();)F!==!1&&(Y.push(F),m(Y));return l()?Y:c("missing '}'")}function v(){for(var Y,F=[],A=i();Y=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)F.push(Y[1]),f(/^,\s*/);if(F.length)return A({type:"keyframe",values:F,declarations:x()})}function E(){var Y=i(),F=f(/^@([-\w]+)?keyframes\s*/);if(F){var A=F[1];if(F=f(/^([-\w]+)\s*/),!F)return c("@keyframes missing name");var N=F[1];if(!u())return c("@keyframes missing '{'");for(var H,K=m();H=v();)K.push(H),K=K.concat(m());return l()?Y({type:"keyframes",name:N,vendor:A,keyframes:K}):c("@keyframes missing '}'")}}function _(){var Y=i(),F=f(/^@supports *([^{]+)/);if(F){var A=xn(F[1]);if(!u())return c("@supports missing '{'");var N=m().concat(d());return l()?Y({type:"supports",supports:A,rules:N}):c("@supports missing '}'")}}function D(){var Y=i(),F=f(/^@host\s*/);if(F){if(!u())return c("@host missing '{'");var A=m().concat(d());return l()?Y({type:"host",rules:A}):c("@host missing '}'")}}function z(){var Y=i(),F=f(/^@media *([^{]+)/);if(F){var A=xn(F[1]);if(!u())return c("@media missing '{'");var N=m().concat(d());return l()?Y({type:"media",media:A,rules:N}):c("@media missing '}'")}}function O(){var Y=i(),F=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(F)return Y({type:"custom-media",name:xn(F[1]),media:xn(F[2])})}function L(){var Y=i(),F=f(/^@page */);if(F){var A=g()||[];if(!u())return c("@page missing '{'");for(var N=m(),H;H=w();)N.push(H),N=N.concat(m());return l()?Y({type:"page",selectors:A,declarations:N}):c("@page missing '}'")}}function $(){var Y=i(),F=f(/^@([-\w]+)?document *([^{]+)/);if(F){var A=xn(F[1]),N=xn(F[2]);if(!u())return c("@document missing '{'");var H=m().concat(d());return l()?Y({type:"document",document:N,vendor:A,rules:H}):c("@document missing '}'")}}function j(){var Y=i(),F=f(/^@font-face\s*/);if(F){if(!u())return c("@font-face missing '{'");for(var A=m(),N;N=w();)A.push(N),A=A.concat(m());return l()?Y({type:"font-face",declarations:A}):c("@font-face missing '}'")}}var Q=nt("import"),rt=nt("charset"),ot=nt("namespace");function nt(Y){var F=new RegExp("^@"+Y+"\\s*([^;]+);");return function(){var A=i(),N=f(F);if(N){var H={type:Y};return H[Y]=N[1].trim(),A(H)}}}function tt(){if(n[0]=="@")return E()||z()||O()||_()||Q()||rt()||ot()||$()||L()||D()||j()}function bt(){var Y=i(),F=g();return F?(m(),Y({type:"rule",selectors:F,declarations:x()})):c("selector missing")}return zu(h())}function xn(n){return n?n.replace(/^\s+|\s+$/g,""):""}function zu(n,t){var e=n&&typeof n.type=="string",r=e?n:t;for(var s in n){var i=n[s];Array.isArray(i)?i.forEach(function(o){zu(o,r)}):i&&typeof i=="object"&&zu(i,r)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}class T0 extends S0{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,r)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,r)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const r=C0(e);for(const s of r.stylesheet.rules)for(const i of s.declarations)for(const o of s.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${i.property}:${i.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,r)=>{let s=this.groups.length;for(;s--;)if(this.groups[s]!=this.currentItem){let i="",o="";for(const a in this.groups[s])a=="transform"?i=this.groups[s].transform:a=="class"&&this.globalStyles["."+this.groups[s][a]]?o=this.globalStyles["."+this.groups[s][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[s][a]]?o=this.globalStyles["#"+this.groups[s][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[s][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=i:this.currentItem.transform+=" "+i,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),Fu(this.currentItem.style,this.currentItem,Bu)}switch(this.processAttrs(e,r),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let r=[],s;switch(t){case"svg":let i="",o="";if(e.width&&e.height)i=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(i=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}i&&o&&this.items.push({type:"viewbox",width:i,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":s={},e.style&&Fu(e.style,s),s.offset=s.offset||e.offset,s.color=s["stop-color"]||e["stop-color"],s.opacity=s["stop-opacity"]||e["stop-opacity"],~(s.offset+"").indexOf("%")?s.offset=parseFloat(s.offset):s.offset=parseFloat(s.offset)*100,s.offset=+s.offset.toFixed(2),this.grad.stops.push(s);break;case"linearGradient":this.grad.angle=(360+Vu(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),r=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?r.push(s.color+":"+s.offset):r.push(s.color);this.idtops[this.grad.id]=r.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":r=[];for(let a=0,c=this.grad.stops.length;a<c;a++)s=this.grad.stops[a],a&&a!=c-1?r.push(s.color+":"+s.offset):r.push(s.color);this.idtops[this.grad.id]=r.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const i in e){const o=e[i];if(Bu.includes(i)&&(this.currentItem[i]=o),i==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:i,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:i,stops:[]})),i==="style"&&Fu(o,this.currentItem,Bu),i==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),i==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}i==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),i==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),i==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function Vu(n,t,e,r,s,i){if(typeof s>"u"||typeof i>"u"){const o=n-e,a=t-r;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Vu(n,t,s,i)-Vu(e,r,s,i)}function Fu(n,t,e){const r=(n+"").split(";"),s=/^\s+|\s+$/g;for(let i=0,o=r.length;i<o;i++){const a=r[i].split(":"),c=a[0].replace(s,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(s,""))}}const Bu=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class fe{prevPathX=0;prevPathY=0;isUpdatedSVGPathData=!0;isUpdatedSVGPathD=!0;isUpdatedBoundingClientRect=!0;isUpdatedPolymorphPoints=!0;isUpdatedTotalLength=!0;normalizedLines=[];constructor(t){const e=typeof t=="string"?ro(t):t||[],r=Kc(so(e));for(let s=0,i=r.length;s<i;s++){const o=r[s];o[0]=="M"?(this.prevPathX=o[1],this.prevPathY=o[2]):this._appendLine(new Jt({x:this.prevPathX,y:this.prevPathY,c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],toX:o[5],toY:o[6]}))}}_appendLine(t){if(this.isUpdatedSVGPathData=!0,this.isUpdatedSVGPathD=!0,this.isUpdatedBoundingClientRect=!0,this.isUpdatedPolymorphPoints=!0,this.isUpdatedTotalLength=!0,t instanceof Nu){no(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,m,b,g]=h;this.normalizedLines.push(new Jt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:m,toX:b,toY:g})),this.prevPathX=b,this.prevPathY=g});return}if(t instanceof Jt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,r,s,i,o,a;t instanceof KP?[e,r,s,i,o,a]=Es(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,r,s,i,o,a]=hr(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Jt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:r,c2x:s,c2y:i,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new fe,r=t.length;if(r){e.prevPathX=t[0],e.prevPathY=t[1];for(let s=2;s+5<r;s+=6)e._appendLine(new Jt({x:e.prevPathX,y:e.prevPathY,c1x:t[s],c1y:t[s+1],c2x:t[s+2],c2y:t[s+3],toX:t[s+4],toY:t[s+5]}))}return e}static fromLines(t){const e=new fe,r=t.length;if(r){e.prevPathX=t[0].x,e.prevPathY=t[0].y;for(let s=0;s<r;s++)e._appendLine(t[s])}return e}clone(){return fe.fromLines(this.normalizedLines)}cachedSVGPathData=[];toSVGPathData(){if(this.isUpdatedSVGPathData){const t=[];for(let e=0,r=this.normalizedLines.length;e<r;e++){const s=this.normalizedLines[e];e==0&&t.push(["M",s.x,s.y]),t.push(...s.toSVGPathData())}this.cachedSVGPathData=t,this.isUpdatedSVGPathData=!1}return this.cachedSVGPathData}cachedSVGPathD="";toSVGPathD(){return this.isUpdatedSVGPathD&&(this.cachedSVGPathD=qc(this.toSVGPathData()),this.isUpdatedSVGPathD=!1),this.cachedSVGPathD}toCanvasContext(t){t.beginPath();for(let e=0,r=this.normalizedLines.length;e<r;e++){const s=this.normalizedLines[e];e==0&&t.moveTo(s.x,s.y),s.toCanvasContext(t)}}cachedBoundingClientRect={x:0,y:0,width:0,height:0};getBoundingClientRect(t=2){if(this.isUpdatedBoundingClientRect){const e=[],r=[];if(this.normalizedLines.forEach(s=>{const i=s.getBoundingClientRect(t);e.push(i.x,i.x+i.width),r.push(i.y,i.y+i.height)}),e.length==0||r.length==0)this.cachedBoundingClientRect={x:0,y:0,width:0,height:0};else{const s=Math.min(...e),i=Math.min(...r),o=Math.max(...e),a=Math.max(...r);this.cachedBoundingClientRect={x:at(s,t),y:at(i,t),width:at(o-s,t),height:at(a-i,t)}}this.isUpdatedBoundingClientRect=!1}return this.cachedBoundingClientRect}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:at(e.x+e.width*.5,t),y:at(e.y+e.height*.5,t)}}transform(t){let e;return t.m?e=t.m:(e=new Zt,e.translate(t.x||0,t.y||0),e.rotate(t.degree||0,t.centerX,t.centerY),e.scale(t.scaleX||1,t.scaleY||1,t.centerX,t.centerY)),e.isIdentity?this.clone():fe.fromLines(this.normalizedLines.map(r=>{let s=r.x,i=r.y,o=r.c1x,a=r.c1y,c=r.c2x,h=r.c2y,u=r.toX,l=r.toY;return{x:s,y:i}=e.transformPoint({x:s,y:i}),{x:o,y:a}=e.transformPoint({x:o,y:a}),{x:c,y:h}=e.transformPoint({x:c,y:h}),{x:u,y:l}=e.transformPoint({x:u,y:l}),new Jt({x:s,y:i,c1x:o,c1y:a,c2x:c,c2y:h,toX:u,toY:l})}))}cachedTotalLength;getTotalLength(){return(typeof this.cachedTotalLength!="number"||this.isUpdatedTotalLength)&&(this.cachedTotalLength=Math.round(this.normalizedLines.reduce((t,e)=>t+=e.length(),0)),this.isUpdatedTotalLength=!1),this.cachedTotalLength}getPointAtLength(t){let e=0,r=0;const s=this.normalizedLines.length;for(let i=0;i<s;i++){const o=this.normalizedLines[i];if(r=o.length(),e+r>=t)return o.getPointAtSegmentLength(t-e);e+=r}return this.normalizedLines[s-1].getPointAtSegmentLength(r)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let r=t*e,s=this.normalizedLines[0];if(r--,r>1)for(let i=1;i<e&&(s=this.normalizedLines[i],r>1);i++)r-=1;return s.interpolate(r)}}getSubPathD(t,e,r=1e-6){const s=this.getSubPathDAtLength(e,!0);return Oa(r)(t,0)?s:s.getSubPathDAtLength(t,!1)}getSubPathDAtLength(t,e=!1){const r=new fe;let s=0,i=!1;for(let o=0,a=this.normalizedLines.length;o<a;o++){const c=this.normalizedLines[o];o==0&&(r.prevPathX=c.x,r.prevPathY=c.y);const h=c.length();if(s+h>t&&!i){i=!0;const u=c.getPointAtSegmentLength(t-s);if(r._appendLine(new Jt({x:r.prevPathX,y:r.prevPathY,c1x:u.start.x,c1y:u.start.y,c2x:u.m.x,c2y:u.m.y,toX:u.x,toY:u.y})),e)return r;r.normalizedLines=[],r._appendLine(new Jt({x:r.prevPathX,y:r.prevPathY,c1x:u.n.x,c1y:u.n.y,c2x:u.end.x,c2y:u.end.y,toX:c.toX,toY:c.toY})),s+=h;continue}r._appendLine(c),s+=h}return r}closestPoint(t,e){const r=this.getTotalLength();let s={x:t,y:e},i=0,o=1/0,a=8;for(let h=0;h<=r;h+=a){const u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(s=u,i=h,o=l)}for(a/=2;a>.5;){const h=i-a,u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),d=i+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&l<o?(s=u,i=h,o=l):d<=r&&p<o?(s=f,i=d,o=p):a/=2}const c=this.getPointAtLength(i+(i===r?-.1:.1));return{point:s,rotation:i>=r?ze(c.x,c.y,s.x,s.y):ze(s.x,s.y,c.x,c.y),distance:Math.sqrt(o)}}cachedPolymorphPoints=[];getPolymorphPoints(){if(this.isUpdatedPolymorphPoints){if(this.normalizedLines.length){const t=this.normalizedLines[0];this.cachedPolymorphPoints=[t.x,t.y].concat(this.normalizedLines.reduce((e,r)=>e.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}this.isUpdatedPolymorphPoints=!1}return[...this.cachedPolymorphPoints]}getPolymorphPointsPerimeter(){let t=0;const e=this.getPolymorphPoints(),r=e.length;if(r){let s=e[r-2],i=e[r-1];for(let o=0;o<r;o+=6)t+=tr(e[o],e[o+1],s,i),s=e[o],i=e[o+1]}return Math.floor(t)}expendToPolymorphPoints(t){const e=t.length,r=this.getPolymorphPoints(),s=r.length;if(s){const i=[];let o=e-s;const a=Math.ceil(e/s);i.push(["M",r[0],r[1]]);let c=2;for(;c+5<=s-1;){const h=r[c++],u=r[c++],l=r[c++],d=r[c++],f=r[c++],p=r[c++];i.push(["C",h,u,l,d,f,p]);let m=0;for(;m<a&&o>0;)i.push(["C",f,p,f,p,f,p]),o-=6,m++}return new fe(i)}else return fe.fromPolymorphPoints(t)}static getInterpolator(t,e){return r=>{const s=Oa(Number.EPSILON);return s(r,0)?t.clone():s(r,1)?e.clone():fe.fromPolymorphPoints(F1(t.getPolymorphPoints(),e.getPolymorphPoints(),r).map(i=>at(i,2)))}}}const P0=JP("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function JP(n,t=10){const e={},r=n.split(",");for(let s=0;s<r.length;s+=2){const i="&"+r[s+1]+";",o=parseInt(r[s],t);e[i]="&#"+o+";"}return e["\\xa0"]="&#160;",e}function de(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function Zo(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function ZP(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function QP(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ei={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class $u{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",de("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}}class A0{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class Qo{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:r=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d")):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.width=e||t?.width||0,this.height=r||t?.height||0,this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ei);for(let e=0,r=t.length;e<r;e++){const s=t[e];this[s]=ei[s].canvas}}__getStyleState(){const t={},e=Object.keys(ei);for(let r=0,s=e.length;r<s;r++){const i=e[r];t[i]=this[i]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,s=e.length;r<s;r++){const i=e[r];this[i]=t[i]}}__createElement(t,e={},r=!1){const s=this.__document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);r&&(s.setAttribute("fill","none"),s.setAttribute("stroke","none"));for(let o=0;o<i.length;o++){const a=i[o];s.setAttribute(a,e[a])}return s}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(i=>{i.setAttribute(t,"")}));const s=Object.keys(ei);for(let i=0;i<s.length;i++){const o=ei[s[i]],a=this[s[i]];if(o.apply){if(a instanceof A0){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,de("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof $u)e.setAttribute(o.apply,de("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,de("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(s[i]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const s=Object.keys(P0);for(let i=0,o=s.length;i<o;i++){const a=s[i],c=P0[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const s=this.__createElement("g");e.appendChild(s),this.__currentElement=s}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(de("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(de("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(de("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,s,i,o){this.__addTransform(de("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:s,e:i,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(de("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(de("L {x} {y}",this.__currentPosition)):this.__addPathCommand(de("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,s,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(de("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:s,x:i,y:o}))}quadraticCurveTo(t,e,r,s){this.__currentPosition={x:r,y:s},this.__addPathCommand(de("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:s}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,s,i){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===r&&e===s||i===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([r-t,s-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=i/Math.sin(l/2),p=t+f*d[0],m=e+f*d[1],b=[-c[1],c[0]],g=[h[1],-h[0]],w=function(E){const _=E[0];return E[1]>=0?Math.acos(_):-Math.acos(_)},x=w(b),v=w(g);this.lineTo(p+b[0]*i,m+b[1]*i),this.arc(p,m,i,x,v)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,s){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+s),this.lineTo(t,e+s),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,s){const i=this.__createElement("rect",{x:t,y:e,width:r,height:s},!0);this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),r=this.__rootSVG.childNodes[1],s=r.childNodes;for(let i=s.length-1;i>=0;i--)s[i]&&r.removeChild(s[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,r,s){if(t===0&&e===0&&r===this.width&&s===this.height){this.__clearCanvas();return}const i=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:r,height:s,fill:"#FFFFFF"},!0);i.appendChild(o)}createLinearGradient(t,e,r,s){const i=this.__createElement("linearGradient",{id:Zo(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:s+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(i),new $u(i,this)}createRadialGradient(t,e,r,s,i,o){const a=this.__createElement("radialGradient",{id:Zo(this.__ids),cx:s+"px",cy:i+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new $u(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),r={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(r.decoration="underline"),this.__fontHref&&(r.href=this.__fontHref),r}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,s){const i=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:e,y:r,"text-anchor":ZP(this.textAlign),"dominant-baseline":QP(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(s),o.appendChild(this.__wrapTextLink(i,a))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,s,i,o){if(s===i)return;s=s%(2*Math.PI),i=i%(2*Math.PI),s===i&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+r*Math.cos(i),c=e+r*Math.sin(i),h=t+r*Math.cos(s),u=e+r*Math.sin(s),l=o?0:1;let d=0,f=i-s;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(de("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=Zo(this.__ids),s=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",de("url(#{id})",{id:r})),t.appendChild(s),this.__currentElement=s}drawImage(...t){let e=t[0],r,s,i,o,a=0,c=0,h,u,l,d,f,p,m,b;if(t.length===3)r=t[1],s=t[2],h=e.width,u=e.height,i=h,o=u;else if(t.length===5)r=t[1],s=t[2],i=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],r=t[5],s=t[6],i=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const g=this.__closestGroupOrSvg();this.__currentElement;const w="translate("+r+", "+s+")";if(e instanceof Qo){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)b=d.childNodes[0].getAttribute("id"),this.__ids[b]=b,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const x=f.getAttribute("transform");let v;x?v=x+" "+w:v=w,f.setAttribute("transform",v),g.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",i),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(m=this.__document.createElement("canvas"),m.width=i,m.height=o,m.getContext("2d")?.drawImage(e,a,c,h,u,0,0,i,o),e=m),p.setAttribute("transform",w),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),g.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),s=Zo(this.__ids);let i;return r.setAttribute("id",s),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(i=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(i),this.__SVGdefs.appendChild(r)):t instanceof Qo&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new A0(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class Uu{canvas;context;customContext;enablePath2D=!1;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,r,s=!1,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),s&&(this.customContext=new Qo({canvas:this.canvas,width:e||this.canvas.width,height:r||this.canvas.height})),this.enablePath2D=typeof i=="boolean"?i:!1}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,r,s){return this.context.fillRect(t,e,r,s),this.customContext&&this.customContext.fillRect(t,e,r,s),this}fillText(t,e,r,s){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,r,s),this.customContext&&this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,r,s){return this.context.strokeText(t,e,r,s),this.customContext&&this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,s){return this.context.strokeRect(t,e,r,s),this.customContext&&this.customContext.strokeRect(t,e,r,s),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,r=this.canvas.width,s=this.canvas.height){return this.context.clearRect(t,e,r,s),this.customContext&&this.customContext.clearRect(t,e,r,s),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D),this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.enablePath2D&&(this.currentPath2D=this.path2Ds.pop()||new Path2D),this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.enablePath2D&&this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){if(this.enablePath2D){const r=new Path2D;r.addPath(t,e),this.currentPath2D=r}}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix=this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,r=0){return this.translate(e,r),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix=this.currentMatrix.rotate(t),this.translate(-e,-r),this.changePath2D(),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix=this.currentMatrix.scale(t,e),this.translate(-r,-s),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.enablePath2D&&this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.enablePath2D&&this.currentPath2D.lineTo(t,e),this}arc(t,e,r,s,i,o){return this.context.arc(t,e,r,s,i,o),this.customContext&&this.customContext.arc(t,e,r,s,i,o?-1:1),this.enablePath2D&&this.currentPath2D.arc(t,e,r,s,i,o),this}arcTo(t,e,r,s,i){return this.context.arcTo(t,e,r,s,i),this.customContext&&this.customContext.arcTo(t,e,r,s,i),this.enablePath2D&&this.currentPath2D.arcTo(t,e,r,s,i),this}ellipse(t,e,r,s,i,o,a,c){return this.context.ellipse(t,e,r,s,i,o,a,c),this.enablePath2D&&this.currentPath2D.ellipse(t,e,r,s,i,o,a,c),this}quadraticCurveTo(t,e,r,s){return this.context.quadraticCurveTo(t,e,r,s),this.customContext&&this.customContext.quadraticCurveTo(t,e,r,s),this.enablePath2D&&this.currentPath2D.quadraticCurveTo(t,e,r,s),this}bezierCurveTo(t,e,r,s,i,o){return this.context.bezierCurveTo(t,e,r,s,i,o),this.customContext&&this.customContext.bezierCurveTo(t,e,r,s,i,o),this.enablePath2D&&this.currentPath2D.bezierCurveTo(t,e,r,s,i,o),this}rect(t,e,r,s){return this.context.rect(t,e,r,s),this.customContext&&this.customContext.rect(t,e,r,s),this.enablePath2D&&this.currentPath2D.rect(t,e,r,s),this}createLinearGradient(t,e,r,s,i){const o=this.context.createLinearGradient(t,e,r,s);return i&&Object.entries(i).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,r,s,i,o,a){const c=this.context.createRadialGradient(t,e,r,s,i,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const r=e[0],s=e[1];this.context.drawImage(t,r,s)}else if(e.length===4){const r=e[0],s=e[1],i=e[2],o=e[3];this.context.drawImage(t,r,s,i,o)}else if(e.length===8){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,r,s,i,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,r=this.canvas.width,s=this.canvas.height,i){return this.context.getImageData(t,e,r,s,i)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}let Ft=class Xl{shouldUpdatePathD=!1;shouldUpdateTransformPathD=!1;shouldUpdateSVGElInDraw=!1;shouldUpdateMInDraw=!0;shouldUpdateAttrsInDraw=!0;shouldUpdateStyleInDraw=!0;id;initD;d;parent;attrs={};style={};initCenterX;initCenterY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;interactive;drag;transform$=new un;transformSubscription;isMouseIn=!1;isDragging=!1;m;el;constructor(t){this.id=Af(),this.initD=t?.initD,this.setAttr({stroke:"none",fill:"none"}),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.transformSubscription=this.transform$.subscribe(()=>{this.shouldUpdateTransformPathD=!0,this.shouldUpdateMInDraw=!0})}destroy(){this.transformSubscription.unsubscribe()}moveTo(t,e){const r=this._x,s=this._y;(r!==t||s!==e)&&(this._x=t,this._y=e,this.transform$.next({dX:t-r,dY:e-s}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x!==t&&(this.transform$.next({dX:t-this._x}),this._x=t)}get y(){return this._y}set y(t){this._y!==t&&(this.transform$.next({dY:t-this._y}),this._y=t)}rotateTo(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree!==t&&(this.transform$.next({dDegree:t-this._degree}),this._degree=t)}scaleTo(t,e){const r=this._scaleX,s=this._scaleY;(this._scaleX!==t||this._scaleY!==(e||t))&&(this._scaleX=t,this._scaleY=e||t,this.transform$.next({dScaleX:this._scaleX/r,dScaleY:this._scaleY/s}))}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX!==t&&(this.transform$.next({dScaleX:t/this._scaleX}),this._scaleX=t)}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY!==t&&(this.transform$.next({dScaleY:t/this._scaleY}),this._scaleY=t)}pathD(t){return t?(this.d=t,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0):this.initD?this.d||(this.d=this.initD instanceof fe?this.initD:new fe(this.initD)):(!this.d||this.shouldUpdatePathD)&&(this.d=new fe(this.toSVGPathData()),this.shouldUpdatePathD=!1,this.shouldUpdateTransformPathD=!0,this.shouldUpdateSVGElInDraw=!0),this.d}cachedTransformedPathD;transformPathD(){if(!this.m){const{x:t,y:e}=this.transformOrigin();let r=0,s=0;if(this.parent?.dDegree||this.parent?.dScaleX!==1||this.parent?.dScaleY!==1){const o=this.transformOrigin(!0);r=o.x,s=o.y}const i=new Zt;i.translate(this.x+(this.parent?.dX||0),this.y+(this.parent?.dY||0)),i.rotate(this.degree,t,e),i.scale(this.scaleX,this.scaleY,t,e),this.parent?.dDegree&&i.rotate(this.parent.dDegree,r,s),(this.parent?.dScaleX!==1||this.parent?.dScaleY!==1)&&i.scale(this.parent?.dScaleX||1,this.parent?.dScaleY||1,r,s),this.m=i}return(this.shouldUpdateTransformPathD||!this.cachedTransformedPathD)&&(this.cachedTransformedPathD=this.pathD().transform({m:this.m}),this.shouldUpdateTransformPathD=!1),this.cachedTransformedPathD}getBaseOptions(){return{initD:this.initD,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,interactive:this.interactive,drag:{...this.drag}}}clone(){return this.cloneShape()}cloneShape(){return new Xl(this.getBaseOptions())}update(t){this.shouldUpdatePathD=!0}toSVGEl(){return null}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getRealBoundingClientRect(t=2){return this.transformPathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}getRealBoundingClientRectCenter(t=2){return this.transformPathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let r=0,s=0;if(this.parent&&!t){const i=this.parent.combo.getBoundingClientRectCenter(e);r=i.x-this.parent.dX,s=i.y-this.parent.dY}else if(typeof this.initCenterX>"u"&&typeof this.initCenterY>"u"){const i=this.getBoundingClientRectCenter(e);r=i.x,s=i.y}else r=this.initCenterX||0,s=this.initCenterY||0;return{x:r,y:s}}isPointInPath(t,e,r){if(t instanceof Uu)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,r);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const i=s.inverse();return this.el.isPointInFill({x:i.a*e+i.c*r+i.e,y:i.b*e+i.d*r+i.f})}}return!1}isPointInStroke(t,e,r){if(t instanceof Uu)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,r);if(this.el instanceof SVGGeometryElement){const s=this.el.getCTM();if(s){const i=s.inverse();return this.el.isPointInStroke({x:i.a*e+i.c*r+i.e,y:i.b*e+i.d*r+i.f})}}return!1}setStyle(t){Object.assign(this.style,t),this.shouldUpdateStyleInDraw=!0}setAttr(t,e){if(typeof t!="string")for(const r in t){const s=t[r];s&&s!=this.getAttr(r)&&(this.attrs[Wt(r)]=s,this.shouldUpdateAttrsInDraw=!0)}else e&&e!=this.getAttr(t)&&(this.attrs[Wt(t)]=e,this.shouldUpdateAttrsInDraw=!0)}getAttr(t,e){return this.attrs[t]||this.attrs[Wt(t)]||e}hasAttr(t){return!!this.getAttr(t)}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const r=t?.friction||1;this.vx*=r,this.vy*=r,this.move(this.vx,this.vy)}animateEaseTo(t,e){const r=e?.easing||.05,s=t.x-this.x,i=t.y-this.y;this.vx=s*r,this.vy=i*r,this.animate(e)}animateSpringTo(t,e){const r=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(s=>{const i=s.x-this.x,o=s.y-this.y,a=i*r,c=o*r;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}getSpringMassAlphaTo(t,e){const r=e?.springLength||100,s=e?.spring||5e-4,i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<r){const c=i*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/r}return 0}followTo(t,e=3){this.rotateTo(ee(ze(this.x,this.y,t.x,t.y)));const{dx:r,dy:s}=er(wt(this.degree),e);this.vx=r,this.vy=s,this.animate()}followAccelerationTo(t,e=.05){this.rotateTo(ee(ze(this.x,this.y,t.x,t.y)));const{dx:r,dy:s}=er(wt(this.degree),e);this.ax=r,this.ay=s,this.animate()}gravitateTo(t){const e=t.x-this.x,r=t.y-this.y,s=e*e+r*r,i=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/i,c=o*r/i;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){const e=t.x-this.x,r=t.y-this.y,s=Math.sqrt(e*e+r*r),{x:i,y:o,width:a,height:c}=t.getBoundingClientRect(),{x:h,y:u}=t.getBoundingClientRectCenter(),{x:l,y:d,width:f,height:p}=this.getBoundingClientRect(),{x:m,y:b}=this.getBoundingClientRectCenter();if(s<Math.abs(h-i)+Math.abs(m-l)||s<Math.abs(u-o)+Math.abs(b-d)){const g=Math.atan2(r,e),w={x:0,y:0},x=Ge(-g,e,r),v=Ge(-g,this.vx,this.vy),E=Ge(-g,t.vx,t.vy),_=v.x-E.x;v.x=((this.mass-t.mass)*v.x+2*t.mass*E.x)/(this.mass+t.mass),E.x=_+v.x;const D=Math.abs(v.x)+Math.abs(E.x),z=this.ballRadius+t.ballRadius-Math.abs(w.x-x.x);w.x+=v.x/D*z,x.x+=E.x/D*z;const O=Ge(g,w.x,w.y),L=Ge(g,x.x,x.y);t.moveTo(this.x+L.x,this.y+L.y),this.moveTo(this.x+O.x,this.y+O.y);const $=Ge(g,v.x,v.y),j=Ge(g,E.x,E.y);this.vx=$.x,this.vy=$.y,t.vx=j.x,t.vy=j.y}}checkWall(t){if(!t?.wall)return;const e=typeof t.wall.bounce=="number"?t.wall.bounce:-1,r=t.wall.x,s=t.wall.y,i=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height,{x:a,y:c,width:h,height:u}=this.getBoundingClientRect();t.wall.cycle||!1?(this.x+a>i?this.moveXTo(r-(a+h)):this.x+a+h<r&&this.moveXTo(i-a),this.y+c>o?this.moveYTo(s-(c+u)):this.y+c+u<s&&this.moveYTo(o-c)):(this.x+a+h>i?(this.moveXTo(i-(a+h)),this.vx*=e):this.x+a<r&&(this.moveXTo(r+(a+h)),this.vx*=e),this.y+c+u>o?(this.moveYTo(o-(c+u)),this.vy*=e):this.y+c<s&&(this.moveYTo(s+(c+u)),this.vy*=e))}getTotalLength(){return this.transformPathD().getTotalLength()}getPointAtLength(t){return this.transformPathD().getPointAtLength(t)}interpolate(t){return this.transformPathD().interpolate(t)}trailPath(t=0,e=1){const r=this.getTotalLength(),s=t*r,i=e*r;return{subPathD:this.transformPathD().getSubPathD(s,i),point:this.getPointAtLength(i)}}strokeDashTween(t=1e3,e){const r=this.pathD().getTotalLength();this.setAttr({strokeDasharray:`${r} ${r}`,strokeDashoffset:`${r}`});const s=e?.onUpdate,i=new As({frameDuration:t});i.addTween({offset:r},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+at(o.offset,2)),s?.(o,a)}})),i.play()}static generateRosetta(t,e,r,s,i){if(i==0)throw new Error("no dividing by zero, please");const o=[],a=360/i;for(let c=0;c<i;c+=1){const h=a*c*Math.PI/180,u=t+2*r*Math.cos(h),l=e+2*r*Math.sin(h);o.push(new Nu({x:t,y:e,rx:r,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),o.push(new Nu({x:u,y:l,rx:r,ry:s,xAxisRotate:a*c,largeArcFlag:1,sweepFlag:1,toX:t,toY:e}))}return new Xl({initD:fe.fromLines(o)})}};class ye{shapes=[];svg;forceWidth;attrs={};style={};initCenterX;initCenterY;x;y;degree;scaleX;scaleY;interactive;drag;constructor(t){if(this.initCenterX=t?.centerX,this.initCenterY=t?.centerY,this.x=t?.x||0,this.y=t?.y||0,this.degree=t?.degree||0,this.scaleX=1,this.scaleY=1,t?.scale!==void 0&&(this.scaleX=t.scale,this.scaleY=t.scale),t?.scaleX!==void 0&&(this.scaleX=t.scaleX),t?.scaleY!==void 0&&(this.scaleY=t.scaleY),t?.attrs&&this.setAttr(t.attrs),t?.style&&this.setStyle(t.style),this.interactive=typeof t?.interactive=="boolean"?t?.interactive:!0,this.drag=t?.drag,this.svg=t?.svg,this.forceWidth=t?.forceWidth,t?.svg){this.initCenterX=0,this.initCenterY=0;let e=0,r=0,s=0,i=0;const o=new T0(t.svg).parse();for(let a=0,c=o.length;a<c;a++){const h=o[a];if(h.type=="viewbox"&&h.width&&h.height){if(e=parseFloat(h.width),r=parseFloat(h.height),t.forceWidth){const p=e/r;s=t.forceWidth,i=s/p}else s=e,i=r;continue}if(h.type!="path"||!Hc(h.path))continue;const u={};for(const p in h)p==="type"||p==="path"||p==="transform"||(u[p]=h[p]);const l=so(ro(h.path)),d=[];let f=[];for(let p=0,m=l.length;p<m;p++){const b=l[p];f.push(b),b[0].toLowerCase()=="z"&&(d.push(f),f=[])}f.length&&d.push(f),d.forEach(p=>{const m=new Ft({attrs:u,initD:p});if(h.transform){const g=k0(h.transform).split();m.moveTo(g.x,g.y),m.rotateTo(g.degree),m.scaleTo(g.scaleX,g.scaleY)}this.addShape(m)})}s&&e&&i&&r&&this.comboScale(s/e,i/r,!0)}}destroy(){this.shapes.forEach(t=>t.destroy())}getBaseOptions(){return{svg:this.svg,forceWidth:this.forceWidth,attrs:{...this.attrs},style:{...this.style},centerX:this.initCenterX,centerY:this.initCenterY,x:this.x,y:this.y,degree:this.degree,scaleX:this.scaleX,scaleY:this.scaleY,interactive:this.interactive,drag:{...this.drag}}}clone(){const t=this.cloneShapeCombo();return t.shapes=this.shapes.map(e=>{const r=e.clone();return e.parent&&(r.parent={...e.parent,combo:t}),r}),t}cloneShapeCombo(){return new ye(this.getBaseOptions())}update(t){this.shapes.forEach(e=>e.update(t))}addShape(t,e){e?.notCopyFromCombo!==!0&&(t.setAttr(this.attrs),t.setStyle(this.style),t.interactive=t.interactive||this.interactive,t.drag={...this.drag,...t.drag}),t.parent={combo:this,dX:e?.dX||0,dY:e?.dY||0,dDegree:e?.dDegree||0,dScaleX:e?.dScaleX||1,dScaleY:e?.dScaleY||1},this.shapes.push(t)}comboMove(t,e,r=!1){r||(this.x+=t,this.y+=e),this.shapes.forEach(s=>{s.move(t,e)})}comboRotate(t,e=!1){e||(this.degree+=t),this.shapes.forEach(r=>{r.rotate(t)})}comboScale(t,e,r=!1){r||(this.scaleX*=t,this.scaleY*=e||t),this.shapes.forEach(s=>{s.scale(t,e)})}comboTransform(t,e=!1){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0,e),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0,e),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1,e)}getBoundingClientRect(t=2){const e=[],r=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)}),e.length==0||r.length==0)return{x:0,y:0,width:0,height:0};const s=Math.min(...e),i=Math.min(...r),o=Math.max(...e),a=Math.max(...r);return{x:at(s,t),y:at(i,t),width:at(o-s,t),height:at(a-i,t)}}getBoundingClientRectCenter(t=2){if(typeof this.initCenterX=="number"&&typeof this.initCenterY=="number")return{x:this.initCenterX,y:this.initCenterY};const e=this.getBoundingClientRect(t);return{x:at(e.x+e.width*.5,t),y:at(e.y+e.height*.5,t)}}setStyle(t){Object.assign(this.style,t),this.shapes.forEach(e=>{e.setStyle(t)})}setAttr(t,e){if(typeof t!="string"){for(const r in t){const s=t[r];s&&s!=this.getAttr(r)&&(this.attrs[Wt(r)]=s)}this.shapes.forEach(r=>{r.setAttr(t)})}else e&&e!=this.getAttr(t)&&(this.attrs[Wt(t)]=e,this.shapes.forEach(r=>{r.setAttr(t,e)}))}getAttr(t,e){return this.attrs[t]||this.attrs[Wt(t)]||e}hasAttr(t){return!!this.getAttr(t)}sort(){this.shapes.map(t=>({shape:t,perimeter:t.transformPathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,r=this.shapes.length;if(e<r)return t.expendTo(this);for(let s=r;s<e;s++){const i=t.shapes[s];this.addShape(new Ft({initD:i.pathD().clone()}),{dX:i.x-this.x,dY:i.y-this.y,dDegree:i.degree-this.degree,dScaleX:i.scaleX/this.scaleX,dScaleY:i.scaleY/this.scaleY,notCopyFromCombo:!0})}}strokeDashTween(t,e){switch(e?.type){case"sequence":this.shapes.forEach((o,a)=>{o.strokeDashTween(t,{...e,delay:a,onStart:()=>{a==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{a==this.shapes.length-1&&e?.onGroupComplete?.()}})});break;case"parallel":default:const r=new As({frameDuration:t}),s={},i={};this.shapes.forEach((o,a)=>{const c=o.pathD().getTotalLength();s[`offset_${a}`]=c,i[`offset_${a}`]=0,o.setAttr({strokeDasharray:`${c} ${c}`,strokeDashoffset:`${c}`})}),r.addTween(s,i,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(o,a)=>{for(const c in o){const h=Ia(c).number;this.shapes[h].setAttr("strokeDashoffset",""+at(o[c],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),r.play();break}}}function tA(n,t,e=5){const r=Oa(e);(!r(n.x,t.current.x)||!r(n.y,t.current.y))&&n.followTo(t.current)}function eA(n,t,e){n.drag&&n.drag.enable&&!n.isDragging&&n.animateEaseTo(t,e)}function nA(n,t){const e=[],r=n.length;for(let s=0;s<r;s++){const i=n[s];if(t?.springLength){const o=t?.springLength||100;i.isDragging||n.filter(a=>a.id!==i.id).forEach(a=>{const c=ze(i.x,i.y,a.x,a.y);i.animateSpringTo({x:a.x-Math.cos(c)*o,y:a.y-Math.sin(c)*o},t)})}else t?.spring?s>0&&i.animateSpringTo(n[s-1],t):i.animate(t);if(t?.wall&&i.checkWall(t),t?.enableCollision||t?.enableGravityBetweenObjects||t?.enableSpringMassAlpha)for(let o=s+1;o<r;o++)t?.enableCollision&&i.checkCollision(n[o]),t?.enableGravityBetweenObjects&&i.gravitateTo(n[o]),t?.enableSpringMassAlpha&&e.push([i.x,i.y,n[o].x,n[o].y,i.getSpringMassAlphaTo(n[o],t)])}return e}function M0(n){if(n.length<2)throw new Error("shapes个数必须大于等于2");const t=n.length-1,e=new Array(t);for(let s=0;s<t;s++){const i=n[s].transformPathD(),o=n[s+1].transformPathD(),a=i.getPolymorphPoints(),c=o.getPolymorphPoints(),h=a.length>=c.length?a:c;e[s]=fe.getInterpolator(i.expendToPolymorphPoints(h),o.expendToPolymorphPoints(h))}const r=new Ft({initD:""});return s=>{const i=at(t*s,6),o=Math.min(Math.floor(i),t-1),a=at(i-o,6);return r.pathD(e[o](a)),r.setAttr(n[o+1].attrs),r}}function rA(n){if(n.length<2)throw new Error("shapeCombos个数必须大于等于2");let t;const e=[];n.forEach(o=>{let a;o instanceof ye?(a=o,a.sort()):(a=new ye,a.addShape(o)),e.push(a),(!t||t.shapes.length<a.shapes.length)&&(t=a)});const r=[];e.forEach((o,a)=>{o!==t&&o.expendTo(t),o.shapes.forEach((c,h)=>{r[h]=r[h]||[],r[h][a]=c})});const s=[];r.forEach(o=>{s.push(M0(o))});const i=new ye;return s.forEach(o=>{i.addShape(o(0))}),o=>(s.forEach(a=>{a(o)}),i)}function sA(n,t=6e3,e){const r=n.findIndex(a=>a instanceof ye)>=0?rA(n):M0(n),s=r(0),i=e?.onUpdate,o=new As({frameDuration:t});return o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{i?.(a,c),r(a.t),e?.shapeOrCombo?.(s,a.t)}})),o.play(),s}class iA{PARENT_EL;SVG_EL=null;CANVAS_EL=null;ctx=null;rect={x:0,y:0,width:0,height:0};size$=new Wi(null);resizeSubscription;mpg=wr();mouseSubscription;shapes=[];shapeTap$=new Wi(null);tapSubscription;lastMouseInShapeId="";draggingShapeId="";prevCursor="default";constructor(t=document.documentElement,e="canvas",r=!1){this.PARENT_EL=t,(e=="svg"||e=="canvas")&&U0(this.PARENT_EL),e=="svg"&&(this.SVG_EL=Ln("svg"),ts(this.PARENT_EL,this.SVG_EL)),e=="canvas"&&(this.CANVAS_EL=X0("canvas"),ts(this.PARENT_EL,this.CANVAS_EL)),this.resizeSubscription=wl(this.PARENT_EL).subscribe(s=>{this.rect.x=s.x,this.rect.y=s.y,this.rect.width=s.width,this.rect.height=s.height,this.SVG_EL&&An(this.SVG_EL,{viewBox:`0 0 ${this.rect.width} ${this.rect.height}`,width:`${this.rect.width}`,height:`${this.rect.height}`}),this.CANVAS_EL&&(An(this.CANVAS_EL,{width:`${this.rect.width}`,height:`${this.rect.height}`}),this.ctx=new Uu(this.CANVAS_EL,this.rect.width,this.rect.height,r)),this.size$.next(s)}),this.mouseSubscription=my(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{createMousePoint:this.mpg}).subscribe(()=>{}),this.tapSubscription=ny(this.PARENT_EL).subscribe(s=>{for(const i of this.shapes)if(i.isMouseIn){this.shapeTap$.next(i);break}})}destroy(){this.resizeSubscription.unsubscribe(),this.mouseSubscription.unsubscribe(),this.tapSubscription.unsubscribe()}setCursor(t="default"){t!=this.prevCursor&&(this.PARENT_EL.style.cursor=t,this.prevCursor=t)}draw(...t){if(t.length){const e=[];t.forEach(r=>{r instanceof ye?e.push(...r.shapes):e.push(r)}),this.SVG_EL&&this.shapes.filter(r=>e.findIndex(s=>s.id==r.id)==-1).forEach(r=>{r.el&&(r.el.remove(),delete r.el)}),U1(this.shapes,e)}this.ctx&&this.ctx.clearRect(),this.lastMouseInShapeId="",this.mpg.current.isDown||(this.draggingShapeId="");for(const e of this.shapes){const{x:r,y:s}=e.transformOrigin();let i=0,o=0;if(e.parent?.dDegree||e.parent?.dScaleX!==1||e.parent?.dScaleY!==1){const a=e.transformOrigin(!0);i=a.x,o=a.y}if(e.shouldUpdatePathD&&e.pathD(),this.SVG_EL){if(!e.el||e.shouldUpdateSVGElInDraw){const a=e.toSVGEl();e.el?a&&(e.el.remove(),e.el=a,ts(this.SVG_EL,e.el),An(e.el,{id:e.id})):(e.el=a||Wc(),ts(this.SVG_EL,e.el),An(e.el,{id:e.id})),pm(e.el)&&An(e.el,{d:e.toSVGPathD()}),e.shouldUpdateSVGElInDraw=!1,e.shouldUpdateAttrsInDraw=!0,e.shouldUpdateStyleInDraw=!0,e.shouldUpdateMInDraw=!0}if(e.shouldUpdateAttrsInDraw&&(of(e.attrs)||An(e.el,e.attrs),e.shouldUpdateAttrsInDraw=!1),e.shouldUpdateStyleInDraw&&(of(e.style)||Or(e.el,e.style),e.shouldUpdateStyleInDraw=!1),e.shouldUpdateMInDraw||!e.m){const a=new Zt;a.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),a.rotate(e.degree,r,s),a.scale(e.scaleX,e.scaleY,r,s),e.parent?.dDegree&&a.rotate(e.parent.dDegree,i,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&a.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,i,o),An(e.el,{transform:a.toString()}),e.m=a,e.shouldUpdateMInDraw=!1}}if(this.ctx&&(this.ctx.save(),this.ctx.translate(e.x+(e.parent?.dX||0),e.y+(e.parent?.dY||0)),this.ctx.rotate(wt(e.degree),r,s),this.ctx.scale(e.scaleX,e.scaleY,r,s),e.parent?.dDegree&&this.ctx.rotate(wt(e.parent.dDegree),i,o),(e.parent?.dScaleX!==1||e.parent?.dScaleY!==1)&&this.ctx.scale(e.parent?.dScaleX||1,e.parent?.dScaleY||1,i,o),e.m=this.ctx.currentMatrix,Ed(this.ctx,e.attrs),e.toCanvasContext(this.ctx),this.ctx.hasSetCustomStrokeStyle&&this.ctx.stroke(),this.ctx.hasSetCustomFillStyle&&this.ctx.fill()),e.interactive?this.SVG_EL?e.isMouseIn=e.isPointInPath(this.SVG_EL,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.SVG_EL,this.mpg.current.x,this.mpg.current.y):this.ctx?e.isMouseIn=e.isPointInPath(this.ctx,this.mpg.current.x,this.mpg.current.y)||e.isPointInStroke(this.ctx,this.mpg.current.x,this.mpg.current.y):e.isMouseIn=!1:e.isMouseIn=!1,e.isMouseIn&&(this.setCursor("pointer"),this.lastMouseInShapeId=e.id),e.isDragging=e.id==this.draggingShapeId,this.mpg.current.isDown&&(e.isDragging||!this.draggingShapeId&&e.isMouseIn&&e.drag&&e.drag.enable)){this.setCursor("grabbing"),e.isDragging=!0,this.draggingShapeId=e.id;let a=this.mpg.current.x-this.mpg.start.x,c=this.mpg.current.y-this.mpg.start.y;if(a||c){if(e.drag&&e.drag.enable&&e.drag.alongPath){const h=e.drag.alongPath.transform({m:e.m}).closestPoint(this.mpg.current.x,this.mpg.current.y);a=h.point.x-e.x,c=h.point.y-e.y}(a||c)&&(e.move(a,c),e.parent?.combo.shapes.forEach(h=>{h.drag?.followSibling&&h!==e&&h.move(a,c)}))}this.mpg.setStart(this.mpg.current)}else e.isMouseIn&&e.drag&&e.drag.enable&&this.setCursor("grab");this.ctx&&this.ctx.restore()}!this.lastMouseInShapeId&&!this.draggingShapeId&&this.setCursor("default")}clear(){this.shapes.forEach(t=>{t.el&&(t.el.remove(),delete t.el)}),this.ctx&&this.ctx.clearRect(),this.shapes=[]}drawMouseMoveLine(t){const e=t?.brushSize||4,r=t?.brushColor||"#000000";let s=!1;const i=aa(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL,{start:()=>{s=!1,this.ctx&&(this.ctx.save(),this.ctx.lineWidth=e,this.ctx.strokeStyle=r,this.ctx.beginPath())},end:()=>{this.ctx&&this.ctx.restore()}}).subscribe(o=>{this.ctx&&(s?this.ctx.lineTo(o.current.x,o.current.y):(s=!0,this.ctx.moveTo(o.current.x,o.current.y)),this.ctx.stroke())});return()=>{i.unsubscribe()}}drawMouseMoveBrush(t){const e=t?.brushSize||10,r=t?.brushDensity||50,s=t?.brushColor||"#000000",i=new Ne(s),o=i.r,a=i.g,c=i.b,h=aa(this.SVG_EL||this.CANVAS_EL||this.PARENT_EL).subscribe(u=>{if(this.ctx){const l=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),d=l.data;for(let f=0;f<r;f++){const p=Math.random()*Math.PI*2,m=Math.random()*e,b=u.current.x+Math.cos(p)*m|0,g=u.current.y+Math.sin(p)*m|0,w=(b+g*l.width)*4;d[w]=o,d[w+1]=a,d[w+2]=c,d[w+3]=255}this.ctx.putImageData(l)}});return()=>{h.unsubscribe()}}downloadSVG=()=>{this.SVG_EL&&gm(this.SVG_EL)}}class vr extends Ft{lineLength;startColor;endColor;constructor(t){super({...t,centerX:0,centerY:0}),this.lineLength=t?.lineLength||0,this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.startColor||this.getAttr("stroke")||"#000000"})}cloneShape(){return new vr({...super.getBaseOptions(),lineLength:this.lineLength,startColor:this.startColor,endColor:this.endColor})}lineToAbsolutePoint(t){const e=ee(ze(this.x,this.y,t.x,t.y)),r=tr(this.x,this.y,t.x,t.y);(e!=this.degree||r!=this.lineLength)&&(e!=this.degree&&this.rotateTo(e),r!=this.lineLength&&(this.lineLength=r),this.shouldUpdatePathD=!0)}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}getBoundingClientRect(){return{x:0,y:0,width:this.lineLength,height:parseFloat(this.getAttr("strokeWidth"))}}toSVGPathData(){return[["m",0,0],["l",this.lineLength,0]]}toCanvasContext(t){this.startColor&&this.endColor&&this.setAttr({stroke:t.createLinearGradient(0,0,this.lineLength,0,{0:this.startColor,1:this.endColor})}),t.beginPath(),t.moveTo(0,0),t.lineTo(this.lineLength,0)}intersection(t){const e=this.transformPathD().normalizedLines[0],r=t.transformPathD().normalizedLines[0];return e.intersection(r)}}class Yu extends Ft{cx;cy;toX;toY;isLineThrough;constructor(t){super(t),this.cx=t?.cx||0,this.cy=t?.cy||0,this.toX=t?.toX||0,this.toY=t?.toY||0,this.isLineThrough=typeof t?.isLineThrough=="boolean"?t.isLineThrough:!1,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new Yu({...super.getBaseOptions(),cx:this.cx,cy:this.cy,toX:this.toX,toY:this.toY,isLineThrough:this.isLineThrough})}update(t){typeof t.cx=="number"&&(this.cx=t.cx,this.shouldUpdatePathD=!0),typeof t.cy=="number"&&(this.cy=t.cy,this.shouldUpdatePathD=!0),typeof t.toX=="number"&&(this.toX=t.toX,this.shouldUpdatePathD=!0),typeof t.toY=="number"&&(this.toY=t.toY,this.shouldUpdatePathD=!0),typeof t.isLineThrough=="boolean"&&(this.isLineThrough=t.isLineThrough,this.shouldUpdatePathD=!0)}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(0+this.toX)/2,e=this.cy*2-(0+this.toY)/2;return[["m",0,0],["q",t,e,this.toX,this.toY]]}else return[["m",0,0],["q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(t.beginPath(),t.moveTo(0,0),this.isLineThrough){const e=this.cx*2-(0+this.toX)/2,r=this.cy*2-(0+this.toY)/2;t.quadraticCurveTo(e,r,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}}class ta extends Ft{points;isStraight;constructor(t){super(t),this.points=t?.points||[],this.isStraight=typeof t?.isStraight=="boolean"?t.isStraight:!0,this.setAttr({strokeWidth:this.getAttr("strokeWidth")||"1",stroke:this.getAttr("stroke")||"#000000"})}cloneShape(){return new ta({...super.getBaseOptions(),points:[...this.points],isStraight:this.isStraight})}update(t){"points"in t&&(this.points=[...t.points||this.points],this.shouldUpdatePathD=!0),typeof t.isStraight=="boolean"&&(this.isStraight=t.isStraight,this.shouldUpdatePathD=!0)}toSVGPathData(){const t=[];if(this.points.length<3)return t;const e=this.points.length;if(this.isStraight){t.push(["m",this.points[0].x,this.points[0].y]);for(let r=1;r<=e-1;r++)t.push(["l",this.points[r].x-this.points[r-1].x,this.points[r].y-this.points[r-1].y]);t.push(["z"])}else{const r=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;let i=r,o=s;t.push(["m",i,o]);for(let a=0;a<e-1;a++){const c=(this.points[a].x+this.points[a+1].x)/2,h=(this.points[a].y+this.points[a+1].y)/2;t.push(["q",this.points[a].x-i,this.points[a].y-o,c-i,h-o]),i=c,o=h}t.push(["q",this.points[e-1].x-i,this.points[e-1].y-o,r-i,s-o])}return t}toCanvasContext(t){if(this.points.length<3)return;t.beginPath();const e=this.points.length;if(this.isStraight){t.moveTo(this.points[0].x,this.points[0].y);for(let r=1;r<=e-1;r++)t.lineTo(this.points[r].x,this.points[r].y);t.closePath()}else{const r=(this.points[0].x+this.points[e-1].x)/2,s=(this.points[0].y+this.points[e-1].y)/2;t.moveTo(r,s);for(let i=0;i<e-1;i++){const o=(this.points[i].x+this.points[i+1].x)/2,a=(this.points[i].y+this.points[i+1].y)/2;t.quadraticCurveTo(this.points[i].x,this.points[i].y,o,a)}t.quadraticCurveTo(this.points[e-1].x,this.points[e-1].y,r,s)}}isPointInShape(t){const e=this.points.length;let r=!1;const s=2e-10;for(let i=0,o=e-1;i<e;o=i,i++){const a=this.points[i].x,c=this.points[i].y,h=this.points[o].x,u=this.points[o].y;if(a===t.x&&c===t.y||h===t.x&&u===t.y||t.y===c&&t.y===u)return!0;if(t.y>=c&&t.y<u||t.y<c&&t.y>=u){const l=(h-a)/(u-c),d=a+l*(t.y-c);if(d===t.x||Math.abs(d-t.x)<s)return!0;d>t.x&&(r=!r)}}return r}[Symbol.iterator](){let t=-1;return{next:()=>({value:t<=this.points.length-1?this.points[++t]:void 0,done:t>=this.points.length})}}static generate(t,e,r,s){const i=[];for(let o=0;o<s;o++){const a=o/s*2*Math.PI,{dx:c,dy:h}=er(a,r);i.push({x:t+c,y:e+h})}return new ta({points:i})}}class ju extends ye{length=100;constructor(t){super(t);const e=new vr({drag:{followSibling:!0},lineLength:this.length});this.addShape(e);const r=new vr({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(r,{dX:90-Math.random()*40,dDegree:Math.random()*70});const s=new vr({drag:{followSibling:!0},lineLength:20+Math.random()*20});this.addShape(s,{dX:90-Math.random()*40,dDegree:-Math.random()*70}),this.comboRotate(-90,!0)}cloneShapeCombo(){return new ju(super.getBaseOptions())}}class Zr extends Ft{ballRadius;constructor(t){super(t),this.ballRadius=t?.ballRadius||0}cloneShape(){return new Zr({...super.getBaseOptions(),ballRadius:this.ballRadius})}update(t){typeof t.ballRadius=="number"&&(this.ballRadius=t.ballRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:-this.ballRadius,y:-this.ballRadius,width:this.ballRadius*2,height:this.ballRadius*2}}toSVGEl(){const t=Ln("circle");return this.setAttr({cx:"0",cy:"0",r:String(this.ballRadius)}),t}toSVGPathData(){return this.ballRadius?[["m",0,-this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,2*this.ballRadius],["a",this.ballRadius,this.ballRadius,0,1,1,0,-2*this.ballRadius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.ballRadius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.ballRadius===t.ballRadius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return Qa(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const r=t/e;this.scalar(r)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,r=this.y;return{x:r*t.x-e*t.y,y:e*t.y-r*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}}class Gu extends Ft{constructor(t){super(t)}cloneShape(){return new Gu({...super.getBaseOptions()})}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class Gn extends Ft{rectWidth;rectHeight;rectBorderRadius;constructor(t){super(t),this.rectWidth=t.rectWidth||0,this.rectHeight=t.rectHeight||0,this.rectBorderRadius=t.rectBorderRadius||0}cloneShape(){return new Gn({...super.getBaseOptions(),rectWidth:this.rectWidth,rectHeight:this.rectHeight,rectBorderRadius:this.rectBorderRadius})}update(t){typeof t.rectWidth=="number"&&(this.rectWidth=t.rectWidth,this.shouldUpdatePathD=!0),typeof t.rectHeight=="number"&&(this.rectHeight=t.rectHeight,this.shouldUpdatePathD=!0),typeof t.rectBorderRadius=="number"&&(this.rectBorderRadius=t.rectBorderRadius,this.shouldUpdatePathD=!0)}getBoundingClientRect(){return{x:0,y:0,width:this.rectWidth,height:this.rectHeight}}toSVGEl(){const t=Ln("rect");return this.setAttr({x:"0",y:"0",width:String(this.rectWidth),height:String(this.rectHeight),rx:String(this.rectBorderRadius),ry:String(this.rectBorderRadius)}),t}toSVGPathData(){return this.rectBorderRadius?[["m",this.rectBorderRadius,0],["l",this.rectWidth-this.rectBorderRadius*2,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,this.rectBorderRadius],["l",0,this.rectHeight-this.rectBorderRadius*2],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,this.rectBorderRadius],["l",this.rectBorderRadius*2-this.rectWidth,0],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,-this.rectBorderRadius,-this.rectBorderRadius],["l",0,this.rectBorderRadius*2-this.rectHeight],["a",this.rectBorderRadius,this.rectBorderRadius,0,0,1,this.rectBorderRadius,-this.rectBorderRadius],["z"]]:[["m",0,0],["l",this.rectWidth,0],["l",0,this.rectHeight],["l",-this.rectWidth,0],["z"]]}toCanvasContext(t){t.beginPath(),this.rectBorderRadius<=0?t.rect(0,0,this.rectWidth,this.rectHeight):(t.moveTo(0,this.rectBorderRadius),t.lineTo(0,this.rectHeight-this.rectBorderRadius),t.quadraticCurveTo(0,this.rectHeight,this.rectBorderRadius,this.rectHeight),t.lineTo(this.rectWidth-this.rectBorderRadius,this.rectHeight),t.quadraticCurveTo(this.rectWidth,this.rectHeight,this.rectWidth,this.rectHeight-this.rectBorderRadius),t.lineTo(this.rectWidth,this.rectBorderRadius),t.quadraticCurveTo(this.rectWidth,0,this.rectWidth-this.rectBorderRadius,0),t.lineTo(this.rectBorderRadius,0),t.quadraticCurveTo(0,0,0,this.rectBorderRadius)),t.closePath()}static fromCubicBezier(t,e,r,s,i,o,a,c){const u=new Jt({x:t,y:e,c1x:r,c1y:s,c2x:i,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new Gn({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.height})}eq(t){return this.x===t.x&&this.y===t.y&&this.rectWidth===t.rectWidth&&this.rectHeight===t.rectHeight&&this.rectBorderRadius===t.rectBorderRadius}intersection(t){return!(this.x+this.rectWidth<t.x||t.x+t.rectWidth<this.x||this.y+this.rectHeight<t.y||t.y+t.rectHeight<this.y)}isPointInShape(t){return t.x>=this.x&&t.x<=this.x+this.rectWidth&&t.y>=this.y&&t.y<=this.y+this.rectHeight}}class Xu extends Ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Xu({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class Wu extends Ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||50,this.ry=t?.heartRy||50}cloneShape(){return new Wu({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class Hu extends Ft{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Hu({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const r=288+e*144,s=this.r*Math.cos(wt(r)),i=this.r*Math.sin(wt(r));t.push(["l",s,i])}return t}}class qu extends Ft{constructor(t){super(t)}cloneShape(){return new qu({...super.getBaseOptions()})}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class Ku extends Ft{constructor(t){super(t)}cloneShape(){return new Ku({...super.getBaseOptions()})}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,2*15],["a",15,15,0,1,1,0,-2*15]]}}class Ju extends Ft{constructor(t){super({...t,initD:"m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"})}cloneShape(){return new Ju({...super.getBaseOptions()})}}class Zu extends Ft{rx;ry;constructor(t){super(t),this.rx=t?.rx||0,this.ry=t?.ry||0}cloneShape(){return new Zu({...super.getBaseOptions(),rx:this.rx,ry:this.ry})}getBoundingClientRect(){return{x:this.x-this.rx,y:this.y-this.ry,width:this.rx*2,height:this.ry*2}}toSVGEl(){const t=Ln("ellipse");return this.setAttr({cx:"0",cy:"0",rx:String(this.rx),ry:String(this.ry)}),t}toSVGPathData(){return[["m",0,-this.ry],["a",this.rx,this.ry,0,1,1,0,2*this.ry],["a",this.rx,this.ry,0,1,1,0,-2*this.ry],["z"]]}toCanvasContext(t){t.beginPath(),t.ellipse(0,0,this.rx,this.ry,0,0,2*Math.PI,!0),t.closePath()}}class Qu extends ye{showFlame;flame;ship;constructor(t){super(t),this.showFlame=typeof t?.showFlame=="boolean"?t?.showFlame:!0,this.flame=new Ft({initD:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]],drag:{followSibling:!0}}),this.showFlame&&this.addShape(this.flame),this.ship=new Ft({initD:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]],drag:{followSibling:!0}}),this.addShape(this.ship)}cloneShapeCombo(){return new Qu({...super.getBaseOptions(),showFlame:this.showFlame})}update(t){typeof t?.showFlame=="boolean"&&(this.shapes=[],this.showFlame=t?.showFlame,this.showFlame&&this.addShape(this.flame),this.addShape(this.ship))}}class tl extends ye{width;height;cornerRadius;constructor(t){super(t),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const e=new Gn({drag:{followSibling:!0},rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(e,{dX:0-this.cornerRadius,dY:0-this.height*.5});const r=new Zr({drag:{followSibling:!0},ballRadius:2});this.addShape(r);const s=new Zr({drag:{followSibling:!0},ballRadius:2});this.addShape(s,{dX:0+this.width})}cloneShapeCombo(){return new tl({...super.getBaseOptions(),segmentWidth:this.width,segmentHeight:this.height,segmentCornerRadius:this.cornerRadius})}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(wt(t.degree))*this.width,y:t.y+Math.sin(wt(t.degree))*this.width}}}class el extends ye{options;value$=new un;subscription;constructor(t){super(t),this.options=t;const e=t?.sliderMin||0,r=t?.sliderMax||100,s=t?.sliderStep||1,i=B1(e,r,s),o=i(typeof t?.sliderDefaultValue=="number"?st(t.sliderDefaultValue,e,r):e);this.value$.next(o);const a=o/(r-e),c=t?.sliderWidth||100,h=t?.sliderHeight||4,u=h*.5,l=h*2.5,d=t?.sliderBackgroundColor||"#f5f5f5",f=t?.sliderForegroundColor||"#5a82f0",p=new Gn({rectWidth:c,rectHeight:h,rectBorderRadius:u,attrs:{fill:d},drag:{enable:!1}});this.addShape(p);const m=new Gn({rectWidth:c*a,rectHeight:h,rectBorderRadius:u,attrs:{fill:f},drag:{enable:!1}});this.addShape(m);const b=new Zr({x:c*a,y:u,ballRadius:l,attrs:{fill:f},drag:{enable:!0,alongPath:new fe([["m",0,0],["l",c,0]])}});this.addShape(b),this.subscription=b.transform$.subscribe(({dX:g})=>{console.log(g);const w=(b.x-p.x)/c;m.update({rectWidth:c*w}),this.value$.next(i(w*(r-e)+e))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new el({...super.getBaseOptions(),...this.options})}}class ni extends Ft{half;lineWidth;radius;startDegree;endDegree;percent=0;percentDegree=0;startColor;endColor;constructor(t){super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t.lineWidth;const e=t.width||0,r=t.height||0,s=(t.endDegree-t.startDegree-180)/2;if(t.radius)this.radius=t.radius;else if(this.half){const i=Math.min(e/2,r)-this.lineWidth;this.radius=Math.max(0,i-i*Math.sin(wt(s)))}else this.radius=Math.max(0,Math.min(e/2,r/2)-this.lineWidth);t.x||(this.x=e/2),t.y||(this.half?this.y=r-this.lineWidth-this.radius*Math.sin(wt(s)):this.y=r/2),t.forceCoordinate?(this.startDegree=t.startDegree,this.endDegree=t.endDegree):(this.startDegree=-90+t.startDegree,this.endDegree=-90+t.endDegree),this.startColor=t?.startColor,this.endColor=t?.endColor,this.setAttr({"stroke-linecap":"round","stroke-width":String(this.lineWidth),stroke:this.startColor||"#000000"}),this.setPercent(t.percent||1)}cloneShape(){return new ni({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,radius:this.radius,forceCoordinate:!0,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:this.percent})}setPercent(t){this.percent=Math.max(0,t),this.percentDegree=this.startDegree+(this.endDegree-this.startDegree)*t}enableGradient(t,e){this.startColor=t,this.endColor=e,this.setAttr({stroke:this.startColor})}disableGradient(t){this.startColor=t,this.endColor=void 0,this.setAttr({stroke:this.startColor})}toSVGPathData(){const{dx:t,dy:e}=er(wt(this.startDegree),this.radius),{dx:r,dy:s}=er(wt(this.percentDegree),this.radius);return[["m",t,e],["a",this.radius,this.radius,0,Math.abs(this.percentDegree-this.startDegree)>=180?1:0,1,r-t,s-e]]}toCanvasContext(t){if(this.startColor&&this.endColor){let e;if(this.half){const r=this.radius-this.radius*Math.cos(Math.PI*this.percent),s=this.radius*Math.sin(Math.PI*this.percent);e=t.createLinearGradient(-this.radius,0,-this.radius+r,-s,{0:this.startColor,1:this.endColor})}else{const r=this.radius*Math.sin(2*Math.PI*this.percent),s=this.radius*Math.cos(2*Math.PI*this.percent);e=t.createLinearGradient(0,-this.radius,r,-s,{0:this.startColor,1:this.endColor})}this.setAttr({stroke:e})}t.beginPath(),t.arc(0,0,this.radius,wt(this.startDegree),wt(this.percentDegree),!1)}}class nl extends ye{half;lineWidth;width;height;bgColor;startColor;endColor;startDegree;endDegree;percent=0;ringBg;ring;lines=[];indicatorLineCount;constructor(t){if(super(t),this.half=typeof t?.half=="boolean"?t?.half:!1,this.lineWidth=t?.lineWidth||12,this.width=t.width,this.height=t.height,this.bgColor=t?.bgColor,this.startColor=t?.startColor,this.endColor=t?.endColor,this.half?(this.startDegree=t?.startDegree||-90-15,this.endDegree=t?.endDegree||90+15):(this.startDegree=t?.startDegree||0,this.endDegree=t?.endDegree||360),this.percent=t?.percent||0,this.ringBg=new ni({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.bgColor,percent:1}),this.addShape(this.ringBg),this.ring=new ni({half:this.half,lineWidth:this.lineWidth,width:t.width,height:t.height,startDegree:this.startDegree,endDegree:this.endDegree,startColor:this.startColor,endColor:this.endColor,percent:0}),this.addShape(this.ring),this.indicatorLineCount=22+1,this.half){const i=this.ringBg.radius-20-17;for(let o=0;o<this.indicatorLineCount;o++){const a=new vr({lineLength:17,startColor:this.startColor,endColor:this.endColor,attrs:{"stroke-linecap":"round","stroke-width":String(2),stroke:this.bgColor}});this.lines.push(a);const c=-90+this.startDegree+(this.endDegree-this.startDegree)/(this.indicatorLineCount-1)*o;this.addShape(a,{dX:this.ringBg.x+Math.cos(wt(c))*i,dY:this.ringBg.y+Math.sin(wt(c))*i,dDegree:c})}}this.setPercent(t.percent||0)}cloneShapeCombo(){return new nl({...super.getBaseOptions(),half:this.half,lineWidth:this.lineWidth,width:this.width,height:this.height,bgColor:this.bgColor,startColor:this.startColor,endColor:this.endColor,startDegree:this.startDegree,endDegree:this.endDegree,percent:this.percent})}setPercent(t){if(this.percent=Math.max(0,t),this.ring.setPercent(t),this.half)for(let e=0;e<this.indicatorLineCount;e++)e/(this.indicatorLineCount-1)<=this.percent?this.lines[e].enableGradient(this.startColor,this.endColor):this.lines[e].disableGradient(this.bgColor)}}class Qr extends Ft{text;width=0;height=0;constructor(t){super(t),this.text=t.text,this.setAttr({fontSize:"10px",fontFamily:'system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',emojiFontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif',fill:"#666666",stroke:"none","alignment-baseline":"middle",textAnchor:"start",...this.attrs});const e=Ia(this.getAttr("fontSize"),10).number,r=Ia(this.getAttr("fontWeight"),400).number,s=Qr.measureText(this.text,e,r);this.width=s.width,this.height=s.height}cloneShape(){return new Qr({...super.getBaseOptions(),text:this.text})}toSVGEl(){const t=Ln("text");t.setAttribute("x","0"),t.setAttribute("y","0"),t.style.alignmentBaseline="middle";const e=this.text.split(`
113
113
  `);if(e.length<=1)t.innerHTML=this.text;else{const r=this.getAttr("line-height","1.2em");e.forEach((s,i)=>{if(s.trim()){const o=Ln("tspan");o.setAttribute("x","0"),o.setAttribute("dy",i>0?r:"0"),o.innerHTML=s.trim(),o.style.alignmentBaseline="middle",t.append(o)}})}return t}toSVGPathData(){return[]}toCanvasContext(t){const e=this.text.split(`
114
- `);if(e.length<=1)t.fillText(this.text,0,0);else{const r=t.measureText(this.text),i=(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,c)=>{a.trim()&&(o+=c>0?i:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,r=400){const s=document.createElement("span");s.style.visibility="hidden",s.style.margin="0",s.style.padding="0",s.style.inset="0",s.style.whiteSpace="nowrap",s.style.overflow="visible",s.style.fontSize=e+"px",s.style.fontWeight=r.toString(),s.innerText=t,document.body.appendChild(s);const i=s.offsetWidth,o=s.offsetHeight;return document.body.removeChild(s),{width:i,height:o}}static getFixedWidthText(t,e,r=12,s=400,i="..."){let o="";if(!t||e<r)return o;const a=t.split("");let c=i?Qr.measureText(i,r,s).width:0;for(let h=0,u=a.length;h<u;h++)if(c+=Qr.measureText(a[h],r,s).width,c>e){i&&(o+=i);break}else o+=a[h];return o}}class nl extends ye{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:r,height:s,x:i,y:o,particleCount:a,angle:c,spread:h,startVelocity:u,decay:l,gravity:d,drift:f,ticks:p,colors:m,scalar:b,flat:g}=Object.assign({shapeCreator:()=>new Gn({rectWidth:10,rectHeight:10}),width:100,height:100,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:Fb,scalar:1,flat:!1},t||{}),w=(_,D)=>{_.x=r*i,_.y=s*o,_.scaleX=b,_.scaleY=b;const z=m[D%m.length];_.setAttr({fill:z}),_.interactive=!1,_.wobble=Math.random()*10,_.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),_.velocity=u*.5+Math.random()*u,_.angle2D=-x+(.5*v-Math.random()*v),_.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,_.tick=0,_.totalTicks=p,_.decay=l,_.drift=f,_.random=Math.random()+2,_.tiltSin=0,_.tiltCos=0,_.wobbleX=0,_.wobbleY=0,_.gravity=d*3,_.scalar=b,_.flat=g,_.color=new Ne(z)},x=wt(c),v=wt(h);let E=a;for(;E;){const _=e();w(_,E),_.clone=(D=>()=>{const z=e();return w(z,D),z})(E),this.addShape(_),E--}}cloneShapeCombo(){return new nl(this.options)}update(){return this.shapes=this.shapes.filter(t=>{t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);const e=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,s=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return t.setAttr("fill",t.color.setAlpha(1-e).toString()),t.degree=ee(Math.PI/10*t.wobble),t.scaleX=Math.abs(i-r)*.1,t.scaleY=Math.abs(o-s)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}const iA={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},oA={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},Xn=new nb;let ea="zh-cn";rl(oA),rl(iA);function rl(n,t){if(!n)return Xn.get(ea);let e;if(typeof n=="string"){const r=n.toLowerCase();if(Xn.get(r))e=r;else if(t)Xn.set(r,t),e=r;else return Xn.get(ea)}else{const{name:r}=n;Xn.set(r,n),e=r}return e&&(ea=e),Xn.get(e)||Xn.get(ea)}class aA extends Va{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];state;constructor(t){if(super(),this.id=Pf(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const e=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",e),this.strokeDashTotalLength=of(e).reduce((r,s)=>r+s,0)}this.state=Ph(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new uS,this.state.subscribe(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(r=>{const s=r.originMatrix?r.originMatrix.clone():new Zt;s.translate(-t.x+r.x,-t.y+r.y),r.originMatrix=s});const e=this.originMatrix?this.originMatrix.clone():new Zt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,r){if(r instanceof Gc)return r.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=r.createSVGPoint(),s.x=t,s.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(s);{const i=this.getBoundingClientRect();if(i)return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height}return!1}isPointInStroke(t,e,r){if(r instanceof Gc)return r.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=r.createSVGPoint(),s.x=t,s.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(s):!1}clone(){return A1(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([r,s])=>[Wt(r),s]))):e&&(this.attrs[Wt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[Wt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[Wt(t)]}distance(t){return tr(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=ee(ze(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:r,dy:s}=er(wt(this.degree),e);this.vx=r,this.vy=s,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:r,dy:s}=er(wt(this.degree),e);this.ax=r,this.ay=s,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,r=t.y-this.y,s=e*e+r*r,i=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/i,c=o*r/i;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=Me(t?.gravity,0);this.vy+=e;const r=Me(t?.friction,1);this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const r=Me(e?.easing,.05),s=t.x-this.cX-this.x,i=t.y-this.cY-this.y;this.vx=s*r,this.vy=i*r,this.run(e)}runSpringTo(t,e){const r=Me(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(s=>{const i=s.x-this.cX-this.x,o=s.y-this.cY-this.y,a=i*r,c=o*r;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const r=Me(e?.springLength,100),s=Me(e?.spring,1e-4),i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<r){const c=i*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/r}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const r=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*r),this.getPointAtLength(e*r)}strokeDashTween(t=1e3,e){const r=this.initPathD(),s=at(r.getTotalLength(),0);this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const i=e?.onUpdate,o=new As({frameDuration:t});o.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+at(a.offset,2)),i?.(a,c)}})),o.play()}}class cA extends aA{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,r){this.cX=t,this.cY=e,this.cZ=r}rotateX(t){({x:this.y,y:this.z}=Ge(wt(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Ge(wt(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Ge(wt(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return Qa(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,r=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+r*r+s*s)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const r=t/e;this.scalar(r)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,r=this.y,s=this.z;return{x:r*t.z-s*t.y,y:s*t.x-e*t.z,z:e*t.y-r*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const na=cA,ri=2e3,sl=2001,M0=[1,0,0,1],D0=[1,0,0,1,0,0],O0=[1,0,0,0,1,0,0,0,1],I0=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class il{value;constructor(t=M0){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,r=0,s=1){return this.m11=t,this.m21=e,this.m12=r,this.m22=s,this}identity(){return this.value=Array.from(M0),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new il(this.value)}fromArray(t,e=0){for(let r=0;r<4;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[2],c=r[1],h=r[3],u=s[0],l=s[2],d=s[1],f=s[3];return i[0]=o*u+a*d,i[2]=o*l+a*f,i[1]=c*u+h*d,i[3]=c*l+h*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class ra{value;constructor(t=O0){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,r=0,s=0,i=1,o=0,a=0,c=0,h=1){const u=this.value;return u[0]=t,u[1]=s,u[2]=a,u[3]=e,u[4]=i,u[5]=c,u[6]=r,u[7]=o,u[8]=h,this}identity(){return this.value=Array.from(O0),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new ra(this.value)}fromArray(t,e=0){for(let r=0;r<9;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,r){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[3],c=r[6],h=r[1],u=r[4],l=r[7],d=r[2],f=r[5],p=r[8],m=s[0],b=s[3],g=s[6],w=s[1],x=s[4],v=s[7],E=s[2],_=s[5],D=s[8];return i[0]=o*m+a*w+c*E,i[3]=o*b+a*x+c*_,i[6]=o*g+a*v+c*D,i[1]=h*m+u*w+l*E,i[4]=h*b+u*x+l*_,i[7]=h*g+u*v+l*D,i[2]=d*m+f*w+p*E,i[5]=d*b+f*x+p*_,i[8]=d*g+f*v+p*D,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8];return e*o*u-e*a*h-r*i*u+r*a*c+s*i*h-s*o*c}inverse(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=u*o-a*h,d=a*c-u*i,f=h*i-o*c,p=e*l+r*d+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=l*m,t[1]=(s*h-u*r)*m,t[2]=(a*r-s*o)*m,t[3]=d*m,t[4]=(u*e-s*c)*m,t[5]=(s*i-a*e)*m,t[6]=f*m,t[7]=(r*c-h*e)*m,t[8]=(o*e-r*i)*m,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).inverse().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,r,s,i,o,a){const c=Math.cos(i),h=Math.sin(i);return this.set(r*c,r*h,-r*(c*o+h*a)+o+t,-s*h,s*c,-s*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(al.makeScale(t,e)),this}rotate(t){return this.premultiply(al.makeRotation(-t)),this}translate(t,e){return this.premultiply(al.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,r,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class be{value;is3dSpecial=!1;constructor(t=I0){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,r=0,s=0,i=0,o=1,a=0,c=0,h=0,u=0,l=1,d=0,f=0,p=0,m=0,b=1){const g=this.value;return g[0]=t,g[4]=e,g[8]=r,g[12]=s,g[1]=i,g[5]=o,g[9]=a,g[13]=c,g[2]=h,g[6]=u,g[10]=l,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=b,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(I0),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new be(this.value)}static fromString(t){const e=new be,r=Hl("number",t);return r.length===16&&r.forEach((s,i)=>{s.fullMatch&&(e.value[i]=parseFloat(s.fullMatch))}),e}fromArray(t,e=0){for(let r=0;r<16;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.value;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t}copyPosition(t){const e=this.value,r=t.value;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,r){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),r.setFromMatrix4Column(this,2),this}makeBasis(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,r=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+r*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+r*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+r*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+r*this.m44}}toMatrix(t){const{scalarX:e,scalarY:r,skewX:s,skewY:i,x:o,y:a}=this.split(),c=[e,i,s,r,o,a];return t?(t.value=c,t):new Zt(c)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>at(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),r=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),s=ee(st(Math.asin(-this.m13),-1,1));let i=ee(Math.atan2(this.m23,this.m33));Math.cos(wt(s))===0&&(i=ee(Math.atan2(-this.m31,this.m22)));let o=ee(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:r,degreeX:i,degreeY:s,degreeZ:o,skewX:ee(this.m14),skewY:ee(this.m24),skewZ:ee(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,r=t.value,s=1/ol.setFromMatrix4Column(t,0).length(),i=1/ol.setFromMatrix4Column(t,1).length(),o=1/ol.setFromMatrix4Column(t,2).length();return e[0]=r[0]*s,e[1]=r[1]*s,e[2]=r[2]*s,e[3]=0,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=0,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}lookAt(t,e,r){const s=this.value;return Te.subVectors(t,e),Te.lengthSq()===0&&(Te.z=1),Te.normalize(),Wn.crossVectors(r,Te),Wn.lengthSq()===0&&(Math.abs(r.z)===1?Te.x+=1e-4:Te.z+=1e-4,Te.normalize(),Wn.crossVectors(r,Te)),Wn.normalize(),sa.crossVectors(Te,Wn),s[0]=Wn.x,s[4]=sa.x,s[8]=Te.x,s[1]=Wn.y,s[5]=sa.y,s[9]=Te.y,s[2]=Wn.z,s[6]=sa.z,s[10]=Te.z,this}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[4],c=r[8],h=r[12],u=r[1],l=r[5],d=r[9],f=r[13],p=r[2],m=r[6],b=r[10],g=r[14],w=r[3],x=r[7],v=r[11],E=r[15],_=s[0],D=s[4],z=s[8],O=s[12],L=s[1],$=s[5],j=s[9],Q=s[13],rt=s[2],ot=s[6],nt=s[10],tt=s[14],bt=s[3],Y=s[7],F=s[11],A=s[15];return i[0]=o*_+a*L+c*rt+h*bt,i[4]=o*D+a*$+c*ot+h*Y,i[8]=o*z+a*j+c*nt+h*F,i[12]=o*O+a*Q+c*tt+h*A,i[1]=u*_+l*L+d*rt+f*bt,i[5]=u*D+l*$+d*ot+f*Y,i[9]=u*z+l*j+d*nt+f*F,i[13]=u*O+l*Q+d*tt+f*A,i[2]=p*_+m*L+b*rt+g*bt,i[6]=p*D+m*$+b*ot+g*Y,i[10]=p*z+m*j+b*nt+g*F,i[14]=p*O+m*Q+b*tt+g*A,i[3]=w*_+x*L+v*rt+E*bt,i[7]=w*D+x*$+v*ot+E*Y,i[11]=w*z+x*j+v*nt+E*F,i[15]=w*O+x*Q+v*tt+E*A,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],r=t[4],s=t[8],i=t[12],o=t[1],a=t[5],c=t[9],h=t[13],u=t[2],l=t[6],d=t[10],f=t[14],p=t[3],m=t[7],b=t[11],g=t[15];return p*(+i*c*l-s*h*l-i*a*d+r*h*d+s*a*f-r*c*f)+m*(+e*c*f-e*h*d+i*o*d-s*o*f+s*h*u-i*c*u)+b*(+e*h*l-e*a*f-i*o*l+r*o*f+i*a*u-r*h*u)+g*(-s*a*u-e*c*l+e*a*d+s*o*l-r*o*d+r*c*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,r){const s=this.value;return t instanceof Je?(s[12]=t.x,s[13]=t.y,s[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof r=="number"&&(s[12]=t,s[13]=e,s[14]=r),this}inverse(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=t[9],d=t[10],f=t[11],p=t[12],m=t[13],b=t[14],g=t[15],w=l*b*h-m*d*h+m*c*f-a*b*f-l*c*g+a*d*g,x=p*d*h-u*b*h-p*c*f+o*b*f+u*c*g-o*d*g,v=u*m*h-p*l*h+p*a*f-o*m*f-u*a*g+o*l*g,E=p*l*c-u*m*c-p*a*d+o*m*d+u*a*b-o*l*b,_=e*w+r*x+s*v+i*E;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/_;return t[0]=w*D,t[1]=(m*d*i-l*b*i-m*s*f+r*b*f+l*s*g-r*d*g)*D,t[2]=(a*b*i-m*c*i+m*s*h-r*b*h-a*s*g+r*c*g)*D,t[3]=(l*c*i-a*d*i-l*s*h+r*d*h+a*s*f-r*c*f)*D,t[4]=x*D,t[5]=(u*b*i-p*d*i+p*s*f-e*b*f-u*s*g+e*d*g)*D,t[6]=(p*c*i-o*b*i-p*s*h+e*b*h+o*s*g-e*c*g)*D,t[7]=(o*d*i-u*c*i+u*s*h-e*d*h-o*s*f+e*c*f)*D,t[8]=v*D,t[9]=(p*l*i-u*m*i-p*r*f+e*m*f+u*r*g-e*l*g)*D,t[10]=(o*m*i-p*a*i+p*r*h-e*m*h-o*r*g+e*a*g)*D,t[11]=(u*a*i-o*l*i-u*r*h+e*l*h+o*r*f-e*a*f)*D,t[12]=E*D,t[13]=(u*m*s-p*l*s+p*r*d-e*m*d-u*r*b+e*l*b)*D,t[14]=(p*a*s-o*m*s-p*r*c+e*m*c+o*r*b-e*a*b)*D,t[15]=(o*l*s-u*a*s+u*r*c-e*l*c-o*r*d+e*a*d)*D,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,r,s))}makeTranslation(t,e,r){return t instanceof Je?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const r=Math.cos(e),s=Math.sin(e),i=1-r,o=t.x,a=t.y,c=t.z,h=i*o,u=i*a;return this.set(h*o+r,h*a-s*c,h*c+s*a,0,h*a+s*c,u*a+r,u*c-s*o,0,h*c-s*a,u*c+s*o,i*c*c+r,0,0,0,0,1),this}makeScale(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this}makeShear(t,e,r,s,i,o){return this.set(1,r,i,0,t,1,o,0,e,s,1,0,0,0,0,1),this}makePerspective(t,e,r,s,i,o,a=ri){const c=this.value,h=2*i/(e-t),u=2*i/(r-s),l=(e+t)/(e-t),d=(r+s)/(r-s);let f,p;if(a===ri)f=-(o+i)/(o-i),p=-2*o*i/(o-i);else if(a===sl)f=-o/(o-i),p=-o*i/(o-i);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=l,c[12]=0,c[1]=0,c[5]=u,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,r,s,i,o,a=ri){const c=this.value,h=1/(e-t),u=1/(r-s),l=1/(o-i),d=(e+t)*h,f=(r+s)*u;let p,m;if(a===ri)p=(o+i)*l,m=-2*l;else if(a===sl)p=i*l,m=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=m,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,r=0){return this.multiply(new be([1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1]))}scale(t=1,e=1,r=1){return this.multiply(new be([t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1]))}scaleVector3(t){const e=this.value,r=t.x,s=t.y,i=t.z;return e[0]*=r,e[4]*=s,e[8]*=i,e[1]*=r,e[5]*=s,e[9]*=i,e[2]*=r,e[6]*=s,e[10]*=i,e[3]*=r,e[7]*=s,e[11]*=i,this}rotateX(t){const e=wt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new be([1,0,0,0,0,r,s,0,0,-s,r,0,0,0,0,1]))}rotateY(t){const e=wt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new be([r,0,-s,0,0,1,0,0,s,0,r,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=wt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new be([r,s,0,0,-s,r,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,r=0){return this.multiply(new be([1,0,0,wt(t),0,1,0,wt(e),0,0,1,wt(r),0,0,0,1]))}perspective(t){return this.multiply(new be([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,r=t.x*this.m12+t.y*this.m22+this.m42,s=t.x*this.m13+t.y*this.m23+this.m43,i=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=r+this.m32,c=s+this.m33,h=i+this.m34;i==0&&(i=1e-4),e/=i,r/=i,s/=i,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const u=c-s;if(u==0)return{x:e,y:r,z:s,mass:i};const l=-s/u;return e+=l*(o-e),r+=l*(a-r),{x:e,y:r,z:s,mass:i}}project(t){const e=t.z;let r=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,s=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,i=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return i==0&&(i=1e-4),r/=i,s/=i,i<0&&(r-=this.m41,s-=this.m42,r*=1/i,s*=1/i,r+=this.m41,s+=this.m42),{x:r,y:s,z:e,mass:i}}bounds(t,e,r,s){const i=new na({x:t,y:e}),o=new na({x:t+r,y:e}),a=new na({x:t+r,y:e+s}),c=new na({x:t,y:e+s});({x:i.x,y:i.y,z:i.z,mass:i.mass}=this.project(i)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(i.x,o.x,a.x,c.x),u=Math.min(i.y,o.y,a.y,c.y),l=Math.max(i.x,o.x,a.x,c.x)-h,d=Math.max(i.y,o.y,a.y,c.y)-u;return{x:h,y:u,width:l,height:d}}}class Zt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=D0){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new Zt,r=Hl("number",t);return r.length===6&&r.forEach((s,i)=>{s.fullMatch&&(e.value[i]=parseFloat(s.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new be(e)}identity(){return this.value=Array.from(D0),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new Zt(this.value)}multiply(t){const e=this.clone(),r=t instanceof Zt?t:new Zt(t);return this.m11=r.m11*e.m11+r.m12*e.m21+r.m13*e.m31,this.m12=r.m11*e.m12+r.m12*e.m22+r.m13*e.m32,this.m13=r.m11*e.m13+r.m12*e.m23+r.m13*e.m33,this.m21=r.m21*e.m11+r.m22*e.m21+r.m23*e.m31,this.m22=r.m21*e.m12+r.m22*e.m22+r.m23*e.m32,this.m23=r.m21*e.m13+r.m22*e.m23+r.m23*e.m33,this.m31=r.m31*e.m11+r.m32*e.m21+r.m33*e.m31,this.m32=r.m31*e.m12+r.m32*e.m22+r.m33*e.m32,this.m33=r.m31*e.m13+r.m32*e.m23+r.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}inverse(){const t=this.m11,e=this.m12,r=this.m13,s=this.m21,i=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,u=h*i-o*c,l=-h*s+o*a,d=c*s-i*a;let f=t*u+e*l+r*d;return f?(f=1/f,this.m11=u*f,this.m12=(-h*e+r*c)*f,this.m13=(o*e-r*i)*f,this.m21=l*f,this.m22=(h*t-r*a)*f,this.m23=(-o*t+r*s)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(i*t-e*s)*f,this):null}adjugate(){const t=new Zt;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=ee(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:ee(Math.atan2(-this.m21,this.m22)),skewY:ee(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],r=this.value[1],s=this.value[2],i=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],u=t.value[2],l=t.value[3],d=t.value[4],f=t.value[5],p=c*l,m=h*u,b=(u*r-e*l)/(m-p),g=(c*r-e*h)/(p-m),w=(u*i-s*l)/(m-p),x=(c*i-s*h)/(p-m),v=(u*(a-f)+l*(d-o))/(m-p),E=(c*(a-f)+h*(d-o))/(p-m),_=[b,g,w,x,v,E];return new Zt(_)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>at(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,r){return this.matrix4.translate(t,e,r),this.matrix4.toMatrix(this),this}translate3dTo(t,e,r){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,r-this.matrix4.m43),this}rotate(t,e=0,r=0){const s=wt(t),i=Math.cos(s),o=Math.sin(s);return this.translate(e,r),this.multiply([i,o,-o,i,0,0]),this.translate(-e,-r),this.toMatrix4(),this}rotateTo(t,e=0,r=0){const{degree:s}=this.split();return this.rotate(t-s,e,r),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,r){return this.matrix4.rotateX(t).rotateY(e).rotateZ(r),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,r){const{degreeX:s,degreeY:i,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-s,e-i,r-o),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.multiply([t,0,0,e,0,0]),this.translate(-r,-s),this.toMatrix4(),this}scaleTo(t,e=t,r=0,s=0){return this.scale(t/this.m11,e/this.m22,r,s)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,r=t){return this.matrix4.scale(t,e,r),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,r=t){const{scalarX:s,scalarY:i,scalarZ:o}=this.matrix4.split();return this.scale3d(t/s,e/i,r/o),this}skew(t,e=t){return this.multiply([Math.cos(wt(e)),Math.sin(wt(e)),-Math.sin(wt(t)),Math.cos(wt(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:r,skewY:s}=this.split();return this.skew(t-r,e-s)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,r){return this}skew3dTo(t,e,r){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const Wn=new Je,sa=new Je,Te=new Je,ol=new Je,al=new ra;new be;function R0(n){const t=new Zt;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,r,s){s.indexOf(",")>=0?s=s.split(/\s*,\s*/):s=s.split(/\s+/);const i=[];for(let o=0,a=s.length;o<a;o++)s[o].trim()&&i.push(parseFloat(""+s[o]));switch(r.toLowerCase()){case"t":case"translate":t.translate(i[0],i[1]);break;case"translatex":t.translateX(i[0]);break;case"translatey":t.translateY(i[0]);break;case"translatez":t.translateZ(i[0]);break;case"translate3d":t.translate3d(i[0],i[1],i[2]);break;case"r":case"rotate":t.rotate(i[0],i[1]??0,i[2]??0);break;case"rotatex":t.rotateX(i[0]);break;case"rotatey":t.rotateY(i[0]);break;case"rotatez":t.rotateZ(i[0]);break;case"rotate3d":t.rotate3d(i[0],i[1],i[2]);break;case"s":case"scale":t.scale(i[0],i[1]??i[0]);break;case"scalex":t.scaleX(i[0]);break;case"scaley":t.scaleY(i[0]);break;case"scalez":t.scaleZ(i[0]);break;case"scale3d":t.scale3d(i[0],i[1],i[2]);break;case"skew":t.skew(i[0],i[1]??0);break;case"skewx":t.skewX(i[0]);break;case"skewy":t.skewY(i[0]);break;case"skewz":t.skewZ(i[0]);break;case"skew3d":t.skew3d(i[0],i[1],i[2]);break;case"m":case"matrix":t.multiply([i[0],i[1],i[2],i[3],i[4],i[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new be(i)),t.matrix4.toMatrix(t);break}return""}),t}function Ge(n,t,e){const r=new Zt;return r.rotate(ee(n)),r.transformPoint({x:t,y:e})}function cl(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,r=typeof n?.degree=="number"?n?.degree:0,s=typeof n?.scalarX=="number"?n?.scalarX:1,i=typeof n?.scalarY=="number"?n?.scalarY:1,o=wt(r),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*s,c*s,-c*i,a*i,t,e]);return h.multiplySelf(new DOMMatrix(n?.originMatrix||"")),h}function hA(n,t){const e=new Path2D(n),r=new Path2D;return r.addPath(e,cl(t)),r}const k0={map:new Map,transform:function(n){if(Db)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function uA(n,t,e){const r=new OffscreenCanvas(n,t),s=r.getContext("2d");if(s)return e(s),r.transferToImageBitmap()}function lA(n,t,e){const r=n.createPattern(k0.transform(t),"no-repeat");if(r){const s=cl(e);r.setTransform(s),n.fillStyle=r}}const hl=["","-webkit-","-moz-","-o-","-ms-"];function ul(n,t){const e=t.x||0,r=t.y||0,s=t.z||0;ps(n,"transform",`translate(${e}px, ${r}px) translateZ(${s}px)`)}function fA(n,t){const e=t?.easingFn||X.Linear.None,r=t?.duration||0,s=t?.delay||0,i=Pr(),o=i+r;let a=0,c=0;const h=t.deltaX,u=t.deltaY;function l(){const d=Pr();if(d>=o){ul(n,{x:h-a,y:u-c});return}const f=(d-i)/r,p=e(f),m=h*p,b=u*p;ul(n,{x:m-a,y:b-c}),a=m,c=b,Pi(l)}setTimeout(()=>{l()},s)}const dA=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function L0(n){return window.URL.createObjectURL(n)}function mA(n){return window.URL.revokeObjectURL(n)}function ll(n){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),n(),t=!0)}const r=Ct(document,"DOMContentLoaded",e),s=Ct(window,"load",e),i=setInterval(e,100),o=()=>{clearInterval(i),r?.(),s?.()};return o}function N0(n){return Ct(window,"beforeunload",t=>{n(t)})}async function pA(n,t=6e4){return new Promise((e,r)=>{const s=document.createElement("script");s.type="text/javascript",s.async=!1,s.onload=o=>{clearTimeout(i),e(o),s.onerror=s.onload=null},s.onerror=o=>{clearTimeout(i),r(o)},s.src=n;const i=setTimeout(()=>{r("Timeout!")},t);document.body.appendChild(s)})}function fl(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}async function gA(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((r,s)=>{const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.onload=a=>{clearTimeout(o),r(a),i.onerror=i.onload=null},i.onerror=a=>{clearTimeout(o),s(a)},i.setAttribute("href",n);const o=setTimeout(()=>{s("Timeout!")},e);t.appendChild(i)})}function yA(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const r=()=>e>=t.length?(n(),!0):!1;r()||t.forEach(s=>{s.onload=()=>{e+=1,r()}})})}const z0=new ka({max:1e3});async function V0(n,t=6e4){return new Promise((e,r)=>{const s=typeof n=="string"?n:L0(n),i=z0.get(s);if(i)return e(i);const o=setTimeout(()=>{r("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const c=a.naturalWidth||a.width,h=a.naturalHeight||a.height,u={width:c,height:h,aspectRatio:c/h,element:a,imageData:tm(a)};z0.set(s,u),e(u)},a.onerror=c=>{clearTimeout(o),r(c)},a.src=s})}async function F0(n=Ae.text,t=["*"]){const r=(await yc(t))[0],s=await ds(r,n);return{type:r.type,name:r.name,size:r.size,data:s}}async function bA(n=["image/*"]){const e=(await yc(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const r=await ds(e,Ae.arraybuffer),s=Pa(r),i=await V0(s);return{type:e.type,name:e.name,size:e.size,data:r,width:i.width,height:i.height,aspectRatio:i.aspectRatio,imageData:i.imageData}}function vA(){return window.getSelection()?.toString()||""}function wA(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function xA(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function SA(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function _A(n=0,t=0){window.scrollTo(n,t)}function EA(){let n=uf,t=uf;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=N0(()=>{window.history.scrollRestoration="auto"}),t=ll(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function CA(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const TA=n=>n===document.activeElement&&(n.type||n.href);function dl(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function PA(n){return n*dl()}function AA(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):dl()}const MA=n=>{let t=n;for(;t&&t.nodeType!==1;){const e=t.parentElement||n.parentNode;if(!e)break;t=e}return t},DA=n=>n.parentElement,ml=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:ml(n.parentElement,t.concat([n]));function OA(n){const t=ml(n);for(let e=0,r=t.length;e<r;e++)if(/(auto|scroll)/.test(ms(t[e],"overflow")+ms(t[e],"overflow-y")+ms(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const IA=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),RA=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),kA=n=>n.nextElementSibling,LA=n=>n.previousElementSibling,NA=(n,t)=>n.closest(t),zA=n=>n.shadowRoot,si=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,pl=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,VA=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,gl=n=>si(n)&&n.getAttribute("type")==="checkbox",yl=n=>si(n)&&n.getAttribute("type")==="radio",FA=n=>si(n)&&n.getAttribute("type")==="text",BA=n=>si(n)&&n.getAttribute("type")==="number";function $A(n,t){if(pl(n)){const e=n.options;for(let r=0,s=e.length;r<s;r++)e[r].selected=e[r].value==t}}function UA(n,t){if(yl(n)){const e=document.getElementsByName(n.name);for(let r=0,s=e.length;r<s;r++){const i=e[r];i.checked=i.value==t}}}function YA(n,t){gl(n)&&(n.checked=t)}function ts(n,t,e="append"){typeof t=="string"?n[e](j0(t)):n[e](t)}function B0(n,t){if(typeof t=="string"){n.innerHTML=t;const e=X0(n);e!=n&&(n=e)}else ts(t,"replaceWith")}const $0=function(n){B0(n,"")},jA=(n,t)=>{n.textContent=t},GA=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let r=0;for(;!t&&r<=e.length-1;)"innerText"in e[r]&&(t=e[r].innerText),r++}return t},XA=n=>n.remove();function WA(n,t){ms(n,"display")=="none"&&t===void 0||t===!0?U0(n):Y0(n)}function U0(n){Or(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function Y0(n){Or(n,"display","none")}function bl(n,t,e="toggle"){const r=t.split(/[,\s]+/);if(n.classList)r.forEach(s=>{const i=s.trim();i!==""&&n.classList[e](i)});else{const s=n.className.split(/ +/);let i=!1;r.forEach(o=>{const a=o.trim();if(a!==""){const c=s.indexOf(a);switch(e){case"add":c===-1&&(s.push(a),i=!0);break;case"remove":c!==-1&&(s.splice(c,1),i=!0);break;case"toggle":c===-1?s.push(a):s.splice(c,1),i=!0;break}}}),i&&sr(n,"class",s.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function HA(n,t){bl(n,t,"add")}function qA(n,t){bl(n,t,"remove")}function KA(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)}function j0(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(r=>{const s=X0(r);s!=r&&e.content.replaceChild(s,r)}),e.content}function G0(n){return document.createElement.call(document,n)}function JA(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function ZA(n){return document.createTextNode.call(document,n)}function X0(n){return n.tagName=="SCRIPT"&&(n=W0(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(W0(t),t)}),n}function W0(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let r=0,s=e.length;r<s;r++)t.setAttribute(e[r].name,e[r].value);return t}function QA(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}function tM(n){const t=new Proxy(window,{get(e,r,s){if(typeof r=="string"&&["open","location","document"].includes(r))throw new Error(`禁止访问 key: ${r}`);return r==="window"?t:Reflect.get(e,r,s)},set(e,r,s,i){return Reflect.set(e,r,s,i)}});new Function("window",`with(window) { ${n} }`)(t,null)}function eM(n){return n=n.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),n="echo(`"+n+"`);",`(function parse(data){
114
+ `);if(e.length<=1)t.fillText(this.text,0,0);else{const r=t.measureText(this.text),i=(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)*parseFloat(this.getAttr("line-height","1.2em"));let o=0;e.forEach((a,c)=>{a.trim()&&(o+=c>0?i:0,t.fillText(a.trim(),0,o))})}}static measureText(t,e=12,r=400){const s=document.createElement("span");s.style.visibility="hidden",s.style.margin="0",s.style.padding="0",s.style.inset="0",s.style.whiteSpace="nowrap",s.style.overflow="visible",s.style.fontSize=e+"px",s.style.fontWeight=r.toString(),s.innerText=t,document.body.appendChild(s);const i=s.offsetWidth,o=s.offsetHeight;return document.body.removeChild(s),{width:i,height:o}}static getFixedWidthText(t,e,r=12,s=400,i="..."){let o="";if(!t||e<r)return o;const a=t.split("");let c=i?Qr.measureText(i,r,s).width:0;for(let h=0,u=a.length;h<u;h++)if(c+=Qr.measureText(a[h],r,s).width,c>e){i&&(o+=i);break}else o+=a[h];return o}}class rl extends ye{options;constructor(t){super(t),this.options=t;const{shapeCreator:e,width:r,height:s,x:i,y:o,particleCount:a,angle:c,spread:h,startVelocity:u,decay:l,gravity:d,drift:f,ticks:p,colors:m,scalar:b,flat:g}=Object.assign({shapeCreator:()=>new Gn({rectWidth:10,rectHeight:10}),width:100,height:100,x:.5,y:.6,particleCount:100,angle:90,spread:70,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,colors:Bb,scalar:1,flat:!1},t||{}),w=(_,D)=>{_.x=r*i,_.y=s*o,_.scaleX=b,_.scaleY=b;const z=m[D%m.length];_.setAttr({fill:z}),_.interactive=!1,_.wobble=Math.random()*10,_.wobbleSpeed=Math.min(.11,Math.random()*.1+.05),_.velocity=u*.5+Math.random()*u,_.angle2D=-x+(.5*v-Math.random()*v),_.tiltAngle=(Math.random()*(.75-.25)+.25)*Math.PI,_.tick=0,_.totalTicks=p,_.decay=l,_.drift=f,_.random=Math.random()+2,_.tiltSin=0,_.tiltCos=0,_.wobbleX=0,_.wobbleY=0,_.gravity=d*3,_.scalar=b,_.flat=g,_.color=new Ne(z)},x=wt(c),v=wt(h);let E=a;for(;E;){const _=e();w(_,E),_.clone=(D=>()=>{const z=e();return w(z,D),z})(E),this.addShape(_),E--}}cloneShapeCombo(){return new rl(this.options)}update(){return this.shapes=this.shapes.filter(t=>{t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);const e=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,s=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return t.setAttr("fill",t.color.setAlpha(1-e).toString()),t.degree=ee(Math.PI/10*t.wobble),t.scaleX=Math.abs(i-r)*.1,t.scaleY=Math.abs(o-s)*.1,t.tick<t.totalTicks}),this.shapes.length>0}}const oA={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(n,t)=>{switch(t){case"W":return`${n}周`;default:return`${n}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(n,t)=>{const e=n*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},aA={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:n=>{const t=["th","st","nd","rd"],e=n%100;return`[${n}${t[(e-20)%10]||t[e]||t[0]}]`}},Xn=new rb;let ea="zh-cn";sl(aA),sl(oA);function sl(n,t){if(!n)return Xn.get(ea);let e;if(typeof n=="string"){const r=n.toLowerCase();if(Xn.get(r))e=r;else if(t)Xn.set(r,t),e=r;else return Xn.get(ea)}else{const{name:r}=n;Xn.set(r,n),e=r}return e&&(ea=e),Xn.get(e)||Xn.get(ea)}class cA extends Va{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];state;constructor(t){if(super(),this.id=Af(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const e=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",e),this.strokeDashTotalLength=af(e).reduce((r,s)=>r+s,0)}this.state=Ah(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new lS,this.state.subscribe(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(r=>{const s=r.originMatrix?r.originMatrix.clone():new Zt;s.translate(-t.x+r.x,-t.y+r.y),r.originMatrix=s});const e=this.originMatrix?this.originMatrix.clone():new Zt;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,r){if(r instanceof Gc)return r.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=r.createSVGPoint(),s.x=t,s.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(s);{const i=this.getBoundingClientRect();if(i)return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height}return!1}isPointInStroke(t,e,r){if(r instanceof Gc)return r.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let s;try{s=new SVGPoint(t,e)}catch{s=r.createSVGPoint(),s.x=t,s.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(s):!1}clone(){return M1(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([r,s])=>[Wt(r),s]))):e&&(this.attrs[Wt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[Wt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[Wt(t)]}distance(t){return tr(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=ee(ze(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:r,dy:s}=er(wt(this.degree),e);this.vx=r,this.vy=s,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:r,dy:s}=er(wt(this.degree),e);this.ax=r,this.ay=s,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,r=t.y-this.y,s=e*e+r*r,i=Math.sqrt(s),o=this.mass*t.mass/s,a=o*e/i,c=o*r/i;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=Me(t?.gravity,0);this.vy+=e;const r=Me(t?.friction,1);this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const r=Me(e?.easing,.05),s=t.x-this.cX-this.x,i=t.y-this.cY-this.y;this.vx=s*r,this.vy=i*r,this.run(e)}runSpringTo(t,e){const r=Me(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(s=>{const i=s.x-this.cX-this.x,o=s.y-this.cY-this.y,a=i*r,c=o*r;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const r=Me(e?.springLength,100),s=Me(e?.spring,1e-4),i=t.x-this.x,o=t.y-this.y,a=Math.sqrt(i*i+o*o);if(a<r){const c=i*s,h=o*s;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/r}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const r=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*r),this.getPointAtLength(e*r)}strokeDashTween(t=1e3,e){const r=this.initPathD(),s=at(r.getTotalLength(),0);this.setAttr({strokeDasharray:`${s} ${s}`,strokeDashoffset:`${s}`});const i=e?.onUpdate,o=new As({frameDuration:t});o.addTween({offset:s},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+at(a.offset,2)),i?.(a,c)}})),o.play()}}class hA extends cA{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,r){this.cX=t,this.cY=e,this.cZ=r}rotateX(t){({x:this.y,y:this.z}=Ge(wt(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=Ge(wt(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=Ge(wt(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return Qa(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,r=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+r*r+s*s)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const r=t/e;this.scalar(r)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,r=this.y,s=this.z;return{x:r*t.z-s*t.y,y:s*t.x-e*t.z,z:e*t.y-r*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const na=hA,ri=2e3,il=2001,D0=[1,0,0,1],O0=[1,0,0,1,0,0],I0=[1,0,0,0,1,0,0,0,1],R0=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class ol{value;constructor(t=D0){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,r=0,s=1){return this.m11=t,this.m21=e,this.m12=r,this.m22=s,this}identity(){return this.value=Array.from(D0),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new ol(this.value)}fromArray(t,e=0){for(let r=0;r<4;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[2],c=r[1],h=r[3],u=s[0],l=s[2],d=s[1],f=s[3];return i[0]=o*u+a*d,i[2]=o*l+a*f,i[1]=c*u+h*d,i[3]=c*l+h*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class ra{value;constructor(t=I0){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,r=0,s=0,i=1,o=0,a=0,c=0,h=1){const u=this.value;return u[0]=t,u[1]=s,u[2]=a,u[3]=e,u[4]=i,u[5]=c,u[6]=r,u[7]=o,u[8]=h,this}identity(){return this.value=Array.from(I0),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new ra(this.value)}fromArray(t,e=0){for(let r=0;r<9;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,r){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[3],c=r[6],h=r[1],u=r[4],l=r[7],d=r[2],f=r[5],p=r[8],m=s[0],b=s[3],g=s[6],w=s[1],x=s[4],v=s[7],E=s[2],_=s[5],D=s[8];return i[0]=o*m+a*w+c*E,i[3]=o*b+a*x+c*_,i[6]=o*g+a*v+c*D,i[1]=h*m+u*w+l*E,i[4]=h*b+u*x+l*_,i[7]=h*g+u*v+l*D,i[2]=d*m+f*w+p*E,i[5]=d*b+f*x+p*_,i[8]=d*g+f*v+p*D,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8];return e*o*u-e*a*h-r*i*u+r*a*c+s*i*h-s*o*c}inverse(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=u*o-a*h,d=a*c-u*i,f=h*i-o*c,p=e*l+r*d+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=l*m,t[1]=(s*h-u*r)*m,t[2]=(a*r-s*o)*m,t[3]=d*m,t[4]=(u*e-s*c)*m,t[5]=(s*i-a*e)*m,t[6]=f*m,t[7]=(r*c-h*e)*m,t[8]=(o*e-r*i)*m,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).inverse().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,r,s,i,o,a){const c=Math.cos(i),h=Math.sin(i);return this.set(r*c,r*h,-r*(c*o+h*a)+o+t,-s*h,s*c,-s*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(cl.makeScale(t,e)),this}rotate(t){return this.premultiply(cl.makeRotation(-t)),this}translate(t,e){return this.premultiply(cl.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,r,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class be{value;is3dSpecial=!1;constructor(t=R0){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,r=0,s=0,i=0,o=1,a=0,c=0,h=0,u=0,l=1,d=0,f=0,p=0,m=0,b=1){const g=this.value;return g[0]=t,g[4]=e,g[8]=r,g[12]=s,g[1]=i,g[5]=o,g[9]=a,g[13]=c,g[2]=h,g[6]=u,g[10]=l,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=b,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(R0),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new be(this.value)}static fromString(t){const e=new be,r=ql("number",t);return r.length===16&&r.forEach((s,i)=>{s.fullMatch&&(e.value[i]=parseFloat(s.fullMatch))}),e}fromArray(t,e=0){for(let r=0;r<16;r++)this.value[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.value;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t}copyPosition(t){const e=this.value,r=t.value;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,r){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),r.setFromMatrix4Column(this,2),this}makeBasis(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,r=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+r*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+r*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+r*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+r*this.m44}}toMatrix(t){const{scalarX:e,scalarY:r,skewX:s,skewY:i,x:o,y:a}=this.split(),c=[e,i,s,r,o,a];return t?(t.value=c,t):new Zt(c)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>at(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),r=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),s=ee(st(Math.asin(-this.m13),-1,1));let i=ee(Math.atan2(this.m23,this.m33));Math.cos(wt(s))===0&&(i=ee(Math.atan2(-this.m31,this.m22)));let o=ee(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:r,degreeX:i,degreeY:s,degreeZ:o,skewX:ee(this.m14),skewY:ee(this.m24),skewZ:ee(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,r=t.value,s=1/al.setFromMatrix4Column(t,0).length(),i=1/al.setFromMatrix4Column(t,1).length(),o=1/al.setFromMatrix4Column(t,2).length();return e[0]=r[0]*s,e[1]=r[1]*s,e[2]=r[2]*s,e[3]=0,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=0,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}lookAt(t,e,r){const s=this.value;return Te.subVectors(t,e),Te.lengthSq()===0&&(Te.z=1),Te.normalize(),Wn.crossVectors(r,Te),Wn.lengthSq()===0&&(Math.abs(r.z)===1?Te.x+=1e-4:Te.z+=1e-4,Te.normalize(),Wn.crossVectors(r,Te)),Wn.normalize(),sa.crossVectors(Te,Wn),s[0]=Wn.x,s[4]=sa.x,s[8]=Te.x,s[1]=Wn.y,s[5]=sa.y,s[9]=Te.y,s[2]=Wn.z,s[6]=sa.z,s[10]=Te.z,this}multiplyMatrices(t,e){const r=t.value,s=e.value,i=this.value,o=r[0],a=r[4],c=r[8],h=r[12],u=r[1],l=r[5],d=r[9],f=r[13],p=r[2],m=r[6],b=r[10],g=r[14],w=r[3],x=r[7],v=r[11],E=r[15],_=s[0],D=s[4],z=s[8],O=s[12],L=s[1],$=s[5],j=s[9],Q=s[13],rt=s[2],ot=s[6],nt=s[10],tt=s[14],bt=s[3],Y=s[7],F=s[11],A=s[15];return i[0]=o*_+a*L+c*rt+h*bt,i[4]=o*D+a*$+c*ot+h*Y,i[8]=o*z+a*j+c*nt+h*F,i[12]=o*O+a*Q+c*tt+h*A,i[1]=u*_+l*L+d*rt+f*bt,i[5]=u*D+l*$+d*ot+f*Y,i[9]=u*z+l*j+d*nt+f*F,i[13]=u*O+l*Q+d*tt+f*A,i[2]=p*_+m*L+b*rt+g*bt,i[6]=p*D+m*$+b*ot+g*Y,i[10]=p*z+m*j+b*nt+g*F,i[14]=p*O+m*Q+b*tt+g*A,i[3]=w*_+x*L+v*rt+E*bt,i[7]=w*D+x*$+v*ot+E*Y,i[11]=w*z+x*j+v*nt+E*F,i[15]=w*O+x*Q+v*tt+E*A,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],r=t[4],s=t[8],i=t[12],o=t[1],a=t[5],c=t[9],h=t[13],u=t[2],l=t[6],d=t[10],f=t[14],p=t[3],m=t[7],b=t[11],g=t[15];return p*(+i*c*l-s*h*l-i*a*d+r*h*d+s*a*f-r*c*f)+m*(+e*c*f-e*h*d+i*o*d-s*o*f+s*h*u-i*c*u)+b*(+e*h*l-e*a*f-i*o*l+r*o*f+i*a*u-r*h*u)+g*(-s*a*u-e*c*l+e*a*d+s*o*l-r*o*d+r*c*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,r){const s=this.value;return t instanceof Je?(s[12]=t.x,s[13]=t.y,s[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof r=="number"&&(s[12]=t,s[13]=e,s[14]=r),this}inverse(){const t=this.value,e=t[0],r=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=t[9],d=t[10],f=t[11],p=t[12],m=t[13],b=t[14],g=t[15],w=l*b*h-m*d*h+m*c*f-a*b*f-l*c*g+a*d*g,x=p*d*h-u*b*h-p*c*f+o*b*f+u*c*g-o*d*g,v=u*m*h-p*l*h+p*a*f-o*m*f-u*a*g+o*l*g,E=p*l*c-u*m*c-p*a*d+o*m*d+u*a*b-o*l*b,_=e*w+r*x+s*v+i*E;if(_===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/_;return t[0]=w*D,t[1]=(m*d*i-l*b*i-m*s*f+r*b*f+l*s*g-r*d*g)*D,t[2]=(a*b*i-m*c*i+m*s*h-r*b*h-a*s*g+r*c*g)*D,t[3]=(l*c*i-a*d*i-l*s*h+r*d*h+a*s*f-r*c*f)*D,t[4]=x*D,t[5]=(u*b*i-p*d*i+p*s*f-e*b*f-u*s*g+e*d*g)*D,t[6]=(p*c*i-o*b*i-p*s*h+e*b*h+o*s*g-e*c*g)*D,t[7]=(o*d*i-u*c*i+u*s*h-e*d*h-o*s*f+e*c*f)*D,t[8]=v*D,t[9]=(p*l*i-u*m*i-p*r*f+e*m*f+u*r*g-e*l*g)*D,t[10]=(o*m*i-p*a*i+p*r*h-e*m*h-o*r*g+e*a*g)*D,t[11]=(u*a*i-o*l*i-u*r*h+e*l*h+o*r*f-e*a*f)*D,t[12]=E*D,t[13]=(u*m*s-p*l*s+p*r*d-e*m*d-u*r*b+e*l*b)*D,t[14]=(p*a*s-o*m*s-p*r*c+e*m*c+o*r*b-e*a*b)*D,t[15]=(o*l*s-u*a*s+u*r*c-e*l*c-o*r*d+e*a*d)*D,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,r,s))}makeTranslation(t,e,r){return t instanceof Je?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const r=Math.cos(e),s=Math.sin(e),i=1-r,o=t.x,a=t.y,c=t.z,h=i*o,u=i*a;return this.set(h*o+r,h*a-s*c,h*c+s*a,0,h*a+s*c,u*a+r,u*c-s*o,0,h*c-s*a,u*c+s*o,i*c*c+r,0,0,0,0,1),this}makeScale(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this}makeShear(t,e,r,s,i,o){return this.set(1,r,i,0,t,1,o,0,e,s,1,0,0,0,0,1),this}makePerspective(t,e,r,s,i,o,a=ri){const c=this.value,h=2*i/(e-t),u=2*i/(r-s),l=(e+t)/(e-t),d=(r+s)/(r-s);let f,p;if(a===ri)f=-(o+i)/(o-i),p=-2*o*i/(o-i);else if(a===il)f=-o/(o-i),p=-o*i/(o-i);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=l,c[12]=0,c[1]=0,c[5]=u,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,r,s,i,o,a=ri){const c=this.value,h=1/(e-t),u=1/(r-s),l=1/(o-i),d=(e+t)*h,f=(r+s)*u;let p,m;if(a===ri)p=(o+i)*l,m=-2*l;else if(a===il)p=i*l,m=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=m,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,r=0){return this.multiply(new be([1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1]))}scale(t=1,e=1,r=1){return this.multiply(new be([t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1]))}scaleVector3(t){const e=this.value,r=t.x,s=t.y,i=t.z;return e[0]*=r,e[4]*=s,e[8]*=i,e[1]*=r,e[5]*=s,e[9]*=i,e[2]*=r,e[6]*=s,e[10]*=i,e[3]*=r,e[7]*=s,e[11]*=i,this}rotateX(t){const e=wt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new be([1,0,0,0,0,r,s,0,0,-s,r,0,0,0,0,1]))}rotateY(t){const e=wt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new be([r,0,-s,0,0,1,0,0,s,0,r,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=wt(t),r=Math.cos(e),s=Math.sin(e);return this.multiply(new be([r,s,0,0,-s,r,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,r=0){return this.multiply(new be([1,0,0,wt(t),0,1,0,wt(e),0,0,1,wt(r),0,0,0,1]))}perspective(t){return this.multiply(new be([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,r=t.x*this.m12+t.y*this.m22+this.m42,s=t.x*this.m13+t.y*this.m23+this.m43,i=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=r+this.m32,c=s+this.m33,h=i+this.m34;i==0&&(i=1e-4),e/=i,r/=i,s/=i,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const u=c-s;if(u==0)return{x:e,y:r,z:s,mass:i};const l=-s/u;return e+=l*(o-e),r+=l*(a-r),{x:e,y:r,z:s,mass:i}}project(t){const e=t.z;let r=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,s=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,i=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return i==0&&(i=1e-4),r/=i,s/=i,i<0&&(r-=this.m41,s-=this.m42,r*=1/i,s*=1/i,r+=this.m41,s+=this.m42),{x:r,y:s,z:e,mass:i}}bounds(t,e,r,s){const i=new na({x:t,y:e}),o=new na({x:t+r,y:e}),a=new na({x:t+r,y:e+s}),c=new na({x:t,y:e+s});({x:i.x,y:i.y,z:i.z,mass:i.mass}=this.project(i)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(i.x,o.x,a.x,c.x),u=Math.min(i.y,o.y,a.y,c.y),l=Math.max(i.x,o.x,a.x,c.x)-h,d=Math.max(i.y,o.y,a.y,c.y)-u;return{x:h,y:u,width:l,height:d}}}class Zt{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=O0){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new Zt,r=ql("number",t);return r.length===6&&r.forEach((s,i)=>{s.fullMatch&&(e.value[i]=parseFloat(s.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new be(e)}identity(){return this.value=Array.from(O0),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new Zt(this.value)}multiply(t){const e=this.clone(),r=t instanceof Zt?t:new Zt(t);return this.m11=r.m11*e.m11+r.m12*e.m21+r.m13*e.m31,this.m12=r.m11*e.m12+r.m12*e.m22+r.m13*e.m32,this.m13=r.m11*e.m13+r.m12*e.m23+r.m13*e.m33,this.m21=r.m21*e.m11+r.m22*e.m21+r.m23*e.m31,this.m22=r.m21*e.m12+r.m22*e.m22+r.m23*e.m32,this.m23=r.m21*e.m13+r.m22*e.m23+r.m23*e.m33,this.m31=r.m31*e.m11+r.m32*e.m21+r.m33*e.m31,this.m32=r.m31*e.m12+r.m32*e.m22+r.m33*e.m32,this.m33=r.m31*e.m13+r.m32*e.m23+r.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}inverse(){const t=this.m11,e=this.m12,r=this.m13,s=this.m21,i=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,u=h*i-o*c,l=-h*s+o*a,d=c*s-i*a;let f=t*u+e*l+r*d;return f?(f=1/f,this.m11=u*f,this.m12=(-h*e+r*c)*f,this.m13=(o*e-r*i)*f,this.m21=l*f,this.m22=(h*t-r*a)*f,this.m23=(-o*t+r*s)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(i*t-e*s)*f,this):null}adjugate(){const t=new Zt;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=ee(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:ee(Math.atan2(-this.m21,this.m22)),skewY:ee(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],r=this.value[1],s=this.value[2],i=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],u=t.value[2],l=t.value[3],d=t.value[4],f=t.value[5],p=c*l,m=h*u,b=(u*r-e*l)/(m-p),g=(c*r-e*h)/(p-m),w=(u*i-s*l)/(m-p),x=(c*i-s*h)/(p-m),v=(u*(a-f)+l*(d-o))/(m-p),E=(c*(a-f)+h*(d-o))/(p-m),_=[b,g,w,x,v,E];return new Zt(_)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>at(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,r){return this.matrix4.translate(t,e,r),this.matrix4.toMatrix(this),this}translate3dTo(t,e,r){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,r-this.matrix4.m43),this}rotate(t,e=0,r=0){const s=wt(t),i=Math.cos(s),o=Math.sin(s);return this.translate(e,r),this.multiply([i,o,-o,i,0,0]),this.translate(-e,-r),this.toMatrix4(),this}rotateTo(t,e=0,r=0){const{degree:s}=this.split();return this.rotate(t-s,e,r),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,r){return this.matrix4.rotateX(t).rotateY(e).rotateZ(r),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,r){const{degreeX:s,degreeY:i,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-s,e-i,r-o),this}scale(t,e=t,r=0,s=0){return this.translate(r,s),this.multiply([t,0,0,e,0,0]),this.translate(-r,-s),this.toMatrix4(),this}scaleTo(t,e=t,r=0,s=0){return this.scale(t/this.m11,e/this.m22,r,s)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,r=t){return this.matrix4.scale(t,e,r),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,r=t){const{scalarX:s,scalarY:i,scalarZ:o}=this.matrix4.split();return this.scale3d(t/s,e/i,r/o),this}skew(t,e=t){return this.multiply([Math.cos(wt(e)),Math.sin(wt(e)),-Math.sin(wt(t)),Math.cos(wt(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:r,skewY:s}=this.split();return this.skew(t-r,e-s)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,r){return this}skew3dTo(t,e,r){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const Wn=new Je,sa=new Je,Te=new Je,al=new Je,cl=new ra;new be;function k0(n){const t=new Zt;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,r,s){s.indexOf(",")>=0?s=s.split(/\s*,\s*/):s=s.split(/\s+/);const i=[];for(let o=0,a=s.length;o<a;o++)s[o].trim()&&i.push(parseFloat(""+s[o]));switch(r.toLowerCase()){case"t":case"translate":t.translate(i[0],i[1]);break;case"translatex":t.translateX(i[0]);break;case"translatey":t.translateY(i[0]);break;case"translatez":t.translateZ(i[0]);break;case"translate3d":t.translate3d(i[0],i[1],i[2]);break;case"r":case"rotate":t.rotate(i[0],i[1]??0,i[2]??0);break;case"rotatex":t.rotateX(i[0]);break;case"rotatey":t.rotateY(i[0]);break;case"rotatez":t.rotateZ(i[0]);break;case"rotate3d":t.rotate3d(i[0],i[1],i[2]);break;case"s":case"scale":t.scale(i[0],i[1]??i[0]);break;case"scalex":t.scaleX(i[0]);break;case"scaley":t.scaleY(i[0]);break;case"scalez":t.scaleZ(i[0]);break;case"scale3d":t.scale3d(i[0],i[1],i[2]);break;case"skew":t.skew(i[0],i[1]??0);break;case"skewx":t.skewX(i[0]);break;case"skewy":t.skewY(i[0]);break;case"skewz":t.skewZ(i[0]);break;case"skew3d":t.skew3d(i[0],i[1],i[2]);break;case"m":case"matrix":t.multiply([i[0],i[1],i[2],i[3],i[4],i[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new be(i)),t.matrix4.toMatrix(t);break}return""}),t}function Ge(n,t,e){const r=new Zt;return r.rotate(ee(n)),r.transformPoint({x:t,y:e})}function hl(n){const t=typeof n?.x=="number"?n?.x:0,e=typeof n?.y=="number"?n?.y:0,r=typeof n?.degree=="number"?n?.degree:0,s=typeof n?.scalarX=="number"?n?.scalarX:1,i=typeof n?.scalarY=="number"?n?.scalarY:1,o=wt(r),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*s,c*s,-c*i,a*i,t,e]);return h.multiplySelf(new DOMMatrix(n?.originMatrix||"")),h}function uA(n,t){const e=new Path2D(n),r=new Path2D;return r.addPath(e,hl(t)),r}const L0={map:new Map,transform:function(n){if(Ob)return n;if(this.map.has(n))return this.map.get(n);const t=new OffscreenCanvas(n.width,n.height);return t.getContext("2d")?.drawImage(n,0,0),this.map.set(n,t),t},clear:function(){this.map.clear()}};function lA(n,t,e){const r=new OffscreenCanvas(n,t),s=r.getContext("2d");if(s)return e(s),r.transferToImageBitmap()}function fA(n,t,e){const r=n.createPattern(L0.transform(t),"no-repeat");if(r){const s=hl(e);r.setTransform(s),n.fillStyle=r}}const ul=["","-webkit-","-moz-","-o-","-ms-"];function ll(n,t){const e=t.x||0,r=t.y||0,s=t.z||0;ps(n,"transform",`translate(${e}px, ${r}px) translateZ(${s}px)`)}function dA(n,t){const e=t?.easingFn||X.Linear.None,r=t?.duration||0,s=t?.delay||0,i=Pr(),o=i+r;let a=0,c=0;const h=t.deltaX,u=t.deltaY;function l(){const d=Pr();if(d>=o){ll(n,{x:h-a,y:u-c});return}const f=(d-i)/r,p=e(f),m=h*p,b=u*p;ll(n,{x:m-a,y:b-c}),a=m,c=b,Pi(l)}setTimeout(()=>{l()},s)}const mA=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"};function N0(n){return window.URL.createObjectURL(n)}function pA(n){return window.URL.revokeObjectURL(n)}function fl(n){let t=!1;function e(){/loaded|complete/.test(document.readyState)&&!t&&(o(),n(),t=!0)}const r=Ct(document,"DOMContentLoaded",e),s=Ct(window,"load",e),i=setInterval(e,100),o=()=>{clearInterval(i),r?.(),s?.()};return o}function z0(n){return Ct(window,"beforeunload",t=>{n(t)})}async function gA(n,t=6e4){return new Promise((e,r)=>{const s=document.createElement("script");s.type="text/javascript",s.async=!1,s.onload=o=>{clearTimeout(i),e(o),s.onerror=s.onload=null},s.onerror=o=>{clearTimeout(i),r(o)},s.src=n;const i=setTimeout(()=>{r("Timeout!")},t);document.body.appendChild(s)})}function dl(n,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click()}async function yA(n,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((r,s)=>{const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.onload=a=>{clearTimeout(o),r(a),i.onerror=i.onload=null},i.onerror=a=>{clearTimeout(o),s(a)},i.setAttribute("href",n);const o=setTimeout(()=>{s("Timeout!")},e);t.appendChild(i)})}function bA(){return new Promise(n=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const r=()=>e>=t.length?(n(),!0):!1;r()||t.forEach(s=>{s.onload=()=>{e+=1,r()}})})}const V0=new ka({max:1e3});async function F0(n,t=6e4){return new Promise((e,r)=>{const s=typeof n=="string"?n:N0(n),i=V0.get(s);if(i)return e(i);const o=setTimeout(()=>{r("Timeout!")},t),a=document.createElement("img");a.onload=()=>{clearTimeout(o),a.onerror=a.onload=null;const c=a.naturalWidth||a.width,h=a.naturalHeight||a.height,u={width:c,height:h,aspectRatio:c/h,element:a,imageData:em(a)};V0.set(s,u),e(u)},a.onerror=c=>{clearTimeout(o),r(c)},a.src=s})}async function B0(n=Ae.text,t=["*"]){const r=(await yc(t))[0],s=await ds(r,n);return{type:r.type,name:r.name,size:r.size,data:s}}async function vA(n=["image/*"]){const e=(await yc(n))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const r=await ds(e,Ae.arraybuffer),s=Pa(r),i=await F0(s);return{type:e.type,name:e.name,size:e.size,data:r,width:i.width,height:i.height,aspectRatio:i.aspectRatio,imageData:i.imageData}}function wA(){return window.getSelection()?.toString()||""}function xA(n){document.getElementsByTagName("title")[0].innerText=n,document.title=n}function SA(n=200){"vibrate"in navigator?window.navigator.vibrate(n):console.error("Your device is not support vibrate on this browser.")}async function _A(n){if(navigator.clipboard)return await navigator.clipboard.writeText(n);{const t=document.createElement("textarea");return t.value=n,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function EA(n=0,t=0){window.scrollTo(n,t)}function CA(){let n=lf,t=lf;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",n=z0(()=>{window.history.scrollRestoration="auto"}),t=fl(()=>{window.history.scrollRestoration="manual"})),()=>{n(),t()}}function TA(n){return/(html|body)/i.test(n.tagName)||n===document.documentElement}const PA=n=>n===document.activeElement&&(n.type||n.href);function ml(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function AA(n){return n*ml()}function MA(n){return n.parentElement?parseFloat(getComputedStyle(n.parentElement).fontSize):ml()}const DA=n=>{let t=n;for(;t&&t.nodeType!==1;){const e=t.parentElement||n.parentNode;if(!e)break;t=e}return t},OA=n=>n.parentElement,pl=(n,t=[])=>!n||n.parentElement===null&&n.parentNode===null?t:pl(n.parentElement,t.concat([n]));function IA(n){const t=pl(n);for(let e=0,r=t.length;e<r;e++)if(/(auto|scroll)/.test(ms(t[e],"overflow")+ms(t[e],"overflow-y")+ms(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const RA=(n,t)=>n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16),kA=n=>Array.prototype.slice.call(n.parentElement?.children).filter(t=>t!==n),LA=n=>n.nextElementSibling,NA=n=>n.previousElementSibling,zA=(n,t)=>n.closest(t),VA=n=>n.shadowRoot,si=n=>n.tagName==="INPUT"||n instanceof HTMLInputElement,gl=n=>n.tagName==="SELECT"||n instanceof HTMLSelectElement,FA=n=>n.tagName==="TEXTAREA"||n instanceof HTMLTextAreaElement,yl=n=>si(n)&&n.getAttribute("type")==="checkbox",bl=n=>si(n)&&n.getAttribute("type")==="radio",BA=n=>si(n)&&n.getAttribute("type")==="text",$A=n=>si(n)&&n.getAttribute("type")==="number";function UA(n,t){if(gl(n)){const e=n.options;for(let r=0,s=e.length;r<s;r++)e[r].selected=e[r].value==t}}function YA(n,t){if(bl(n)){const e=document.getElementsByName(n.name);for(let r=0,s=e.length;r<s;r++){const i=e[r];i.checked=i.value==t}}}function jA(n,t){yl(n)&&(n.checked=t)}function ts(n,t,e="append"){typeof t=="string"?n[e](G0(t)):n[e](t)}function $0(n,t){if(typeof t=="string"){n.innerHTML=t;const e=W0(n);e!=n&&(n=e)}else ts(t,"replaceWith")}const U0=function(n){$0(n,"")},GA=(n,t)=>{n.textContent=t},XA=n=>{if(n instanceof SVGElement)return"";let t=n.innerText;if(!t){const e=n.querySelector("slot")?.assignedNodes()||[];let r=0;for(;!t&&r<=e.length-1;)"innerText"in e[r]&&(t=e[r].innerText),r++}return t},WA=n=>n.remove();function HA(n,t){ms(n,"display")=="none"&&t===void 0||t===!0?Y0(n):j0(n)}function Y0(n){Or(n,"display",n instanceof HTMLTableRowElement?"table-row":n instanceof HTMLTableCellElement?"table-cell":"block")}function j0(n){Or(n,"display","none")}function vl(n,t,e="toggle"){const r=t.split(/[,\s]+/);if(n.classList)r.forEach(s=>{const i=s.trim();i!==""&&n.classList[e](i)});else{const s=n.className.split(/ +/);let i=!1;r.forEach(o=>{const a=o.trim();if(a!==""){const c=s.indexOf(a);switch(e){case"add":c===-1&&(s.push(a),i=!0);break;case"remove":c!==-1&&(s.splice(c,1),i=!0);break;case"toggle":c===-1?s.push(a):s.splice(c,1),i=!0;break}}}),i&&sr(n,"class",s.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function qA(n,t){vl(n,t,"add")}function KA(n,t){vl(n,t,"remove")}function JA(n,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(n.className)}function G0(n,t=!1){const e=document.createElement("template");return e.innerHTML=n,t&&e.content.childNodes.forEach(r=>{const s=W0(r);s!=r&&e.content.replaceChild(s,r)}),e.content}function X0(n){return document.createElement.call(document,n)}function ZA(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function QA(n){return document.createTextNode.call(document,n)}function W0(n){return n.tagName=="SCRIPT"&&(n=H0(n)),n.querySelectorAll&&n.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(H0(t),t)}),n}function H0(n){const t=n.ownerDocument.createElement("script");t.text=n.text;const e=n.attributes;for(let r=0,s=e.length;r<s;r++)t.setAttribute(e[r].name,e[r].value);return t}function tM(n,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(n,t)},4e3),setTimeout(function(){e.remove()},6e3)}function eM(n){const t=new Proxy(window,{get(e,r,s){if(typeof r=="string"&&["open","location","document"].includes(r))throw new Error(`禁止访问 key: ${r}`);return r==="window"?t:Reflect.get(e,r,s)},set(e,r,s,i){return Reflect.set(e,r,s,i)}});new Function("window",`with(window) { ${n} }`)(t,null)}function nM(n){return n=n.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),n="echo(`"+n+"`);",`(function parse(data){
115
115
  let output = "";
116
116
  function echo(html){
117
117
  output += html;
118
118
  }
119
119
  ${n}
120
120
  return output;
121
- })`}class ii{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),r=document.createElement("video"),s=document.createElement("source"),i=new MediaSource;i.addEventListener("sourceopen",()=>t(!0)),s.src=URL.createObjectURL(i),s.media="(min-width:10px)",r.append(s),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(r),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{ii.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}async function H0(n,t){return new Promise(e=>{const r=new ResizeObserver(s=>{const i=n.getBoundingClientRect();t(i),e(()=>{r.unobserve(n)})});r.observe(n)})}function vl(n=document.documentElement,t){return new Nt(e=>{const r=n.getBoundingClientRect();let s=r.x,i=r.y,o=r.width,a=r.height;e.next(r);const c=new ResizeObserver(h=>{const u=n.getBoundingClientRect();(s!=u.x||i!=u.y||o!=u.width||a!=u.height)&&(s=u.x,i=u.y,o=u.width,a=u.height,e.next(u))});return c.observe(n,t),()=>{c.unobserve(n),c.disconnect()}})}function nM(){return it(window,"orientationchange"in window?"orientationchange":"resize").pipe(zt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),ar({width:window.innerWidth,height:window.innerHeight}))}let ia=null,wl=null;function rM(){return ia?Promise.resolve(ia):(wl||(wl=Promise.resolve().then(()=>AD).then(n=>(ia=n.default??n,ia))),wl)}function Vt(n){return new sM(n)}class sM{constructor(t){this.el=t,this.load()}instance=null;pending=[];async load(){const t=await rM();this.instance=new t(this.el),this.pending.forEach(([e,r])=>{this.instance.on(e,r)}),this.pending=[]}on(t,e){this.instance?this.instance.on(t,e):this.pending.push([t,e])}off(t,e){this.instance?.off(t,e)}destroy(){this.pending=[],this.instance?.destroy(),this.instance=null}}function iM(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function oM(){return!!window.PointerEvent}function aM(n,t){let e=document.createElement(n);t="on"+t;let r=t in e;return r||(e.setAttribute(t,"return;"),r=typeof e[t]=="function"),e=null,r}function xl(){return{x:0,y:0,isDown:!1}}function wr(){const n=xl(),t=xl();return{start:n,current:t,setStart:function(e,r){n.x=e.x,n.y=e.y,n.isDown=typeof r=="boolean"?r:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,r)},setCurrent:(e,r)=>{t.x=e.x,t.y=e.y,t.isDown=typeof r=="boolean"?r:typeof e.isDown=="boolean"?e.isDown:!1}}}function oa(n=document.documentElement,t=!1){return it(n,"mousemove",t)}function q0(n=document.documentElement,t=!1){return it(n,"mousedown",t)}function K0(n=document.documentElement,t=!1){return it(n,"mouseup",t)}function cM(n=document.documentElement,t=!1){return it(n,"mouseover",t)}function hM(n=document.documentElement,t=!1){return it(n,"mouseout",t)}function uM(n=document.documentElement,t=!1){return it(n,"mouseenter",t)}function lM(n=document.documentElement,t=!1){return it(n,"mouseleave",t)}function fM(n=document.documentElement,t=!1){return it(n,"click",t)}function dM(n=document.documentElement,t=!1){return it(n,"dblclick",t)}function mM(n=document.documentElement,t=!1){return it(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function pM(n=document.documentElement,t=!1){return it(n,"contextmenu",t)}function J0(n=document.documentElement,t=!1){return it(n,"touchmove",t)}function Z0(n=document.documentElement,t=!1){return it(n,"touchstart",t)}function Q0(n=document.documentElement,t=!1){return it(n,"touchend",t)}function ty(n=document.documentElement,t=!1){return it(n,"touchcancel",t)}function Sl(n=document.documentElement,t=!1){return it(n,"pointermove",t)}function _l(n=document.documentElement,t=!1){return it(n,"pointerdown",t)}function El(n=document.documentElement,t=!1){return it(n,"pointerup",t)}function Cl(n=document.documentElement,t=!1){return it(n,"pointercancel",t)}function gM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function yM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panmove",e)},e=>{t.off("panmove",e),t.destroy()})}function bM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panstart",e)},e=>{t.off("panstart",e),t.destroy()})}function vM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panend",e)},e=>{t.off("panend",e),t.destroy()})}function wM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e),t.destroy()})}function xM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panleft",e)},e=>{t.off("panleft",e),t.destroy()})}function SM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panright",e)},e=>{t.off("panright",e),t.destroy()})}function _M(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panup",e)},e=>{t.off("panup",e),t.destroy()})}function EM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pandown",e)},e=>{t.off("pandown",e),t.destroy()})}function CM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pinch",e)},e=>{t.off("pinch",e),t.destroy()})}function TM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e),t.destroy()})}function PM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e),t.destroy()})}function AM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("press",e)},e=>{t.off("press",e),t.destroy()})}function MM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("rotate",e)},e=>{t.off("rotate",e),t.destroy()})}function DM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipe",e)},e=>{t.off("swipe",e),t.destroy()})}function OM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e),t.destroy()})}function IM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e),t.destroy()})}function RM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e),t.destroy()})}function kM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e),t.destroy()})}function ey(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("tap",e)},e=>{t.off("tap",e),t.destroy()})}function LM(n=document.documentElement){const t=Vt(document.documentElement);return kt(e=>{const r=s=>{!s.target||n==s.target||n.contains(s.target)||e(s)};return t.on("tap",r),r},(e,r)=>{t.off("tap",r),t.destroy()})}function NM(n=document.documentElement,t=!1){return it(n,"transitionstart",t)}function zM(n=document.documentElement,t=!1){return qi(it(n,"transitionend",t),it(n,"webkitTransitionEnd",t),it(n,"oTransitionEnd",t),it(n,"MSTransitionEnd",t))}function VM(n=document.documentElement,t=!1){return it(n,"animationstart",t)}function FM(n=document.documentElement,t=!1){return it(n,"animationend",t)}function ny(n=document.documentElement,t=!1){return it(n,"drag",t)}function ry(n=document.documentElement,t=!1){return it(n,"dragstart",t)}function sy(n=document.documentElement,t=!1){return it(n,"dragend",t)}function iy(n=document.documentElement,t=!1){return it(n,"drop",t)}function oy(n=document.documentElement,t=!1){return it(n,"dragenter",t)}function ay(n=document.documentElement,t=!1){return it(n,"dragleave",t)}function cy(n=document.documentElement,t=!1){return it(n,"dragover",t)}function hy(n=document.documentElement,t=!1){return it(n,"keydown",t)}function uy(n=document.documentElement,t=!1){return it(n,"keyup",t)}function BM(n=document.documentElement,t=!1){return it(n,"keypress",t)}function $M(n,t=!1){return it(n,"change",t)}function UM(n,t=!1){return it(n,"submit",t)}function YM(n=10){return it(window,"scroll",!0).pipe(Zx(n))}function jM(){return it(document,"visibilitychange",!0).pipe(zt(()=>document.visibilityState==="visible"),Dn())}function GM(){return it(window,"storage",!1)}function XM(){return qi(it(window,"online",!1),it(window,"offline",!1)).pipe(zt(()=>navigator.onLine),ar(navigator.onLine),Dn(),Zd({bufferSize:1,refCount:!0}))}function WM(n=document.documentElement,t){const e=t?.createMousePoint||wr();return oa(n).pipe(zt(r=>(e.setCurrent(Gt(r,n)),e)))}function ly(n=document.documentElement,t){const e=t?.createMousePoint||wr();return oa(n).pipe(Qx(q0(n).pipe(cr(r=>{e.setStart(Gt(r,n),!0),t?.start?.(r,e)})),()=>K0(n).pipe(cr(r=>{e.setCurrent(Gt(r,n),!1),t?.end?.(r,e)}))),Kx(),zt(r=>(e.setCurrent(Gt(r,n),!0),e)))}function fy(n=document.documentElement,t){const e=t?.createMousePoint||wr();return Z0(n).pipe(cr(r=>{const s=r.changedTouches[0];e.setStart(Gt(s,n),!0),t?.start?.(s,e)}),Ji(()=>J0(n).pipe(Vc(Ki(Q0(n),ty(n)).pipe(cr(r=>{const s=r.changedTouches[0];e.setCurrent(Gt(s,n),!1),t?.end?.(s,e)}))))),zt(r=>{const s=r.changedTouches[0];return e.setCurrent(Gt(s,n),!0),e}))}function aa(n=document.documentElement,t){const e=t?.createMousePoint||wr();return _l(n).pipe(cr(r=>{e.setStart(Gt(r,n),!0),t?.start?.(r,e)}),Ji(()=>Sl(n).pipe(Vc(Ki(El(n),Cl(n)).pipe(cr(r=>{e.setCurrent(Gt(r,n),!1),t?.end?.(r,e)}))))),zt(r=>(e.setCurrent(Gt(r,n),!0),e)))}function HM(n=document.documentElement,t){return Ki(ly(n,t),fy(n,t))}function dy(n=document.documentElement,t){const e=t?.createMousePoint||wr();return qi(oa(n),_l(n)).pipe(Jd(r=>r instanceof PointerEvent?(e.setStart(Gt(r,n),!0),t?.start?.(r,e),Sl(n).pipe(Vc(Ki(El(n),Cl(n)).pipe(cr(s=>{e.setCurrent(Gt(s,n),!1),t?.end?.(s,e)}))))):r instanceof MouseEvent?xx(r):Rd),zt(r=>(e.setCurrent(Gt(r,n),r instanceof PointerEvent),e)))}function qM(n){return new Nt(t=>aa(n,{start:()=>{t.next(0)}}).subscribe(r=>{t.next(r.current.y-r.start.y)}).unsubscribe).pipe(Dn())}function KM(n,t){sr(n,"draggable","true");const e=ry(n,!0).subscribe(i=>{On(i),Qd(i);const o=i.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(i)}),r=ny(n).subscribe(i=>{On(i),t?.onDrag?.(i)}),s=sy(n).subscribe(i=>{On(i),t?.onEnd?.(i)});return()=>{e.unsubscribe(),r.unsubscribe(),s.unsubscribe()}}function JM(n,t){const e=oy(n).subscribe(o=>{On(o),t?.onEnter?.(o)}),r=cy(n).subscribe(o=>{On(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),s=ay(n).subscribe(o=>{On(o),t?.onLeave?.(o)}),i=iy(n).subscribe(o=>{On(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe()}}function ZM(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenX:window.screenX,screenY:window.screenY,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset}}function es(){const n=document.documentElement||document.body;return{el:n,clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function my(){const{clientWidth:n,clientHeight:t,scrollLeft:e,scrollTop:r}=es();return{width:window.innerWidth||n,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||r}}function QM(){const{scrollWidth:n,scrollHeight:t,scrollLeft:e,scrollTop:r}=es();return{width:n,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||r}}function Tl(n){return n.getBoundingClientRect()}function t3(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function Pl(n){const{top:t,left:e,width:r,height:s}=n.getBoundingClientRect(),{scrollLeft:i,scrollTop:o}=es();return{x:e+i,y:t+o,width:r,height:s}}function e3(n){let t=n,e=0,r=0;for(;t!==null;)e+=t.offsetLeft,r+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:r,width:n.offsetWidth,height:n.offsetHeight}}function n3(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=es(),r=e-n;return r<=0?0:t/r*100}function r3(n){const t=my(),e=Tl(n);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function s3(n){if("center"in n){const t=n.center,e=Tl(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function Al(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=es();return{x:n.clientX+t,y:n.clientY+e}}function Gt(n,t){const e={x:0,y:0};if(t){const r=Al(n),s=Pl(t);e.x=st(r.x-s.x,0,s.width),e.y=st(r.y-s.y,0,s.height)}else{let r=0,s=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const i=n.currentTarget.getBoundingClientRect(),o=n.target.getBoundingClientRect();r=o.left-i.left,s=o.top-i.top}if("offsetX"in n)e.x=n.offsetX+r,e.y=n.offsetY+s;else{const i=Al(n),o=Pl(n.target);e.x=st(i.x-o.x+r,0,o.width),e.y=st(i.y-o.y+s,0,o.height)}}return e}function i3(n){let t=0;return n||(n=window.event),n.wheelDelta?(t=n.wheelDelta/120,window.opera&&(t=-t)):n.detail&&(t=-n.detail/3),t}function o3(n){if(document.implementation.hasFeature("MouseEvents","2.0"))return n.button;switch(n.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const a3={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function c3(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function py(n,t){const e=t.ctrl||!1,r=t.shift||!1,s=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&r===n.shiftKey&&s===n.altKey&&t.keys.map(i=>i.toLowerCase()).includes(n.key.toLowerCase())}function gy(n){return hy(n.target||document||window).pipe(Nc(t=>py(t,n)),zt(t=>{t.stopPropagation(),t.preventDefault()}))}function h3(n){return uy(n.target||document||window).pipe(Nc(t=>py(t,n)),zt(t=>{t.stopPropagation(),t.preventDefault()}))}function yy(n={keys:["o"]},t=Ae.text){return gy(n).pipe(Ji(async()=>await F0(t)))}async function u3(n={keys:["o"]},t=Ae.text){return _x(yy(n,t))}function l3(){const n={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,r){n.x=e.x,n.y=e.y,n.isDown=typeof r=="boolean"?r:!1,this.setCurrentMousePoint(e,r)},setCurrentMousePoint:(e,r)=>{const s=t.x,i=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-s,t.dy=t.y-i,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof r=="boolean"?r:!1}}}function f3(n=document.documentElement){const t=new Va,e=Vt(n);let r=[];const s=l3(),i=s.mousePoint,o=V=>{t.emit("mouseDown",V)},a=V=>{t.emit("mouseUp",V)},c=V=>{i.isDown||s.setCurrentMousePoint(Gt(V,n)),t.emit("mouseMove",V)},h=V=>{t.emit("mouseOver",V)},u=V=>{t.emit("mouseOut",V)},l=V=>{t.emit("mouseEnter",V)},d=V=>{t.emit("mouseLeave",V)},f=V=>{t.emit("mouseClick",V)},p=V=>{t.emit("mouseDoubleClick",V)},m=V=>{t.emit("mouseWheel",V)},b=V=>{t.emit("mouseContextMenu",V)},g=V=>{t.emit("touchStart",V)},w=V=>{t.emit("touchEnd",V)},x=V=>{t.emit("touchCancel",V)},v=V=>{const At=V.changedTouches[0];i.isDown||s.setCurrentMousePoint(Gt(At,n)),t.emit("touchMove",V)},E=V=>{t.emit("pointerDown",V)},_=V=>{t.emit("pointerUp",V)},D=V=>{t.emit("pointerCancel",V)},z=V=>{t.emit("pointerMove",V)},O=V=>{t.emit("pan",V)},L=V=>{t.emit("panStart",V)},$=V=>{t.emit("panMove",V)},j=V=>{t.emit("panEnd",V)},Q=V=>{t.emit("panCancel",V)},rt=V=>{t.emit("panLeft",V)},ot=V=>{t.emit("panRight",V)},nt=V=>{t.emit("panUp",V)},tt=V=>{t.emit("panDown",V)},bt=V=>{t.emit("pinch",V)},Y=V=>{t.emit("pinchin",V)},F=V=>{t.emit("pinchout",V)},A=V=>{t.emit("press",V)},N=V=>{t.emit("rotate",V)},H=V=>{t.emit("swipe",V)},K=V=>{t.emit("swipeLeft",V)},ct=V=>{t.emit("swipeRight",V)},ft=V=>{t.emit("swipeUp",V)},et=V=>{t.emit("swipeDown",V)},Tt=V=>{t.emit("tap",V)},lt=V=>{!V.target||n==V.target||n.contains(V.target)||t.emit("tapOutSide",V)},Mt=V=>{t.emit("transitionstart",V)},ke=V=>{t.emit("transitionend",V)},Xt=V=>{t.emit("animationstart",V)},Pe=V=>{t.emit("animationend",V)};let ve={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return ve},mousePoint:i,eb:t,start:async function(){r.push(Ct(n,"mousedown",o)),r.push(Ct(n,"mouseup",a)),r.push(Ct(n,"mousemove",c)),r.push(Ct(n,"mouseover",h)),r.push(Ct(n,"mouseout",u)),r.push(Ct(n,"mouseenter",l)),r.push(Ct(n,"mouseleave",d)),r.push(Ct(n,"click",f)),r.push(Ct(n,"dblclick",p)),r.push(Ct(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",m)),r.push(Ct(n,"contextmenu",b)),r.push(Ct(n,"touchstart",g)),r.push(Ct(n,"touchend",w)),r.push(Ct(n,"touchcancel",x)),r.push(Ct(n,"touchmove",v)),r.push(Ct(n,"pointerdown",E)),r.push(Ct(n,"pointerup",_)),r.push(Ct(n,"pointercancel",D)),r.push(Ct(n,"pointermove",z)),e.on("pan",O),e.on("panstart",L),e.on("panmove",$),e.on("panend",j),e.on("pancancel",Q),e.on("panleft",rt),e.on("panright",ot),e.on("panup",nt),e.on("pandown",tt),e.on("pinch",bt),e.on("pinchin",Y),e.on("pinchout",F),e.on("press",A),e.on("rotate",N),e.on("swipe",H),e.on("swipeleft",K),e.on("swiperight",ct),e.on("swipeup",ft),e.on("swipedown",et),e.on("tap",Tt),r.push(Ct(document,"pointerdown",lt)),r.push(Ct(n,"transitionstart",Mt)),r.push(Ct(n,"transitionend",ke)),r.push(Ct(n,"animationstart",Xt)),r.push(Ct(n,"animationend",Pe));const V=await H0(n,At=>{ve=At,t.emit("resize",At)});r.push(V),r.push(by(this,{start:At=>{s.setStartMousePoint(Gt(At,n),!0)},move:At=>{s.setCurrentMousePoint(Gt(At,n))},end:At=>{s.setCurrentMousePoint(Gt(At,n),!1)}}))},end:()=>{t.removeAllListeners(),r.forEach(V=>V()),r=[],e.off("pan",O),e.off("panstart",L),e.off("panmove",$),e.off("panend",j),e.off("pancancel",Q),e.off("panleft",rt),e.off("panright",ot),e.off("panup",nt),e.off("pandown",tt),e.off("pinch",bt),e.off("pinchin",Y),e.off("pinchout",F),e.off("press",A),e.off("rotate",N),e.off("swipe",H),e.off("swipeleft",K),e.off("swiperight",ct),e.off("swipeup",ft),e.off("swipedown",et),e.off("tap",Tt)}}}function by(n,t){return vy(n,t)}function vy(n,t){const e=n.eb,r=o=>{e.on("pointerMove",i),e.on("pointerUp",s),e.on("pointerCancel",s),t?.start?.(o)},s=o=>{e.off("pointerMove",i),e.off("pointerUp",s),e.off("pointerCancel",s),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("pointerDown",r),()=>e.off("pointerDown",r)}function d3(n,t){const e=n.eb,r=o=>{document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",s,!1),t?.start?.(o)},s=o=>{document.removeEventListener("mousemove",i,!1),document.removeEventListener("mouseup",s,!1),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("mouseDown",r),()=>e.off("mouseDown",r)}function m3(n,t){const e=n.eb,r=o=>{e.on("touchMove",i),e.on("touchEnd",s),e.on("touchCancel",s);const a=o.changedTouches[0];t?.start?.(a)},s=o=>{e.off("touchMove",i),e.off("touchEnd",s),e.off("touchCancel",s);const a=o.changedTouches[0];t?.end?.(a)},i=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",r),()=>e.off("touchStart",r)}function p3(n,t,e){if(typeof t=="string"&&(t=Jl(t)),(typeof t=="string"||t===void 0)&&e===void 0){const r=Object.assign({},n.dataset);return Object.keys(r).forEach(s=>{if(r[s]?.startsWith("[")||r[s]?.startsWith("{"))try{r[s]=JSON.parse(r[s]||"")}catch{}}),typeof t=="string"?r[t]:r}else{let r={};typeof t=="object"?r=t:typeof t=="string"&&(r[t]=e),Object.entries(r).forEach(([s,i])=>{i?n.dataset[s]=i instanceof Object?JSON.stringify(i):i:delete n.dataset[s]})}}function g3(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function wy(n,t={attributes:!0,childList:!0,subtree:!0}){return new Nt(e=>{const r=new MutationObserver((s,i)=>{e.next(s)});return r.observe(n,t),()=>{r.disconnect()}})}function y3(n,t){return new Promise(e=>{new MutationObserver((s,i)=>{for(const o of s)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(i.disconnect(),e(!0))})}).observe(n,{childList:!0})})}function xy(n,t={root:null}){return new Nt(e=>{const r=new IntersectionObserver((s,i)=>{if(s.length){const o=s[s.length-1];o&&e.next(o)}},t);return r.observe(n),()=>{r.unobserve(n),r.disconnect()}})}function b3(n,t){const e=t?.threshold??.5;return xy(n,{threshold:e,root:t?.root}).pipe(zt(r=>r.isIntersecting&&r.intersectionRatio>=e),Dn())}function Ml(n,t){const e=typeof n=="string"?n:n.toString(),r=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,JSON.stringify(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=ji(r(),t);return a().value},set:a=>{const{set:c}=ji(r(),t),h=c(a);s(h)}}}function v3(){window.sessionStorage.clear()}function Sy(){return wy(document).pipe(zt(()=>location),ar(location))}function w3(){return Sy().pipe(zt(n=>n.href),ar(location.href),Dn())}function x3(){return it(window,"hashchange").pipe(zt(n=>n.target.location.hash.replace("#","")),ar(window.location.hash.replace("#","")),Dn())}function _y(n="current"){return it(window,"popstate").pipe(zt(t=>t.state||{}),zt(t=>({...t,[n]:t[n]||window.location.pathname+window.location.search+window.location.hash})),Dn((t,e)=>t[n]===e[n]))}function S3(n={nameInState:"current",alreadyPushState:!0}){const t=n.nameInState,e=typeof n.alreadyPushState=="boolean"?n.alreadyPushState:!0,{get:r,set:s}=Ml("fe-route-history"),i=r()||[],{get:o,set:a}=Ml("fe-route-history-index"),c=o();let h=typeof c=="number"?c:i.length-1;function u(g){return i.findIndex(x=>x[t]===g[t])}const l={currentIndex:h};function d(g){g=st(g,-1,i.length-1),h<0?(l.direction="keep",l.delta=0):(g<h?l.direction="backward":g>h?l.direction="forward":l.direction="keep",l.delta=g-h),l.from=l.to,l.to=i[g]?.[t],h=g,l.currentIndex=h,a(h)}d(h);function f(g){i.push(g),s(i),d(i.length-1)}function p(g,w){const x={...w,[t]:g};window.history.pushState(x,"",g),f(x)}function m(g,w=e){const x=u(g);if(x<0){h>=0&&(i.splice(h+1),s(i)),w?f(g):p(g[t],g);return}x!=h&&d(x)}const b=_y().subscribe(g=>{m(g,!0)});return{history:i,route:l,navigate:(g,w)=>{m({...w,[t]:g},e)},go(g){window.history.go(g)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{b.unsubscribe()}}}function Ey(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return it(t,"change").pipe(zt(e=>e.matches),ar(t.matches),Dn())}let Cy=!1;function _3(){Cy||(Cy=!0,wd(`
121
+ })`}class ii{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),r=document.createElement("video"),s=document.createElement("source"),i=new MediaSource;i.addEventListener("sourceopen",()=>t(!0)),s.src=URL.createObjectURL(i),s.media="(min-width:10px)",r.append(s),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(r),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{ii.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}async function q0(n,t){return new Promise(e=>{const r=new ResizeObserver(s=>{const i=n.getBoundingClientRect();t(i),e(()=>{r.unobserve(n)})});r.observe(n)})}function wl(n=document.documentElement,t){return new Nt(e=>{const r=n.getBoundingClientRect();let s=r.x,i=r.y,o=r.width,a=r.height;e.next(r);const c=new ResizeObserver(h=>{const u=n.getBoundingClientRect();(s!=u.x||i!=u.y||o!=u.width||a!=u.height)&&(s=u.x,i=u.y,o=u.width,a=u.height,e.next(u))});return c.observe(n,t),()=>{c.unobserve(n),c.disconnect()}})}function rM(){return it(window,"orientationchange"in window?"orientationchange":"resize").pipe(zt(n=>({width:n.target.innerWidth,height:n.target.innerHeight})),ar({width:window.innerWidth,height:window.innerHeight}))}let ia=null,xl=null;function sM(){return ia?Promise.resolve(ia):(xl||(xl=Promise.resolve().then(()=>MD).then(n=>(ia=n.default??n,ia))),xl)}function Vt(n){return new iM(n)}class iM{constructor(t){this.el=t,this.load()}instance=null;pending=[];async load(){const t=await sM();this.instance=new t(this.el),this.pending.forEach(([e,r])=>{this.instance.on(e,r)}),this.pending=[]}on(t,e){this.instance?this.instance.on(t,e):this.pending.push([t,e])}off(t,e){this.instance?.off(t,e)}destroy(){this.pending=[],this.instance?.destroy(),this.instance=null}}function oM(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}function aM(){return!!window.PointerEvent}function cM(n,t){let e=document.createElement(n);t="on"+t;let r=t in e;return r||(e.setAttribute(t,"return;"),r=typeof e[t]=="function"),e=null,r}function Sl(){return{x:0,y:0,isDown:!1}}function wr(){const n=Sl(),t=Sl();return{start:n,current:t,setStart:function(e,r){n.x=e.x,n.y=e.y,n.isDown=typeof r=="boolean"?r:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,r)},setCurrent:(e,r)=>{t.x=e.x,t.y=e.y,t.isDown=typeof r=="boolean"?r:typeof e.isDown=="boolean"?e.isDown:!1}}}function oa(n=document.documentElement,t=!1){return it(n,"mousemove",t)}function K0(n=document.documentElement,t=!1){return it(n,"mousedown",t)}function J0(n=document.documentElement,t=!1){return it(n,"mouseup",t)}function hM(n=document.documentElement,t=!1){return it(n,"mouseover",t)}function uM(n=document.documentElement,t=!1){return it(n,"mouseout",t)}function lM(n=document.documentElement,t=!1){return it(n,"mouseenter",t)}function fM(n=document.documentElement,t=!1){return it(n,"mouseleave",t)}function dM(n=document.documentElement,t=!1){return it(n,"click",t)}function mM(n=document.documentElement,t=!1){return it(n,"dblclick",t)}function pM(n=document.documentElement,t=!1){return it(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function gM(n=document.documentElement,t=!1){return it(n,"contextmenu",t)}function Z0(n=document.documentElement,t=!1){return it(n,"touchmove",t)}function Q0(n=document.documentElement,t=!1){return it(n,"touchstart",t)}function ty(n=document.documentElement,t=!1){return it(n,"touchend",t)}function ey(n=document.documentElement,t=!1){return it(n,"touchcancel",t)}function _l(n=document.documentElement,t=!1){return it(n,"pointermove",t)}function El(n=document.documentElement,t=!1){return it(n,"pointerdown",t)}function Cl(n=document.documentElement,t=!1){return it(n,"pointerup",t)}function Tl(n=document.documentElement,t=!1){return it(n,"pointercancel",t)}function yM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function bM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panmove",e)},e=>{t.off("panmove",e),t.destroy()})}function vM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panstart",e)},e=>{t.off("panstart",e),t.destroy()})}function wM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panend",e)},e=>{t.off("panend",e),t.destroy()})}function xM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e),t.destroy()})}function SM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panleft",e)},e=>{t.off("panleft",e),t.destroy()})}function _M(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panright",e)},e=>{t.off("panright",e),t.destroy()})}function EM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("panup",e)},e=>{t.off("panup",e),t.destroy()})}function CM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pandown",e)},e=>{t.off("pandown",e),t.destroy()})}function TM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pinch",e)},e=>{t.off("pinch",e),t.destroy()})}function PM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e),t.destroy()})}function AM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e),t.destroy()})}function MM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("press",e)},e=>{t.off("press",e),t.destroy()})}function DM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("rotate",e)},e=>{t.off("rotate",e),t.destroy()})}function OM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipe",e)},e=>{t.off("swipe",e),t.destroy()})}function IM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e),t.destroy()})}function RM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e),t.destroy()})}function kM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e),t.destroy()})}function LM(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e),t.destroy()})}function ny(n=document.documentElement){const t=Vt(n);return kt(e=>{t.on("tap",e)},e=>{t.off("tap",e),t.destroy()})}function NM(n=document.documentElement){const t=Vt(document.documentElement);return kt(e=>{const r=s=>{!s.target||n==s.target||n.contains(s.target)||e(s)};return t.on("tap",r),r},(e,r)=>{t.off("tap",r),t.destroy()})}function zM(n=document.documentElement,t=!1){return it(n,"transitionstart",t)}function VM(n=document.documentElement,t=!1){return qi(it(n,"transitionend",t),it(n,"webkitTransitionEnd",t),it(n,"oTransitionEnd",t),it(n,"MSTransitionEnd",t))}function FM(n=document.documentElement,t=!1){return it(n,"animationstart",t)}function BM(n=document.documentElement,t=!1){return it(n,"animationend",t)}function ry(n=document.documentElement,t=!1){return it(n,"drag",t)}function sy(n=document.documentElement,t=!1){return it(n,"dragstart",t)}function iy(n=document.documentElement,t=!1){return it(n,"dragend",t)}function oy(n=document.documentElement,t=!1){return it(n,"drop",t)}function ay(n=document.documentElement,t=!1){return it(n,"dragenter",t)}function cy(n=document.documentElement,t=!1){return it(n,"dragleave",t)}function hy(n=document.documentElement,t=!1){return it(n,"dragover",t)}function uy(n=document.documentElement,t=!1){return it(n,"keydown",t)}function ly(n=document.documentElement,t=!1){return it(n,"keyup",t)}function $M(n=document.documentElement,t=!1){return it(n,"keypress",t)}function UM(n,t=!1){return it(n,"change",t)}function YM(n,t=!1){return it(n,"submit",t)}function jM(n=10){return it(window,"scroll",!0).pipe(Qx(n))}function GM(){return it(document,"visibilitychange",!0).pipe(zt(()=>document.visibilityState==="visible"),Dn())}function XM(){return it(window,"storage",!1)}function WM(){return qi(it(window,"online",!1),it(window,"offline",!1)).pipe(zt(()=>navigator.onLine),ar(navigator.onLine),Dn(),Qd({bufferSize:1,refCount:!0}))}function HM(n=document.documentElement,t){const e=t?.createMousePoint||wr();return oa(n).pipe(zt(r=>(e.setCurrent(Gt(r,n)),e)))}function fy(n=document.documentElement,t){const e=t?.createMousePoint||wr();return oa(n).pipe(t2(K0(n).pipe(cr(r=>{e.setStart(Gt(r,n),!0),t?.start?.(r,e)})),()=>J0(n).pipe(cr(r=>{e.setCurrent(Gt(r,n),!1),t?.end?.(r,e)}))),Jx(),zt(r=>(e.setCurrent(Gt(r,n),!0),e)))}function dy(n=document.documentElement,t){const e=t?.createMousePoint||wr();return Q0(n).pipe(cr(r=>{const s=r.changedTouches[0];e.setStart(Gt(s,n),!0),t?.start?.(s,e)}),Ji(()=>Z0(n).pipe(Vc(Ki(ty(n),ey(n)).pipe(cr(r=>{const s=r.changedTouches[0];e.setCurrent(Gt(s,n),!1),t?.end?.(s,e)}))))),zt(r=>{const s=r.changedTouches[0];return e.setCurrent(Gt(s,n),!0),e}))}function aa(n=document.documentElement,t){const e=t?.createMousePoint||wr();return El(n).pipe(cr(r=>{e.setStart(Gt(r,n),!0),t?.start?.(r,e)}),Ji(()=>_l(n).pipe(Vc(Ki(Cl(n),Tl(n)).pipe(cr(r=>{e.setCurrent(Gt(r,n),!1),t?.end?.(r,e)}))))),zt(r=>(e.setCurrent(Gt(r,n),!0),e)))}function qM(n=document.documentElement,t){return Ki(fy(n,t),dy(n,t))}function my(n=document.documentElement,t){const e=t?.createMousePoint||wr();return qi(oa(n),El(n)).pipe(Zd(r=>r instanceof PointerEvent?(e.setStart(Gt(r,n),!0),t?.start?.(r,e),_l(n).pipe(Vc(Ki(Cl(n),Tl(n)).pipe(cr(s=>{e.setCurrent(Gt(s,n),!1),t?.end?.(s,e)}))))):r instanceof MouseEvent?Sx(r):kd),zt(r=>(e.setCurrent(Gt(r,n),r instanceof PointerEvent),e)))}function KM(n){return new Nt(t=>aa(n,{start:()=>{t.next(0)}}).subscribe(r=>{t.next(r.current.y-r.start.y)}).unsubscribe).pipe(Dn())}function JM(n,t){sr(n,"draggable","true");const e=sy(n,!0).subscribe(i=>{On(i),tm(i);const o=i.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(i)}),r=ry(n).subscribe(i=>{On(i),t?.onDrag?.(i)}),s=iy(n).subscribe(i=>{On(i),t?.onEnd?.(i)});return()=>{e.unsubscribe(),r.unsubscribe(),s.unsubscribe()}}function ZM(n,t){const e=ay(n).subscribe(o=>{On(o),t?.onEnter?.(o)}),r=hy(n).subscribe(o=>{On(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),s=cy(n).subscribe(o=>{On(o),t?.onLeave?.(o)}),i=oy(n).subscribe(o=>{On(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe()}}function QM(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenX:window.screenX,screenY:window.screenY,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset}}function es(){const n=document.documentElement||document.body;return{el:n,clientWidth:n.clientWidth,clientHeight:n.clientHeight,clientTop:n.clientTop,clientLeft:n.clientLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,offsetWidth:n.offsetWidth,offsetHeight:n.offsetHeight,offsetTop:n.offsetTop,offsetLeft:n.offsetLeft,offsetParent:n.offsetParent}}function py(){const{clientWidth:n,clientHeight:t,scrollLeft:e,scrollTop:r}=es();return{width:window.innerWidth||n,height:window.innerHeight||t,x:window.pageXOffset||e,y:window.pageYOffset||r}}function t3(){const{scrollWidth:n,scrollHeight:t,scrollLeft:e,scrollTop:r}=es();return{width:n,height:t,scrollX:window.pageXOffset||e,scrollY:window.pageYOffset||r}}function Pl(n){return n.getBoundingClientRect()}function e3(n){return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}function Al(n){const{top:t,left:e,width:r,height:s}=n.getBoundingClientRect(),{scrollLeft:i,scrollTop:o}=es();return{x:e+i,y:t+o,width:r,height:s}}function n3(n){let t=n,e=0,r=0;for(;t!==null;)e+=t.offsetLeft,r+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:r,width:n.offsetWidth,height:n.offsetHeight}}function r3(){const{clientHeight:n,scrollTop:t,scrollHeight:e}=es(),r=e-n;return r<=0?0:t/r*100}function s3(n){const t=py(),e=Pl(n);return e.bottom>=0&&e.top<=t.height&&e.right>=0&&e.left<=t.width}function i3(n){if("center"in n){const t=n.center,e=Pl(n.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:n.clientX,y:n.clientY}}function Ml(n){if("center"in n)return n.center;if(typeof n.pageX=="number"&&typeof n.pageY=="number")return{x:n.pageX,y:n.pageY};const{scrollLeft:t,scrollTop:e}=es();return{x:n.clientX+t,y:n.clientY+e}}function Gt(n,t){const e={x:0,y:0};if(t){const r=Ml(n),s=Al(t);e.x=st(r.x-s.x,0,s.width),e.y=st(r.y-s.y,0,s.height)}else{let r=0,s=0;if("currentTarget"in n&&n.currentTarget&&n.target&&n.currentTarget!=n.target){const i=n.currentTarget.getBoundingClientRect(),o=n.target.getBoundingClientRect();r=o.left-i.left,s=o.top-i.top}if("offsetX"in n)e.x=n.offsetX+r,e.y=n.offsetY+s;else{const i=Ml(n),o=Al(n.target);e.x=st(i.x-o.x+r,0,o.width),e.y=st(i.y-o.y+s,0,o.height)}}return e}function o3(n){let t=0;return n||(n=window.event),n.wheelDelta?(t=n.wheelDelta/120,window.opera&&(t=-t)):n.detail&&(t=-n.detail/3),t}function a3(n){if(document.implementation.hasFeature("MouseEvents","2.0"))return n.button;switch(n.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const c3={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function h3(n){if(n.key)return n.key;if(n.keyCode)return n.keyCode;if(n.which)return n.which}function gy(n,t){const e=t.ctrl||!1,r=t.shift||!1,s=t.alt||!1;return(e===n.metaKey||e===n.ctrlKey)&&r===n.shiftKey&&s===n.altKey&&t.keys.map(i=>i.toLowerCase()).includes(n.key.toLowerCase())}function yy(n){return uy(n.target||document||window).pipe(Nc(t=>gy(t,n)),zt(t=>{t.stopPropagation(),t.preventDefault()}))}function u3(n){return ly(n.target||document||window).pipe(Nc(t=>gy(t,n)),zt(t=>{t.stopPropagation(),t.preventDefault()}))}function by(n={keys:["o"]},t=Ae.text){return yy(n).pipe(Ji(async()=>await B0(t)))}async function l3(n={keys:["o"]},t=Ae.text){return Ex(by(n,t))}function f3(){const n={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,r){n.x=e.x,n.y=e.y,n.isDown=typeof r=="boolean"?r:!1,this.setCurrentMousePoint(e,r)},setCurrentMousePoint:(e,r)=>{const s=t.x,i=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-s,t.dy=t.y-i,t.dStartX=t.x-n.x,t.dStartY=t.y-n.y,t.isDown=typeof r=="boolean"?r:!1}}}function d3(n=document.documentElement){const t=new Va,e=Vt(n);let r=[];const s=f3(),i=s.mousePoint,o=V=>{t.emit("mouseDown",V)},a=V=>{t.emit("mouseUp",V)},c=V=>{i.isDown||s.setCurrentMousePoint(Gt(V,n)),t.emit("mouseMove",V)},h=V=>{t.emit("mouseOver",V)},u=V=>{t.emit("mouseOut",V)},l=V=>{t.emit("mouseEnter",V)},d=V=>{t.emit("mouseLeave",V)},f=V=>{t.emit("mouseClick",V)},p=V=>{t.emit("mouseDoubleClick",V)},m=V=>{t.emit("mouseWheel",V)},b=V=>{t.emit("mouseContextMenu",V)},g=V=>{t.emit("touchStart",V)},w=V=>{t.emit("touchEnd",V)},x=V=>{t.emit("touchCancel",V)},v=V=>{const At=V.changedTouches[0];i.isDown||s.setCurrentMousePoint(Gt(At,n)),t.emit("touchMove",V)},E=V=>{t.emit("pointerDown",V)},_=V=>{t.emit("pointerUp",V)},D=V=>{t.emit("pointerCancel",V)},z=V=>{t.emit("pointerMove",V)},O=V=>{t.emit("pan",V)},L=V=>{t.emit("panStart",V)},$=V=>{t.emit("panMove",V)},j=V=>{t.emit("panEnd",V)},Q=V=>{t.emit("panCancel",V)},rt=V=>{t.emit("panLeft",V)},ot=V=>{t.emit("panRight",V)},nt=V=>{t.emit("panUp",V)},tt=V=>{t.emit("panDown",V)},bt=V=>{t.emit("pinch",V)},Y=V=>{t.emit("pinchin",V)},F=V=>{t.emit("pinchout",V)},A=V=>{t.emit("press",V)},N=V=>{t.emit("rotate",V)},H=V=>{t.emit("swipe",V)},K=V=>{t.emit("swipeLeft",V)},ct=V=>{t.emit("swipeRight",V)},ft=V=>{t.emit("swipeUp",V)},et=V=>{t.emit("swipeDown",V)},Tt=V=>{t.emit("tap",V)},lt=V=>{!V.target||n==V.target||n.contains(V.target)||t.emit("tapOutSide",V)},Mt=V=>{t.emit("transitionstart",V)},ke=V=>{t.emit("transitionend",V)},Xt=V=>{t.emit("animationstart",V)},Pe=V=>{t.emit("animationend",V)};let ve={...n.getBoundingClientRect(),width:n.offsetWidth,height:n.offsetHeight};return{el:n,get rect(){return ve},mousePoint:i,eb:t,start:async function(){r.push(Ct(n,"mousedown",o)),r.push(Ct(n,"mouseup",a)),r.push(Ct(n,"mousemove",c)),r.push(Ct(n,"mouseover",h)),r.push(Ct(n,"mouseout",u)),r.push(Ct(n,"mouseenter",l)),r.push(Ct(n,"mouseleave",d)),r.push(Ct(n,"click",f)),r.push(Ct(n,"dblclick",p)),r.push(Ct(n,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",m)),r.push(Ct(n,"contextmenu",b)),r.push(Ct(n,"touchstart",g)),r.push(Ct(n,"touchend",w)),r.push(Ct(n,"touchcancel",x)),r.push(Ct(n,"touchmove",v)),r.push(Ct(n,"pointerdown",E)),r.push(Ct(n,"pointerup",_)),r.push(Ct(n,"pointercancel",D)),r.push(Ct(n,"pointermove",z)),e.on("pan",O),e.on("panstart",L),e.on("panmove",$),e.on("panend",j),e.on("pancancel",Q),e.on("panleft",rt),e.on("panright",ot),e.on("panup",nt),e.on("pandown",tt),e.on("pinch",bt),e.on("pinchin",Y),e.on("pinchout",F),e.on("press",A),e.on("rotate",N),e.on("swipe",H),e.on("swipeleft",K),e.on("swiperight",ct),e.on("swipeup",ft),e.on("swipedown",et),e.on("tap",Tt),r.push(Ct(document,"pointerdown",lt)),r.push(Ct(n,"transitionstart",Mt)),r.push(Ct(n,"transitionend",ke)),r.push(Ct(n,"animationstart",Xt)),r.push(Ct(n,"animationend",Pe));const V=await q0(n,At=>{ve=At,t.emit("resize",At)});r.push(V),r.push(vy(this,{start:At=>{s.setStartMousePoint(Gt(At,n),!0)},move:At=>{s.setCurrentMousePoint(Gt(At,n))},end:At=>{s.setCurrentMousePoint(Gt(At,n),!1)}}))},end:()=>{t.removeAllListeners(),r.forEach(V=>V()),r=[],e.off("pan",O),e.off("panstart",L),e.off("panmove",$),e.off("panend",j),e.off("pancancel",Q),e.off("panleft",rt),e.off("panright",ot),e.off("panup",nt),e.off("pandown",tt),e.off("pinch",bt),e.off("pinchin",Y),e.off("pinchout",F),e.off("press",A),e.off("rotate",N),e.off("swipe",H),e.off("swipeleft",K),e.off("swiperight",ct),e.off("swipeup",ft),e.off("swipedown",et),e.off("tap",Tt)}}}function vy(n,t){return wy(n,t)}function wy(n,t){const e=n.eb,r=o=>{e.on("pointerMove",i),e.on("pointerUp",s),e.on("pointerCancel",s),t?.start?.(o)},s=o=>{e.off("pointerMove",i),e.off("pointerUp",s),e.off("pointerCancel",s),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("pointerDown",r),()=>e.off("pointerDown",r)}function m3(n,t){const e=n.eb,r=o=>{document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",s,!1),t?.start?.(o)},s=o=>{document.removeEventListener("mousemove",i,!1),document.removeEventListener("mouseup",s,!1),t?.end?.(o)},i=o=>{t?.move?.(o)};return e.on("mouseDown",r),()=>e.off("mouseDown",r)}function p3(n,t){const e=n.eb,r=o=>{e.on("touchMove",i),e.on("touchEnd",s),e.on("touchCancel",s);const a=o.changedTouches[0];t?.start?.(a)},s=o=>{e.off("touchMove",i),e.off("touchEnd",s),e.off("touchCancel",s);const a=o.changedTouches[0];t?.end?.(a)},i=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",r),()=>e.off("touchStart",r)}function g3(n,t,e){if(typeof t=="string"&&(t=Zl(t)),(typeof t=="string"||t===void 0)&&e===void 0){const r=Object.assign({},n.dataset);return Object.keys(r).forEach(s=>{if(r[s]?.startsWith("[")||r[s]?.startsWith("{"))try{r[s]=JSON.parse(r[s]||"")}catch{}}),typeof t=="string"?r[t]:r}else{let r={};typeof t=="object"?r=t:typeof t=="string"&&(r[t]=e),Object.entries(r).forEach(([s,i])=>{i?n.dataset[s]=i instanceof Object?JSON.stringify(i):i:delete n.dataset[s]})}}function y3(n,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete n.dataset[e.trim()]})}function xy(n,t={attributes:!0,childList:!0,subtree:!0}){return new Nt(e=>{const r=new MutationObserver((s,i)=>{e.next(s)});return r.observe(n,t),()=>{r.disconnect()}})}function b3(n,t){return new Promise(e=>{new MutationObserver((s,i)=>{for(const o of s)o.type==="childList"&&o.addedNodes.forEach(a=>{a.isEqualNode(t)&&(i.disconnect(),e(!0))})}).observe(n,{childList:!0})})}function Sy(n,t={root:null}){return new Nt(e=>{const r=new IntersectionObserver((s,i)=>{if(s.length){const o=s[s.length-1];o&&e.next(o)}},t);return r.observe(n),()=>{r.unobserve(n),r.disconnect()}})}function v3(n,t){const e=t?.threshold??.5;return Sy(n,{threshold:e,root:t?.root}).pipe(zt(r=>r.isIntersecting&&r.intersectionRatio>=e),Dn())}function Dl(n,t){const e=typeof n=="string"?n:n.toString(),r=()=>{try{const a=window.sessionStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.sessionStorage.setItem(e,JSON.stringify(a)):window.sessionStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=ji(r(),t);return a().value},set:a=>{const{set:c}=ji(r(),t),h=c(a);s(h)}}}function w3(){window.sessionStorage.clear()}function _y(){return xy(document).pipe(zt(()=>location),ar(location))}function x3(){return _y().pipe(zt(n=>n.href),ar(location.href),Dn())}function S3(){return it(window,"hashchange").pipe(zt(n=>n.target.location.hash.replace("#","")),ar(window.location.hash.replace("#","")),Dn())}function Ey(n="current"){return it(window,"popstate").pipe(zt(t=>t.state||{}),zt(t=>({...t,[n]:t[n]||window.location.pathname+window.location.search+window.location.hash})),Dn((t,e)=>t[n]===e[n]))}function _3(n={nameInState:"current",alreadyPushState:!0}){const t=n.nameInState,e=typeof n.alreadyPushState=="boolean"?n.alreadyPushState:!0,{get:r,set:s}=Dl("fe-route-history"),i=r()||[],{get:o,set:a}=Dl("fe-route-history-index"),c=o();let h=typeof c=="number"?c:i.length-1;function u(g){return i.findIndex(x=>x[t]===g[t])}const l={currentIndex:h};function d(g){g=st(g,-1,i.length-1),h<0?(l.direction="keep",l.delta=0):(g<h?l.direction="backward":g>h?l.direction="forward":l.direction="keep",l.delta=g-h),l.from=l.to,l.to=i[g]?.[t],h=g,l.currentIndex=h,a(h)}d(h);function f(g){i.push(g),s(i),d(i.length-1)}function p(g,w){const x={...w,[t]:g};window.history.pushState(x,"",g),f(x)}function m(g,w=e){const x=u(g);if(x<0){h>=0&&(i.splice(h+1),s(i)),w?f(g):p(g[t],g);return}x!=h&&d(x)}const b=Ey().subscribe(g=>{m(g,!0)});return{history:i,route:l,navigate:(g,w)=>{m({...w,[t]:g},e)},go(g){window.history.go(g)},back(){window.history.back()},forward(){window.history.forward()},destroy:()=>{b.unsubscribe()}}}function Cy(n="(prefers-color-scheme: dark)"){const t=window.matchMedia(n);return it(t,"change").pipe(zt(e=>e.matches),ar(t.matches),Dn())}let Ty=!1;function E3(){Ty||(Ty=!0,xd(`
122
122
  :root {
123
123
  --sat:env(safe-area-inset-top, 0px);
124
124
  --sar:env(safe-area-inset-right, 0px);
@@ -131,15 +131,15 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
131
131
  --sab:env(safe-area-inset-bottom, 0px);
132
132
  --sal:env(safe-area-inset-left, 0px);
133
133
  }
134
- `))}function E3(){return _3(),vl(document.documentElement).pipe(Ic(Mc),zt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function C3(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new Nt(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((r,s)=>{navigator.geolocation.getCurrentPosition(i=>{t.next({longitude:i.coords.longitude,latitude:i.coords.latitude}),r()},i=>{s(i)})}).then(()=>{e=navigator.geolocation.watchPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude})},r=>{t.error(r)},n)}).catch(r=>{t.error(r)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Ty(n,t={},e=[]){return typeof n=="string"?{tag:n,props:t,children:typeof e=="string"?e:e.filter(r=>typeof r!="boolean")}:n(t)}function ca(n){const t=Ty(n.tagName,wc(n),Array.from(n.children).map(e=>ca(e)));return t.el=n,t}function Sn(n,t=document.documentElement){if(typeof n=="string"){const r=document.createTextNode(n);return t.appendChild(r),r}if(n.el)return n.el;const e=n.tag=="path"?Wc():document.createElement(n.tag);if(n.props)for(const[r,s]of Object.entries(n.props))r.startsWith("on")?e.addEventListener(r.slice(2).toLowerCase(),s):r==="style"?ps(e,s):sr(e,r,s);return t.appendChild(e),n.el=e,n.children&&(typeof n.children=="string"?Sn(n.children,e):n.children.forEach(r=>{Sn(r,e)})),e}function oi(n,t){typeof n=="string"||!n.el||(Array.isArray(n.children)&&n.children.forEach(e=>{n.el&&oi(e,n.el)}),t.removeChild(n.el))}function ha(n,t,e){if(!n.el||!t.el)return;e=e||n.el.parentElement||document.body||document.documentElement;const r=n.props.key,s=t.props.key;if(n.tag!==t.tag||n.el!==t.el||(s||r)&&s!==r){e.replaceChild(Sn(t,e),n.el);return}const i=t.el=n.el,o=n.props,a=t.props;for(const u in o)u in a||(u.startsWith("on")?i.removeEventListener(u.slice(2).toLowerCase(),o[u]):i.removeAttribute(u));for(const u in a){const l=o[u],d=a[u];if(d!=l)if(u.startsWith("on")){const f=u.slice(2).toLowerCase();i.removeEventListener(f,l),i.addEventListener(f,d)}else if(u==="style"){for(const f in l)f in d||vc(i,f);ps(i,d)}else sr(i,u,d)}const c=n.children||[],h=t.children||[];if(typeof h=="string")i.innerHTML="",Sn(h,i);else if(typeof c=="string")i.innerHTML="",h.forEach(u=>{Sn(u,i)});else{const u=Math.min(c.length,h.length);for(let l=0;l<u;l++)ha(c[l],h[l],i);h.length>c.length?h.slice(c.length).forEach(l=>{Sn(l,i)}):h.length<c.length&&c.slice(h.length).forEach(l=>{oi(l,i)})}}function Py(n=document.documentElement,t,e){t.el?!e||!e.el?(oi(t,n),Sn(t,n)):ha(e,t,n):(e&&oi(e,n),Sn(t,n))}const ua=new Map;function Dl(n,t=ua){let e=t.get(n);return e||(e=ca(n),t.set(n,e),e)}function la(n,t,e=ua){const r=Dl(n,e);r.alternate||(r.alternate=ca(n),Tr(r.alternate.props,r.props,!0)),t(r.alternate)}function Ay(n=ua){const t=Array.from(n.entries());for(const[e,r]of t){const s=r.alternate;s&&(ha(r,s),r.props=s.props,r.alternate=void 0)}}function Ol(n=ua){pb(()=>Ay(n),50)}function T3(){const n=new Map;let t=null;const e=new Set;let r=!1;function s(p){const m=t,b=m.stateIndex;b in m.states||(m.states[b]=p);function g(w){let x;typeof w=="function"?x=w(m.states[b]):x=w,m.states[b]!==x&&(m.states[b]=x,u(m))}return m.stateIndex++,[m.states[b],g]}function i(p){const[m,b]=s({current:p});return m}function o(p,m){const b=t,g=b.effectIndex;b.pendingEffects||(b.pendingEffects=[]),b.pendingEffects.push({effect:p,deps:m,idx:g}),b.effectIndex++}function a(p){p.pendingEffects&&(p.pendingEffects.forEach(({effect:m,deps:b,idx:g})=>{const w=p.effects[g];if(!b||!w||!w.deps||b.length!==w.deps.length||b.some((v,E)=>v!==w.deps[E])){w.cleanup?.();const v=m();if(v instanceof Promise)throw new Error("useEffect callback must not return Promise");p.effects[g]={deps:b?[...b]:void 0,cleanup:v}}}),p.pendingEffects=[])}function c(p){const m=i(p);return m.current=p,h((...b)=>m.current(...b),[])}function h(p,m){const b=t,g=b.callbackIndex,w=b.callbacks[g]||{fn:p,deps:void 0};return(!m||!w.deps||m.length!==w.deps.length||m.some((v,E)=>v!==w.deps[E]))&&(w.fn=p,w.deps=m?[...m]:void 0),b.callbacks[g]=w,b.callbackIndex++,w.fn}function u(p){e.add(p),r||(r=!0,setTimeout(l,0))}function l(){for(;e.size;){const p=[...e];e.clear(),p.forEach(m=>{d(m.component,m.container,m.props)})}r=!1}function d(p,m,b={}){let g=n.get(m);!g||g.component!==p?(g={component:p,props:b,states:[],stateIndex:0,effects:[],effectIndex:0,pendingEffects:[],callbacks:[],callbackIndex:0,children:[],mounted:!1,container:m,vnode:void 0},n.set(m,g)):g.props=b,t=g,g.stateIndex=0,g.effectIndex=0,g.callbackIndex=0;const w=p(b);return Py(m,w,g.vnode),g.vnode=w,g.mounted=!0,t=null,a(g),g}function f(p){p.effects.forEach(m=>m.cleanup?.()),p.children&&p.children.forEach(f),p.container&&"innerHTML"in p.container&&(p.container.innerHTML=""),n.delete(p.container)}return{useState:s,useRef:i,useEffect:o,useEffectEvent:c,useCallback:h,render:d,unmount:f,scheduleRender:u}}function My(){let n;function t(d){n=d,d(),n=null}class e{subscribers=new Set;add(){n&&!this.subscribers.has(n)&&this.subscribers.add(n)}notify(){this.subscribers.forEach(f=>f())}}const r=new WeakMap;function s(d,f){let p=r.get(d);p||(p=new Map,r.set(d,p));let m=p.get(f);return m||(m=new e,p.set(f,m)),m}function i(d,f,p=o){if(!Array.isArray(d))return;const m=Array.prototype,b=Object.create(m);["push","pop","shift","unshift","splice","sort","reverse"].forEach(g=>{b[g]=function(...w){return["push","unshift","splice"].includes(g)&&(g==="splice"?w.slice(2):w).forEach((v,E)=>{Jn(v)&&(w[E]=p(v)),f.add()}),m[g].apply(this,w),this.slice()}}),Object.setPrototypeOf(d,b),d.forEach((g,w)=>{Jn(g)&&(d[w]=p(g)),f.add()})}function o(d){return Object.keys(d).forEach(f=>{const p=s(d,f);let m=d[f];Object.defineProperty(d,f,{configurable:!0,enumerable:!0,get(){return Jn(m)&&(Array.isArray(m)?i(m,p,o):o(m)),p.add(),m},set(b){m!==b&&(m=b,p.notify())}})}),d}function a(d){return o({value:d})}const c=h;function h(d){if(!Jn(d))return d;const f={get(m,b,g){let w=Reflect.get(m,b,g);const x=s(m,b);if(Jn(w)&&!("isYZProxy"in w)){const v=h(w);Array.isArray(w)&&(v.YZProxyArrayDep=x),w=v}return x.add(),w},set(m,b,g,w){const x=Reflect.get(m,b,w),v=Reflect.set(m,b,g,w);if(b=="YZProxyArrayDep")return v;if(x!==g){let E;Array.isArray(m)?E=m.YZProxyArrayDep:E=s(m,b),E.notify()}return v},deleteProperty(m,b){if(!(b in m))return!1;let w=typeof b=="symbol"?void 0:m[b];Jn(w)&&(w=Array.isArray(w)?[...w]:{...w});const x=Reflect.deleteProperty(m,b);if(x){let v;Array.isArray(m)?v=m.YZProxyArrayDep:v=s(m,b),v.notify()}return x},has(m,b){return b==="isYZProxy"||b in m}};return new Proxy(d,f)}function u(d,f){const p=h(d);return l(p,f),p}function l(d,f){f.childNodes.forEach(p=>{switch(p.nodeType){case 1:const m=p;[...m.attributes].forEach(x=>{const v=x.name,E=x.value;if(v==="v-model")if(yl(m)){const _=m;t(()=>{_.checked=sn(d,E)==_.value}),_.addEventListener("change",D=>{Ma(d,E,D.target.value)})}else if(gl(m)){const _=m;t(()=>{_.checked=af(sn(d,E),_.value)}),_.addEventListener("change",D=>{const z=D.target,O=z.value;z.checked?U1(sn(d,E),O):cf(sn(d,E),O)})}else if(pl(m)){const _=m;t(()=>{_.value=sn(d,E)}),_.addEventListener("change",D=>{Ma(d,E,D.target.value)})}else{const _=m;t(()=>{_.value=sn(d,E)});const D=z=>{Ma(d,E,z.target.value)};_.addEventListener("input",D)}else v==="v-text"?t(()=>{m.innerText=sn(d,E)}):v==="v-html"&&t(()=>{m.innerHTML=sn(d,E)})}),m.childNodes.length>0&&l(d,m);break;case 3:const b=p.textContent||"",g=/\{\{\s*([^{}\s]+)\s*\}\}/g,w=g.exec(b);w&&w[1]&&t(()=>{p.textContent=b.replace(g,sn(d,w[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:u}}const P3=My();function Dy(n,t,e){return new WebSocket(n)}function A3(n){return`${n}eventbus/${h1(3)}/${Kl(8)}/websocket`}class tn{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=tn.CONNECTING;messageQueue=[];pingInterval;pingTimerID;reconnect;reconnectAttempts=0;maxReconnectAttempts;reconnectTimerID;onopen;onclose;onerror;requestid=0;waitings={};listeners={};constructor(t="",e){this.url=t,this.socketCreatorProtocols=e?.socketCreatorProtocols,this.socketCreatorOptions=e?.socketCreatorOptions||{},this.socketCreator=e?.socketCreator||Dy,this.pingInterval=e?.pingInterval||5e3,this.onopen=e?.onopen,this.onclose=e?.onclose,this.onerror=e?.onerror,this.reconnect=typeof e?.reconnect=="boolean"?e.reconnect:!0,this.maxReconnectAttempts=typeof e?.maxReconnectAttempts=="number"?e.maxReconnectAttempts:1/0,this._connect()}open(){this.reconnectAttempts=0,this._connect()}close(){this.state=tn.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===tn.CONNECTING||this.socket?.readyState===tn.OPEN||(this.state=tn.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{Pn(`(${this.url}) onopen`),this.state=tn.OPEN,this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:r,wasClean:s}=t;Pn(`(${this.url}) onclose: code(${e}) reason(${r}) wasClean(${s})`),this.state=tn.CLOSED,this.socket=void 0,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.reconnectTimerID=setTimeout(this._connect.bind(this),J1(this.reconnectAttempts++)))},this.socket.onerror=t=>{Pn(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(Pn(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const r=t.data.substring(1);try{e=JSON.parse(r)}catch(s){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:s.toString(),message:r})]}e.forEach(s=>{const i=JSON.parse(s);if(i.body&&Object.prototype.hasOwnProperty.call(i.body,"requestid")){const o=this.waitings[i.body.requestid];o?o.resolve?.(i.body):De(`(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[i.address]){const o=this.listeners[i.address];for(let a=0;a<o.length;a++)i.type==="err"?o[a]({failureCode:i.failureCode,failureType:i.failureType,message:i.message}):o[a](null,i.body)}else this.onunhandled(i)})}else t.data instanceof ArrayBuffer?De(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&De(`(${this.url}) onmessage: unhandle Blob`)})}onunhandled(t){try{t.type==="err"?this.onerror?.(t):t.event?console.warn("No handler found for event: %o. Message: %O",t.event,t):console.warn("No handler found for message: ",t)}catch{}}_send(t){this.socket?.readyState===tn.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,r={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,r={}){const s=this.listeners[t];if(s){const i=s.indexOf(e);i!=-1&&(s.splice(i,1),s.length===0&&(this._send({type:"unregister",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,r={}){this._send({type:"publish",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,r={},s=3e4){this.requestid++;const i=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,c)=>{i.resolve=a,this._send({type:"send",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1),body:{requestid:i.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${i.requestid}: ${Ci(e)}) Timeout!`)},s)});return delete this.waitings[i.requestid],o}}function M3(n=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let r=100;const s=function(){t.style.height=window.innerHeight+"px";const i=t.clientWidth;t.dataset.width=i,t.dataset.layout=i>n?"pc":"mobile",t.dataset.rem=r=Math.min(100,Math.round(100*(i/n))),t.style.fontSize=r+"px"};s(),window.rem2px=function(i){return parseFloat(i)*r},window.px2rem=function(i){return parseFloat(i)/r},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",s,!1)}class D3{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new ii(t),this.remoteVideoUtil=new ii(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(r=>{this.localVideoUtil.setSrcObject(r),t(r)}).catch(r=>{this.trace(`navigator.getUserMedia error: ${r}.`),e(r)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),r=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),r.length>0&&this.trace(`Using audio device: ${r[0].label}.`);const s=void 0,i=new RTCPeerConnection(s);this.localPeerConnection=i,this.trace("Created local peer connection object localPeerConnection."),i.addEventListener("icecandidate",this.handleConnection),i.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const o=new RTCPeerConnection(s);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),i.addTrack(e[0],t),i.addTrack(r[0],t),this.trace("localPeerConnection createOffer start."),i.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,r=t.candidate;if(e&&r){const s=new RTCIceCandidate(r),i=this.getOtherPeer(e);i&&(i.addIceCandidate(s).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
134
+ `))}function C3(){return E3(),wl(document.documentElement).pipe(Ic(Mc),zt(()=>{const n=getComputedStyle(document.documentElement);return{bottom:n.getPropertyValue("--sab"),top:n.getPropertyValue("--sat"),right:n.getPropertyValue("--sar"),left:n.getPropertyValue("--sal")}}))}function T3(n={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new Nt(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((r,s)=>{navigator.geolocation.getCurrentPosition(i=>{t.next({longitude:i.coords.longitude,latitude:i.coords.latitude}),r()},i=>{s(i)})}).then(()=>{e=navigator.geolocation.watchPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude})},r=>{t.error(r)},n)}).catch(r=>{t.error(r)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Py(n,t={},e=[]){return typeof n=="string"?{tag:n,props:t,children:typeof e=="string"?e:e.filter(r=>typeof r!="boolean")}:n(t)}function ca(n){const t=Py(n.tagName,wc(n),Array.from(n.children).map(e=>ca(e)));return t.el=n,t}function Sn(n,t=document.documentElement){if(typeof n=="string"){const r=document.createTextNode(n);return t.appendChild(r),r}if(n.el)return n.el;const e=n.tag=="path"?Wc():document.createElement(n.tag);if(n.props)for(const[r,s]of Object.entries(n.props))r.startsWith("on")?e.addEventListener(r.slice(2).toLowerCase(),s):r==="style"?ps(e,s):sr(e,r,s);return t.appendChild(e),n.el=e,n.children&&(typeof n.children=="string"?Sn(n.children,e):n.children.forEach(r=>{Sn(r,e)})),e}function oi(n,t){typeof n=="string"||!n.el||(Array.isArray(n.children)&&n.children.forEach(e=>{n.el&&oi(e,n.el)}),t.removeChild(n.el))}function ha(n,t,e){if(!n.el||!t.el)return;e=e||n.el.parentElement||document.body||document.documentElement;const r=n.props.key,s=t.props.key;if(n.tag!==t.tag||n.el!==t.el||(s||r)&&s!==r){e.replaceChild(Sn(t,e),n.el);return}const i=t.el=n.el,o=n.props,a=t.props;for(const u in o)u in a||(u.startsWith("on")?i.removeEventListener(u.slice(2).toLowerCase(),o[u]):i.removeAttribute(u));for(const u in a){const l=o[u],d=a[u];if(d!=l)if(u.startsWith("on")){const f=u.slice(2).toLowerCase();i.removeEventListener(f,l),i.addEventListener(f,d)}else if(u==="style"){for(const f in l)f in d||vc(i,f);ps(i,d)}else sr(i,u,d)}const c=n.children||[],h=t.children||[];if(typeof h=="string")i.innerHTML="",Sn(h,i);else if(typeof c=="string")i.innerHTML="",h.forEach(u=>{Sn(u,i)});else{const u=Math.min(c.length,h.length);for(let l=0;l<u;l++)ha(c[l],h[l],i);h.length>c.length?h.slice(c.length).forEach(l=>{Sn(l,i)}):h.length<c.length&&c.slice(h.length).forEach(l=>{oi(l,i)})}}function Ay(n=document.documentElement,t,e){t.el?!e||!e.el?(oi(t,n),Sn(t,n)):ha(e,t,n):(e&&oi(e,n),Sn(t,n))}const ua=new Map;function Ol(n,t=ua){let e=t.get(n);return e||(e=ca(n),t.set(n,e),e)}function la(n,t,e=ua){const r=Ol(n,e);r.alternate||(r.alternate=ca(n),Tr(r.alternate.props,r.props,!0)),t(r.alternate)}function My(n=ua){const t=Array.from(n.entries());for(const[e,r]of t){const s=r.alternate;s&&(ha(r,s),r.props=s.props,r.alternate=void 0)}}function Il(n=ua){gb(()=>My(n),50)}function P3(){const n=new Map;let t=null;const e=new Set;let r=!1;function s(p){const m=t,b=m.stateIndex;b in m.states||(m.states[b]=p);function g(w){let x;typeof w=="function"?x=w(m.states[b]):x=w,m.states[b]!==x&&(m.states[b]=x,u(m))}return m.stateIndex++,[m.states[b],g]}function i(p){const[m,b]=s({current:p});return m}function o(p,m){const b=t,g=b.effectIndex;b.pendingEffects||(b.pendingEffects=[]),b.pendingEffects.push({effect:p,deps:m,idx:g}),b.effectIndex++}function a(p){p.pendingEffects&&(p.pendingEffects.forEach(({effect:m,deps:b,idx:g})=>{const w=p.effects[g];if(!b||!w||!w.deps||b.length!==w.deps.length||b.some((v,E)=>v!==w.deps[E])){w.cleanup?.();const v=m();if(v instanceof Promise)throw new Error("useEffect callback must not return Promise");p.effects[g]={deps:b?[...b]:void 0,cleanup:v}}}),p.pendingEffects=[])}function c(p){const m=i(p);return m.current=p,h((...b)=>m.current(...b),[])}function h(p,m){const b=t,g=b.callbackIndex,w=b.callbacks[g]||{fn:p,deps:void 0};return(!m||!w.deps||m.length!==w.deps.length||m.some((v,E)=>v!==w.deps[E]))&&(w.fn=p,w.deps=m?[...m]:void 0),b.callbacks[g]=w,b.callbackIndex++,w.fn}function u(p){e.add(p),r||(r=!0,setTimeout(l,0))}function l(){for(;e.size;){const p=[...e];e.clear(),p.forEach(m=>{d(m.component,m.container,m.props)})}r=!1}function d(p,m,b={}){let g=n.get(m);!g||g.component!==p?(g={component:p,props:b,states:[],stateIndex:0,effects:[],effectIndex:0,pendingEffects:[],callbacks:[],callbackIndex:0,children:[],mounted:!1,container:m,vnode:void 0},n.set(m,g)):g.props=b,t=g,g.stateIndex=0,g.effectIndex=0,g.callbackIndex=0;const w=p(b);return Ay(m,w,g.vnode),g.vnode=w,g.mounted=!0,t=null,a(g),g}function f(p){p.effects.forEach(m=>m.cleanup?.()),p.children&&p.children.forEach(f),p.container&&"innerHTML"in p.container&&(p.container.innerHTML=""),n.delete(p.container)}return{useState:s,useRef:i,useEffect:o,useEffectEvent:c,useCallback:h,render:d,unmount:f,scheduleRender:u}}function Dy(){let n;function t(d){n=d,d(),n=null}class e{subscribers=new Set;add(){n&&!this.subscribers.has(n)&&this.subscribers.add(n)}notify(){this.subscribers.forEach(f=>f())}}const r=new WeakMap;function s(d,f){let p=r.get(d);p||(p=new Map,r.set(d,p));let m=p.get(f);return m||(m=new e,p.set(f,m)),m}function i(d,f,p=o){if(!Array.isArray(d))return;const m=Array.prototype,b=Object.create(m);["push","pop","shift","unshift","splice","sort","reverse"].forEach(g=>{b[g]=function(...w){return["push","unshift","splice"].includes(g)&&(g==="splice"?w.slice(2):w).forEach((v,E)=>{Jn(v)&&(w[E]=p(v)),f.add()}),m[g].apply(this,w),this.slice()}}),Object.setPrototypeOf(d,b),d.forEach((g,w)=>{Jn(g)&&(d[w]=p(g)),f.add()})}function o(d){return Object.keys(d).forEach(f=>{const p=s(d,f);let m=d[f];Object.defineProperty(d,f,{configurable:!0,enumerable:!0,get(){return Jn(m)&&(Array.isArray(m)?i(m,p,o):o(m)),p.add(),m},set(b){m!==b&&(m=b,p.notify())}})}),d}function a(d){return o({value:d})}const c=h;function h(d){if(!Jn(d))return d;const f={get(m,b,g){let w=Reflect.get(m,b,g);const x=s(m,b);if(Jn(w)&&!("isYZProxy"in w)){const v=h(w);Array.isArray(w)&&(v.YZProxyArrayDep=x),w=v}return x.add(),w},set(m,b,g,w){const x=Reflect.get(m,b,w),v=Reflect.set(m,b,g,w);if(b=="YZProxyArrayDep")return v;if(x!==g){let E;Array.isArray(m)?E=m.YZProxyArrayDep:E=s(m,b),E.notify()}return v},deleteProperty(m,b){if(!(b in m))return!1;let w=typeof b=="symbol"?void 0:m[b];Jn(w)&&(w=Array.isArray(w)?[...w]:{...w});const x=Reflect.deleteProperty(m,b);if(x){let v;Array.isArray(m)?v=m.YZProxyArrayDep:v=s(m,b),v.notify()}return x},has(m,b){return b==="isYZProxy"||b in m}};return new Proxy(d,f)}function u(d,f){const p=h(d);return l(p,f),p}function l(d,f){f.childNodes.forEach(p=>{switch(p.nodeType){case 1:const m=p;[...m.attributes].forEach(x=>{const v=x.name,E=x.value;if(v==="v-model")if(bl(m)){const _=m;t(()=>{_.checked=sn(d,E)==_.value}),_.addEventListener("change",D=>{Ma(d,E,D.target.value)})}else if(yl(m)){const _=m;t(()=>{_.checked=cf(sn(d,E),_.value)}),_.addEventListener("change",D=>{const z=D.target,O=z.value;z.checked?Y1(sn(d,E),O):hf(sn(d,E),O)})}else if(gl(m)){const _=m;t(()=>{_.value=sn(d,E)}),_.addEventListener("change",D=>{Ma(d,E,D.target.value)})}else{const _=m;t(()=>{_.value=sn(d,E)});const D=z=>{Ma(d,E,z.target.value)};_.addEventListener("input",D)}else v==="v-text"?t(()=>{m.innerText=sn(d,E)}):v==="v-html"&&t(()=>{m.innerHTML=sn(d,E)})}),m.childNodes.length>0&&l(d,m);break;case 3:const b=p.textContent||"",g=/\{\{\s*([^{}\s]+)\s*\}\}/g,w=g.exec(b);w&&w[1]&&t(()=>{p.textContent=b.replace(g,sn(d,w[1]))});break}})}return{watchEffect:t,reactiveVue2:o,ref:a,reactiveVue3:h,reactive:c,mvvm:u}}const A3=Dy();function Oy(n,t,e){return new WebSocket(n)}function M3(n){return`${n}eventbus/${u1(3)}/${Jl(8)}/websocket`}class tn{static CONNECTING=WebSocket.CONNECTING;static OPEN=WebSocket.OPEN;static CLOSING=WebSocket.CLOSING;static CLOSED=WebSocket.CLOSED;url;socketCreatorProtocols;socketCreatorOptions;socketCreator;socket;state=tn.CONNECTING;messageQueue=[];pingInterval;pingTimerID;reconnect;reconnectAttempts=0;maxReconnectAttempts;reconnectTimerID;onopen;onclose;onerror;requestid=0;waitings={};listeners={};constructor(t="",e){this.url=t,this.socketCreatorProtocols=e?.socketCreatorProtocols,this.socketCreatorOptions=e?.socketCreatorOptions||{},this.socketCreator=e?.socketCreator||Oy,this.pingInterval=e?.pingInterval||5e3,this.onopen=e?.onopen,this.onclose=e?.onclose,this.onerror=e?.onerror,this.reconnect=typeof e?.reconnect=="boolean"?e.reconnect:!0,this.maxReconnectAttempts=typeof e?.maxReconnectAttempts=="number"?e.maxReconnectAttempts:1/0,this._connect()}open(){this.reconnectAttempts=0,this._connect()}close(){this.state=tn.CLOSING,this.socket?.close()}_connect(){this.socket?.readyState===tn.CONNECTING||this.socket?.readyState===tn.OPEN||(this.state=tn.CONNECTING,this.socket=this.socketCreator(this.url,this.socketCreatorProtocols,this.socketCreatorOptions),this.socket.onopen=()=>{Pn(`(${this.url}) onopen`),this.state=tn.OPEN,this.reconnectTimerID&&(clearTimeout(this.reconnectTimerID),this.reconnectTimerID=void 0);const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send.bind(this)),this.ping(),this.pingTimerID=setInterval(this.ping.bind(this),this.pingInterval),this.onopen?.()},this.socket.onclose=t=>{const{code:e,reason:r,wasClean:s}=t;Pn(`(${this.url}) onclose: code(${e}) reason(${r}) wasClean(${s})`),this.state=tn.CLOSED,this.socket=void 0,this.pingTimerID&&(clearInterval(this.pingTimerID),this.pingTimerID=void 0),this.onclose?.(t),this.reconnect&&this.reconnectAttempts<this.maxReconnectAttempts&&(this.reconnectTimerID=setTimeout(this._connect.bind(this),Z1(this.reconnectAttempts++)))},this.socket.onerror=t=>{Pn(`(${this.url}) onerror: ${t}`),this.onerror?.(t)},this.socket.onmessage=t=>{if(Pn(`(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`),typeof t.data=="string"){let e;const r=t.data.substring(1);try{e=JSON.parse(r)}catch(s){e=[JSON.stringify({type:"err",failureCode:"fe-json-parse-error",failureType:s.toString(),message:r})]}e.forEach(s=>{const i=JSON.parse(s);if(i.body&&Object.prototype.hasOwnProperty.call(i.body,"requestid")){const o=this.waitings[i.body.requestid];o?o.resolve?.(i.body):De(`(${this.url}) onmessage: found no associated request, already timed out`)}else if(this.listeners[i.address]){const o=this.listeners[i.address];for(let a=0;a<o.length;a++)i.type==="err"?o[a]({failureCode:i.failureCode,failureType:i.failureType,message:i.message}):o[a](null,i.body)}else this.onunhandled(i)})}else t.data instanceof ArrayBuffer?De(`(${this.url}) onmessage: unhandle ArrayBuffer`):t.data instanceof Blob&&De(`(${this.url}) onmessage: unhandle Blob`)})}onunhandled(t){try{t.type==="err"?this.onerror?.(t):t.event?console.warn("No handler found for event: %o. Message: %O",t.event,t):console.warn("No handler found for message: ",t)}catch{}}_send(t){this.socket?.readyState===tn.OPEN?this.socket.send(JSON.stringify([JSON.stringify(t)])):(this.messageQueue.push(t),this._connect())}ping(){this._send({type:"ping"})}register(t,e,r={}){this.listeners[t]||(this.listeners[t]=[],this._send({type:"register",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1)})),this.listeners[t].push(e)}unregister(t,e,r={}){const s=this.listeners[t];if(s){const i=s.indexOf(e);i!=-1&&(s.splice(i,1),s.length===0&&(this._send({type:"unregister",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1)}),delete this.listeners[t]))}}publish(t,e,r={}){this._send({type:"publish",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1),body:e})}async send(t,e,r={},s=3e4){this.requestid++;const i=this.waitings[this.requestid]={requestid:this.requestid},o=await new Promise((a,c)=>{i.resolve=a,this._send({type:"send",address:t,headers:Tr(r,this.socketCreatorOptions.headers,!1),body:{requestid:i.requestid,...e}}),setTimeout(()=>{c(`(${this.url}) send(${i.requestid}: ${Ci(e)}) Timeout!`)},s)});return delete this.waitings[i.requestid],o}}function D3(n=750){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let r=100;const s=function(){t.style.height=window.innerHeight+"px";const i=t.clientWidth;t.dataset.width=i,t.dataset.layout=i>n?"pc":"mobile",t.dataset.rem=r=Math.min(100,Math.round(100*(i/n))),t.style.fontSize=r+"px"};s(),window.rem2px=function(i){return parseFloat(i)*r},window.px2rem=function(i){return parseFloat(i)/r},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",s,!1)}class O3{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new ii(t),this.remoteVideoUtil=new ii(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(r=>{this.localVideoUtil.setSrcObject(r),t(r)}).catch(r=>{this.trace(`navigator.getUserMedia error: ${r}.`),e(r)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),r=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),r.length>0&&this.trace(`Using audio device: ${r[0].label}.`);const s=void 0,i=new RTCPeerConnection(s);this.localPeerConnection=i,this.trace("Created local peer connection object localPeerConnection."),i.addEventListener("icecandidate",this.handleConnection),i.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const o=new RTCPeerConnection(s);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),i.addTrack(e[0],t),i.addTrack(r[0],t),this.trace("localPeerConnection createOffer start."),i.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,r=t.candidate;if(e&&r){const s=new RTCIceCandidate(r),i=this.getOtherPeer(e);i&&(i.addIceCandidate(s).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
135
135
  ${t.candidate.candidate}.`))}}handleConnectionSuccess(t){this.trace(`${this.getPeerName(t)} addIceCandidate success.`)}handleConnectionFailure(t,e){this.trace(`${this.getPeerName(t)} failed to add ICE Candidate:
136
136
  ${e.toString()}.`)}handleConnectionChange(t){const e=t.target;console.log("ICE state change event: ",t),e&&this.trace(`${this.getPeerName(e)} ICE state: ${e.iceConnectionState}.`)}createdOffer(t){this.trace(`Offer from localPeerConnection:
137
137
  ${t.sdp}`),this.localPeerConnection&&(this.trace("localPeerConnection setLocalDescription start."),this.localPeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.remotePeerConnection&&(this.trace("remotePeerConnection setRemoteDescription start."),this.remotePeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e)),this.trace("remotePeerConnection createAnswer start."),this.remotePeerConnection.createAnswer().then(e=>this.createdAnswer(e)).catch(e=>this.setSessionDescriptionError(e)))}createdAnswer(t){this.trace(`Answer from remotePeerConnection:
138
- ${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const r=this.getPeerName(t);this.trace(`${r} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const r=document.createElement("div");r.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(r)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class O3{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const Oy=[],Iy={};function Il(n){Oy.push(n)}function I3(n,t=!1){const e=Ub();if(Iy[e])return;wx.error(i=>{console.log(i.errMsg||JSON.stringify(i))}),wx.ready(()=>{Oy.forEach(i=>i())});const r=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],s=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:r,openTagList:s})),Iy[e]=!0}function R3(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(r){r.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function k3(n){Il(function(){wx.updateAppMessageShareData(n)})}function L3(n){Il(function(){wx.updateTimelineShareData(n)})}function N3(n){wx.chooseImage(n)}function z3(n){wx.previewImage(n)}function V3(n){wx.uploadImage(n)}function F3(n){wx.downloadImage(n)}function B3(n){wx.getLocalImgData(n)}function $3(){wx.startRecord()}function U3(n){wx.stopRecord(n)}function Y3(n){wx.onVoiceRecordEnd(n)}function j3(n){wx.playVoice(n)}function G3(n){wx.pauseVoice(n)}function X3(n){wx.stopVoice(n)}function W3(n){wx.onVoicePlayEnd(n)}function H3(n){wx.uploadVoice(n)}function q3(n){wx.downloadVoice(n)}function K3(n){wx.translateVoice(n)}function J3(n){wx.getNetworkType(n)}function Z3(n){wx.openLocation(n)}function Q3(n){wx.getLocation(n)}function tD(n){wx.scanQRCode(n)}function eD(n,t,e){function r(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(s){s.err_msg=="get_brand_wcpay_request:ok"?t():e(s.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",r,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",r),document.attachEvent("onWeixinJSBridgeReady",r)):r()}function nD(n,t,e="snsapi_userinfo",r=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${r}#wechat_redirect`}function rD(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function ai(n,t){let e="未知错误";switch(n.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${n.error}(${e}): ${n.errorMessage}`}function sD(n,t,e){ap.tradePay(Object.assign(n,{}),function(r){let s="未知错误";switch(r.resultCode){case 9e3:return s="订单支付成功",t?.(s);case 8e3:s="正在处理中";break;case 4e3:s="订单支付失败";break;case 6001:s="用户中途取消";break;case 6002:s="网络连接出错";break;case 99:s="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(s)})}function iD(n,t,e){ap.scan(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(r){t?.(r.code)})}function oD(n,t,e){ap.getLocation(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(r){t?.(r)})}function aD(n,t,e){ap.openLocation(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(){t?.()})}function cD(n,t,e){ap.chooseImage(Object.assign(n,{fail:r=>{e?.(ai(r,"chooseImage"))}}),function(r){t?.(r)})}function hD(n,t,e){ap.previewImage(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(){t?.()})}class uD{map;constructor(t,e=120.619585,r=31.299379,s=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,r),s)}}class lD{appId;reportUrl;constructor(t){this.appId=t.appId,this.reportUrl=t.reportUrl,this.listenJSError(),this.listenAssetsError(),this.listenPromiseError(),t.checkWhiteScreen&&this.listenWhiteScreenError()}listenJSError(){window.onerror=(t,e,r,s,i)=>{const o={type:"js_error",msg:t,file:e,row:r,col:s,stack:i?.stack};this.report(o)}}listenAssetsError(){window.addEventListener("error",t=>{const e=t.target;if(e instanceof HTMLScriptElement||e instanceof HTMLStyleElement||e instanceof HTMLImageElement){const r={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(r)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){ll(()=>{setTimeout(()=>{const t=[[window.innerWidth/2,window.innerHeight/2],[window.innerWidth/2,window.innerHeight*.2],[window.innerWidth/2,window.innerHeight*.8],[window.innerWidth*.2,window.innerHeight/2],[window.innerWidth*.8,window.innerHeight/2]];let e=0;if(t.forEach(r=>{const[s,i]=r,a=document.elementsFromPoint(s,i)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const r={type:"whitescreen_error",reason:"检测到白屏!"};this.report(r)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:Y1()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function Ry(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function ky(){const e=(await(await fetch(`/index.html?t=${Date.now()}`,{cache:"no-store"})).text()).match(/<meta\s+name=["']app-version["']\s+content=["']([^"']+)["']/);return e?e[1]:null}function Ly(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function fD(){try{const n=Ry(),t=await ky();n&&t&&n!==t&&Ly()}catch(n){console.error("版本检测失败:",n)}}function dD(n){const t=n?.message||n?.reason?.message||"";return t.includes("Loading chunk")||t.includes("ChunkLoadError")||t.includes("Failed to fetch dynamically imported module")}function mD(){const n="app_chunk_reload_once";sessionStorage.getItem(n)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(n,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}function Ny(n,t){const e=typeof n=="string"?n:n.toString(),r=()=>{try{const a=window.localStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,JSON.stringify(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=ji(r(),t);return a().value},set:a=>{const{set:c}=ji(r(),t),h=c(a);s(h)}}}function pD(){window.localStorage.clear()}function gD(n,t){let e=t?.value||"";if(!e){const i=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();i&&(e=decodeURIComponent(i))}const r=()=>e,s=i=>{if(e=i,e){const o=t?.domain?"; domain="+t.domain:"",a=t?.path?"; path="+t.path:"",c=t?.secure==!0?"; secure":"";let h=n+"="+encodeURIComponent(e)+o+a+c;if(t?.days){const u="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();h+=u}document.cookie=h}};return s(e),{get:r,set:s}}function yD(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const r=encodeURIComponent(n[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=r+"/";s.length>0;)document.cookie=r+s.join("/"),s.pop();e.shift()}}}function bD(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function vD(n,t=1,e){return new Promise((r,s)=>{let i;const o=window.indexedDB.open(n,t);o.onerror=()=>{s("无法使用IndexDB!")},o.onsuccess=a=>{i=a.target.result,bD(i,e),r(i)}})}function wD(n,t,e={id:1,name:"xxx"}){return new Promise((r,s)=>{const i=n.transaction([t],"readwrite");i.objectStore(t).add(e),i.oncomplete=a=>{r(a)},i.onerror=a=>{s(a)}})}const xD=["dark","light"],{get:SD,set:zy}=Ny("color-scheme"),Vy=new un,_D=Vy.pipe(ar(void 0));function Fy(n){switch(n){case"dark":document.documentElement.classList.add("dark"),sr(document.documentElement,"data-color-scheme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),sr(document.documentElement,"data-color-scheme","light");break}}function ED(n){return zy(n),Fy(n),Vy.next(n),n}function CD(){return kx([_D,Ey("(prefers-color-scheme: dark)")]).pipe(zt(([n,t])=>n||(n=SD(),n||(n=t?"dark":"light",zy(n)),Fy(n),n)))}function ht(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function TD(n,t){document.documentElement.style.setProperty(n,t)}function PD(n){return{red:ht("--yz-red","#fa503c"),redPanel:ht("--yz-red-panel","#fff5f5"),redPanelBorder:ht("--yz-red-panel-border","#fac8c8"),redGradient:ht("--yz-red-gradient","#fa8c78"),green:ht("--yz-green","#00be5a"),yellow:ht("--yz-yellow","#fa8c00"),newenergy:ht("--yz-newenergy","#64c896"),newenergyPanel:ht("--yz-newenergy-panel","#ebfaf2"),foreground:ht("--yz-foreground","#5a82f0"),foregroundSecondary:ht("--yz-foreground-secondary","#e6f0ff"),foregroundGradient:ht("--yz-foreground-gradient","#66b3ff"),background:ht("--yz-background","#ffffff"),backgroundBorder:ht("--yz-background-border","#e6e6e6"),panel:ht("--yz-panel","#f5f5f5"),panelBorder:ht("--yz-panel-border","#b3b3b3"),gap:ht("--yz-gap","#cccccc"),placeholder:ht("--yz-placeholder","#8f8f8f"),font:ht("--yz-font","#333333"),fontSecondary:ht("--yz-font-secondary","#666666"),fontTertiary:ht("--yz-font-tertiary","#999999"),foregroundReverse:ht("--yz-foreground-reverse","#5a82f0"),foregroundSecondaryReverse:ht("--yz-foreground-secondary-reverse","#e6f0ff"),foregroundGradientReverse:ht("--yz-foreground-gradient-reverse","#66b3ff"),backgroundReverse:ht("--yz-background-reverse","#ffffff"),backgroundBorderReverse:ht("--yz-background-border-reverse","#e6e6e6"),panelReverse:ht("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:ht("--yz-panel-border-reverse","#b3b3b3"),gapReverse:ht("--yz-gap-reverse","#cccccc"),placeholderReverse:ht("--yz-placeholder-reverse","#8f8f8f"),fontReverse:ht("--yz-font-reverse","#333333"),fontSecondaryReverse:ht("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:ht("--yz-font-tertiary-reverse","#999999"),themePrimary:ht(`--yz-theme-${n}-primary`,"#5a82f0"),themeSecondary:ht(`--yz-theme-${n}-secondary`,"#e6f0ff"),themeGradient:ht(`--yz-theme-${n}-gradient`,"#66b3ff"),themeBackground:ht(`--yz-theme-${n}-background`,"#ffffff"),themeBackgroundBorder:ht(`--yz-theme-${n}-background-border`,"#e6e6e6"),themePanel:ht(`--yz-theme-${n}-panel`,"#f5f5f5"),themePanelBorder:ht(`--yz-theme-${n}-panel-border`,"#b3b3b3"),themeGap:ht(`--yz-theme-${n}-gap`,"#cccccc"),themePlaceholder:ht(`--yz-theme-${n}-placeholder`,"#8f8f8f"),themeFont:ht(`--yz-theme-${n}-font`,"#333333"),themeFontSecondary:ht(`--yz-theme-${n}-font-secondary`,"#666666"),themeFontTertiary:ht(`--yz-theme-${n}-font-tertiary`,"#999999")}}var By={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
138
+ ${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const r=this.getPeerName(t);this.trace(`${r} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const r=document.createElement("div");r.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(r)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class I3{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const Iy=[],Ry={};function Rl(n){Iy.push(n)}function R3(n,t=!1){const e=Yb();if(Ry[e])return;wx.error(i=>{console.log(i.errMsg||JSON.stringify(i))}),wx.ready(()=>{Iy.forEach(i=>i())});const r=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],s=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:r,openTagList:s})),Ry[e]=!0}function k3(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(r){r.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function L3(n){Rl(function(){wx.updateAppMessageShareData(n)})}function N3(n){Rl(function(){wx.updateTimelineShareData(n)})}function z3(n){wx.chooseImage(n)}function V3(n){wx.previewImage(n)}function F3(n){wx.uploadImage(n)}function B3(n){wx.downloadImage(n)}function $3(n){wx.getLocalImgData(n)}function U3(){wx.startRecord()}function Y3(n){wx.stopRecord(n)}function j3(n){wx.onVoiceRecordEnd(n)}function G3(n){wx.playVoice(n)}function X3(n){wx.pauseVoice(n)}function W3(n){wx.stopVoice(n)}function H3(n){wx.onVoicePlayEnd(n)}function q3(n){wx.uploadVoice(n)}function K3(n){wx.downloadVoice(n)}function J3(n){wx.translateVoice(n)}function Z3(n){wx.getNetworkType(n)}function Q3(n){wx.openLocation(n)}function tD(n){wx.getLocation(n)}function eD(n){wx.scanQRCode(n)}function nD(n,t,e){function r(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(s){s.err_msg=="get_brand_wcpay_request:ok"?t():e(s.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",r,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",r),document.attachEvent("onWeixinJSBridgeReady",r)):r()}function rD(n,t,e="snsapi_userinfo",r=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${n}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${r}#wechat_redirect`}function sD(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function ai(n,t){let e="未知错误";switch(n.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${n.error}(${e}): ${n.errorMessage}`}function iD(n,t,e){ap.tradePay(Object.assign(n,{}),function(r){let s="未知错误";switch(r.resultCode){case 9e3:return s="订单支付成功",t?.(s);case 8e3:s="正在处理中";break;case 4e3:s="订单支付失败";break;case 6001:s="用户中途取消";break;case 6002:s="网络连接出错";break;case 99:s="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(s)})}function oD(n,t,e){ap.scan(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(r){t?.(r.code)})}function aD(n,t,e){ap.getLocation(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(r){t?.(r)})}function cD(n,t,e){ap.openLocation(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(){t?.()})}function hD(n,t,e){ap.chooseImage(Object.assign(n,{fail:r=>{e?.(ai(r,"chooseImage"))}}),function(r){t?.(r)})}function uD(n,t,e){ap.previewImage(Object.assign(n,{fail:r=>{e?.(ai(r))}}),function(){t?.()})}class lD{map;constructor(t,e=120.619585,r=31.299379,s=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,r),s)}}class fD{appId;reportUrl;constructor(t){this.appId=t.appId,this.reportUrl=t.reportUrl,this.listenJSError(),this.listenAssetsError(),this.listenPromiseError(),t.checkWhiteScreen&&this.listenWhiteScreenError()}listenJSError(){window.onerror=(t,e,r,s,i)=>{const o={type:"js_error",msg:t,file:e,row:r,col:s,stack:i?.stack};this.report(o)}}listenAssetsError(){window.addEventListener("error",t=>{const e=t.target;if(e instanceof HTMLScriptElement||e instanceof HTMLStyleElement||e instanceof HTMLImageElement){const r={type:"resource_error",filename:e.src||e.href,tagName:e.tagName};this.report(r)}},!0)}listenPromiseError(){window.addEventListener("unhandledrejection",t=>{const e={type:"promise_error",reason:t.reason};this.report(e)})}listenWhiteScreenError(){fl(()=>{setTimeout(()=>{const t=[[window.innerWidth/2,window.innerHeight/2],[window.innerWidth/2,window.innerHeight*.2],[window.innerWidth/2,window.innerHeight*.8],[window.innerWidth*.2,window.innerHeight/2],[window.innerWidth*.8,window.innerHeight/2]];let e=0;if(t.forEach(r=>{const[s,i]=r,a=document.elementsFromPoint(s,i)[0];(a?.tagName==="BODY"||a?.tagName==="HTML")&&e++}),e>=t.length*.8){const r={type:"whitescreen_error",reason:"检测到白屏!"};this.report(r)}},3e3)})}report(t){const e=JSON.stringify({...t,appId:this.appId,time:j1()});console.error(e),this.reportUrl&&navigator.sendBeacon(this.reportUrl,e)}}function ky(){return document.querySelector('meta[name="app-version"]')?.getAttribute("content")}async function Ly(){const e=(await(await fetch(`/index.html?t=${Date.now()}`,{cache:"no-store"})).text()).match(/<meta\s+name=["']app-version["']\s+content=["']([^"']+)["']/);return e?e[1]:null}function Ny(){window.confirm("系统已更新,是否立即刷新页面?")&&window.location.reload()}async function dD(){try{const n=ky(),t=await Ly();n&&t&&n!==t&&Ny()}catch(n){console.error("版本检测失败:",n)}}function mD(n){const t=n?.message||n?.reason?.message||"";return t.includes("Loading chunk")||t.includes("ChunkLoadError")||t.includes("Failed to fetch dynamically imported module")}function pD(){const n="app_chunk_reload_once";sessionStorage.getItem(n)?console.error("刷新后仍然失败,请提示用户手动刷新或联系管理员"):(sessionStorage.setItem(n,"1"),alert("系统资源已更新,正在为您刷新页面"),window.location.reload())}function zy(n,t){const e=typeof n=="string"?n:n.toString(),r=()=>{try{const a=window.localStorage.getItem(e);if(a)return JSON.parse(a)}catch{}},s=a=>{try{typeof a.value<"u"?window.localStorage.setItem(e,JSON.stringify(a)):window.localStorage.removeItem(e)}catch{}};return{get:()=>{const{get:a}=ji(r(),t);return a().value},set:a=>{const{set:c}=ji(r(),t),h=c(a);s(h)}}}function gD(){window.localStorage.clear()}function yD(n,t){let e=t?.value||"";if(!e){const i=`; ${document.cookie}`.split(`; ${n}=`).pop()?.split(";").shift();i&&(e=decodeURIComponent(i))}const r=()=>e,s=i=>{if(e=i,e){const o=t?.domain?"; domain="+t.domain:"",a=t?.path?"; path="+t.path:"",c=t?.secure==!0?"; secure":"";let h=n+"="+encodeURIComponent(e)+o+a+c;if(t?.days){const u="; expires="+new Date(Date.now()+t.days*864e5).toUTCString();h+=u}document.cookie=h}};return s(e),{get:r,set:s}}function bD(){const n=document.cookie.split("; ");for(let t=0;t<n.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const r=encodeURIComponent(n[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=r+"/";s.length>0;)document.cookie=r+s.join("/"),s.pop();e.shift()}}}function vD(n,t){let e;return n.objectStoreNames.contains(t)||(e=n.createObjectStore(t,{keyPath:"id"})),e}function wD(n,t=1,e){return new Promise((r,s)=>{let i;const o=window.indexedDB.open(n,t);o.onerror=()=>{s("无法使用IndexDB!")},o.onsuccess=a=>{i=a.target.result,vD(i,e),r(i)}})}function xD(n,t,e={id:1,name:"xxx"}){return new Promise((r,s)=>{const i=n.transaction([t],"readwrite");i.objectStore(t).add(e),i.oncomplete=a=>{r(a)},i.onerror=a=>{s(a)}})}const SD=["dark","light"],{get:_D,set:Vy}=zy("color-scheme"),Fy=new un,ED=Fy.pipe(ar(void 0));function By(n){switch(n){case"dark":document.documentElement.classList.add("dark"),sr(document.documentElement,"data-color-scheme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),sr(document.documentElement,"data-color-scheme","light");break}}function CD(n){return Vy(n),By(n),Fy.next(n),n}function TD(){return Lx([ED,Cy("(prefers-color-scheme: dark)")]).pipe(zt(([n,t])=>n||(n=_D(),n||(n=t?"dark":"light",Vy(n)),By(n),n)))}function ht(n,t=""){return getComputedStyle(document.documentElement).getPropertyValue(n)||t}function PD(n,t){document.documentElement.style.setProperty(n,t)}function AD(n){return{red:ht("--yz-red","#fa503c"),redPanel:ht("--yz-red-panel","#fff5f5"),redPanelBorder:ht("--yz-red-panel-border","#fac8c8"),redGradient:ht("--yz-red-gradient","#fa8c78"),green:ht("--yz-green","#00be5a"),yellow:ht("--yz-yellow","#fa8c00"),newenergy:ht("--yz-newenergy","#64c896"),newenergyPanel:ht("--yz-newenergy-panel","#ebfaf2"),foreground:ht("--yz-foreground","#5a82f0"),foregroundSecondary:ht("--yz-foreground-secondary","#e6f0ff"),foregroundGradient:ht("--yz-foreground-gradient","#66b3ff"),background:ht("--yz-background","#ffffff"),backgroundBorder:ht("--yz-background-border","#e6e6e6"),panel:ht("--yz-panel","#f5f5f5"),panelBorder:ht("--yz-panel-border","#b3b3b3"),gap:ht("--yz-gap","#cccccc"),placeholder:ht("--yz-placeholder","#8f8f8f"),font:ht("--yz-font","#333333"),fontSecondary:ht("--yz-font-secondary","#666666"),fontTertiary:ht("--yz-font-tertiary","#999999"),foregroundReverse:ht("--yz-foreground-reverse","#5a82f0"),foregroundSecondaryReverse:ht("--yz-foreground-secondary-reverse","#e6f0ff"),foregroundGradientReverse:ht("--yz-foreground-gradient-reverse","#66b3ff"),backgroundReverse:ht("--yz-background-reverse","#ffffff"),backgroundBorderReverse:ht("--yz-background-border-reverse","#e6e6e6"),panelReverse:ht("--yz-panel-reverse","#f5f5f5"),panelBorderReverse:ht("--yz-panel-border-reverse","#b3b3b3"),gapReverse:ht("--yz-gap-reverse","#cccccc"),placeholderReverse:ht("--yz-placeholder-reverse","#8f8f8f"),fontReverse:ht("--yz-font-reverse","#333333"),fontSecondaryReverse:ht("--yz-font-secondary-reverse","#666666"),fontTertiaryReverse:ht("--yz-font-tertiary-reverse","#999999"),themePrimary:ht(`--yz-theme-${n}-primary`,"#5a82f0"),themeSecondary:ht(`--yz-theme-${n}-secondary`,"#e6f0ff"),themeGradient:ht(`--yz-theme-${n}-gradient`,"#66b3ff"),themeBackground:ht(`--yz-theme-${n}-background`,"#ffffff"),themeBackgroundBorder:ht(`--yz-theme-${n}-background-border`,"#e6e6e6"),themePanel:ht(`--yz-theme-${n}-panel`,"#f5f5f5"),themePanelBorder:ht(`--yz-theme-${n}-panel-border`,"#b3b3b3"),themeGap:ht(`--yz-theme-${n}-gap`,"#cccccc"),themePlaceholder:ht(`--yz-theme-${n}-placeholder`,"#8f8f8f"),themeFont:ht(`--yz-theme-${n}-font`,"#333333"),themeFontSecondary:ht(`--yz-theme-${n}-font-secondary`,"#666666"),themeFontTertiary:ht(`--yz-theme-${n}-font-tertiary`,"#999999")}}var $y={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
139
139
  * http://hammerjs.github.io/
140
140
  *
141
141
  * Copyright (c) 2016 Jorik Tangelder;
142
142
  * Licensed under the MIT license */(function(n){(function(t,e,r,s){var i=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,u=Date.now;function l(C,P,M){return setTimeout(x(C,M),P)}function d(C,P,M){return Array.isArray(C)?(f(C,M[P],M),!0):!1}function f(C,P,M){var R;if(C)if(C.forEach)C.forEach(P,M);else if(C.length!==s)for(R=0;R<C.length;)P.call(M,C[R],R,C),R++;else for(R in C)C.hasOwnProperty(R)&&P.call(M,C[R],R,C)}function p(C,P,M){var R="DEPRECATED METHOD: "+P+`
143
143
  `+M+` AT
144
- `;return function(){var B=new Error("get-stack-trace"),W=B&&B.stack?B.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",vt=t.console&&(t.console.warn||t.console.log);return vt&&vt.call(t.console,R,W),C.apply(this,arguments)}}var m;typeof Object.assign!="function"?m=function(P){if(P===s||P===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(P),R=1;R<arguments.length;R++){var B=arguments[R];if(B!==s&&B!==null)for(var W in B)B.hasOwnProperty(W)&&(M[W]=B[W])}return M}:m=Object.assign;var b=p(function(P,M,R){for(var B=Object.keys(M),W=0;W<B.length;)(!R||R&&P[B[W]]===s)&&(P[B[W]]=M[B[W]]),W++;return P},"extend","Use `assign`."),g=p(function(P,M){return b(P,M,!0)},"merge","Use `assign`.");function w(C,P,M){var R=P.prototype,B;B=C.prototype=Object.create(R),B.constructor=C,B._super=R,M&&m(B,M)}function x(C,P){return function(){return C.apply(P,arguments)}}function v(C,P){return typeof C==a?C.apply(P&&P[0]||s,P):C}function E(C,P){return C===s?P:C}function _(C,P,M){f(L(P),function(R){C.addEventListener(R,M,!1)})}function D(C,P,M){f(L(P),function(R){C.removeEventListener(R,M,!1)})}function z(C,P){for(;C;){if(C==P)return!0;C=C.parentNode}return!1}function O(C,P){return C.indexOf(P)>-1}function L(C){return C.trim().split(/\s+/g)}function $(C,P,M){if(C.indexOf&&!M)return C.indexOf(P);for(var R=0;R<C.length;){if(M&&C[R][M]==P||!M&&C[R]===P)return R;R++}return-1}function j(C){return Array.prototype.slice.call(C,0)}function Q(C,P,M){for(var R=[],B=[],W=0;W<C.length;){var vt=P?C[W][P]:C[W];$(B,vt)<0&&R.push(C[W]),B[W]=vt,W++}return M&&(P?R=R.sort(function(te,me){return te[P]>me[P]}):R=R.sort()),R}function rt(C,P){for(var M,R,B=P[0].toUpperCase()+P.slice(1),W=0;W<i.length;){if(M=i[W],R=M?M+B:P,R in C)return R;W++}return s}var ot=1;function nt(){return ot++}function tt(C){var P=C.ownerDocument||C;return P.defaultView||P.parentWindow||t}var bt=/mobile|tablet|ip(ad|hone|od)|android/i,Y="ontouchstart"in t,F=rt(t,"PointerEvent")!==s,A=Y&&bt.test(navigator.userAgent),N="touch",H="pen",K="mouse",ct="kinect",ft=25,et=1,Tt=2,lt=4,Mt=8,ke=1,Xt=2,Pe=4,ve=8,V=16,At=Xt|Pe,Dt=ve|V,ci=At|Dt,fa=["x","y"],dt=["clientX","clientY"];function Qt(C,P){var M=this;this.manager=C,this.callback=P,this.element=C.element,this.target=C.options.inputTarget,this.domHandler=function(R){v(C.options.enable,[C])&&M.handler(R)},this.init()}Qt.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(tt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(tt(this.element),this.evWin,this.domHandler)}};function da(C){var P,M=C.options.inputClass;return M?P=M:F?P=gt:A?P=va:Y?P=Nl:P=S,new P(C,ma)}function ma(C,P,M){var R=M.pointers.length,B=M.changedPointers.length,W=P&et&&R-B===0,vt=P&(lt|Mt)&&R-B===0;M.isFirst=!!W,M.isFinal=!!vt,W&&(C.session={}),M.eventType=P,pa(C,M),C.emit("hammer.input",M),C.recognize(M),C.session.prevInput=M}function pa(C,P){var M=C.session,R=P.pointers,B=R.length;M.firstInput||(M.firstInput=ya(P)),B>1&&!M.firstMultiple?M.firstMultiple=ya(P):B===1&&(M.firstMultiple=!1);var W=M.firstInput,vt=M.firstMultiple,qt=vt?vt.center:W.center,te=P.center=hi(R);P.timeStamp=u(),P.deltaTime=P.timeStamp-W.timeStamp,P.angle=Hn(qt,te),P.distance=xr(qt,te),ga(M,P),P.offsetDirection=li(P.deltaX,P.deltaY);var me=ui(P.deltaTime,P.deltaX,P.deltaY);P.overallVelocityX=me.x,P.overallVelocityY=me.y,P.overallVelocity=h(me.x)>h(me.y)?me.x:me.y,P.scale=vt?rs(vt.pointers,R):1,P.rotation=vt?ns(vt.pointers,R):0,P.maxPointers=M.prevInput?P.pointers.length>M.prevInput.maxPointers?P.pointers.length:M.prevInput.maxPointers:P.pointers.length,Rl(M,P);var nn=C.element;z(P.srcEvent.target,nn)&&(nn=P.srcEvent.target),P.target=nn}function ga(C,P){var M=P.center,R=C.offsetDelta||{},B=C.prevDelta||{},W=C.prevInput||{};(P.eventType===et||W.eventType===lt)&&(B=C.prevDelta={x:W.deltaX||0,y:W.deltaY||0},R=C.offsetDelta={x:M.x,y:M.y}),P.deltaX=B.x+(M.x-R.x),P.deltaY=B.y+(M.y-R.y)}function Rl(C,P){var M=C.lastInterval||P,R=P.timeStamp-M.timeStamp,B,W,vt,qt;if(P.eventType!=Mt&&(R>ft||M.velocity===s)){var te=P.deltaX-M.deltaX,me=P.deltaY-M.deltaY,nn=ui(R,te,me);W=nn.x,vt=nn.y,B=h(nn.x)>h(nn.y)?nn.x:nn.y,qt=li(te,me),C.lastInterval=P}else B=M.velocity,W=M.velocityX,vt=M.velocityY,qt=M.direction;P.velocity=B,P.velocityX=W,P.velocityY=vt,P.direction=qt}function ya(C){for(var P=[],M=0;M<C.pointers.length;)P[M]={clientX:c(C.pointers[M].clientX),clientY:c(C.pointers[M].clientY)},M++;return{timeStamp:u(),pointers:P,center:hi(P),deltaX:C.deltaX,deltaY:C.deltaY}}function hi(C){var P=C.length;if(P===1)return{x:c(C[0].clientX),y:c(C[0].clientY)};for(var M=0,R=0,B=0;B<P;)M+=C[B].clientX,R+=C[B].clientY,B++;return{x:c(M/P),y:c(R/P)}}function ui(C,P,M){return{x:P/C||0,y:M/C||0}}function li(C,P){return C===P?ke:h(C)>=h(P)?C<0?Xt:Pe:P<0?ve:V}function xr(C,P,M){M||(M=fa);var R=P[M[0]]-C[M[0]],B=P[M[1]]-C[M[1]];return Math.sqrt(R*R+B*B)}function Hn(C,P,M){M||(M=fa);var R=P[M[0]]-C[M[0]],B=P[M[1]]-C[M[1]];return Math.atan2(B,R)*180/Math.PI}function ns(C,P){return Hn(P[1],P[0],dt)+Hn(C[1],C[0],dt)}function rs(C,P){return xr(P[0],P[1],dt)/xr(C[0],C[1],dt)}var fi={mousedown:et,mousemove:Tt,mouseup:lt},ba="mousedown",Sr="mousemove mouseup";function S(){this.evEl=ba,this.evWin=Sr,this.pressed=!1,Qt.apply(this,arguments)}w(S,Qt,{handler:function(P){var M=fi[P.type];M&et&&P.button===0&&(this.pressed=!0),M&Tt&&P.which!==1&&(M=lt),this.pressed&&(M&lt&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[P],changedPointers:[P],pointerType:K,srcEvent:P}))}});var I={pointerdown:et,pointermove:Tt,pointerup:lt,pointercancel:Mt,pointerout:Mt},U={2:N,3:H,4:K,5:ct},G="pointerdown",J="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(G="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel");function gt(){this.evEl=G,this.evWin=J,Qt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}w(gt,Qt,{handler:function(P){var M=this.store,R=!1,B=P.type.toLowerCase().replace("ms",""),W=I[B],vt=U[P.pointerType]||P.pointerType,qt=vt==N,te=$(M,P.pointerId,"pointerId");W&et&&(P.button===0||qt)?te<0&&(M.push(P),te=M.length-1):W&(lt|Mt)&&(R=!0),!(te<0)&&(M[te]=P,this.callback(this.manager,W,{pointers:M,changedPointers:[P],pointerType:vt,srcEvent:P}),R&&M.splice(te,1))}});var pt={touchstart:et,touchmove:Tt,touchend:lt,touchcancel:Mt},Pt="touchstart",yt="touchstart touchmove touchend touchcancel";function Xe(){this.evTarget=Pt,this.evWin=yt,this.started=!1,Qt.apply(this,arguments)}w(Xe,Qt,{handler:function(P){var M=pt[P.type];if(M===et&&(this.started=!0),!!this.started){var R=qn.call(this,P,M);M&(lt|Mt)&&R[0].length-R[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:R[0],changedPointers:R[1],pointerType:N,srcEvent:P})}}});function qn(C,P){var M=j(C.touches),R=j(C.changedTouches);return P&(lt|Mt)&&(M=Q(M.concat(R),"identifier",!0)),[M,R]}var kl={touchstart:et,touchmove:Tt,touchend:lt,touchcancel:Mt},Ll="touchstart touchmove touchend touchcancel";function va(){this.evTarget=Ll,this.targetIds={},Qt.apply(this,arguments)}w(va,Qt,{handler:function(P){var M=kl[P.type],R=MD.call(this,P,M);R&&this.callback(this.manager,M,{pointers:R[0],changedPointers:R[1],pointerType:N,srcEvent:P})}});function MD(C,P){var M=j(C.touches),R=this.targetIds;if(P&(et|Tt)&&M.length===1)return R[M[0].identifier]=!0,[M,M];var B,W,vt=j(C.changedTouches),qt=[],te=this.target;if(W=M.filter(function(me){return z(me.target,te)}),P===et)for(B=0;B<W.length;)R[W[B].identifier]=!0,B++;for(B=0;B<vt.length;)R[vt[B].identifier]&&qt.push(vt[B]),P&(lt|Mt)&&delete R[vt[B].identifier],B++;if(qt.length)return[Q(W.concat(qt),"identifier",!0),qt]}var DD=2500,Uy=25;function Nl(){Qt.apply(this,arguments);var C=x(this.handler,this);this.touch=new va(this.manager,C),this.mouse=new S(this.manager,C),this.primaryTouch=null,this.lastTouches=[]}w(Nl,Qt,{handler:function(P,M,R){var B=R.pointerType==N,W=R.pointerType==K;if(!(W&&R.sourceCapabilities&&R.sourceCapabilities.firesTouchEvents)){if(B)OD.call(this,M,R);else if(W&&ID.call(this,R))return;this.callback(P,M,R)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function OD(C,P){C&et?(this.primaryTouch=P.changedPointers[0].identifier,Yy.call(this,P)):C&(lt|Mt)&&Yy.call(this,P)}function Yy(C){var P=C.changedPointers[0];if(P.identifier===this.primaryTouch){var M={x:P.clientX,y:P.clientY};this.lastTouches.push(M);var R=this.lastTouches,B=function(){var W=R.indexOf(M);W>-1&&R.splice(W,1)};setTimeout(B,DD)}}function ID(C){for(var P=C.srcEvent.clientX,M=C.srcEvent.clientY,R=0;R<this.lastTouches.length;R++){var B=this.lastTouches[R],W=Math.abs(P-B.x),vt=Math.abs(M-B.y);if(W<=Uy&&vt<=Uy)return!0}return!1}var jy=rt(o.style,"touchAction"),Gy=jy!==s,Xy="compute",Wy="auto",zl="manipulation",_r="none",di="pan-x",mi="pan-y",wa=kD();function Vl(C,P){this.manager=C,this.set(P)}Vl.prototype={set:function(C){C==Xy&&(C=this.compute()),Gy&&this.manager.element.style&&wa[C]&&(this.manager.element.style[jy]=C),this.actions=C.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var C=[];return f(this.manager.recognizers,function(P){v(P.options.enable,[P])&&(C=C.concat(P.getTouchAction()))}),RD(C.join(" "))},preventDefaults:function(C){var P=C.srcEvent,M=C.offsetDirection;if(this.manager.session.prevented){P.preventDefault();return}var R=this.actions,B=O(R,_r)&&!wa[_r],W=O(R,mi)&&!wa[mi],vt=O(R,di)&&!wa[di];if(B){var qt=C.pointers.length===1,te=C.distance<2,me=C.deltaTime<250;if(qt&&te&&me)return}if(!(vt&&W)&&(B||W&&M&At||vt&&M&Dt))return this.preventSrc(P)},preventSrc:function(C){this.manager.session.prevented=!0,C.preventDefault()}};function RD(C){if(O(C,_r))return _r;var P=O(C,di),M=O(C,mi);return P&&M?_r:P||M?P?di:mi:O(C,zl)?zl:Wy}function kD(){if(!Gy)return!1;var C={},P=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(M){C[M]=P?t.CSS.supports("touch-action",M):!0}),C}var xa=1,Le=2,ss=4,Kn=8,_n=Kn,pi=16,en=32;function En(C){this.options=m({},this.defaults,C||{}),this.id=nt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=xa,this.simultaneous={},this.requireFail=[]}En.prototype={defaults:{},set:function(C){return m(this.options,C),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(C){if(d(C,"recognizeWith",this))return this;var P=this.simultaneous;return C=Sa(C,this),P[C.id]||(P[C.id]=C,C.recognizeWith(this)),this},dropRecognizeWith:function(C){return d(C,"dropRecognizeWith",this)?this:(C=Sa(C,this),delete this.simultaneous[C.id],this)},requireFailure:function(C){if(d(C,"requireFailure",this))return this;var P=this.requireFail;return C=Sa(C,this),$(P,C)===-1&&(P.push(C),C.requireFailure(this)),this},dropRequireFailure:function(C){if(d(C,"dropRequireFailure",this))return this;C=Sa(C,this);var P=$(this.requireFail,C);return P>-1&&this.requireFail.splice(P,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(C){return!!this.simultaneous[C.id]},emit:function(C){var P=this,M=this.state;function R(B){P.manager.emit(B,C)}M<Kn&&R(P.options.event+Hy(M)),R(P.options.event),C.additionalEvent&&R(C.additionalEvent),M>=Kn&&R(P.options.event+Hy(M))},tryEmit:function(C){if(this.canEmit())return this.emit(C);this.state=en},canEmit:function(){for(var C=0;C<this.requireFail.length;){if(!(this.requireFail[C].state&(en|xa)))return!1;C++}return!0},recognize:function(C){var P=m({},C);if(!v(this.options.enable,[this,P])){this.reset(),this.state=en;return}this.state&(_n|pi|en)&&(this.state=xa),this.state=this.process(P),this.state&(Le|ss|Kn|pi)&&this.tryEmit(P)},process:function(C){},getTouchAction:function(){},reset:function(){}};function Hy(C){return C&pi?"cancel":C&Kn?"end":C&ss?"move":C&Le?"start":""}function qy(C){return C==V?"down":C==ve?"up":C==Xt?"left":C==Pe?"right":""}function Sa(C,P){var M=P.manager;return M?M.get(C):C}function We(){En.apply(this,arguments)}w(We,En,{defaults:{pointers:1},attrTest:function(C){var P=this.options.pointers;return P===0||C.pointers.length===P},process:function(C){var P=this.state,M=C.eventType,R=P&(Le|ss),B=this.attrTest(C);return R&&(M&Mt||!B)?P|pi:R||B?M&lt?P|Kn:P&Le?P|ss:Le:en}});function _a(){We.apply(this,arguments),this.pX=null,this.pY=null}w(_a,We,{defaults:{event:"pan",threshold:10,pointers:1,direction:ci},getTouchAction:function(){var C=this.options.direction,P=[];return C&At&&P.push(mi),C&Dt&&P.push(di),P},directionTest:function(C){var P=this.options,M=!0,R=C.distance,B=C.direction,W=C.deltaX,vt=C.deltaY;return B&P.direction||(P.direction&At?(B=W===0?ke:W<0?Xt:Pe,M=W!=this.pX,R=Math.abs(C.deltaX)):(B=vt===0?ke:vt<0?ve:V,M=vt!=this.pY,R=Math.abs(C.deltaY))),C.direction=B,M&&R>P.threshold&&B&P.direction},attrTest:function(C){return We.prototype.attrTest.call(this,C)&&(this.state&Le||!(this.state&Le)&&this.directionTest(C))},emit:function(C){this.pX=C.deltaX,this.pY=C.deltaY;var P=qy(C.direction);P&&(C.additionalEvent=this.options.event+P),this._super.emit.call(this,C)}});function Fl(){We.apply(this,arguments)}w(Fl,We,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_r]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.scale-1)>this.options.threshold||this.state&Le)},emit:function(C){if(C.scale!==1){var P=C.scale<1?"in":"out";C.additionalEvent=this.options.event+P}this._super.emit.call(this,C)}});function Bl(){En.apply(this,arguments),this._timer=null,this._input=null}w(Bl,En,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Wy]},process:function(C){var P=this.options,M=C.pointers.length===P.pointers,R=C.distance<P.threshold,B=C.deltaTime>P.time;if(this._input=C,!R||!M||C.eventType&(lt|Mt)&&!B)this.reset();else if(C.eventType&et)this.reset(),this._timer=l(function(){this.state=_n,this.tryEmit()},P.time,this);else if(C.eventType&lt)return _n;return en},reset:function(){clearTimeout(this._timer)},emit:function(C){this.state===_n&&(C&&C.eventType&lt?this.manager.emit(this.options.event+"up",C):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function $l(){We.apply(this,arguments)}w($l,We,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_r]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.rotation)>this.options.threshold||this.state&Le)}});function Ul(){We.apply(this,arguments)}w(Ul,We,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:At|Dt,pointers:1},getTouchAction:function(){return _a.prototype.getTouchAction.call(this)},attrTest:function(C){var P=this.options.direction,M;return P&(At|Dt)?M=C.overallVelocity:P&At?M=C.overallVelocityX:P&Dt&&(M=C.overallVelocityY),this._super.attrTest.call(this,C)&&P&C.offsetDirection&&C.distance>this.options.threshold&&C.maxPointers==this.options.pointers&&h(M)>this.options.velocity&&C.eventType&lt},emit:function(C){var P=qy(C.offsetDirection);P&&this.manager.emit(this.options.event+P,C),this.manager.emit(this.options.event,C)}});function Ea(){En.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}w(Ea,En,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[zl]},process:function(C){var P=this.options,M=C.pointers.length===P.pointers,R=C.distance<P.threshold,B=C.deltaTime<P.time;if(this.reset(),C.eventType&et&&this.count===0)return this.failTimeout();if(R&&B&&M){if(C.eventType!=lt)return this.failTimeout();var W=this.pTime?C.timeStamp-this.pTime<P.interval:!0,vt=!this.pCenter||xr(this.pCenter,C.center)<P.posThreshold;this.pTime=C.timeStamp,this.pCenter=C.center,!vt||!W?this.count=1:this.count+=1,this._input=C;var qt=this.count%P.taps;if(qt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=_n,this.tryEmit()},P.interval,this),Le):_n}return en},failTimeout:function(){return this._timer=l(function(){this.state=en},this.options.interval,this),en},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==_n&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Cn(C,P){return P=P||{},P.recognizers=E(P.recognizers,Cn.defaults.preset),new Yl(C,P)}Cn.VERSION="2.0.7",Cn.defaults={domEvents:!1,touchAction:Xy,enable:!0,inputTarget:null,inputClass:null,preset:[[$l,{enable:!1}],[Fl,{enable:!1},["rotate"]],[Ul,{direction:At}],[_a,{direction:At},["swipe"]],[Ea],[Ea,{event:"doubletap",taps:2},["tap"]],[Bl]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var LD=1,Ky=2;function Yl(C,P){this.options=m({},Cn.defaults,P||{}),this.options.inputTarget=this.options.inputTarget||C,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=C,this.input=da(this),this.touchAction=new Vl(this,this.options.touchAction),Jy(this,!0),f(this.options.recognizers,function(M){var R=this.add(new M[0](M[1]));M[2]&&R.recognizeWith(M[2]),M[3]&&R.requireFailure(M[3])},this)}Yl.prototype={set:function(C){return m(this.options,C),C.touchAction&&this.touchAction.update(),C.inputTarget&&(this.input.destroy(),this.input.target=C.inputTarget,this.input.init()),this},stop:function(C){this.session.stopped=C?Ky:LD},recognize:function(C){var P=this.session;if(!P.stopped){this.touchAction.preventDefaults(C);var M,R=this.recognizers,B=P.curRecognizer;(!B||B&&B.state&_n)&&(B=P.curRecognizer=null);for(var W=0;W<R.length;)M=R[W],P.stopped!==Ky&&(!B||M==B||M.canRecognizeWith(B))?M.recognize(C):M.reset(),!B&&M.state&(Le|ss|Kn)&&(B=P.curRecognizer=M),W++}},get:function(C){if(C instanceof En)return C;for(var P=this.recognizers,M=0;M<P.length;M++)if(P[M].options.event==C)return P[M];return null},add:function(C){if(d(C,"add",this))return this;var P=this.get(C.options.event);return P&&this.remove(P),this.recognizers.push(C),C.manager=this,this.touchAction.update(),C},remove:function(C){if(d(C,"remove",this))return this;if(C=this.get(C),C){var P=this.recognizers,M=$(P,C);M!==-1&&(P.splice(M,1),this.touchAction.update())}return this},on:function(C,P){if(C!==s&&P!==s){var M=this.handlers;return f(L(C),function(R){M[R]=M[R]||[],M[R].push(P)}),this}},off:function(C,P){if(C!==s){var M=this.handlers;return f(L(C),function(R){P?M[R]&&M[R].splice($(M[R],P),1):delete M[R]}),this}},emit:function(C,P){this.options.domEvents&&ND(C,P);var M=this.handlers[C]&&this.handlers[C].slice();if(!(!M||!M.length)){P.type=C,P.preventDefault=function(){P.srcEvent.preventDefault()};for(var R=0;R<M.length;)M[R](P),R++}},destroy:function(){this.element&&Jy(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Jy(C,P){var M=C.element;if(M.style){var R;f(C.options.cssProps,function(B,W){R=rt(M.style,W),P?(C.oldCssProps[R]=M.style[R],M.style[R]=B):M.style[R]=C.oldCssProps[R]||""}),P||(C.oldCssProps={})}}function ND(C,P){var M=e.createEvent("Event");M.initEvent(C,!0,!0),M.gesture=P,P.target.dispatchEvent(M)}m(Cn,{INPUT_START:et,INPUT_MOVE:Tt,INPUT_END:lt,INPUT_CANCEL:Mt,STATE_POSSIBLE:xa,STATE_BEGAN:Le,STATE_CHANGED:ss,STATE_ENDED:Kn,STATE_RECOGNIZED:_n,STATE_CANCELLED:pi,STATE_FAILED:en,DIRECTION_NONE:ke,DIRECTION_LEFT:Xt,DIRECTION_RIGHT:Pe,DIRECTION_UP:ve,DIRECTION_DOWN:V,DIRECTION_HORIZONTAL:At,DIRECTION_VERTICAL:Dt,DIRECTION_ALL:ci,Manager:Yl,Input:Qt,TouchAction:Vl,TouchInput:va,MouseInput:S,PointerEventInput:gt,TouchMouseInput:Nl,SingleTouchInput:Xe,Recognizer:En,AttrRecognizer:We,Tap:Ea,Pan:_a,Swipe:Ul,Pinch:Fl,Rotate:$l,Press:Bl,on:_,off:D,each:f,merge:g,extend:b,assign:m,inherit:w,bindFn:x,prefixed:rt});var zD=typeof t<"u"?t:typeof self<"u"?self:{};zD.Hammer=Cn,typeof s=="function"&&s.amd?s(function(){return Cn}):n.exports?n.exports=Cn:t[r]=Cn})(window,document,"Hammer")})(By);var $y=By.exports;const AD=Er({__proto__:null,default:pc($y)},[$y]);y.ArrowShape=ju,y.BallShape=Zr,y.BezierEasing=Jc,y.COLOR_SCHEME=xD,y.CSSToJSEasing=vS,y.Clock=th,y.CommonKeyCode=a3,y.ConfettiShapeCombo=nl,y.CrossShape=Ku,y.CurveShape=Uu,y.CustomCanvasContext=lm,y.CustomCanvasGradient=eo,y.CustomCanvasPattern=jc,y.DOMParse=x0,y.DOMVideo=ii,y.DrawContext=sA,y.Easing=X,y.EllipseShape=Ju,y.FileUpload=Rw,y.FoxShape=Hu,y.HeartShape=Gu,y.HeartVariantShape=Xu,y.Interpolation=dn,y.LineShape=vr,y.Ls=Xn,y.Matrix=Zt,y.Matrix2=il,y.Matrix3=ra,y.Matrix4=be,y.PointsShape=ta,y.QRCode=Rn,y.RabbitShape=qu,y.RectShape=Gn,y.RingIndicatorShapeCombo=el,y.RingShape=ni,y.SVGParse=C0,y.SVGParsedPathArgsLength=Cs,y.SVGPathDataToD=qc,y.SegmentShapeCombo=Qu,y.Shape=Ft,y.ShapeCombo=ye,y.ShipShapeCombo=Zu,y.SliderShapeCombo=tl,y.StarShape=Wu,y.TWEEN=PS,y.TextShape=Qr,y.Timeline=As,y.TreeShapeCombo=Yu,y.Tween=Qc,y.Vector2=Qi,y.Vector3=Je,y.Vector4=Uc,y.WebGLCoordinateSystem=ri,y.WebGLRenderer=O3,y.WebGPUCoordinateSystem=sl,y.WebMonitor=lD,y.WebRTCClient=D3,y.WebSocketClient=tn,y.YZCanvasContext=Gc,y.a2c=no,y.a2c2=dm,y.absolutizeSVGPath=so,y.addClass=HA,y.addWatermark=G2,y.addWxJsReadyFnBeforeConfig=Il,y.ajax=bd,y.aliJsChooseImage=cD,y.aliJsGetLocation=oD,y.aliJsOpenLocation=aD,y.aliJsPreviewImage=hD,y.aliJsReady=rD,y.aliJsScan=iD,y.aliJsTradePay=sD,y.animate=fA,y.animateShapes=eA,y.animationEnd$=FM,y.animationStart$=VM,y.applyMiddleware=tE,y.atomReadAttribute=Sd,y.atomReadAttributes=wc,y.atomReadStyle=Nw,y.atomReadStyles=bc,y.atomRemoveAttribute=Bw,y.atomRemoveDataset=g3,y.atomRemoveStyle=vc,y.atomWriteAttribute=sr,y.atomWriteStyle=ps,y.attribute=An,y.base64EncodeOutputStream=rm,y.bitmapMapper=k0,y.blobToImageData=y2,y.byteArrayOutputStream=$c,y.catmullRom2bezier=aS,y.changeBrightness=Y2,y.changeCheckboxChecked=YA,y.changeDiaphaneity=j2,y.changeRadioChecked=UA,y.changeSelected=$A,y.changeSize=U2,y.checkVersion=fD,y.checkWxJsApi=R3,y.clearCookies=yD,y.clearLocalStorage=pD,y.clearSessionStorage=v3,y.clickA=fl,y.clipboard=SA,y.closeLog=mf,y.closest=NA,y.combineEpics=nE,y.combineReducers=Q_,y.compatableDownMovePoint$=HM,y.compileTemplate=eM,y.computeImageDisplayRect=d2,y.containsChild=IA,y.coords$=C3,y.createCookie=gD,y.createDefaultMousePoint=xl,y.createDraggable=KM,y.createDrop=JM,y.createElement=G0,y.createElementEventBus=f3,y.createElementNS=JA,y.createEpicMiddleware=eE,y.createEvent=Zi,y.createEventListener=Ct,y.createEventListener$=it,y.createFeRoute=S3,y.createFragment=j0,y.createFromEventPattern$=r2,y.createIndexDB=vD,y.createLocalStorage=Ny,y.createMiniReact=T3,y.createMiniVue=My,y.createMousePoint=wr,y.createObjectURL=L0,y.createOnlineStatus$=XM,y.createParentEventListener=e2,y.createReactAppStoreContext=PP,y.createReduxStore=dp,y.createSVGElement=Ln,y.createSessionStorage=Ml,y.createStorage$=GM,y.createSvgPath=Wc,y.createTextNode=ZA,y.createThunkMiddleware=sE,y.createVueAppStoreContext=hE,y.createWebSocket=Dy,y.createXMLHttpRequest=yd,y.cssAttrsToCanvasAttrs=_d,y.dataset=p3,y.dispatchClickFromEvent=l2,y.dispatchEvent=Fc,y.dispatchEventFromEvent=u2,y.documentVisible$=jM,y.domPrefixes=hl,y.domToBlob=md,y.domToString=gc,y.downloadFromSVGElement=pm,y.downloadFromSVGString=sS,y.drag$=ny,y.dragEnd$=sy,y.dragEnter$=oy,y.dragLeave$=ay,y.dragOver$=cy,y.dragStart$=ry,y.drawBitmapInCanvas=lA,y.drawQRCodeToCanvas=K2,y.drop$=iy,y.easeNameToCubicBezier=Zc,y.elValueChange$=$M,y.empty=$0,y.exceptionLoggerMiddleware=oE,y.executeTimeLoggerMiddleware=aE,y.fetchLatestVersionFromHtml=ky,y.flipSideToSide=v2,y.flipUpsideDown=w2,y.followMouseShape=QP,y.formSubmit$=UM,y.getBitmapFromCanvas=uA,y.getColorScheme$=CD,y.getCurrentVersion=Ry,y.getDOMMatrix=cl,y.getDocumentElement=es,y.getElementPositionInPage=Pl,y.getElementPositionInPage2=e3,y.getElementPositionInViewport=Tl,y.getEmSize=AA,y.getEventCurrentTarget=t2,y.getFileMD5Hash=gd,y.getFileMimeFromFileInBrowser=Iw,y.getFormSubmitData=kw,y.getImageData=tm,y.getImageDataByAIData=W2,y.getImageMainColor=b2,y.getInnerText=GA,y.getKeyCode=c3,y.getMouseButton=o3,y.getMousePositionInElement=Gt,y.getMousePositionInPage=Al,y.getMousePositionInViewport=s3,y.getPage=QM,y.getRelativeBoundingClientRect=t3,y.getRemSize=dl,y.getRootCSSVar=ht,y.getRules=Fw,y.getSVGRawStringFromElement=iS,y.getScrollWheelDelta=i3,y.getSelectedText=vA,y.getStyle=ms,y.getStyleSheets=xd,y.getThemeColors=PD,y.getVNode=Dl,y.getVerticalScrollTopPercentInPage=n3,y.getVertxRegisterBaseUrl=A3,y.getViewport=my,y.getWindow=ZM,y.gifImage=sm,y.h=Ty,y.hFromEl=ca,y.handleChunkLoadError=mD,y.hasClass=KA,y.hashChange$=x3,y.hideEl=Y0,y.hotKeyDown$=gy,y.hotKeyFile=u3,y.hotKeyFile$=yy,y.hotKeyUp$=h3,y.html=B0,y.iframePostMessage=QA,y.imageDataToBitmap=m2,y.imageDataToBlob=g2,y.imageDataToDataURL=p2,y.injectStyle=wd,y.injectWxJsConfig=I3,y.insert=ts,y.intersection$=xy,y.isActiveEl=TA,y.isChunkLoadError=dD,y.isElement=dA,y.isInViewport=r3,y.isInput=si,y.isInputCheckbox=gl,y.isInputNumber=BA,y.isInputRadio=yl,y.isInputText=FA,y.isRootEl=CA,y.isSVGElementPath=mm,y.isSVGPath=Hc,y.isSelect=pl,y.isSupportEvent=aM,y.isSupportPointer=oM,y.isSupportTouch=iM,y.isTextArea=VA,y.jpgToPng=V2,y.keyDown$=hy,y.keyPress$=BM,y.keyUp$=uy,y.l2c=hr,y.leftRotate=x2,y.loadImage=V0,y.loadLink=gA,y.loadScript=pA,y.location$=Sy,y.longhandSVGPath=hS,y.mapTDTJSSDK=uD,y.marginSharpen=z2,y.matchMedia$=Ey,y.miniVue=P3,y.mosaic=X2,y.mountVNode=Sn,y.mouseAndPointerDownMovePoint$=dy,y.mouseClick$=fM,y.mouseContextMenu$=pM,y.mouseDoubleClick$=dM,y.mouseDown$=q0,y.mouseDownMovePoint$=ly,y.mouseEnter$=uM,y.mouseLeave$=lM,y.mouseMove$=oa,y.mouseMovePoint$=WM,y.mouseOut$=hM,y.mouseOver$=cM,y.mouseUp$=K0,y.mouseWheel$=mM,y.mutation$=wy,y.nearestElement=MA,y.nextElementSibling=kA,y.normalizeSVGPath=Kc,y.ofType=rE,y.onBeforeUnload=N0,y.onDocumentReady=ll,y.openLog=ob,y.operationParser=cE,y.outputGifBase64=im,y.outputQRCodeBase64=q2,y.pan$=gM,y.panCancel$=wM,y.panDown$=EM,y.panEnd$=vM,y.panLeft$=xM,y.panMove$=yM,y.panRight$=SM,y.panStart$=bM,y.panUp$=_M,y.parent=DA,y.parents=ml,y.parseCSS=E0,y.parseSVGPath=ro,y.parseTransformToMatrix=R0,y.patchVNode=ha,y.pinch$=CM,y.pinchIn$=TM,y.pinchOut$=PM,y.pngToJpg=F2,y.pointerCancel$=Cl,y.pointerDown$=_l,y.pointerDownMovePoint$=aa,y.pointerMove$=Sl,y.pointerUp$=El,y.polymorphTween=rA,y.popStateChange$=_y,y.press$=AM,y.pressDownMove=by,y.pressDownMoveWithMouse=d3,y.pressDownMoveWithPointer=vy,y.pressDownMoveWithTouch=m3,y.preventDefault=On,y.previousElementSibling=LA,y.pull$=qM,y.q2c=Es,y.querySelectorAllToStringArray=Dw,y.radiusClip=$2,y.rawState=Ph,y.readFileInBrowser=ds,y.readStyleFromStyles=Lw,y.rectClip=B2,y.relativeSVGPath=oS,y.rem2px=PA,y.remove=XA,y.removeAllEventListeners=n2,y.removeClass=qA,y.renderVNode=Py,y.resize=H0,y.resize$=vl,y.reverseCSSToJSEasing=wS,y.reverseEaseNameToCubicBezier=xm,y.reverseEasing=gm,y.revokeObjectURL=mA,y.rightRotate=S2,y.rotate$=MM,y.rotatePoint=Ge,y.runInSandbox=tM,y.rxState=Z_,y.safeArea$=E3,y.scheduleVNodeAsap=Ol,y.scheduleVNodeImmediately=Ay,y.scroll$=YM,y.scrollParent=OA,y.scrollTo=_A,y.selectFile=F0,y.selectFileImage=bA,y.selectFileInBrowser=yc,y.setColorScheme=ED,y.setLogUploadFn=ab,y.setManualScroll=EA,y.setRem=M3,y.setRootCSSVar=TD,y.setStyle=Or,y.setWindowTitle=wA,y.shadowRoot=zA,y.sharpen=N2,y.showEl=U0,y.showUpdateDialog=Ly,y.siblings=RA,y.simulateEventFromTouch=f2,y.stateLoggerMiddleware=iE,y.stopPropagation=Qd,y.stringToDom=Ow,y.swipe$=DM,y.swipeDown$=kM,y.swipeLeft$=OM,y.swipeRight$=IM,y.swipeUp$=RM,y.tap$=ey,y.tapOutSide$=LM,y.targetToAfterDropShape=tA,y.text=jA,y.toBlackAndWhite=C2,y.toBlue=M2,y.toBlueAndGreen=I2,y.toBlueAndGrey=L2,y.toGreen=A2,y.toGreenAndGrey=k2,y.toGrey=_2,y.toGrey2=E2,y.toOpposite=T2,y.toRed=P2,y.toRedAndBlue=O2,y.toRedAndGreen=D2,y.toRedAndGrey=R2,y.toggleClass=bl,y.toggleElDisplay=WA,y.touchCancel$=ty,y.touchDownMovePoint$=fy,y.touchEnd$=Q0,y.touchMove$=J0,y.touchStart$=Z0,y.transform=ul,y.transformPath2D=hA,y.transitionEnd$=zM,y.transitionStart$=NM,y.unmountVNode=oi,y.updateVNode=la,y.urlChange$=w3,y.useDimensions=WP,y.useImmer=GP,y.useImmerReducer=XP,y.useLocale=rl,y.useReactControllableState=AP,y.useReactState=K_,y.useScrollXOverflowMask=xP,y.useVueControllableState=uE,y.useVueState=J_,y.useWindowResize$=nM,y.vibrate=xA,y.visible$=b3,y.waitElementAddedInDOM=y3,y.waitForStyleSheetsLoaded=yA,y.writeToIndexDB=wD,y.wxJsChooseImage=N3,y.wxJsDownloadImage=F3,y.wxJsDownloadVoice=q3,y.wxJsGetLocalImgData=B3,y.wxJsGetLocation=Q3,y.wxJsGetNetworkType=J3,y.wxJsLogin=nD,y.wxJsOnVoicePlayEnd=W3,y.wxJsOnVoiceRecordEnd=Y3,y.wxJsOpenLocation=Z3,y.wxJsPauseVoice=G3,y.wxJsPay=eD,y.wxJsPlayVoice=j3,y.wxJsPreviewImage=z3,y.wxJsScanQRCode=tD,y.wxJsStartRecord=$3,y.wxJsStopRecord=U3,y.wxJsStopVoice=X3,y.wxJsTranslateVoice=K3,y.wxJsUpdateAppMessageShareData=k3,y.wxJsUpdateTimelineShareData=L3,y.wxJsUploadImage=V3,y.wxJsUploadVoice=H3,y.zvhToLSVGPath=cS,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
144
+ `;return function(){var B=new Error("get-stack-trace"),W=B&&B.stack?B.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",vt=t.console&&(t.console.warn||t.console.log);return vt&&vt.call(t.console,R,W),C.apply(this,arguments)}}var m;typeof Object.assign!="function"?m=function(P){if(P===s||P===null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(P),R=1;R<arguments.length;R++){var B=arguments[R];if(B!==s&&B!==null)for(var W in B)B.hasOwnProperty(W)&&(M[W]=B[W])}return M}:m=Object.assign;var b=p(function(P,M,R){for(var B=Object.keys(M),W=0;W<B.length;)(!R||R&&P[B[W]]===s)&&(P[B[W]]=M[B[W]]),W++;return P},"extend","Use `assign`."),g=p(function(P,M){return b(P,M,!0)},"merge","Use `assign`.");function w(C,P,M){var R=P.prototype,B;B=C.prototype=Object.create(R),B.constructor=C,B._super=R,M&&m(B,M)}function x(C,P){return function(){return C.apply(P,arguments)}}function v(C,P){return typeof C==a?C.apply(P&&P[0]||s,P):C}function E(C,P){return C===s?P:C}function _(C,P,M){f(L(P),function(R){C.addEventListener(R,M,!1)})}function D(C,P,M){f(L(P),function(R){C.removeEventListener(R,M,!1)})}function z(C,P){for(;C;){if(C==P)return!0;C=C.parentNode}return!1}function O(C,P){return C.indexOf(P)>-1}function L(C){return C.trim().split(/\s+/g)}function $(C,P,M){if(C.indexOf&&!M)return C.indexOf(P);for(var R=0;R<C.length;){if(M&&C[R][M]==P||!M&&C[R]===P)return R;R++}return-1}function j(C){return Array.prototype.slice.call(C,0)}function Q(C,P,M){for(var R=[],B=[],W=0;W<C.length;){var vt=P?C[W][P]:C[W];$(B,vt)<0&&R.push(C[W]),B[W]=vt,W++}return M&&(P?R=R.sort(function(te,me){return te[P]>me[P]}):R=R.sort()),R}function rt(C,P){for(var M,R,B=P[0].toUpperCase()+P.slice(1),W=0;W<i.length;){if(M=i[W],R=M?M+B:P,R in C)return R;W++}return s}var ot=1;function nt(){return ot++}function tt(C){var P=C.ownerDocument||C;return P.defaultView||P.parentWindow||t}var bt=/mobile|tablet|ip(ad|hone|od)|android/i,Y="ontouchstart"in t,F=rt(t,"PointerEvent")!==s,A=Y&&bt.test(navigator.userAgent),N="touch",H="pen",K="mouse",ct="kinect",ft=25,et=1,Tt=2,lt=4,Mt=8,ke=1,Xt=2,Pe=4,ve=8,V=16,At=Xt|Pe,Dt=ve|V,ci=At|Dt,fa=["x","y"],dt=["clientX","clientY"];function Qt(C,P){var M=this;this.manager=C,this.callback=P,this.element=C.element,this.target=C.options.inputTarget,this.domHandler=function(R){v(C.options.enable,[C])&&M.handler(R)},this.init()}Qt.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(tt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(tt(this.element),this.evWin,this.domHandler)}};function da(C){var P,M=C.options.inputClass;return M?P=M:F?P=gt:A?P=va:Y?P=zl:P=S,new P(C,ma)}function ma(C,P,M){var R=M.pointers.length,B=M.changedPointers.length,W=P&et&&R-B===0,vt=P&(lt|Mt)&&R-B===0;M.isFirst=!!W,M.isFinal=!!vt,W&&(C.session={}),M.eventType=P,pa(C,M),C.emit("hammer.input",M),C.recognize(M),C.session.prevInput=M}function pa(C,P){var M=C.session,R=P.pointers,B=R.length;M.firstInput||(M.firstInput=ya(P)),B>1&&!M.firstMultiple?M.firstMultiple=ya(P):B===1&&(M.firstMultiple=!1);var W=M.firstInput,vt=M.firstMultiple,qt=vt?vt.center:W.center,te=P.center=hi(R);P.timeStamp=u(),P.deltaTime=P.timeStamp-W.timeStamp,P.angle=Hn(qt,te),P.distance=xr(qt,te),ga(M,P),P.offsetDirection=li(P.deltaX,P.deltaY);var me=ui(P.deltaTime,P.deltaX,P.deltaY);P.overallVelocityX=me.x,P.overallVelocityY=me.y,P.overallVelocity=h(me.x)>h(me.y)?me.x:me.y,P.scale=vt?rs(vt.pointers,R):1,P.rotation=vt?ns(vt.pointers,R):0,P.maxPointers=M.prevInput?P.pointers.length>M.prevInput.maxPointers?P.pointers.length:M.prevInput.maxPointers:P.pointers.length,kl(M,P);var nn=C.element;z(P.srcEvent.target,nn)&&(nn=P.srcEvent.target),P.target=nn}function ga(C,P){var M=P.center,R=C.offsetDelta||{},B=C.prevDelta||{},W=C.prevInput||{};(P.eventType===et||W.eventType===lt)&&(B=C.prevDelta={x:W.deltaX||0,y:W.deltaY||0},R=C.offsetDelta={x:M.x,y:M.y}),P.deltaX=B.x+(M.x-R.x),P.deltaY=B.y+(M.y-R.y)}function kl(C,P){var M=C.lastInterval||P,R=P.timeStamp-M.timeStamp,B,W,vt,qt;if(P.eventType!=Mt&&(R>ft||M.velocity===s)){var te=P.deltaX-M.deltaX,me=P.deltaY-M.deltaY,nn=ui(R,te,me);W=nn.x,vt=nn.y,B=h(nn.x)>h(nn.y)?nn.x:nn.y,qt=li(te,me),C.lastInterval=P}else B=M.velocity,W=M.velocityX,vt=M.velocityY,qt=M.direction;P.velocity=B,P.velocityX=W,P.velocityY=vt,P.direction=qt}function ya(C){for(var P=[],M=0;M<C.pointers.length;)P[M]={clientX:c(C.pointers[M].clientX),clientY:c(C.pointers[M].clientY)},M++;return{timeStamp:u(),pointers:P,center:hi(P),deltaX:C.deltaX,deltaY:C.deltaY}}function hi(C){var P=C.length;if(P===1)return{x:c(C[0].clientX),y:c(C[0].clientY)};for(var M=0,R=0,B=0;B<P;)M+=C[B].clientX,R+=C[B].clientY,B++;return{x:c(M/P),y:c(R/P)}}function ui(C,P,M){return{x:P/C||0,y:M/C||0}}function li(C,P){return C===P?ke:h(C)>=h(P)?C<0?Xt:Pe:P<0?ve:V}function xr(C,P,M){M||(M=fa);var R=P[M[0]]-C[M[0]],B=P[M[1]]-C[M[1]];return Math.sqrt(R*R+B*B)}function Hn(C,P,M){M||(M=fa);var R=P[M[0]]-C[M[0]],B=P[M[1]]-C[M[1]];return Math.atan2(B,R)*180/Math.PI}function ns(C,P){return Hn(P[1],P[0],dt)+Hn(C[1],C[0],dt)}function rs(C,P){return xr(P[0],P[1],dt)/xr(C[0],C[1],dt)}var fi={mousedown:et,mousemove:Tt,mouseup:lt},ba="mousedown",Sr="mousemove mouseup";function S(){this.evEl=ba,this.evWin=Sr,this.pressed=!1,Qt.apply(this,arguments)}w(S,Qt,{handler:function(P){var M=fi[P.type];M&et&&P.button===0&&(this.pressed=!0),M&Tt&&P.which!==1&&(M=lt),this.pressed&&(M&lt&&(this.pressed=!1),this.callback(this.manager,M,{pointers:[P],changedPointers:[P],pointerType:K,srcEvent:P}))}});var I={pointerdown:et,pointermove:Tt,pointerup:lt,pointercancel:Mt,pointerout:Mt},U={2:N,3:H,4:K,5:ct},G="pointerdown",J="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(G="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel");function gt(){this.evEl=G,this.evWin=J,Qt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}w(gt,Qt,{handler:function(P){var M=this.store,R=!1,B=P.type.toLowerCase().replace("ms",""),W=I[B],vt=U[P.pointerType]||P.pointerType,qt=vt==N,te=$(M,P.pointerId,"pointerId");W&et&&(P.button===0||qt)?te<0&&(M.push(P),te=M.length-1):W&(lt|Mt)&&(R=!0),!(te<0)&&(M[te]=P,this.callback(this.manager,W,{pointers:M,changedPointers:[P],pointerType:vt,srcEvent:P}),R&&M.splice(te,1))}});var pt={touchstart:et,touchmove:Tt,touchend:lt,touchcancel:Mt},Pt="touchstart",yt="touchstart touchmove touchend touchcancel";function Xe(){this.evTarget=Pt,this.evWin=yt,this.started=!1,Qt.apply(this,arguments)}w(Xe,Qt,{handler:function(P){var M=pt[P.type];if(M===et&&(this.started=!0),!!this.started){var R=qn.call(this,P,M);M&(lt|Mt)&&R[0].length-R[1].length===0&&(this.started=!1),this.callback(this.manager,M,{pointers:R[0],changedPointers:R[1],pointerType:N,srcEvent:P})}}});function qn(C,P){var M=j(C.touches),R=j(C.changedTouches);return P&(lt|Mt)&&(M=Q(M.concat(R),"identifier",!0)),[M,R]}var Ll={touchstart:et,touchmove:Tt,touchend:lt,touchcancel:Mt},Nl="touchstart touchmove touchend touchcancel";function va(){this.evTarget=Nl,this.targetIds={},Qt.apply(this,arguments)}w(va,Qt,{handler:function(P){var M=Ll[P.type],R=DD.call(this,P,M);R&&this.callback(this.manager,M,{pointers:R[0],changedPointers:R[1],pointerType:N,srcEvent:P})}});function DD(C,P){var M=j(C.touches),R=this.targetIds;if(P&(et|Tt)&&M.length===1)return R[M[0].identifier]=!0,[M,M];var B,W,vt=j(C.changedTouches),qt=[],te=this.target;if(W=M.filter(function(me){return z(me.target,te)}),P===et)for(B=0;B<W.length;)R[W[B].identifier]=!0,B++;for(B=0;B<vt.length;)R[vt[B].identifier]&&qt.push(vt[B]),P&(lt|Mt)&&delete R[vt[B].identifier],B++;if(qt.length)return[Q(W.concat(qt),"identifier",!0),qt]}var OD=2500,Yy=25;function zl(){Qt.apply(this,arguments);var C=x(this.handler,this);this.touch=new va(this.manager,C),this.mouse=new S(this.manager,C),this.primaryTouch=null,this.lastTouches=[]}w(zl,Qt,{handler:function(P,M,R){var B=R.pointerType==N,W=R.pointerType==K;if(!(W&&R.sourceCapabilities&&R.sourceCapabilities.firesTouchEvents)){if(B)ID.call(this,M,R);else if(W&&RD.call(this,R))return;this.callback(P,M,R)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function ID(C,P){C&et?(this.primaryTouch=P.changedPointers[0].identifier,jy.call(this,P)):C&(lt|Mt)&&jy.call(this,P)}function jy(C){var P=C.changedPointers[0];if(P.identifier===this.primaryTouch){var M={x:P.clientX,y:P.clientY};this.lastTouches.push(M);var R=this.lastTouches,B=function(){var W=R.indexOf(M);W>-1&&R.splice(W,1)};setTimeout(B,OD)}}function RD(C){for(var P=C.srcEvent.clientX,M=C.srcEvent.clientY,R=0;R<this.lastTouches.length;R++){var B=this.lastTouches[R],W=Math.abs(P-B.x),vt=Math.abs(M-B.y);if(W<=Yy&&vt<=Yy)return!0}return!1}var Gy=rt(o.style,"touchAction"),Xy=Gy!==s,Wy="compute",Hy="auto",Vl="manipulation",_r="none",di="pan-x",mi="pan-y",wa=LD();function Fl(C,P){this.manager=C,this.set(P)}Fl.prototype={set:function(C){C==Wy&&(C=this.compute()),Xy&&this.manager.element.style&&wa[C]&&(this.manager.element.style[Gy]=C),this.actions=C.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var C=[];return f(this.manager.recognizers,function(P){v(P.options.enable,[P])&&(C=C.concat(P.getTouchAction()))}),kD(C.join(" "))},preventDefaults:function(C){var P=C.srcEvent,M=C.offsetDirection;if(this.manager.session.prevented){P.preventDefault();return}var R=this.actions,B=O(R,_r)&&!wa[_r],W=O(R,mi)&&!wa[mi],vt=O(R,di)&&!wa[di];if(B){var qt=C.pointers.length===1,te=C.distance<2,me=C.deltaTime<250;if(qt&&te&&me)return}if(!(vt&&W)&&(B||W&&M&At||vt&&M&Dt))return this.preventSrc(P)},preventSrc:function(C){this.manager.session.prevented=!0,C.preventDefault()}};function kD(C){if(O(C,_r))return _r;var P=O(C,di),M=O(C,mi);return P&&M?_r:P||M?P?di:mi:O(C,Vl)?Vl:Hy}function LD(){if(!Xy)return!1;var C={},P=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(M){C[M]=P?t.CSS.supports("touch-action",M):!0}),C}var xa=1,Le=2,ss=4,Kn=8,_n=Kn,pi=16,en=32;function En(C){this.options=m({},this.defaults,C||{}),this.id=nt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=xa,this.simultaneous={},this.requireFail=[]}En.prototype={defaults:{},set:function(C){return m(this.options,C),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(C){if(d(C,"recognizeWith",this))return this;var P=this.simultaneous;return C=Sa(C,this),P[C.id]||(P[C.id]=C,C.recognizeWith(this)),this},dropRecognizeWith:function(C){return d(C,"dropRecognizeWith",this)?this:(C=Sa(C,this),delete this.simultaneous[C.id],this)},requireFailure:function(C){if(d(C,"requireFailure",this))return this;var P=this.requireFail;return C=Sa(C,this),$(P,C)===-1&&(P.push(C),C.requireFailure(this)),this},dropRequireFailure:function(C){if(d(C,"dropRequireFailure",this))return this;C=Sa(C,this);var P=$(this.requireFail,C);return P>-1&&this.requireFail.splice(P,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(C){return!!this.simultaneous[C.id]},emit:function(C){var P=this,M=this.state;function R(B){P.manager.emit(B,C)}M<Kn&&R(P.options.event+qy(M)),R(P.options.event),C.additionalEvent&&R(C.additionalEvent),M>=Kn&&R(P.options.event+qy(M))},tryEmit:function(C){if(this.canEmit())return this.emit(C);this.state=en},canEmit:function(){for(var C=0;C<this.requireFail.length;){if(!(this.requireFail[C].state&(en|xa)))return!1;C++}return!0},recognize:function(C){var P=m({},C);if(!v(this.options.enable,[this,P])){this.reset(),this.state=en;return}this.state&(_n|pi|en)&&(this.state=xa),this.state=this.process(P),this.state&(Le|ss|Kn|pi)&&this.tryEmit(P)},process:function(C){},getTouchAction:function(){},reset:function(){}};function qy(C){return C&pi?"cancel":C&Kn?"end":C&ss?"move":C&Le?"start":""}function Ky(C){return C==V?"down":C==ve?"up":C==Xt?"left":C==Pe?"right":""}function Sa(C,P){var M=P.manager;return M?M.get(C):C}function We(){En.apply(this,arguments)}w(We,En,{defaults:{pointers:1},attrTest:function(C){var P=this.options.pointers;return P===0||C.pointers.length===P},process:function(C){var P=this.state,M=C.eventType,R=P&(Le|ss),B=this.attrTest(C);return R&&(M&Mt||!B)?P|pi:R||B?M&lt?P|Kn:P&Le?P|ss:Le:en}});function _a(){We.apply(this,arguments),this.pX=null,this.pY=null}w(_a,We,{defaults:{event:"pan",threshold:10,pointers:1,direction:ci},getTouchAction:function(){var C=this.options.direction,P=[];return C&At&&P.push(mi),C&Dt&&P.push(di),P},directionTest:function(C){var P=this.options,M=!0,R=C.distance,B=C.direction,W=C.deltaX,vt=C.deltaY;return B&P.direction||(P.direction&At?(B=W===0?ke:W<0?Xt:Pe,M=W!=this.pX,R=Math.abs(C.deltaX)):(B=vt===0?ke:vt<0?ve:V,M=vt!=this.pY,R=Math.abs(C.deltaY))),C.direction=B,M&&R>P.threshold&&B&P.direction},attrTest:function(C){return We.prototype.attrTest.call(this,C)&&(this.state&Le||!(this.state&Le)&&this.directionTest(C))},emit:function(C){this.pX=C.deltaX,this.pY=C.deltaY;var P=Ky(C.direction);P&&(C.additionalEvent=this.options.event+P),this._super.emit.call(this,C)}});function Bl(){We.apply(this,arguments)}w(Bl,We,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_r]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.scale-1)>this.options.threshold||this.state&Le)},emit:function(C){if(C.scale!==1){var P=C.scale<1?"in":"out";C.additionalEvent=this.options.event+P}this._super.emit.call(this,C)}});function $l(){En.apply(this,arguments),this._timer=null,this._input=null}w($l,En,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Hy]},process:function(C){var P=this.options,M=C.pointers.length===P.pointers,R=C.distance<P.threshold,B=C.deltaTime>P.time;if(this._input=C,!R||!M||C.eventType&(lt|Mt)&&!B)this.reset();else if(C.eventType&et)this.reset(),this._timer=l(function(){this.state=_n,this.tryEmit()},P.time,this);else if(C.eventType&lt)return _n;return en},reset:function(){clearTimeout(this._timer)},emit:function(C){this.state===_n&&(C&&C.eventType&lt?this.manager.emit(this.options.event+"up",C):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function Ul(){We.apply(this,arguments)}w(Ul,We,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_r]},attrTest:function(C){return this._super.attrTest.call(this,C)&&(Math.abs(C.rotation)>this.options.threshold||this.state&Le)}});function Yl(){We.apply(this,arguments)}w(Yl,We,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:At|Dt,pointers:1},getTouchAction:function(){return _a.prototype.getTouchAction.call(this)},attrTest:function(C){var P=this.options.direction,M;return P&(At|Dt)?M=C.overallVelocity:P&At?M=C.overallVelocityX:P&Dt&&(M=C.overallVelocityY),this._super.attrTest.call(this,C)&&P&C.offsetDirection&&C.distance>this.options.threshold&&C.maxPointers==this.options.pointers&&h(M)>this.options.velocity&&C.eventType&lt},emit:function(C){var P=Ky(C.offsetDirection);P&&this.manager.emit(this.options.event+P,C),this.manager.emit(this.options.event,C)}});function Ea(){En.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}w(Ea,En,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Vl]},process:function(C){var P=this.options,M=C.pointers.length===P.pointers,R=C.distance<P.threshold,B=C.deltaTime<P.time;if(this.reset(),C.eventType&et&&this.count===0)return this.failTimeout();if(R&&B&&M){if(C.eventType!=lt)return this.failTimeout();var W=this.pTime?C.timeStamp-this.pTime<P.interval:!0,vt=!this.pCenter||xr(this.pCenter,C.center)<P.posThreshold;this.pTime=C.timeStamp,this.pCenter=C.center,!vt||!W?this.count=1:this.count+=1,this._input=C;var qt=this.count%P.taps;if(qt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=_n,this.tryEmit()},P.interval,this),Le):_n}return en},failTimeout:function(){return this._timer=l(function(){this.state=en},this.options.interval,this),en},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==_n&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Cn(C,P){return P=P||{},P.recognizers=E(P.recognizers,Cn.defaults.preset),new jl(C,P)}Cn.VERSION="2.0.7",Cn.defaults={domEvents:!1,touchAction:Wy,enable:!0,inputTarget:null,inputClass:null,preset:[[Ul,{enable:!1}],[Bl,{enable:!1},["rotate"]],[Yl,{direction:At}],[_a,{direction:At},["swipe"]],[Ea],[Ea,{event:"doubletap",taps:2},["tap"]],[$l]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var ND=1,Jy=2;function jl(C,P){this.options=m({},Cn.defaults,P||{}),this.options.inputTarget=this.options.inputTarget||C,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=C,this.input=da(this),this.touchAction=new Fl(this,this.options.touchAction),Zy(this,!0),f(this.options.recognizers,function(M){var R=this.add(new M[0](M[1]));M[2]&&R.recognizeWith(M[2]),M[3]&&R.requireFailure(M[3])},this)}jl.prototype={set:function(C){return m(this.options,C),C.touchAction&&this.touchAction.update(),C.inputTarget&&(this.input.destroy(),this.input.target=C.inputTarget,this.input.init()),this},stop:function(C){this.session.stopped=C?Jy:ND},recognize:function(C){var P=this.session;if(!P.stopped){this.touchAction.preventDefaults(C);var M,R=this.recognizers,B=P.curRecognizer;(!B||B&&B.state&_n)&&(B=P.curRecognizer=null);for(var W=0;W<R.length;)M=R[W],P.stopped!==Jy&&(!B||M==B||M.canRecognizeWith(B))?M.recognize(C):M.reset(),!B&&M.state&(Le|ss|Kn)&&(B=P.curRecognizer=M),W++}},get:function(C){if(C instanceof En)return C;for(var P=this.recognizers,M=0;M<P.length;M++)if(P[M].options.event==C)return P[M];return null},add:function(C){if(d(C,"add",this))return this;var P=this.get(C.options.event);return P&&this.remove(P),this.recognizers.push(C),C.manager=this,this.touchAction.update(),C},remove:function(C){if(d(C,"remove",this))return this;if(C=this.get(C),C){var P=this.recognizers,M=$(P,C);M!==-1&&(P.splice(M,1),this.touchAction.update())}return this},on:function(C,P){if(C!==s&&P!==s){var M=this.handlers;return f(L(C),function(R){M[R]=M[R]||[],M[R].push(P)}),this}},off:function(C,P){if(C!==s){var M=this.handlers;return f(L(C),function(R){P?M[R]&&M[R].splice($(M[R],P),1):delete M[R]}),this}},emit:function(C,P){this.options.domEvents&&zD(C,P);var M=this.handlers[C]&&this.handlers[C].slice();if(!(!M||!M.length)){P.type=C,P.preventDefault=function(){P.srcEvent.preventDefault()};for(var R=0;R<M.length;)M[R](P),R++}},destroy:function(){this.element&&Zy(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Zy(C,P){var M=C.element;if(M.style){var R;f(C.options.cssProps,function(B,W){R=rt(M.style,W),P?(C.oldCssProps[R]=M.style[R],M.style[R]=B):M.style[R]=C.oldCssProps[R]||""}),P||(C.oldCssProps={})}}function zD(C,P){var M=e.createEvent("Event");M.initEvent(C,!0,!0),M.gesture=P,P.target.dispatchEvent(M)}m(Cn,{INPUT_START:et,INPUT_MOVE:Tt,INPUT_END:lt,INPUT_CANCEL:Mt,STATE_POSSIBLE:xa,STATE_BEGAN:Le,STATE_CHANGED:ss,STATE_ENDED:Kn,STATE_RECOGNIZED:_n,STATE_CANCELLED:pi,STATE_FAILED:en,DIRECTION_NONE:ke,DIRECTION_LEFT:Xt,DIRECTION_RIGHT:Pe,DIRECTION_UP:ve,DIRECTION_DOWN:V,DIRECTION_HORIZONTAL:At,DIRECTION_VERTICAL:Dt,DIRECTION_ALL:ci,Manager:jl,Input:Qt,TouchAction:Fl,TouchInput:va,MouseInput:S,PointerEventInput:gt,TouchMouseInput:zl,SingleTouchInput:Xe,Recognizer:En,AttrRecognizer:We,Tap:Ea,Pan:_a,Swipe:Yl,Pinch:Bl,Rotate:Ul,Press:$l,on:_,off:D,each:f,merge:g,extend:b,assign:m,inherit:w,bindFn:x,prefixed:rt});var VD=typeof t<"u"?t:typeof self<"u"?self:{};VD.Hammer=Cn,typeof s=="function"&&s.amd?s(function(){return Cn}):n.exports?n.exports=Cn:t[r]=Cn})(window,document,"Hammer")})($y);var Uy=$y.exports;const MD=Er({__proto__:null,default:pc(Uy)},[Uy]);y.ArrowShape=Gu,y.BallShape=Zr,y.BezierEasing=Jc,y.COLOR_SCHEME=SD,y.CSSToJSEasing=wS,y.Clock=th,y.CommonKeyCode=c3,y.ConfettiShapeCombo=rl,y.CrossShape=Ju,y.CurveShape=Yu,y.CustomCanvasContext=fm,y.CustomCanvasGradient=eo,y.CustomCanvasPattern=jc,y.DOMParse=S0,y.DOMVideo=ii,y.DrawContext=iA,y.Easing=X,y.EllipseShape=Zu,y.FileUpload=kw,y.FoxShape=qu,y.HeartShape=Xu,y.HeartVariantShape=Wu,y.Interpolation=dn,y.LineShape=vr,y.Ls=Xn,y.Matrix=Zt,y.Matrix2=ol,y.Matrix3=ra,y.Matrix4=be,y.PointsShape=ta,y.QRCode=Rn,y.RabbitShape=Ku,y.RectShape=Gn,y.RingIndicatorShapeCombo=nl,y.RingShape=ni,y.SVGParse=T0,y.SVGParsedPathArgsLength=Cs,y.SVGPathDataToD=qc,y.SegmentShapeCombo=tl,y.Shape=Ft,y.ShapeCombo=ye,y.ShipShapeCombo=Qu,y.SliderShapeCombo=el,y.StarShape=Hu,y.TWEEN=AS,y.TextShape=Qr,y.Timeline=As,y.TreeShapeCombo=ju,y.Tween=Qc,y.Vector2=Qi,y.Vector3=Je,y.Vector4=Uc,y.WebGLCoordinateSystem=ri,y.WebGLRenderer=I3,y.WebGPUCoordinateSystem=il,y.WebMonitor=fD,y.WebRTCClient=O3,y.WebSocketClient=tn,y.YZCanvasContext=Gc,y.a2c=no,y.a2c2=mm,y.absolutizeSVGPath=so,y.addClass=qA,y.addWatermark=X2,y.addWxJsReadyFnBeforeConfig=Rl,y.ajax=vd,y.aliJsChooseImage=hD,y.aliJsGetLocation=aD,y.aliJsOpenLocation=cD,y.aliJsPreviewImage=uD,y.aliJsReady=sD,y.aliJsScan=oD,y.aliJsTradePay=iD,y.animate=dA,y.animateShapes=nA,y.animationEnd$=BM,y.animationStart$=FM,y.applyMiddleware=eE,y.atomReadAttribute=_d,y.atomReadAttributes=wc,y.atomReadStyle=zw,y.atomReadStyles=bc,y.atomRemoveAttribute=$w,y.atomRemoveDataset=y3,y.atomRemoveStyle=vc,y.atomWriteAttribute=sr,y.atomWriteStyle=ps,y.attribute=An,y.base64EncodeOutputStream=sm,y.bitmapMapper=L0,y.blobToImageData=b2,y.byteArrayOutputStream=$c,y.catmullRom2bezier=cS,y.changeBrightness=j2,y.changeCheckboxChecked=jA,y.changeDiaphaneity=G2,y.changeRadioChecked=YA,y.changeSelected=UA,y.changeSize=Y2,y.checkVersion=dD,y.checkWxJsApi=k3,y.clearCookies=bD,y.clearLocalStorage=gD,y.clearSessionStorage=w3,y.clickA=dl,y.clipboard=_A,y.closeLog=pf,y.closest=zA,y.combineEpics=rE,y.combineReducers=tE,y.compatableDownMovePoint$=qM,y.compileTemplate=nM,y.computeImageDisplayRect=m2,y.containsChild=RA,y.coords$=T3,y.createCookie=yD,y.createDefaultMousePoint=Sl,y.createDraggable=JM,y.createDrop=ZM,y.createElement=X0,y.createElementEventBus=d3,y.createElementNS=ZA,y.createEpicMiddleware=nE,y.createEvent=Zi,y.createEventListener=Ct,y.createEventListener$=it,y.createFeRoute=_3,y.createFragment=G0,y.createFromEventPattern$=s2,y.createIndexDB=wD,y.createLocalStorage=zy,y.createMiniReact=P3,y.createMiniVue=Dy,y.createMousePoint=wr,y.createObjectURL=N0,y.createOnlineStatus$=WM,y.createParentEventListener=n2,y.createReactAppStoreContext=AP,y.createReduxStore=mp,y.createSVGElement=Ln,y.createSessionStorage=Dl,y.createStorage$=XM,y.createSvgPath=Wc,y.createTextNode=QA,y.createThunkMiddleware=iE,y.createVueAppStoreContext=uE,y.createWebSocket=Oy,y.createXMLHttpRequest=bd,y.cssAttrsToCanvasAttrs=Ed,y.dataset=g3,y.dispatchClickFromEvent=f2,y.dispatchEvent=Fc,y.dispatchEventFromEvent=l2,y.documentVisible$=GM,y.domPrefixes=ul,y.domToBlob=pd,y.domToString=gc,y.downloadFromSVGElement=gm,y.downloadFromSVGString=iS,y.drag$=ry,y.dragEnd$=iy,y.dragEnter$=ay,y.dragLeave$=cy,y.dragOver$=hy,y.dragStart$=sy,y.drawBitmapInCanvas=fA,y.drawQRCodeToCanvas=J2,y.drop$=oy,y.easeNameToCubicBezier=Zc,y.elValueChange$=UM,y.empty=U0,y.exceptionLoggerMiddleware=aE,y.executeTimeLoggerMiddleware=cE,y.fetchLatestVersionFromHtml=Ly,y.flipSideToSide=w2,y.flipUpsideDown=x2,y.followMouseShape=tA,y.formSubmit$=YM,y.getBitmapFromCanvas=lA,y.getColorScheme$=TD,y.getCurrentVersion=ky,y.getDOMMatrix=hl,y.getDocumentElement=es,y.getElementPositionInPage=Al,y.getElementPositionInPage2=n3,y.getElementPositionInViewport=Pl,y.getEmSize=MA,y.getEventCurrentTarget=e2,y.getFileMD5Hash=yd,y.getFileMimeFromFileInBrowser=Rw,y.getFormSubmitData=Lw,y.getImageData=em,y.getImageDataByAIData=H2,y.getImageMainColor=v2,y.getInnerText=XA,y.getKeyCode=h3,y.getMouseButton=a3,y.getMousePositionInElement=Gt,y.getMousePositionInPage=Ml,y.getMousePositionInViewport=i3,y.getPage=t3,y.getRelativeBoundingClientRect=e3,y.getRemSize=ml,y.getRootCSSVar=ht,y.getRules=Bw,y.getSVGRawStringFromElement=oS,y.getScrollWheelDelta=o3,y.getSelectedText=wA,y.getStyle=ms,y.getStyleSheets=Sd,y.getThemeColors=AD,y.getVNode=Ol,y.getVerticalScrollTopPercentInPage=r3,y.getVertxRegisterBaseUrl=M3,y.getViewport=py,y.getWindow=QM,y.gifImage=im,y.h=Py,y.hFromEl=ca,y.handleChunkLoadError=pD,y.hasClass=JA,y.hashChange$=S3,y.hideEl=j0,y.hotKeyDown$=yy,y.hotKeyFile=l3,y.hotKeyFile$=by,y.hotKeyUp$=u3,y.html=$0,y.iframePostMessage=tM,y.imageDataToBitmap=p2,y.imageDataToBlob=y2,y.imageDataToDataURL=g2,y.injectStyle=xd,y.injectWxJsConfig=R3,y.insert=ts,y.intersection$=Sy,y.isActiveEl=PA,y.isChunkLoadError=mD,y.isElement=mA,y.isInViewport=s3,y.isInput=si,y.isInputCheckbox=yl,y.isInputNumber=$A,y.isInputRadio=bl,y.isInputText=BA,y.isRootEl=TA,y.isSVGElementPath=pm,y.isSVGPath=Hc,y.isSelect=gl,y.isSupportEvent=cM,y.isSupportPointer=aM,y.isSupportTouch=oM,y.isTextArea=FA,y.jpgToPng=F2,y.keyDown$=uy,y.keyPress$=$M,y.keyUp$=ly,y.l2c=hr,y.leftRotate=S2,y.loadImage=F0,y.loadLink=yA,y.loadScript=gA,y.location$=_y,y.longhandSVGPath=uS,y.mapTDTJSSDK=lD,y.marginSharpen=V2,y.matchMedia$=Cy,y.miniVue=A3,y.mosaic=W2,y.mountVNode=Sn,y.mouseAndPointerDownMovePoint$=my,y.mouseClick$=dM,y.mouseContextMenu$=gM,y.mouseDoubleClick$=mM,y.mouseDown$=K0,y.mouseDownMovePoint$=fy,y.mouseEnter$=lM,y.mouseLeave$=fM,y.mouseMove$=oa,y.mouseMovePoint$=HM,y.mouseOut$=uM,y.mouseOver$=hM,y.mouseUp$=J0,y.mouseWheel$=pM,y.mutation$=xy,y.nearestElement=DA,y.nextElementSibling=LA,y.normalizeSVGPath=Kc,y.ofType=sE,y.onBeforeUnload=z0,y.onDocumentReady=fl,y.openLog=ab,y.operationParser=hE,y.outputGifBase64=om,y.outputQRCodeBase64=K2,y.pan$=yM,y.panCancel$=xM,y.panDown$=CM,y.panEnd$=wM,y.panLeft$=SM,y.panMove$=bM,y.panRight$=_M,y.panStart$=vM,y.panUp$=EM,y.parent=OA,y.parents=pl,y.parseCSS=C0,y.parseSVGPath=ro,y.parseTransformToMatrix=k0,y.patchVNode=ha,y.pinch$=TM,y.pinchIn$=PM,y.pinchOut$=AM,y.pngToJpg=B2,y.pointerCancel$=Tl,y.pointerDown$=El,y.pointerDownMovePoint$=aa,y.pointerMove$=_l,y.pointerUp$=Cl,y.polymorphTween=sA,y.popStateChange$=Ey,y.press$=MM,y.pressDownMove=vy,y.pressDownMoveWithMouse=m3,y.pressDownMoveWithPointer=wy,y.pressDownMoveWithTouch=p3,y.preventDefault=On,y.previousElementSibling=NA,y.pull$=KM,y.q2c=Es,y.querySelectorAllToStringArray=Ow,y.radiusClip=U2,y.rawState=Ah,y.readFileInBrowser=ds,y.readStyleFromStyles=Nw,y.rectClip=$2,y.relativeSVGPath=aS,y.rem2px=AA,y.remove=WA,y.removeAllEventListeners=r2,y.removeClass=KA,y.renderVNode=Ay,y.resize=q0,y.resize$=wl,y.reverseCSSToJSEasing=xS,y.reverseEaseNameToCubicBezier=Sm,y.reverseEasing=ym,y.revokeObjectURL=pA,y.rightRotate=_2,y.rotate$=DM,y.rotatePoint=Ge,y.runInSandbox=eM,y.rxState=Q_,y.safeArea$=C3,y.scheduleVNodeAsap=Il,y.scheduleVNodeImmediately=My,y.scroll$=jM,y.scrollParent=IA,y.scrollTo=EA,y.selectFile=B0,y.selectFileImage=vA,y.selectFileInBrowser=yc,y.setColorScheme=CD,y.setLogUploadFn=cb,y.setManualScroll=CA,y.setRem=D3,y.setRootCSSVar=PD,y.setStyle=Or,y.setWindowTitle=xA,y.shadowRoot=VA,y.sharpen=z2,y.showEl=Y0,y.showUpdateDialog=Ny,y.siblings=kA,y.simulateEventFromTouch=d2,y.stateLoggerMiddleware=oE,y.stopPropagation=tm,y.stringToDom=Iw,y.swipe$=OM,y.swipeDown$=LM,y.swipeLeft$=IM,y.swipeRight$=RM,y.swipeUp$=kM,y.tap$=ny,y.tapOutSide$=NM,y.targetToAfterDropShape=eA,y.text=GA,y.toBlackAndWhite=T2,y.toBlue=D2,y.toBlueAndGreen=R2,y.toBlueAndGrey=N2,y.toGreen=M2,y.toGreenAndGrey=L2,y.toGrey=E2,y.toGrey2=C2,y.toOpposite=P2,y.toRed=A2,y.toRedAndBlue=I2,y.toRedAndGreen=O2,y.toRedAndGrey=k2,y.toggleClass=vl,y.toggleElDisplay=HA,y.touchCancel$=ey,y.touchDownMovePoint$=dy,y.touchEnd$=ty,y.touchMove$=Z0,y.touchStart$=Q0,y.transform=ll,y.transformPath2D=uA,y.transitionEnd$=VM,y.transitionStart$=zM,y.unmountVNode=oi,y.updateVNode=la,y.urlChange$=x3,y.useDimensions=HP,y.useImmer=XP,y.useImmerReducer=WP,y.useLocale=sl,y.useReactControllableState=MP,y.useReactState=J_,y.useScrollXOverflowMask=SP,y.useVueControllableState=lE,y.useVueState=Z_,y.useWindowResize$=rM,y.vibrate=SA,y.visible$=v3,y.waitElementAddedInDOM=b3,y.waitForStyleSheetsLoaded=bA,y.writeToIndexDB=xD,y.wxJsChooseImage=z3,y.wxJsDownloadImage=B3,y.wxJsDownloadVoice=K3,y.wxJsGetLocalImgData=$3,y.wxJsGetLocation=tD,y.wxJsGetNetworkType=Z3,y.wxJsLogin=rD,y.wxJsOnVoicePlayEnd=H3,y.wxJsOnVoiceRecordEnd=j3,y.wxJsOpenLocation=Q3,y.wxJsPauseVoice=X3,y.wxJsPay=nD,y.wxJsPlayVoice=G3,y.wxJsPreviewImage=V3,y.wxJsScanQRCode=eD,y.wxJsStartRecord=U3,y.wxJsStopRecord=Y3,y.wxJsStopVoice=W3,y.wxJsTranslateVoice=J3,y.wxJsUpdateAppMessageShareData=L3,y.wxJsUpdateTimelineShareData=N3,y.wxJsUploadImage=F3,y.wxJsUploadVoice=q3,y.zvhToLSVGPath=hS,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
145
145
  //# sourceMappingURL=zyzgroup_core_web.umd.cjs.map