reacthub-pixitweenjs 0.2.49 → 0.2.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ne,
|
|
1
|
+
(function(ne,_t){typeof exports=="object"&&typeof module<"u"?_t(exports,require("react"),require("@pixi/react"),require("gsap"),require("pixi.js"),require("reacthub-react-bindings"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","gsap","pixi.js","reacthub-react-bindings","@pixi/sound"],_t):(ne=typeof globalThis<"u"?globalThis:ne||self,_t(ne["reacthub-pixitweenjs"]={},ne.React,ne.PIXIReact,ne.gsap,ne.PIXI,ne.reacthubReactBindings,ne.PIXI.sound))})(this,function(ne,_t,pe,Xe,vy,gy,yy){"use strict";function Vf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Tt=Vf(_t),wn=Vf(vy);var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function my(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Wf={exports:{}},Ls={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var _y=bt,by=Symbol.for("react.element"),xy=Symbol.for("react.fragment"),Ey=Object.prototype.hasOwnProperty,wy=_y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ty={key:!0,ref:!0,__self:!0,__source:!0};function Xf(e,t,r){var n,i={},a=null,l=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)Ey.call(t,n)&&!Ty.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:by,type:e,key:a,ref:l,props:i,_owner:wy.current}}Ls.Fragment=xy,Ls.jsx=Xf,Ls.jsxs=Xf,Wf.exports=Ls;var Zt=Wf.exports,An=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(An||{}),Kf=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Kf||{}),Bo=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Bo||{}),Rt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Rt||{}),an=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(an||{}),yt=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(yt||{}),Zn=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(Zn||{}),Ht=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Ht||{}),Uo=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(Uo||{}),qr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(qr||{}),Vi=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Vi||{}),Sn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Sn||{}),on=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(on||{}),On=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(On||{}),Do=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(Do||{}),sr=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(sr||{}),xe=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(xe||{}),be=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(be||{}),Nr=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Nr||{});const jt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var $o=/iPhone/i,Yf=/iPod/i,Zf=/iPad/i,Jf=/\biOS-universal(?:.+)Mac\b/i,Go=/\bAndroid(?:.+)Mobile\b/i,Qf=/Android/i,Jn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Fs=/Silk/i,jr=/Windows Phone/i,tc=/\bWindows(?:.+)ARM\b/i,ec=/BlackBerry/i,rc=/BB10/i,nc=/Opera Mini/i,ic=/\b(CriOS|Chrome)(?:.+)Mobile/i,sc=/Mobile(?:.+)Firefox\b/i,ac=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function Ay(e){return function(t){return t.test(e)}}function oc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=Ay(r),a={apple:{phone:i($o)&&!i(jr),ipod:i(Yf),tablet:!i($o)&&(i(Zf)||ac(t))&&!i(jr),universal:i(Jf),device:(i($o)||i(Yf)||i(Zf)||i(Jf)||ac(t))&&!i(jr)},amazon:{phone:i(Jn),tablet:!i(Jn)&&i(Fs),device:i(Jn)||i(Fs)},android:{phone:!i(jr)&&i(Jn)||!i(jr)&&i(Go),tablet:!i(jr)&&!i(Jn)&&!i(Go)&&(i(Fs)||i(Qf)),device:!i(jr)&&(i(Jn)||i(Fs)||i(Go)||i(Qf))||i(/\bokhttp\b/i)},windows:{phone:i(jr),tablet:i(tc),device:i(jr)||i(tc)},other:{blackberry:i(ec),blackberry10:i(rc),opera:i(nc),firefox:i(sc),chrome:i(ic),device:i(ec)||i(rc)||i(nc)||i(sc)||i(ic)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const Qn=(oc.default??oc)(globalThis.navigator);jt.RETINA_PREFIX=/@([0-9\.]+)x/,jt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var lc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function a(f,h,p,d,c){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,d||f,c),y=r?r+h:h;return f._events[y]?f._events[y].fn?f._events[y]=[f._events[y],v]:f._events[y].push(v):(f._events[y]=v,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],p,d;if(this._eventsCount===0)return h;for(d in p=this._events)t.call(p,d)&&h.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},u.prototype.listeners=function(h){var p=r?r+h:h,d=this._events[p];if(!d)return[];if(d.fn)return[d.fn];for(var c=0,v=d.length,y=new Array(v);c<v;c++)y[c]=d[c].fn;return y},u.prototype.listenerCount=function(h){var p=r?r+h:h,d=this._events[p];return d?d.fn?1:d.length:0},u.prototype.emit=function(h,p,d,c,v,y){var m=r?r+h:h;if(!this._events[m])return!1;var _=this._events[m],b=arguments.length,E,w;if(_.fn){switch(_.once&&this.removeListener(h,_.fn,void 0,!0),b){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,p),!0;case 3:return _.fn.call(_.context,p,d),!0;case 4:return _.fn.call(_.context,p,d,c),!0;case 5:return _.fn.call(_.context,p,d,c,v),!0;case 6:return _.fn.call(_.context,p,d,c,v,y),!0}for(w=1,E=new Array(b-1);w<b;w++)E[w-1]=arguments[w];_.fn.apply(_.context,E)}else{var x=_.length,A;for(w=0;w<x;w++)switch(_[w].once&&this.removeListener(h,_[w].fn,void 0,!0),b){case 1:_[w].fn.call(_[w].context);break;case 2:_[w].fn.call(_[w].context,p);break;case 3:_[w].fn.call(_[w].context,p,d);break;case 4:_[w].fn.call(_[w].context,p,d,c);break;default:if(!E)for(A=1,E=new Array(b-1);A<b;A++)E[A-1]=arguments[A];_[w].fn.apply(_[w].context,E)}}return!0},u.prototype.on=function(h,p,d){return a(this,h,p,d,!1)},u.prototype.once=function(h,p,d){return a(this,h,p,d,!0)},u.prototype.removeListener=function(h,p,d,c){var v=r?r+h:h;if(!this._events[v])return this;if(!p)return l(this,v),this;var y=this._events[v];if(y.fn)y.fn===p&&(!c||y.once)&&(!d||y.context===d)&&l(this,v);else{for(var m=0,_=[],b=y.length;m<b;m++)(y[m].fn!==p||c&&!y[m].once||d&&y[m].context!==d)&&_.push(y[m]);_.length?this._events[v]=_.length===1?_[0]:_:l(this,v)}return this},u.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&l(this,p)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(lc);var Sy=lc.exports;const Bs=Tn(Sy);var qo={exports:{}};qo.exports=Us,qo.exports.default=Us;function Us(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=uc(e,0,i,r,!0),l=[];if(!a||a.next===a.prev)return l;var u,f,h,p,d,c,v;if(n&&(a=Ny(e,t,a,r)),e.length>80*r){u=h=e[0],f=p=e[1];for(var y=r;y<i;y+=r)d=e[y],c=e[y+1],d<u&&(u=d),c<f&&(f=c),d>h&&(h=d),c>p&&(p=c);v=Math.max(h-u,p-f),v=v!==0?32767/v:0}return Wi(a,l,r,u,f,v,0),l}function uc(e,t,r,n,i){var a,l;if(i===zo(e,t,r,n)>0)for(a=t;a<r;a+=n)l=hc(a,e[a],e[a+1],l);else for(a=r-n;a>=t;a-=n)l=hc(a,e[a],e[a+1],l);return l&&Ds(l,l.next)&&(Ki(l),l=l.next),l}function In(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ds(r,r.next)||ce(r.prev,r,r.next)===0)){if(Ki(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Wi(e,t,r,n,i,a,l){if(e){!l&&a&&Fy(e,n,i,a);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,a?Iy(e,n,i,a):Oy(e)){t.push(f.i/r|0),t.push(e.i/r|0),t.push(h.i/r|0),Ki(e),e=h.next,u=h.next;continue}if(e=h,e===u){l?l===1?(e=Ry(In(e),t,r),Wi(e,t,r,n,i,a,2)):l===2&&Cy(e,t,r,n,i,a):Wi(In(e),t,r,n,i,a,1);break}}}}function Oy(e){var t=e.prev,r=e,n=e.next;if(ce(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,l=n.x,u=t.y,f=r.y,h=n.y,p=i<a?i<l?i:l:a<l?a:l,d=u<f?u<h?u:h:f<h?f:h,c=i>a?i>l?i:l:a>l?a:l,v=u>f?u>h?u:h:f>h?f:h,y=n.next;y!==t;){if(y.x>=p&&y.x<=c&&y.y>=d&&y.y<=v&&ti(i,u,a,f,l,h,y.x,y.y)&&ce(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function Iy(e,t,r,n){var i=e.prev,a=e,l=e.next;if(ce(i,a,l)>=0)return!1;for(var u=i.x,f=a.x,h=l.x,p=i.y,d=a.y,c=l.y,v=u<f?u<h?u:h:f<h?f:h,y=p<d?p<c?p:c:d<c?d:c,m=u>f?u>h?u:h:f>h?f:h,_=p>d?p>c?p:c:d>c?d:c,b=jo(v,y,t,r,n),E=jo(m,_,t,r,n),w=e.prevZ,x=e.nextZ;w&&w.z>=b&&x&&x.z<=E;){if(w.x>=v&&w.x<=m&&w.y>=y&&w.y<=_&&w!==i&&w!==l&&ti(u,p,f,d,h,c,w.x,w.y)&&ce(w.prev,w,w.next)>=0||(w=w.prevZ,x.x>=v&&x.x<=m&&x.y>=y&&x.y<=_&&x!==i&&x!==l&&ti(u,p,f,d,h,c,x.x,x.y)&&ce(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;w&&w.z>=b;){if(w.x>=v&&w.x<=m&&w.y>=y&&w.y<=_&&w!==i&&w!==l&&ti(u,p,f,d,h,c,w.x,w.y)&&ce(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;x&&x.z<=E;){if(x.x>=v&&x.x<=m&&x.y>=y&&x.y<=_&&x!==i&&x!==l&&ti(u,p,f,d,h,c,x.x,x.y)&&ce(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Ry(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!Ds(i,a)&&fc(i,n,n.next,a)&&Xi(i,a)&&Xi(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Ki(n),Ki(n.next),n=e=a),n=n.next}while(n!==e);return In(n)}function Cy(e,t,r,n,i,a){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&Dy(l,u)){var f=cc(l,u);l=In(l,l.next),f=In(f,f.next),Wi(l,t,r,n,i,a,0),Wi(f,t,r,n,i,a,0);return}u=u.next}l=l.next}while(l!==e)}function Ny(e,t,r,n){var i=[],a,l,u,f,h;for(a=0,l=t.length;a<l;a++)u=t[a]*n,f=a<l-1?t[a+1]*n:e.length,h=uc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(Uy(h));for(i.sort(Py),a=0;a<i.length;a++)r=My(i[a],r);return r}function Py(e,t){return e.x-t.x}function My(e,t){var r=ky(e,t);if(!r)return t;var n=cc(r,e);return In(n,n.next),In(r,r.next)}function ky(e,t){var r=t,n=e.x,i=e.y,a=-1/0,l;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var u=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(u<=n&&u>a&&(a=u,l=r.x<r.next.x?r:r.next,u===n))return l}r=r.next}while(r!==t);if(!l)return null;var f=l,h=l.x,p=l.y,d=1/0,c;r=l;do n>=r.x&&r.x>=h&&n!==r.x&&ti(i<p?n:a,i,h,p,i<p?a:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),Xi(r,e)&&(c<d||c===d&&(r.x>l.x||r.x===l.x&&Ly(l,r)))&&(l=r,d=c)),r=r.next;while(r!==f);return l}function Ly(e,t){return ce(e.prev,e,t.prev)<0&&ce(t.next,e,e.next)<0}function Fy(e,t,r,n){var i=e;do i.z===0&&(i.z=jo(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,By(i)}function By(e){var t,r,n,i,a,l,u,f,h=1;do{for(r=e,e=null,a=null,l=0;r;){for(l++,n=r,u=0,t=0;t<h&&(u++,n=n.nextZ,!!n);t++);for(f=h;u>0||f>0&&n;)u!==0&&(f===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,f--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,h*=2}while(l>1);return e}function jo(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Uy(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ti(e,t,r,n,i,a,l,u){return(i-l)*(t-u)>=(e-l)*(a-u)&&(e-l)*(n-u)>=(r-l)*(t-u)&&(r-l)*(a-u)>=(i-l)*(n-u)}function Dy(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$y(e,t)&&(Xi(e,t)&&Xi(t,e)&&Gy(e,t)&&(ce(e.prev,e,t.prev)||ce(e,t.prev,t))||Ds(e,t)&&ce(e.prev,e,e.next)>0&&ce(t.prev,t,t.next)>0)}function ce(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ds(e,t){return e.x===t.x&&e.y===t.y}function fc(e,t,r,n){var i=Gs(ce(e,t,r)),a=Gs(ce(e,t,n)),l=Gs(ce(r,n,e)),u=Gs(ce(r,n,t));return!!(i!==a&&l!==u||i===0&&$s(e,r,t)||a===0&&$s(e,n,t)||l===0&&$s(r,e,n)||u===0&&$s(r,t,n))}function $s(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Gs(e){return e>0?1:e<0?-1:0}function $y(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&fc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Xi(e,t){return ce(e.prev,e,e.next)<0?ce(e,t,e.next)>=0&&ce(e,e.prev,t)>=0:ce(e,t,e.prev)<0||ce(e,e.next,t)<0}function Gy(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function cc(e,t){var r=new Ho(e.i,e.x,e.y),n=new Ho(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function hc(e,t,r,n){var i=new Ho(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ki(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ho(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Us.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,l=Math.abs(zo(e,0,a,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,p=u<f-1?t[u+1]*r:e.length;l-=Math.abs(zo(e,h,p,r))}var d=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,y=n[u+2]*r;d+=Math.abs((e[c]-e[y])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[y+1]-e[c+1]))}return l===0&&d===0?0:Math.abs((d-l)/l)};function zo(e,t,r,n){for(var i=0,a=t,l=r-n;a<r;a+=n)i+=(e[l]-e[a])*(e[a+1]+e[l+1]),l=a;return i}Us.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var l=0;l<t;l++)r.vertices.push(e[i][a][l]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var qy=qo.exports;const jy=Tn(qy);var qs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */qs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof Xe=="object"&&Xe;(a.global===a||a.window===a||a.self===a)&&(r=a);var l,u=2147483647,f=36,h=1,p=26,d=38,c=700,v=72,y=128,m="-",_=/^xn--/,b=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-h,A=Math.floor,P=String.fromCharCode,S;function O(U){throw new RangeError(w[U])}function L(U,N){for(var D=U.length,q=[];D--;)q[D]=N(U[D]);return q}function R(U,N){var D=U.split("@"),q="";D.length>1&&(q=D[0]+"@",U=D[1]),U=U.replace(E,".");var Z=U.split("."),K=L(Z,N).join(".");return q+K}function I(U){for(var N=[],D=0,q=U.length,Z,K;D<q;)Z=U.charCodeAt(D++),Z>=55296&&Z<=56319&&D<q?(K=U.charCodeAt(D++),(K&64512)==56320?N.push(((Z&1023)<<10)+(K&1023)+65536):(N.push(Z),D--)):N.push(Z);return N}function M(U){return L(U,function(N){var D="";return N>65535&&(N-=65536,D+=P(N>>>10&1023|55296),N=56320|N&1023),D+=P(N),D}).join("")}function C(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:f}function F(U,N){return U+22+75*(U<26)-((N!=0)<<5)}function j(U,N,D){var q=0;for(U=D?A(U/c):U>>1,U+=A(U/N);U>x*p>>1;q+=f)U=A(U/x);return A(q+(x+1)*U/(U+d))}function X(U){var N=[],D=U.length,q,Z=0,K=y,G=v,z,tt,et,nt,ht,gt,mt,xt,It;for(z=U.lastIndexOf(m),z<0&&(z=0),tt=0;tt<z;++tt)U.charCodeAt(tt)>=128&&O("not-basic"),N.push(U.charCodeAt(tt));for(et=z>0?z+1:0;et<D;){for(nt=Z,ht=1,gt=f;et>=D&&O("invalid-input"),mt=C(U.charCodeAt(et++)),(mt>=f||mt>A((u-Z)/ht))&&O("overflow"),Z+=mt*ht,xt=gt<=G?h:gt>=G+p?p:gt-G,!(mt<xt);gt+=f)It=f-xt,ht>A(u/It)&&O("overflow"),ht*=It;q=N.length+1,G=j(Z-nt,q,nt==0),A(Z/q)>u-K&&O("overflow"),K+=A(Z/q),Z%=q,N.splice(Z++,0,K)}return M(N)}function V(U){var N,D,q,Z,K,G,z,tt,et,nt,ht,gt=[],mt,xt,It,ae;for(U=I(U),mt=U.length,N=y,D=0,K=v,G=0;G<mt;++G)ht=U[G],ht<128&>.push(P(ht));for(q=Z=gt.length,Z&>.push(m);q<mt;){for(z=u,G=0;G<mt;++G)ht=U[G],ht>=N&&ht<z&&(z=ht);for(xt=q+1,z-N>A((u-D)/xt)&&O("overflow"),D+=(z-N)*xt,N=z,G=0;G<mt;++G)if(ht=U[G],ht<N&&++D>u&&O("overflow"),ht==N){for(tt=D,et=f;nt=et<=K?h:et>=K+p?p:et-K,!(tt<nt);et+=f)ae=tt-nt,It=f-nt,gt.push(P(F(nt+ae%It,0))),tt=A(ae/It);gt.push(P(F(tt,0))),K=j(D,xt,q==Z),D=0,++q}++D,++N}return gt.join("")}function it(U){return R(U,function(N){return _.test(N)?X(N.slice(4).toLowerCase()):N})}function Y(U){return R(U,function(N){return b.test(N)?"xn--"+V(N):N})}if(l={version:"1.4.1",ucs2:{decode:I,encode:M},decode:X,encode:V,toASCII:Y,toUnicode:it},n&&i)if(e.exports==n)i.exports=l;else for(S in l)l.hasOwnProperty(S)&&(n[S]=l[S]);else r.punycode=l})(Xe)}(qs,qs.exports);var Hy=qs.exports,zy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},dc=typeof Symbol<"u"&&Symbol,Vy=zy,Wy=function(){return typeof dc!="function"||typeof Symbol!="function"||typeof dc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Vy()},pc={foo:{}},Xy=Object,Ky=function(){return{__proto__:pc}.foo===pc.foo&&!({__proto__:null}instanceof Xy)},Yy="Function.prototype.bind called on incompatible ",Vo=Array.prototype.slice,Zy=Object.prototype.toString,Jy="[object Function]",Qy=function(t){var r=this;if(typeof r!="function"||Zy.call(r)!==Jy)throw new TypeError(Yy+r);for(var n=Vo.call(arguments,1),i,a=function(){if(this instanceof i){var p=r.apply(this,n.concat(Vo.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(Vo.call(arguments)))},l=Math.max(0,r.length-n.length),u=[],f=0;f<l;f++)u.push("$"+f);if(i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var h=function(){};h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},tm=Qy,Wo=Function.prototype.bind||tm,em=Wo,rm=em.call(Function.call,Object.prototype.hasOwnProperty),Dt,ei=SyntaxError,vc=Function,ri=TypeError,Xo=function(e){try{return vc('"use strict"; return ('+e+").constructor;")()}catch{}},Rn=Object.getOwnPropertyDescriptor;if(Rn)try{Rn({},"")}catch{Rn=null}var Ko=function(){throw new ri},nm=Rn?function(){try{return arguments.callee,Ko}catch{try{return Rn(arguments,"callee").get}catch{return Ko}}}():Ko,ni=Wy(),im=Ky(),Te=Object.getPrototypeOf||(im?function(e){return e.__proto__}:null),ii={},sm=typeof Uint8Array>"u"||!Te?Dt:Te(Uint8Array),Cn={"%AggregateError%":typeof AggregateError>"u"?Dt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Dt:ArrayBuffer,"%ArrayIteratorPrototype%":ni&&Te?Te([][Symbol.iterator]()):Dt,"%AsyncFromSyncIteratorPrototype%":Dt,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?Dt:Atomics,"%BigInt%":typeof BigInt>"u"?Dt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Dt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Dt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Dt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Dt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Dt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Dt:FinalizationRegistry,"%Function%":vc,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?Dt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Dt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Dt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni&&Te?Te(Te([][Symbol.iterator]())):Dt,"%JSON%":typeof JSON=="object"?JSON:Dt,"%Map%":typeof Map>"u"?Dt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ni||!Te?Dt:Te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Dt:Promise,"%Proxy%":typeof Proxy>"u"?Dt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Dt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Dt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ni||!Te?Dt:Te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Dt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni&&Te?Te(""[Symbol.iterator]()):Dt,"%Symbol%":ni?Symbol:Dt,"%SyntaxError%":ei,"%ThrowTypeError%":nm,"%TypedArray%":sm,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?Dt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Dt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Dt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Dt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Dt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Dt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Dt:WeakSet};if(Te)try{null.error}catch(e){var am=Te(Te(e));Cn["%Error.prototype%"]=am}var om=function e(t){var r;if(t==="%AsyncFunction%")r=Xo("async function () {}");else if(t==="%GeneratorFunction%")r=Xo("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Xo("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Te&&(r=Te(i.prototype))}return Cn[t]=r,r},gc={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yi=Wo,js=rm,lm=Yi.call(Function.call,Array.prototype.concat),um=Yi.call(Function.apply,Array.prototype.splice),yc=Yi.call(Function.call,String.prototype.replace),Hs=Yi.call(Function.call,String.prototype.slice),fm=Yi.call(Function.call,RegExp.prototype.exec),cm=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hm=/\\(\\)?/g,dm=function(t){var r=Hs(t,0,1),n=Hs(t,-1);if(r==="%"&&n!=="%")throw new ei("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ei("invalid intrinsic syntax, expected opening `%`");var i=[];return yc(t,cm,function(a,l,u,f){i[i.length]=u?yc(f,hm,"$1"):l||a}),i},pm=function(t,r){var n=t,i;if(js(gc,n)&&(i=gc[n],n="%"+i[0]+"%"),js(Cn,n)){var a=Cn[n];if(a===ii&&(a=om(n)),typeof a>"u"&&!r)throw new ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ei("intrinsic "+t+" does not exist!")},Yo=function(t,r){if(typeof t!="string"||t.length===0)throw new ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ri('"allowMissing" argument must be a boolean');if(fm(/^%?[^%]*%?$/,t)===null)throw new ei("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=dm(t),i=n.length>0?n[0]:"",a=pm("%"+i+"%",r),l=a.name,u=a.value,f=!1,h=a.alias;h&&(i=h[0],um(n,lm([0,1],h)));for(var p=1,d=!0;p<n.length;p+=1){var c=n[p],v=Hs(c,0,1),y=Hs(c,-1);if((v==='"'||v==="'"||v==="`"||y==='"'||y==="'"||y==="`")&&v!==y)throw new ei("property names with quotes must have matching quotes");if((c==="constructor"||!d)&&(f=!0),i+="."+c,l="%"+i+"%",js(Cn,l))u=Cn[l];else if(u!=null){if(!(c in u)){if(!r)throw new ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(Rn&&p+1>=n.length){var m=Rn(u,c);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[c]}else d=js(u,c),u=u[c];d&&!f&&(Cn[l]=u)}}return u},mc={exports:{}};(function(e){var t=Wo,r=Yo,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(i,n),l=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(d){var c=a(t,i,arguments);if(l&&u){var v=l(c,"length");v.configurable&&u(c,"length",{value:1+f(0,d.length-(arguments.length-1))})}return c};var h=function(){return a(t,n,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h})(mc);var vm=mc.exports,_c=Yo,bc=vm,gm=bc(_c("String.prototype.indexOf")),ym=function(t,r){var n=_c(t,!!r);return typeof n=="function"&&gm(t,".prototype.")>-1?bc(n):n};const mm=my(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Zo=typeof Map=="function"&&Map.prototype,Jo=Object.getOwnPropertyDescriptor&&Zo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,zs=Zo&&Jo&&typeof Jo.get=="function"?Jo.get:null,xc=Zo&&Map.prototype.forEach,Qo=typeof Set=="function"&&Set.prototype,tl=Object.getOwnPropertyDescriptor&&Qo?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Vs=Qo&&tl&&typeof tl.get=="function"?tl.get:null,Ec=Qo&&Set.prototype.forEach,_m=typeof WeakMap=="function"&&WeakMap.prototype,Zi=_m?WeakMap.prototype.has:null,bm=typeof WeakSet=="function"&&WeakSet.prototype,Ji=bm?WeakSet.prototype.has:null,xm=typeof WeakRef=="function"&&WeakRef.prototype,wc=xm?WeakRef.prototype.deref:null,Em=Boolean.prototype.valueOf,wm=Object.prototype.toString,Tm=Function.prototype.toString,Am=String.prototype.match,el=String.prototype.slice,ln=String.prototype.replace,Sm=String.prototype.toUpperCase,Tc=String.prototype.toLowerCase,Ac=RegExp.prototype.test,Sc=Array.prototype.concat,Pr=Array.prototype.join,Om=Array.prototype.slice,Oc=Math.floor,rl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,nl=Object.getOwnPropertySymbols,il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,si=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Pe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===si||"symbol")?Symbol.toStringTag:null,Ic=Object.prototype.propertyIsEnumerable,Rc=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Cc(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ac.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-Oc(-e):Oc(e);if(n!==e){var i=String(n),a=el.call(t,i.length+1);return ln.call(i,r,"$&_")+"."+ln.call(ln.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ln.call(t,r,"$&_")}var sl=mm,Nc=sl.custom,Pc=Lc(Nc)?Nc:null,Im=function e(t,r,n,i){var a=r||{};if(un(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(un(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=un(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(un(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(un(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Bc(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?Cc(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?Cc(t,h):h}var p=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return al(t)?"[Array]":"[Object]";var d=Vm(a,n);if(typeof i>"u")i=[];else if(Fc(i,t)>=0)return"[Circular]";function c(C,F,j){if(F&&(i=Om.call(i),i.push(F)),j){var X={depth:a.depth};return un(a,"quoteStyle")&&(X.quoteStyle=a.quoteStyle),e(C,X,n+1,i)}return e(C,a,n+1,i)}if(typeof t=="function"&&!kc(t)){var v=Bm(t),y=Ws(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(y.length>0?" { "+Pr.call(y,", ")+" }":"")}if(Lc(t)){var m=si?ln.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):il.call(t);return typeof t=="object"&&!si?Qi(m):m}if(jm(t)){for(var _="<"+Tc.call(String(t.nodeName)),b=t.attributes||[],E=0;E<b.length;E++)_+=" "+b[E].name+"="+Mc(Rm(b[E].value),"double",a);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Tc.call(String(t.nodeName))+">",_}if(al(t)){if(t.length===0)return"[]";var w=Ws(t,c);return d&&!zm(w)?"["+ll(w,d)+"]":"[ "+Pr.call(w,", ")+" ]"}if(Nm(t)){var x=Ws(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!Ic.call(t,"cause")?"{ ["+String(t)+"] "+Pr.call(Sc.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Pr.call(x,", ")+" }"}if(typeof t=="object"&&l){if(Pc&&typeof t[Pc]=="function"&&sl)return sl(t,{depth:p-n});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Um(t)){var A=[];return xc&&xc.call(t,function(C,F){A.push(c(F,t,!0)+" => "+c(C,t))}),Uc("Map",zs.call(t),A,d)}if(Gm(t)){var P=[];return Ec&&Ec.call(t,function(C){P.push(c(C,t))}),Uc("Set",Vs.call(t),P,d)}if(Dm(t))return ol("WeakMap");if(qm(t))return ol("WeakSet");if($m(t))return ol("WeakRef");if(Mm(t))return Qi(c(Number(t)));if(Lm(t))return Qi(c(rl.call(t)));if(km(t))return Qi(Em.call(t));if(Pm(t))return Qi(c(String(t)));if(!Cm(t)&&!kc(t)){var S=Ws(t,c),O=Rc?Rc(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!O&&Pe&&Object(t)===t&&Pe in t?el.call(fn(t),8,-1):L?"Object":"",I=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=I+(R||L?"["+Pr.call(Sc.call([],R||[],L||[]),": ")+"] ":"");return S.length===0?M+"{}":d?M+"{"+ll(S,d)+"}":M+"{ "+Pr.call(S,", ")+" }"}return String(t)};function Mc(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Rm(e){return ln.call(String(e),/"/g,""")}function al(e){return fn(e)==="[object Array]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Cm(e){return fn(e)==="[object Date]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function kc(e){return fn(e)==="[object RegExp]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Nm(e){return fn(e)==="[object Error]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Pm(e){return fn(e)==="[object String]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Mm(e){return fn(e)==="[object Number]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function km(e){return fn(e)==="[object Boolean]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Lc(e){if(si)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!il)return!1;try{return il.call(e),!0}catch{}return!1}function Lm(e){if(!e||typeof e!="object"||!rl)return!1;try{return rl.call(e),!0}catch{}return!1}var Fm=Object.prototype.hasOwnProperty||function(e){return e in this};function un(e,t){return Fm.call(e,t)}function fn(e){return wm.call(e)}function Bm(e){if(e.name)return e.name;var t=Am.call(Tm.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fc(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Um(e){if(!zs||!e||typeof e!="object")return!1;try{zs.call(e);try{Vs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Dm(e){if(!Zi||!e||typeof e!="object")return!1;try{Zi.call(e,Zi);try{Ji.call(e,Ji)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function $m(e){if(!wc||!e||typeof e!="object")return!1;try{return wc.call(e),!0}catch{}return!1}function Gm(e){if(!Vs||!e||typeof e!="object")return!1;try{Vs.call(e);try{zs.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function qm(e){if(!Ji||!e||typeof e!="object")return!1;try{Ji.call(e,Ji);try{Zi.call(e,Zi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function jm(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Bc(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Bc(el.call(e,0,t.maxStringLength),t)+n}var i=ln.call(ln.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Hm);return Mc(i,"single",t)}function Hm(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Sm.call(t.toString(16))}function Qi(e){return"Object("+e+")"}function ol(e){return e+" { ? }"}function Uc(e,t,r,n){var i=n?ll(r,n):Pr.call(r,", ");return e+" ("+t+") {"+i+"}"}function zm(e){for(var t=0;t<e.length;t++)if(Fc(e[t],`
|
|
10
|
-
`)>=0)return!1;return!0}function Vm(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=
|
|
11
|
-
`+t.prev+t.base;return r+
|
|
12
|
-
`+t.prev}function Ws(e,t){var r=al(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=un(e,i)?t(e[i],e):""}var a=typeof nl=="function"?nl(e):[],l;if(si){l={};for(var u=0;u<a.length;u++)l["$"+a[u]]=a[u]}for(var f in e)un(e,f)&&(r&&String(Number(f))===f&&f<e.length||si&&l["$"+f]instanceof Symbol||(Ac.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof nl=="function")for(var h=0;h<a.length;h++)Ic.call(e,a[h])&&n.push("["+t(a[h])+"]: "+t(e[a[h]],e));return n}var ul=Yo,ai=ym,Wm=Im,Xm=ul("%TypeError%"),Xs=ul("%WeakMap%",!0),Ks=ul("%Map%",!0),Km=ai("WeakMap.prototype.get",!0),Ym=ai("WeakMap.prototype.set",!0),Zm=ai("WeakMap.prototype.has",!0),Jm=ai("Map.prototype.get",!0),Qm=ai("Map.prototype.set",!0),t0=ai("Map.prototype.has",!0),fl=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},e0=function(e,t){var r=fl(e,t);return r&&r.value},r0=function(e,t,r){var n=fl(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},n0=function(e,t){return!!fl(e,t)},i0=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new Xm("Side channel does not contain "+Wm(a))},get:function(a){if(Xs&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Km(t,a)}else if(Ks){if(r)return Jm(r,a)}else if(n)return e0(n,a)},has:function(a){if(Xs&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Zm(t,a)}else if(Ks){if(r)return t0(r,a)}else if(n)return n0(n,a);return!1},set:function(a,l){Xs&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Xs),Ym(t,a,l)):Ks?(r||(r=new Ks),Qm(r,a,l)):(n||(n={key:{},next:null}),r0(n,a,l))}};return i},s0=String.prototype.replace,a0=/%20/g,cl={RFC1738:"RFC1738",RFC3986:"RFC3986"},hl={default:cl.RFC3986,formatters:{RFC1738:function(e){return s0.call(e,a0,"+")},RFC3986:function(e){return String(e)}},RFC1738:cl.RFC1738,RFC3986:cl.RFC3986},o0=hl,dl=Object.prototype.hasOwnProperty,Nn=Array.isArray,Mr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l0=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Nn(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Dc=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},u0=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Nn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!dl.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Nn(t)&&!Nn(r)&&(i=Dc(t,n)),Nn(t)&&Nn(r)?(r.forEach(function(a,l){if(dl.call(t,l)){var u=t[l];u&&typeof u=="object"&&a&&typeof a=="object"?t[l]=e(u,a,n):t.push(a)}else t[l]=a}),t):Object.keys(r).reduce(function(a,l){var u=r[l];return dl.call(a,l)?a[l]=e(a[l],u,n):a[l]=u,a},i)},f0=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},c0=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},h0=function(t,r,n,i,a){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var u="",f=0;f<l.length;++f){var h=l.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||a===o0.RFC1738&&(h===40||h===41)){u+=l.charAt(f);continue}if(h<128){u=u+Mr[h];continue}if(h<2048){u=u+(Mr[192|h>>6]+Mr[128|h&63]);continue}if(h<55296||h>=57344){u=u+(Mr[224|h>>12]+Mr[128|h>>6&63]+Mr[128|h&63]);continue}f+=1,h=65536+((h&1023)<<10|l.charCodeAt(f)&1023),u+=Mr[240|h>>18]+Mr[128|h>>12&63]+Mr[128|h>>6&63]+Mr[128|h&63]}return u},d0=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],l=a.obj[a.prop],u=Object.keys(l),f=0;f<u.length;++f){var h=u[f],p=l[h];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:l,prop:h}),n.push(p))}return l0(r),t},p0=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},v0=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},g0=function(t,r){return[].concat(t,r)},y0=function(t,r){if(Nn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},$c={arrayToObject:Dc,assign:f0,combine:g0,compact:d0,decode:c0,encode:h0,isBuffer:v0,isRegExp:p0,maybeMap:y0,merge:u0},Gc=i0,Ys=$c,ts=hl,m0=Object.prototype.hasOwnProperty,qc={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Hr=Array.isArray,_0=Array.prototype.push,jc=function(e,t){_0.apply(e,Hr(t)?t:[t])},b0=Date.prototype.toISOString,Hc=ts.default,Me={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ys.encode,encodeValuesOnly:!1,format:Hc,formatter:ts.formatters[Hc],indices:!1,serializeDate:function(t){return b0.call(t)},skipNulls:!1,strictNullHandling:!1},x0=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},pl={},E0=function e(t,r,n,i,a,l,u,f,h,p,d,c,v,y,m,_){for(var b=t,E=_,w=0,x=!1;(E=E.get(pl))!==void 0&&!x;){var A=E.get(t);if(w+=1,typeof A<"u"){if(A===w)throw new RangeError("Cyclic object value");x=!0}typeof E.get(pl)>"u"&&(w=0)}if(typeof f=="function"?b=f(r,b):b instanceof Date?b=d(b):n==="comma"&&Hr(b)&&(b=Ys.maybeMap(b,function(X){return X instanceof Date?d(X):X})),b===null){if(a)return u&&!y?u(r,Me.encoder,m,"key",c):r;b=""}if(x0(b)||Ys.isBuffer(b)){if(u){var P=y?r:u(r,Me.encoder,m,"key",c);return[v(P)+"="+v(u(b,Me.encoder,m,"value",c))]}return[v(r)+"="+v(String(b))]}var S=[];if(typeof b>"u")return S;var O;if(n==="comma"&&Hr(b))y&&u&&(b=Ys.maybeMap(b,u)),O=[{value:b.length>0?b.join(",")||null:void 0}];else if(Hr(f))O=f;else{var L=Object.keys(b);O=h?L.sort(h):L}for(var R=i&&Hr(b)&&b.length===1?r+"[]":r,I=0;I<O.length;++I){var M=O[I],C=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(l&&C===null)){var F=Hr(b)?typeof n=="function"?n(R,M):R:R+(p?"."+M:"["+M+"]");_.set(t,w);var j=Gc();j.set(pl,_),jc(S,e(C,F,n,i,a,l,n==="comma"&&y&&Hr(b)?null:u,f,h,p,d,c,v,y,m,j))}}return S},w0=function(t){if(!t)return Me;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Me.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ts.default;if(typeof t.format<"u"){if(!m0.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=ts.formatters[n],a=Me.filter;return(typeof t.filter=="function"||Hr(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Me.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Me.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Me.charsetSentinel,delimiter:typeof t.delimiter>"u"?Me.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Me.encode,encoder:typeof t.encoder=="function"?t.encoder:Me.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Me.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Me.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Me.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Me.strictNullHandling}},T0=function(e,t){var r=e,n=w0(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Hr(n.filter)&&(a=n.filter,i=a);var l=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in qc?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=qc[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=f==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var p=Gc(),d=0;d<i.length;++d){var c=i[d];n.skipNulls&&r[c]===null||jc(l,E0(r[c],c,f,h,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var v=l.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""},oi=$c,vl=Object.prototype.hasOwnProperty,A0=Array.isArray,Ae={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:oi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S0=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},zc=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},O0="utf8=%26%2310003%3B",I0="utf8=%E2%9C%93",R0=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,l=i.split(r.delimiter,a),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<l.length;++f)l[f].indexOf("utf8=")===0&&(l[f]===I0?h="utf-8":l[f]===O0&&(h="iso-8859-1"),u=f,f=l.length);for(f=0;f<l.length;++f)if(f!==u){var p=l[f],d=p.indexOf("]="),c=d===-1?p.indexOf("="):d+1,v,y;c===-1?(v=r.decoder(p,Ae.decoder,h,"key"),y=r.strictNullHandling?null:""):(v=r.decoder(p.slice(0,c),Ae.decoder,h,"key"),y=oi.maybeMap(zc(p.slice(c+1),r),function(m){return r.decoder(m,Ae.decoder,h,"value")})),y&&r.interpretNumericEntities&&h==="iso-8859-1"&&(y=S0(y)),p.indexOf("[]=")>-1&&(y=A0(y)?[y]:y),vl.call(n,v)?n[v]=oi.combine(n[v],y):n[v]=y}return n},C0=function(e,t,r,n){for(var i=n?t:zc(t,r),a=e.length-1;a>=0;--a){var l,u=e[a];if(u==="[]"&&r.parseArrays)l=[].concat(i);else{l=r.plainObjects?Object.create(null):{};var f=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=parseInt(f,10);!r.parseArrays&&f===""?l={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(l=[],l[h]=i):f!=="__proto__"&&(l[f]=i)}i=l}return i},N0=function(t,r,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&l.exec(a),h=f?a.slice(0,f.index):a,p=[];if(h){if(!n.plainObjects&&vl.call(Object.prototype,h)&&!n.allowPrototypes)return;p.push(h)}for(var d=0;n.depth>0&&(f=u.exec(a))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&vl.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(f[1])}return f&&p.push("["+a.slice(f.index)+"]"),C0(p,r,n,i)}},P0=function(t){if(!t)return Ae;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Ae.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ae.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ae.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ae.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ae.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ae.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ae.comma,decoder:typeof t.decoder=="function"?t.decoder:Ae.decoder,delimiter:typeof t.delimiter=="string"||oi.isRegExp(t.delimiter)?t.delimiter:Ae.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ae.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ae.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ae.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ae.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ae.strictNullHandling}},M0=function(e,t){var r=P0(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?R0(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l<a.length;++l){var u=a[l],f=N0(u,n[u],r,typeof e=="string");i=oi.merge(i,f,r)}return r.allowSparse===!0?i:oi.compact(i)},k0=T0,L0=M0,F0=hl,B0={formats:F0,parse:L0,stringify:k0},U0=Hy;function gr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var D0=/^([a-z0-9.+-]+:)/i,$0=/:[0-9]*$/,G0=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,q0=["<",">",'"',"`"," ","\r",`
|
|
13
|
-
`," "],j0=["{","}","|","\\","^","`"].concat(q0),gl=["'"].concat(j0),Vc=["%","/","?",";","#"].concat(gl),Wc=["/","?","#"],H0=255,Xc=/^[+a-z0-9A-Z_-]{0,63}$/,z0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,V0={javascript:!0,"javascript:":!0},yl={javascript:!0,"javascript:":!0},li={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ml=B0;function Zs(e,t,r){if(e&&typeof e=="object"&&e instanceof gr)return e;var n=new gr;return n.parse(e,t,r),n}gr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",a=e.split(i),l=/\\/g;a[0]=a[0].replace(l,"/"),e=a.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=G0.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=ml.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=D0.exec(u);if(h){h=h[0];var p=h.toLowerCase();this.protocol=p,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var d=u.substr(0,2)==="//";d&&!(h&&yl[h])&&(u=u.substr(2),this.slashes=!0)}if(!yl[h]&&(d||h&&!li[h])){for(var c=-1,v=0;v<Wc.length;v++){var y=u.indexOf(Wc[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var
|
|
9
|
+
*/var _y=_t,by=Symbol.for("react.element"),xy=Symbol.for("react.fragment"),Ey=Object.prototype.hasOwnProperty,wy=_y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ty={key:!0,ref:!0,__self:!0,__source:!0};function Xf(e,t,r){var n,i={},a=null,l=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)Ey.call(t,n)&&!Ty.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:by,type:e,key:a,ref:l,props:i,_owner:wy.current}}Ls.Fragment=xy,Ls.jsx=Xf,Ls.jsxs=Xf,Wf.exports=Ls;var Zt=Wf.exports,An=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(An||{}),Kf=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Kf||{}),Bo=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Bo||{}),It=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(It||{}),an=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(an||{}),yt=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(yt||{}),Zn=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(Zn||{}),Ht=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Ht||{}),Uo=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(Uo||{}),qr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(qr||{}),Vi=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Vi||{}),Sn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Sn||{}),on=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(on||{}),On=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(On||{}),Do=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(Do||{}),sr=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(sr||{}),xe=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(xe||{}),be=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(be||{}),Pr=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Pr||{});const jt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var $o=/iPhone/i,Yf=/iPod/i,Zf=/iPad/i,Jf=/\biOS-universal(?:.+)Mac\b/i,Go=/\bAndroid(?:.+)Mobile\b/i,Qf=/Android/i,Jn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Fs=/Silk/i,jr=/Windows Phone/i,tc=/\bWindows(?:.+)ARM\b/i,ec=/BlackBerry/i,rc=/BB10/i,nc=/Opera Mini/i,ic=/\b(CriOS|Chrome)(?:.+)Mobile/i,sc=/Mobile(?:.+)Firefox\b/i,ac=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function Ay(e){return function(t){return t.test(e)}}function oc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=Ay(r),a={apple:{phone:i($o)&&!i(jr),ipod:i(Yf),tablet:!i($o)&&(i(Zf)||ac(t))&&!i(jr),universal:i(Jf),device:(i($o)||i(Yf)||i(Zf)||i(Jf)||ac(t))&&!i(jr)},amazon:{phone:i(Jn),tablet:!i(Jn)&&i(Fs),device:i(Jn)||i(Fs)},android:{phone:!i(jr)&&i(Jn)||!i(jr)&&i(Go),tablet:!i(jr)&&!i(Jn)&&!i(Go)&&(i(Fs)||i(Qf)),device:!i(jr)&&(i(Jn)||i(Fs)||i(Go)||i(Qf))||i(/\bokhttp\b/i)},windows:{phone:i(jr),tablet:i(tc),device:i(jr)||i(tc)},other:{blackberry:i(ec),blackberry10:i(rc),opera:i(nc),firefox:i(sc),chrome:i(ic),device:i(ec)||i(rc)||i(nc)||i(sc)||i(ic)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const Qn=(oc.default??oc)(globalThis.navigator);jt.RETINA_PREFIX=/@([0-9\.]+)x/,jt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var lc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function a(f,h,p,d,c){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,d||f,c),y=r?r+h:h;return f._events[y]?f._events[y].fn?f._events[y]=[f._events[y],v]:f._events[y].push(v):(f._events[y]=v,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],p,d;if(this._eventsCount===0)return h;for(d in p=this._events)t.call(p,d)&&h.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},u.prototype.listeners=function(h){var p=r?r+h:h,d=this._events[p];if(!d)return[];if(d.fn)return[d.fn];for(var c=0,v=d.length,y=new Array(v);c<v;c++)y[c]=d[c].fn;return y},u.prototype.listenerCount=function(h){var p=r?r+h:h,d=this._events[p];return d?d.fn?1:d.length:0},u.prototype.emit=function(h,p,d,c,v,y){var _=r?r+h:h;if(!this._events[_])return!1;var b=this._events[_],m=arguments.length,E,w;if(b.fn){switch(b.once&&this.removeListener(h,b.fn,void 0,!0),m){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,p),!0;case 3:return b.fn.call(b.context,p,d),!0;case 4:return b.fn.call(b.context,p,d,c),!0;case 5:return b.fn.call(b.context,p,d,c,v),!0;case 6:return b.fn.call(b.context,p,d,c,v,y),!0}for(w=1,E=new Array(m-1);w<m;w++)E[w-1]=arguments[w];b.fn.apply(b.context,E)}else{var x=b.length,A;for(w=0;w<x;w++)switch(b[w].once&&this.removeListener(h,b[w].fn,void 0,!0),m){case 1:b[w].fn.call(b[w].context);break;case 2:b[w].fn.call(b[w].context,p);break;case 3:b[w].fn.call(b[w].context,p,d);break;case 4:b[w].fn.call(b[w].context,p,d,c);break;default:if(!E)for(A=1,E=new Array(m-1);A<m;A++)E[A-1]=arguments[A];b[w].fn.apply(b[w].context,E)}}return!0},u.prototype.on=function(h,p,d){return a(this,h,p,d,!1)},u.prototype.once=function(h,p,d){return a(this,h,p,d,!0)},u.prototype.removeListener=function(h,p,d,c){var v=r?r+h:h;if(!this._events[v])return this;if(!p)return l(this,v),this;var y=this._events[v];if(y.fn)y.fn===p&&(!c||y.once)&&(!d||y.context===d)&&l(this,v);else{for(var _=0,b=[],m=y.length;_<m;_++)(y[_].fn!==p||c&&!y[_].once||d&&y[_].context!==d)&&b.push(y[_]);b.length?this._events[v]=b.length===1?b[0]:b:l(this,v)}return this},u.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&l(this,p)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(lc);var Sy=lc.exports;const Bs=Tn(Sy);var qo={exports:{}};qo.exports=Us,qo.exports.default=Us;function Us(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=uc(e,0,i,r,!0),l=[];if(!a||a.next===a.prev)return l;var u,f,h,p,d,c,v;if(n&&(a=Ny(e,t,a,r)),e.length>80*r){u=h=e[0],f=p=e[1];for(var y=r;y<i;y+=r)d=e[y],c=e[y+1],d<u&&(u=d),c<f&&(f=c),d>h&&(h=d),c>p&&(p=c);v=Math.max(h-u,p-f),v=v!==0?32767/v:0}return Wi(a,l,r,u,f,v,0),l}function uc(e,t,r,n,i){var a,l;if(i===zo(e,t,r,n)>0)for(a=t;a<r;a+=n)l=hc(a,e[a],e[a+1],l);else for(a=r-n;a>=t;a-=n)l=hc(a,e[a],e[a+1],l);return l&&Ds(l,l.next)&&(Ki(l),l=l.next),l}function In(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ds(r,r.next)||fe(r.prev,r,r.next)===0)){if(Ki(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Wi(e,t,r,n,i,a,l){if(e){!l&&a&&Fy(e,n,i,a);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,a?Iy(e,n,i,a):Oy(e)){t.push(f.i/r|0),t.push(e.i/r|0),t.push(h.i/r|0),Ki(e),e=h.next,u=h.next;continue}if(e=h,e===u){l?l===1?(e=Ry(In(e),t,r),Wi(e,t,r,n,i,a,2)):l===2&&Cy(e,t,r,n,i,a):Wi(In(e),t,r,n,i,a,1);break}}}}function Oy(e){var t=e.prev,r=e,n=e.next;if(fe(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,l=n.x,u=t.y,f=r.y,h=n.y,p=i<a?i<l?i:l:a<l?a:l,d=u<f?u<h?u:h:f<h?f:h,c=i>a?i>l?i:l:a>l?a:l,v=u>f?u>h?u:h:f>h?f:h,y=n.next;y!==t;){if(y.x>=p&&y.x<=c&&y.y>=d&&y.y<=v&&ti(i,u,a,f,l,h,y.x,y.y)&&fe(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function Iy(e,t,r,n){var i=e.prev,a=e,l=e.next;if(fe(i,a,l)>=0)return!1;for(var u=i.x,f=a.x,h=l.x,p=i.y,d=a.y,c=l.y,v=u<f?u<h?u:h:f<h?f:h,y=p<d?p<c?p:c:d<c?d:c,_=u>f?u>h?u:h:f>h?f:h,b=p>d?p>c?p:c:d>c?d:c,m=jo(v,y,t,r,n),E=jo(_,b,t,r,n),w=e.prevZ,x=e.nextZ;w&&w.z>=m&&x&&x.z<=E;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=b&&w!==i&&w!==l&&ti(u,p,f,d,h,c,w.x,w.y)&&fe(w.prev,w,w.next)>=0||(w=w.prevZ,x.x>=v&&x.x<=_&&x.y>=y&&x.y<=b&&x!==i&&x!==l&&ti(u,p,f,d,h,c,x.x,x.y)&&fe(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;w&&w.z>=m;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=b&&w!==i&&w!==l&&ti(u,p,f,d,h,c,w.x,w.y)&&fe(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;x&&x.z<=E;){if(x.x>=v&&x.x<=_&&x.y>=y&&x.y<=b&&x!==i&&x!==l&&ti(u,p,f,d,h,c,x.x,x.y)&&fe(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Ry(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!Ds(i,a)&&fc(i,n,n.next,a)&&Xi(i,a)&&Xi(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Ki(n),Ki(n.next),n=e=a),n=n.next}while(n!==e);return In(n)}function Cy(e,t,r,n,i,a){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&Dy(l,u)){var f=cc(l,u);l=In(l,l.next),f=In(f,f.next),Wi(l,t,r,n,i,a,0),Wi(f,t,r,n,i,a,0);return}u=u.next}l=l.next}while(l!==e)}function Ny(e,t,r,n){var i=[],a,l,u,f,h;for(a=0,l=t.length;a<l;a++)u=t[a]*n,f=a<l-1?t[a+1]*n:e.length,h=uc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(Uy(h));for(i.sort(Py),a=0;a<i.length;a++)r=My(i[a],r);return r}function Py(e,t){return e.x-t.x}function My(e,t){var r=ky(e,t);if(!r)return t;var n=cc(r,e);return In(n,n.next),In(r,r.next)}function ky(e,t){var r=t,n=e.x,i=e.y,a=-1/0,l;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var u=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(u<=n&&u>a&&(a=u,l=r.x<r.next.x?r:r.next,u===n))return l}r=r.next}while(r!==t);if(!l)return null;var f=l,h=l.x,p=l.y,d=1/0,c;r=l;do n>=r.x&&r.x>=h&&n!==r.x&&ti(i<p?n:a,i,h,p,i<p?a:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),Xi(r,e)&&(c<d||c===d&&(r.x>l.x||r.x===l.x&&Ly(l,r)))&&(l=r,d=c)),r=r.next;while(r!==f);return l}function Ly(e,t){return fe(e.prev,e,t.prev)<0&&fe(t.next,e,e.next)<0}function Fy(e,t,r,n){var i=e;do i.z===0&&(i.z=jo(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,By(i)}function By(e){var t,r,n,i,a,l,u,f,h=1;do{for(r=e,e=null,a=null,l=0;r;){for(l++,n=r,u=0,t=0;t<h&&(u++,n=n.nextZ,!!n);t++);for(f=h;u>0||f>0&&n;)u!==0&&(f===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,f--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,h*=2}while(l>1);return e}function jo(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Uy(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ti(e,t,r,n,i,a,l,u){return(i-l)*(t-u)>=(e-l)*(a-u)&&(e-l)*(n-u)>=(r-l)*(t-u)&&(r-l)*(a-u)>=(i-l)*(n-u)}function Dy(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$y(e,t)&&(Xi(e,t)&&Xi(t,e)&&Gy(e,t)&&(fe(e.prev,e,t.prev)||fe(e,t.prev,t))||Ds(e,t)&&fe(e.prev,e,e.next)>0&&fe(t.prev,t,t.next)>0)}function fe(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ds(e,t){return e.x===t.x&&e.y===t.y}function fc(e,t,r,n){var i=Gs(fe(e,t,r)),a=Gs(fe(e,t,n)),l=Gs(fe(r,n,e)),u=Gs(fe(r,n,t));return!!(i!==a&&l!==u||i===0&&$s(e,r,t)||a===0&&$s(e,n,t)||l===0&&$s(r,e,n)||u===0&&$s(r,t,n))}function $s(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Gs(e){return e>0?1:e<0?-1:0}function $y(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&fc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Xi(e,t){return fe(e.prev,e,e.next)<0?fe(e,t,e.next)>=0&&fe(e,e.prev,t)>=0:fe(e,t,e.prev)<0||fe(e,e.next,t)<0}function Gy(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function cc(e,t){var r=new Ho(e.i,e.x,e.y),n=new Ho(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function hc(e,t,r,n){var i=new Ho(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ki(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ho(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Us.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,l=Math.abs(zo(e,0,a,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,p=u<f-1?t[u+1]*r:e.length;l-=Math.abs(zo(e,h,p,r))}var d=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,y=n[u+2]*r;d+=Math.abs((e[c]-e[y])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[y+1]-e[c+1]))}return l===0&&d===0?0:Math.abs((d-l)/l)};function zo(e,t,r,n){for(var i=0,a=t,l=r-n;a<r;a+=n)i+=(e[l]-e[a])*(e[a+1]+e[l+1]),l=a;return i}Us.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var l=0;l<t;l++)r.vertices.push(e[i][a][l]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var qy=qo.exports;const jy=Tn(qy);var qs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */qs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof Ke=="object"&&Ke;(a.global===a||a.window===a||a.self===a)&&(r=a);var l,u=2147483647,f=36,h=1,p=26,d=38,c=700,v=72,y=128,_="-",b=/^xn--/,m=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-h,A=Math.floor,P=String.fromCharCode,S;function O(U){throw new RangeError(w[U])}function L(U,N){for(var D=U.length,q=[];D--;)q[D]=N(U[D]);return q}function R(U,N){var D=U.split("@"),q="";D.length>1&&(q=D[0]+"@",U=D[1]),U=U.replace(E,".");var Z=U.split("."),K=L(Z,N).join(".");return q+K}function I(U){for(var N=[],D=0,q=U.length,Z,K;D<q;)Z=U.charCodeAt(D++),Z>=55296&&Z<=56319&&D<q?(K=U.charCodeAt(D++),(K&64512)==56320?N.push(((Z&1023)<<10)+(K&1023)+65536):(N.push(Z),D--)):N.push(Z);return N}function M(U){return L(U,function(N){var D="";return N>65535&&(N-=65536,D+=P(N>>>10&1023|55296),N=56320|N&1023),D+=P(N),D}).join("")}function C(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:f}function F(U,N){return U+22+75*(U<26)-((N!=0)<<5)}function j(U,N,D){var q=0;for(U=D?A(U/c):U>>1,U+=A(U/N);U>x*p>>1;q+=f)U=A(U/x);return A(q+(x+1)*U/(U+d))}function X(U){var N=[],D=U.length,q,Z=0,K=y,G=v,z,tt,et,nt,ht,vt,mt,xt,Rt;for(z=U.lastIndexOf(_),z<0&&(z=0),tt=0;tt<z;++tt)U.charCodeAt(tt)>=128&&O("not-basic"),N.push(U.charCodeAt(tt));for(et=z>0?z+1:0;et<D;){for(nt=Z,ht=1,vt=f;et>=D&&O("invalid-input"),mt=C(U.charCodeAt(et++)),(mt>=f||mt>A((u-Z)/ht))&&O("overflow"),Z+=mt*ht,xt=vt<=G?h:vt>=G+p?p:vt-G,!(mt<xt);vt+=f)Rt=f-xt,ht>A(u/Rt)&&O("overflow"),ht*=Rt;q=N.length+1,G=j(Z-nt,q,nt==0),A(Z/q)>u-K&&O("overflow"),K+=A(Z/q),Z%=q,N.splice(Z++,0,K)}return M(N)}function V(U){var N,D,q,Z,K,G,z,tt,et,nt,ht,vt=[],mt,xt,Rt,ve;for(U=I(U),mt=U.length,N=y,D=0,K=v,G=0;G<mt;++G)ht=U[G],ht<128&&vt.push(P(ht));for(q=Z=vt.length,Z&&vt.push(_);q<mt;){for(z=u,G=0;G<mt;++G)ht=U[G],ht>=N&&ht<z&&(z=ht);for(xt=q+1,z-N>A((u-D)/xt)&&O("overflow"),D+=(z-N)*xt,N=z,G=0;G<mt;++G)if(ht=U[G],ht<N&&++D>u&&O("overflow"),ht==N){for(tt=D,et=f;nt=et<=K?h:et>=K+p?p:et-K,!(tt<nt);et+=f)ve=tt-nt,Rt=f-nt,vt.push(P(F(nt+ve%Rt,0))),tt=A(ve/Rt);vt.push(P(F(tt,0))),K=j(D,xt,q==Z),D=0,++q}++D,++N}return vt.join("")}function st(U){return R(U,function(N){return b.test(N)?X(N.slice(4).toLowerCase()):N})}function Y(U){return R(U,function(N){return m.test(N)?"xn--"+V(N):N})}if(l={version:"1.4.1",ucs2:{decode:I,encode:M},decode:X,encode:V,toASCII:Y,toUnicode:st},n&&i)if(e.exports==n)i.exports=l;else for(S in l)l.hasOwnProperty(S)&&(n[S]=l[S]);else r.punycode=l})(Ke)}(qs,qs.exports);var Hy=qs.exports,zy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},dc=typeof Symbol<"u"&&Symbol,Vy=zy,Wy=function(){return typeof dc!="function"||typeof Symbol!="function"||typeof dc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Vy()},pc={foo:{}},Xy=Object,Ky=function(){return{__proto__:pc}.foo===pc.foo&&!({__proto__:null}instanceof Xy)},Yy="Function.prototype.bind called on incompatible ",Vo=Array.prototype.slice,Zy=Object.prototype.toString,Jy="[object Function]",Qy=function(t){var r=this;if(typeof r!="function"||Zy.call(r)!==Jy)throw new TypeError(Yy+r);for(var n=Vo.call(arguments,1),i,a=function(){if(this instanceof i){var p=r.apply(this,n.concat(Vo.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(Vo.call(arguments)))},l=Math.max(0,r.length-n.length),u=[],f=0;f<l;f++)u.push("$"+f);if(i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var h=function(){};h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},tm=Qy,Wo=Function.prototype.bind||tm,em=Wo,rm=em.call(Function.call,Object.prototype.hasOwnProperty),Dt,ei=SyntaxError,vc=Function,ri=TypeError,Xo=function(e){try{return vc('"use strict"; return ('+e+").constructor;")()}catch{}},Rn=Object.getOwnPropertyDescriptor;if(Rn)try{Rn({},"")}catch{Rn=null}var Ko=function(){throw new ri},nm=Rn?function(){try{return arguments.callee,Ko}catch{try{return Rn(arguments,"callee").get}catch{return Ko}}}():Ko,ni=Wy(),im=Ky(),Te=Object.getPrototypeOf||(im?function(e){return e.__proto__}:null),ii={},sm=typeof Uint8Array>"u"||!Te?Dt:Te(Uint8Array),Cn={"%AggregateError%":typeof AggregateError>"u"?Dt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Dt:ArrayBuffer,"%ArrayIteratorPrototype%":ni&&Te?Te([][Symbol.iterator]()):Dt,"%AsyncFromSyncIteratorPrototype%":Dt,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?Dt:Atomics,"%BigInt%":typeof BigInt>"u"?Dt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Dt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Dt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Dt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Dt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Dt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Dt:FinalizationRegistry,"%Function%":vc,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?Dt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Dt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Dt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni&&Te?Te(Te([][Symbol.iterator]())):Dt,"%JSON%":typeof JSON=="object"?JSON:Dt,"%Map%":typeof Map>"u"?Dt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ni||!Te?Dt:Te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Dt:Promise,"%Proxy%":typeof Proxy>"u"?Dt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Dt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Dt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ni||!Te?Dt:Te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Dt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni&&Te?Te(""[Symbol.iterator]()):Dt,"%Symbol%":ni?Symbol:Dt,"%SyntaxError%":ei,"%ThrowTypeError%":nm,"%TypedArray%":sm,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?Dt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Dt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Dt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Dt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Dt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Dt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Dt:WeakSet};if(Te)try{null.error}catch(e){var am=Te(Te(e));Cn["%Error.prototype%"]=am}var om=function e(t){var r;if(t==="%AsyncFunction%")r=Xo("async function () {}");else if(t==="%GeneratorFunction%")r=Xo("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Xo("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Te&&(r=Te(i.prototype))}return Cn[t]=r,r},gc={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yi=Wo,js=rm,lm=Yi.call(Function.call,Array.prototype.concat),um=Yi.call(Function.apply,Array.prototype.splice),yc=Yi.call(Function.call,String.prototype.replace),Hs=Yi.call(Function.call,String.prototype.slice),fm=Yi.call(Function.call,RegExp.prototype.exec),cm=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hm=/\\(\\)?/g,dm=function(t){var r=Hs(t,0,1),n=Hs(t,-1);if(r==="%"&&n!=="%")throw new ei("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ei("invalid intrinsic syntax, expected opening `%`");var i=[];return yc(t,cm,function(a,l,u,f){i[i.length]=u?yc(f,hm,"$1"):l||a}),i},pm=function(t,r){var n=t,i;if(js(gc,n)&&(i=gc[n],n="%"+i[0]+"%"),js(Cn,n)){var a=Cn[n];if(a===ii&&(a=om(n)),typeof a>"u"&&!r)throw new ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ei("intrinsic "+t+" does not exist!")},Yo=function(t,r){if(typeof t!="string"||t.length===0)throw new ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ri('"allowMissing" argument must be a boolean');if(fm(/^%?[^%]*%?$/,t)===null)throw new ei("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=dm(t),i=n.length>0?n[0]:"",a=pm("%"+i+"%",r),l=a.name,u=a.value,f=!1,h=a.alias;h&&(i=h[0],um(n,lm([0,1],h)));for(var p=1,d=!0;p<n.length;p+=1){var c=n[p],v=Hs(c,0,1),y=Hs(c,-1);if((v==='"'||v==="'"||v==="`"||y==='"'||y==="'"||y==="`")&&v!==y)throw new ei("property names with quotes must have matching quotes");if((c==="constructor"||!d)&&(f=!0),i+="."+c,l="%"+i+"%",js(Cn,l))u=Cn[l];else if(u!=null){if(!(c in u)){if(!r)throw new ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(Rn&&p+1>=n.length){var _=Rn(u,c);d=!!_,d&&"get"in _&&!("originalValue"in _.get)?u=_.get:u=u[c]}else d=js(u,c),u=u[c];d&&!f&&(Cn[l]=u)}}return u},mc={exports:{}};(function(e){var t=Wo,r=Yo,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(i,n),l=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(d){var c=a(t,i,arguments);if(l&&u){var v=l(c,"length");v.configurable&&u(c,"length",{value:1+f(0,d.length-(arguments.length-1))})}return c};var h=function(){return a(t,n,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h})(mc);var vm=mc.exports,_c=Yo,bc=vm,gm=bc(_c("String.prototype.indexOf")),ym=function(t,r){var n=_c(t,!!r);return typeof n=="function"&&gm(t,".prototype.")>-1?bc(n):n};const mm=my(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Zo=typeof Map=="function"&&Map.prototype,Jo=Object.getOwnPropertyDescriptor&&Zo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,zs=Zo&&Jo&&typeof Jo.get=="function"?Jo.get:null,xc=Zo&&Map.prototype.forEach,Qo=typeof Set=="function"&&Set.prototype,tl=Object.getOwnPropertyDescriptor&&Qo?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Vs=Qo&&tl&&typeof tl.get=="function"?tl.get:null,Ec=Qo&&Set.prototype.forEach,_m=typeof WeakMap=="function"&&WeakMap.prototype,Zi=_m?WeakMap.prototype.has:null,bm=typeof WeakSet=="function"&&WeakSet.prototype,Ji=bm?WeakSet.prototype.has:null,xm=typeof WeakRef=="function"&&WeakRef.prototype,wc=xm?WeakRef.prototype.deref:null,Em=Boolean.prototype.valueOf,wm=Object.prototype.toString,Tm=Function.prototype.toString,Am=String.prototype.match,el=String.prototype.slice,ln=String.prototype.replace,Sm=String.prototype.toUpperCase,Tc=String.prototype.toLowerCase,Ac=RegExp.prototype.test,Sc=Array.prototype.concat,Mr=Array.prototype.join,Om=Array.prototype.slice,Oc=Math.floor,rl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,nl=Object.getOwnPropertySymbols,il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,si=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Pe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===si||"symbol")?Symbol.toStringTag:null,Ic=Object.prototype.propertyIsEnumerable,Rc=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Cc(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ac.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-Oc(-e):Oc(e);if(n!==e){var i=String(n),a=el.call(t,i.length+1);return ln.call(i,r,"$&_")+"."+ln.call(ln.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ln.call(t,r,"$&_")}var sl=mm,Nc=sl.custom,Pc=Lc(Nc)?Nc:null,Im=function e(t,r,n,i){var a=r||{};if(un(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(un(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=un(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(un(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(un(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Bc(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?Cc(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?Cc(t,h):h}var p=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return al(t)?"[Array]":"[Object]";var d=Vm(a,n);if(typeof i>"u")i=[];else if(Fc(i,t)>=0)return"[Circular]";function c(C,F,j){if(F&&(i=Om.call(i),i.push(F)),j){var X={depth:a.depth};return un(a,"quoteStyle")&&(X.quoteStyle=a.quoteStyle),e(C,X,n+1,i)}return e(C,a,n+1,i)}if(typeof t=="function"&&!kc(t)){var v=Bm(t),y=Ws(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(y.length>0?" { "+Mr.call(y,", ")+" }":"")}if(Lc(t)){var _=si?ln.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):il.call(t);return typeof t=="object"&&!si?Qi(_):_}if(jm(t)){for(var b="<"+Tc.call(String(t.nodeName)),m=t.attributes||[],E=0;E<m.length;E++)b+=" "+m[E].name+"="+Mc(Rm(m[E].value),"double",a);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+Tc.call(String(t.nodeName))+">",b}if(al(t)){if(t.length===0)return"[]";var w=Ws(t,c);return d&&!zm(w)?"["+ll(w,d)+"]":"[ "+Mr.call(w,", ")+" ]"}if(Nm(t)){var x=Ws(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!Ic.call(t,"cause")?"{ ["+String(t)+"] "+Mr.call(Sc.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Mr.call(x,", ")+" }"}if(typeof t=="object"&&l){if(Pc&&typeof t[Pc]=="function"&&sl)return sl(t,{depth:p-n});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Um(t)){var A=[];return xc&&xc.call(t,function(C,F){A.push(c(F,t,!0)+" => "+c(C,t))}),Uc("Map",zs.call(t),A,d)}if(Gm(t)){var P=[];return Ec&&Ec.call(t,function(C){P.push(c(C,t))}),Uc("Set",Vs.call(t),P,d)}if(Dm(t))return ol("WeakMap");if(qm(t))return ol("WeakSet");if($m(t))return ol("WeakRef");if(Mm(t))return Qi(c(Number(t)));if(Lm(t))return Qi(c(rl.call(t)));if(km(t))return Qi(Em.call(t));if(Pm(t))return Qi(c(String(t)));if(!Cm(t)&&!kc(t)){var S=Ws(t,c),O=Rc?Rc(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!O&&Pe&&Object(t)===t&&Pe in t?el.call(fn(t),8,-1):L?"Object":"",I=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=I+(R||L?"["+Mr.call(Sc.call([],R||[],L||[]),": ")+"] ":"");return S.length===0?M+"{}":d?M+"{"+ll(S,d)+"}":M+"{ "+Mr.call(S,", ")+" }"}return String(t)};function Mc(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Rm(e){return ln.call(String(e),/"/g,""")}function al(e){return fn(e)==="[object Array]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Cm(e){return fn(e)==="[object Date]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function kc(e){return fn(e)==="[object RegExp]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Nm(e){return fn(e)==="[object Error]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Pm(e){return fn(e)==="[object String]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Mm(e){return fn(e)==="[object Number]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function km(e){return fn(e)==="[object Boolean]"&&(!Pe||!(typeof e=="object"&&Pe in e))}function Lc(e){if(si)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!il)return!1;try{return il.call(e),!0}catch{}return!1}function Lm(e){if(!e||typeof e!="object"||!rl)return!1;try{return rl.call(e),!0}catch{}return!1}var Fm=Object.prototype.hasOwnProperty||function(e){return e in this};function un(e,t){return Fm.call(e,t)}function fn(e){return wm.call(e)}function Bm(e){if(e.name)return e.name;var t=Am.call(Tm.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fc(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Um(e){if(!zs||!e||typeof e!="object")return!1;try{zs.call(e);try{Vs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Dm(e){if(!Zi||!e||typeof e!="object")return!1;try{Zi.call(e,Zi);try{Ji.call(e,Ji)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function $m(e){if(!wc||!e||typeof e!="object")return!1;try{return wc.call(e),!0}catch{}return!1}function Gm(e){if(!Vs||!e||typeof e!="object")return!1;try{Vs.call(e);try{zs.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function qm(e){if(!Ji||!e||typeof e!="object")return!1;try{Ji.call(e,Ji);try{Zi.call(e,Zi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function jm(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Bc(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Bc(el.call(e,0,t.maxStringLength),t)+n}var i=ln.call(ln.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Hm);return Mc(i,"single",t)}function Hm(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Sm.call(t.toString(16))}function Qi(e){return"Object("+e+")"}function ol(e){return e+" { ? }"}function Uc(e,t,r,n){var i=n?ll(r,n):Mr.call(r,", ");return e+" ("+t+") {"+i+"}"}function zm(e){for(var t=0;t<e.length;t++)if(Fc(e[t],`
|
|
10
|
+
`)>=0)return!1;return!0}function Vm(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Mr.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Mr.call(Array(t+1),r)}}function ll(e,t){if(e.length===0)return"";var r=`
|
|
11
|
+
`+t.prev+t.base;return r+Mr.call(e,","+r)+`
|
|
12
|
+
`+t.prev}function Ws(e,t){var r=al(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=un(e,i)?t(e[i],e):""}var a=typeof nl=="function"?nl(e):[],l;if(si){l={};for(var u=0;u<a.length;u++)l["$"+a[u]]=a[u]}for(var f in e)un(e,f)&&(r&&String(Number(f))===f&&f<e.length||si&&l["$"+f]instanceof Symbol||(Ac.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof nl=="function")for(var h=0;h<a.length;h++)Ic.call(e,a[h])&&n.push("["+t(a[h])+"]: "+t(e[a[h]],e));return n}var ul=Yo,ai=ym,Wm=Im,Xm=ul("%TypeError%"),Xs=ul("%WeakMap%",!0),Ks=ul("%Map%",!0),Km=ai("WeakMap.prototype.get",!0),Ym=ai("WeakMap.prototype.set",!0),Zm=ai("WeakMap.prototype.has",!0),Jm=ai("Map.prototype.get",!0),Qm=ai("Map.prototype.set",!0),t0=ai("Map.prototype.has",!0),fl=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},e0=function(e,t){var r=fl(e,t);return r&&r.value},r0=function(e,t,r){var n=fl(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},n0=function(e,t){return!!fl(e,t)},i0=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new Xm("Side channel does not contain "+Wm(a))},get:function(a){if(Xs&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Km(t,a)}else if(Ks){if(r)return Jm(r,a)}else if(n)return e0(n,a)},has:function(a){if(Xs&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Zm(t,a)}else if(Ks){if(r)return t0(r,a)}else if(n)return n0(n,a);return!1},set:function(a,l){Xs&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Xs),Ym(t,a,l)):Ks?(r||(r=new Ks),Qm(r,a,l)):(n||(n={key:{},next:null}),r0(n,a,l))}};return i},s0=String.prototype.replace,a0=/%20/g,cl={RFC1738:"RFC1738",RFC3986:"RFC3986"},hl={default:cl.RFC3986,formatters:{RFC1738:function(e){return s0.call(e,a0,"+")},RFC3986:function(e){return String(e)}},RFC1738:cl.RFC1738,RFC3986:cl.RFC3986},o0=hl,dl=Object.prototype.hasOwnProperty,Nn=Array.isArray,kr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l0=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Nn(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Dc=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},u0=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Nn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!dl.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Nn(t)&&!Nn(r)&&(i=Dc(t,n)),Nn(t)&&Nn(r)?(r.forEach(function(a,l){if(dl.call(t,l)){var u=t[l];u&&typeof u=="object"&&a&&typeof a=="object"?t[l]=e(u,a,n):t.push(a)}else t[l]=a}),t):Object.keys(r).reduce(function(a,l){var u=r[l];return dl.call(a,l)?a[l]=e(a[l],u,n):a[l]=u,a},i)},f0=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},c0=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},h0=function(t,r,n,i,a){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var u="",f=0;f<l.length;++f){var h=l.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||a===o0.RFC1738&&(h===40||h===41)){u+=l.charAt(f);continue}if(h<128){u=u+kr[h];continue}if(h<2048){u=u+(kr[192|h>>6]+kr[128|h&63]);continue}if(h<55296||h>=57344){u=u+(kr[224|h>>12]+kr[128|h>>6&63]+kr[128|h&63]);continue}f+=1,h=65536+((h&1023)<<10|l.charCodeAt(f)&1023),u+=kr[240|h>>18]+kr[128|h>>12&63]+kr[128|h>>6&63]+kr[128|h&63]}return u},d0=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],l=a.obj[a.prop],u=Object.keys(l),f=0;f<u.length;++f){var h=u[f],p=l[h];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:l,prop:h}),n.push(p))}return l0(r),t},p0=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},v0=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},g0=function(t,r){return[].concat(t,r)},y0=function(t,r){if(Nn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},$c={arrayToObject:Dc,assign:f0,combine:g0,compact:d0,decode:c0,encode:h0,isBuffer:v0,isRegExp:p0,maybeMap:y0,merge:u0},Gc=i0,Ys=$c,ts=hl,m0=Object.prototype.hasOwnProperty,qc={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Hr=Array.isArray,_0=Array.prototype.push,jc=function(e,t){_0.apply(e,Hr(t)?t:[t])},b0=Date.prototype.toISOString,Hc=ts.default,Me={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ys.encode,encodeValuesOnly:!1,format:Hc,formatter:ts.formatters[Hc],indices:!1,serializeDate:function(t){return b0.call(t)},skipNulls:!1,strictNullHandling:!1},x0=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},pl={},E0=function e(t,r,n,i,a,l,u,f,h,p,d,c,v,y,_,b){for(var m=t,E=b,w=0,x=!1;(E=E.get(pl))!==void 0&&!x;){var A=E.get(t);if(w+=1,typeof A<"u"){if(A===w)throw new RangeError("Cyclic object value");x=!0}typeof E.get(pl)>"u"&&(w=0)}if(typeof f=="function"?m=f(r,m):m instanceof Date?m=d(m):n==="comma"&&Hr(m)&&(m=Ys.maybeMap(m,function(X){return X instanceof Date?d(X):X})),m===null){if(a)return u&&!y?u(r,Me.encoder,_,"key",c):r;m=""}if(x0(m)||Ys.isBuffer(m)){if(u){var P=y?r:u(r,Me.encoder,_,"key",c);return[v(P)+"="+v(u(m,Me.encoder,_,"value",c))]}return[v(r)+"="+v(String(m))]}var S=[];if(typeof m>"u")return S;var O;if(n==="comma"&&Hr(m))y&&u&&(m=Ys.maybeMap(m,u)),O=[{value:m.length>0?m.join(",")||null:void 0}];else if(Hr(f))O=f;else{var L=Object.keys(m);O=h?L.sort(h):L}for(var R=i&&Hr(m)&&m.length===1?r+"[]":r,I=0;I<O.length;++I){var M=O[I],C=typeof M=="object"&&typeof M.value<"u"?M.value:m[M];if(!(l&&C===null)){var F=Hr(m)?typeof n=="function"?n(R,M):R:R+(p?"."+M:"["+M+"]");b.set(t,w);var j=Gc();j.set(pl,b),jc(S,e(C,F,n,i,a,l,n==="comma"&&y&&Hr(m)?null:u,f,h,p,d,c,v,y,_,j))}}return S},w0=function(t){if(!t)return Me;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Me.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ts.default;if(typeof t.format<"u"){if(!m0.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=ts.formatters[n],a=Me.filter;return(typeof t.filter=="function"||Hr(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Me.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Me.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Me.charsetSentinel,delimiter:typeof t.delimiter>"u"?Me.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Me.encode,encoder:typeof t.encoder=="function"?t.encoder:Me.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Me.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Me.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Me.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Me.strictNullHandling}},T0=function(e,t){var r=e,n=w0(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Hr(n.filter)&&(a=n.filter,i=a);var l=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in qc?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=qc[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=f==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var p=Gc(),d=0;d<i.length;++d){var c=i[d];n.skipNulls&&r[c]===null||jc(l,E0(r[c],c,f,h,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var v=l.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""},oi=$c,vl=Object.prototype.hasOwnProperty,A0=Array.isArray,Ae={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:oi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S0=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},zc=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},O0="utf8=%26%2310003%3B",I0="utf8=%E2%9C%93",R0=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,l=i.split(r.delimiter,a),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<l.length;++f)l[f].indexOf("utf8=")===0&&(l[f]===I0?h="utf-8":l[f]===O0&&(h="iso-8859-1"),u=f,f=l.length);for(f=0;f<l.length;++f)if(f!==u){var p=l[f],d=p.indexOf("]="),c=d===-1?p.indexOf("="):d+1,v,y;c===-1?(v=r.decoder(p,Ae.decoder,h,"key"),y=r.strictNullHandling?null:""):(v=r.decoder(p.slice(0,c),Ae.decoder,h,"key"),y=oi.maybeMap(zc(p.slice(c+1),r),function(_){return r.decoder(_,Ae.decoder,h,"value")})),y&&r.interpretNumericEntities&&h==="iso-8859-1"&&(y=S0(y)),p.indexOf("[]=")>-1&&(y=A0(y)?[y]:y),vl.call(n,v)?n[v]=oi.combine(n[v],y):n[v]=y}return n},C0=function(e,t,r,n){for(var i=n?t:zc(t,r),a=e.length-1;a>=0;--a){var l,u=e[a];if(u==="[]"&&r.parseArrays)l=[].concat(i);else{l=r.plainObjects?Object.create(null):{};var f=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=parseInt(f,10);!r.parseArrays&&f===""?l={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(l=[],l[h]=i):f!=="__proto__"&&(l[f]=i)}i=l}return i},N0=function(t,r,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&l.exec(a),h=f?a.slice(0,f.index):a,p=[];if(h){if(!n.plainObjects&&vl.call(Object.prototype,h)&&!n.allowPrototypes)return;p.push(h)}for(var d=0;n.depth>0&&(f=u.exec(a))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&vl.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(f[1])}return f&&p.push("["+a.slice(f.index)+"]"),C0(p,r,n,i)}},P0=function(t){if(!t)return Ae;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Ae.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ae.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ae.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ae.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ae.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ae.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ae.comma,decoder:typeof t.decoder=="function"?t.decoder:Ae.decoder,delimiter:typeof t.delimiter=="string"||oi.isRegExp(t.delimiter)?t.delimiter:Ae.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ae.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ae.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ae.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ae.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ae.strictNullHandling}},M0=function(e,t){var r=P0(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?R0(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l<a.length;++l){var u=a[l],f=N0(u,n[u],r,typeof e=="string");i=oi.merge(i,f,r)}return r.allowSparse===!0?i:oi.compact(i)},k0=T0,L0=M0,F0=hl,B0={formats:F0,parse:L0,stringify:k0},U0=Hy;function gr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var D0=/^([a-z0-9.+-]+:)/i,$0=/:[0-9]*$/,G0=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,q0=["<",">",'"',"`"," ","\r",`
|
|
13
|
+
`," "],j0=["{","}","|","\\","^","`"].concat(q0),gl=["'"].concat(j0),Vc=["%","/","?",";","#"].concat(gl),Wc=["/","?","#"],H0=255,Xc=/^[+a-z0-9A-Z_-]{0,63}$/,z0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,V0={javascript:!0,"javascript:":!0},yl={javascript:!0,"javascript:":!0},li={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ml=B0;function Zs(e,t,r){if(e&&typeof e=="object"&&e instanceof gr)return e;var n=new gr;return n.parse(e,t,r),n}gr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",a=e.split(i),l=/\\/g;a[0]=a[0].replace(l,"/"),e=a.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=G0.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=ml.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=D0.exec(u);if(h){h=h[0];var p=h.toLowerCase();this.protocol=p,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var d=u.substr(0,2)==="//";d&&!(h&&yl[h])&&(u=u.substr(2),this.slashes=!0)}if(!yl[h]&&(d||h&&!li[h])){for(var c=-1,v=0;v<Wc.length;v++){var y=u.indexOf(Wc[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var _,b;c===-1?b=u.lastIndexOf("@"):b=u.lastIndexOf("@",c),b!==-1&&(_=u.slice(0,b),u=u.slice(b+1),this.auth=decodeURIComponent(_)),c=-1;for(var v=0;v<Vc.length;v++){var y=u.indexOf(Vc[v]);y!==-1&&(c===-1||y<c)&&(c=y)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var E=this.hostname.split(/\./),v=0,w=E.length;v<w;v++){var x=E[v];if(x&&!x.match(Xc)){for(var A="",P=0,S=x.length;P<S;P++)x.charCodeAt(P)>127?A+="x":A+=x[P];if(!A.match(Xc)){var O=E.slice(0,v),L=E.slice(v+1),R=x.match(z0);R&&(O.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=O.join(".");break}}}this.hostname.length>H0?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=U0.toASCII(this.hostname));var I=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+I,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!V0[p])for(var v=0,w=gl.length;v<w;v++){var C=gl[v];if(u.indexOf(C)!==-1){var F=encodeURIComponent(C);F===C&&(F=escape(C)),u=u.split(C).join(F)}}var j=u.indexOf("#");j!==-1&&(this.hash=u.substr(j),u=u.slice(0,j));var X=u.indexOf("?");if(X!==-1?(this.search=u.substr(X),this.query=u.substr(X+1),t&&(this.query=ml.parse(this.query)),u=u.slice(0,X)):t&&(this.search="",this.query={}),u&&(this.pathname=u),li[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var I=this.pathname||"",V=this.search||"";this.path=I+V}return this.href=this.format(),this};function W0(e){return typeof e=="string"&&(e=Zs(e)),e instanceof gr?e.format():gr.prototype.format.call(e)}gr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=ml.stringify(this.query));var l=this.search||a&&"?"+a||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||li[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),l&&l.charAt(0)!=="?"&&(l="?"+l),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),l=l.replace("#","%23"),t+i+r+l+n};function X0(e,t){return Zs(e,!1,!0).resolve(t)}gr.prototype.resolve=function(e){return this.resolveObject(Zs(e,!1,!0)).format()},gr.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new gr;t.parse(e,!1,!0),e=t}for(var r=new gr,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),u=0;u<l.length;u++){var f=l[u];f!=="protocol"&&(r[f]=e[f])}return li[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!li[e.protocol]){for(var h=Object.keys(e),p=0;p<h.length;p++){var d=h[p];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!yl[e.protocol]){for(var w=(e.pathname||"").split("/");w.length&&!(e.host=w.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),w[0]!==""&&w.unshift(""),w.length<2&&w.unshift(""),r.pathname=w.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var c=r.pathname||"",v=r.search||"";r.path=c+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",_=e.host||e.pathname&&e.pathname.charAt(0)==="/",b=_||y||r.host&&e.pathname,m=b,E=r.pathname&&r.pathname.split("/")||[],w=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!li[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(E[0]===""?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(w[0]===""?w[0]=e.host:w.unshift(e.host)),e.host=null),b=b&&(w[0]===""||E[0]==="")),_)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=w;else if(w.length)E||(E=[]),E.pop(),E=E.concat(w),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=E.shift(),r.hostname=r.host;var A=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;A&&(r.auth=A.shift(),r.hostname=A.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var P=E.slice(-1)[0],S=(r.host||e.host||E.length>1)&&(P==="."||P==="..")||P==="",O=0,L=E.length;L>=0;L--)P=E[L],P==="."?E.splice(L,1):P===".."?(E.splice(L,1),O++):O&&(E.splice(L,1),O--);if(!b&&!m)for(;O--;O)E.unshift("..");b&&E[0]!==""&&(!E[0]||E[0].charAt(0)!=="/")&&E.unshift(""),S&&E.join("/").substr(-1)!=="/"&&E.push("");var R=E[0]===""||E[0]&&E[0].charAt(0)==="/";if(x){r.hostname=R?"":E.length?E.shift():"",r.host=r.hostname;var A=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;A&&(r.auth=A.shift(),r.hostname=A.shift(),r.host=r.hostname)}return b=b||r.host&&E.length,b&&!R&&E.unshift(""),E.length>0?r.pathname=E.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},gr.prototype.parseHost=function(){var e=this.host,t=$0.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var K0=Zs,Y0=X0,Z0=W0;const J0={parse:K0,format:Z0,resolve:Y0},Kc={};function Jt(e,t,r=3){if(Kc[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
|
|
14
14
|
Deprecated since v${e}`):(n=n.split(`
|
|
15
15
|
`).splice(r).join(`
|
|
16
16
|
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
|
|
17
17
|
Deprecated since v${e}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
|
|
18
|
-
Deprecated since v${e}`),console.warn(n))),Kc[t]=!0}let _l;function Q0(){return typeof _l>"u"&&(_l=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:jt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!jt.ADAPTER.getWebGLRenderingContext())return!1;const n=jt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const a=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const l=i.getExtension("WEBGL_lose_context");l&&l.loseContext()}return i=null,a}catch{return!1}}()),_l}var t_={grad:.9,turn:360,rad:360/(2*Math.PI)},zr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Se=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},ar=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Yc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Zc=function(e){return{r:ar(e.r,0,255),g:ar(e.g,0,255),b:ar(e.b,0,255),a:ar(e.a)}},bl=function(e){return{r:Se(e.r),g:Se(e.g),b:Se(e.b),a:Se(e.a,3)}},e_=/^#([0-9a-f]{3,8})$/i,Js=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Jc=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=Math.max(t,r,n),l=a-Math.min(t,r,n),u=l?a===t?(r-n)/l:a===r?2+(n-t)/l:4+(t-r)/l:0;return{h:60*(u<0?u+6:u),s:a?l/a*100:0,v:a/255*100,a:i}},Qc=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),l=n*(1-r),u=n*(1-(t-a)*r),f=n*(1-(1-t+a)*r),h=a%6;return{r:255*[n,u,l,l,f,n][h],g:255*[f,n,n,u,l,l][h],b:255*[l,l,f,n,n,u][h],a:i}},th=function(e){return{h:Yc(e.h),s:ar(e.s,0,100),l:ar(e.l,0,100),a:ar(e.a)}},eh=function(e){return{h:Se(e.h),s:Se(e.s),l:Se(e.l),a:Se(e.a,3)}},rh=function(e){return Qc((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},es=function(e){return{h:(t=Jc(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},r_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,n_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,i_=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s_=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xl={string:[[function(e){var t=e_.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Se(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Se(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=i_.exec(e)||s_.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Zc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=r_.exec(e)||n_.exec(e);if(!t)return null;var r,n,i=th({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(t_[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return rh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=i===void 0?1:i;return zr(t)&&zr(r)&&zr(n)?Zc({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,a=i===void 0?1:i;if(!zr(t)||!zr(r)||!zr(n))return null;var l=th({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return rh(l)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,a=i===void 0?1:i;if(!zr(t)||!zr(r)||!zr(n))return null;var l=function(u){return{h:Yc(u.h),s:ar(u.s,0,100),v:ar(u.v,0,100),a:ar(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return Qc(l)},"hsv"]]},nh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},a_=function(e){return typeof e=="string"?nh(e.trim(),xl.string):typeof e=="object"&&e!==null?nh(e,xl.object):[null,void 0]},El=function(e,t){var r=es(e);return{h:r.h,s:ar(r.s+100*t,0,100),l:r.l,a:r.a}},wl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ih=function(e,t){var r=es(e);return{h:r.h,s:r.s,l:ar(r.l+100*t,0,100),a:r.a}},Tl=function(){function e(t){this.parsed=a_(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Se(wl(this.rgba),2)},e.prototype.isDark=function(){return wl(this.rgba)<.5},e.prototype.isLight=function(){return wl(this.rgba)>=.5},e.prototype.toHex=function(){return t=bl(this.rgba),r=t.r,n=t.g,i=t.b,l=(a=t.a)<1?Js(Se(255*a)):"","#"+Js(r)+Js(n)+Js(i)+l;var t,r,n,i,a,l},e.prototype.toRgb=function(){return bl(this.rgba)},e.prototype.toRgbString=function(){return t=bl(this.rgba),r=t.r,n=t.g,i=t.b,(a=t.a)<1?"rgba("+r+", "+n+", "+i+", "+a+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,a},e.prototype.toHsl=function(){return eh(es(this.rgba))},e.prototype.toHslString=function(){return t=eh(es(this.rgba)),r=t.h,n=t.s,i=t.l,(a=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+a+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,a},e.prototype.toHsv=function(){return t=Jc(this.rgba),{h:Se(t.h),s:Se(t.s),v:Se(t.v),a:Se(t.a,3)};var t},e.prototype.invert=function(){return kr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),kr(El(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),kr(El(this.rgba,-t))},e.prototype.grayscale=function(){return kr(El(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),kr(ih(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),kr(ih(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?kr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Se(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=es(this.rgba);return typeof t=="number"?kr({h:t,s:r.s,l:r.l,a:r.a}):Se(r.h)},e.prototype.isEqual=function(t){return this.toHex()===kr(t).toHex()},e}(),kr=function(e){return e instanceof Tl?e:new Tl(e)},sh=[],o_=function(e){e.forEach(function(t){sh.indexOf(t)<0&&(t(Tl,xl),sh.push(t))})};function l_(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var a={};e.prototype.toName=function(l){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(l!=null&&l.closest){var p=this.toRgb(),d=1/0,c="black";if(!a.length)for(var v in r)a[v]=new e(r[v]).toRgb();for(var y in r){var m=(u=p,f=a[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));m<d&&(d=m,c=y)}return c}},t.string.push([function(l){var u=l.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}o_([l_]);const ui=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof ui)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,a)=>i===t[a]);if(e!==null&&t!==null){const i=Object.keys(e),a=Object.keys(t);return i.length!==a.length?!1:i.every(l=>e[l]===t[l])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=ui.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,a=1]=e;t=[r,n,i,a]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,a=255]=e;t=[r/255,n/255,i/255,a/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=ui.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=kr(e);if(r.isValid()){const{r:n,g:i,b:a,a:l}=r.rgba;t=[n/255,i/255,a/255,l]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Ge=ui;Ge.shared=new ui,Ge.temp=new ui,Ge.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function u_(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Rt.NORMAL_NPM]=Rt.NORMAL,e[Rt.ADD_NPM]=Rt.ADD,e[Rt.SCREEN_NPM]=Rt.SCREEN,t[Rt.NORMAL]=Rt.NORMAL_NPM,t[Rt.ADD]=Rt.ADD_NPM,t[Rt.SCREEN]=Rt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const f_=u_();function ah(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function Qs(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function oh(e){return!(e&e-1)&&!!e}function lh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function ta(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const a=n-r;for(i=t;i<a;++i)e[i]=e[i+r];e.length=a}let c_=0;function rs(){return++c_}const uh={},Lr=Object.create(null),cn=Object.create(null);let ea;function h_(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,ea||(ea=document.createElement("a")),ea.href=e;const r=J0.parse(ea.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function fh(e,t=1){var n;const r=(n=jt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var Gt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(Gt||{});const Al=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},ch=(e,t)=>Al(e).priority??t,Qt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Al).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Al).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const a=this._queue;return a[e]&&(a[e].forEach(l=>t(l)),delete a[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,a)=>ch(a,r)-ch(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class d_{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const p_=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
18
|
+
Deprecated since v${e}`),console.warn(n))),Kc[t]=!0}let _l;function Q0(){return typeof _l>"u"&&(_l=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:jt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!jt.ADAPTER.getWebGLRenderingContext())return!1;const n=jt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const a=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const l=i.getExtension("WEBGL_lose_context");l&&l.loseContext()}return i=null,a}catch{return!1}}()),_l}var t_={grad:.9,turn:360,rad:360/(2*Math.PI)},zr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Se=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},ar=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Yc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Zc=function(e){return{r:ar(e.r,0,255),g:ar(e.g,0,255),b:ar(e.b,0,255),a:ar(e.a)}},bl=function(e){return{r:Se(e.r),g:Se(e.g),b:Se(e.b),a:Se(e.a,3)}},e_=/^#([0-9a-f]{3,8})$/i,Js=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Jc=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=Math.max(t,r,n),l=a-Math.min(t,r,n),u=l?a===t?(r-n)/l:a===r?2+(n-t)/l:4+(t-r)/l:0;return{h:60*(u<0?u+6:u),s:a?l/a*100:0,v:a/255*100,a:i}},Qc=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),l=n*(1-r),u=n*(1-(t-a)*r),f=n*(1-(1-t+a)*r),h=a%6;return{r:255*[n,u,l,l,f,n][h],g:255*[f,n,n,u,l,l][h],b:255*[l,l,f,n,n,u][h],a:i}},th=function(e){return{h:Yc(e.h),s:ar(e.s,0,100),l:ar(e.l,0,100),a:ar(e.a)}},eh=function(e){return{h:Se(e.h),s:Se(e.s),l:Se(e.l),a:Se(e.a,3)}},rh=function(e){return Qc((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},es=function(e){return{h:(t=Jc(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},r_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,n_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,i_=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s_=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xl={string:[[function(e){var t=e_.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Se(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Se(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=i_.exec(e)||s_.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Zc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=r_.exec(e)||n_.exec(e);if(!t)return null;var r,n,i=th({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(t_[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return rh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=i===void 0?1:i;return zr(t)&&zr(r)&&zr(n)?Zc({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,a=i===void 0?1:i;if(!zr(t)||!zr(r)||!zr(n))return null;var l=th({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return rh(l)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,a=i===void 0?1:i;if(!zr(t)||!zr(r)||!zr(n))return null;var l=function(u){return{h:Yc(u.h),s:ar(u.s,0,100),v:ar(u.v,0,100),a:ar(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return Qc(l)},"hsv"]]},nh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},a_=function(e){return typeof e=="string"?nh(e.trim(),xl.string):typeof e=="object"&&e!==null?nh(e,xl.object):[null,void 0]},El=function(e,t){var r=es(e);return{h:r.h,s:ar(r.s+100*t,0,100),l:r.l,a:r.a}},wl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ih=function(e,t){var r=es(e);return{h:r.h,s:r.s,l:ar(r.l+100*t,0,100),a:r.a}},Tl=function(){function e(t){this.parsed=a_(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Se(wl(this.rgba),2)},e.prototype.isDark=function(){return wl(this.rgba)<.5},e.prototype.isLight=function(){return wl(this.rgba)>=.5},e.prototype.toHex=function(){return t=bl(this.rgba),r=t.r,n=t.g,i=t.b,l=(a=t.a)<1?Js(Se(255*a)):"","#"+Js(r)+Js(n)+Js(i)+l;var t,r,n,i,a,l},e.prototype.toRgb=function(){return bl(this.rgba)},e.prototype.toRgbString=function(){return t=bl(this.rgba),r=t.r,n=t.g,i=t.b,(a=t.a)<1?"rgba("+r+", "+n+", "+i+", "+a+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,a},e.prototype.toHsl=function(){return eh(es(this.rgba))},e.prototype.toHslString=function(){return t=eh(es(this.rgba)),r=t.h,n=t.s,i=t.l,(a=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+a+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,a},e.prototype.toHsv=function(){return t=Jc(this.rgba),{h:Se(t.h),s:Se(t.s),v:Se(t.v),a:Se(t.a,3)};var t},e.prototype.invert=function(){return Lr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Lr(El(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Lr(El(this.rgba,-t))},e.prototype.grayscale=function(){return Lr(El(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Lr(ih(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Lr(ih(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Lr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Se(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=es(this.rgba);return typeof t=="number"?Lr({h:t,s:r.s,l:r.l,a:r.a}):Se(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Lr(t).toHex()},e}(),Lr=function(e){return e instanceof Tl?e:new Tl(e)},sh=[],o_=function(e){e.forEach(function(t){sh.indexOf(t)<0&&(t(Tl,xl),sh.push(t))})};function l_(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var a={};e.prototype.toName=function(l){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(l!=null&&l.closest){var p=this.toRgb(),d=1/0,c="black";if(!a.length)for(var v in r)a[v]=new e(r[v]).toRgb();for(var y in r){var _=(u=p,f=a[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));_<d&&(d=_,c=y)}return c}},t.string.push([function(l){var u=l.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}o_([l_]);const ui=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof ui)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,a)=>i===t[a]);if(e!==null&&t!==null){const i=Object.keys(e),a=Object.keys(t);return i.length!==a.length?!1:i.every(l=>e[l]===t[l])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=ui.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,a=1]=e;t=[r,n,i,a]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,a=255]=e;t=[r/255,n/255,i/255,a/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=ui.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Lr(e);if(r.isValid()){const{r:n,g:i,b:a,a:l}=r.rgba;t=[n/255,i/255,a/255,l]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Ge=ui;Ge.shared=new ui,Ge.temp=new ui,Ge.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function u_(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[It.NORMAL_NPM]=It.NORMAL,e[It.ADD_NPM]=It.ADD,e[It.SCREEN_NPM]=It.SCREEN,t[It.NORMAL]=It.NORMAL_NPM,t[It.ADD]=It.ADD_NPM,t[It.SCREEN]=It.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const f_=u_();function ah(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function Qs(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function oh(e){return!(e&e-1)&&!!e}function lh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function ta(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const a=n-r;for(i=t;i<a;++i)e[i]=e[i+r];e.length=a}let c_=0;function rs(){return++c_}const uh={},Fr=Object.create(null),cn=Object.create(null);let ea;function h_(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,ea||(ea=document.createElement("a")),ea.href=e;const r=J0.parse(ea.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function fh(e,t=1){var n;const r=(n=jt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var Gt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(Gt||{});const Al=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},ch=(e,t)=>Al(e).priority??t,Qt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Al).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Al).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const a=this._queue;return a[e]&&(a[e].forEach(l=>t(l)),delete a[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,a)=>ch(a,r)-ch(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class d_{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const p_=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
19
19
|
`);function v_(e){let t="";for(let r=0;r<e;++r)r>0&&(t+=`
|
|
20
|
-
else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function g_(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=p_.replace(/%forloop%/gi,v_(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Sl=0,Ol=1,Il=2,Rl=3,Cl=4,Nl=5;let ra=class hy{constructor(){this.data=0,this.blendMode=Rt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Sl)}set blend(t){!!(this.data&1<<Sl)!==t&&(this.data^=1<<Sl)}get offsets(){return!!(this.data&1<<Ol)}set offsets(t){!!(this.data&1<<Ol)!==t&&(this.data^=1<<Ol)}get culling(){return!!(this.data&1<<Il)}set culling(t){!!(this.data&1<<Il)!==t&&(this.data^=1<<Il)}get depthTest(){return!!(this.data&1<<Rl)}set depthTest(t){!!(this.data&1<<Rl)!==t&&(this.data^=1<<Rl)}get depthMask(){return!!(this.data&1<<Nl)}set depthMask(t){!!(this.data&1<<Nl)!==t&&(this.data^=1<<Nl)}get clockwiseFrontFace(){return!!(this.data&1<<Cl)}set clockwiseFrontFace(t){!!(this.data&1<<Cl)!==t&&(this.data^=1<<Cl)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Rt.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new hy;return t.depthTest=!1,t.blend=!0,t}};const Pl=[];function hh(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Pl.length-1;n>=0;--n){const i=Pl[n];if(i.test&&i.test(e,r))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class yr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,i,a,l,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:p}=this;this._aliasCount++;for(let d=0,c=p.length;d<c;d++)p[d][h](t,r,n,i,a,l,u,f);return p===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(yr.prototype,{dispatch:{value:yr.prototype.emit},run:{value:yr.prototype.emit}});class ns{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new yr("setRealSize"),this.onUpdate=new yr("update"),this.onError=new yr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class Ml extends ns{constructor(t,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=t}upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===on.UNPACK);const a=r.realWidth,l=r.realHeight;return n.width===a&&n.height===l?i.texSubImage2D(r.target,0,0,0,a,l,r.format,n.type,this.data):(n.width=a,n.height=l,i.texImage2D(r.target,0,n.internalFormat,a,l,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const y_={scaleMode:qr.NEAREST,format:yt.RGBA,alphaMode:on.NPM},fi=class extends Bs{constructor(e=null,t=null){super(),t=Object.assign({},fi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:a,width:l,height:u,wrapMode:f,format:h,type:p,target:d,resolution:c,resourceOptions:v}=t;e&&!(e instanceof ns)&&(e=hh(e,v),e.internal=!0),this.resolution=c||jt.RESOLUTION,this.width=Math.round((l||0)*this.resolution)/this.resolution,this.height=Math.round((u||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=a,this.format=h,this.type=p,this.target=d,this.alphaMode=r,this.uid=rs(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=l>0&&u>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=oh(this.realWidth)&&oh(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete cn[this.cacheId],delete Lr[this.cacheId],this.cacheId=null),this.dispose(),fi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=jt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const l=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${rs()}`}i=e._pixiId}let a=cn[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new fi(e,t),a.cacheId=i,fi.addToCache(a,i)),a}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new Ml(e,{width:t,height:r}),a=e instanceof Float32Array?Ht.FLOAT:Ht.UNSIGNED_BYTE;return new fi(i,Object.assign({},y_,n||{width:t,height:r,type:a}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),cn[t]&&cn[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),cn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=cn[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete cn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete cn[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let zt=fi;zt.defaultOptions={mipmap:Sn.POW2,anisotropicLevel:0,scaleMode:qr.LINEAR,wrapMode:Vi.CLAMP,alphaMode:on.UNPACK,target:Zn.TEXTURE_2D,format:yt.RGBA,type:Ht.UNSIGNED_BYTE},zt._globalBatch=0;class kl{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let m_=0,Ke=class dy{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=m_++,this.disposeRunner=new yr("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Nr.ELEMENT_ARRAY_BUFFER:Nr.ARRAY_BUFFER}get index(){return this.type===Nr.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new dy(t)}};class na{constructor(t,r=0,n=!1,i=Ht.FLOAT,a,l,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=a,this.start=l,this.instance=u,this.divisor=f}destroy(){this.buffer=null}static from(t,r,n,i,a){return new na(t,r,n,i,a)}}const __={Float32Array,Uint32Array,Int32Array,Uint8Array};function b_(e,t){let r=0,n=0;const i={};for(let f=0;f<e.length;f++)n+=t[f],r+=e[f].length;const a=new ArrayBuffer(r*4);let l=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],p=e[f],d=ah(p);i[d]||(i[d]=new __[d](a)),l=i[d];for(let c=0;c<p.length;c++){const v=(c/h|0)*n+u,y=c%h;l[v+y]=p[c]}u+=h}return new Float32Array(a)}const dh={5126:4,5123:2,5121:1};let x_=0;const E_={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class ci{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=x_++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new yr("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,a,l,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Ke||(r instanceof Array&&(r=new Float32Array(r)),r=new Ke(r));const h=t.split("|");if(h.length>1){for(let d=0;d<h.length;d++)this.addAttribute(h[d],r,n,i,a);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new na(p,n,i,a,l,u,f),this.instanced=this.instanced||f,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Ke||(t instanceof Array&&(t=new Uint16Array(t)),t=new Ke(t)),t.type=Nr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Ke;let i;for(i in this.attributes){const a=this.attributes[i],l=this.buffers[a.buffer];t.push(l.data),r.push(a.size*dh[a.type]/4),a.buffer=0}for(n.data=b_(t,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new ci;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Ke(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new na(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Nr.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new ci,n=[],i=[],a=[];let l;for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)i[f]=i[f]||0,i[f]+=l.buffers[f].data.length,a[f]=0}for(let u=0;u<l.buffers.length;u++)n[u]=new E_[ah(l.buffers[u].data)](i[u]),r.buffers[u]=new Ke(n[u]);for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)n[f].set(l.buffers[f].data,a[f]),a[f]+=l.buffers[f].data.length}if(r.attributes=l.attributes,l.indexBuffer){r.indexBuffer=r.buffers[l.buffers.indexOf(l.indexBuffer)],r.indexBuffer.type=Nr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,p=0;for(let d=0;d<l.buffers.length;d++)if(l.buffers[d]!==l.indexBuffer){p=d;break}for(const d in l.attributes){const c=l.attributes[d];(c.buffer|0)===p&&(f+=c.size*dh[c.type]/4)}for(let d=0;d<t.length;d++){const c=t[d].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[d].buffers[p].data.length/f,h+=c.length}}return r}}class ph extends ci{constructor(t=!1){super(),this._buffer=new Ke(null,t,!1),this._indexBuffer=new Ke(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ht.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ht.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ht.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ht.FLOAT).addIndex(this._indexBuffer)}}const ia=Math.PI*2,w_=180/Math.PI,T_=Math.PI/180;var Re=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(Re||{});class Oe{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new Oe(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const sa=[new Oe,new Oe,new Oe,new Oe];class ee{constructor(t=0,r=0,n=0,i=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Re.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ee(0,0,0,0)}clone(){return new ee(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const R=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>R}const n=this.left,i=this.right,a=this.top,l=this.bottom;if(i<=n||l<=a)return!1;const u=sa[0].set(t.left,t.top),f=sa[1].set(t.left,t.bottom),h=sa[2].set(t.right,t.top),p=sa[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const d=Math.sign(r.a*r.d-r.b*r.c);if(d===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(p,p),Math.max(u.x,f.x,h.x,p.x)<=n||Math.min(u.x,f.x,h.x,p.x)>=i||Math.max(u.y,f.y,h.y,p.y)<=a||Math.min(u.y,f.y,h.y,p.y)>=l))return!1;const c=d*(f.y-u.y),v=d*(u.x-f.x),y=c*n+v*a,m=c*i+v*a,_=c*n+v*l,b=c*i+v*l;if(Math.max(y,m,_,b)<=c*u.x+v*u.y||Math.min(y,m,_,b)>=c*p.x+v*p.y)return!1;const E=d*(u.y-h.y),w=d*(h.x-u.x),x=E*n+w*a,A=E*i+w*a,P=E*n+w*l,S=E*i+w*l;return!(Math.max(x,A,P,S)<=E*u.x+w*u.y||Math.min(x,A,P,S)>=E*p.x+w*p.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(a-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=a-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Ll{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Re.CIRC}clone(){return new Ll(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-t,a=this.y-r;return i*=i,a*=a,i+a<=n}getBounds(){return new ee(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let A_=class py{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Re.ELIP}clone(){return new py(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new ee(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class is{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let i=0,a=r.length;i<a;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Re.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new is(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const i=this.points.length/2;for(let a=0,l=i-1;a<i;l=a++){const u=this.points[a*2],f=this.points[a*2+1],h=this.points[l*2],p=this.points[l*2+1];f>r!=p>r&&t<(h-u)*((r-f)/(p-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class Fl{constructor(t=0,r=0,n=0,i=0,a=20){this.x=t,this.y=r,this.width=n,this.height=i,this.radius=a,this.type=Re.RREC}clone(){return new Fl(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let i=t-(this.x+n),a=r-(this.y+n);const l=n*n;if(i*i+a*a<=l||(i=t-(this.x+this.width-n),i*i+a*a<=l)||(a=r-(this.y+this.height-n),i*i+a*a<=l)||(i=t-(this.x+n),i*i+a*a<=l))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Fe=class Fo{constructor(t=1,r=0,n=0,i=1,a=0,l=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=l}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,i,a,l){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=l,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new Oe;const n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(t,r){r=r||new Oe;const n=1/(this.a*this.d+this.c*-this.b),i=t.x,a=t.y;return r.x=this.d*n*i+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),i=this.a,a=this.c,l=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=l*r-this.ty*n,this.ty=l*n+this.ty*r,this}append(t){const r=this.a,n=this.b,i=this.c,a=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*a,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*a,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*a+this.ty,this}setTransform(t,r,n,i,a,l,u,f,h){return this.a=Math.cos(u+h)*a,this.b=Math.sin(u+h)*a,this.c=-Math.sin(u-f)*l,this.d=Math.cos(u-f)*l,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,i=this.c,a=this.d,l=t.pivot,u=-Math.atan2(-i,a),f=Math.atan2(n,r),h=Math.abs(u+f);return h<1e-5||Math.abs(ia-h)<1e-5?(t.rotation=f,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=u,t.skew.y=f),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+a*a),t.position.x=this.tx+(l.x*r+l.y*i),t.position.y=this.ty+(l.x*n+l.y*a),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,a=this.tx,l=t*i-r*n;return this.a=i/l,this.b=-r/l,this.c=-n/l,this.d=t/l,this.tx=(n*this.ty-i*a)/l,this.ty=-(t*this.ty-r*a)/l,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new Fo;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Fo}static get TEMP_MATRIX(){return new Fo}};const Pn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Mn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],kn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ln=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Bl=[],vh=[],aa=Math.sign;function S_(){for(let e=0;e<16;e++){const t=[];Bl.push(t);for(let r=0;r<16;r++){const n=aa(Pn[e]*Pn[r]+kn[e]*Mn[r]),i=aa(Mn[e]*Pn[r]+Ln[e]*Mn[r]),a=aa(Pn[e]*kn[r]+kn[e]*Ln[r]),l=aa(Mn[e]*kn[r]+Ln[e]*Ln[r]);for(let u=0;u<16;u++)if(Pn[u]===n&&Mn[u]===i&&kn[u]===a&&Ln[u]===l){t.push(u);break}}}for(let e=0;e<16;e++){const t=new Fe;t.set(Pn[e],Mn[e],kn[e],Ln[e],0,0),vh.push(t)}}S_();const he={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Pn[e],uY:e=>Mn[e],vX:e=>kn[e],vY:e=>Ln[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>Bl[e][t],sub:(e,t)=>Bl[e][he.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?he.S:he.N:Math.abs(t)*2<=Math.abs(e)?e>0?he.E:he.W:t>0?e>0?he.SE:he.SW:e>0?he.NE:he.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=vh[he.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class hi{constructor(t,r,n=0,i=0){this._x=n,this._y=i,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new hi(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const gh=class{constructor(){this.worldTransform=new Fe,this.localTransform=new Fe,this.position=new hi(this.onChange,this,0,0),this.scale=new hi(this.onChange,this,1,1),this.pivot=new hi(this.onChange,this,0,0),this.skew=new hi(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let Ul=gh;Ul.IDENTITY=new gh;var O_=`varying vec2 vTextureCoord;
|
|
20
|
+
else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function g_(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=p_.replace(/%forloop%/gi,v_(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Sl=0,Ol=1,Il=2,Rl=3,Cl=4,Nl=5;let ra=class hy{constructor(){this.data=0,this.blendMode=It.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Sl)}set blend(t){!!(this.data&1<<Sl)!==t&&(this.data^=1<<Sl)}get offsets(){return!!(this.data&1<<Ol)}set offsets(t){!!(this.data&1<<Ol)!==t&&(this.data^=1<<Ol)}get culling(){return!!(this.data&1<<Il)}set culling(t){!!(this.data&1<<Il)!==t&&(this.data^=1<<Il)}get depthTest(){return!!(this.data&1<<Rl)}set depthTest(t){!!(this.data&1<<Rl)!==t&&(this.data^=1<<Rl)}get depthMask(){return!!(this.data&1<<Nl)}set depthMask(t){!!(this.data&1<<Nl)!==t&&(this.data^=1<<Nl)}get clockwiseFrontFace(){return!!(this.data&1<<Cl)}set clockwiseFrontFace(t){!!(this.data&1<<Cl)!==t&&(this.data^=1<<Cl)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==It.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new hy;return t.depthTest=!1,t.blend=!0,t}};const Pl=[];function hh(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Pl.length-1;n>=0;--n){const i=Pl[n];if(i.test&&i.test(e,r))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class yr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,i,a,l,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:p}=this;this._aliasCount++;for(let d=0,c=p.length;d<c;d++)p[d][h](t,r,n,i,a,l,u,f);return p===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(yr.prototype,{dispatch:{value:yr.prototype.emit},run:{value:yr.prototype.emit}});class ns{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new yr("setRealSize"),this.onUpdate=new yr("update"),this.onError=new yr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class Ml extends ns{constructor(t,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=t}upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===on.UNPACK);const a=r.realWidth,l=r.realHeight;return n.width===a&&n.height===l?i.texSubImage2D(r.target,0,0,0,a,l,r.format,n.type,this.data):(n.width=a,n.height=l,i.texImage2D(r.target,0,n.internalFormat,a,l,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const y_={scaleMode:qr.NEAREST,format:yt.RGBA,alphaMode:on.NPM},fi=class extends Bs{constructor(e=null,t=null){super(),t=Object.assign({},fi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:a,width:l,height:u,wrapMode:f,format:h,type:p,target:d,resolution:c,resourceOptions:v}=t;e&&!(e instanceof ns)&&(e=hh(e,v),e.internal=!0),this.resolution=c||jt.RESOLUTION,this.width=Math.round((l||0)*this.resolution)/this.resolution,this.height=Math.round((u||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=a,this.format=h,this.type=p,this.target=d,this.alphaMode=r,this.uid=rs(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=l>0&&u>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=oh(this.realWidth)&&oh(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete cn[this.cacheId],delete Fr[this.cacheId],this.cacheId=null),this.dispose(),fi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=jt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const l=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${rs()}`}i=e._pixiId}let a=cn[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new fi(e,t),a.cacheId=i,fi.addToCache(a,i)),a}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new Ml(e,{width:t,height:r}),a=e instanceof Float32Array?Ht.FLOAT:Ht.UNSIGNED_BYTE;return new fi(i,Object.assign({},y_,n||{width:t,height:r,type:a}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),cn[t]&&cn[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),cn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=cn[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete cn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete cn[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let zt=fi;zt.defaultOptions={mipmap:Sn.POW2,anisotropicLevel:0,scaleMode:qr.LINEAR,wrapMode:Vi.CLAMP,alphaMode:on.UNPACK,target:Zn.TEXTURE_2D,format:yt.RGBA,type:Ht.UNSIGNED_BYTE},zt._globalBatch=0;class kl{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let m_=0,Ye=class dy{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=m_++,this.disposeRunner=new yr("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Pr.ELEMENT_ARRAY_BUFFER:Pr.ARRAY_BUFFER}get index(){return this.type===Pr.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new dy(t)}};class na{constructor(t,r=0,n=!1,i=Ht.FLOAT,a,l,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=a,this.start=l,this.instance=u,this.divisor=f}destroy(){this.buffer=null}static from(t,r,n,i,a){return new na(t,r,n,i,a)}}const __={Float32Array,Uint32Array,Int32Array,Uint8Array};function b_(e,t){let r=0,n=0;const i={};for(let f=0;f<e.length;f++)n+=t[f],r+=e[f].length;const a=new ArrayBuffer(r*4);let l=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],p=e[f],d=ah(p);i[d]||(i[d]=new __[d](a)),l=i[d];for(let c=0;c<p.length;c++){const v=(c/h|0)*n+u,y=c%h;l[v+y]=p[c]}u+=h}return new Float32Array(a)}const dh={5126:4,5123:2,5121:1};let x_=0;const E_={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class ci{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=x_++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new yr("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,a,l,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Ye||(r instanceof Array&&(r=new Float32Array(r)),r=new Ye(r));const h=t.split("|");if(h.length>1){for(let d=0;d<h.length;d++)this.addAttribute(h[d],r,n,i,a);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new na(p,n,i,a,l,u,f),this.instanced=this.instanced||f,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Ye||(t instanceof Array&&(t=new Uint16Array(t)),t=new Ye(t)),t.type=Pr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Ye;let i;for(i in this.attributes){const a=this.attributes[i],l=this.buffers[a.buffer];t.push(l.data),r.push(a.size*dh[a.type]/4),a.buffer=0}for(n.data=b_(t,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new ci;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Ye(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new na(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Pr.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new ci,n=[],i=[],a=[];let l;for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)i[f]=i[f]||0,i[f]+=l.buffers[f].data.length,a[f]=0}for(let u=0;u<l.buffers.length;u++)n[u]=new E_[ah(l.buffers[u].data)](i[u]),r.buffers[u]=new Ye(n[u]);for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)n[f].set(l.buffers[f].data,a[f]),a[f]+=l.buffers[f].data.length}if(r.attributes=l.attributes,l.indexBuffer){r.indexBuffer=r.buffers[l.buffers.indexOf(l.indexBuffer)],r.indexBuffer.type=Pr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,p=0;for(let d=0;d<l.buffers.length;d++)if(l.buffers[d]!==l.indexBuffer){p=d;break}for(const d in l.attributes){const c=l.attributes[d];(c.buffer|0)===p&&(f+=c.size*dh[c.type]/4)}for(let d=0;d<t.length;d++){const c=t[d].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[d].buffers[p].data.length/f,h+=c.length}}return r}}class ph extends ci{constructor(t=!1){super(),this._buffer=new Ye(null,t,!1),this._indexBuffer=new Ye(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ht.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ht.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ht.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ht.FLOAT).addIndex(this._indexBuffer)}}const ia=Math.PI*2,w_=180/Math.PI,T_=Math.PI/180;var Re=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(Re||{});class Oe{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new Oe(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const sa=[new Oe,new Oe,new Oe,new Oe];class ee{constructor(t=0,r=0,n=0,i=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Re.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ee(0,0,0,0)}clone(){return new ee(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const R=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>R}const n=this.left,i=this.right,a=this.top,l=this.bottom;if(i<=n||l<=a)return!1;const u=sa[0].set(t.left,t.top),f=sa[1].set(t.left,t.bottom),h=sa[2].set(t.right,t.top),p=sa[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const d=Math.sign(r.a*r.d-r.b*r.c);if(d===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(p,p),Math.max(u.x,f.x,h.x,p.x)<=n||Math.min(u.x,f.x,h.x,p.x)>=i||Math.max(u.y,f.y,h.y,p.y)<=a||Math.min(u.y,f.y,h.y,p.y)>=l))return!1;const c=d*(f.y-u.y),v=d*(u.x-f.x),y=c*n+v*a,_=c*i+v*a,b=c*n+v*l,m=c*i+v*l;if(Math.max(y,_,b,m)<=c*u.x+v*u.y||Math.min(y,_,b,m)>=c*p.x+v*p.y)return!1;const E=d*(u.y-h.y),w=d*(h.x-u.x),x=E*n+w*a,A=E*i+w*a,P=E*n+w*l,S=E*i+w*l;return!(Math.max(x,A,P,S)<=E*u.x+w*u.y||Math.min(x,A,P,S)>=E*p.x+w*p.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(a-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=a-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Ll{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Re.CIRC}clone(){return new Ll(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-t,a=this.y-r;return i*=i,a*=a,i+a<=n}getBounds(){return new ee(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let A_=class py{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Re.ELIP}clone(){return new py(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new ee(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class is{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let i=0,a=r.length;i<a;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Re.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new is(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const i=this.points.length/2;for(let a=0,l=i-1;a<i;l=a++){const u=this.points[a*2],f=this.points[a*2+1],h=this.points[l*2],p=this.points[l*2+1];f>r!=p>r&&t<(h-u)*((r-f)/(p-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class Fl{constructor(t=0,r=0,n=0,i=0,a=20){this.x=t,this.y=r,this.width=n,this.height=i,this.radius=a,this.type=Re.RREC}clone(){return new Fl(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let i=t-(this.x+n),a=r-(this.y+n);const l=n*n;if(i*i+a*a<=l||(i=t-(this.x+this.width-n),i*i+a*a<=l)||(a=r-(this.y+this.height-n),i*i+a*a<=l)||(i=t-(this.x+n),i*i+a*a<=l))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Fe=class Fo{constructor(t=1,r=0,n=0,i=1,a=0,l=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=l}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,i,a,l){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=l,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new Oe;const n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(t,r){r=r||new Oe;const n=1/(this.a*this.d+this.c*-this.b),i=t.x,a=t.y;return r.x=this.d*n*i+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),i=this.a,a=this.c,l=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=l*r-this.ty*n,this.ty=l*n+this.ty*r,this}append(t){const r=this.a,n=this.b,i=this.c,a=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*a,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*a,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*a+this.ty,this}setTransform(t,r,n,i,a,l,u,f,h){return this.a=Math.cos(u+h)*a,this.b=Math.sin(u+h)*a,this.c=-Math.sin(u-f)*l,this.d=Math.cos(u-f)*l,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,i=this.c,a=this.d,l=t.pivot,u=-Math.atan2(-i,a),f=Math.atan2(n,r),h=Math.abs(u+f);return h<1e-5||Math.abs(ia-h)<1e-5?(t.rotation=f,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=u,t.skew.y=f),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+a*a),t.position.x=this.tx+(l.x*r+l.y*i),t.position.y=this.ty+(l.x*n+l.y*a),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,a=this.tx,l=t*i-r*n;return this.a=i/l,this.b=-r/l,this.c=-n/l,this.d=t/l,this.tx=(n*this.ty-i*a)/l,this.ty=-(t*this.ty-r*a)/l,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new Fo;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Fo}static get TEMP_MATRIX(){return new Fo}};const Pn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Mn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],kn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ln=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Bl=[],vh=[],aa=Math.sign;function S_(){for(let e=0;e<16;e++){const t=[];Bl.push(t);for(let r=0;r<16;r++){const n=aa(Pn[e]*Pn[r]+kn[e]*Mn[r]),i=aa(Mn[e]*Pn[r]+Ln[e]*Mn[r]),a=aa(Pn[e]*kn[r]+kn[e]*Ln[r]),l=aa(Mn[e]*kn[r]+Ln[e]*Ln[r]);for(let u=0;u<16;u++)if(Pn[u]===n&&Mn[u]===i&&kn[u]===a&&Ln[u]===l){t.push(u);break}}}for(let e=0;e<16;e++){const t=new Fe;t.set(Pn[e],Mn[e],kn[e],Ln[e],0,0),vh.push(t)}}S_();const ce={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Pn[e],uY:e=>Mn[e],vX:e=>kn[e],vY:e=>Ln[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>Bl[e][t],sub:(e,t)=>Bl[e][ce.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ce.S:ce.N:Math.abs(t)*2<=Math.abs(e)?e>0?ce.E:ce.W:t>0?e>0?ce.SE:ce.SW:e>0?ce.NE:ce.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=vh[ce.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class hi{constructor(t,r,n=0,i=0){this._x=n,this._y=i,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new hi(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const gh=class{constructor(){this.worldTransform=new Fe,this.localTransform=new Fe,this.position=new hi(this.onChange,this,0,0),this.scale=new hi(this.onChange,this,1,1),this.pivot=new hi(this.onChange,this,0,0),this.skew=new hi(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let Ul=gh;Ul.IDENTITY=new gh;var O_=`varying vec2 vTextureCoord;
|
|
21
21
|
|
|
22
22
|
uniform sampler2D uSampler;
|
|
23
23
|
|
|
@@ -311,7 +311,7 @@ void main(void){
|
|
|
311
311
|
`);u[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...u),console.groupEnd()}function k_(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||bh(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||bh(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const L_={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function xh(e){return L_[e]}let la=null;const Eh={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function wh(e,t){if(!la){const r=Object.keys(Eh);la={};for(let n=0;n<r.length;++n){const i=r[n];la[e[i]]=Eh[i]}}return la[t]}function Th(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===sr.HIGH&&r!==sr.HIGH&&(n=sr.MEDIUM),`precision ${n} float;
|
|
312
312
|
${e}`}else if(r!==sr.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let ss;function F_(){if(typeof ss=="boolean")return ss;try{ss=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ss=!1}return ss}let B_=0;const ua={},vi=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=B_++,this.vertexSrc=e||vi.defaultVertexSrc,this.fragmentSrc=t||vi.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),ua[r]?(ua[r]++,r+=`-${ua[r]}`):ua[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
|
|
313
313
|
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
|
|
314
|
-
${this.fragmentSrc}`,this.vertexSrc=Th(this.vertexSrc,vi.defaultVertexPrecision,sr.HIGH),this.fragmentSrc=Th(this.fragmentSrc,vi.defaultFragmentPrecision,M_())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return I_}static get defaultFragmentSrc(){return O_}static from(e,t,r){const n=e+t;let i=uh[n];return i||(uh[n]=i=new vi(e,t,r)),i}};let Vr=vi;Vr.defaultVertexPrecision=sr.HIGH,Vr.defaultFragmentPrecision=Qn.apple.device?sr.HIGH:sr.MEDIUM;let U_=0;class mr{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=U_++,this.static=!!r,this.ubo=!!n,t instanceof
|
|
314
|
+
${this.fragmentSrc}`,this.vertexSrc=Th(this.vertexSrc,vi.defaultVertexPrecision,sr.HIGH),this.fragmentSrc=Th(this.fragmentSrc,vi.defaultFragmentPrecision,M_())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return I_}static get defaultFragmentSrc(){return O_}static from(e,t,r){const n=e+t;let i=uh[n];return i||(uh[n]=i=new vi(e,t,r)),i}};let Vr=vi;Vr.defaultVertexPrecision=sr.HIGH,Vr.defaultFragmentPrecision=Qn.apple.device?sr.HIGH:sr.MEDIUM;let U_=0;class mr{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=U_++,this.static=!!r,this.ubo=!!n,t instanceof Ye?(this.buffer=t,this.buffer.type=Pr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Ye(new Float32Array(1)),this.buffer.type=Pr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,r,n){if(!this.ubo)this.uniforms[t]=new mr(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,r,n){return new mr(t,r,n)}static uboFrom(t,r){return new mr(t,r??!0,!0)}}class as{constructor(t,r){this.uniformBindCount=0,this.program=t,r?r instanceof mr?this.uniformGroup=r:this.uniformGroup=new mr(r):this.uniformGroup=new mr({}),this.disposeRunner=new yr("disposeShader")}checkUniformExists(t,r){if(r.uniforms[t])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(t,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,r,n){const i=Vr.from(t,r);return new as(i,n)}}class D_{constructor(t,r){if(this.vertexSrc=t,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(t){if(!this.programCache[t]){const n=new Int32Array(t);for(let a=0;a<t;a++)n[a]=a;this.defaultGroupCache[t]=mr.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${t}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Vr(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Fe,default:this.defaultGroupCache[t]};return new as(this.programCache[t],r)}generateSampleSrc(t){let r="";r+=`
|
|
315
315
|
`,r+=`
|
|
316
316
|
`;for(let n=0;n<t;n++)n>0&&(r+=`
|
|
317
317
|
else `),n<t-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
|
|
@@ -350,7 +350,7 @@ void main(void){
|
|
|
350
350
|
vTextureId = aTextureId;
|
|
351
351
|
vColor = aColor * tint;
|
|
352
352
|
}
|
|
353
|
-
`;const _r=class extends Ah{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ph,this.vertexSize=6,this.state=ra.for2d(),this.size=_r.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??G_(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??$_(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Jt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return j_}static get defaultFragmentTemplate(){return q_}setShaderGenerator({vertex:e=_r.defaultVertexSrc,fragment:t=_r.defaultFragmentTemplate}={}){this.shaderGenerator=new D_(e,t)}contextChange(){const e=this.renderer.gl;jt.PREFER_ENV===An.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),_r.defaultMaxTextures),this.maxTextures=g_(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=_r,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new kl);for(;t.length<n;)t.push(new $l);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=_r._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let l=++zt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let p=0;p<this._bufferSize;++p){const d=e[p];e[p]=null,d._batchEnabled!==l&&(f.count>=t&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,p),h=p,f=r[++u],++l),d._batchEnabled=l,d.touched=a,f.elements[f.count++]=d)}f.count>0&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++l);for(let p=0;p<i.length;p++)i[p]=null;zt._globalBatch=l}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:l}=this,u=_r._drawCallPool;let f=this._dcIndex,h=this._aIndex,p=this._iIndex,d=u[f];d.start=this._iIndex,d.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,
|
|
353
|
+
`;const _r=class extends Ah{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ph,this.vertexSize=6,this.state=ra.for2d(),this.size=_r.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??G_(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??$_(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Jt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return j_}static get defaultFragmentTemplate(){return q_}setShaderGenerator({vertex:e=_r.defaultVertexSrc,fragment:t=_r.defaultFragmentTemplate}={}){this.shaderGenerator=new D_(e,t)}contextChange(){const e=this.renderer.gl;jt.PREFER_ENV===An.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),_r.defaultMaxTextures),this.maxTextures=g_(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=_r,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new kl);for(;t.length<n;)t.push(new $l);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=_r._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let l=++zt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let p=0;p<this._bufferSize;++p){const d=e[p];e[p]=null,d._batchEnabled!==l&&(f.count>=t&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,p),h=p,f=r[++u],++l),d._batchEnabled=l,d.touched=a,f.elements[f.count++]=d)}f.count>0&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++l);for(let p=0;p<i.length;p++)i[p]=null;zt._globalBatch=l}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:l}=this,u=_r._drawCallPool;let f=this._dcIndex,h=this._aIndex,p=this._iIndex,d=u[f];d.start=this._iIndex,d.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,_=f_[y.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&d.blend!==_&&(d.size=p-d.start,t=c,d=u[++f],d.texArray=e,d.start=p),this.packInterleavedGeometry(v,i,a,h,p),h+=v.vertexData.length/2*l,p+=v.indices.length,d.blend=_}t<r&&(d.size=p-d.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=p}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;_r.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=_r._drawCallPool;let i=null;for(let a=0;a<e;a++){const{texArray:l,type:u,size:f,start:h,blend:p}=n[a];i!==l&&(i=l,this.bindAndClearTexArray(l)),this.state.blendMode=p,r.set(this.state),t.drawElements(u,f,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),_r.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=Qs(Math.ceil(e/8)),r=lh(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new d_(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=Qs(Math.ceil(e/12)),r=lh(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(e,t,r,n,i){const{uint32View:a,float32View:l}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,p=e.vertexData,d=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Ge.shared.setValue(e._tintRGB).toPremultiplied(c);for(let y=0;y<p.length;y+=2)l[n++]=p[y],l[n++]=p[y+1],l[n++]=f[y],l[n++]=f[y+1],a[n++]=v,l[n++]=d;for(let y=0;y<h.length;y++)r[i++]=u+h[y]}};let br=_r;br.defaultBatchSize=4096,br.extension={name:"batch",type:Gt.RendererPlugin},br._drawCallPool=[],br._textureArrayPool=[],Qt.add(br);var H_=`varying vec2 vTextureCoord;
|
|
354
354
|
|
|
355
355
|
uniform sampler2D uSampler;
|
|
356
356
|
|
|
@@ -383,7 +383,7 @@ void main(void)
|
|
|
383
383
|
gl_Position = filterVertexPosition();
|
|
384
384
|
vTextureCoord = filterTextureCoord();
|
|
385
385
|
}
|
|
386
|
-
`;const os=class extends as{constructor(e,t,r){const n=Vr.from(e||os.defaultVertexSrc,t||os.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=os.defaultResolution,this.multisample=os.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new ra}apply(e,t,r,n,i){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return z_}static get defaultFragmentSrc(){return H_}};let Wr=os;Wr.defaultResolution=1,Wr.defaultMultisample=be.NONE;class fa{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ge(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=t,a=n??r;a!==void 0&&(this.color=a),this.alpha=i}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}fa.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},fa.extension={type:[Gt.RendererSystem,Gt.CanvasRendererSystem],name:"background"},Qt.add(fa);class Sh{constructor(t){this.renderer=t,this.emptyRenderer=new Ah(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,r,n,i){const{elements:a,ids:l,count:u}=t;let f=0;for(let h=0;h<u;h++){const p=a[h],d=p._batchLocation;if(d>=0&&d<i&&r[d]===p){l[h]=d;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}l[h]=f,p._batchLocation=f,r[f]=p;break}}}destroy(){this.renderer=null}}Sh.extension={type:Gt.RendererSystem,name:"batch"},Qt.add(Sh);let Oh=0;class ca{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=Oh++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=Oh++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(jt.PREFER_ENV>=An.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ca.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ca.extension={type:Gt.RendererSystem,name:"context"},Qt.add(ca);class V_ extends Ml{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===on.UNPACK);const a=r.realWidth,l=r.realHeight;return n.width===a&&n.height===l?i.texSubImage2D(r.target,0,0,0,a,l,r.format,n.type,this.data):(n.width=a,n.height=l,i.texImage2D(r.target,0,n.internalFormat,a,l,0,r.format,n.type,this.data)),!0}}class Gl{constructor(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new yr("disposeFramebuffer"),this.multisample=be.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new zt(null,{scaleMode:qr.NEAREST,resolution:1,mipmap:Sn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new zt(new V_(null,{width:this.width,height:this.height}),{scaleMode:qr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Sn.OFF,format:yt.DEPTH_COMPONENT,type:Ht.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],a=i.resolution;i.setSize(t/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Ih extends zt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],a=arguments[3];t={width:r,height:n,scaleMode:i,resolution:a}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=be.NONE),super(null,t),this.mipmap=Sn.OFF,this.valid=!0,this._clear=new Ge([0,0,0,0]),this.framebuffer=new Gl(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class hn extends ns{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=h_(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const a=t.gl,l=r.realWidth,u=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===on.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===l&&n.height===u?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=l,n.height=u,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class Rh extends hn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;hn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??jt.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const a=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?a():(i.onload=a,i.onerror=l=>{n(l),this.onError.emit(l)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===on.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const a=r._glTextures;for(const l in a){const u=a[l];if(u!==n&&u.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Ch{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,r,n){const i=r.width,a=r.height;if(n){const l=t.width/2/i,u=t.height/2/a,f=t.x/i+l,h=t.y/a+u;n=he.add(n,he.NW),this.x0=f+l*he.uX(n),this.y0=h+u*he.uY(n),n=he.add(n,2),this.x1=f+l*he.uX(n),this.y1=h+u*he.uY(n),n=he.add(n,2),this.x2=f+l*he.uX(n),this.y2=h+u*he.uY(n),n=he.add(n,2),this.x3=f+l*he.uX(n),this.y3=h+u*he.uY(n)}else this.x0=t.x/i,this.y0=t.y/a,this.x1=(t.x+t.width)/i,this.y1=t.y/a,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/a,this.x3=t.x/i,this.y3=(t.y+t.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const Nh=new Ch;function ha(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Vt extends Bs{constructor(t,r,n,i,a,l,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ee(0,0,1,1)),t instanceof Vt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=Nh,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=l?new Oe(l.x,l.y):new Oe(0,0),this.defaultBorders=u,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&Lr[r.url]&&Vt.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Vt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Vt(this.baseTexture,!this.noFrame&&t,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===Nh&&(this._uvs=new Ch),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=jt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let a=null;if(i)a=t;else if(t instanceof zt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${rs()}`,zt.addToCache(t,t.cacheId)}a=t.cacheId}else{if(!t._pixiId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${rs()}`}a=t._pixiId}let l=Lr[a];if(i&&n&&!l)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!l&&!(t instanceof zt)?(r.resolution||(r.resolution=fh(t)),l=new Vt(new zt(t,r)),l.baseTexture.cacheId=a,zt.addToCache(l.baseTexture,a),Vt.addToCache(l,a)):!l&&t instanceof zt&&(l=new Vt(t),Vt.addToCache(l,a)),l}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Vt.from(t,Object.assign({resourceOptions:n},r),!1),a=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):a.load().then(()=>Promise.resolve(i))}static fromBuffer(t,r,n,i){return new Vt(zt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const a=new zt(t,Object.assign({scaleMode:zt.defaultOptions.scaleMode,resolution:fh(r)},i)),{resource:l}=a;l instanceof Rh&&(l.url=r);const u=new Vt(a);return n||(n=r),zt.addToCache(u.baseTexture,n),Vt.addToCache(u,n),n!==r&&(zt.addToCache(u.baseTexture,r),Vt.addToCache(u,r)),u.baseTexture.valid?Promise.resolve(u):new Promise(f=>{u.baseTexture.once("loaded",()=>f(u))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),Lr[r]&&Lr[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Lr[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=Lr[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete Lr[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)Lr[t.textureCacheIds[r]]===t&&delete Lr[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:i,height:a}=t,l=r+i>this.baseTexture.width,u=n+a>this.baseTexture.height;if(l||u){const f=l&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,p=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${p}`)}this.valid=i&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Vt._EMPTY||(Vt._EMPTY=new Vt(new zt),ha(Vt._EMPTY),ha(Vt._EMPTY.baseTexture)),Vt._EMPTY}static get WHITE(){if(!Vt._WHITE){const t=jt.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Vt._WHITE=new Vt(zt.from(t)),ha(Vt._WHITE),ha(Vt._WHITE.baseTexture)}return Vt._WHITE}}class da extends Vt{constructor(t,r){super(t,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const i=this.baseTexture.resolution,a=Math.round(t*i)/i,l=Math.round(r*i)/i;this.valid=a>0&&l>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=l,n&&this.baseTexture.resize(a,l),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new da(new Ih(t))}}class Ph{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=be.NONE){const i=new Ih(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new da(i)}getOptimalTexture(t,r,n=1,i=be.NONE){let a;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=Qs(t),r=Qs(r),a=((t&65535)<<16|r&65535)>>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);let l=this.texturePool[a].pop();return l||(l=this.createTexture(t,r,i)),l.filterPoolKey=a,l.setResolution(n),l}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||be.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}Ph.SCREEN_KEY=-1;class W_ extends ci{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class X_ extends ci{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Ke(this.vertices),this.uvBuffer=new Ke(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/t.width,this.uvs[3]=i,this.uvs[4]=n+r.width/t.width,this.uvs[5]=i+r.height/t.height,this.uvs[6]=n,this.uvs[7]=i+r.height/t.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class K_{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=be.NONE,this.sourceFrame=new ee,this.destinationFrame=new ee,this.bindingSourceFrame=new ee,this.bindingDestinationFrame=new ee,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const pa=[new Oe,new Oe,new Oe,new Oe],ql=new Fe;class Mh{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new Ph,this.statePool=[],this.quad=new W_,this.quadUv=new X_,this.tempRect=new ee,this.activeState={},this.globalUniforms=new mr({outputFrame:new ee,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,r){const n=this.renderer,i=this.defaultFilterStack,a=this.statePool.pop()||new K_,l=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,p=r[0].autoFit,d=r[0].legacy??!0;for(let y=1;y<r.length;y++){const m=r[y];u=Math.min(u,m.resolution),f=Math.min(f,m.multisample),h=this.useMaxPadding?Math.max(h,m.padding):h+m.padding,p=p&&m.autoFit,d=d||(m.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=l.current),i.push(a),a.resolution=u,a.multisample=f,a.legacy=d,a.target=t,a.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),a.sourceFrame.pad(h);const c=this.tempRect.copyFrom(l.sourceFrame);n.projection.transform&&this.transformAABB(ql.copyFrom(n.projection.transform).invert(),c),p?(a.sourceFrame.fit(c),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(c)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,l.current?l.current.resolution:n.resolution,l.sourceFrame,l.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,u,f),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const v=this.tempRect;v.x=0,v.y=0,v.width=a.sourceFrame.width,v.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(l.sourceFrame),a.bindingDestinationFrame.copyFrom(l.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,l.bind(a.renderTexture,a.sourceFrame,v),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const a=i.inputSize,l=i.inputPixel,u=i.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],l[0]=Math.round(a[0]*r.resolution),l[1]=Math.round(a[1]*r.resolution),l[2]=1/l[0],l[3]=1/l[1],u[0]=.5*l[2],u[1]=.5*l[3],u[2]=r.sourceFrame.width*a[2]-.5*l[2],u[3]=r.sourceFrame.height*a[3]-.5*l[3],r.legacy){const h=i.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const f=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,f.renderTexture,On.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,p=this.getOptimalFilterTexture(h.width,h.height,r.resolution);p.filterFrame=h.filterFrame;let d=0;for(d=0;d<n.length-1;++d){d===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(h.width,h.height,r.resolution),p.filterFrame=h.filterFrame),n[d].apply(this,h,p,On.CLEAR,r);const c=h;h=p,p=c}n[d].apply(this,h,f.renderTexture,On.BLEND,r),d>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=On.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const l=this.tempRect;l.x=0,l.y=0,l.width=t.filterFrame.width,l.height=t.filterFrame.height,n.bind(t,t.filterFrame,l)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=i.stateId&1||this.forceClear;(r===On.CLEAR||r===On.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,i){const a=this.renderer;a.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(an.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(an.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:a}=r._texture,l=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo(Fe.TEMP_MATRIX);return u.invert(),l.prepend(u),l.scale(1/a.width,1/a.height),l.translate(r.anchor.x,r.anchor.y),l}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=be.NONE){return this.texturePool.getOptimalTexture(t,r,n,i)}getFilterTexture(t,r,n){if(typeof t=="number"){const a=t;t=r,r=a}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||be.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=pa[0],i=pa[1],a=pa[2],l=pa[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),l.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(a,a),t.apply(l,l);const u=Math.min(n.x,i.x,a.x,l.x),f=Math.min(n.y,i.y,a.y,l.y),h=Math.max(n.x,i.x,a.x,l.x),p=Math.max(n.y,i.y,a.y,l.y);r.x=u,r.y=f,r.width=h-u,r.height=p-f}roundFrame(t,r,n,i,a){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(a){const{a:l,b:u,c:f,d:h}=a;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(l)>1e-4||Math.abs(h)>1e-4))return}a=a?ql.copyFrom(a):ql.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,t),t.ceil(r),this.transformAABB(a.invert(),t)}}}Mh.extension={type:Gt.RendererSystem,name:"filter"},Qt.add(Mh);class Y_{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=be.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Z_=new ee;class kh{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new Gl(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ee,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;jt.PREFER_ENV===An.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:i}=this;if(t){const a=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,a.mipLevel=n),a.dirtyId!==t.dirtyId&&(a.dirtyId=t.dirtyId,a.dirtyFormat!==t.dirtyFormat?(a.dirtyFormat=t.dirtyFormat,a.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):a.dirtySize!==t.dirtySize&&(a.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let l=0;l<t.colorTextures.length;l++){const u=t.colorTextures[l];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const l=r.width>>n,u=r.height>>n,f=l/r.width;this.setViewport(r.x*f,r.y*f,l,u)}else{const l=t.width>>n,u=t.height>>n;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,i){const a=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==t||a.y!==r)&&(a.x=t,a.y=r,a.width=n,a.height=i,this.gl.viewport(t,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,r,n,i,a=Bo.COLOR|Bo.DEPTH){const{gl:l}=this;l.clearColor(t,r,n,i),l.clear(a)}initFramebuffer(t){const{gl:r}=this,n=new Y_(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let a=i.length;r.drawBuffers||(a=Math.min(a,1));for(let l=0;l<a;l++){const u=i[l],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),l===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,i=t.glFramebuffers[this.CONTEXT_UID],a=t.colorTextures;let l=a.length;n.drawBuffers||(l=Math.min(l,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const u=[];for(let f=0;f<l;f++){const h=a[f],p=h.parentTextureArray||h;this.renderer.texture.bind(p,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,p._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+f,h.target,p._glTextures[this.CONTEXT_UID].texture,r),u.push(n.COLOR_ATTACHMENT0+f))}if(u.length>1&&n.drawBuffers(u),t.depthTexture&&this.writeDepthTexture){const h=t.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=be.NONE;if(t<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=t){n=r[i];break}return n===1&&(n=be.NONE),n}blit(t,r,n){const{current:i,renderer:a,gl:l,CONTEXT_UID:u}=this;if(a.context.webGLVersion!==2||!i)return;const f=i.glFramebuffers[u];if(!f)return;if(!t){if(!f.msaaBuffer)return;const p=i.colorTextures[0];if(!p)return;f.blitFramebuffer||(f.blitFramebuffer=new Gl(i.width,i.height),f.blitFramebuffer.addColorTexture(0,p)),t=f.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,t.dirtyId++,t.dirtyFormat++),(t.width!==i.width||t.height!==i.height)&&(t.width=i.width,t.height=i.height,t.dirtyId++,t.dirtySize++)}r||(r=Z_,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),l.bindFramebuffer(l.READ_FRAMEBUFFER,f.framebuffer),l.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,l.COLOR_BUFFER_BIT,h?l.NEAREST:l.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(t);a>=0&&this.managedFramebuffers.splice(a,1),t.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,i=t.height,a=this.gl,l=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,l),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,i):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,i),r.stencil=l,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,l)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ee}destroy(){this.renderer=null}}kh.extension={type:Gt.RendererSystem,name:"framebuffer"},Qt.add(kh);const jl={5126:4,5123:2,5121:1};class Lh{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;jt.PREFER_ENV===An.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=i=>n.bindVertexArrayOES(i),t.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(i,a)=>n.vertexAttribDivisorANGLE(i,a),t.drawElementsInstanced=(i,a,l,u,f)=>n.drawElementsInstancedANGLE(i,a,l,u,f),t.drawArraysInstanced=(i,a,l,u)=>n.drawArraysInstancedANGLE(i,a,l,u)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],a=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},a=!0);const l=i[r.program.id]||this.initGeometryVao(t,r,a);this._activeGeometry=t,this._activeVao!==l&&(this._activeVao=l,this.hasVao?n.bindVertexArray(l):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const i=t.buffers[n];r.update(i)}}checkCompatibility(t,r){const n=t.attributes,i=r.attributeData;for(const a in i)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(t,r){const n=t.attributes,i=r.attributeData,a=["g",t.id];for(const l in n)i[l]&&a.push(l,i[l].location);return a.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,a=this.CONTEXT_UID,l=this.renderer.buffer,u=r.program;u.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,u);const f=this.getSignature(t,u),h=t.glVertexArrayObjects[this.CONTEXT_UID];let p=h[f];if(p)return h[u.id]=p,p;const d=t.buffers,c=t.attributes,v={},y={};for(const m in d)v[m]=0,y[m]=0;for(const m in c)!c[m].size&&u.attributeData[m]?c[m].size=u.attributeData[m].size:c[m].size||console.warn(`PIXI Geometry attribute '${m}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[m].buffer]+=c[m].size*jl[c[m].type];for(const m in c){const _=c[m],b=_.size;_.stride===void 0&&(v[_.buffer]===b*jl[_.type]?_.stride=0:_.stride=v[_.buffer]),_.start===void 0&&(_.start=y[_.buffer],y[_.buffer]+=b*jl[_.type])}p=i.createVertexArray(),i.bindVertexArray(p);for(let m=0;m<d.length;m++){const _=d[m];l.bind(_),n&&_._glBuffers[a].refCount++}return this.activateVao(t,u),h[u.id]=p,h[f]=p,i.bindVertexArray(null),l.unbind(Nr.ARRAY_BUFFER),p}disposeGeometry(t,r){var u;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,a=t.buffers,l=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(l)for(let f=0;f<a.length;f++){const h=a[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&l.dispose(a[f],r))}if(!r){for(const f in n)if(f[0]==="g"){const h=n[f];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,i=this.CONTEXT_UID,a=this.renderer.buffer,l=t.buffers,u=t.attributes;t.indexBuffer&&a.bind(t.indexBuffer);let f=null;for(const h in u){const p=u[h],d=l[p.buffer],c=d._glBuffers[i];if(r.attributeData[h]){f!==c&&(a.bind(d),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(v,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:a}=this,l=this._activeGeometry;if(l.indexBuffer){const u=l.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?l.instanced?a.drawElementsInstanced(t,r||l.indexBuffer.data.length,f,(n||0)*u,i||1):a.drawElements(t,r||l.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else l.instanced?a.drawArraysInstanced(t,n,r||l.getSize(),i||1):a.drawArrays(t,n,r||l.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}Lh.extension={type:Gt.RendererSystem,name:"geometry"},Qt.add(Lh);const Fh=new Fe;class J_{constructor(t,r){this._texture=t,this.mapCoord=new Fe,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let i=0;i<t.length;i+=2){const a=t[i],l=t[i+1];r[i]=a*n.a+l*n.c+n.tx,r[i+1]=a*n.b+l*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,a=r.trim;a&&(Fh.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(Fh));const l=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/l.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/l.width,u[1]=(r._frame.y+f+h)/l.height,u[2]=(r._frame.x+r._frame.width-f+h)/l.width,u[3]=(r._frame.y+r._frame.height-f+h)/l.height,this.uClampOffset[0]=h/l.realWidth,this.uClampOffset[1]=h/l.realHeight,this.isSimple=r._frame.width===l.width&&r._frame.height===l.height&&r.rotate===0,!0}}var Q_=`varying vec2 vMaskCoord;
|
|
386
|
+
`;const os=class extends as{constructor(e,t,r){const n=Vr.from(e||os.defaultVertexSrc,t||os.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=os.defaultResolution,this.multisample=os.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new ra}apply(e,t,r,n,i){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return z_}static get defaultFragmentSrc(){return H_}};let Wr=os;Wr.defaultResolution=1,Wr.defaultMultisample=be.NONE;class fa{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ge(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=t,a=n??r;a!==void 0&&(this.color=a),this.alpha=i}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}fa.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},fa.extension={type:[Gt.RendererSystem,Gt.CanvasRendererSystem],name:"background"},Qt.add(fa);class Sh{constructor(t){this.renderer=t,this.emptyRenderer=new Ah(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,r,n,i){const{elements:a,ids:l,count:u}=t;let f=0;for(let h=0;h<u;h++){const p=a[h],d=p._batchLocation;if(d>=0&&d<i&&r[d]===p){l[h]=d;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}l[h]=f,p._batchLocation=f,r[f]=p;break}}}destroy(){this.renderer=null}}Sh.extension={type:Gt.RendererSystem,name:"batch"},Qt.add(Sh);let Oh=0;class ca{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=Oh++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=Oh++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(jt.PREFER_ENV>=An.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ca.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ca.extension={type:Gt.RendererSystem,name:"context"},Qt.add(ca);class V_ extends Ml{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===on.UNPACK);const a=r.realWidth,l=r.realHeight;return n.width===a&&n.height===l?i.texSubImage2D(r.target,0,0,0,a,l,r.format,n.type,this.data):(n.width=a,n.height=l,i.texImage2D(r.target,0,n.internalFormat,a,l,0,r.format,n.type,this.data)),!0}}class Gl{constructor(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new yr("disposeFramebuffer"),this.multisample=be.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new zt(null,{scaleMode:qr.NEAREST,resolution:1,mipmap:Sn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new zt(new V_(null,{width:this.width,height:this.height}),{scaleMode:qr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Sn.OFF,format:yt.DEPTH_COMPONENT,type:Ht.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],a=i.resolution;i.setSize(t/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Ih extends zt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],a=arguments[3];t={width:r,height:n,scaleMode:i,resolution:a}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=be.NONE),super(null,t),this.mipmap=Sn.OFF,this.valid=!0,this._clear=new Ge([0,0,0,0]),this.framebuffer=new Gl(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class hn extends ns{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=h_(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const a=t.gl,l=r.realWidth,u=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===on.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===l&&n.height===u?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=l,n.height=u,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class Rh extends hn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;hn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??jt.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const a=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?a():(i.onload=a,i.onerror=l=>{n(l),this.onError.emit(l)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===on.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const a=r._glTextures;for(const l in a){const u=a[l];if(u!==n&&u.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Ch{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,r,n){const i=r.width,a=r.height;if(n){const l=t.width/2/i,u=t.height/2/a,f=t.x/i+l,h=t.y/a+u;n=ce.add(n,ce.NW),this.x0=f+l*ce.uX(n),this.y0=h+u*ce.uY(n),n=ce.add(n,2),this.x1=f+l*ce.uX(n),this.y1=h+u*ce.uY(n),n=ce.add(n,2),this.x2=f+l*ce.uX(n),this.y2=h+u*ce.uY(n),n=ce.add(n,2),this.x3=f+l*ce.uX(n),this.y3=h+u*ce.uY(n)}else this.x0=t.x/i,this.y0=t.y/a,this.x1=(t.x+t.width)/i,this.y1=t.y/a,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/a,this.x3=t.x/i,this.y3=(t.y+t.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const Nh=new Ch;function ha(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Vt extends Bs{constructor(t,r,n,i,a,l,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ee(0,0,1,1)),t instanceof Vt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=Nh,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=l?new Oe(l.x,l.y):new Oe(0,0),this.defaultBorders=u,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&Fr[r.url]&&Vt.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Vt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Vt(this.baseTexture,!this.noFrame&&t,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===Nh&&(this._uvs=new Ch),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=jt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let a=null;if(i)a=t;else if(t instanceof zt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${rs()}`,zt.addToCache(t,t.cacheId)}a=t.cacheId}else{if(!t._pixiId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${rs()}`}a=t._pixiId}let l=Fr[a];if(i&&n&&!l)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!l&&!(t instanceof zt)?(r.resolution||(r.resolution=fh(t)),l=new Vt(new zt(t,r)),l.baseTexture.cacheId=a,zt.addToCache(l.baseTexture,a),Vt.addToCache(l,a)):!l&&t instanceof zt&&(l=new Vt(t),Vt.addToCache(l,a)),l}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Vt.from(t,Object.assign({resourceOptions:n},r),!1),a=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):a.load().then(()=>Promise.resolve(i))}static fromBuffer(t,r,n,i){return new Vt(zt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const a=new zt(t,Object.assign({scaleMode:zt.defaultOptions.scaleMode,resolution:fh(r)},i)),{resource:l}=a;l instanceof Rh&&(l.url=r);const u=new Vt(a);return n||(n=r),zt.addToCache(u.baseTexture,n),Vt.addToCache(u,n),n!==r&&(zt.addToCache(u.baseTexture,r),Vt.addToCache(u,r)),u.baseTexture.valid?Promise.resolve(u):new Promise(f=>{u.baseTexture.once("loaded",()=>f(u))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),Fr[r]&&Fr[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Fr[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=Fr[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete Fr[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)Fr[t.textureCacheIds[r]]===t&&delete Fr[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:i,height:a}=t,l=r+i>this.baseTexture.width,u=n+a>this.baseTexture.height;if(l||u){const f=l&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,p=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${p}`)}this.valid=i&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Vt._EMPTY||(Vt._EMPTY=new Vt(new zt),ha(Vt._EMPTY),ha(Vt._EMPTY.baseTexture)),Vt._EMPTY}static get WHITE(){if(!Vt._WHITE){const t=jt.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Vt._WHITE=new Vt(zt.from(t)),ha(Vt._WHITE),ha(Vt._WHITE.baseTexture)}return Vt._WHITE}}class da extends Vt{constructor(t,r){super(t,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const i=this.baseTexture.resolution,a=Math.round(t*i)/i,l=Math.round(r*i)/i;this.valid=a>0&&l>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=l,n&&this.baseTexture.resize(a,l),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new da(new Ih(t))}}class Ph{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=be.NONE){const i=new Ih(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new da(i)}getOptimalTexture(t,r,n=1,i=be.NONE){let a;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=Qs(t),r=Qs(r),a=((t&65535)<<16|r&65535)>>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);let l=this.texturePool[a].pop();return l||(l=this.createTexture(t,r,i)),l.filterPoolKey=a,l.setResolution(n),l}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||be.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}Ph.SCREEN_KEY=-1;class W_ extends ci{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class X_ extends ci{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Ye(this.vertices),this.uvBuffer=new Ye(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/t.width,this.uvs[3]=i,this.uvs[4]=n+r.width/t.width,this.uvs[5]=i+r.height/t.height,this.uvs[6]=n,this.uvs[7]=i+r.height/t.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class K_{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=be.NONE,this.sourceFrame=new ee,this.destinationFrame=new ee,this.bindingSourceFrame=new ee,this.bindingDestinationFrame=new ee,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const pa=[new Oe,new Oe,new Oe,new Oe],ql=new Fe;class Mh{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new Ph,this.statePool=[],this.quad=new W_,this.quadUv=new X_,this.tempRect=new ee,this.activeState={},this.globalUniforms=new mr({outputFrame:new ee,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,r){const n=this.renderer,i=this.defaultFilterStack,a=this.statePool.pop()||new K_,l=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,p=r[0].autoFit,d=r[0].legacy??!0;for(let y=1;y<r.length;y++){const _=r[y];u=Math.min(u,_.resolution),f=Math.min(f,_.multisample),h=this.useMaxPadding?Math.max(h,_.padding):h+_.padding,p=p&&_.autoFit,d=d||(_.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=l.current),i.push(a),a.resolution=u,a.multisample=f,a.legacy=d,a.target=t,a.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),a.sourceFrame.pad(h);const c=this.tempRect.copyFrom(l.sourceFrame);n.projection.transform&&this.transformAABB(ql.copyFrom(n.projection.transform).invert(),c),p?(a.sourceFrame.fit(c),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(c)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,l.current?l.current.resolution:n.resolution,l.sourceFrame,l.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,u,f),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const v=this.tempRect;v.x=0,v.y=0,v.width=a.sourceFrame.width,v.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(l.sourceFrame),a.bindingDestinationFrame.copyFrom(l.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,l.bind(a.renderTexture,a.sourceFrame,v),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const a=i.inputSize,l=i.inputPixel,u=i.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],l[0]=Math.round(a[0]*r.resolution),l[1]=Math.round(a[1]*r.resolution),l[2]=1/l[0],l[3]=1/l[1],u[0]=.5*l[2],u[1]=.5*l[3],u[2]=r.sourceFrame.width*a[2]-.5*l[2],u[3]=r.sourceFrame.height*a[3]-.5*l[3],r.legacy){const h=i.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const f=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,f.renderTexture,On.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,p=this.getOptimalFilterTexture(h.width,h.height,r.resolution);p.filterFrame=h.filterFrame;let d=0;for(d=0;d<n.length-1;++d){d===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(h.width,h.height,r.resolution),p.filterFrame=h.filterFrame),n[d].apply(this,h,p,On.CLEAR,r);const c=h;h=p,p=c}n[d].apply(this,h,f.renderTexture,On.BLEND,r),d>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=On.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const l=this.tempRect;l.x=0,l.y=0,l.width=t.filterFrame.width,l.height=t.filterFrame.height,n.bind(t,t.filterFrame,l)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=i.stateId&1||this.forceClear;(r===On.CLEAR||r===On.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,i){const a=this.renderer;a.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(an.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(an.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:a}=r._texture,l=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo(Fe.TEMP_MATRIX);return u.invert(),l.prepend(u),l.scale(1/a.width,1/a.height),l.translate(r.anchor.x,r.anchor.y),l}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=be.NONE){return this.texturePool.getOptimalTexture(t,r,n,i)}getFilterTexture(t,r,n){if(typeof t=="number"){const a=t;t=r,r=a}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||be.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=pa[0],i=pa[1],a=pa[2],l=pa[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),l.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(a,a),t.apply(l,l);const u=Math.min(n.x,i.x,a.x,l.x),f=Math.min(n.y,i.y,a.y,l.y),h=Math.max(n.x,i.x,a.x,l.x),p=Math.max(n.y,i.y,a.y,l.y);r.x=u,r.y=f,r.width=h-u,r.height=p-f}roundFrame(t,r,n,i,a){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(a){const{a:l,b:u,c:f,d:h}=a;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(l)>1e-4||Math.abs(h)>1e-4))return}a=a?ql.copyFrom(a):ql.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,t),t.ceil(r),this.transformAABB(a.invert(),t)}}}Mh.extension={type:Gt.RendererSystem,name:"filter"},Qt.add(Mh);class Y_{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=be.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Z_=new ee;class kh{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new Gl(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ee,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;jt.PREFER_ENV===An.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:i}=this;if(t){const a=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,a.mipLevel=n),a.dirtyId!==t.dirtyId&&(a.dirtyId=t.dirtyId,a.dirtyFormat!==t.dirtyFormat?(a.dirtyFormat=t.dirtyFormat,a.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):a.dirtySize!==t.dirtySize&&(a.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let l=0;l<t.colorTextures.length;l++){const u=t.colorTextures[l];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const l=r.width>>n,u=r.height>>n,f=l/r.width;this.setViewport(r.x*f,r.y*f,l,u)}else{const l=t.width>>n,u=t.height>>n;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,i){const a=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==t||a.y!==r)&&(a.x=t,a.y=r,a.width=n,a.height=i,this.gl.viewport(t,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,r,n,i,a=Bo.COLOR|Bo.DEPTH){const{gl:l}=this;l.clearColor(t,r,n,i),l.clear(a)}initFramebuffer(t){const{gl:r}=this,n=new Y_(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let a=i.length;r.drawBuffers||(a=Math.min(a,1));for(let l=0;l<a;l++){const u=i[l],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),l===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,i=t.glFramebuffers[this.CONTEXT_UID],a=t.colorTextures;let l=a.length;n.drawBuffers||(l=Math.min(l,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const u=[];for(let f=0;f<l;f++){const h=a[f],p=h.parentTextureArray||h;this.renderer.texture.bind(p,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,p._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+f,h.target,p._glTextures[this.CONTEXT_UID].texture,r),u.push(n.COLOR_ATTACHMENT0+f))}if(u.length>1&&n.drawBuffers(u),t.depthTexture&&this.writeDepthTexture){const h=t.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=be.NONE;if(t<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=t){n=r[i];break}return n===1&&(n=be.NONE),n}blit(t,r,n){const{current:i,renderer:a,gl:l,CONTEXT_UID:u}=this;if(a.context.webGLVersion!==2||!i)return;const f=i.glFramebuffers[u];if(!f)return;if(!t){if(!f.msaaBuffer)return;const p=i.colorTextures[0];if(!p)return;f.blitFramebuffer||(f.blitFramebuffer=new Gl(i.width,i.height),f.blitFramebuffer.addColorTexture(0,p)),t=f.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,t.dirtyId++,t.dirtyFormat++),(t.width!==i.width||t.height!==i.height)&&(t.width=i.width,t.height=i.height,t.dirtyId++,t.dirtySize++)}r||(r=Z_,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),l.bindFramebuffer(l.READ_FRAMEBUFFER,f.framebuffer),l.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,l.COLOR_BUFFER_BIT,h?l.NEAREST:l.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(t);a>=0&&this.managedFramebuffers.splice(a,1),t.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,i=t.height,a=this.gl,l=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,l),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,i):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,i),r.stencil=l,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,l)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ee}destroy(){this.renderer=null}}kh.extension={type:Gt.RendererSystem,name:"framebuffer"},Qt.add(kh);const jl={5126:4,5123:2,5121:1};class Lh{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;jt.PREFER_ENV===An.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=i=>n.bindVertexArrayOES(i),t.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(i,a)=>n.vertexAttribDivisorANGLE(i,a),t.drawElementsInstanced=(i,a,l,u,f)=>n.drawElementsInstancedANGLE(i,a,l,u,f),t.drawArraysInstanced=(i,a,l,u)=>n.drawArraysInstancedANGLE(i,a,l,u)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],a=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},a=!0);const l=i[r.program.id]||this.initGeometryVao(t,r,a);this._activeGeometry=t,this._activeVao!==l&&(this._activeVao=l,this.hasVao?n.bindVertexArray(l):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const i=t.buffers[n];r.update(i)}}checkCompatibility(t,r){const n=t.attributes,i=r.attributeData;for(const a in i)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(t,r){const n=t.attributes,i=r.attributeData,a=["g",t.id];for(const l in n)i[l]&&a.push(l,i[l].location);return a.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,a=this.CONTEXT_UID,l=this.renderer.buffer,u=r.program;u.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,u);const f=this.getSignature(t,u),h=t.glVertexArrayObjects[this.CONTEXT_UID];let p=h[f];if(p)return h[u.id]=p,p;const d=t.buffers,c=t.attributes,v={},y={};for(const _ in d)v[_]=0,y[_]=0;for(const _ in c)!c[_].size&&u.attributeData[_]?c[_].size=u.attributeData[_].size:c[_].size||console.warn(`PIXI Geometry attribute '${_}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[_].buffer]+=c[_].size*jl[c[_].type];for(const _ in c){const b=c[_],m=b.size;b.stride===void 0&&(v[b.buffer]===m*jl[b.type]?b.stride=0:b.stride=v[b.buffer]),b.start===void 0&&(b.start=y[b.buffer],y[b.buffer]+=m*jl[b.type])}p=i.createVertexArray(),i.bindVertexArray(p);for(let _=0;_<d.length;_++){const b=d[_];l.bind(b),n&&b._glBuffers[a].refCount++}return this.activateVao(t,u),h[u.id]=p,h[f]=p,i.bindVertexArray(null),l.unbind(Pr.ARRAY_BUFFER),p}disposeGeometry(t,r){var u;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,a=t.buffers,l=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(l)for(let f=0;f<a.length;f++){const h=a[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&l.dispose(a[f],r))}if(!r){for(const f in n)if(f[0]==="g"){const h=n[f];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,i=this.CONTEXT_UID,a=this.renderer.buffer,l=t.buffers,u=t.attributes;t.indexBuffer&&a.bind(t.indexBuffer);let f=null;for(const h in u){const p=u[h],d=l[p.buffer],c=d._glBuffers[i];if(r.attributeData[h]){f!==c&&(a.bind(d),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(v,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:a}=this,l=this._activeGeometry;if(l.indexBuffer){const u=l.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?l.instanced?a.drawElementsInstanced(t,r||l.indexBuffer.data.length,f,(n||0)*u,i||1):a.drawElements(t,r||l.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else l.instanced?a.drawArraysInstanced(t,n,r||l.getSize(),i||1):a.drawArrays(t,n,r||l.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}Lh.extension={type:Gt.RendererSystem,name:"geometry"},Qt.add(Lh);const Fh=new Fe;class J_{constructor(t,r){this._texture=t,this.mapCoord=new Fe,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let i=0;i<t.length;i+=2){const a=t[i],l=t[i+1];r[i]=a*n.a+l*n.c+n.tx,r[i+1]=a*n.b+l*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,a=r.trim;a&&(Fh.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(Fh));const l=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/l.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/l.width,u[1]=(r._frame.y+f+h)/l.height,u[2]=(r._frame.x+r._frame.width-f+h)/l.width,u[3]=(r._frame.y+r._frame.height-f+h)/l.height,this.uClampOffset[0]=h/l.realWidth,this.uClampOffset[1]=h/l.realHeight,this.isSimple=r._frame.width===l.width&&r._frame.height===l.height&&r.rotate===0,!0}}var Q_=`varying vec2 vMaskCoord;
|
|
387
387
|
varying vec2 vTextureCoord;
|
|
388
388
|
|
|
389
389
|
uniform sampler2D uSampler;
|
|
@@ -494,7 +494,7 @@ void main(void)
|
|
|
494
494
|
`)}}return a.push(`
|
|
495
495
|
renderer.buffer.update(buffer);
|
|
496
496
|
`),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
|
|
497
|
-
`))}}let d1=0;const ga={textureCount:0,uboCount:0};class Xh{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=d1++}systemCheck(){if(!F_())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(ga.textureCount=0,ga.uboCount=0,this.syncUniformGroup(t.uniformGroup,ga)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=N_(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,ga,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const l=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[l];if(u||(u=this._uboCache[l]=h1(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,a=[`${n}-`];for(const l in i)a.push(l),r[l]&&a.push(r[l].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=o1(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Xh.extension={type:Gt.RendererSystem,name:"shader"},Qt.add(Xh);class ya{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}ya.defaultOptions={hello:!1},ya.extension={type:[Gt.RendererSystem,Gt.CanvasRendererSystem],name:"startup"},Qt.add(ya);function p1(e,t=[]){return t[Rt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD]=[e.ONE,e.ONE],t[Rt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.NONE]=[0,0],t[Rt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Rt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Rt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Rt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Rt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Rt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Rt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const v1=0,g1=1,y1=2,m1=3,_1=4,b1=5,Hl=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Rt.NONE,this._blendEq=!1,this.map=[],this.map[v1]=this.setBlend,this.map[g1]=this.setOffset,this.map[y1]=this.setCullFace,this.map[m1]=this.setDepthTest,this.map[_1]=this.setFrontFace,this.map[b1]=this.setDepthMask,this.checks=[],this.defaultState=new ra,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=p1(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(Hl.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(Hl.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Kh=Hl;Kh.extension={type:Gt.RendererSystem,name:"state"},Qt.add(Kh);class x1 extends Bs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new yr(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const a=n.find(l=>this._systemsHash[l]===i);i[t.name](r[a])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const ma=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=ma.defaultMaxIdle,this.checkCountMax=ma.defaultCheckCountMax,this.mode=ma.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==Do.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let xr=ma;xr.defaultMode=Do.AUTO,xr.defaultMaxIdle=60*60,xr.defaultCheckCountMax=60*10,xr.extension={type:Gt.RendererSystem,name:"textureGC"},Qt.add(xr);class zl{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ht.UNSIGNED_BYTE,this.internalFormat=yt.RGBA,this.samplerType=0}}function E1(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Ht.UNSIGNED_BYTE]:{[yt.RGBA]:e.RGBA8,[yt.RGB]:e.RGB8,[yt.RG]:e.RG8,[yt.RED]:e.R8,[yt.RGBA_INTEGER]:e.RGBA8UI,[yt.RGB_INTEGER]:e.RGB8UI,[yt.RG_INTEGER]:e.RG8UI,[yt.RED_INTEGER]:e.R8UI,[yt.ALPHA]:e.ALPHA,[yt.LUMINANCE]:e.LUMINANCE,[yt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Ht.BYTE]:{[yt.RGBA]:e.RGBA8_SNORM,[yt.RGB]:e.RGB8_SNORM,[yt.RG]:e.RG8_SNORM,[yt.RED]:e.R8_SNORM,[yt.RGBA_INTEGER]:e.RGBA8I,[yt.RGB_INTEGER]:e.RGB8I,[yt.RG_INTEGER]:e.RG8I,[yt.RED_INTEGER]:e.R8I},[Ht.UNSIGNED_SHORT]:{[yt.RGBA_INTEGER]:e.RGBA16UI,[yt.RGB_INTEGER]:e.RGB16UI,[yt.RG_INTEGER]:e.RG16UI,[yt.RED_INTEGER]:e.R16UI,[yt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Ht.SHORT]:{[yt.RGBA_INTEGER]:e.RGBA16I,[yt.RGB_INTEGER]:e.RGB16I,[yt.RG_INTEGER]:e.RG16I,[yt.RED_INTEGER]:e.R16I},[Ht.UNSIGNED_INT]:{[yt.RGBA_INTEGER]:e.RGBA32UI,[yt.RGB_INTEGER]:e.RGB32UI,[yt.RG_INTEGER]:e.RG32UI,[yt.RED_INTEGER]:e.R32UI,[yt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Ht.INT]:{[yt.RGBA_INTEGER]:e.RGBA32I,[yt.RGB_INTEGER]:e.RGB32I,[yt.RG_INTEGER]:e.RG32I,[yt.RED_INTEGER]:e.R32I},[Ht.FLOAT]:{[yt.RGBA]:e.RGBA32F,[yt.RGB]:e.RGB32F,[yt.RG]:e.RG32F,[yt.RED]:e.R32F,[yt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Ht.HALF_FLOAT]:{[yt.RGBA]:e.RGBA16F,[yt.RGB]:e.RGB16F,[yt.RG]:e.RG16F,[yt.RED]:e.R16F},[Ht.UNSIGNED_SHORT_5_6_5]:{[yt.RGB]:e.RGB565},[Ht.UNSIGNED_SHORT_4_4_4_4]:{[yt.RGBA]:e.RGBA4},[Ht.UNSIGNED_SHORT_5_5_5_1]:{[yt.RGBA]:e.RGB5_A1},[Ht.UNSIGNED_INT_2_10_10_10_REV]:{[yt.RGBA]:e.RGB10_A2,[yt.RGBA_INTEGER]:e.RGB10_A2UI},[Ht.UNSIGNED_INT_10F_11F_11F_REV]:{[yt.RGB]:e.R11F_G11F_B10F},[Ht.UNSIGNED_INT_5_9_9_9_REV]:{[yt.RGB]:e.RGB9_E5},[Ht.UNSIGNED_INT_24_8]:{[yt.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Ht.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[yt.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Ht.UNSIGNED_BYTE]:{[yt.RGBA]:e.RGBA,[yt.RGB]:e.RGB,[yt.ALPHA]:e.ALPHA,[yt.LUMINANCE]:e.LUMINANCE,[yt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Ht.UNSIGNED_SHORT_5_6_5]:{[yt.RGB]:e.RGB},[Ht.UNSIGNED_SHORT_4_4_4_4]:{[yt.RGBA]:e.RGBA},[Ht.UNSIGNED_SHORT_5_5_5_1]:{[yt.RGBA]:e.RGBA}},t}class Yh{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new zt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=E1(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new zl(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new zl(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let a=t-1;a>=0;--a){const l=r[a];l&&l._glTextures[i].samplerType!==Uo.FLOAT&&this.renderer.texture.unbind(l)}}initTexture(t){const r=new zl(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Ht.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==Uo.FLOAT&&(this.hasIntegerTextures=!0);else{const a=t.realWidth,l=t.realHeight,u=n.gl;(r.width!==a||r.height!==l||r.dirtyId<0)&&(r.width=a,r.height=l,u.texImage2D(t.target,0,r.internalFormat,a,l,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&ta(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Sn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Vi.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Sn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===qr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===qr.LINEAR){const a=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===qr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===qr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Yh.extension={type:Gt.RendererSystem,name:"texture"},Qt.add(Yh);class Zh{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,a=r.createTransformFeedback();t._glTransformFeedbacks[i]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let l=0;l<t.buffers.length;l++){const u=t.buffers[l];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,l,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),a}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let l=0;l<t.buffers.length;l++){const u=t.buffers[l];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&a.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Zh.extension={type:Gt.RendererSystem,name:"transformFeedback"},Qt.add(Zh);class _a{constructor(t){this.renderer=t}init(t){this.screen=new ee(0,0,t.width,t.height),this.element=t.view||jt.ADAPTER.createCanvas(),this.resolution=t.resolution||jt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}_a.defaultOptions={width:800,height:600,resolution:jt.RESOLUTION,autoDensity:!1},_a.extension={type:[Gt.RendererSystem,Gt.CanvasRendererSystem],name:"_view"},Qt.add(_a),jt.PREFER_ENV=An.WEBGL2,jt.STRICT_TEXTURE_CACHE=!1,jt.RENDER_OPTIONS={...ca.defaultOptions,...fa.defaultOptions,..._a.defaultOptions,...ya.defaultOptions},Object.defineProperties(jt,{WRAP_MODE:{get(){return zt.defaultOptions.wrapMode},set(e){Jt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),zt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return zt.defaultOptions.scaleMode},set(e){Jt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),zt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return zt.defaultOptions.mipmap},set(e){Jt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),zt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return zt.defaultOptions.anisotropicLevel},set(e){Jt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),zt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Jt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Wr.defaultResolution},set(e){Wr.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Jt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Wr.defaultMultisample},set(e){Wr.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return br.defaultMaxTextures},set(e){Jt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),br.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return br.defaultBatchSize},set(e){Jt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),br.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return br.canUploadSameBuffer},set(e){Jt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),br.canUploadSameBuffer=e}},GC_MODE:{get(){return xr.defaultMode},set(e){Jt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),xr.defaultMode=e}},GC_MAX_IDLE:{get(){return xr.defaultMaxIdle},set(e){Jt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),xr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return xr.defaultCheckCountMax},set(e){Jt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),xr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Vr.defaultVertexPrecision},set(e){Jt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Vr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Vr.defaultFragmentPrecision},set(e){Jt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Vr.defaultFragmentPrecision=e}}});var ba=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(ba||{});class Vl{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Ye=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Vl(null,null,1/0),this.deltaMS=1/Ye.targetFPMS,this.elapsedMS=1/Ye.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=ba.NORMAL){return this._addListener(new Vl(e,t,r))}addOnce(e,t,r=ba.NORMAL){return this._addListener(new Vl(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Ye.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Ye.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Ye._shared){const e=Ye._shared=new Ye;e.autoStart=!0,e._protected=!0}return Ye._shared}static get system(){if(!Ye._system){const e=Ye._system=new Ye;e.autoStart=!0,e._protected=!0}return Ye._system}};let Er=Ye;Er.targetFPMS=.06,Object.defineProperties(jt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){Jt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Jh{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,ba.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Jh.extension=Gt.Application,Qt.add(Jh);const w1=[];Qt.handleByList(Gt.Renderer,w1);class Qh{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=be.HIGH?this.multisample=be.HIGH:r>=be.MEDIUM?this.multisample=be.MEDIUM:r>=be.LOW?this.multisample=be.LOW:this.multisample=be.NONE}destroy(){}}Qh.extension={type:Gt.RendererSystem,name:"_multisample"},Qt.add(Qh);class T1{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class td{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const a=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:a}=this;n=n||0;const l=t._glBuffers[a]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,l.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const a=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,a)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new T1(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}td.extension={type:Gt.RendererSystem,name:"buffer"},Qt.add(td);class ed{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,a,l,u;if(r&&(i=r.renderTexture,a=r.clear,l=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=l,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}ed.extension={type:Gt.RendererSystem,name:"objectRenderer"},Qt.add(ed);const Wl=class extends x1{constructor(e){super(),this.type=Kf.WEBGL,e=Object.assign({},jt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new mr({projectionMatrix:new Fe},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Wl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Jt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Wl.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:Q0()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Jt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Jt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Jt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Jt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Jt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Jt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Jt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Jt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let gi=Wl;gi.extension={type:Gt.Renderer,priority:1},gi.__plugins={},gi.__systems={},Qt.handleByMap(Gt.RendererPlugin,gi.__plugins),Qt.handleByMap(Gt.RendererSystem,gi.__systems),Qt.add(gi);class rd extends ns{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let a=0;a<t;a++){const l=new zt;this.items.push(l),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof ns?this.addResourceAt(t[n],n):this.addResourceAt(hh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class A1 extends rd{constructor(t,r){const{width:n,height:i}=r||{};let a,l;Array.isArray(t)?(a=t,l=t.length):l=t,super(l,{width:n,height:i}),a&&this.initFromArray(a,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=Zn.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:a,items:l}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=l[f];a[f]<h.dirtyId&&(a[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class S1 extends hn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const us=class extends rd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:a}=t||{};if(e&&e.length!==us.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let l=0;l<us.SIDES;l++)this.items[l].target=Zn.TEXTURE_CUBE_MAP_POSITIVE_X+l;this.linkBaseTexture=a!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=Zn.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Zn.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<us.SIDES;i++){const a=this.items[i];(n[i]<a.dirtyId||r.dirtyId<t.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(e,a,r),n[i]=a.dirtyId):n[i]<-1&&(e.gl.texImage2D(a.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===us.SIDES}};let nd=us;nd.SIDES=6;class yi extends hn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=yi.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await jt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===on.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return yi._EMPTY=yi._EMPTY??jt.ADAPTER.createCanvas(0,0),yi._EMPTY}}const xa=class extends hn{constructor(e,t){t=t||{},super(jt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},xa.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;hn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const a=this.source;a.width=n,a.height=i,a._pixiId=`canvas_${rs()}`,a.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=xa.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&xa.SVG_XML.test(e)}};let Xl=xa;Xl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,Xl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const Kl=class extends hn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];hn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const a=document.createElement("source");let{src:l,mime:u}=e[i];l=l||e[i];const f=l.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||Kl.MIME_TYPES[h]||`video/${h}`,a.src=l,a.type=u,r.appendChild(a)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||Kl.TYPES.includes(t)}};let Yl=Kl;Yl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Yl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Pl.push(yi,Rh,S1,Yl,Xl,Ml,nd,A1);var O1=`attribute vec2 aVertexPosition;
|
|
497
|
+
`))}}let d1=0;const ga={textureCount:0,uboCount:0};class Xh{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=d1++}systemCheck(){if(!F_())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(ga.textureCount=0,ga.uboCount=0,this.syncUniformGroup(t.uniformGroup,ga)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=N_(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,ga,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const l=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[l];if(u||(u=this._uboCache[l]=h1(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,a=[`${n}-`];for(const l in i)a.push(l),r[l]&&a.push(r[l].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=o1(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Xh.extension={type:Gt.RendererSystem,name:"shader"},Qt.add(Xh);class ya{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}ya.defaultOptions={hello:!1},ya.extension={type:[Gt.RendererSystem,Gt.CanvasRendererSystem],name:"startup"},Qt.add(ya);function p1(e,t=[]){return t[It.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.ADD]=[e.ONE,e.ONE],t[It.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.NONE]=[0,0],t[It.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[It.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[It.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[It.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[It.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[It.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[It.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[It.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[It.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[It.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[It.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const v1=0,g1=1,y1=2,m1=3,_1=4,b1=5,Hl=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=It.NONE,this._blendEq=!1,this.map=[],this.map[v1]=this.setBlend,this.map[g1]=this.setOffset,this.map[y1]=this.setCullFace,this.map[m1]=this.setDepthTest,this.map[_1]=this.setFrontFace,this.map[b1]=this.setDepthMask,this.checks=[],this.defaultState=new ra,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=p1(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(Hl.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(Hl.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Kh=Hl;Kh.extension={type:Gt.RendererSystem,name:"state"},Qt.add(Kh);class x1 extends Bs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new yr(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const a=n.find(l=>this._systemsHash[l]===i);i[t.name](r[a])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const ma=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=ma.defaultMaxIdle,this.checkCountMax=ma.defaultCheckCountMax,this.mode=ma.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==Do.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let xr=ma;xr.defaultMode=Do.AUTO,xr.defaultMaxIdle=60*60,xr.defaultCheckCountMax=60*10,xr.extension={type:Gt.RendererSystem,name:"textureGC"},Qt.add(xr);class zl{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ht.UNSIGNED_BYTE,this.internalFormat=yt.RGBA,this.samplerType=0}}function E1(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Ht.UNSIGNED_BYTE]:{[yt.RGBA]:e.RGBA8,[yt.RGB]:e.RGB8,[yt.RG]:e.RG8,[yt.RED]:e.R8,[yt.RGBA_INTEGER]:e.RGBA8UI,[yt.RGB_INTEGER]:e.RGB8UI,[yt.RG_INTEGER]:e.RG8UI,[yt.RED_INTEGER]:e.R8UI,[yt.ALPHA]:e.ALPHA,[yt.LUMINANCE]:e.LUMINANCE,[yt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Ht.BYTE]:{[yt.RGBA]:e.RGBA8_SNORM,[yt.RGB]:e.RGB8_SNORM,[yt.RG]:e.RG8_SNORM,[yt.RED]:e.R8_SNORM,[yt.RGBA_INTEGER]:e.RGBA8I,[yt.RGB_INTEGER]:e.RGB8I,[yt.RG_INTEGER]:e.RG8I,[yt.RED_INTEGER]:e.R8I},[Ht.UNSIGNED_SHORT]:{[yt.RGBA_INTEGER]:e.RGBA16UI,[yt.RGB_INTEGER]:e.RGB16UI,[yt.RG_INTEGER]:e.RG16UI,[yt.RED_INTEGER]:e.R16UI,[yt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Ht.SHORT]:{[yt.RGBA_INTEGER]:e.RGBA16I,[yt.RGB_INTEGER]:e.RGB16I,[yt.RG_INTEGER]:e.RG16I,[yt.RED_INTEGER]:e.R16I},[Ht.UNSIGNED_INT]:{[yt.RGBA_INTEGER]:e.RGBA32UI,[yt.RGB_INTEGER]:e.RGB32UI,[yt.RG_INTEGER]:e.RG32UI,[yt.RED_INTEGER]:e.R32UI,[yt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Ht.INT]:{[yt.RGBA_INTEGER]:e.RGBA32I,[yt.RGB_INTEGER]:e.RGB32I,[yt.RG_INTEGER]:e.RG32I,[yt.RED_INTEGER]:e.R32I},[Ht.FLOAT]:{[yt.RGBA]:e.RGBA32F,[yt.RGB]:e.RGB32F,[yt.RG]:e.RG32F,[yt.RED]:e.R32F,[yt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Ht.HALF_FLOAT]:{[yt.RGBA]:e.RGBA16F,[yt.RGB]:e.RGB16F,[yt.RG]:e.RG16F,[yt.RED]:e.R16F},[Ht.UNSIGNED_SHORT_5_6_5]:{[yt.RGB]:e.RGB565},[Ht.UNSIGNED_SHORT_4_4_4_4]:{[yt.RGBA]:e.RGBA4},[Ht.UNSIGNED_SHORT_5_5_5_1]:{[yt.RGBA]:e.RGB5_A1},[Ht.UNSIGNED_INT_2_10_10_10_REV]:{[yt.RGBA]:e.RGB10_A2,[yt.RGBA_INTEGER]:e.RGB10_A2UI},[Ht.UNSIGNED_INT_10F_11F_11F_REV]:{[yt.RGB]:e.R11F_G11F_B10F},[Ht.UNSIGNED_INT_5_9_9_9_REV]:{[yt.RGB]:e.RGB9_E5},[Ht.UNSIGNED_INT_24_8]:{[yt.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Ht.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[yt.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Ht.UNSIGNED_BYTE]:{[yt.RGBA]:e.RGBA,[yt.RGB]:e.RGB,[yt.ALPHA]:e.ALPHA,[yt.LUMINANCE]:e.LUMINANCE,[yt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Ht.UNSIGNED_SHORT_5_6_5]:{[yt.RGB]:e.RGB},[Ht.UNSIGNED_SHORT_4_4_4_4]:{[yt.RGBA]:e.RGBA},[Ht.UNSIGNED_SHORT_5_5_5_1]:{[yt.RGBA]:e.RGBA}},t}class Yh{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new zt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=E1(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new zl(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new zl(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let a=t-1;a>=0;--a){const l=r[a];l&&l._glTextures[i].samplerType!==Uo.FLOAT&&this.renderer.texture.unbind(l)}}initTexture(t){const r=new zl(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Ht.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==Uo.FLOAT&&(this.hasIntegerTextures=!0);else{const a=t.realWidth,l=t.realHeight,u=n.gl;(r.width!==a||r.height!==l||r.dirtyId<0)&&(r.width=a,r.height=l,u.texImage2D(t.target,0,r.internalFormat,a,l,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&ta(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Sn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Vi.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Sn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===qr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===qr.LINEAR){const a=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===qr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===qr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Yh.extension={type:Gt.RendererSystem,name:"texture"},Qt.add(Yh);class Zh{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,a=r.createTransformFeedback();t._glTransformFeedbacks[i]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let l=0;l<t.buffers.length;l++){const u=t.buffers[l];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,l,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),a}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let l=0;l<t.buffers.length;l++){const u=t.buffers[l];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&a.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Zh.extension={type:Gt.RendererSystem,name:"transformFeedback"},Qt.add(Zh);class _a{constructor(t){this.renderer=t}init(t){this.screen=new ee(0,0,t.width,t.height),this.element=t.view||jt.ADAPTER.createCanvas(),this.resolution=t.resolution||jt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}_a.defaultOptions={width:800,height:600,resolution:jt.RESOLUTION,autoDensity:!1},_a.extension={type:[Gt.RendererSystem,Gt.CanvasRendererSystem],name:"_view"},Qt.add(_a),jt.PREFER_ENV=An.WEBGL2,jt.STRICT_TEXTURE_CACHE=!1,jt.RENDER_OPTIONS={...ca.defaultOptions,...fa.defaultOptions,..._a.defaultOptions,...ya.defaultOptions},Object.defineProperties(jt,{WRAP_MODE:{get(){return zt.defaultOptions.wrapMode},set(e){Jt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),zt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return zt.defaultOptions.scaleMode},set(e){Jt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),zt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return zt.defaultOptions.mipmap},set(e){Jt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),zt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return zt.defaultOptions.anisotropicLevel},set(e){Jt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),zt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Jt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Wr.defaultResolution},set(e){Wr.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Jt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Wr.defaultMultisample},set(e){Wr.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return br.defaultMaxTextures},set(e){Jt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),br.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return br.defaultBatchSize},set(e){Jt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),br.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return br.canUploadSameBuffer},set(e){Jt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),br.canUploadSameBuffer=e}},GC_MODE:{get(){return xr.defaultMode},set(e){Jt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),xr.defaultMode=e}},GC_MAX_IDLE:{get(){return xr.defaultMaxIdle},set(e){Jt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),xr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return xr.defaultCheckCountMax},set(e){Jt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),xr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Vr.defaultVertexPrecision},set(e){Jt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Vr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Vr.defaultFragmentPrecision},set(e){Jt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Vr.defaultFragmentPrecision=e}}});var ba=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(ba||{});class Vl{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Ze=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Vl(null,null,1/0),this.deltaMS=1/Ze.targetFPMS,this.elapsedMS=1/Ze.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=ba.NORMAL){return this._addListener(new Vl(e,t,r))}addOnce(e,t,r=ba.NORMAL){return this._addListener(new Vl(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Ze.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Ze.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Ze._shared){const e=Ze._shared=new Ze;e.autoStart=!0,e._protected=!0}return Ze._shared}static get system(){if(!Ze._system){const e=Ze._system=new Ze;e.autoStart=!0,e._protected=!0}return Ze._system}};let Er=Ze;Er.targetFPMS=.06,Object.defineProperties(jt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){Jt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Jh{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,ba.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Jh.extension=Gt.Application,Qt.add(Jh);const w1=[];Qt.handleByList(Gt.Renderer,w1);class Qh{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=be.HIGH?this.multisample=be.HIGH:r>=be.MEDIUM?this.multisample=be.MEDIUM:r>=be.LOW?this.multisample=be.LOW:this.multisample=be.NONE}destroy(){}}Qh.extension={type:Gt.RendererSystem,name:"_multisample"},Qt.add(Qh);class T1{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class td{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const a=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:a}=this;n=n||0;const l=t._glBuffers[a]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,l.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const a=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,a)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new T1(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}td.extension={type:Gt.RendererSystem,name:"buffer"},Qt.add(td);class ed{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,a,l,u;if(r&&(i=r.renderTexture,a=r.clear,l=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=l,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}ed.extension={type:Gt.RendererSystem,name:"objectRenderer"},Qt.add(ed);const Wl=class extends x1{constructor(e){super(),this.type=Kf.WEBGL,e=Object.assign({},jt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new mr({projectionMatrix:new Fe},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Wl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Jt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Wl.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:Q0()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Jt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Jt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Jt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Jt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Jt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Jt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Jt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Jt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let gi=Wl;gi.extension={type:Gt.Renderer,priority:1},gi.__plugins={},gi.__systems={},Qt.handleByMap(Gt.RendererPlugin,gi.__plugins),Qt.handleByMap(Gt.RendererSystem,gi.__systems),Qt.add(gi);class rd extends ns{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let a=0;a<t;a++){const l=new zt;this.items.push(l),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof ns?this.addResourceAt(t[n],n):this.addResourceAt(hh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class A1 extends rd{constructor(t,r){const{width:n,height:i}=r||{};let a,l;Array.isArray(t)?(a=t,l=t.length):l=t,super(l,{width:n,height:i}),a&&this.initFromArray(a,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=Zn.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:a,items:l}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=l[f];a[f]<h.dirtyId&&(a[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class S1 extends hn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const us=class extends rd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:a}=t||{};if(e&&e.length!==us.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let l=0;l<us.SIDES;l++)this.items[l].target=Zn.TEXTURE_CUBE_MAP_POSITIVE_X+l;this.linkBaseTexture=a!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=Zn.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Zn.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<us.SIDES;i++){const a=this.items[i];(n[i]<a.dirtyId||r.dirtyId<t.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(e,a,r),n[i]=a.dirtyId):n[i]<-1&&(e.gl.texImage2D(a.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===us.SIDES}};let nd=us;nd.SIDES=6;class yi extends hn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=yi.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await jt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===on.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return yi._EMPTY=yi._EMPTY??jt.ADAPTER.createCanvas(0,0),yi._EMPTY}}const xa=class extends hn{constructor(e,t){t=t||{},super(jt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},xa.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;hn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const a=this.source;a.width=n,a.height=i,a._pixiId=`canvas_${rs()}`,a.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=xa.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&xa.SVG_XML.test(e)}};let Xl=xa;Xl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,Xl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const Kl=class extends hn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];hn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const a=document.createElement("source");let{src:l,mime:u}=e[i];l=l||e[i];const f=l.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||Kl.MIME_TYPES[h]||`video/${h}`,a.src=l,a.type=u,r.appendChild(a)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||Kl.TYPES.includes(t)}};let Yl=Kl;Yl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Yl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Pl.push(yi,Rh,S1,Yl,Xl,Ml,nd,A1);var O1=`attribute vec2 aVertexPosition;
|
|
498
498
|
attribute vec2 aTextureCoord;
|
|
499
499
|
|
|
500
500
|
uniform mat3 projectionMatrix;
|
|
@@ -536,7 +536,7 @@ void main(void)
|
|
|
536
536
|
|
|
537
537
|
gl_FragColor = c * alpha;
|
|
538
538
|
}
|
|
539
|
-
`;class R1 extends Wr{constructor(t){super(O1,I1),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var Bn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Bn||{});const C1=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:l,uniqueId:u=""})=>{const f=wn.utils.string2hex("#F3C409"),h=wn.utils.string2hex("#F3C409"),p=Tt.useRef({isDragging:!1}),d=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!0)},[a]),c=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!1)},[a]),v=Tt.useCallback(()=>{p.current.isDragging=!0},[]),y=Tt.useCallback(()=>{p.current.isDragging=!1},[]),m=Tt.useCallback(()=>{p.current.isDragging=!1},[]),_=Tt.useCallback(()=>{console.log("dobule click in pixi transformer"),l&&l({uniqueId:u})},[l]),b=Tt.useCallback(w=>{p.current.isDragging=!0,i&&i(w)},[i]),E=Tt.useCallback(()=>{if(t.current===null)return;const w=t.current.x,x=t.current.y,A=t.current.width,P=t.current.height,S=t.current.rotation,O=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:u,transformation:{x:Math.round(w),y:Math.round(x),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,P)),rotation:S,scale:O}}),p.current.isDragging=!1},[n]);return Tt.useEffect(()=>(e.current&&(e.current.on("mouseover",d),e.current.on("mouseout",c),e.current.on("mousedown",v),e.current.on("mouseup",y),e.current.on("mouseupoutside",m),e.current.addListener("dblclick",_)),()=>{e.current&&(e.current.off("mouseover",d),e.current.off("mouseout",c),e.current.off("mousedown",v),e.current.off("mouseup",y),e.current.off("mouseupoutside",m),e.current.removeListener("dblclick",_))}),[]),Zt.jsx(gy.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:b,transformcommit:E})};let id;function sd(){return id=document.body,id}function Fr(e,t,r){let n;return bt.useEffect(()=>{n=n||sd();const i=a=>{const l=a.detail;t(l)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function Ea(e,t){const r=sd(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function N1(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const mi=Tt.createContext({}),Ze={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE"},P1=({children:e})=>{const[t,r]=bt.useState(!1),n=bt.useRef(),i=bt.useRef(),a=bt.useRef(.001);bt.useLayoutEffect(()=>(i.current=We.context(()=>{n.current&&n.current.progress(0).kill(),n.current=We.timeline({paused:!0,defaults:{duration:0}})}),()=>i.current.revert()),[]);const l=bt.useCallback(()=>{let _=n.current.time();a.current=_},[]);bt.useEffect(()=>{const m=n.current;m.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){m.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onPause",function(){l()}).eventCallback("onResume",function(){l()}).eventCallback("onComplete",function(){m.pause(),m.revert(),Ea(Ze.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),l()})},[]);const u=bt.useCallback(()=>{n.current.revert()},[]),f=bt.useCallback(()=>{n.current.restart()},[]),h=bt.useCallback(()=>{const m=n.current;m.repeat(1),m.restart()},[]),p=bt.useCallback(m=>{n.current.seek(m)},[]),d=bt.useCallback(()=>{n.current.seek(4)},[]),c=bt.useCallback(()=>{const m=n.current;return m?m.totalDuration():0},[]),v=()=>{n.current.pause(),Ea(Ze.PAUSE)},y=()=>{n.current.resume(),Ea(Ze.RESUME)};return Fr(Ze.SEEK_START,()=>{r(!0)}),Fr(Ze.SCRUBBER_PLAY,()=>{y()}),Fr(Ze.SCRUBBER_PAUSE,()=>{v()}),Fr(Ze.SCRUBBER_SEEK,m=>{p(m)}),Fr(Ze.SEEK_END,()=>{r(!1)}),Fr(Ze.SCRUBBER_PROGRESS_UPDATE,m=>{}),Zt.jsx(mi.Provider,{value:{gsapCtx:i,tl:n,handlePlay:y,handlePause:v,handleReset:u,handleSeek:p,handleSeekTest:d,handleRestart:f,handleRepeat:h,playerTimeRef:a,isDragging:t,getTimelineDuration:c},children:e})},M1=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var k1=Object.prototype;function L1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||k1;return e===r}var ad=L1;function F1(e,t){return function(r){return e(t(r))}}var B1=F1,U1=B1,D1=U1(Object.keys,Object),$1=D1,G1=ad,q1=$1,j1=Object.prototype,H1=j1.hasOwnProperty;function z1(e){if(!G1(e))return q1(e);var t=[];for(var r in Object(e))H1.call(e,r)&&r!="constructor"&&t.push(r);return t}var od=z1,V1=typeof Xe=="object"&&Xe&&Xe.Object===Object&&Xe,ld=V1,W1=ld,X1=typeof self=="object"&&self&&self.Object===Object&&self,K1=W1||X1||Function("return this")(),Br=K1,Y1=Br,Z1=Y1.Symbol,wa=Z1,ud=wa,fd=Object.prototype,J1=fd.hasOwnProperty,Q1=fd.toString,fs=ud?ud.toStringTag:void 0;function tb(e){var t=J1.call(e,fs),r=e[fs];try{e[fs]=void 0;var n=!0}catch{}var i=Q1.call(e);return n&&(t?e[fs]=r:delete e[fs]),i}var eb=tb,rb=Object.prototype,nb=rb.toString;function ib(e){return nb.call(e)}var sb=ib,cd=wa,ab=eb,ob=sb,lb="[object Null]",ub="[object Undefined]",hd=cd?cd.toStringTag:void 0;function fb(e){return e==null?e===void 0?ub:lb:hd&&hd in Object(e)?ab(e):ob(e)}var cs=fb;function cb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hs=cb,hb=cs,db=hs,pb="[object AsyncFunction]",vb="[object Function]",gb="[object GeneratorFunction]",yb="[object Proxy]";function mb(e){if(!db(e))return!1;var t=hb(e);return t==vb||t==gb||t==pb||t==yb}var dd=mb,_b=Br,bb=_b["__core-js_shared__"],xb=bb,Zl=xb,pd=function(){var e=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Eb(e){return!!pd&&pd in e}var wb=Eb,Tb=Function.prototype,Ab=Tb.toString;function Sb(e){if(e!=null){try{return Ab.call(e)}catch{}try{return e+""}catch{}}return""}var vd=Sb,Ob=dd,Ib=wb,Rb=hs,Cb=vd,Nb=/[\\^$.*+?()[\]{}|]/g,Pb=/^\[object .+?Constructor\]$/,Mb=Function.prototype,kb=Object.prototype,Lb=Mb.toString,Fb=kb.hasOwnProperty,Bb=RegExp("^"+Lb.call(Fb).replace(Nb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ub(e){if(!Rb(e)||Ib(e))return!1;var t=Ob(e)?Bb:Pb;return t.test(Cb(e))}var Db=Ub;function $b(e,t){return e==null?void 0:e[t]}var Gb=$b,qb=Db,jb=Gb;function Hb(e,t){var r=jb(e,t);return qb(r)?r:void 0}var _i=Hb,zb=_i,Vb=Br,Wb=zb(Vb,"DataView"),Xb=Wb,Kb=_i,Yb=Br,Zb=Kb(Yb,"Map"),Jl=Zb,Jb=_i,Qb=Br,tx=Jb(Qb,"Promise"),ex=tx,rx=_i,nx=Br,ix=rx(nx,"Set"),sx=ix,ax=_i,ox=Br,lx=ax(ox,"WeakMap"),ux=lx,Ql=Xb,tu=Jl,eu=ex,ru=sx,nu=ux,gd=cs,bi=vd,yd="[object Map]",fx="[object Object]",md="[object Promise]",_d="[object Set]",bd="[object WeakMap]",xd="[object DataView]",cx=bi(Ql),hx=bi(tu),dx=bi(eu),px=bi(ru),vx=bi(nu),Un=gd;(Ql&&Un(new Ql(new ArrayBuffer(1)))!=xd||tu&&Un(new tu)!=yd||eu&&Un(eu.resolve())!=md||ru&&Un(new ru)!=_d||nu&&Un(new nu)!=bd)&&(Un=function(e){var t=gd(e),r=t==fx?e.constructor:void 0,n=r?bi(r):"";if(n)switch(n){case cx:return xd;case hx:return yd;case dx:return md;case px:return _d;case vx:return bd}return t});var Ed=Un;function gx(e){return e!=null&&typeof e=="object"}var ds=gx,yx=cs,mx=ds,_x="[object Arguments]";function bx(e){return mx(e)&&yx(e)==_x}var xx=bx,wd=xx,Ex=ds,Td=Object.prototype,wx=Td.hasOwnProperty,Tx=Td.propertyIsEnumerable,Ax=wd(function(){return arguments}())?wd:function(e){return Ex(e)&&wx.call(e,"callee")&&!Tx.call(e,"callee")},iu=Ax,Sx=Array.isArray,Ur=Sx,Ox=9007199254740991;function Ix(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ox}var su=Ix,Rx=dd,Cx=su;function Nx(e){return e!=null&&Cx(e.length)&&!Rx(e)}var Ta=Nx,Aa={exports:{}};function Px(){return!1}var Mx=Px;Aa.exports,function(e,t){var r=Br,n=Mx,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===i,u=l?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(Aa,Aa.exports);var au=Aa.exports,kx=cs,Lx=su,Fx=ds,Bx="[object Arguments]",Ux="[object Array]",Dx="[object Boolean]",$x="[object Date]",Gx="[object Error]",qx="[object Function]",jx="[object Map]",Hx="[object Number]",zx="[object Object]",Vx="[object RegExp]",Wx="[object Set]",Xx="[object String]",Kx="[object WeakMap]",Yx="[object ArrayBuffer]",Zx="[object DataView]",Jx="[object Float32Array]",Qx="[object Float64Array]",tE="[object Int8Array]",eE="[object Int16Array]",rE="[object Int32Array]",nE="[object Uint8Array]",iE="[object Uint8ClampedArray]",sE="[object Uint16Array]",aE="[object Uint32Array]",se={};se[Jx]=se[Qx]=se[tE]=se[eE]=se[rE]=se[nE]=se[iE]=se[sE]=se[aE]=!0,se[Bx]=se[Ux]=se[Yx]=se[Dx]=se[Zx]=se[$x]=se[Gx]=se[qx]=se[jx]=se[Hx]=se[zx]=se[Vx]=se[Wx]=se[Xx]=se[Kx]=!1;function oE(e){return Fx(e)&&Lx(e.length)&&!!se[kx(e)]}var lE=oE;function uE(e){return function(t){return e(t)}}var fE=uE,Sa={exports:{}};Sa.exports,function(e,t){var r=ld,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,l=a&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(Sa,Sa.exports);var cE=Sa.exports,hE=lE,dE=fE,Ad=cE,Sd=Ad&&Ad.isTypedArray,pE=Sd?dE(Sd):hE,ou=pE,vE=od,gE=Ed,yE=iu,mE=Ur,_E=Ta,bE=au,xE=ad,EE=ou,wE="[object Map]",TE="[object Set]",AE=Object.prototype,SE=AE.hasOwnProperty;function OE(e){if(e==null)return!0;if(_E(e)&&(mE(e)||typeof e=="string"||typeof e.splice=="function"||bE(e)||EE(e)||yE(e)))return!e.length;var t=gE(e);if(t==wE||t==TE)return!e.size;if(xE(e))return!vE(e).length;for(var r in e)if(SE.call(e,r))return!1;return!0}var IE=OE;const xi=Tn(IE),RE=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ei=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState(!1),[i,a]=bt.useState(!1),[l,u]=bt.useState(!1),f=bt.useRef(null),h=bt.useRef(null),p=bt.useRef(null),d=bt.useRef(null),c=bt.useRef(e.initialAlpha),{tl:v}=bt.useContext(mi),{uniqueId:y,startAt:m,endAt:_,initialAlpha:b,transformation:{x:E,y:w,width:x,height:A,scale:P=[1,1],rotation:S=0,colorCorrection:O,animation:L,effect:R},applyTransformer:I,disabled:M,ignoreTlForVideo:C,pointerdown:F,pointerout:j,pointerover:X}=e,{contrast:V=1,saturation:it=1,brightness:Y=1,alpha:U=1,blurRadius:N=0}=O||{},D={...Y>1&&{brightness:Y},...V>1&&{contrast:V},...it>1&&{saturation:it},...U!==0&&{alpha:U}};Tt.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>l}),[i,l]),Tt.useEffect(()=>{f.current&&n(!0)},[]);const q=nt=>{c.current=nt.alpha},Z=nt=>{c.current=nt.alpha},K=()=>{console.log("reverse complete"),c.current=b};Tt.useEffect(()=>{let nt=We.context(()=>{});if(f.current&&v.current){const ht={duration:Number(_)-Number(m)},gt={onStart:q,onReverseComplete:K,onStartParams:[{alpha:1}]},mt={onComplete:Z,onCompleteParams:[{alpha:0}]},xt=M1(L||"None");nt=We.context(()=>{var It,ae;v.current.to(f.current,{alpha:1,duration:.1,...gt},m).to(f.current,{alpha:0,duration:.1,...mt},Number(_)-.09),C||v.current.from(f.current,{...ht},m),xi(xt.from)?xi(xt.to)?xi(xt.fromTo)||v.current.fromTo(f.current,(It=xt.fromTo)==null?void 0:It.from,(ae=xt.fromTo)==null?void 0:ae.to,m):v.current.to(f.current,{...xt.to},m):v.current.from(f.current,{...xt.from},m)})}return()=>nt.revert()},[L,m,_,C]);const G=Tt.useCallback(()=>{a(!0)},[]),z=Tt.useCallback(nt=>{console.log("changeEnd",nt),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(nt)),a(!1)},[]),tt=ve.withFilters(ve.Container,{...N>0&&{blur:wn.filters.BlurFilter},...!xi(D)&&{adjust:R1},matrix:wn.filters.ColorMatrixFilter}),et=(O==null?void 0:O.enabled)||R&&R!==Bn.Normal;return Zt.jsxs(ve.Container,{ref:h,children:[Zt.jsx(ve.Container,{ref:f,alpha:c.current,position:[E,w],pivot:[E,w],width:x,height:A,scale:P,rotation:S,...!M&&!i&&{interactive:!0,buttonMode:!0,pointerdown:F,pointerover:X,pointerout:j},children:Zt.jsxs(ve.Container,{children:[et&&Zt.jsx(tt,{scale:1,blur:{blur:N,quality:4},adjust:D,apply:({matrix:nt})=>{R===Bn.BlackAndWhite?nt.desaturate():R===Bn.Sepia?nt.sepia():R===Bn.RetroVintage||R===Bn.NightVision?nt.negative():R===Bn.Normal&&nt.reset()},matrix:{enabled:!0,matrix:RE},children:Zt.jsx(ve.Container,{ref:p,children:e.children})}),!et&&Zt.jsx(ve.Container,{ref:p,children:e.children})]})}),I&&Zt.jsx(C1,{pixiTransformerRef:d,imageRef:f,isMounted:r,transformCommit:z,transformChange:G,mouseoverEvent:u,uniqueId:y})]})});Ei.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};const CE=Tt.forwardRef((e,t)=>{const r=bt.useRef(null),n=bt.useRef(null),{src:i,transformation:{x:a,y:l,width:u,height:f,anchor:h},pointerdown:p,pointerup:d}=e;return Zt.jsx(Ei,{...e,ref:t,children:Zt.jsx(ve.Container,{ref:n,children:Zt.jsx(ve.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:a,y:l,interactive:!0,pointerdown:p,pointerup:d})})})}),Oa={build(e){const t=e.points;let r,n,i,a,l,u;if(e.type===Re.CIRC){const y=e.shape;r=y.x,n=y.y,l=u=y.radius,i=a=0}else if(e.type===Re.ELIP){const y=e.shape;r=y.x,n=y.y,l=y.width,u=y.height,i=a=0}else{const y=e.shape,m=y.width/2,_=y.height/2;r=y.x+m,n=y.y+_,l=u=Math.max(0,Math.min(y.radius,Math.min(m,_))),i=m-l,a=_-u}if(!(l>=0&&u>=0&&i>=0&&a>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(l+u)),h=f*8+(i?4:0)+(a?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+a,t[2]=t[4]=r-i,t[5]=t[7]=n-a;return}let p=0,d=f*4+(i?2:0)+2,c=d,v=h;{const y=i+l,m=a,_=r+y,b=r-y,E=n+m;if(t[p++]=_,t[p++]=E,t[--d]=E,t[--d]=b,a){const w=n-m;t[c++]=b,t[c++]=w,t[--v]=w,t[--v]=_}}for(let y=1;y<f;y++){const m=Math.PI/2*(y/f),_=i+Math.cos(m)*l,b=a+Math.sin(m)*u,E=r+_,w=r-_,x=n+b,A=n-b;t[p++]=E,t[p++]=x,t[--d]=x,t[--d]=w,t[c++]=w,t[c++]=A,t[--v]=A,t[--v]=E}{const y=i,m=a+u,_=r+y,b=r-y,E=n+m,w=n-m;t[p++]=_,t[p++]=E,t[--v]=w,t[--v]=_,i&&(t[p++]=b,t[p++]=E,t[--v]=w,t[--v]=b)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let a=n.length/2;const l=a;let u,f;if(e.type!==Re.RREC){const p=e.shape;u=p.x,f=p.y}else{const p=e.shape;u=p.x+p.width/2,f=p.y+p.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),i.push(a++,l,a);i.push(l+1,l,a)}};function Od(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,a=e[r-2],l=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-a)*(f+l),a=u,l=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let a=i+i%2;a<r;a+=2){const l=r-a-2,u=r-a-1,f=a,h=a+1;[e[l],e[f]]=[e[f],e[l]],[e[u],e[h]]=[e[h],e[u]]}}}const Id={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,a=t.indices;if(r.length>=6){Od(r,!1);const l=[];for(let h=0;h<n.length;h++){const p=n[h];Od(p.points,!0),l.push(r.length/2),r=r.concat(p.points)}const u=jy(r,l,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)a.push(u[h]+f),a.push(u[h+1]+f),a.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},NE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,a=t.height,l=e.points;l.length=0,i>=0&&a>=0&&l.push(r,n,r+i,n,r+i,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},PE={build(e){Oa.build(e)},triangulate(e,t){Oa.triangulate(e,t)}};var wr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(wr||{}),Dn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Dn||{});const wi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class Rd{static curveTo(t,r,n,i,a,l){const u=l[l.length-2],h=l[l.length-1]-r,p=u-t,d=i-r,c=n-t,v=Math.abs(h*c-p*d);if(v<1e-8||a===0)return(l[l.length-2]!==t||l[l.length-1]!==r)&&l.push(t,r),null;const y=h*h+p*p,m=d*d+c*c,_=h*d+p*c,b=a*Math.sqrt(y)/v,E=a*Math.sqrt(m)/v,w=b*_/y,x=E*_/m,A=b*c+E*p,P=b*d+E*h,S=p*(E+w),O=h*(E+w),L=c*(b+x),R=d*(b+x),I=Math.atan2(O-P,S-A),M=Math.atan2(R-P,L-A);return{cx:A+t,cy:P+r,radius:a,startAngle:I,endAngle:M,anticlockwise:p*d>c*h}}static arc(t,r,n,i,a,l,u,f,h){const p=u-l,d=wi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/ia)*40),c=p/(d*2),v=c*2,y=Math.cos(c),m=Math.sin(c),_=d-1,b=_%1/_;for(let E=0;E<=_;++E){const w=E+b*E,x=c+l+v*w,A=Math.cos(x),P=-Math.sin(x);h.push((y*A+m*P)*a+n,(y*-P+m*A)*a+i)}}}class ME{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class lu{static curveLength(t,r,n,i,a,l,u,f){let p=0,d=0,c=0,v=0,y=0,m=0,_=0,b=0,E=0,w=0,x=0,A=t,P=r;for(let S=1;S<=10;++S)d=S/10,c=d*d,v=c*d,y=1-d,m=y*y,_=m*y,b=_*t+3*m*d*n+3*y*c*a+v*u,E=_*r+3*m*d*i+3*y*c*l+v*f,w=A-b,x=P-E,A=b,P=E,p+=Math.sqrt(w*w+x*x);return p}static curveTo(t,r,n,i,a,l,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const p=wi._segmentsCount(lu.curveLength(f,h,t,r,n,i,a,l));let d=0,c=0,v=0,y=0,m=0;u.push(f,h);for(let _=1,b=0;_<=p;++_)b=_/p,d=1-b,c=d*d,v=c*d,y=b*b,m=y*b,u.push(v*f+3*c*b*t+3*d*y*n+m*a,v*h+3*c*b*r+3*d*y*i+m*l)}}function Cd(e,t,r,n,i,a,l,u){const f=e-r*i,h=t-n*i,p=e+r*a,d=t+n*a;let c,v;l?(c=n,v=-r):(c=-n,v=r);const y=f+c,m=h+v,_=p+c,b=d+v;return u.push(y,m,_,b),2}function $n(e,t,r,n,i,a,l,u){const f=r-e,h=n-t;let p=Math.atan2(f,h),d=Math.atan2(i-e,a-t);u&&p<d?p+=Math.PI*2:!u&&p>d&&(d+=Math.PI*2);let c=p;const v=d-p,y=Math.abs(v),m=Math.sqrt(f*f+h*h),_=(15*y*Math.sqrt(m)/Math.PI>>0)+1,b=v/_;if(c+=b,u){l.push(e,t,r,n);for(let E=1,w=c;E<_;E++,w+=b)l.push(e,t,e+Math.sin(w)*m,t+Math.cos(w)*m);l.push(e,t,i,a)}else{l.push(r,n,e,t);for(let E=1,w=c;E<_;E++,w+=b)l.push(e+Math.sin(w)*m,t+Math.cos(w)*m,e,t);l.push(i,a,e,t)}return _*2}function kE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,l=new Oe(n[0],n[1]),u=new Oe(n[n.length-2],n[n.length-1]),f=r.type!==Re.POLY||r.closeStroke,h=Math.abs(l.x-u.x)<i&&Math.abs(l.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const V=(l.x+u.x)*.5,it=(u.y+l.y)*.5;n.unshift(V,it),n.push(V,it)}const p=t.points,d=n.length/2;let c=n.length;const v=p.length/2,y=a.width/2,m=y*y,_=a.miterLimit*a.miterLimit;let b=n[0],E=n[1],w=n[2],x=n[3],A=0,P=0,S=-(E-x),O=b-w,L=0,R=0,I=Math.sqrt(S*S+O*O);S/=I,O/=I,S*=y,O*=y;const M=a.alignment,C=(1-M)*2,F=M*2;f||(a.cap===Dn.ROUND?c+=$n(b-S*(C-F)*.5,E-O*(C-F)*.5,b-S*C,E-O*C,b+S*F,E+O*F,p,!0)+2:a.cap===Dn.SQUARE&&(c+=Cd(b,E,S,O,C,F,!0,p))),p.push(b-S*C,E-O*C,b+S*F,E+O*F);for(let V=1;V<d-1;++V){b=n[(V-1)*2],E=n[(V-1)*2+1],w=n[V*2],x=n[V*2+1],A=n[(V+1)*2],P=n[(V+1)*2+1],S=-(E-x),O=b-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,L=-(x-P),R=w-A,I=Math.sqrt(L*L+R*R),L/=I,R/=I,L*=y,R*=y;const it=w-b,Y=E-x,U=w-A,N=P-x,D=it*U+Y*N,q=Y*U-N*it,Z=q<0;if(Math.abs(q)<.001*Math.abs(D)){p.push(w-S*C,x-O*C,w+S*F,x+O*F),D>=0&&(a.join===wr.ROUND?c+=$n(w,x,w-S*C,x-O*C,w-L*C,x-R*C,p,!1)+4:c+=2,p.push(w-L*F,x-R*F,w+L*C,x+R*C));continue}const K=(-S+b)*(-O+x)-(-S+w)*(-O+E),G=(-L+A)*(-R+x)-(-L+w)*(-R+P),z=(it*G-U*K)/q,tt=(N*K-Y*G)/q,et=(z-w)*(z-w)+(tt-x)*(tt-x),nt=w+(z-w)*C,ht=x+(tt-x)*C,gt=w-(z-w)*F,mt=x-(tt-x)*F,xt=Math.min(it*it+Y*Y,U*U+N*N),It=Z?C:F,ae=xt+It*It*m,Wt=et<=ae;let st=a.join;if(st===wr.MITER&&et/m>_&&(st=wr.BEVEL),Wt)switch(st){case wr.MITER:{p.push(nt,ht,gt,mt);break}case wr.BEVEL:{Z?p.push(nt,ht,w+S*F,x+O*F,nt,ht,w+L*F,x+R*F):p.push(w-S*C,x-O*C,gt,mt,w-L*C,x-R*C,gt,mt),c+=2;break}case wr.ROUND:{Z?(p.push(nt,ht,w+S*F,x+O*F),c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+4,p.push(nt,ht,w+L*F,x+R*F)):(p.push(w-S*C,x-O*C,gt,mt),c+=$n(w,x,w-S*C,x-O*C,w-L*C,x-R*C,p,!1)+4,p.push(w-L*C,x-R*C,gt,mt));break}}else{switch(p.push(w-S*C,x-O*C,w+S*F,x+O*F),st){case wr.MITER:{Z?p.push(gt,mt,gt,mt):p.push(nt,ht,nt,ht),c+=2;break}case wr.ROUND:{Z?c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+2:c+=$n(w,x,w-S*C,x-O*C,w-L*C,x-R*C,p,!1)+2;break}}p.push(w-L*C,x-R*C,w+L*F,x+R*F),c+=2}}b=n[(d-2)*2],E=n[(d-2)*2+1],w=n[(d-1)*2],x=n[(d-1)*2+1],S=-(E-x),O=b-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,p.push(w-S*C,x-O*C,w+S*F,x+O*F),f||(a.cap===Dn.ROUND?c+=$n(w-S*(C-F)*.5,x-O*(C-F)*.5,w-S*C,x-O*C,w+S*F,x+O*F,p,!1)+2:a.cap===Dn.SQUARE&&(c+=Cd(w,x,S,O,C,F,!1,p)));const j=t.indices,X=wi.epsilon*wi.epsilon;for(let V=v;V<c+v-2;++V)b=p[V*2],E=p[V*2+1],w=p[(V+1)*2],x=p[(V+1)*2+1],A=p[(V+2)*2],P=p[(V+2)*2+1],!(Math.abs(b*(x-P)+w*(P-E)+A*(E-x))<X)&&j.push(V,V+1,V+2)}function LE(e,t){let r=0;const n=e.shape,i=e.points||n.points,a=n.type!==Re.POLY||n.closeStroke;if(i.length===0)return;const l=t.points,u=t.indices,f=i.length/2,h=l.length/2;let p=h;for(l.push(i[0],i[1]),r=1;r<f;r++)l.push(i[r*2],i[r*2+1]),u.push(p,p+1),p++;a&&u.push(p,h)}function Nd(e,t){e.lineStyle.native?LE(e,t):kE(e,t)}class uu{static curveLength(t,r,n,i,a,l){const u=t-2*n+a,f=r-2*i+l,h=2*n-2*t,p=2*i-2*r,d=4*(u*u+f*f),c=4*(u*h+f*p),v=h*h+p*p,y=2*Math.sqrt(d+c+v),m=Math.sqrt(d),_=2*d*m,b=2*Math.sqrt(v),E=c/m;return(_*y+m*c*(y-b)+(4*v*d-c*c)*Math.log((2*m+E+y)/(E+b)))/(4*_)}static curveTo(t,r,n,i,a){const l=a[a.length-2],u=a[a.length-1],f=wi._segmentsCount(uu.curveLength(l,u,t,r,n,i));let h=0,p=0;for(let d=1;d<=f;++d){const c=d/f;h=l+(t-l)*c,p=u+(r-u)*c,a.push(h+(t+(n-t)*c-h)*c,p+(r+(i-r)*c-p)*c)}}}const fu={[Re.POLY]:Id,[Re.CIRC]:Oa,[Re.ELIP]:Oa,[Re.RECT]:NE,[Re.RREC]:PE},Pd=[],Ia=[];class cu{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?ee.EMPTY:(t=t||new ee(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:a,d:l,tx:u,ty:f}=t,h=n*r.x+a*r.y+u,p=i*r.x+l*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,a=this.maxY,l=t[0],u=t[1];r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[2],u=t[3],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[4],u=t[5],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[6],u=t[7],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,this.minX=r,this.minY=n,this.maxX=i,this.maxY=a}addFrame(t,r,n,i,a){this.addFrameMatrix(t.worldTransform,r,n,i,a)}addFrameMatrix(t,r,n,i,a){const l=t.a,u=t.b,f=t.c,h=t.d,p=t.tx,d=t.ty;let c=this.minX,v=this.minY,y=this.maxX,m=this.maxY,_=l*r+f*n+p,b=u*r+h*n+d;c=_<c?_:c,v=b<v?b:v,y=_>y?_:y,m=b>m?b:m,_=l*i+f*n+p,b=u*i+h*n+d,c=_<c?_:c,v=b<v?b:v,y=_>y?_:y,m=b>m?b:m,_=l*r+f*a+p,b=u*r+h*a+d,c=_<c?_:c,v=b<v?b:v,y=_>y?_:y,m=b>m?b:m,_=l*i+f*a+p,b=u*i+h*a+d,c=_<c?_:c,v=b<v?b:v,y=_>y?_:y,m=b>m?b:m,this.minX=c,this.minY=v,this.maxX=y,this.maxY=m}addVertexData(t,r,n){let i=this.minX,a=this.minY,l=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],p=t[f+1];i=h<i?h:i,a=p<a?p:a,l=h>l?h:l,u=p>u?p:u}this.minX=i,this.minY=a,this.maxX=l,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,a=0,l=a){const u=t.a,f=t.b,h=t.c,p=t.d,d=t.tx,c=t.ty;let v=this.minX,y=this.minY,m=this.maxX,_=this.maxY;for(let b=n;b<i;b+=2){const E=r[b],w=r[b+1],x=u*E+h*w+d,A=p*w+f*E+c;v=Math.min(v,x-a),m=Math.max(m,x+a),y=Math.min(y,A-l),_=Math.max(_,A+l)}this.minX=v,this.minY=y,this.maxX=m,this.maxY=_}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,a=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,l=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l:p}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,l=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,a,l){t-=a,r-=l,n+=a,i+=l,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ti extends Bs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Ul,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new cu,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ti.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new ee),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ee),t=this._localBoundsRect),this._localBounds||(this._localBounds=new cu);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const l=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-a,l}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,a=0,l=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=a,this.skew.x=l,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new FE),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*w_}set angle(t){this.transform.rotation=t*T_}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class FE extends Ti{constructor(){super(...arguments),this.sortDirty=null}}Ti.prototype.displayObjectUpdateTransform=Ti.prototype.updateTransform;const BE=new Fe;function UE(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const hu=class extends Ti{constructor(){super(),this.children=[],this.sortableChildren=hu.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);ta(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,ta(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,ta(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let a;if(i>0&&i<=n){a=this.children.splice(r,i);for(let l=0;l<a.length;++l)a[l].parent=null,a[l].transform&&(a[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<a.length;++l)a[l].emit("removed",this),this.emit("childRemoved",a[l],this,l);return a}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(UE),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==hu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=BE.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,l=this.children.length;a<l;++a){const u=this.children[a],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,a,l;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==xe.NONE));if(n&&e.batch.flush(),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((l=this._enabledFilters)!=null&&l.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Ai=hu;Ai.defaultSortableChildren=!1,Ai.prototype.containerUpdateTransform=Ai.prototype.updateTransform,Object.defineProperties(jt,{SORTABLE_CHILDREN:{get(){return Ai.defaultSortableChildren},set(e){Jt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ai.defaultSortableChildren=e}}});class Ra{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Ra(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Si=new Oe,Md=class extends ph{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new cu,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Ia.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),Pd.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Ra(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ra(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Si):Si.copyFrom(e),n.shape.contains(Si.x,Si.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(Si.x,Si.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,p=f.lineStyle;fu[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||p.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:p;if(!v.visible)continue;const y=v.texture.baseTexture,m=this.indices.length,_=this.points.length/2;y.wrapMode=Vi.REPEAT,c===0?this.processFill(f):this.processLine(f);const b=this.points.length/2-_;b!==0&&(r&&!this._compareStyles(n,v)&&(r.end(m,_),r=null),r||(r=Pd.pop()||new ME,r.begin(v,m,_),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,_,b,v.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const l=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const a=n.start+i;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Md.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++zt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Ia.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Ia.pop();n||(n=new kl,n.texArray=new $l),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,a=null,l=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const d=this.batches[p],c=8,v=d.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,a=null,i=c,e++),a!==y&&(a=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Ia.pop(),n||(n=new kl,n.texArray=new $l),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Vi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=d.size,h+=d.size,l=y._batchLocation,this.addColors(t,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,l,d.attribSize,d.attribStart)}zt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),a=new Float32Array(i),l=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)a[u++]=e[f*2],a[u++]=e[f*2+1],a[u++]=t[f*2],a[u++]=t[f*2+1],l[u++]=r[f],a[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?Id.triangulate(e,this):fu[e.type].triangulate(e,this)}processLine(e){Nd(e,this);for(let t=0;t<e.holes.length;t++)Nd(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];fu[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const a=Ge.shared.setValue(t).toLittleEndianNumber(),l=Ge.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=l}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,a=null){let l=0;const u=t.length,f=r.frame;for(;l<i;){let p=e[(n+l)*2],d=e[(n+l)*2+1];if(a){const c=a.a*p+a.c*d+a.tx;d=a.b*p+a.d*d+a.ty,p=c}l++,t.push(p/f.width,d/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,a=1e-6,l=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let p=u.x/u.width,d=u.y/u.height,c=Math.floor(e[r]+a),v=Math.floor(e[r+1]+a);for(let y=r+2;y<l;y+=2)c=Math.min(c,Math.floor(e[y]+a)),v=Math.min(v,Math.floor(e[y+1]+a));p-=c,d-=v;for(let y=r;y<l;y+=2)e[y]=(e[y]+p)*f,e[y+1]=(e[y+1]+d)*h}};let kd=Md;kd.BATCHABLE_SIZE=100;class Ca{constructor(){this.color=16777215,this.alpha=1,this.texture=Vt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Ca;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Vt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class du extends Ca{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Dn.BUTT,this.join=wr.MITER,this.miterLimit=10}clone(){const t=new du;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const pu={},Na=class extends Ai{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Ca,this._lineStyle=new du,this._matrix=null,this._holeMode=!1,this.state=ra.for2d(),this._geometry=e||new kd,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ge(16777215),this.blendMode=Rt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Na(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Vt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Dn.BUTT,join:wr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new is,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new is,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),uu.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,a){return this._initCurve(),lu.curveTo(e,t,r,n,i,a,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const a=this.currentPath.points,l=Rd.curveTo(e,t,r,n,i,a);if(l){const{cx:u,cy:f,radius:h,startAngle:p,endAngle:d,anticlockwise:c}=l;this.arc(u,f,h,p,d,c)}return this}arc(e,t,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ia:a&&n<=i&&(n+=ia),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const d=Math.abs(p[p.length-2]-u),c=Math.abs(p[p.length-1]-f);d<h&&c<h||p.push(u,f)}else this.moveTo(u,f),p=this.currentPath.points;return Rd.arc(u,f,e,t,r,n,i,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Vt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ge.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Vt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ee(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Fl(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new Ll(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new A_(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new is(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Re.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],a=i.style.color,l=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:l,blendMode:t,indices:f,uvs:u,_batchRGB:Ge.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,a=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Ge.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let l=0,u=a.length;l<u;l++)this._renderDrawCallDirect(e,r.drawCalls[l])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:a}=t,l=r.count;for(let u=0;u<l;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!pu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Fe,default:mr.from({uSamplers:i},!0)},l=e.plugins[r]._shader.program;pu[r]=new as(l,a)}t=pu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Na._TEMP_POINT),this._geometry.containsPoint(Na._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Ge.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,a=t.d,l=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let p=0;for(let d=0;d<f.length;d+=2){const c=f[d],v=f[d+1];h[p++]=r*c+i*v+l,h[p++]=a*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let vu=Na;vu.curves=wi,vu._TEMP_POINT=new Oe;var DE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gu={},$E={get exports(){return gu},set exports(e){gu=e}};/*!
|
|
539
|
+
`;class R1 extends Wr{constructor(t){super(O1,I1),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var Bn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Bn||{});const C1=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:l,uniqueId:u=""})=>{const f=wn.utils.string2hex("#F3C409"),h=wn.utils.string2hex("#F3C409"),p=Tt.useRef({isDragging:!1}),d=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!0)},[a]),c=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!1)},[a]),v=Tt.useCallback(()=>{p.current.isDragging=!0},[]),y=Tt.useCallback(()=>{p.current.isDragging=!1},[]),_=Tt.useCallback(()=>{p.current.isDragging=!1},[]),b=Tt.useCallback(()=>{console.log("dobule click in pixi transformer"),l&&l({uniqueId:u})},[l]),m=Tt.useCallback(w=>{p.current.isDragging=!0,i&&i(w)},[i]),E=Tt.useCallback(()=>{if(t.current===null)return;const w=t.current.x,x=t.current.y,A=t.current.width,P=t.current.height,S=t.current.rotation,O=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:u,transformation:{x:Math.round(w),y:Math.round(x),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,P)),rotation:S,scale:O}}),p.current.isDragging=!1},[n]);return Tt.useEffect(()=>(e.current&&(e.current.on("mouseover",d),e.current.on("mouseout",c),e.current.on("mousedown",v),e.current.on("mouseup",y),e.current.on("mouseupoutside",_),e.current.addListener("dblclick",b)),()=>{e.current&&(e.current.off("mouseover",d),e.current.off("mouseout",c),e.current.off("mousedown",v),e.current.off("mouseup",y),e.current.off("mouseupoutside",_),e.current.removeListener("dblclick",b))}),[]),Zt.jsx(gy.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:m,transformcommit:E})};let id;function sd(){return id=document.body,id}function wr(e,t,r){let n;return _t.useEffect(()=>{n=n||sd();const i=a=>{const l=a.detail;t(l)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function Ea(e,t){const r=sd(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function N1(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const mi=Tt.createContext({}),qe={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE"},P1=({children:e})=>{const[t,r]=_t.useState(!1),n=_t.useRef(),i=_t.useRef(),a=_t.useRef(.001);_t.useLayoutEffect(()=>(i.current=Xe.context(()=>{n.current&&n.current.progress(0).kill(),n.current=Xe.timeline({paused:!0,defaults:{duration:0}})}),()=>i.current.revert()),[]);const l=_t.useCallback(()=>{let b=n.current.time();a.current=b},[]);_t.useEffect(()=>{const _=n.current;_.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){_.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onPause",function(){l()}).eventCallback("onResume",function(){l()}).eventCallback("onComplete",function(){_.pause(),_.revert(),Ea(qe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),l()})},[]);const u=_t.useCallback(()=>{n.current.revert()},[]),f=_t.useCallback(()=>{n.current.restart()},[]),h=_t.useCallback(()=>{const _=n.current;_.repeat(1),_.restart()},[]),p=_t.useCallback(_=>{n.current.seek(_)},[]),d=_t.useCallback(()=>{n.current.seek(4)},[]),c=_t.useCallback(()=>{const _=n.current;return _?_.totalDuration():0},[]),v=()=>{n.current.pause(),Ea(qe.PAUSE)},y=()=>{n.current.resume(),Ea(qe.RESUME)};return wr(qe.SEEK_START,()=>{r(!0)}),wr(qe.SCRUBBER_PLAY,()=>{y()}),wr(qe.SCRUBBER_PAUSE,()=>{v()}),wr(qe.SCRUBBER_SEEK,_=>{p(_)}),wr(qe.SEEK_END,()=>{r(!1)}),wr(qe.SCRUBBER_PROGRESS_UPDATE,_=>{}),Zt.jsx(mi.Provider,{value:{gsapCtx:i,tl:n,handlePlay:y,handlePause:v,handleReset:u,handleSeek:p,handleSeekTest:d,handleRestart:f,handleRepeat:h,playerTimeRef:a,isDragging:t,getTimelineDuration:c},children:e})},M1=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var k1=Object.prototype;function L1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||k1;return e===r}var ad=L1;function F1(e,t){return function(r){return e(t(r))}}var B1=F1,U1=B1,D1=U1(Object.keys,Object),$1=D1,G1=ad,q1=$1,j1=Object.prototype,H1=j1.hasOwnProperty;function z1(e){if(!G1(e))return q1(e);var t=[];for(var r in Object(e))H1.call(e,r)&&r!="constructor"&&t.push(r);return t}var od=z1,V1=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,ld=V1,W1=ld,X1=typeof self=="object"&&self&&self.Object===Object&&self,K1=W1||X1||Function("return this")(),Br=K1,Y1=Br,Z1=Y1.Symbol,wa=Z1,ud=wa,fd=Object.prototype,J1=fd.hasOwnProperty,Q1=fd.toString,fs=ud?ud.toStringTag:void 0;function tb(e){var t=J1.call(e,fs),r=e[fs];try{e[fs]=void 0;var n=!0}catch{}var i=Q1.call(e);return n&&(t?e[fs]=r:delete e[fs]),i}var eb=tb,rb=Object.prototype,nb=rb.toString;function ib(e){return nb.call(e)}var sb=ib,cd=wa,ab=eb,ob=sb,lb="[object Null]",ub="[object Undefined]",hd=cd?cd.toStringTag:void 0;function fb(e){return e==null?e===void 0?ub:lb:hd&&hd in Object(e)?ab(e):ob(e)}var cs=fb;function cb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hs=cb,hb=cs,db=hs,pb="[object AsyncFunction]",vb="[object Function]",gb="[object GeneratorFunction]",yb="[object Proxy]";function mb(e){if(!db(e))return!1;var t=hb(e);return t==vb||t==gb||t==pb||t==yb}var dd=mb,_b=Br,bb=_b["__core-js_shared__"],xb=bb,Zl=xb,pd=function(){var e=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Eb(e){return!!pd&&pd in e}var wb=Eb,Tb=Function.prototype,Ab=Tb.toString;function Sb(e){if(e!=null){try{return Ab.call(e)}catch{}try{return e+""}catch{}}return""}var vd=Sb,Ob=dd,Ib=wb,Rb=hs,Cb=vd,Nb=/[\\^$.*+?()[\]{}|]/g,Pb=/^\[object .+?Constructor\]$/,Mb=Function.prototype,kb=Object.prototype,Lb=Mb.toString,Fb=kb.hasOwnProperty,Bb=RegExp("^"+Lb.call(Fb).replace(Nb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ub(e){if(!Rb(e)||Ib(e))return!1;var t=Ob(e)?Bb:Pb;return t.test(Cb(e))}var Db=Ub;function $b(e,t){return e==null?void 0:e[t]}var Gb=$b,qb=Db,jb=Gb;function Hb(e,t){var r=jb(e,t);return qb(r)?r:void 0}var _i=Hb,zb=_i,Vb=Br,Wb=zb(Vb,"DataView"),Xb=Wb,Kb=_i,Yb=Br,Zb=Kb(Yb,"Map"),Jl=Zb,Jb=_i,Qb=Br,tx=Jb(Qb,"Promise"),ex=tx,rx=_i,nx=Br,ix=rx(nx,"Set"),sx=ix,ax=_i,ox=Br,lx=ax(ox,"WeakMap"),ux=lx,Ql=Xb,tu=Jl,eu=ex,ru=sx,nu=ux,gd=cs,bi=vd,yd="[object Map]",fx="[object Object]",md="[object Promise]",_d="[object Set]",bd="[object WeakMap]",xd="[object DataView]",cx=bi(Ql),hx=bi(tu),dx=bi(eu),px=bi(ru),vx=bi(nu),Un=gd;(Ql&&Un(new Ql(new ArrayBuffer(1)))!=xd||tu&&Un(new tu)!=yd||eu&&Un(eu.resolve())!=md||ru&&Un(new ru)!=_d||nu&&Un(new nu)!=bd)&&(Un=function(e){var t=gd(e),r=t==fx?e.constructor:void 0,n=r?bi(r):"";if(n)switch(n){case cx:return xd;case hx:return yd;case dx:return md;case px:return _d;case vx:return bd}return t});var Ed=Un;function gx(e){return e!=null&&typeof e=="object"}var ds=gx,yx=cs,mx=ds,_x="[object Arguments]";function bx(e){return mx(e)&&yx(e)==_x}var xx=bx,wd=xx,Ex=ds,Td=Object.prototype,wx=Td.hasOwnProperty,Tx=Td.propertyIsEnumerable,Ax=wd(function(){return arguments}())?wd:function(e){return Ex(e)&&wx.call(e,"callee")&&!Tx.call(e,"callee")},iu=Ax,Sx=Array.isArray,Ur=Sx,Ox=9007199254740991;function Ix(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ox}var su=Ix,Rx=dd,Cx=su;function Nx(e){return e!=null&&Cx(e.length)&&!Rx(e)}var Ta=Nx,Aa={exports:{}};function Px(){return!1}var Mx=Px;Aa.exports,function(e,t){var r=Br,n=Mx,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===i,u=l?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(Aa,Aa.exports);var au=Aa.exports,kx=cs,Lx=su,Fx=ds,Bx="[object Arguments]",Ux="[object Array]",Dx="[object Boolean]",$x="[object Date]",Gx="[object Error]",qx="[object Function]",jx="[object Map]",Hx="[object Number]",zx="[object Object]",Vx="[object RegExp]",Wx="[object Set]",Xx="[object String]",Kx="[object WeakMap]",Yx="[object ArrayBuffer]",Zx="[object DataView]",Jx="[object Float32Array]",Qx="[object Float64Array]",tE="[object Int8Array]",eE="[object Int16Array]",rE="[object Int32Array]",nE="[object Uint8Array]",iE="[object Uint8ClampedArray]",sE="[object Uint16Array]",aE="[object Uint32Array]",se={};se[Jx]=se[Qx]=se[tE]=se[eE]=se[rE]=se[nE]=se[iE]=se[sE]=se[aE]=!0,se[Bx]=se[Ux]=se[Yx]=se[Dx]=se[Zx]=se[$x]=se[Gx]=se[qx]=se[jx]=se[Hx]=se[zx]=se[Vx]=se[Wx]=se[Xx]=se[Kx]=!1;function oE(e){return Fx(e)&&Lx(e.length)&&!!se[kx(e)]}var lE=oE;function uE(e){return function(t){return e(t)}}var fE=uE,Sa={exports:{}};Sa.exports,function(e,t){var r=ld,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,l=a&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(Sa,Sa.exports);var cE=Sa.exports,hE=lE,dE=fE,Ad=cE,Sd=Ad&&Ad.isTypedArray,pE=Sd?dE(Sd):hE,ou=pE,vE=od,gE=Ed,yE=iu,mE=Ur,_E=Ta,bE=au,xE=ad,EE=ou,wE="[object Map]",TE="[object Set]",AE=Object.prototype,SE=AE.hasOwnProperty;function OE(e){if(e==null)return!0;if(_E(e)&&(mE(e)||typeof e=="string"||typeof e.splice=="function"||bE(e)||EE(e)||yE(e)))return!e.length;var t=gE(e);if(t==wE||t==TE)return!e.size;if(xE(e))return!vE(e).length;for(var r in e)if(SE.call(e,r))return!1;return!0}var IE=OE;const xi=Tn(IE),RE=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ei=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState(!1),[i,a]=_t.useState(!1),[l,u]=_t.useState(!1),[f,h]=_t.useState(e.initialAlpha),p=_t.useRef(null),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(null),y=_t.useRef(e.initialAlpha),{tl:_}=_t.useContext(mi),{uniqueId:b,startAt:m,endAt:E,initialAlpha:w,transformation:{x,y:A,width:P,height:S,scale:O=[1,1],rotation:L=0,colorCorrection:R,animation:I,effect:M},applyTransformer:C,disabled:F,ignoreTlForVideo:j,pointerdown:X,pointerout:V,pointerover:st}=e,{contrast:Y=1,saturation:U=1,brightness:N=1,alpha:D=1,blurRadius:q=0}=R||{},Z={...N>1&&{brightness:N},...Y>1&&{contrast:Y},...U>1&&{saturation:U},...D!==0&&{alpha:D}};wr(qe.COMPLETE,()=>{p.current&&(y.current=w,h(w))}),Tt.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>l}),[i,l]),Tt.useEffect(()=>{p.current&&n(!0)},[]);const K=()=>{console.log("gsapOnAlphaComplete complete")};Tt.useEffect(()=>{let nt=Xe.context(()=>{});if(p.current&&_.current){const ht={alpha:1,duration:Number(E)-Number(m)},vt=M1(I||"None");nt=Xe.context(()=>{var mt,xt;_.current.to(p.current,{alpha:1,duration:.1},m).to(p.current,{alpha:0,duration:.1,onComplete:K},Number(E)-.09),j||_.current.from(p.current,{...ht},m),xi(vt.from)?xi(vt.to)?xi(vt.fromTo)||_.current.fromTo(p.current,(mt=vt.fromTo)==null?void 0:mt.from,(xt=vt.fromTo)==null?void 0:xt.to,m):_.current.to(p.current,{...vt.to},m):_.current.from(p.current,{...vt.from},m)})}return()=>nt.revert()},[I,m,E,j]);const G=Tt.useCallback(()=>{a(!0)},[]),z=Tt.useCallback(nt=>{console.log("changeEnd",nt),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(nt)),a(!1)},[]),tt=pe.withFilters(pe.Container,{...q>0&&{blur:wn.filters.BlurFilter},...!xi(Z)&&{adjust:R1},matrix:wn.filters.ColorMatrixFilter}),et=(R==null?void 0:R.enabled)||M&&M!==Bn.Normal;return console.log("container alpha update",y.current,f),Zt.jsxs(pe.Container,{ref:d,children:[Zt.jsx(pe.Container,{ref:p,alpha:y.current||f,position:[x,A],pivot:[x,A],width:P,height:S,scale:O,rotation:L,...!F&&!i&&{interactive:!0,buttonMode:!0,pointerdown:X,pointerover:st,pointerout:V},children:Zt.jsxs(pe.Container,{children:[et&&Zt.jsx(tt,{scale:1,blur:{blur:q,quality:4},adjust:Z,apply:({matrix:nt})=>{M===Bn.BlackAndWhite?nt.desaturate():M===Bn.Sepia?nt.sepia():M===Bn.RetroVintage||M===Bn.NightVision?nt.negative():M===Bn.Normal&&nt.reset()},matrix:{enabled:!0,matrix:RE},children:Zt.jsx(pe.Container,{ref:c,children:e.children})}),!et&&Zt.jsx(pe.Container,{ref:c,children:e.children})]})}),C&&Zt.jsx(C1,{pixiTransformerRef:v,imageRef:p,isMounted:r,transformCommit:z,transformChange:G,mouseoverEvent:u,uniqueId:b})]})});Ei.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};const CE=Tt.forwardRef((e,t)=>{const r=_t.useRef(null),n=_t.useRef(null),{src:i,transformation:{x:a,y:l,width:u,height:f,anchor:h},pointerdown:p,pointerup:d}=e;return Zt.jsx(Ei,{...e,ref:t,children:Zt.jsx(pe.Container,{ref:n,children:Zt.jsx(pe.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:a,y:l,interactive:!0,pointerdown:p,pointerup:d})})})}),Oa={build(e){const t=e.points;let r,n,i,a,l,u;if(e.type===Re.CIRC){const y=e.shape;r=y.x,n=y.y,l=u=y.radius,i=a=0}else if(e.type===Re.ELIP){const y=e.shape;r=y.x,n=y.y,l=y.width,u=y.height,i=a=0}else{const y=e.shape,_=y.width/2,b=y.height/2;r=y.x+_,n=y.y+b,l=u=Math.max(0,Math.min(y.radius,Math.min(_,b))),i=_-l,a=b-u}if(!(l>=0&&u>=0&&i>=0&&a>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(l+u)),h=f*8+(i?4:0)+(a?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+a,t[2]=t[4]=r-i,t[5]=t[7]=n-a;return}let p=0,d=f*4+(i?2:0)+2,c=d,v=h;{const y=i+l,_=a,b=r+y,m=r-y,E=n+_;if(t[p++]=b,t[p++]=E,t[--d]=E,t[--d]=m,a){const w=n-_;t[c++]=m,t[c++]=w,t[--v]=w,t[--v]=b}}for(let y=1;y<f;y++){const _=Math.PI/2*(y/f),b=i+Math.cos(_)*l,m=a+Math.sin(_)*u,E=r+b,w=r-b,x=n+m,A=n-m;t[p++]=E,t[p++]=x,t[--d]=x,t[--d]=w,t[c++]=w,t[c++]=A,t[--v]=A,t[--v]=E}{const y=i,_=a+u,b=r+y,m=r-y,E=n+_,w=n-_;t[p++]=b,t[p++]=E,t[--v]=w,t[--v]=b,i&&(t[p++]=m,t[p++]=E,t[--v]=w,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let a=n.length/2;const l=a;let u,f;if(e.type!==Re.RREC){const p=e.shape;u=p.x,f=p.y}else{const p=e.shape;u=p.x+p.width/2,f=p.y+p.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),i.push(a++,l,a);i.push(l+1,l,a)}};function Od(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,a=e[r-2],l=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-a)*(f+l),a=u,l=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let a=i+i%2;a<r;a+=2){const l=r-a-2,u=r-a-1,f=a,h=a+1;[e[l],e[f]]=[e[f],e[l]],[e[u],e[h]]=[e[h],e[u]]}}}const Id={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,a=t.indices;if(r.length>=6){Od(r,!1);const l=[];for(let h=0;h<n.length;h++){const p=n[h];Od(p.points,!0),l.push(r.length/2),r=r.concat(p.points)}const u=jy(r,l,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)a.push(u[h]+f),a.push(u[h+1]+f),a.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},NE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,a=t.height,l=e.points;l.length=0,i>=0&&a>=0&&l.push(r,n,r+i,n,r+i,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},PE={build(e){Oa.build(e)},triangulate(e,t){Oa.triangulate(e,t)}};var Tr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Tr||{}),Dn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Dn||{});const wi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class Rd{static curveTo(t,r,n,i,a,l){const u=l[l.length-2],h=l[l.length-1]-r,p=u-t,d=i-r,c=n-t,v=Math.abs(h*c-p*d);if(v<1e-8||a===0)return(l[l.length-2]!==t||l[l.length-1]!==r)&&l.push(t,r),null;const y=h*h+p*p,_=d*d+c*c,b=h*d+p*c,m=a*Math.sqrt(y)/v,E=a*Math.sqrt(_)/v,w=m*b/y,x=E*b/_,A=m*c+E*p,P=m*d+E*h,S=p*(E+w),O=h*(E+w),L=c*(m+x),R=d*(m+x),I=Math.atan2(O-P,S-A),M=Math.atan2(R-P,L-A);return{cx:A+t,cy:P+r,radius:a,startAngle:I,endAngle:M,anticlockwise:p*d>c*h}}static arc(t,r,n,i,a,l,u,f,h){const p=u-l,d=wi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/ia)*40),c=p/(d*2),v=c*2,y=Math.cos(c),_=Math.sin(c),b=d-1,m=b%1/b;for(let E=0;E<=b;++E){const w=E+m*E,x=c+l+v*w,A=Math.cos(x),P=-Math.sin(x);h.push((y*A+_*P)*a+n,(y*-P+_*A)*a+i)}}}class ME{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class lu{static curveLength(t,r,n,i,a,l,u,f){let p=0,d=0,c=0,v=0,y=0,_=0,b=0,m=0,E=0,w=0,x=0,A=t,P=r;for(let S=1;S<=10;++S)d=S/10,c=d*d,v=c*d,y=1-d,_=y*y,b=_*y,m=b*t+3*_*d*n+3*y*c*a+v*u,E=b*r+3*_*d*i+3*y*c*l+v*f,w=A-m,x=P-E,A=m,P=E,p+=Math.sqrt(w*w+x*x);return p}static curveTo(t,r,n,i,a,l,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const p=wi._segmentsCount(lu.curveLength(f,h,t,r,n,i,a,l));let d=0,c=0,v=0,y=0,_=0;u.push(f,h);for(let b=1,m=0;b<=p;++b)m=b/p,d=1-m,c=d*d,v=c*d,y=m*m,_=y*m,u.push(v*f+3*c*m*t+3*d*y*n+_*a,v*h+3*c*m*r+3*d*y*i+_*l)}}function Cd(e,t,r,n,i,a,l,u){const f=e-r*i,h=t-n*i,p=e+r*a,d=t+n*a;let c,v;l?(c=n,v=-r):(c=-n,v=r);const y=f+c,_=h+v,b=p+c,m=d+v;return u.push(y,_,b,m),2}function $n(e,t,r,n,i,a,l,u){const f=r-e,h=n-t;let p=Math.atan2(f,h),d=Math.atan2(i-e,a-t);u&&p<d?p+=Math.PI*2:!u&&p>d&&(d+=Math.PI*2);let c=p;const v=d-p,y=Math.abs(v),_=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(_)/Math.PI>>0)+1,m=v/b;if(c+=m,u){l.push(e,t,r,n);for(let E=1,w=c;E<b;E++,w+=m)l.push(e,t,e+Math.sin(w)*_,t+Math.cos(w)*_);l.push(e,t,i,a)}else{l.push(r,n,e,t);for(let E=1,w=c;E<b;E++,w+=m)l.push(e+Math.sin(w)*_,t+Math.cos(w)*_,e,t);l.push(i,a,e,t)}return b*2}function kE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,l=new Oe(n[0],n[1]),u=new Oe(n[n.length-2],n[n.length-1]),f=r.type!==Re.POLY||r.closeStroke,h=Math.abs(l.x-u.x)<i&&Math.abs(l.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const V=(l.x+u.x)*.5,st=(u.y+l.y)*.5;n.unshift(V,st),n.push(V,st)}const p=t.points,d=n.length/2;let c=n.length;const v=p.length/2,y=a.width/2,_=y*y,b=a.miterLimit*a.miterLimit;let m=n[0],E=n[1],w=n[2],x=n[3],A=0,P=0,S=-(E-x),O=m-w,L=0,R=0,I=Math.sqrt(S*S+O*O);S/=I,O/=I,S*=y,O*=y;const M=a.alignment,C=(1-M)*2,F=M*2;f||(a.cap===Dn.ROUND?c+=$n(m-S*(C-F)*.5,E-O*(C-F)*.5,m-S*C,E-O*C,m+S*F,E+O*F,p,!0)+2:a.cap===Dn.SQUARE&&(c+=Cd(m,E,S,O,C,F,!0,p))),p.push(m-S*C,E-O*C,m+S*F,E+O*F);for(let V=1;V<d-1;++V){m=n[(V-1)*2],E=n[(V-1)*2+1],w=n[V*2],x=n[V*2+1],A=n[(V+1)*2],P=n[(V+1)*2+1],S=-(E-x),O=m-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,L=-(x-P),R=w-A,I=Math.sqrt(L*L+R*R),L/=I,R/=I,L*=y,R*=y;const st=w-m,Y=E-x,U=w-A,N=P-x,D=st*U+Y*N,q=Y*U-N*st,Z=q<0;if(Math.abs(q)<.001*Math.abs(D)){p.push(w-S*C,x-O*C,w+S*F,x+O*F),D>=0&&(a.join===Tr.ROUND?c+=$n(w,x,w-S*C,x-O*C,w-L*C,x-R*C,p,!1)+4:c+=2,p.push(w-L*F,x-R*F,w+L*C,x+R*C));continue}const K=(-S+m)*(-O+x)-(-S+w)*(-O+E),G=(-L+A)*(-R+x)-(-L+w)*(-R+P),z=(st*G-U*K)/q,tt=(N*K-Y*G)/q,et=(z-w)*(z-w)+(tt-x)*(tt-x),nt=w+(z-w)*C,ht=x+(tt-x)*C,vt=w-(z-w)*F,mt=x-(tt-x)*F,xt=Math.min(st*st+Y*Y,U*U+N*N),Rt=Z?C:F,ve=xt+Rt*Rt*_,Wt=et<=ve;let it=a.join;if(it===Tr.MITER&&et/_>b&&(it=Tr.BEVEL),Wt)switch(it){case Tr.MITER:{p.push(nt,ht,vt,mt);break}case Tr.BEVEL:{Z?p.push(nt,ht,w+S*F,x+O*F,nt,ht,w+L*F,x+R*F):p.push(w-S*C,x-O*C,vt,mt,w-L*C,x-R*C,vt,mt),c+=2;break}case Tr.ROUND:{Z?(p.push(nt,ht,w+S*F,x+O*F),c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+4,p.push(nt,ht,w+L*F,x+R*F)):(p.push(w-S*C,x-O*C,vt,mt),c+=$n(w,x,w-S*C,x-O*C,w-L*C,x-R*C,p,!1)+4,p.push(w-L*C,x-R*C,vt,mt));break}}else{switch(p.push(w-S*C,x-O*C,w+S*F,x+O*F),it){case Tr.MITER:{Z?p.push(vt,mt,vt,mt):p.push(nt,ht,nt,ht),c+=2;break}case Tr.ROUND:{Z?c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+2:c+=$n(w,x,w-S*C,x-O*C,w-L*C,x-R*C,p,!1)+2;break}}p.push(w-L*C,x-R*C,w+L*F,x+R*F),c+=2}}m=n[(d-2)*2],E=n[(d-2)*2+1],w=n[(d-1)*2],x=n[(d-1)*2+1],S=-(E-x),O=m-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,p.push(w-S*C,x-O*C,w+S*F,x+O*F),f||(a.cap===Dn.ROUND?c+=$n(w-S*(C-F)*.5,x-O*(C-F)*.5,w-S*C,x-O*C,w+S*F,x+O*F,p,!1)+2:a.cap===Dn.SQUARE&&(c+=Cd(w,x,S,O,C,F,!1,p)));const j=t.indices,X=wi.epsilon*wi.epsilon;for(let V=v;V<c+v-2;++V)m=p[V*2],E=p[V*2+1],w=p[(V+1)*2],x=p[(V+1)*2+1],A=p[(V+2)*2],P=p[(V+2)*2+1],!(Math.abs(m*(x-P)+w*(P-E)+A*(E-x))<X)&&j.push(V,V+1,V+2)}function LE(e,t){let r=0;const n=e.shape,i=e.points||n.points,a=n.type!==Re.POLY||n.closeStroke;if(i.length===0)return;const l=t.points,u=t.indices,f=i.length/2,h=l.length/2;let p=h;for(l.push(i[0],i[1]),r=1;r<f;r++)l.push(i[r*2],i[r*2+1]),u.push(p,p+1),p++;a&&u.push(p,h)}function Nd(e,t){e.lineStyle.native?LE(e,t):kE(e,t)}class uu{static curveLength(t,r,n,i,a,l){const u=t-2*n+a,f=r-2*i+l,h=2*n-2*t,p=2*i-2*r,d=4*(u*u+f*f),c=4*(u*h+f*p),v=h*h+p*p,y=2*Math.sqrt(d+c+v),_=Math.sqrt(d),b=2*d*_,m=2*Math.sqrt(v),E=c/_;return(b*y+_*c*(y-m)+(4*v*d-c*c)*Math.log((2*_+E+y)/(E+m)))/(4*b)}static curveTo(t,r,n,i,a){const l=a[a.length-2],u=a[a.length-1],f=wi._segmentsCount(uu.curveLength(l,u,t,r,n,i));let h=0,p=0;for(let d=1;d<=f;++d){const c=d/f;h=l+(t-l)*c,p=u+(r-u)*c,a.push(h+(t+(n-t)*c-h)*c,p+(r+(i-r)*c-p)*c)}}}const fu={[Re.POLY]:Id,[Re.CIRC]:Oa,[Re.ELIP]:Oa,[Re.RECT]:NE,[Re.RREC]:PE},Pd=[],Ia=[];class cu{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?ee.EMPTY:(t=t||new ee(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:a,d:l,tx:u,ty:f}=t,h=n*r.x+a*r.y+u,p=i*r.x+l*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,a=this.maxY,l=t[0],u=t[1];r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[2],u=t[3],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[4],u=t[5],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[6],u=t[7],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,this.minX=r,this.minY=n,this.maxX=i,this.maxY=a}addFrame(t,r,n,i,a){this.addFrameMatrix(t.worldTransform,r,n,i,a)}addFrameMatrix(t,r,n,i,a){const l=t.a,u=t.b,f=t.c,h=t.d,p=t.tx,d=t.ty;let c=this.minX,v=this.minY,y=this.maxX,_=this.maxY,b=l*r+f*n+p,m=u*r+h*n+d;c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=l*i+f*n+p,m=u*i+h*n+d,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=l*r+f*a+p,m=u*r+h*a+d,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=l*i+f*a+p,m=u*i+h*a+d,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,this.minX=c,this.minY=v,this.maxX=y,this.maxY=_}addVertexData(t,r,n){let i=this.minX,a=this.minY,l=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],p=t[f+1];i=h<i?h:i,a=p<a?p:a,l=h>l?h:l,u=p>u?p:u}this.minX=i,this.minY=a,this.maxX=l,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,a=0,l=a){const u=t.a,f=t.b,h=t.c,p=t.d,d=t.tx,c=t.ty;let v=this.minX,y=this.minY,_=this.maxX,b=this.maxY;for(let m=n;m<i;m+=2){const E=r[m],w=r[m+1],x=u*E+h*w+d,A=p*w+f*E+c;v=Math.min(v,x-a),_=Math.max(_,x+a),y=Math.min(y,A-l),b=Math.max(b,A+l)}this.minX=v,this.minY=y,this.maxX=_,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,a=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,l=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l:p}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,l=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,a,l){t-=a,r-=l,n+=a,i+=l,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ti extends Bs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Ul,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new cu,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ti.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new ee),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ee),t=this._localBoundsRect),this._localBounds||(this._localBounds=new cu);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const l=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-a,l}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,a=0,l=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=a,this.skew.x=l,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new FE),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*w_}set angle(t){this.transform.rotation=t*T_}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class FE extends Ti{constructor(){super(...arguments),this.sortDirty=null}}Ti.prototype.displayObjectUpdateTransform=Ti.prototype.updateTransform;const BE=new Fe;function UE(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const hu=class extends Ti{constructor(){super(),this.children=[],this.sortableChildren=hu.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);ta(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,ta(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,ta(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let a;if(i>0&&i<=n){a=this.children.splice(r,i);for(let l=0;l<a.length;++l)a[l].parent=null,a[l].transform&&(a[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<a.length;++l)a[l].emit("removed",this),this.emit("childRemoved",a[l],this,l);return a}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(UE),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==hu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=BE.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,l=this.children.length;a<l;++a){const u=this.children[a],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,a,l;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==xe.NONE));if(n&&e.batch.flush(),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((l=this._enabledFilters)!=null&&l.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Ai=hu;Ai.defaultSortableChildren=!1,Ai.prototype.containerUpdateTransform=Ai.prototype.updateTransform,Object.defineProperties(jt,{SORTABLE_CHILDREN:{get(){return Ai.defaultSortableChildren},set(e){Jt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ai.defaultSortableChildren=e}}});class Ra{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Ra(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Si=new Oe,Md=class extends ph{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new cu,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Ia.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),Pd.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Ra(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ra(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Si):Si.copyFrom(e),n.shape.contains(Si.x,Si.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(Si.x,Si.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,p=f.lineStyle;fu[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||p.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:p;if(!v.visible)continue;const y=v.texture.baseTexture,_=this.indices.length,b=this.points.length/2;y.wrapMode=Vi.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-b;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(_,b),r=null),r||(r=Pd.pop()||new ME,r.begin(v,_,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,m,v.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const l=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const a=n.start+i;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Md.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++zt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Ia.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Ia.pop();n||(n=new kl,n.texArray=new $l),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,a=null,l=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const d=this.batches[p],c=8,v=d.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,a=null,i=c,e++),a!==y&&(a=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Ia.pop(),n||(n=new kl,n.texArray=new $l),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Vi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=d.size,h+=d.size,l=y._batchLocation,this.addColors(t,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,l,d.attribSize,d.attribStart)}zt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),a=new Float32Array(i),l=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)a[u++]=e[f*2],a[u++]=e[f*2+1],a[u++]=t[f*2],a[u++]=t[f*2+1],l[u++]=r[f],a[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?Id.triangulate(e,this):fu[e.type].triangulate(e,this)}processLine(e){Nd(e,this);for(let t=0;t<e.holes.length;t++)Nd(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];fu[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const a=Ge.shared.setValue(t).toLittleEndianNumber(),l=Ge.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=l}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,a=null){let l=0;const u=t.length,f=r.frame;for(;l<i;){let p=e[(n+l)*2],d=e[(n+l)*2+1];if(a){const c=a.a*p+a.c*d+a.tx;d=a.b*p+a.d*d+a.ty,p=c}l++,t.push(p/f.width,d/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,a=1e-6,l=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let p=u.x/u.width,d=u.y/u.height,c=Math.floor(e[r]+a),v=Math.floor(e[r+1]+a);for(let y=r+2;y<l;y+=2)c=Math.min(c,Math.floor(e[y]+a)),v=Math.min(v,Math.floor(e[y+1]+a));p-=c,d-=v;for(let y=r;y<l;y+=2)e[y]=(e[y]+p)*f,e[y+1]=(e[y+1]+d)*h}};let kd=Md;kd.BATCHABLE_SIZE=100;class Ca{constructor(){this.color=16777215,this.alpha=1,this.texture=Vt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Ca;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Vt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class du extends Ca{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Dn.BUTT,this.join=Tr.MITER,this.miterLimit=10}clone(){const t=new du;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const pu={},Na=class extends Ai{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Ca,this._lineStyle=new du,this._matrix=null,this._holeMode=!1,this.state=ra.for2d(),this._geometry=e||new kd,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ge(16777215),this.blendMode=It.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Na(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Vt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Dn.BUTT,join:Tr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new is,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new is,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),uu.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,a){return this._initCurve(),lu.curveTo(e,t,r,n,i,a,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const a=this.currentPath.points,l=Rd.curveTo(e,t,r,n,i,a);if(l){const{cx:u,cy:f,radius:h,startAngle:p,endAngle:d,anticlockwise:c}=l;this.arc(u,f,h,p,d,c)}return this}arc(e,t,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ia:a&&n<=i&&(n+=ia),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const d=Math.abs(p[p.length-2]-u),c=Math.abs(p[p.length-1]-f);d<h&&c<h||p.push(u,f)}else this.moveTo(u,f),p=this.currentPath.points;return Rd.arc(u,f,e,t,r,n,i,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Vt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ge.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Vt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ee(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Fl(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new Ll(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new A_(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new is(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Re.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],a=i.style.color,l=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:l,blendMode:t,indices:f,uvs:u,_batchRGB:Ge.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,a=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Ge.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let l=0,u=a.length;l<u;l++)this._renderDrawCallDirect(e,r.drawCalls[l])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:a}=t,l=r.count;for(let u=0;u<l;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!pu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Fe,default:mr.from({uSamplers:i},!0)},l=e.plugins[r]._shader.program;pu[r]=new as(l,a)}t=pu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Na._TEMP_POINT),this._geometry.containsPoint(Na._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Ge.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,a=t.d,l=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let p=0;for(let d=0;d<f.length;d+=2){const c=f[d],v=f[d+1];h[p++]=r*c+i*v+l,h[p++]=a*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let vu=Na;vu.curves=wi,vu._TEMP_POINT=new Oe;var DE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gu={},$E={get exports(){return gu},set exports(e){gu=e}};/*!
|
|
540
540
|
* d-path-parser - v1.0.0
|
|
541
541
|
* by Massimo Artizzu (MaxArt2501)
|
|
542
542
|
*
|
|
@@ -544,20 +544,20 @@ void main(void)
|
|
|
544
544
|
*
|
|
545
545
|
* Licensed under the MIT License
|
|
546
546
|
* See LICENSE for details
|
|
547
|
-
*/(function(e,t){(function(r,n){e.exports=n()})(DE,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(m){return+v("number",m)},"coordinate pair":function(m){var _=v("number",m);if(_===null&&!m)return null;v("comma");var b=v("number",!0);return{x:+_,y:+b}},"arc definition":function(m){var _=a["coordinate pair"](m);if(!_&&!m)return null;v("comma");var b=+v("number",!0);v("comma",!0);var E=!!+v("flag",!0);v("comma");var w=!!+v("flag",!0);v("comma");var x=a["coordinate pair"](!0);return{radii:_,rotation:b,large:E,clockwise:w,end:x}}},l=0,u=[];l<n.length;){var f=v("command"),h=f.toUpperCase(),p=f!==h,d;switch(h){case"M":d=y("coordinate pair").map(function(m,_){return _===1&&(f=p?"l":"L"),c({end:m})});break;case"L":case"T":d=y("coordinate pair").map(function(m){return c({end:m})});break;case"C":if(d=y("coordinate pair"),d.length%3)throw Error("Expected coordinate pair triplet at position "+l);d=d.reduce(function(m,_,b){var E=b%3;if(!E)m.push(c({cp1:_}));else{var w=m[m.length-1];w[E===1?"cp2":"end"]=_}return m},[]);break;case"Q":case"S":if(d=y("coordinate pair"),d.length&1)throw Error("Expected coordinate pair couple at position "+l);d=d.reduce(function(m,_,b){var E=b&1;if(!E)m.push(c({cp:_}));else{var w=m[m.length-1];w.end=_}return m},[]);break;case"H":case"V":d=y("number").map(function(m){return c({value:m})});break;case"A":d=y("arc definition").map(c);break;case"Z":d=[{code:"Z"}];break}u.push.apply(u,d)}return u;function c(m){return m.code=f,m.relative=p,m}function v(m,_){i[m].lastIndex=l;var b=i[m].exec(n);if(!b||b.index!==l){if(!_)return null;throw Error("Expected "+m+" at position "+l)}return l=i[m].lastIndex,b[1]}function y(m){for(var _=[],b,E=!0;b=a[m](E);)_.push(b),E=!!v("comma");return _}}})})($E);const GE=/^\s+/,qE=/\s+$/;function wt(e,t){if(e=e||"",t=t||{},e instanceof wt)return e;if(!(this instanceof wt))return new wt(e,t);var r=jE(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}wt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,a,l;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(e){return this._a=$d(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Fd(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Fd(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Ld(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Ld(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Bd(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return WE(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(le(this._r,255)*100)+"%",g:Math.round(le(this._g,255)*100)+"%",b:Math.round(le(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(le(this._r,255)*100)+"%, "+Math.round(le(this._g,255)*100)+"%, "+Math.round(le(this._b,255)*100)+"%)":"rgba("+Math.round(le(this._r,255)*100)+"%, "+Math.round(le(this._g,255)*100)+"%, "+Math.round(le(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:sw[Bd(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Ud(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=wt(e);r="#"+Ud(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return wt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(ZE,arguments)},brighten:function(){return this._applyModification(JE,arguments)},darken:function(){return this._applyModification(QE,arguments)},desaturate:function(){return this._applyModification(XE,arguments)},saturate:function(){return this._applyModification(KE,arguments)},greyscale:function(){return this._applyModification(YE,arguments)},spin:function(){return this._applyModification(tw,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(nw,arguments)},complement:function(){return this._applyCombination(ew,arguments)},monochromatic:function(){return this._applyCombination(iw,arguments)},splitcomplement:function(){return this._applyCombination(rw,arguments)},triad:function(){return this._applyCombination(Dd,[3])},tetrad:function(){return this._applyCombination(Dd,[4])}},wt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=ps(e[n]));e=r}return wt(e,t)};function jE(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,l=!1,u=!1;return typeof e=="string"&&(e=uw(e)),typeof e=="object"&&(Xr(e.r)&&Xr(e.g)&&Xr(e.b)?(t=HE(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Xr(e.h)&&Xr(e.s)&&Xr(e.v)?(n=ps(e.s),i=ps(e.v),t=VE(e.h,n,i),l=!0,u="hsv"):Xr(e.h)&&Xr(e.s)&&Xr(e.l)&&(n=ps(e.s),a=ps(e.l),t=zE(e.h,n,a),l=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=$d(r),{ok:l,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function HE(e,t,r){return{r:le(e,255)*255,g:le(t,255)*255,b:le(r,255)*255}}function Ld(e,t,r){e=le(e,255),t=le(t,255),r=le(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a,l,u=(n+i)/2;if(n==i)a=l=0;else{var f=n-i;switch(l=u>.5?f/(2-n-i):f/(n+i),n){case e:a=(t-r)/f+(t<r?6:0);break;case t:a=(r-e)/f+2;break;case r:a=(e-t)/f+4;break}a/=6}return{h:a,s:l,l:u}}function zE(e,t,r){var n,i,a;e=le(e,360),t=le(t,100),r=le(r,100);function l(h,p,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?h+(p-h)*6*d:d<1/2?p:d<2/3?h+(p-h)*(2/3-d)*6:h}if(t===0)n=i=a=r;else{var u=r<.5?r*(1+t):r+t-r*t,f=2*r-u;n=l(f,u,e+1/3),i=l(f,u,e),a=l(f,u,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function Fd(e,t,r){e=le(e,255),t=le(t,255),r=le(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a,l,u=n,f=n-i;if(l=n===0?0:f/n,n==i)a=0;else{switch(n){case e:a=(t-r)/f+(t<r?6:0);break;case t:a=(r-e)/f+2;break;case r:a=(e-t)/f+4;break}a/=6}return{h:a,s:l,v:u}}function VE(e,t,r){e=le(e,360)*6,t=le(t,100),r=le(r,100);var n=Math.floor(e),i=e-n,a=r*(1-t),l=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,l,a,a,u,r][f],p=[u,r,r,l,a,a][f],d=[a,a,u,r,r,l][f];return{r:h*255,g:p*255,b:d*255}}function Bd(e,t,r,n){var i=[Tr(Math.round(e).toString(16)),Tr(Math.round(t).toString(16)),Tr(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function WE(e,t,r,n,i){var a=[Tr(Math.round(e).toString(16)),Tr(Math.round(t).toString(16)),Tr(Math.round(r).toString(16)),Tr(Gd(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Ud(e,t,r,n){var i=[Tr(Gd(n)),Tr(Math.round(e).toString(16)),Tr(Math.round(t).toString(16)),Tr(Math.round(r).toString(16))];return i.join("")}wt.equals=function(e,t){return!e||!t?!1:wt(e).toRgbString()==wt(t).toRgbString()},wt.random=function(){return wt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function XE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.s-=t/100,r.s=Pa(r.s),wt(r)}function KE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.s+=t/100,r.s=Pa(r.s),wt(r)}function YE(e){return wt(e).desaturate(100)}function ZE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.l+=t/100,r.l=Pa(r.l),wt(r)}function JE(e,t){t=t===0?0:t||10;var r=wt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),wt(r)}function QE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.l-=t/100,r.l=Pa(r.l),wt(r)}function tw(e,t){var r=wt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,wt(r)}function ew(e){var t=wt(e).toHsl();return t.h=(t.h+180)%360,wt(t)}function Dd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=wt(e).toHsl(),n=[wt(e)],i=360/t,a=1;a<t;a++)n.push(wt({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function rw(e){var t=wt(e).toHsl(),r=t.h;return[wt(e),wt({h:(r+72)%360,s:t.s,l:t.l}),wt({h:(r+216)%360,s:t.s,l:t.l})]}function nw(e,t,r){t=t||6,r=r||30;var n=wt(e).toHsl(),i=360/r,a=[wt(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(wt(n));return a}function iw(e,t){t=t||6;for(var r=wt(e).toHsv(),n=r.h,i=r.s,a=r.v,l=[],u=1/t;t--;)l.push(wt({h:n,s:i,v:a})),a=(a+u)%1;return l}wt.mix=function(e,t,r){r=r===0?0:r||50;var n=wt(e).toRgb(),i=wt(t).toRgb(),a=r/100,l={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return wt(l)},wt.readability=function(e,t){var r=wt(e),n=wt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},wt.isReadable=function(e,t,r){var n=wt.readability(e,t),i,a;switch(a=!1,i=fw(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},wt.mostReadable=function(e,t,r){var n=null,i=0,a,l,u,f;r=r||{},l=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)a=wt.readability(e,t[h]),a>i&&(i=a,n=wt(t[h]));return wt.isReadable(e,n,{level:u,size:f})||!l?n:(r.includeFallbackColors=!1,wt.mostReadable(e,["#fff","#000"],r))};var yu=wt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},sw=wt.hexNames=aw(yu);function aw(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function $d(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function le(e,t){ow(e)&&(e="100%");var r=lw(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Pa(e){return Math.min(1,Math.max(0,e))}function Je(e){return parseInt(e,16)}function ow(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function lw(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Tr(e){return e.length==1?"0"+e:""+e}function ps(e){return e<=1&&(e=e*100+"%"),e}function Gd(e){return Math.round(parseFloat(e)*255).toString(16)}function qd(e){return Je(e)/255}var Ar=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Xr(e){return!!Ar.CSS_UNIT.exec(e)}function uw(e){e=e.replace(GE,"").replace(qE,"").toLowerCase();var t=!1;if(yu[e])e=yu[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Ar.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Ar.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Ar.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Ar.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Ar.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Ar.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Ar.hex8.exec(e))?{r:Je(r[1]),g:Je(r[2]),b:Je(r[3]),a:qd(r[4]),format:t?"name":"hex8"}:(r=Ar.hex6.exec(e))?{r:Je(r[1]),g:Je(r[2]),b:Je(r[3]),format:t?"name":"hex"}:(r=Ar.hex4.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),a:qd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Ar.hex3.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function fw(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var cw=function(){function e(t,r){var n=[],i=!0,a=!1,l=void 0;try{for(var u=t[Symbol.iterator](),f;!(i=(f=u.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(h){a=!0,l=h}finally{try{!i&&u.return&&u.return()}finally{if(a)throw l}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),vs=Math.PI*2,mu=function(t,r,n,i,a,l,u){var f=t.x,h=t.y;f*=r,h*=n;var p=i*f-a*h,d=a*f+i*h;return{x:p+l,y:d+u}},hw=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),l=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:l+u*n,y:u-l*n},{x:l,y:u}]},jd=function(t,r,n,i){var a=t*i-r*n<0?-1:1,l=t*n+r*i;return l>1&&(l=1),l<-1&&(l=-1),a*Math.acos(l)},dw=function(t,r,n,i,a,l,u,f,h,p,d,c){var v=Math.pow(a,2),y=Math.pow(l,2),m=Math.pow(d,2),_=Math.pow(c,2),b=v*y-v*_-y*m;b<0&&(b=0),b/=v*_+y*m,b=Math.sqrt(b)*(u===f?-1:1);var E=b*a/l*c,w=b*-l/a*d,x=p*E-h*w+(t+n)/2,A=h*E+p*w+(r+i)/2,P=(d-E)/a,S=(c-w)/l,O=(-d-E)/a,L=(-c-w)/l,R=jd(1,0,P,S),I=jd(P,S,O,L);return f===0&&I>0&&(I-=vs),f===1&&I<0&&(I+=vs),[x,A,R,I]},Hd=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,l=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,p=t.largeArcFlag,d=p===void 0?0:p,c=t.sweepFlag,v=c===void 0?0:c,y=[];if(l===0||u===0)return[];var m=Math.sin(h*vs/360),_=Math.cos(h*vs/360),b=_*(r-i)/2+m*(n-a)/2,E=-m*(r-i)/2+_*(n-a)/2;if(b===0&&E===0)return[];l=Math.abs(l),u=Math.abs(u);var w=Math.pow(b,2)/Math.pow(l,2)+Math.pow(E,2)/Math.pow(u,2);w>1&&(l*=Math.sqrt(w),u*=Math.sqrt(w));var x=dw(r,n,i,a,l,u,d,v,m,_,b,E),A=cw(x,4),P=A[0],S=A[1],O=A[2],L=A[3],R=Math.abs(L)/(vs/4);Math.abs(1-R)<1e-7&&(R=1);var I=Math.max(Math.ceil(R),1);L/=I;for(var M=0;M<I;M++)y.push(hw(O,L)),O+=L;return y.map(function(C){var F=mu(C[0],l,u,_,m,P,S),j=F.x,X=F.y,V=mu(C[1],l,u,_,m,P,S),it=V.x,Y=V.y,U=mu(C[2],l,u,_,m,P,S),N=U.x,D=U.y;return{x1:j,y1:X,x2:it,y2:Y,x:N,y:D}})};class pw extends vu{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=wt(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const a=parseFloat(t.getAttribute(n)),l=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,p=0;u!==null&&(h=parseFloat(u)),f!==null&&(p=parseFloat(f)),i?this.drawEllipse(h,p,a,l):this.drawCircle(h,p,a)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),a=parseFloat(t.getAttribute("height")),l=parseFloat(t.getAttribute("rx"));l?this.drawRoundedRect(r,n,i,a,l):this.drawRect(r,n,i,a)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[l,u]=a.split(":");if(l){const f=this._convertStyleName(l);i[f]||(i[f]=u.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:a,strokeOpacity:l,strokeWidth:u,cap:f,join:h,miterLimit:p}=this._svgStyle(t),c=u!==null?parseFloat(u):a!==null?1:0,v=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:a===null&&u===null&&r?this.line.width:c,alpha:l===null?this.line.alpha:parseFloat(l),color:a===null&&r?this.line.color:v,cap:f===null&&r?this.line.cap:f,join:h===null&&r?this.line.join:h,miterLimit:p===null&&r?this.line.miterLimit:parseFloat(p)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const a=gu(r.trim());for(let l=0;l<a.length;l++){const u=a[l];switch(u.code){case"m":{this.moveTo(n+=u.end.x,i+=u.end.y);break}case"M":{this.moveTo(n=u.end.x,i=u.end.y);break}case"H":{this.lineTo(n=u.value,i);break}case"h":{this.lineTo(n+=u.value,i);break}case"V":{this.lineTo(n,i=u.value);break}case"v":{this.lineTo(n,i+=u.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=u.end.x,i=u.end.y);break}case"l":{this.lineTo(n+=u.end.x,i+=u.end.y);break}case"C":{this.bezierCurveTo(u.cp1.x,u.cp1.y,u.cp2.x,u.cp2.y,n=u.end.x,i=u.end.y);break}case"c":{const f=n,h=i;this.bezierCurveTo(f+u.cp1.x,h+u.cp1.y,f+u.cp2.x,h+u.cp2.y,n+=u.end.x,i+=u.end.y);break}case"s":case"q":{const f=n,h=i;this.quadraticCurveTo(f+u.cp.x,h+u.cp.y,n+=u.end.x,i+=u.end.y);break}case"S":case"Q":{this.quadraticCurveTo(u.cp.x,u.cp.y,n=u.end.x,i=u.end.y);break}case"a":{Hd({px:n,py:i,cx:n+=u.end.x,cy:i+=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,c,v));break}case"A":{Hd({px:n,py:i,cx:n=u.end.x,cy:i=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,c,v));break}default:{console.info("[PIXI.SVG] Draw command not supported:",u.code,u);break}}}}}var Ma={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},vw=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function gw(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&vw.indexOf(e)>=0}function yw(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function mw(e){return(e|32)===97}function Oi(e){return e>=48&&e<=57}function _w(e){return e>=48&&e<=57||e===43||e===45||e===46}function bw(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function ka(e){for(;e.index<e.max&&gw(e.path.charCodeAt(e.index));)e.index++}function xw(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function Ew(e){var t=e.index,r=t,n=e.max,i=!1,a=!1,l=!1,u=!1,f;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(f=e.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?e.path.charCodeAt(r):0),!Oi(f)&&f!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?e.path.charCodeAt(r):0,i&&r<n&&f&&Oi(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Oi(e.path.charCodeAt(r));)r++,a=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Oi(e.path.charCodeAt(r));)r++,l=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!a&&!l){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?e.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Oi(e.path.charCodeAt(r)))for(;r<n&&Oi(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function _u(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=Ma[r]&&(e.result.push([t].concat(n.splice(0,Ma[r]))),!!Ma[r]););}function ww(e){var t=e.max,r,n,i,a,l;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=mw(r),!yw(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(a=Ma[e.path[e.index].toLowerCase()],e.index++,ka(e),e.data=[],!a){_u(e);return}for(i=!1;;){for(l=a;l>0;l--){if(n&&(l===3||l===4)?xw(e):Ew(e),e.err.length){_u(e);return}e.data.push(e.param),ka(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,ka(e),i=!0)}if(!i&&(e.index>=e.max||!_w(e.path.charCodeAt(e.index))))break}_u(e)}var Tw=function(t){var r=new bw(t),n=r.max;for(ka(r);r.index<n&&!r.err.length;)ww(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function Aw(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Sr(){if(!(this instanceof Sr))return new Sr;this.queue=[],this.cache=null}Sr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},Sr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},Sr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},Sr.prototype.rotate=function(e,t,r){var n,i,a;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),a=Math.sin(n),this.queue.push([i,a,-a,i,0,0]),this.cache=null,this.translate(-t,-r)),this},Sr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},Sr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},Sr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=Aw(this.cache,this.queue[e]);return this.cache},Sr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var zd=Sr,Sw=zd,Ow={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Iw=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Rw=/[\s,]+/,Cw=function(t){var r=new Sw,n,i;return t.split(Iw).forEach(function(a){if(a.length){if(typeof Ow[a]<"u"){n=a;return}switch(i=a.split(Rw).map(function(l){return+l||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},gs=Math.PI*2;function Vd(e,t,r,n){var i=e*n-t*r<0?-1:1,a=e*r+t*n;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function Nw(e,t,r,n,i,a,l,u,f,h){var p=h*(e-r)/2+f*(t-n)/2,d=-f*(e-r)/2+h*(t-n)/2,c=l*l,v=u*u,y=p*p,m=d*d,_=c*v-c*m-v*y;_<0&&(_=0),_/=c*m+v*y,_=Math.sqrt(_)*(i===a?-1:1);var b=_*l/u*d,E=_*-u/l*p,w=h*b-f*E+(e+r)/2,x=f*b+h*E+(t+n)/2,A=(p-b)/l,P=(d-E)/u,S=(-p-b)/l,O=(-d-E)/u,L=Vd(1,0,A,P),R=Vd(A,P,S,O);return a===0&&R>0&&(R-=gs),a===1&&R<0&&(R+=gs),[w,x,L,R]}function Pw(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),a=Math.cos(e+t),l=Math.sin(e+t);return[n,i,n-i*r,i+n*r,a+l*r,l-a*r,a,l]}var Mw=function(t,r,n,i,a,l,u,f,h){var p=Math.sin(h*gs/360),d=Math.cos(h*gs/360),c=d*(t-n)/2+p*(r-i)/2,v=-p*(t-n)/2+d*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var y=c*c/(u*u)+v*v/(f*f);y>1&&(u*=Math.sqrt(y),f*=Math.sqrt(y));var m=Nw(t,r,n,i,a,l,u,f,p,d),_=[],b=m[2],E=m[3],w=Math.max(Math.ceil(Math.abs(E)/(gs/4)),1);E/=w;for(var x=0;x<w;x++)_.push(Pw(b,E)),b+=E;return _.map(function(A){for(var P=0;P<A.length;P+=2){var S=A[P+0],O=A[P+1];S*=u,O*=f;var L=d*S-p*O,R=p*S+d*O;A[P+0]=L+m[0],A[P+1]=R+m[1]}return A})},ys=1e-10,Wd=Math.PI/180;function ms(e,t,r){if(!(this instanceof ms))return new ms(e,t,r);this.rx=e,this.ry=t,this.ax=r}ms.prototype.transform=function(e){var t=Math.cos(this.ax*Wd),r=Math.sin(this.ax*Wd),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],l=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),u=(i+a)/2;if(l<ys*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];l=Math.sqrt(l);var h=u+l/2,p=u-l/2;return this.ax=Math.abs(f)<ys&&Math.abs(h-a)<ys?90:Math.atan(Math.abs(f)>Math.abs(h-a)?(h-i)/f:f/(h-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(h)),this},ms.prototype.isDegenerate=function(){return this.rx<ys*this.ry||this.ry<ys*this.rx};var kw=ms,Lw=Tw,Fw=Cw,dn=zd,Bw=Mw,Uw=kw;function de(e){if(!(this instanceof de))return new de(e);var t=Lw(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}de.from=function(e){if(typeof e=="string")return new de(e);if(e instanceof de){var t=new de("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return dn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},de.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,a,l){var u,f,h,p;switch(n[0]){case"v":u=e.calc(0,n[1],!0),f=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=e.calc(a,n[1],!1),f=u[0]===e.calc(a,l,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=e.calc(n[1],0,!0),f=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=e.calc(n[1],l,!1),f=u[1]===e.calc(a,l,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var d=e.toArray(),c=Uw(n[1],n[2],n[3]).transform(d);if(d[0]*d[3]-d[1]*d[2]<0&&(n[5]=n[5]?"0":"1"),u=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===l||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",u[0],u[1]];break}c.isDegenerate()?f=[n[0]==="a"?"l":"L",u[0],u[1]]:f=[n[0],c.rx,c.ry,c.ax,n[4],n[5],u[0],u[1]];break;case"m":p=i>0,u=e.calc(n[1],n[2],p),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],p=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],p),f.push(u[0],u[1])}t.segments[i]=f},!0)},de.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=dn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},de.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var a=this.segments[n],l=a[0];l!==t||l==="m"||l==="M"?(l==="m"&&t==="z"&&(e+=" "),e+=l,r=!1):r=!0;for(var u=1;u<a.length;u++){var f=a[u];u===1?r&&f>=0&&(e+=" "):f>=0&&(e+=" "),e+=f}t=l}return e},de.prototype.translate=function(e,t){return this.__stack.push(dn().translate(e,t||0)),this},de.prototype.scale=function(e,t){return this.__stack.push(dn().scale(e,!t&&t!==0?e:t)),this},de.prototype.rotate=function(e,t,r){return this.__stack.push(dn().rotate(e,t||0,r||0)),this},de.prototype.skewX=function(e){return this.__stack.push(dn().skewX(e)),this},de.prototype.skewY=function(e){return this.__stack.push(dn().skewY(e)),this},de.prototype.matrix=function(e){return this.__stack.push(dn().matrix(e)),this},de.prototype.transform=function(e){return e.trim()?(this.__stack.push(Fw(e)),this):this},de.prototype.round=function(e){var t=0,r=0,n=0,i=0,a;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(l){var u=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":u&&(l[1]+=n),n=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"V":case"v":u&&(l[1]+=i),i=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(l[1]+=n,l[2]+=i),n=l[1]-l[1].toFixed(e),i=l[2]-l[2].toFixed(e),t=n,r=i,l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e);return;case"A":case"a":u&&(l[6]+=n,l[7]+=i),n=l[6]-l[6].toFixed(e),i=l[7]-l[7].toFixed(e),l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e),l[3]=+l[3].toFixed(e+2),l[6]=+l[6].toFixed(e),l[7]=+l[7].toFixed(e);return;default:a=l.length,u&&(l[a-2]+=n,l[a-1]+=i),n=l[a-2]-l[a-2].toFixed(e),i=l[a-1]-l[a-1].toFixed(e),l.forEach(function(f,h){h&&(l[h]=+l[h].toFixed(e))});return}}),this},de.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,a=0,l=0,u=0,f=0,h,p,d;if(t||this.__evaluateStack(),r.forEach(function(c,v){var y=e(c,v,a,l);Array.isArray(y)&&(n[v]=y,i=!0);var m=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":a=c[1]+(m?a:0),l=c[2]+(m?l:0),u=a,f=l;return;case"h":case"H":a=c[1]+(m?a:0);return;case"v":case"V":l=c[1]+(m?l:0);return;case"z":case"Z":a=u,l=f;return;default:a=c[c.length-2]+(m?a:0),l=c[c.length-1]+(m?l:0)}}),!i)return this;for(d=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(p=0;p<n[h].length;p++)d.push(n[h][p]);else d.push(r[h]);return this.segments=d,this},de.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],a=i.toUpperCase(),l;if(i!==a)switch(e[0]=a,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(l=1;l<e.length;l++)e[l]+=l%2?r:n}},!0),this},de.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],a=i.toLowerCase(),l;if(i!==a&&!(t===0&&i==="M"))switch(e[0]=a,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(l=1;l<e.length;l++)e[l]-=l%2?r:n}},!0),this},de.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,a,l,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(a=r+e[6],l=n+e[7]):(a=e[6],l=e[7]),i=Bw(r,n,a,l,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(h){u.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),u))}),this},de.prototype.unshort=function(){var e=this.segments,t,r,n,i,a;return this.iterate(function(l,u,f,h){var p=l[0],d=p.toUpperCase(),c;u&&(d==="T"?(c=p==="t",n=e[u-1],n[0]==="Q"?(t=n[1]-f,r=n[2]-h):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,a=-r,c||(i+=f,a+=h),e[u]=[c?"q":"Q",i,a,l[1],l[2]]):d==="S"&&(c=p==="s",n=e[u-1],n[0]==="C"?(t=n[3]-f,r=n[4]-h):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,a=-r,c||(i+=f,a+=h),e[u]=[c?"c":"C",i,a,l[1],l[2],l[3],l[4]]))}),this};var Dw=de,$w=Dw;const Gw=Tn($w),qw=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState(null),i=bt.useRef(null),a=bt.useRef(null),l=bt.useRef(null),{path:u,transformation:{x:f,y:h,width:p,height:d,anchor:c,hexColor:v,fill:y,stroke:m="none",strokeWidth:_=0},pointerdown:b,pointerup:E}=e,w=ve.useApp();return Tt.useEffect(()=>{const x=Gw(u).scale(5).translate(0,0).toString(),A=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${d}">
|
|
548
|
-
<path stroke="${
|
|
547
|
+
*/(function(e,t){(function(r,n){e.exports=n()})(DE,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(_){return+v("number",_)},"coordinate pair":function(_){var b=v("number",_);if(b===null&&!_)return null;v("comma");var m=v("number",!0);return{x:+b,y:+m}},"arc definition":function(_){var b=a["coordinate pair"](_);if(!b&&!_)return null;v("comma");var m=+v("number",!0);v("comma",!0);var E=!!+v("flag",!0);v("comma");var w=!!+v("flag",!0);v("comma");var x=a["coordinate pair"](!0);return{radii:b,rotation:m,large:E,clockwise:w,end:x}}},l=0,u=[];l<n.length;){var f=v("command"),h=f.toUpperCase(),p=f!==h,d;switch(h){case"M":d=y("coordinate pair").map(function(_,b){return b===1&&(f=p?"l":"L"),c({end:_})});break;case"L":case"T":d=y("coordinate pair").map(function(_){return c({end:_})});break;case"C":if(d=y("coordinate pair"),d.length%3)throw Error("Expected coordinate pair triplet at position "+l);d=d.reduce(function(_,b,m){var E=m%3;if(!E)_.push(c({cp1:b}));else{var w=_[_.length-1];w[E===1?"cp2":"end"]=b}return _},[]);break;case"Q":case"S":if(d=y("coordinate pair"),d.length&1)throw Error("Expected coordinate pair couple at position "+l);d=d.reduce(function(_,b,m){var E=m&1;if(!E)_.push(c({cp:b}));else{var w=_[_.length-1];w.end=b}return _},[]);break;case"H":case"V":d=y("number").map(function(_){return c({value:_})});break;case"A":d=y("arc definition").map(c);break;case"Z":d=[{code:"Z"}];break}u.push.apply(u,d)}return u;function c(_){return _.code=f,_.relative=p,_}function v(_,b){i[_].lastIndex=l;var m=i[_].exec(n);if(!m||m.index!==l){if(!b)return null;throw Error("Expected "+_+" at position "+l)}return l=i[_].lastIndex,m[1]}function y(_){for(var b=[],m,E=!0;m=a[_](E);)b.push(m),E=!!v("comma");return b}}})})($E);const GE=/^\s+/,qE=/\s+$/;function wt(e,t){if(e=e||"",t=t||{},e instanceof wt)return e;if(!(this instanceof wt))return new wt(e,t);var r=jE(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}wt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,a,l;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(e){return this._a=$d(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Fd(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Fd(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Ld(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Ld(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Bd(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return WE(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(oe(this._r,255)*100)+"%",g:Math.round(oe(this._g,255)*100)+"%",b:Math.round(oe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(oe(this._r,255)*100)+"%, "+Math.round(oe(this._g,255)*100)+"%, "+Math.round(oe(this._b,255)*100)+"%)":"rgba("+Math.round(oe(this._r,255)*100)+"%, "+Math.round(oe(this._g,255)*100)+"%, "+Math.round(oe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:sw[Bd(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Ud(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=wt(e);r="#"+Ud(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return wt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(ZE,arguments)},brighten:function(){return this._applyModification(JE,arguments)},darken:function(){return this._applyModification(QE,arguments)},desaturate:function(){return this._applyModification(XE,arguments)},saturate:function(){return this._applyModification(KE,arguments)},greyscale:function(){return this._applyModification(YE,arguments)},spin:function(){return this._applyModification(tw,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(nw,arguments)},complement:function(){return this._applyCombination(ew,arguments)},monochromatic:function(){return this._applyCombination(iw,arguments)},splitcomplement:function(){return this._applyCombination(rw,arguments)},triad:function(){return this._applyCombination(Dd,[3])},tetrad:function(){return this._applyCombination(Dd,[4])}},wt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=ps(e[n]));e=r}return wt(e,t)};function jE(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,l=!1,u=!1;return typeof e=="string"&&(e=uw(e)),typeof e=="object"&&(Xr(e.r)&&Xr(e.g)&&Xr(e.b)?(t=HE(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Xr(e.h)&&Xr(e.s)&&Xr(e.v)?(n=ps(e.s),i=ps(e.v),t=VE(e.h,n,i),l=!0,u="hsv"):Xr(e.h)&&Xr(e.s)&&Xr(e.l)&&(n=ps(e.s),a=ps(e.l),t=zE(e.h,n,a),l=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=$d(r),{ok:l,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function HE(e,t,r){return{r:oe(e,255)*255,g:oe(t,255)*255,b:oe(r,255)*255}}function Ld(e,t,r){e=oe(e,255),t=oe(t,255),r=oe(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a,l,u=(n+i)/2;if(n==i)a=l=0;else{var f=n-i;switch(l=u>.5?f/(2-n-i):f/(n+i),n){case e:a=(t-r)/f+(t<r?6:0);break;case t:a=(r-e)/f+2;break;case r:a=(e-t)/f+4;break}a/=6}return{h:a,s:l,l:u}}function zE(e,t,r){var n,i,a;e=oe(e,360),t=oe(t,100),r=oe(r,100);function l(h,p,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?h+(p-h)*6*d:d<1/2?p:d<2/3?h+(p-h)*(2/3-d)*6:h}if(t===0)n=i=a=r;else{var u=r<.5?r*(1+t):r+t-r*t,f=2*r-u;n=l(f,u,e+1/3),i=l(f,u,e),a=l(f,u,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function Fd(e,t,r){e=oe(e,255),t=oe(t,255),r=oe(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a,l,u=n,f=n-i;if(l=n===0?0:f/n,n==i)a=0;else{switch(n){case e:a=(t-r)/f+(t<r?6:0);break;case t:a=(r-e)/f+2;break;case r:a=(e-t)/f+4;break}a/=6}return{h:a,s:l,v:u}}function VE(e,t,r){e=oe(e,360)*6,t=oe(t,100),r=oe(r,100);var n=Math.floor(e),i=e-n,a=r*(1-t),l=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,l,a,a,u,r][f],p=[u,r,r,l,a,a][f],d=[a,a,u,r,r,l][f];return{r:h*255,g:p*255,b:d*255}}function Bd(e,t,r,n){var i=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function WE(e,t,r,n,i){var a=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16)),Ar(Gd(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Ud(e,t,r,n){var i=[Ar(Gd(n)),Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return i.join("")}wt.equals=function(e,t){return!e||!t?!1:wt(e).toRgbString()==wt(t).toRgbString()},wt.random=function(){return wt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function XE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.s-=t/100,r.s=Pa(r.s),wt(r)}function KE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.s+=t/100,r.s=Pa(r.s),wt(r)}function YE(e){return wt(e).desaturate(100)}function ZE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.l+=t/100,r.l=Pa(r.l),wt(r)}function JE(e,t){t=t===0?0:t||10;var r=wt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),wt(r)}function QE(e,t){t=t===0?0:t||10;var r=wt(e).toHsl();return r.l-=t/100,r.l=Pa(r.l),wt(r)}function tw(e,t){var r=wt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,wt(r)}function ew(e){var t=wt(e).toHsl();return t.h=(t.h+180)%360,wt(t)}function Dd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=wt(e).toHsl(),n=[wt(e)],i=360/t,a=1;a<t;a++)n.push(wt({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function rw(e){var t=wt(e).toHsl(),r=t.h;return[wt(e),wt({h:(r+72)%360,s:t.s,l:t.l}),wt({h:(r+216)%360,s:t.s,l:t.l})]}function nw(e,t,r){t=t||6,r=r||30;var n=wt(e).toHsl(),i=360/r,a=[wt(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(wt(n));return a}function iw(e,t){t=t||6;for(var r=wt(e).toHsv(),n=r.h,i=r.s,a=r.v,l=[],u=1/t;t--;)l.push(wt({h:n,s:i,v:a})),a=(a+u)%1;return l}wt.mix=function(e,t,r){r=r===0?0:r||50;var n=wt(e).toRgb(),i=wt(t).toRgb(),a=r/100,l={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return wt(l)},wt.readability=function(e,t){var r=wt(e),n=wt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},wt.isReadable=function(e,t,r){var n=wt.readability(e,t),i,a;switch(a=!1,i=fw(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},wt.mostReadable=function(e,t,r){var n=null,i=0,a,l,u,f;r=r||{},l=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)a=wt.readability(e,t[h]),a>i&&(i=a,n=wt(t[h]));return wt.isReadable(e,n,{level:u,size:f})||!l?n:(r.includeFallbackColors=!1,wt.mostReadable(e,["#fff","#000"],r))};var yu=wt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},sw=wt.hexNames=aw(yu);function aw(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function $d(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function oe(e,t){ow(e)&&(e="100%");var r=lw(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Pa(e){return Math.min(1,Math.max(0,e))}function Je(e){return parseInt(e,16)}function ow(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function lw(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ar(e){return e.length==1?"0"+e:""+e}function ps(e){return e<=1&&(e=e*100+"%"),e}function Gd(e){return Math.round(parseFloat(e)*255).toString(16)}function qd(e){return Je(e)/255}var Sr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Xr(e){return!!Sr.CSS_UNIT.exec(e)}function uw(e){e=e.replace(GE,"").replace(qE,"").toLowerCase();var t=!1;if(yu[e])e=yu[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Sr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Sr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Sr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Sr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Sr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Sr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Sr.hex8.exec(e))?{r:Je(r[1]),g:Je(r[2]),b:Je(r[3]),a:qd(r[4]),format:t?"name":"hex8"}:(r=Sr.hex6.exec(e))?{r:Je(r[1]),g:Je(r[2]),b:Je(r[3]),format:t?"name":"hex"}:(r=Sr.hex4.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),a:qd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Sr.hex3.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function fw(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var cw=function(){function e(t,r){var n=[],i=!0,a=!1,l=void 0;try{for(var u=t[Symbol.iterator](),f;!(i=(f=u.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(h){a=!0,l=h}finally{try{!i&&u.return&&u.return()}finally{if(a)throw l}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),vs=Math.PI*2,mu=function(t,r,n,i,a,l,u){var f=t.x,h=t.y;f*=r,h*=n;var p=i*f-a*h,d=a*f+i*h;return{x:p+l,y:d+u}},hw=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),l=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:l+u*n,y:u-l*n},{x:l,y:u}]},jd=function(t,r,n,i){var a=t*i-r*n<0?-1:1,l=t*n+r*i;return l>1&&(l=1),l<-1&&(l=-1),a*Math.acos(l)},dw=function(t,r,n,i,a,l,u,f,h,p,d,c){var v=Math.pow(a,2),y=Math.pow(l,2),_=Math.pow(d,2),b=Math.pow(c,2),m=v*y-v*b-y*_;m<0&&(m=0),m/=v*b+y*_,m=Math.sqrt(m)*(u===f?-1:1);var E=m*a/l*c,w=m*-l/a*d,x=p*E-h*w+(t+n)/2,A=h*E+p*w+(r+i)/2,P=(d-E)/a,S=(c-w)/l,O=(-d-E)/a,L=(-c-w)/l,R=jd(1,0,P,S),I=jd(P,S,O,L);return f===0&&I>0&&(I-=vs),f===1&&I<0&&(I+=vs),[x,A,R,I]},Hd=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,l=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,p=t.largeArcFlag,d=p===void 0?0:p,c=t.sweepFlag,v=c===void 0?0:c,y=[];if(l===0||u===0)return[];var _=Math.sin(h*vs/360),b=Math.cos(h*vs/360),m=b*(r-i)/2+_*(n-a)/2,E=-_*(r-i)/2+b*(n-a)/2;if(m===0&&E===0)return[];l=Math.abs(l),u=Math.abs(u);var w=Math.pow(m,2)/Math.pow(l,2)+Math.pow(E,2)/Math.pow(u,2);w>1&&(l*=Math.sqrt(w),u*=Math.sqrt(w));var x=dw(r,n,i,a,l,u,d,v,_,b,m,E),A=cw(x,4),P=A[0],S=A[1],O=A[2],L=A[3],R=Math.abs(L)/(vs/4);Math.abs(1-R)<1e-7&&(R=1);var I=Math.max(Math.ceil(R),1);L/=I;for(var M=0;M<I;M++)y.push(hw(O,L)),O+=L;return y.map(function(C){var F=mu(C[0],l,u,b,_,P,S),j=F.x,X=F.y,V=mu(C[1],l,u,b,_,P,S),st=V.x,Y=V.y,U=mu(C[2],l,u,b,_,P,S),N=U.x,D=U.y;return{x1:j,y1:X,x2:st,y2:Y,x:N,y:D}})};class pw extends vu{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=wt(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const a=parseFloat(t.getAttribute(n)),l=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,p=0;u!==null&&(h=parseFloat(u)),f!==null&&(p=parseFloat(f)),i?this.drawEllipse(h,p,a,l):this.drawCircle(h,p,a)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),a=parseFloat(t.getAttribute("height")),l=parseFloat(t.getAttribute("rx"));l?this.drawRoundedRect(r,n,i,a,l):this.drawRect(r,n,i,a)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[l,u]=a.split(":");if(l){const f=this._convertStyleName(l);i[f]||(i[f]=u.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:a,strokeOpacity:l,strokeWidth:u,cap:f,join:h,miterLimit:p}=this._svgStyle(t),c=u!==null?parseFloat(u):a!==null?1:0,v=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:a===null&&u===null&&r?this.line.width:c,alpha:l===null?this.line.alpha:parseFloat(l),color:a===null&&r?this.line.color:v,cap:f===null&&r?this.line.cap:f,join:h===null&&r?this.line.join:h,miterLimit:p===null&&r?this.line.miterLimit:parseFloat(p)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const a=gu(r.trim());for(let l=0;l<a.length;l++){const u=a[l];switch(u.code){case"m":{this.moveTo(n+=u.end.x,i+=u.end.y);break}case"M":{this.moveTo(n=u.end.x,i=u.end.y);break}case"H":{this.lineTo(n=u.value,i);break}case"h":{this.lineTo(n+=u.value,i);break}case"V":{this.lineTo(n,i=u.value);break}case"v":{this.lineTo(n,i+=u.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=u.end.x,i=u.end.y);break}case"l":{this.lineTo(n+=u.end.x,i+=u.end.y);break}case"C":{this.bezierCurveTo(u.cp1.x,u.cp1.y,u.cp2.x,u.cp2.y,n=u.end.x,i=u.end.y);break}case"c":{const f=n,h=i;this.bezierCurveTo(f+u.cp1.x,h+u.cp1.y,f+u.cp2.x,h+u.cp2.y,n+=u.end.x,i+=u.end.y);break}case"s":case"q":{const f=n,h=i;this.quadraticCurveTo(f+u.cp.x,h+u.cp.y,n+=u.end.x,i+=u.end.y);break}case"S":case"Q":{this.quadraticCurveTo(u.cp.x,u.cp.y,n=u.end.x,i=u.end.y);break}case"a":{Hd({px:n,py:i,cx:n+=u.end.x,cy:i+=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,c,v));break}case"A":{Hd({px:n,py:i,cx:n=u.end.x,cy:i=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,c,v));break}default:{console.info("[PIXI.SVG] Draw command not supported:",u.code,u);break}}}}}var Ma={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},vw=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function gw(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&vw.indexOf(e)>=0}function yw(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function mw(e){return(e|32)===97}function Oi(e){return e>=48&&e<=57}function _w(e){return e>=48&&e<=57||e===43||e===45||e===46}function bw(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function ka(e){for(;e.index<e.max&&gw(e.path.charCodeAt(e.index));)e.index++}function xw(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function Ew(e){var t=e.index,r=t,n=e.max,i=!1,a=!1,l=!1,u=!1,f;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(f=e.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?e.path.charCodeAt(r):0),!Oi(f)&&f!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?e.path.charCodeAt(r):0,i&&r<n&&f&&Oi(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Oi(e.path.charCodeAt(r));)r++,a=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Oi(e.path.charCodeAt(r));)r++,l=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!a&&!l){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?e.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Oi(e.path.charCodeAt(r)))for(;r<n&&Oi(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function _u(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=Ma[r]&&(e.result.push([t].concat(n.splice(0,Ma[r]))),!!Ma[r]););}function ww(e){var t=e.max,r,n,i,a,l;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=mw(r),!yw(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(a=Ma[e.path[e.index].toLowerCase()],e.index++,ka(e),e.data=[],!a){_u(e);return}for(i=!1;;){for(l=a;l>0;l--){if(n&&(l===3||l===4)?xw(e):Ew(e),e.err.length){_u(e);return}e.data.push(e.param),ka(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,ka(e),i=!0)}if(!i&&(e.index>=e.max||!_w(e.path.charCodeAt(e.index))))break}_u(e)}var Tw=function(t){var r=new bw(t),n=r.max;for(ka(r);r.index<n&&!r.err.length;)ww(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function Aw(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Or(){if(!(this instanceof Or))return new Or;this.queue=[],this.cache=null}Or.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},Or.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},Or.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},Or.prototype.rotate=function(e,t,r){var n,i,a;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),a=Math.sin(n),this.queue.push([i,a,-a,i,0,0]),this.cache=null,this.translate(-t,-r)),this},Or.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},Or.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},Or.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=Aw(this.cache,this.queue[e]);return this.cache},Or.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var zd=Or,Sw=zd,Ow={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Iw=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Rw=/[\s,]+/,Cw=function(t){var r=new Sw,n,i;return t.split(Iw).forEach(function(a){if(a.length){if(typeof Ow[a]<"u"){n=a;return}switch(i=a.split(Rw).map(function(l){return+l||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},gs=Math.PI*2;function Vd(e,t,r,n){var i=e*n-t*r<0?-1:1,a=e*r+t*n;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function Nw(e,t,r,n,i,a,l,u,f,h){var p=h*(e-r)/2+f*(t-n)/2,d=-f*(e-r)/2+h*(t-n)/2,c=l*l,v=u*u,y=p*p,_=d*d,b=c*v-c*_-v*y;b<0&&(b=0),b/=c*_+v*y,b=Math.sqrt(b)*(i===a?-1:1);var m=b*l/u*d,E=b*-u/l*p,w=h*m-f*E+(e+r)/2,x=f*m+h*E+(t+n)/2,A=(p-m)/l,P=(d-E)/u,S=(-p-m)/l,O=(-d-E)/u,L=Vd(1,0,A,P),R=Vd(A,P,S,O);return a===0&&R>0&&(R-=gs),a===1&&R<0&&(R+=gs),[w,x,L,R]}function Pw(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),a=Math.cos(e+t),l=Math.sin(e+t);return[n,i,n-i*r,i+n*r,a+l*r,l-a*r,a,l]}var Mw=function(t,r,n,i,a,l,u,f,h){var p=Math.sin(h*gs/360),d=Math.cos(h*gs/360),c=d*(t-n)/2+p*(r-i)/2,v=-p*(t-n)/2+d*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var y=c*c/(u*u)+v*v/(f*f);y>1&&(u*=Math.sqrt(y),f*=Math.sqrt(y));var _=Nw(t,r,n,i,a,l,u,f,p,d),b=[],m=_[2],E=_[3],w=Math.max(Math.ceil(Math.abs(E)/(gs/4)),1);E/=w;for(var x=0;x<w;x++)b.push(Pw(m,E)),m+=E;return b.map(function(A){for(var P=0;P<A.length;P+=2){var S=A[P+0],O=A[P+1];S*=u,O*=f;var L=d*S-p*O,R=p*S+d*O;A[P+0]=L+_[0],A[P+1]=R+_[1]}return A})},ys=1e-10,Wd=Math.PI/180;function ms(e,t,r){if(!(this instanceof ms))return new ms(e,t,r);this.rx=e,this.ry=t,this.ax=r}ms.prototype.transform=function(e){var t=Math.cos(this.ax*Wd),r=Math.sin(this.ax*Wd),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],l=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),u=(i+a)/2;if(l<ys*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];l=Math.sqrt(l);var h=u+l/2,p=u-l/2;return this.ax=Math.abs(f)<ys&&Math.abs(h-a)<ys?90:Math.atan(Math.abs(f)>Math.abs(h-a)?(h-i)/f:f/(h-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(h)),this},ms.prototype.isDegenerate=function(){return this.rx<ys*this.ry||this.ry<ys*this.rx};var kw=ms,Lw=Tw,Fw=Cw,dn=zd,Bw=Mw,Uw=kw;function he(e){if(!(this instanceof he))return new he(e);var t=Lw(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}he.from=function(e){if(typeof e=="string")return new he(e);if(e instanceof he){var t=new he("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return dn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},he.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,a,l){var u,f,h,p;switch(n[0]){case"v":u=e.calc(0,n[1],!0),f=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=e.calc(a,n[1],!1),f=u[0]===e.calc(a,l,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=e.calc(n[1],0,!0),f=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=e.calc(n[1],l,!1),f=u[1]===e.calc(a,l,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var d=e.toArray(),c=Uw(n[1],n[2],n[3]).transform(d);if(d[0]*d[3]-d[1]*d[2]<0&&(n[5]=n[5]?"0":"1"),u=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===l||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",u[0],u[1]];break}c.isDegenerate()?f=[n[0]==="a"?"l":"L",u[0],u[1]]:f=[n[0],c.rx,c.ry,c.ax,n[4],n[5],u[0],u[1]];break;case"m":p=i>0,u=e.calc(n[1],n[2],p),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],p=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],p),f.push(u[0],u[1])}t.segments[i]=f},!0)},he.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=dn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},he.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var a=this.segments[n],l=a[0];l!==t||l==="m"||l==="M"?(l==="m"&&t==="z"&&(e+=" "),e+=l,r=!1):r=!0;for(var u=1;u<a.length;u++){var f=a[u];u===1?r&&f>=0&&(e+=" "):f>=0&&(e+=" "),e+=f}t=l}return e},he.prototype.translate=function(e,t){return this.__stack.push(dn().translate(e,t||0)),this},he.prototype.scale=function(e,t){return this.__stack.push(dn().scale(e,!t&&t!==0?e:t)),this},he.prototype.rotate=function(e,t,r){return this.__stack.push(dn().rotate(e,t||0,r||0)),this},he.prototype.skewX=function(e){return this.__stack.push(dn().skewX(e)),this},he.prototype.skewY=function(e){return this.__stack.push(dn().skewY(e)),this},he.prototype.matrix=function(e){return this.__stack.push(dn().matrix(e)),this},he.prototype.transform=function(e){return e.trim()?(this.__stack.push(Fw(e)),this):this},he.prototype.round=function(e){var t=0,r=0,n=0,i=0,a;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(l){var u=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":u&&(l[1]+=n),n=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"V":case"v":u&&(l[1]+=i),i=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(l[1]+=n,l[2]+=i),n=l[1]-l[1].toFixed(e),i=l[2]-l[2].toFixed(e),t=n,r=i,l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e);return;case"A":case"a":u&&(l[6]+=n,l[7]+=i),n=l[6]-l[6].toFixed(e),i=l[7]-l[7].toFixed(e),l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e),l[3]=+l[3].toFixed(e+2),l[6]=+l[6].toFixed(e),l[7]=+l[7].toFixed(e);return;default:a=l.length,u&&(l[a-2]+=n,l[a-1]+=i),n=l[a-2]-l[a-2].toFixed(e),i=l[a-1]-l[a-1].toFixed(e),l.forEach(function(f,h){h&&(l[h]=+l[h].toFixed(e))});return}}),this},he.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,a=0,l=0,u=0,f=0,h,p,d;if(t||this.__evaluateStack(),r.forEach(function(c,v){var y=e(c,v,a,l);Array.isArray(y)&&(n[v]=y,i=!0);var _=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":a=c[1]+(_?a:0),l=c[2]+(_?l:0),u=a,f=l;return;case"h":case"H":a=c[1]+(_?a:0);return;case"v":case"V":l=c[1]+(_?l:0);return;case"z":case"Z":a=u,l=f;return;default:a=c[c.length-2]+(_?a:0),l=c[c.length-1]+(_?l:0)}}),!i)return this;for(d=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(p=0;p<n[h].length;p++)d.push(n[h][p]);else d.push(r[h]);return this.segments=d,this},he.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],a=i.toUpperCase(),l;if(i!==a)switch(e[0]=a,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(l=1;l<e.length;l++)e[l]+=l%2?r:n}},!0),this},he.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],a=i.toLowerCase(),l;if(i!==a&&!(t===0&&i==="M"))switch(e[0]=a,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(l=1;l<e.length;l++)e[l]-=l%2?r:n}},!0),this},he.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,a,l,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(a=r+e[6],l=n+e[7]):(a=e[6],l=e[7]),i=Bw(r,n,a,l,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(h){u.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),u))}),this},he.prototype.unshort=function(){var e=this.segments,t,r,n,i,a;return this.iterate(function(l,u,f,h){var p=l[0],d=p.toUpperCase(),c;u&&(d==="T"?(c=p==="t",n=e[u-1],n[0]==="Q"?(t=n[1]-f,r=n[2]-h):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,a=-r,c||(i+=f,a+=h),e[u]=[c?"q":"Q",i,a,l[1],l[2]]):d==="S"&&(c=p==="s",n=e[u-1],n[0]==="C"?(t=n[3]-f,r=n[4]-h):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,a=-r,c||(i+=f,a+=h),e[u]=[c?"c":"C",i,a,l[1],l[2],l[3],l[4]]))}),this};var Dw=he,$w=Dw;const Gw=Tn($w),qw=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState(null),i=_t.useRef(null),a=_t.useRef(null),l=_t.useRef(null),{path:u,transformation:{x:f,y:h,width:p,height:d,anchor:c,hexColor:v,fill:y,stroke:_="none",strokeWidth:b=0},pointerdown:m,pointerup:E}=e,w=pe.useApp();return Tt.useEffect(()=>{const x=Gw(u).scale(5).translate(0,0).toString(),A=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${d}">
|
|
548
|
+
<path stroke="${_}" stroke-width="${b}" fill="${v||y}" d="${x}">
|
|
549
549
|
</path>
|
|
550
|
-
</svg>`,P=new pw(A),S=w.renderer.generateTexture(P);return n(S),()=>{}},[w,u,m,_,v,y]),Zt.jsx(Ei,{...e,ref:t,children:Zt.jsx(ve.Container,{ref:a,children:Zt.jsx(ve.Container,{ref:l,children:r&&Zt.jsx(ve.Sprite,{texture:r,width:p,height:d,anchor:c,ref:i,x:f,y:h,interactive:!0,pointerdown:b,pointerup:E})})})})});var jw=Br,Hw=function(){return jw.Date.now()},zw=Hw,Vw=/\s/;function Ww(e){for(var t=e.length;t--&&Vw.test(e.charAt(t)););return t}var Xw=Ww,Kw=Xw,Yw=/^\s+/;function Zw(e){return e&&e.slice(0,Kw(e)+1).replace(Yw,"")}var Jw=Zw,Qw=cs,tT=ds,eT="[object Symbol]";function rT(e){return typeof e=="symbol"||tT(e)&&Qw(e)==eT}var La=rT,nT=Jw,Xd=hs,iT=La,Kd=0/0,sT=/^[-+]0x[0-9a-f]+$/i,aT=/^0b[01]+$/i,oT=/^0o[0-7]+$/i,lT=parseInt;function uT(e){if(typeof e=="number")return e;if(iT(e))return Kd;if(Xd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nT(e);var r=aT.test(e);return r||oT.test(e)?lT(e.slice(2),r?2:8):sT.test(e)?Kd:+e}var fT=uT,cT=hs,bu=zw,Yd=fT,hT="Expected a function",dT=Math.max,pT=Math.min;function vT(e,t,r){var n,i,a,l,u,f,h=0,p=!1,d=!1,c=!0;if(typeof e!="function")throw new TypeError(hT);t=Yd(t)||0,cT(r)&&(p=!!r.leading,d="maxWait"in r,a=d?dT(Yd(r.maxWait)||0,t):a,c="trailing"in r?!!r.trailing:c);function v(P){var S=n,O=i;return n=i=void 0,h=P,l=e.apply(O,S),l}function y(P){return h=P,u=setTimeout(b,t),p?v(P):l}function m(P){var S=P-f,O=P-h,L=t-S;return d?pT(L,a-O):L}function _(P){var S=P-f,O=P-h;return f===void 0||S>=t||S<0||d&&O>=a}function b(){var P=bu();if(_(P))return E(P);u=setTimeout(b,m(P))}function E(P){return u=void 0,c&&n?v(P):(n=i=void 0,l)}function w(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?l:E(bu())}function A(){var P=bu(),S=_(P);if(n=arguments,i=this,f=P,S){if(u===void 0)return y(f);if(d)return clearTimeout(u),u=setTimeout(b,t),v(f)}return u===void 0&&(u=setTimeout(b,t)),l}return A.cancel=w,A.flush=x,A}var gT=vT;const Zd=Tn(gT),yT=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Tt.useState(!1);console.log("allProps",e);const n=bt.useRef(null),i=bt.useRef(t),a=bt.useRef(null),{tl:l,isDragging:u}=bt.useContext(mi),{uniqueId:f,src:h,startAt:p,endAt:d,mute:c,speed:v}=e,y=e.audioStartAt||p,m=e.audioEndAt||d,_=Tt.useRef(null);Fr(Ze.PAUSE,()=>{var S;n.current&&_.current&&((S=_.current)==null||S.pause(),i.current.isPlaying=!1)}),Tt.useEffect(()=>{_.current&&(u?(_.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const b=S=>{var O,L;n.current&&((O=_.current)==null||O.play({volume:c?0:1,start:S,end:d,speed:v||1}),u?((L=_.current)==null||L.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},E=Zd((S,O)=>{var L;_.current&&((L=_.current)==null||L.play({volume:c?0:1,start:S,end:O,speed:v||1}),i.current.isPlaying=!0)},100),w=Zd(()=>{_.current&&(_.current.pause(),i.current.isPlaying=!1)},300),x=()=>{var S;n.current&&(console.log("audio gsapOnStart",p),(S=_.current)==null||S.stop(),i.current.isPlaying=!1,i.current.completed=!0)},A=(S,O)=>{var R,I,M,C;const L=S+((R=a.current)==null?void 0:R.time());_.current&&i.current.isDragging?(E(L,O),w(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((I=_.current)==null||I.refresh(),(M=_.current)==null||M.refreshPaused(),(C=_.current)==null||C.resume(),i.current.isPlaying=!0)},P=()=>{};return bt.useEffect(()=>{let S=We.context(()=>{});if(n.current&&l.current){const O={duration:Number(m)-Number(y),onStart:b,onComplete:x,onStartParams:[y,m],onCompleteParams:[],onInterrupt:P,onUpdate:A,onUpdateParams:[y,m]};S=We.context(()=>{a.current=We.from(n.current,O,y),l.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(d)-.09),l.current.add(a.current,y)})}return()=>S.revert()},[p,d,y,m]),Tt.useEffect(()=>{n.current&&r(!0)},[]),Tt.useEffect(()=>{n.current&&_.current&&(i.current.mute=c,i.current.speed=v,_.current.volume=c?0:1)},[c,v]),Tt.useEffect(()=>(xi(h)||(_.current=yy.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{i.current.loaded=!0}})),()=>{}),[f,h]),Zt.jsx(ve.Container,{ref:n})};function mT(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Jd=mT;function _T(){this.__data__=[],this.size=0}var bT=_T;function xT(e,t){return e===t||e!==e&&t!==t}var Qd=xT,ET=Qd;function wT(e,t){for(var r=e.length;r--;)if(ET(e[r][0],t))return r;return-1}var Fa=wT,TT=Fa,AT=Array.prototype,ST=AT.splice;function OT(e){var t=this.__data__,r=TT(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ST.call(t,r,1),--this.size,!0}var IT=OT,RT=Fa;function CT(e){var t=this.__data__,r=RT(t,e);return r<0?void 0:t[r][1]}var NT=CT,PT=Fa;function MT(e){return PT(this.__data__,e)>-1}var kT=MT,LT=Fa;function FT(e,t){var r=this.__data__,n=LT(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var BT=FT,UT=bT,DT=IT,$T=NT,GT=kT,qT=BT;function Ii(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ii.prototype.clear=UT,Ii.prototype.delete=DT,Ii.prototype.get=$T,Ii.prototype.has=GT,Ii.prototype.set=qT;var Ba=Ii,jT=Ba;function HT(){this.__data__=new jT,this.size=0}var zT=HT;function VT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var WT=VT;function XT(e){return this.__data__.get(e)}var KT=XT;function YT(e){return this.__data__.has(e)}var ZT=YT,JT=_i,QT=JT(Object,"create"),Ua=QT,tp=Ua;function tA(){this.__data__=tp?tp(null):{},this.size=0}var eA=tA;function rA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nA=rA,iA=Ua,sA="__lodash_hash_undefined__",aA=Object.prototype,oA=aA.hasOwnProperty;function lA(e){var t=this.__data__;if(iA){var r=t[e];return r===sA?void 0:r}return oA.call(t,e)?t[e]:void 0}var uA=lA,fA=Ua,cA=Object.prototype,hA=cA.hasOwnProperty;function dA(e){var t=this.__data__;return fA?t[e]!==void 0:hA.call(t,e)}var pA=dA,vA=Ua,gA="__lodash_hash_undefined__";function yA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=vA&&t===void 0?gA:t,this}var mA=yA,_A=eA,bA=nA,xA=uA,EA=pA,wA=mA;function Ri(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ri.prototype.clear=_A,Ri.prototype.delete=bA,Ri.prototype.get=xA,Ri.prototype.has=EA,Ri.prototype.set=wA;var TA=Ri,ep=TA,AA=Ba,SA=Jl;function OA(){this.size=0,this.__data__={hash:new ep,map:new(SA||AA),string:new ep}}var IA=OA;function RA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var CA=RA,NA=CA;function PA(e,t){var r=e.__data__;return NA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Da=PA,MA=Da;function kA(e){var t=MA(this,e).delete(e);return this.size-=t?1:0,t}var LA=kA,FA=Da;function BA(e){return FA(this,e).get(e)}var UA=BA,DA=Da;function $A(e){return DA(this,e).has(e)}var GA=$A,qA=Da;function jA(e,t){var r=qA(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var HA=jA,zA=IA,VA=LA,WA=UA,XA=GA,KA=HA;function Ci(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ci.prototype.clear=zA,Ci.prototype.delete=VA,Ci.prototype.get=WA,Ci.prototype.has=XA,Ci.prototype.set=KA;var xu=Ci,YA=Ba,ZA=Jl,JA=xu,QA=200;function tS(e,t){var r=this.__data__;if(r instanceof YA){var n=r.__data__;if(!ZA||n.length<QA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new JA(n)}return r.set(e,t),this.size=r.size,this}var eS=tS,rS=Ba,nS=zT,iS=WT,sS=KT,aS=ZT,oS=eS;function Ni(e){var t=this.__data__=new rS(e);this.size=t.size}Ni.prototype.clear=nS,Ni.prototype.delete=iS,Ni.prototype.get=sS,Ni.prototype.has=aS,Ni.prototype.set=oS;var rp=Ni,lS="__lodash_hash_undefined__";function uS(e){return this.__data__.set(e,lS),this}var fS=uS;function cS(e){return this.__data__.has(e)}var hS=cS,dS=xu,pS=fS,vS=hS;function $a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new dS;++t<r;)this.add(e[t])}$a.prototype.add=$a.prototype.push=pS,$a.prototype.has=vS;var gS=$a;function yS(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var mS=yS;function _S(e,t){return e.has(t)}var bS=_S,xS=gS,ES=mS,wS=bS,TS=1,AS=2;function SS(e,t,r,n,i,a){var l=r&TS,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var d=-1,c=!0,v=r&AS?new xS:void 0;for(a.set(e,t),a.set(t,e);++d<u;){var y=e[d],m=t[d];if(n)var _=l?n(m,y,d,t,e,a):n(y,m,d,e,t,a);if(_!==void 0){if(_)continue;c=!1;break}if(v){if(!ES(t,function(b,E){if(!wS(v,E)&&(y===b||i(y,b,r,n,a)))return v.push(E)})){c=!1;break}}else if(!(y===m||i(y,m,r,n,a))){c=!1;break}}return a.delete(e),a.delete(t),c}var np=SS,OS=Br,IS=OS.Uint8Array,RS=IS;function CS(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var NS=CS;function PS(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var MS=PS,ip=wa,sp=RS,kS=Qd,LS=np,FS=NS,BS=MS,US=1,DS=2,$S="[object Boolean]",GS="[object Date]",qS="[object Error]",jS="[object Map]",HS="[object Number]",zS="[object RegExp]",VS="[object Set]",WS="[object String]",XS="[object Symbol]",KS="[object ArrayBuffer]",YS="[object DataView]",ap=ip?ip.prototype:void 0,Eu=ap?ap.valueOf:void 0;function ZS(e,t,r,n,i,a,l){switch(r){case YS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case KS:return!(e.byteLength!=t.byteLength||!a(new sp(e),new sp(t)));case $S:case GS:case HS:return kS(+e,+t);case qS:return e.name==t.name&&e.message==t.message;case zS:case WS:return e==t+"";case jS:var u=FS;case VS:var f=n&US;if(u||(u=BS),e.size!=t.size&&!f)return!1;var h=l.get(e);if(h)return h==t;n|=DS,l.set(e,t);var p=LS(u(e),u(t),n,i,a,l);return l.delete(e),p;case XS:if(Eu)return Eu.call(e)==Eu.call(t)}return!1}var JS=ZS;function QS(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var tO=QS,eO=tO,rO=Ur;function nO(e,t,r){var n=t(e);return rO(e)?n:eO(n,r(e))}var iO=nO;function sO(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var l=e[r];t(l,r,e)&&(a[i++]=l)}return a}var aO=sO;function oO(){return[]}var lO=oO,uO=aO,fO=lO,cO=Object.prototype,hO=cO.propertyIsEnumerable,op=Object.getOwnPropertySymbols,dO=op?function(e){return e==null?[]:(e=Object(e),uO(op(e),function(t){return hO.call(e,t)}))}:fO,pO=dO;function vO(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var gO=vO,yO=9007199254740991,mO=/^(?:0|[1-9]\d*)$/;function _O(e,t){var r=typeof e;return t=t??yO,!!t&&(r=="number"||r!="symbol"&&mO.test(e))&&e>-1&&e%1==0&&e<t}var lp=_O,bO=gO,xO=iu,EO=Ur,wO=au,TO=lp,AO=ou,SO=Object.prototype,OO=SO.hasOwnProperty;function IO(e,t){var r=EO(e),n=!r&&xO(e),i=!r&&!n&&wO(e),a=!r&&!n&&!i&&AO(e),l=r||n||i||a,u=l?bO(e.length,String):[],f=u.length;for(var h in e)(t||OO.call(e,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||TO(h,f)))&&u.push(h);return u}var RO=IO,CO=RO,NO=od,PO=Ta;function MO(e){return PO(e)?CO(e):NO(e)}var wu=MO,kO=iO,LO=pO,FO=wu;function BO(e){return kO(e,FO,LO)}var UO=BO,up=UO,DO=1,$O=Object.prototype,GO=$O.hasOwnProperty;function qO(e,t,r,n,i,a){var l=r&DO,u=up(e),f=u.length,h=up(t),p=h.length;if(f!=p&&!l)return!1;for(var d=f;d--;){var c=u[d];if(!(l?c in t:GO.call(t,c)))return!1}var v=a.get(e),y=a.get(t);if(v&&y)return v==t&&y==e;var m=!0;a.set(e,t),a.set(t,e);for(var _=l;++d<f;){c=u[d];var b=e[c],E=t[c];if(n)var w=l?n(E,b,c,t,e,a):n(b,E,c,e,t,a);if(!(w===void 0?b===E||i(b,E,r,n,a):w)){m=!1;break}_||(_=c=="constructor")}if(m&&!_){var x=e.constructor,A=t.constructor;x!=A&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof A=="function"&&A instanceof A)&&(m=!1)}return a.delete(e),a.delete(t),m}var jO=qO,Tu=rp,HO=np,zO=JS,VO=jO,fp=Ed,cp=Ur,hp=au,WO=ou,XO=1,dp="[object Arguments]",pp="[object Array]",Ga="[object Object]",KO=Object.prototype,vp=KO.hasOwnProperty;function YO(e,t,r,n,i,a){var l=cp(e),u=cp(t),f=l?pp:fp(e),h=u?pp:fp(t);f=f==dp?Ga:f,h=h==dp?Ga:h;var p=f==Ga,d=h==Ga,c=f==h;if(c&&hp(e)){if(!hp(t))return!1;l=!0,p=!1}if(c&&!p)return a||(a=new Tu),l||WO(e)?HO(e,t,r,n,i,a):zO(e,t,f,r,n,i,a);if(!(r&XO)){var v=p&&vp.call(e,"__wrapped__"),y=d&&vp.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,_=y?t.value():t;return a||(a=new Tu),i(m,_,r,n,a)}}return c?(a||(a=new Tu),VO(e,t,r,n,i,a)):!1}var ZO=YO,JO=ZO,gp=ds;function yp(e,t,r,n,i){return e===t?!0:e==null||t==null||!gp(e)&&!gp(t)?e!==e&&t!==t:JO(e,t,r,n,yp,i)}var mp=yp,QO=rp,t2=mp,e2=1,r2=2;function n2(e,t,r,n){var i=r.length,a=i,l=!n;if(e==null)return!a;for(e=Object(e);i--;){var u=r[i];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){u=r[i];var f=u[0],h=e[f],p=u[1];if(l&&u[2]){if(h===void 0&&!(f in e))return!1}else{var d=new QO;if(n)var c=n(h,p,f,e,t,d);if(!(c===void 0?t2(p,h,e2|r2,n,d):c))return!1}}return!0}var i2=n2,s2=hs;function a2(e){return e===e&&!s2(e)}var _p=a2,o2=_p,l2=wu;function u2(e){for(var t=l2(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,o2(i)]}return t}var f2=u2;function c2(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var bp=c2,h2=i2,d2=f2,p2=bp;function v2(e){var t=d2(e);return t.length==1&&t[0][2]?p2(t[0][0],t[0][1]):function(r){return r===e||h2(r,e,t)}}var g2=v2,y2=Ur,m2=La,_2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b2=/^\w*$/;function x2(e,t){if(y2(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||m2(e)?!0:b2.test(e)||!_2.test(e)||t!=null&&e in Object(t)}var Au=x2,xp=xu,E2="Expected a function";function Su(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(E2);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var l=e.apply(this,n);return r.cache=a.set(i,l)||a,l};return r.cache=new(Su.Cache||xp),r}Su.Cache=xp;var w2=Su,T2=w2,A2=500;function S2(e){var t=T2(e,function(n){return r.size===A2&&r.clear(),n}),r=t.cache;return t}var O2=S2,I2=O2,R2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,C2=/\\(\\)?/g,N2=I2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(R2,function(r,n,i,a){t.push(i?a.replace(C2,"$1"):n||r)}),t}),P2=N2,Ep=wa,M2=Jd,k2=Ur,L2=La,F2=1/0,wp=Ep?Ep.prototype:void 0,Tp=wp?wp.toString:void 0;function Ap(e){if(typeof e=="string")return e;if(k2(e))return M2(e,Ap)+"";if(L2(e))return Tp?Tp.call(e):"";var t=e+"";return t=="0"&&1/e==-F2?"-0":t}var B2=Ap,U2=B2;function D2(e){return e==null?"":U2(e)}var $2=D2,G2=Ur,q2=Au,j2=P2,H2=$2;function z2(e,t){return G2(e)?e:q2(e,t)?[e]:j2(H2(e))}var Sp=z2,V2=La,W2=1/0;function X2(e){if(typeof e=="string"||V2(e))return e;var t=e+"";return t=="0"&&1/e==-W2?"-0":t}var qa=X2,K2=Sp,Y2=qa;function Z2(e,t){t=K2(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Y2(t[r++])];return r&&r==n?e:void 0}var Op=Z2,J2=Op;function Q2(e,t,r){var n=e==null?void 0:J2(e,t);return n===void 0?r:n}var tI=Q2;function eI(e,t){return e!=null&&t in Object(e)}var rI=eI,nI=Sp,iI=iu,sI=Ur,aI=lp,oI=su,lI=qa;function uI(e,t,r){t=nI(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var l=lI(t[n]);if(!(a=e!=null&&r(e,l)))break;e=e[l]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&oI(i)&&aI(l,i)&&(sI(e)||iI(e)))}var fI=uI,cI=rI,hI=fI;function dI(e,t){return e!=null&&hI(e,t,cI)}var pI=dI,vI=mp,gI=tI,yI=pI,mI=Au,_I=_p,bI=bp,xI=qa,EI=1,wI=2;function TI(e,t){return mI(e)&&_I(t)?bI(xI(e),t):function(r){var n=gI(r,e);return n===void 0&&n===t?yI(r,e):vI(t,n,EI|wI)}}var AI=TI;function SI(e){return e}var OI=SI;function II(e){return function(t){return t==null?void 0:t[e]}}var RI=II,CI=Op;function NI(e){return function(t){return CI(t,e)}}var PI=NI,MI=RI,kI=PI,LI=Au,FI=qa;function BI(e){return LI(e)?MI(FI(e)):kI(e)}var UI=BI,DI=g2,$I=AI,GI=OI,qI=Ur,jI=UI;function HI(e){return typeof e=="function"?e:e==null?GI:typeof e=="object"?qI(e)?$I(e[0],e[1]):DI(e):jI(e)}var zI=HI;function VI(e){return function(t,r,n){for(var i=-1,a=Object(t),l=n(t),u=l.length;u--;){var f=l[e?u:++i];if(r(a[f],f,a)===!1)break}return t}}var WI=VI,XI=WI,KI=XI(),YI=KI,ZI=YI,JI=wu;function QI(e,t){return e&&ZI(e,t,JI)}var tR=QI,eR=Ta;function rR(e,t){return function(r,n){if(r==null)return r;if(!eR(r))return e(r,n);for(var i=r.length,a=t?i:-1,l=Object(r);(t?a--:++a<i)&&n(l[a],a,l)!==!1;);return r}}var nR=rR,iR=tR,sR=nR,aR=sR(iR),oR=aR,lR=oR,uR=Ta;function fR(e,t){var r=-1,n=uR(e)?Array(e.length):[];return lR(e,function(i,a,l){n[++r]=t(i,a,l)}),n}var cR=fR,hR=Jd,dR=zI,pR=cR,vR=Ur;function gR(e,t){var r=vR(e)?hR:pR;return r(e,dR(t))}var yR=gR;const mR=Tn(yR);var Gn={},Ip={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.loop=Kr.conditional=Kr.parse=void 0;var _R=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(l){return e(t,l,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(i[a]={},e(t,r[a],n,i[a])):i[a]=r[a](t,n,i,e)}return n};Kr.parse=_R;var bR=function(t,r){return function(n,i,a,l){r(n,i,a)&&l(n,t,i,a)}};Kr.conditional=bR;var xR=function(t,r){return function(n,i,a,l){for(var u=[],f=n.pos;r(n,i,a);){var h={};if(l(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Kr.loop=xR;var ye={};Object.defineProperty(ye,"__esModule",{value:!0}),ye.readBits=ye.readArray=ye.readUnsigned=ye.readString=ye.peekBytes=ye.readBytes=ye.peekByte=ye.readByte=ye.buildStream=void 0;var ER=function(t){return{data:t,pos:0}};ye.buildStream=ER;var Rp=function(){return function(t){return t.data[t.pos++]}};ye.readByte=Rp;var wR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};ye.peekByte=wR;var ja=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};ye.readBytes=ja;var TR=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};ye.peekBytes=TR;var AR=function(t){return function(r){return Array.from(ja(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};ye.readString=AR;var SR=function(t){return function(r){var n=ja(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};ye.readUnsigned=SR;var OR=function(t,r){return function(n,i,a){for(var l=typeof r=="function"?r(n,i,a):r,u=ja(t),f=new Array(l),h=0;h<l;h++)f[h]=u(n);return f}};ye.readArray=OR;var IR=function(t,r,n){for(var i=0,a=0;a<n;a++)i+=t[r+a]&&Math.pow(2,n-a-1);return i},RR=function(t){return function(r){for(var n=Rp()(r),i=new Array(8),a=0;a<8;a++)i[7-a]=!!(n&1<<a);return Object.keys(t).reduce(function(l,u){var f=t[u];return f.length?l[u]=IR(i,f.index,f.length):l[u]=i[f.index],l},{})}};ye.readBits=RR,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Kr,r=ye,n={blocks:function(c){for(var v=0,y=[],m=c.data.length,_=0,b=(0,r.readByte)()(c);b!==v&&b;b=(0,r.readByte)()(c)){if(c.pos+b>=m){var E=m-c.pos;y.push((0,r.readBytes)(E)(c)),_+=E;break}y.push((0,r.readBytes)(b)(c)),_+=b}for(var w=new Uint8Array(_),x=0,A=0;A<y.length;A++)w.set(y[A],x),x+=y[A].length;return w}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===249}),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(d,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(d,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(d){return(0,r.peekByte)()(d)===44}),l=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(d,c){return Math.pow(2,c.lsd.gct.size+1)})},function(d,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,a,l],function(d){var c=(0,r.peekByte)()(d);return c===33||c===44})}],p=h;e.default=p}(Ip);var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.deinterlace=void 0;var CR=function(t,r){for(var n=new Array(t.length),i=t.length/r,a=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},l=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var p=l[h];p<i;p+=u[h])a(p,f),f++;return n};Ha.deinterlace=CR;var za={};Object.defineProperty(za,"__esModule",{value:!0}),za.lzw=void 0;var NR=function(t,r,n){var i=4096,a=-1,l=n,u,f,h,p,d,c,v,P,y,m,A,_,S,O,R,L,b=new Array(n),E=new Array(i),w=new Array(i),x=new Array(i+1);for(_=t,f=1<<_,d=f+1,u=f+2,v=a,p=_+1,h=(1<<p)-1,y=0;y<f;y++)E[y]=0,w[y]=y;var A,P,S,O,L,R;for(A=P=S=O=L=R=0,m=0;m<l;){if(O===0){if(P<p){A+=r[R]<<P,P+=8,R++;continue}if(y=A&h,A>>=p,P-=p,y>u||y==d)break;if(y==f){p=_+1,h=(1<<p)-1,u=f+2,v=a;continue}if(v==a){x[O++]=w[y],v=y,S=y;continue}for(c=y,y==u&&(x[O++]=S,y=v);y>f;)x[O++]=w[y],y=E[y];S=w[y]&255,x[O++]=S,u<i&&(E[u]=v,w[u]=S,u++,!(u&h)&&u<i&&(p++,h+=u)),v=c}O--,b[L++]=x[O],m++}for(m=L;m<l;m++)b[m]=0;return b};za.lzw=NR,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.decompressFrames=Gn.decompressFrame=Gn.parseGIF=void 0;var PR=BR(Ip),MR=Kr,kR=ye,LR=Ha,FR=za;function BR(e){return e&&e.__esModule?e:{default:e}}var UR=function(t){var r=new Uint8Array(t);return(0,MR.parse)((0,kR.buildStream)(r),PR.default)};Gn.parseGIF=UR;var DR=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var a=i*4,l=t.pixels[i],u=t.colorTable[l]||[0,0,0];n[a]=u[0],n[a+1]=u[1],n[a+2]=u[2],n[a+3]=l!==t.transparentIndex?255:0}return n},Cp=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,a=i.descriptor.width*i.descriptor.height,l=(0,FR.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(l=(0,LR.deinterlace)(l,i.descriptor.width));var u={pixels:l,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=DR(u)),u};Gn.decompressFrame=Cp;var $R=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return Cp(n,t.gct,r)})};Gn.decompressFrames=$R;const Np=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,a={...e,...i};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(a,{length:a.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),t.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},GR=e=>Np({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),qR=e=>bt.useReducer(Np,e,GR);var jR='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function HR(e){const t=new Blob([jR],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const zR=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),VR=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),bt.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},WR=e=>{const t=bt.useRef(e);return bt.useEffect(()=>{t.current=e},[e]),t},XR=e=>{const t=WR(e);return bt.useCallback(r=>t.current&&t.current(r),[])},KR=VR(()=>new HR,e=>e.terminate()),YR=(e,t)=>{const r=XR(t),n=KR();bt.useEffect(()=>{if(typeof e=="string"){const i=a=>{const l=a.data||a;if(l.src===e){const u=l.error?l:zR(l);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},ZR=({isPlaying:e,forwardRef:t,...r})=>{const n=Tt.useRef(null);return Tt.useImperativeHandle(t,()=>n.current,[n]),Tt.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Zt.jsx(ve.AnimatedSprite,{ref:n,...r,isPlaying:e})},Pp=Tt.memo(ZR);var Va={exports:{}};/**
|
|
550
|
+
</svg>`,P=new pw(A),S=w.renderer.generateTexture(P);return n(S),()=>{}},[w,u,_,b,v,y]),Zt.jsx(Ei,{...e,ref:t,children:Zt.jsx(pe.Container,{ref:a,children:Zt.jsx(pe.Container,{ref:l,children:r&&Zt.jsx(pe.Sprite,{texture:r,width:p,height:d,anchor:c,ref:i,x:f,y:h,interactive:!0,pointerdown:m,pointerup:E})})})})});var jw=Br,Hw=function(){return jw.Date.now()},zw=Hw,Vw=/\s/;function Ww(e){for(var t=e.length;t--&&Vw.test(e.charAt(t)););return t}var Xw=Ww,Kw=Xw,Yw=/^\s+/;function Zw(e){return e&&e.slice(0,Kw(e)+1).replace(Yw,"")}var Jw=Zw,Qw=cs,tT=ds,eT="[object Symbol]";function rT(e){return typeof e=="symbol"||tT(e)&&Qw(e)==eT}var La=rT,nT=Jw,Xd=hs,iT=La,Kd=0/0,sT=/^[-+]0x[0-9a-f]+$/i,aT=/^0b[01]+$/i,oT=/^0o[0-7]+$/i,lT=parseInt;function uT(e){if(typeof e=="number")return e;if(iT(e))return Kd;if(Xd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nT(e);var r=aT.test(e);return r||oT.test(e)?lT(e.slice(2),r?2:8):sT.test(e)?Kd:+e}var fT=uT,cT=hs,bu=zw,Yd=fT,hT="Expected a function",dT=Math.max,pT=Math.min;function vT(e,t,r){var n,i,a,l,u,f,h=0,p=!1,d=!1,c=!0;if(typeof e!="function")throw new TypeError(hT);t=Yd(t)||0,cT(r)&&(p=!!r.leading,d="maxWait"in r,a=d?dT(Yd(r.maxWait)||0,t):a,c="trailing"in r?!!r.trailing:c);function v(P){var S=n,O=i;return n=i=void 0,h=P,l=e.apply(O,S),l}function y(P){return h=P,u=setTimeout(m,t),p?v(P):l}function _(P){var S=P-f,O=P-h,L=t-S;return d?pT(L,a-O):L}function b(P){var S=P-f,O=P-h;return f===void 0||S>=t||S<0||d&&O>=a}function m(){var P=bu();if(b(P))return E(P);u=setTimeout(m,_(P))}function E(P){return u=void 0,c&&n?v(P):(n=i=void 0,l)}function w(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?l:E(bu())}function A(){var P=bu(),S=b(P);if(n=arguments,i=this,f=P,S){if(u===void 0)return y(f);if(d)return clearTimeout(u),u=setTimeout(m,t),v(f)}return u===void 0&&(u=setTimeout(m,t)),l}return A.cancel=w,A.flush=x,A}var gT=vT;const Zd=Tn(gT),yT=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Tt.useState(!1);console.log("allProps",e);const n=_t.useRef(null),i=_t.useRef(t),a=_t.useRef(null),{tl:l,isDragging:u}=_t.useContext(mi),{uniqueId:f,src:h,startAt:p,endAt:d,mute:c,speed:v}=e,y=e.audioStartAt||p,_=e.audioEndAt||d,b=Tt.useRef(null);wr(qe.PAUSE,()=>{var S;n.current&&b.current&&((S=b.current)==null||S.pause(),i.current.isPlaying=!1)}),Tt.useEffect(()=>{b.current&&(u?(b.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const m=S=>{var O,L;n.current&&((O=b.current)==null||O.play({volume:c?0:1,start:S,end:d,speed:v||1}),u?((L=b.current)==null||L.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},E=Zd((S,O)=>{var L;b.current&&((L=b.current)==null||L.play({volume:c?0:1,start:S,end:O,speed:v||1}),i.current.isPlaying=!0)},100),w=Zd(()=>{b.current&&(b.current.pause(),i.current.isPlaying=!1)},300),x=()=>{var S;n.current&&(console.log("audio gsapOnStart",p),(S=b.current)==null||S.stop(),i.current.isPlaying=!1,i.current.completed=!0)},A=(S,O)=>{var R,I,M,C;const L=S+((R=a.current)==null?void 0:R.time());b.current&&i.current.isDragging?(E(L,O),w(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((I=b.current)==null||I.refresh(),(M=b.current)==null||M.refreshPaused(),(C=b.current)==null||C.resume(),i.current.isPlaying=!0)},P=()=>{};return _t.useEffect(()=>{let S=Xe.context(()=>{});if(n.current&&l.current){const O={duration:Number(_)-Number(y),onStart:m,onComplete:x,onStartParams:[y,_],onCompleteParams:[],onInterrupt:P,onUpdate:A,onUpdateParams:[y,_]};S=Xe.context(()=>{a.current=Xe.from(n.current,O,y),l.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(d)-.09),l.current.add(a.current,y)})}return()=>S.revert()},[p,d,y,_]),Tt.useEffect(()=>{n.current&&r(!0)},[]),Tt.useEffect(()=>{n.current&&b.current&&(i.current.mute=c,i.current.speed=v,b.current.volume=c?0:1)},[c,v]),Tt.useEffect(()=>(xi(h)||(b.current=yy.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{i.current.loaded=!0}})),()=>{}),[f,h]),Zt.jsx(pe.Container,{ref:n})};function mT(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Jd=mT;function _T(){this.__data__=[],this.size=0}var bT=_T;function xT(e,t){return e===t||e!==e&&t!==t}var Qd=xT,ET=Qd;function wT(e,t){for(var r=e.length;r--;)if(ET(e[r][0],t))return r;return-1}var Fa=wT,TT=Fa,AT=Array.prototype,ST=AT.splice;function OT(e){var t=this.__data__,r=TT(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ST.call(t,r,1),--this.size,!0}var IT=OT,RT=Fa;function CT(e){var t=this.__data__,r=RT(t,e);return r<0?void 0:t[r][1]}var NT=CT,PT=Fa;function MT(e){return PT(this.__data__,e)>-1}var kT=MT,LT=Fa;function FT(e,t){var r=this.__data__,n=LT(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var BT=FT,UT=bT,DT=IT,$T=NT,GT=kT,qT=BT;function Ii(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ii.prototype.clear=UT,Ii.prototype.delete=DT,Ii.prototype.get=$T,Ii.prototype.has=GT,Ii.prototype.set=qT;var Ba=Ii,jT=Ba;function HT(){this.__data__=new jT,this.size=0}var zT=HT;function VT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var WT=VT;function XT(e){return this.__data__.get(e)}var KT=XT;function YT(e){return this.__data__.has(e)}var ZT=YT,JT=_i,QT=JT(Object,"create"),Ua=QT,tp=Ua;function tA(){this.__data__=tp?tp(null):{},this.size=0}var eA=tA;function rA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nA=rA,iA=Ua,sA="__lodash_hash_undefined__",aA=Object.prototype,oA=aA.hasOwnProperty;function lA(e){var t=this.__data__;if(iA){var r=t[e];return r===sA?void 0:r}return oA.call(t,e)?t[e]:void 0}var uA=lA,fA=Ua,cA=Object.prototype,hA=cA.hasOwnProperty;function dA(e){var t=this.__data__;return fA?t[e]!==void 0:hA.call(t,e)}var pA=dA,vA=Ua,gA="__lodash_hash_undefined__";function yA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=vA&&t===void 0?gA:t,this}var mA=yA,_A=eA,bA=nA,xA=uA,EA=pA,wA=mA;function Ri(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ri.prototype.clear=_A,Ri.prototype.delete=bA,Ri.prototype.get=xA,Ri.prototype.has=EA,Ri.prototype.set=wA;var TA=Ri,ep=TA,AA=Ba,SA=Jl;function OA(){this.size=0,this.__data__={hash:new ep,map:new(SA||AA),string:new ep}}var IA=OA;function RA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var CA=RA,NA=CA;function PA(e,t){var r=e.__data__;return NA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Da=PA,MA=Da;function kA(e){var t=MA(this,e).delete(e);return this.size-=t?1:0,t}var LA=kA,FA=Da;function BA(e){return FA(this,e).get(e)}var UA=BA,DA=Da;function $A(e){return DA(this,e).has(e)}var GA=$A,qA=Da;function jA(e,t){var r=qA(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var HA=jA,zA=IA,VA=LA,WA=UA,XA=GA,KA=HA;function Ci(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ci.prototype.clear=zA,Ci.prototype.delete=VA,Ci.prototype.get=WA,Ci.prototype.has=XA,Ci.prototype.set=KA;var xu=Ci,YA=Ba,ZA=Jl,JA=xu,QA=200;function tS(e,t){var r=this.__data__;if(r instanceof YA){var n=r.__data__;if(!ZA||n.length<QA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new JA(n)}return r.set(e,t),this.size=r.size,this}var eS=tS,rS=Ba,nS=zT,iS=WT,sS=KT,aS=ZT,oS=eS;function Ni(e){var t=this.__data__=new rS(e);this.size=t.size}Ni.prototype.clear=nS,Ni.prototype.delete=iS,Ni.prototype.get=sS,Ni.prototype.has=aS,Ni.prototype.set=oS;var rp=Ni,lS="__lodash_hash_undefined__";function uS(e){return this.__data__.set(e,lS),this}var fS=uS;function cS(e){return this.__data__.has(e)}var hS=cS,dS=xu,pS=fS,vS=hS;function $a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new dS;++t<r;)this.add(e[t])}$a.prototype.add=$a.prototype.push=pS,$a.prototype.has=vS;var gS=$a;function yS(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var mS=yS;function _S(e,t){return e.has(t)}var bS=_S,xS=gS,ES=mS,wS=bS,TS=1,AS=2;function SS(e,t,r,n,i,a){var l=r&TS,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var d=-1,c=!0,v=r&AS?new xS:void 0;for(a.set(e,t),a.set(t,e);++d<u;){var y=e[d],_=t[d];if(n)var b=l?n(_,y,d,t,e,a):n(y,_,d,e,t,a);if(b!==void 0){if(b)continue;c=!1;break}if(v){if(!ES(t,function(m,E){if(!wS(v,E)&&(y===m||i(y,m,r,n,a)))return v.push(E)})){c=!1;break}}else if(!(y===_||i(y,_,r,n,a))){c=!1;break}}return a.delete(e),a.delete(t),c}var np=SS,OS=Br,IS=OS.Uint8Array,RS=IS;function CS(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var NS=CS;function PS(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var MS=PS,ip=wa,sp=RS,kS=Qd,LS=np,FS=NS,BS=MS,US=1,DS=2,$S="[object Boolean]",GS="[object Date]",qS="[object Error]",jS="[object Map]",HS="[object Number]",zS="[object RegExp]",VS="[object Set]",WS="[object String]",XS="[object Symbol]",KS="[object ArrayBuffer]",YS="[object DataView]",ap=ip?ip.prototype:void 0,Eu=ap?ap.valueOf:void 0;function ZS(e,t,r,n,i,a,l){switch(r){case YS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case KS:return!(e.byteLength!=t.byteLength||!a(new sp(e),new sp(t)));case $S:case GS:case HS:return kS(+e,+t);case qS:return e.name==t.name&&e.message==t.message;case zS:case WS:return e==t+"";case jS:var u=FS;case VS:var f=n&US;if(u||(u=BS),e.size!=t.size&&!f)return!1;var h=l.get(e);if(h)return h==t;n|=DS,l.set(e,t);var p=LS(u(e),u(t),n,i,a,l);return l.delete(e),p;case XS:if(Eu)return Eu.call(e)==Eu.call(t)}return!1}var JS=ZS;function QS(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var tO=QS,eO=tO,rO=Ur;function nO(e,t,r){var n=t(e);return rO(e)?n:eO(n,r(e))}var iO=nO;function sO(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var l=e[r];t(l,r,e)&&(a[i++]=l)}return a}var aO=sO;function oO(){return[]}var lO=oO,uO=aO,fO=lO,cO=Object.prototype,hO=cO.propertyIsEnumerable,op=Object.getOwnPropertySymbols,dO=op?function(e){return e==null?[]:(e=Object(e),uO(op(e),function(t){return hO.call(e,t)}))}:fO,pO=dO;function vO(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var gO=vO,yO=9007199254740991,mO=/^(?:0|[1-9]\d*)$/;function _O(e,t){var r=typeof e;return t=t??yO,!!t&&(r=="number"||r!="symbol"&&mO.test(e))&&e>-1&&e%1==0&&e<t}var lp=_O,bO=gO,xO=iu,EO=Ur,wO=au,TO=lp,AO=ou,SO=Object.prototype,OO=SO.hasOwnProperty;function IO(e,t){var r=EO(e),n=!r&&xO(e),i=!r&&!n&&wO(e),a=!r&&!n&&!i&&AO(e),l=r||n||i||a,u=l?bO(e.length,String):[],f=u.length;for(var h in e)(t||OO.call(e,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||TO(h,f)))&&u.push(h);return u}var RO=IO,CO=RO,NO=od,PO=Ta;function MO(e){return PO(e)?CO(e):NO(e)}var wu=MO,kO=iO,LO=pO,FO=wu;function BO(e){return kO(e,FO,LO)}var UO=BO,up=UO,DO=1,$O=Object.prototype,GO=$O.hasOwnProperty;function qO(e,t,r,n,i,a){var l=r&DO,u=up(e),f=u.length,h=up(t),p=h.length;if(f!=p&&!l)return!1;for(var d=f;d--;){var c=u[d];if(!(l?c in t:GO.call(t,c)))return!1}var v=a.get(e),y=a.get(t);if(v&&y)return v==t&&y==e;var _=!0;a.set(e,t),a.set(t,e);for(var b=l;++d<f;){c=u[d];var m=e[c],E=t[c];if(n)var w=l?n(E,m,c,t,e,a):n(m,E,c,e,t,a);if(!(w===void 0?m===E||i(m,E,r,n,a):w)){_=!1;break}b||(b=c=="constructor")}if(_&&!b){var x=e.constructor,A=t.constructor;x!=A&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof A=="function"&&A instanceof A)&&(_=!1)}return a.delete(e),a.delete(t),_}var jO=qO,Tu=rp,HO=np,zO=JS,VO=jO,fp=Ed,cp=Ur,hp=au,WO=ou,XO=1,dp="[object Arguments]",pp="[object Array]",Ga="[object Object]",KO=Object.prototype,vp=KO.hasOwnProperty;function YO(e,t,r,n,i,a){var l=cp(e),u=cp(t),f=l?pp:fp(e),h=u?pp:fp(t);f=f==dp?Ga:f,h=h==dp?Ga:h;var p=f==Ga,d=h==Ga,c=f==h;if(c&&hp(e)){if(!hp(t))return!1;l=!0,p=!1}if(c&&!p)return a||(a=new Tu),l||WO(e)?HO(e,t,r,n,i,a):zO(e,t,f,r,n,i,a);if(!(r&XO)){var v=p&&vp.call(e,"__wrapped__"),y=d&&vp.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,b=y?t.value():t;return a||(a=new Tu),i(_,b,r,n,a)}}return c?(a||(a=new Tu),VO(e,t,r,n,i,a)):!1}var ZO=YO,JO=ZO,gp=ds;function yp(e,t,r,n,i){return e===t?!0:e==null||t==null||!gp(e)&&!gp(t)?e!==e&&t!==t:JO(e,t,r,n,yp,i)}var mp=yp,QO=rp,t2=mp,e2=1,r2=2;function n2(e,t,r,n){var i=r.length,a=i,l=!n;if(e==null)return!a;for(e=Object(e);i--;){var u=r[i];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){u=r[i];var f=u[0],h=e[f],p=u[1];if(l&&u[2]){if(h===void 0&&!(f in e))return!1}else{var d=new QO;if(n)var c=n(h,p,f,e,t,d);if(!(c===void 0?t2(p,h,e2|r2,n,d):c))return!1}}return!0}var i2=n2,s2=hs;function a2(e){return e===e&&!s2(e)}var _p=a2,o2=_p,l2=wu;function u2(e){for(var t=l2(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,o2(i)]}return t}var f2=u2;function c2(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var bp=c2,h2=i2,d2=f2,p2=bp;function v2(e){var t=d2(e);return t.length==1&&t[0][2]?p2(t[0][0],t[0][1]):function(r){return r===e||h2(r,e,t)}}var g2=v2,y2=Ur,m2=La,_2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b2=/^\w*$/;function x2(e,t){if(y2(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||m2(e)?!0:b2.test(e)||!_2.test(e)||t!=null&&e in Object(t)}var Au=x2,xp=xu,E2="Expected a function";function Su(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(E2);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var l=e.apply(this,n);return r.cache=a.set(i,l)||a,l};return r.cache=new(Su.Cache||xp),r}Su.Cache=xp;var w2=Su,T2=w2,A2=500;function S2(e){var t=T2(e,function(n){return r.size===A2&&r.clear(),n}),r=t.cache;return t}var O2=S2,I2=O2,R2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,C2=/\\(\\)?/g,N2=I2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(R2,function(r,n,i,a){t.push(i?a.replace(C2,"$1"):n||r)}),t}),P2=N2,Ep=wa,M2=Jd,k2=Ur,L2=La,F2=1/0,wp=Ep?Ep.prototype:void 0,Tp=wp?wp.toString:void 0;function Ap(e){if(typeof e=="string")return e;if(k2(e))return M2(e,Ap)+"";if(L2(e))return Tp?Tp.call(e):"";var t=e+"";return t=="0"&&1/e==-F2?"-0":t}var B2=Ap,U2=B2;function D2(e){return e==null?"":U2(e)}var $2=D2,G2=Ur,q2=Au,j2=P2,H2=$2;function z2(e,t){return G2(e)?e:q2(e,t)?[e]:j2(H2(e))}var Sp=z2,V2=La,W2=1/0;function X2(e){if(typeof e=="string"||V2(e))return e;var t=e+"";return t=="0"&&1/e==-W2?"-0":t}var qa=X2,K2=Sp,Y2=qa;function Z2(e,t){t=K2(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Y2(t[r++])];return r&&r==n?e:void 0}var Op=Z2,J2=Op;function Q2(e,t,r){var n=e==null?void 0:J2(e,t);return n===void 0?r:n}var tI=Q2;function eI(e,t){return e!=null&&t in Object(e)}var rI=eI,nI=Sp,iI=iu,sI=Ur,aI=lp,oI=su,lI=qa;function uI(e,t,r){t=nI(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var l=lI(t[n]);if(!(a=e!=null&&r(e,l)))break;e=e[l]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&oI(i)&&aI(l,i)&&(sI(e)||iI(e)))}var fI=uI,cI=rI,hI=fI;function dI(e,t){return e!=null&&hI(e,t,cI)}var pI=dI,vI=mp,gI=tI,yI=pI,mI=Au,_I=_p,bI=bp,xI=qa,EI=1,wI=2;function TI(e,t){return mI(e)&&_I(t)?bI(xI(e),t):function(r){var n=gI(r,e);return n===void 0&&n===t?yI(r,e):vI(t,n,EI|wI)}}var AI=TI;function SI(e){return e}var OI=SI;function II(e){return function(t){return t==null?void 0:t[e]}}var RI=II,CI=Op;function NI(e){return function(t){return CI(t,e)}}var PI=NI,MI=RI,kI=PI,LI=Au,FI=qa;function BI(e){return LI(e)?MI(FI(e)):kI(e)}var UI=BI,DI=g2,$I=AI,GI=OI,qI=Ur,jI=UI;function HI(e){return typeof e=="function"?e:e==null?GI:typeof e=="object"?qI(e)?$I(e[0],e[1]):DI(e):jI(e)}var zI=HI;function VI(e){return function(t,r,n){for(var i=-1,a=Object(t),l=n(t),u=l.length;u--;){var f=l[e?u:++i];if(r(a[f],f,a)===!1)break}return t}}var WI=VI,XI=WI,KI=XI(),YI=KI,ZI=YI,JI=wu;function QI(e,t){return e&&ZI(e,t,JI)}var tR=QI,eR=Ta;function rR(e,t){return function(r,n){if(r==null)return r;if(!eR(r))return e(r,n);for(var i=r.length,a=t?i:-1,l=Object(r);(t?a--:++a<i)&&n(l[a],a,l)!==!1;);return r}}var nR=rR,iR=tR,sR=nR,aR=sR(iR),oR=aR,lR=oR,uR=Ta;function fR(e,t){var r=-1,n=uR(e)?Array(e.length):[];return lR(e,function(i,a,l){n[++r]=t(i,a,l)}),n}var cR=fR,hR=Jd,dR=zI,pR=cR,vR=Ur;function gR(e,t){var r=vR(e)?hR:pR;return r(e,dR(t))}var yR=gR;const mR=Tn(yR);var Gn={},Ip={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.loop=Kr.conditional=Kr.parse=void 0;var _R=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(l){return e(t,l,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(i[a]={},e(t,r[a],n,i[a])):i[a]=r[a](t,n,i,e)}return n};Kr.parse=_R;var bR=function(t,r){return function(n,i,a,l){r(n,i,a)&&l(n,t,i,a)}};Kr.conditional=bR;var xR=function(t,r){return function(n,i,a,l){for(var u=[],f=n.pos;r(n,i,a);){var h={};if(l(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Kr.loop=xR;var ye={};Object.defineProperty(ye,"__esModule",{value:!0}),ye.readBits=ye.readArray=ye.readUnsigned=ye.readString=ye.peekBytes=ye.readBytes=ye.peekByte=ye.readByte=ye.buildStream=void 0;var ER=function(t){return{data:t,pos:0}};ye.buildStream=ER;var Rp=function(){return function(t){return t.data[t.pos++]}};ye.readByte=Rp;var wR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};ye.peekByte=wR;var ja=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};ye.readBytes=ja;var TR=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};ye.peekBytes=TR;var AR=function(t){return function(r){return Array.from(ja(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};ye.readString=AR;var SR=function(t){return function(r){var n=ja(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};ye.readUnsigned=SR;var OR=function(t,r){return function(n,i,a){for(var l=typeof r=="function"?r(n,i,a):r,u=ja(t),f=new Array(l),h=0;h<l;h++)f[h]=u(n);return f}};ye.readArray=OR;var IR=function(t,r,n){for(var i=0,a=0;a<n;a++)i+=t[r+a]&&Math.pow(2,n-a-1);return i},RR=function(t){return function(r){for(var n=Rp()(r),i=new Array(8),a=0;a<8;a++)i[7-a]=!!(n&1<<a);return Object.keys(t).reduce(function(l,u){var f=t[u];return f.length?l[u]=IR(i,f.index,f.length):l[u]=i[f.index],l},{})}};ye.readBits=RR,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Kr,r=ye,n={blocks:function(c){for(var v=0,y=[],_=c.data.length,b=0,m=(0,r.readByte)()(c);m!==v&&m;m=(0,r.readByte)()(c)){if(c.pos+m>=_){var E=_-c.pos;y.push((0,r.readBytes)(E)(c)),b+=E;break}y.push((0,r.readBytes)(m)(c)),b+=m}for(var w=new Uint8Array(b),x=0,A=0;A<y.length;A++)w.set(y[A],x),x+=y[A].length;return w}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===249}),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(d,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(d,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(d){return(0,r.peekByte)()(d)===44}),l=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(d,c){return Math.pow(2,c.lsd.gct.size+1)})},function(d,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,a,l],function(d){var c=(0,r.peekByte)()(d);return c===33||c===44})}],p=h;e.default=p}(Ip);var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.deinterlace=void 0;var CR=function(t,r){for(var n=new Array(t.length),i=t.length/r,a=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},l=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var p=l[h];p<i;p+=u[h])a(p,f),f++;return n};Ha.deinterlace=CR;var za={};Object.defineProperty(za,"__esModule",{value:!0}),za.lzw=void 0;var NR=function(t,r,n){var i=4096,a=-1,l=n,u,f,h,p,d,c,v,P,y,_,A,b,S,O,R,L,m=new Array(n),E=new Array(i),w=new Array(i),x=new Array(i+1);for(b=t,f=1<<b,d=f+1,u=f+2,v=a,p=b+1,h=(1<<p)-1,y=0;y<f;y++)E[y]=0,w[y]=y;var A,P,S,O,L,R;for(A=P=S=O=L=R=0,_=0;_<l;){if(O===0){if(P<p){A+=r[R]<<P,P+=8,R++;continue}if(y=A&h,A>>=p,P-=p,y>u||y==d)break;if(y==f){p=b+1,h=(1<<p)-1,u=f+2,v=a;continue}if(v==a){x[O++]=w[y],v=y,S=y;continue}for(c=y,y==u&&(x[O++]=S,y=v);y>f;)x[O++]=w[y],y=E[y];S=w[y]&255,x[O++]=S,u<i&&(E[u]=v,w[u]=S,u++,!(u&h)&&u<i&&(p++,h+=u)),v=c}O--,m[L++]=x[O],_++}for(_=L;_<l;_++)m[_]=0;return m};za.lzw=NR,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.decompressFrames=Gn.decompressFrame=Gn.parseGIF=void 0;var PR=BR(Ip),MR=Kr,kR=ye,LR=Ha,FR=za;function BR(e){return e&&e.__esModule?e:{default:e}}var UR=function(t){var r=new Uint8Array(t);return(0,MR.parse)((0,kR.buildStream)(r),PR.default)};Gn.parseGIF=UR;var DR=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var a=i*4,l=t.pixels[i],u=t.colorTable[l]||[0,0,0];n[a]=u[0],n[a+1]=u[1],n[a+2]=u[2],n[a+3]=l!==t.transparentIndex?255:0}return n},Cp=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,a=i.descriptor.width*i.descriptor.height,l=(0,FR.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(l=(0,LR.deinterlace)(l,i.descriptor.width));var u={pixels:l,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=DR(u)),u};Gn.decompressFrame=Cp;var $R=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return Cp(n,t.gct,r)})};Gn.decompressFrames=$R;const Np=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,a={...e,...i};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(a,{length:a.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),t.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},GR=e=>Np({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),qR=e=>_t.useReducer(Np,e,GR);var jR='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function HR(e){const t=new Blob([jR],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const zR=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),VR=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),_t.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},WR=e=>{const t=_t.useRef(e);return _t.useEffect(()=>{t.current=e},[e]),t},XR=e=>{const t=WR(e);return _t.useCallback(r=>t.current&&t.current(r),[])},KR=VR(()=>new HR,e=>e.terminate()),YR=(e,t)=>{const r=XR(t),n=KR();_t.useEffect(()=>{if(typeof e=="string"){const i=a=>{const l=a.data||a;if(l.src===e){const u=l.error?l:zR(l);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},ZR=({isPlaying:e,forwardRef:t,...r})=>{const n=Tt.useRef(null);return Tt.useImperativeHandle(t,()=>n.current,[n]),Tt.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Zt.jsx(pe.AnimatedSprite,{ref:n,...r,isPlaying:e})},Pp=Tt.memo(ZR);var Va={exports:{}};/**
|
|
551
551
|
* @license
|
|
552
552
|
* Lodash <https://lodash.com/>
|
|
553
553
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
554
554
|
* Released under MIT license <https://lodash.com/license>
|
|
555
555
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
556
556
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
557
|
-
*/Va.exports,function(e,t){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",d=1,c=2,v=4,y=1,m=2,_=1,b=2,E=4,w=8,x=16,A=32,P=64,S=128,O=256,L=512,R=30,I="...",M=800,C=16,F=1,j=2,X=3,V=1/0,it=9007199254740991,Y=17976931348623157e292,U=0/0,N=4294967295,D=N-1,q=N>>>1,Z=[["ary",S],["bind",_],["bindKey",b],["curry",w],["curryRight",x],["flip",L],["partial",A],["partialRight",P],["rearg",O]],K="[object Arguments]",G="[object Array]",z="[object AsyncFunction]",tt="[object Boolean]",et="[object Date]",nt="[object DOMException]",ht="[object Error]",gt="[object Function]",mt="[object GeneratorFunction]",xt="[object Map]",It="[object Number]",ae="[object Null]",Wt="[object Object]",st="[object Promise]",ot="[object Proxy]",dt="[object RegExp]",pt="[object Set]",ft="[object String]",Nt="[object Symbol]",Lt="[object Undefined]",Pt="[object WeakMap]",qe="[object WeakSet]",Be="[object ArrayBuffer]",Kt="[object DataView]",_s="[object Float32Array]",ue="[object Float64Array]",or="[object Int8Array]",Ou="[object Int16Array]",Iu="[object Int32Array]",Ru="[object Uint8Array]",Cu="[object Uint8ClampedArray]",Nu="[object Uint16Array]",Pu="[object Uint32Array]",sC=/\b__p \+= '';/g,aC=/\b(__p \+=) '' \+/g,oC=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bp=/&(?:amp|lt|gt|quot|#39);/g,Up=/[&<>"']/g,lC=RegExp(Bp.source),uC=RegExp(Up.source),fC=/<%-([\s\S]+?)%>/g,cC=/<%([\s\S]+?)%>/g,Dp=/<%=([\s\S]+?)%>/g,hC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dC=/^\w*$/,pC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mu=/[\\^$.*+?()[\]{}|]/g,vC=RegExp(Mu.source),ku=/^\s+/,gC=/\s/,yC=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,mC=/\{\n\/\* \[wrapped with (.+)\] \*/,_C=/,? & /,bC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xC=/[()=,{}\[\]\/\s]/,EC=/\\(\\)?/g,wC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$p=/\w*$/,TC=/^[-+]0x[0-9a-f]+$/i,AC=/^0b[01]+$/i,SC=/^\[object .+?Constructor\]$/,OC=/^0o[0-7]+$/i,IC=/^(?:0|[1-9]\d*)$/,RC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wa=/($^)/,CC=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",NC="\\u0300-\\u036f",PC="\\ufe20-\\ufe2f",MC="\\u20d0-\\u20ff",Gp=NC+PC+MC,qp="\\u2700-\\u27bf",jp="a-z\\xdf-\\xf6\\xf8-\\xff",kC="\\xac\\xb1\\xd7\\xf7",LC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",FC="\\u2000-\\u206f",BC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hp="A-Z\\xc0-\\xd6\\xd8-\\xde",zp="\\ufe0e\\ufe0f",Vp=kC+LC+FC+BC,Lu="['’]",UC="["+Xa+"]",Wp="["+Vp+"]",Ka="["+Gp+"]",Xp="\\d+",DC="["+qp+"]",Kp="["+jp+"]",Yp="[^"+Xa+Vp+Xp+qp+jp+Hp+"]",Fu="\\ud83c[\\udffb-\\udfff]",$C="(?:"+Ka+"|"+Fu+")",Zp="[^"+Xa+"]",Bu="(?:\\ud83c[\\udde6-\\uddff]){2}",Uu="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+Hp+"]",Jp="\\u200d",Qp="(?:"+Kp+"|"+Yp+")",GC="(?:"+Pi+"|"+Yp+")",tv="(?:"+Lu+"(?:d|ll|m|re|s|t|ve))?",ev="(?:"+Lu+"(?:D|LL|M|RE|S|T|VE))?",rv=$C+"?",nv="["+zp+"]?",qC="(?:"+Jp+"(?:"+[Zp,Bu,Uu].join("|")+")"+nv+rv+")*",jC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",iv=nv+rv+qC,zC="(?:"+[DC,Bu,Uu].join("|")+")"+iv,VC="(?:"+[Zp+Ka+"?",Ka,Bu,Uu,UC].join("|")+")",WC=RegExp(Lu,"g"),XC=RegExp(Ka,"g"),Du=RegExp(Fu+"(?="+Fu+")|"+VC+iv,"g"),KC=RegExp([Pi+"?"+Kp+"+"+tv+"(?="+[Wp,Pi,"$"].join("|")+")",GC+"+"+ev+"(?="+[Wp,Pi+Qp,"$"].join("|")+")",Pi+"?"+Qp+"+"+tv,Pi+"+"+ev,HC,jC,Xp,zC].join("|"),"g"),YC=RegExp("["+Jp+Xa+Gp+zp+"]"),ZC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,JC=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],QC=-1,oe={};oe[_s]=oe[ue]=oe[or]=oe[Ou]=oe[Iu]=oe[Ru]=oe[Cu]=oe[Nu]=oe[Pu]=!0,oe[K]=oe[G]=oe[Be]=oe[tt]=oe[Kt]=oe[et]=oe[ht]=oe[gt]=oe[xt]=oe[It]=oe[Wt]=oe[dt]=oe[pt]=oe[ft]=oe[Pt]=!1;var ie={};ie[K]=ie[G]=ie[Be]=ie[Kt]=ie[tt]=ie[et]=ie[_s]=ie[ue]=ie[or]=ie[Ou]=ie[Iu]=ie[xt]=ie[It]=ie[Wt]=ie[dt]=ie[pt]=ie[ft]=ie[Nt]=ie[Ru]=ie[Cu]=ie[Nu]=ie[Pu]=!0,ie[ht]=ie[gt]=ie[Pt]=!1;var tN={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},eN={"&":"&","<":"<",">":">",'"':""","'":"'"},rN={"&":"&","<":"<",">":">",""":'"',"'":"'"},nN={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},iN=parseFloat,sN=parseInt,sv=typeof Xe=="object"&&Xe&&Xe.Object===Object&&Xe,aN=typeof self=="object"&&self&&self.Object===Object&&self,Ce=sv||aN||Function("return this")(),$u=t&&!t.nodeType&&t,qn=$u&&!0&&e&&!e.nodeType&&e,av=qn&&qn.exports===$u,Gu=av&&sv.process,lr=function(){try{var J=qn&&qn.require&&qn.require("util").types;return J||Gu&&Gu.binding&&Gu.binding("util")}catch{}}(),ov=lr&&lr.isArrayBuffer,lv=lr&&lr.isDate,uv=lr&&lr.isMap,fv=lr&&lr.isRegExp,cv=lr&&lr.isSet,hv=lr&&lr.isTypedArray;function Qe(J,at,rt){switch(rt.length){case 0:return J.call(at);case 1:return J.call(at,rt[0]);case 2:return J.call(at,rt[0],rt[1]);case 3:return J.call(at,rt[0],rt[1],rt[2])}return J.apply(at,rt)}function oN(J,at,rt,_t){for(var Ct=-1,Xt=J==null?0:J.length;++Ct<Xt;){var Ee=J[Ct];at(_t,Ee,rt(Ee),J)}return _t}function ur(J,at){for(var rt=-1,_t=J==null?0:J.length;++rt<_t&&at(J[rt],rt,J)!==!1;);return J}function lN(J,at){for(var rt=J==null?0:J.length;rt--&&at(J[rt],rt,J)!==!1;);return J}function dv(J,at){for(var rt=-1,_t=J==null?0:J.length;++rt<_t;)if(!at(J[rt],rt,J))return!1;return!0}function pn(J,at){for(var rt=-1,_t=J==null?0:J.length,Ct=0,Xt=[];++rt<_t;){var Ee=J[rt];at(Ee,rt,J)&&(Xt[Ct++]=Ee)}return Xt}function Ya(J,at){var rt=J==null?0:J.length;return!!rt&&Mi(J,at,0)>-1}function qu(J,at,rt){for(var _t=-1,Ct=J==null?0:J.length;++_t<Ct;)if(rt(at,J[_t]))return!0;return!1}function fe(J,at){for(var rt=-1,_t=J==null?0:J.length,Ct=Array(_t);++rt<_t;)Ct[rt]=at(J[rt],rt,J);return Ct}function vn(J,at){for(var rt=-1,_t=at.length,Ct=J.length;++rt<_t;)J[Ct+rt]=at[rt];return J}function ju(J,at,rt,_t){var Ct=-1,Xt=J==null?0:J.length;for(_t&&Xt&&(rt=J[++Ct]);++Ct<Xt;)rt=at(rt,J[Ct],Ct,J);return rt}function uN(J,at,rt,_t){var Ct=J==null?0:J.length;for(_t&&Ct&&(rt=J[--Ct]);Ct--;)rt=at(rt,J[Ct],Ct,J);return rt}function Hu(J,at){for(var rt=-1,_t=J==null?0:J.length;++rt<_t;)if(at(J[rt],rt,J))return!0;return!1}var fN=zu("length");function cN(J){return J.split("")}function hN(J){return J.match(bC)||[]}function pv(J,at,rt){var _t;return rt(J,function(Ct,Xt,Ee){if(at(Ct,Xt,Ee))return _t=Xt,!1}),_t}function Za(J,at,rt,_t){for(var Ct=J.length,Xt=rt+(_t?1:-1);_t?Xt--:++Xt<Ct;)if(at(J[Xt],Xt,J))return Xt;return-1}function Mi(J,at,rt){return at===at?TN(J,at,rt):Za(J,vv,rt)}function dN(J,at,rt,_t){for(var Ct=rt-1,Xt=J.length;++Ct<Xt;)if(_t(J[Ct],at))return Ct;return-1}function vv(J){return J!==J}function gv(J,at){var rt=J==null?0:J.length;return rt?Wu(J,at)/rt:U}function zu(J){return function(at){return at==null?r:at[J]}}function Vu(J){return function(at){return J==null?r:J[at]}}function yv(J,at,rt,_t,Ct){return Ct(J,function(Xt,Ee,re){rt=_t?(_t=!1,Xt):at(rt,Xt,Ee,re)}),rt}function pN(J,at){var rt=J.length;for(J.sort(at);rt--;)J[rt]=J[rt].value;return J}function Wu(J,at){for(var rt,_t=-1,Ct=J.length;++_t<Ct;){var Xt=at(J[_t]);Xt!==r&&(rt=rt===r?Xt:rt+Xt)}return rt}function Xu(J,at){for(var rt=-1,_t=Array(J);++rt<J;)_t[rt]=at(rt);return _t}function vN(J,at){return fe(at,function(rt){return[rt,J[rt]]})}function mv(J){return J&&J.slice(0,Ev(J)+1).replace(ku,"")}function tr(J){return function(at){return J(at)}}function Ku(J,at){return fe(at,function(rt){return J[rt]})}function bs(J,at){return J.has(at)}function _v(J,at){for(var rt=-1,_t=J.length;++rt<_t&&Mi(at,J[rt],0)>-1;);return rt}function bv(J,at){for(var rt=J.length;rt--&&Mi(at,J[rt],0)>-1;);return rt}function gN(J,at){for(var rt=J.length,_t=0;rt--;)J[rt]===at&&++_t;return _t}var yN=Vu(tN),mN=Vu(eN);function _N(J){return"\\"+nN[J]}function bN(J,at){return J==null?r:J[at]}function ki(J){return YC.test(J)}function xN(J){return ZC.test(J)}function EN(J){for(var at,rt=[];!(at=J.next()).done;)rt.push(at.value);return rt}function Yu(J){var at=-1,rt=Array(J.size);return J.forEach(function(_t,Ct){rt[++at]=[Ct,_t]}),rt}function xv(J,at){return function(rt){return J(at(rt))}}function gn(J,at){for(var rt=-1,_t=J.length,Ct=0,Xt=[];++rt<_t;){var Ee=J[rt];(Ee===at||Ee===p)&&(J[rt]=p,Xt[Ct++]=rt)}return Xt}function Ja(J){var at=-1,rt=Array(J.size);return J.forEach(function(_t){rt[++at]=_t}),rt}function wN(J){var at=-1,rt=Array(J.size);return J.forEach(function(_t){rt[++at]=[_t,_t]}),rt}function TN(J,at,rt){for(var _t=rt-1,Ct=J.length;++_t<Ct;)if(J[_t]===at)return _t;return-1}function AN(J,at,rt){for(var _t=rt+1;_t--;)if(J[_t]===at)return _t;return _t}function Li(J){return ki(J)?ON(J):fN(J)}function Or(J){return ki(J)?IN(J):cN(J)}function Ev(J){for(var at=J.length;at--&&gC.test(J.charAt(at)););return at}var SN=Vu(rN);function ON(J){for(var at=Du.lastIndex=0;Du.test(J);)++at;return at}function IN(J){return J.match(Du)||[]}function RN(J){return J.match(KC)||[]}var CN=function J(at){at=at==null?Ce:Fi.defaults(Ce.Object(),at,Fi.pick(Ce,JC));var rt=at.Array,_t=at.Date,Ct=at.Error,Xt=at.Function,Ee=at.Math,re=at.Object,Zu=at.RegExp,NN=at.String,fr=at.TypeError,Qa=rt.prototype,PN=Xt.prototype,Bi=re.prototype,to=at["__core-js_shared__"],eo=PN.toString,te=Bi.hasOwnProperty,MN=0,wv=function(){var s=/[^.]+$/.exec(to&&to.keys&&to.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ro=Bi.toString,kN=eo.call(re),LN=Ce._,FN=Zu("^"+eo.call(te).replace(Mu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),no=av?at.Buffer:r,yn=at.Symbol,io=at.Uint8Array,Tv=no?no.allocUnsafe:r,so=xv(re.getPrototypeOf,re),Av=re.create,Sv=Bi.propertyIsEnumerable,ao=Qa.splice,Ov=yn?yn.isConcatSpreadable:r,xs=yn?yn.iterator:r,jn=yn?yn.toStringTag:r,oo=function(){try{var s=Xn(re,"defineProperty");return s({},"",{}),s}catch{}}(),BN=at.clearTimeout!==Ce.clearTimeout&&at.clearTimeout,UN=_t&&_t.now!==Ce.Date.now&&_t.now,DN=at.setTimeout!==Ce.setTimeout&&at.setTimeout,lo=Ee.ceil,uo=Ee.floor,Ju=re.getOwnPropertySymbols,$N=no?no.isBuffer:r,Iv=at.isFinite,GN=Qa.join,qN=xv(re.keys,re),we=Ee.max,ke=Ee.min,jN=_t.now,HN=at.parseInt,Rv=Ee.random,zN=Qa.reverse,Qu=Xn(at,"DataView"),Es=Xn(at,"Map"),tf=Xn(at,"Promise"),Ui=Xn(at,"Set"),ws=Xn(at,"WeakMap"),Ts=Xn(re,"create"),fo=ws&&new ws,Di={},VN=Kn(Qu),WN=Kn(Es),XN=Kn(tf),KN=Kn(Ui),YN=Kn(ws),co=yn?yn.prototype:r,As=co?co.valueOf:r,Cv=co?co.toString:r;function B(s){if(ge(s)&&!Mt(s)&&!(s instanceof $t)){if(s instanceof cr)return s;if(te.call(s,"__wrapped__"))return Ng(s)}return new cr(s)}var $i=function(){function s(){}return function(o){if(!pe(o))return{};if(Av)return Av(o);s.prototype=o;var g=new s;return s.prototype=r,g}}();function ho(){}function cr(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}B.templateSettings={escape:fC,evaluate:cC,interpolate:Dp,variable:"",imports:{_:B}},B.prototype=ho.prototype,B.prototype.constructor=B,cr.prototype=$i(ho.prototype),cr.prototype.constructor=cr;function $t(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=N,this.__views__=[]}function ZN(){var s=new $t(this.__wrapped__);return s.__actions__=je(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=je(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=je(this.__views__),s}function JN(){if(this.__filtered__){var s=new $t(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function QN(){var s=this.__wrapped__.value(),o=this.__dir__,g=Mt(s),T=o<0,k=g?s.length:0,$=cM(0,k,this.__views__),H=$.start,W=$.end,Q=W-H,lt=T?W:H-1,ut=this.__iteratees__,ct=ut.length,vt=0,Et=ke(Q,this.__takeCount__);if(!g||!T&&k==Q&&Et==Q)return tg(s,this.__actions__);var St=[];t:for(;Q--&&vt<Et;){lt+=o;for(var Ft=-1,Ot=s[lt];++Ft<ct;){var Ut=ut[Ft],qt=Ut.iteratee,nr=Ut.type,$e=qt(Ot);if(nr==j)Ot=$e;else if(!$e){if(nr==F)continue t;break t}}St[vt++]=Ot}return St}$t.prototype=$i(ho.prototype),$t.prototype.constructor=$t;function Hn(s){var o=-1,g=s==null?0:s.length;for(this.clear();++o<g;){var T=s[o];this.set(T[0],T[1])}}function tP(){this.__data__=Ts?Ts(null):{},this.size=0}function eP(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function rP(s){var o=this.__data__;if(Ts){var g=o[s];return g===f?r:g}return te.call(o,s)?o[s]:r}function nP(s){var o=this.__data__;return Ts?o[s]!==r:te.call(o,s)}function iP(s,o){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Ts&&o===r?f:o,this}Hn.prototype.clear=tP,Hn.prototype.delete=eP,Hn.prototype.get=rP,Hn.prototype.has=nP,Hn.prototype.set=iP;function Yr(s){var o=-1,g=s==null?0:s.length;for(this.clear();++o<g;){var T=s[o];this.set(T[0],T[1])}}function sP(){this.__data__=[],this.size=0}function aP(s){var o=this.__data__,g=po(o,s);if(g<0)return!1;var T=o.length-1;return g==T?o.pop():ao.call(o,g,1),--this.size,!0}function oP(s){var o=this.__data__,g=po(o,s);return g<0?r:o[g][1]}function lP(s){return po(this.__data__,s)>-1}function uP(s,o){var g=this.__data__,T=po(g,s);return T<0?(++this.size,g.push([s,o])):g[T][1]=o,this}Yr.prototype.clear=sP,Yr.prototype.delete=aP,Yr.prototype.get=oP,Yr.prototype.has=lP,Yr.prototype.set=uP;function Zr(s){var o=-1,g=s==null?0:s.length;for(this.clear();++o<g;){var T=s[o];this.set(T[0],T[1])}}function fP(){this.size=0,this.__data__={hash:new Hn,map:new(Es||Yr),string:new Hn}}function cP(s){var o=So(this,s).delete(s);return this.size-=o?1:0,o}function hP(s){return So(this,s).get(s)}function dP(s){return So(this,s).has(s)}function pP(s,o){var g=So(this,s),T=g.size;return g.set(s,o),this.size+=g.size==T?0:1,this}Zr.prototype.clear=fP,Zr.prototype.delete=cP,Zr.prototype.get=hP,Zr.prototype.has=dP,Zr.prototype.set=pP;function zn(s){var o=-1,g=s==null?0:s.length;for(this.__data__=new Zr;++o<g;)this.add(s[o])}function vP(s){return this.__data__.set(s,f),this}function gP(s){return this.__data__.has(s)}zn.prototype.add=zn.prototype.push=vP,zn.prototype.has=gP;function Ir(s){var o=this.__data__=new Yr(s);this.size=o.size}function yP(){this.__data__=new Yr,this.size=0}function mP(s){var o=this.__data__,g=o.delete(s);return this.size=o.size,g}function _P(s){return this.__data__.get(s)}function bP(s){return this.__data__.has(s)}function xP(s,o){var g=this.__data__;if(g instanceof Yr){var T=g.__data__;if(!Es||T.length<i-1)return T.push([s,o]),this.size=++g.size,this;g=this.__data__=new Zr(T)}return g.set(s,o),this.size=g.size,this}Ir.prototype.clear=yP,Ir.prototype.delete=mP,Ir.prototype.get=_P,Ir.prototype.has=bP,Ir.prototype.set=xP;function Nv(s,o){var g=Mt(s),T=!g&&Yn(s),k=!g&&!T&&En(s),$=!g&&!T&&!k&&Hi(s),H=g||T||k||$,W=H?Xu(s.length,NN):[],Q=W.length;for(var lt in s)(o||te.call(s,lt))&&!(H&&(lt=="length"||k&&(lt=="offset"||lt=="parent")||$&&(lt=="buffer"||lt=="byteLength"||lt=="byteOffset")||en(lt,Q)))&&W.push(lt);return W}function Pv(s){var o=s.length;return o?s[hf(0,o-1)]:r}function EP(s,o){return Oo(je(s),Vn(o,0,s.length))}function wP(s){return Oo(je(s))}function ef(s,o,g){(g!==r&&!Rr(s[o],g)||g===r&&!(o in s))&&Jr(s,o,g)}function Ss(s,o,g){var T=s[o];(!(te.call(s,o)&&Rr(T,g))||g===r&&!(o in s))&&Jr(s,o,g)}function po(s,o){for(var g=s.length;g--;)if(Rr(s[g][0],o))return g;return-1}function TP(s,o,g,T){return mn(s,function(k,$,H){o(T,k,g(k),H)}),T}function Mv(s,o){return s&&$r(o,Ie(o),s)}function AP(s,o){return s&&$r(o,ze(o),s)}function Jr(s,o,g){o=="__proto__"&&oo?oo(s,o,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[o]=g}function rf(s,o){for(var g=-1,T=o.length,k=rt(T),$=s==null;++g<T;)k[g]=$?r:Bf(s,o[g]);return k}function Vn(s,o,g){return s===s&&(g!==r&&(s=s<=g?s:g),o!==r&&(s=s>=o?s:o)),s}function hr(s,o,g,T,k,$){var H,W=o&d,Q=o&c,lt=o&v;if(g&&(H=k?g(s,T,k,$):g(s)),H!==r)return H;if(!pe(s))return s;var ut=Mt(s);if(ut){if(H=dM(s),!W)return je(s,H)}else{var ct=Le(s),vt=ct==gt||ct==mt;if(En(s))return ng(s,W);if(ct==Wt||ct==K||vt&&!k){if(H=Q||vt?{}:Eg(s),!W)return Q?rM(s,AP(H,s)):eM(s,Mv(H,s))}else{if(!ie[ct])return k?s:{};H=pM(s,ct,W)}}$||($=new Ir);var Et=$.get(s);if(Et)return Et;$.set(s,H),Zg(s)?s.forEach(function(Ot){H.add(hr(Ot,o,g,Ot,s,$))}):Kg(s)&&s.forEach(function(Ot,Ut){H.set(Ut,hr(Ot,o,g,Ut,s,$))});var St=lt?Q?wf:Ef:Q?ze:Ie,Ft=ut?r:St(s);return ur(Ft||s,function(Ot,Ut){Ft&&(Ut=Ot,Ot=s[Ut]),Ss(H,Ut,hr(Ot,o,g,Ut,s,$))}),H}function SP(s){var o=Ie(s);return function(g){return kv(g,s,o)}}function kv(s,o,g){var T=g.length;if(s==null)return!T;for(s=re(s);T--;){var k=g[T],$=o[k],H=s[k];if(H===r&&!(k in s)||!$(H))return!1}return!0}function Lv(s,o,g){if(typeof s!="function")throw new fr(l);return Ms(function(){s.apply(r,g)},o)}function Os(s,o,g,T){var k=-1,$=Ya,H=!0,W=s.length,Q=[],lt=o.length;if(!W)return Q;g&&(o=fe(o,tr(g))),T?($=qu,H=!1):o.length>=i&&($=bs,H=!1,o=new zn(o));t:for(;++k<W;){var ut=s[k],ct=g==null?ut:g(ut);if(ut=T||ut!==0?ut:0,H&&ct===ct){for(var vt=lt;vt--;)if(o[vt]===ct)continue t;Q.push(ut)}else $(o,ct,T)||Q.push(ut)}return Q}var mn=lg(Dr),Fv=lg(sf,!0);function OP(s,o){var g=!0;return mn(s,function(T,k,$){return g=!!o(T,k,$),g}),g}function vo(s,o,g){for(var T=-1,k=s.length;++T<k;){var $=s[T],H=o($);if(H!=null&&(W===r?H===H&&!rr(H):g(H,W)))var W=H,Q=$}return Q}function IP(s,o,g,T){var k=s.length;for(g=kt(g),g<0&&(g=-g>k?0:k+g),T=T===r||T>k?k:kt(T),T<0&&(T+=k),T=g>T?0:Qg(T);g<T;)s[g++]=o;return s}function Bv(s,o){var g=[];return mn(s,function(T,k,$){o(T,k,$)&&g.push(T)}),g}function Ne(s,o,g,T,k){var $=-1,H=s.length;for(g||(g=gM),k||(k=[]);++$<H;){var W=s[$];o>0&&g(W)?o>1?Ne(W,o-1,g,T,k):vn(k,W):T||(k[k.length]=W)}return k}var nf=ug(),Uv=ug(!0);function Dr(s,o){return s&&nf(s,o,Ie)}function sf(s,o){return s&&Uv(s,o,Ie)}function go(s,o){return pn(o,function(g){return rn(s[g])})}function Wn(s,o){o=bn(o,s);for(var g=0,T=o.length;s!=null&&g<T;)s=s[Gr(o[g++])];return g&&g==T?s:r}function Dv(s,o,g){var T=o(s);return Mt(s)?T:vn(T,g(s))}function Ue(s){return s==null?s===r?Lt:ae:jn&&jn in re(s)?fM(s):wM(s)}function af(s,o){return s>o}function RP(s,o){return s!=null&&te.call(s,o)}function CP(s,o){return s!=null&&o in re(s)}function NP(s,o,g){return s>=ke(o,g)&&s<we(o,g)}function of(s,o,g){for(var T=g?qu:Ya,k=s[0].length,$=s.length,H=$,W=rt($),Q=1/0,lt=[];H--;){var ut=s[H];H&&o&&(ut=fe(ut,tr(o))),Q=ke(ut.length,Q),W[H]=!g&&(o||k>=120&&ut.length>=120)?new zn(H&&ut):r}ut=s[0];var ct=-1,vt=W[0];t:for(;++ct<k&<.length<Q;){var Et=ut[ct],St=o?o(Et):Et;if(Et=g||Et!==0?Et:0,!(vt?bs(vt,St):T(lt,St,g))){for(H=$;--H;){var Ft=W[H];if(!(Ft?bs(Ft,St):T(s[H],St,g)))continue t}vt&&vt.push(St),lt.push(Et)}}return lt}function PP(s,o,g,T){return Dr(s,function(k,$,H){o(T,g(k),$,H)}),T}function Is(s,o,g){o=bn(o,s),s=Sg(s,o);var T=s==null?s:s[Gr(pr(o))];return T==null?r:Qe(T,s,g)}function $v(s){return ge(s)&&Ue(s)==K}function MP(s){return ge(s)&&Ue(s)==Be}function kP(s){return ge(s)&&Ue(s)==et}function Rs(s,o,g,T,k){return s===o?!0:s==null||o==null||!ge(s)&&!ge(o)?s!==s&&o!==o:LP(s,o,g,T,Rs,k)}function LP(s,o,g,T,k,$){var H=Mt(s),W=Mt(o),Q=H?G:Le(s),lt=W?G:Le(o);Q=Q==K?Wt:Q,lt=lt==K?Wt:lt;var ut=Q==Wt,ct=lt==Wt,vt=Q==lt;if(vt&&En(s)){if(!En(o))return!1;H=!0,ut=!1}if(vt&&!ut)return $||($=new Ir),H||Hi(s)?_g(s,o,g,T,k,$):lM(s,o,Q,g,T,k,$);if(!(g&y)){var Et=ut&&te.call(s,"__wrapped__"),St=ct&&te.call(o,"__wrapped__");if(Et||St){var Ft=Et?s.value():s,Ot=St?o.value():o;return $||($=new Ir),k(Ft,Ot,g,T,$)}}return vt?($||($=new Ir),uM(s,o,g,T,k,$)):!1}function FP(s){return ge(s)&&Le(s)==xt}function lf(s,o,g,T){var k=g.length,$=k,H=!T;if(s==null)return!$;for(s=re(s);k--;){var W=g[k];if(H&&W[2]?W[1]!==s[W[0]]:!(W[0]in s))return!1}for(;++k<$;){W=g[k];var Q=W[0],lt=s[Q],ut=W[1];if(H&&W[2]){if(lt===r&&!(Q in s))return!1}else{var ct=new Ir;if(T)var vt=T(lt,ut,Q,s,o,ct);if(!(vt===r?Rs(ut,lt,y|m,T,ct):vt))return!1}}return!0}function Gv(s){if(!pe(s)||mM(s))return!1;var o=rn(s)?FN:SC;return o.test(Kn(s))}function BP(s){return ge(s)&&Ue(s)==dt}function UP(s){return ge(s)&&Le(s)==pt}function DP(s){return ge(s)&&Mo(s.length)&&!!oe[Ue(s)]}function qv(s){return typeof s=="function"?s:s==null?Ve:typeof s=="object"?Mt(s)?zv(s[0],s[1]):Hv(s):fy(s)}function uf(s){if(!Ps(s))return qN(s);var o=[];for(var g in re(s))te.call(s,g)&&g!="constructor"&&o.push(g);return o}function $P(s){if(!pe(s))return EM(s);var o=Ps(s),g=[];for(var T in s)T=="constructor"&&(o||!te.call(s,T))||g.push(T);return g}function ff(s,o){return s<o}function jv(s,o){var g=-1,T=He(s)?rt(s.length):[];return mn(s,function(k,$,H){T[++g]=o(k,$,H)}),T}function Hv(s){var o=Af(s);return o.length==1&&o[0][2]?Tg(o[0][0],o[0][1]):function(g){return g===s||lf(g,s,o)}}function zv(s,o){return Of(s)&&wg(o)?Tg(Gr(s),o):function(g){var T=Bf(g,s);return T===r&&T===o?Uf(g,s):Rs(o,T,y|m)}}function yo(s,o,g,T,k){s!==o&&nf(o,function($,H){if(k||(k=new Ir),pe($))GP(s,o,H,g,yo,T,k);else{var W=T?T(Rf(s,H),$,H+"",s,o,k):r;W===r&&(W=$),ef(s,H,W)}},ze)}function GP(s,o,g,T,k,$,H){var W=Rf(s,g),Q=Rf(o,g),lt=H.get(Q);if(lt){ef(s,g,lt);return}var ut=$?$(W,Q,g+"",s,o,H):r,ct=ut===r;if(ct){var vt=Mt(Q),Et=!vt&&En(Q),St=!vt&&!Et&&Hi(Q);ut=Q,vt||Et||St?Mt(W)?ut=W:me(W)?ut=je(W):Et?(ct=!1,ut=ng(Q,!0)):St?(ct=!1,ut=ig(Q,!0)):ut=[]:ks(Q)||Yn(Q)?(ut=W,Yn(W)?ut=ty(W):(!pe(W)||rn(W))&&(ut=Eg(Q))):ct=!1}ct&&(H.set(Q,ut),k(ut,Q,T,$,H),H.delete(Q)),ef(s,g,ut)}function Vv(s,o){var g=s.length;if(g)return o+=o<0?g:0,en(o,g)?s[o]:r}function Wv(s,o,g){o.length?o=fe(o,function($){return Mt($)?function(H){return Wn(H,$.length===1?$[0]:$)}:$}):o=[Ve];var T=-1;o=fe(o,tr(At()));var k=jv(s,function($,H,W){var Q=fe(o,function(lt){return lt($)});return{criteria:Q,index:++T,value:$}});return pN(k,function($,H){return tM($,H,g)})}function qP(s,o){return Xv(s,o,function(g,T){return Uf(s,T)})}function Xv(s,o,g){for(var T=-1,k=o.length,$={};++T<k;){var H=o[T],W=Wn(s,H);g(W,H)&&Cs($,bn(H,s),W)}return $}function jP(s){return function(o){return Wn(o,s)}}function cf(s,o,g,T){var k=T?dN:Mi,$=-1,H=o.length,W=s;for(s===o&&(o=je(o)),g&&(W=fe(s,tr(g)));++$<H;)for(var Q=0,lt=o[$],ut=g?g(lt):lt;(Q=k(W,ut,Q,T))>-1;)W!==s&&ao.call(W,Q,1),ao.call(s,Q,1);return s}function Kv(s,o){for(var g=s?o.length:0,T=g-1;g--;){var k=o[g];if(g==T||k!==$){var $=k;en(k)?ao.call(s,k,1):vf(s,k)}}return s}function hf(s,o){return s+uo(Rv()*(o-s+1))}function HP(s,o,g,T){for(var k=-1,$=we(lo((o-s)/(g||1)),0),H=rt($);$--;)H[T?$:++k]=s,s+=g;return H}function df(s,o){var g="";if(!s||o<1||o>it)return g;do o%2&&(g+=s),o=uo(o/2),o&&(s+=s);while(o);return g}function Bt(s,o){return Cf(Ag(s,o,Ve),s+"")}function zP(s){return Pv(zi(s))}function VP(s,o){var g=zi(s);return Oo(g,Vn(o,0,g.length))}function Cs(s,o,g,T){if(!pe(s))return s;o=bn(o,s);for(var k=-1,$=o.length,H=$-1,W=s;W!=null&&++k<$;){var Q=Gr(o[k]),lt=g;if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return s;if(k!=H){var ut=W[Q];lt=T?T(ut,Q,W):r,lt===r&&(lt=pe(ut)?ut:en(o[k+1])?[]:{})}Ss(W,Q,lt),W=W[Q]}return s}var Yv=fo?function(s,o){return fo.set(s,o),s}:Ve,WP=oo?function(s,o){return oo(s,"toString",{configurable:!0,enumerable:!1,value:$f(o),writable:!0})}:Ve;function XP(s){return Oo(zi(s))}function dr(s,o,g){var T=-1,k=s.length;o<0&&(o=-o>k?0:k+o),g=g>k?k:g,g<0&&(g+=k),k=o>g?0:g-o>>>0,o>>>=0;for(var $=rt(k);++T<k;)$[T]=s[T+o];return $}function KP(s,o){var g;return mn(s,function(T,k,$){return g=o(T,k,$),!g}),!!g}function mo(s,o,g){var T=0,k=s==null?T:s.length;if(typeof o=="number"&&o===o&&k<=q){for(;T<k;){var $=T+k>>>1,H=s[$];H!==null&&!rr(H)&&(g?H<=o:H<o)?T=$+1:k=$}return k}return pf(s,o,Ve,g)}function pf(s,o,g,T){var k=0,$=s==null?0:s.length;if($===0)return 0;o=g(o);for(var H=o!==o,W=o===null,Q=rr(o),lt=o===r;k<$;){var ut=uo((k+$)/2),ct=g(s[ut]),vt=ct!==r,Et=ct===null,St=ct===ct,Ft=rr(ct);if(H)var Ot=T||St;else lt?Ot=St&&(T||vt):W?Ot=St&&vt&&(T||!Et):Q?Ot=St&&vt&&!Et&&(T||!Ft):Et||Ft?Ot=!1:Ot=T?ct<=o:ct<o;Ot?k=ut+1:$=ut}return ke($,D)}function Zv(s,o){for(var g=-1,T=s.length,k=0,$=[];++g<T;){var H=s[g],W=o?o(H):H;if(!g||!Rr(W,Q)){var Q=W;$[k++]=H===0?0:H}}return $}function Jv(s){return typeof s=="number"?s:rr(s)?U:+s}function er(s){if(typeof s=="string")return s;if(Mt(s))return fe(s,er)+"";if(rr(s))return Cv?Cv.call(s):"";var o=s+"";return o=="0"&&1/s==-V?"-0":o}function _n(s,o,g){var T=-1,k=Ya,$=s.length,H=!0,W=[],Q=W;if(g)H=!1,k=qu;else if($>=i){var lt=o?null:aM(s);if(lt)return Ja(lt);H=!1,k=bs,Q=new zn}else Q=o?[]:W;t:for(;++T<$;){var ut=s[T],ct=o?o(ut):ut;if(ut=g||ut!==0?ut:0,H&&ct===ct){for(var vt=Q.length;vt--;)if(Q[vt]===ct)continue t;o&&Q.push(ct),W.push(ut)}else k(Q,ct,g)||(Q!==W&&Q.push(ct),W.push(ut))}return W}function vf(s,o){return o=bn(o,s),s=Sg(s,o),s==null||delete s[Gr(pr(o))]}function Qv(s,o,g,T){return Cs(s,o,g(Wn(s,o)),T)}function _o(s,o,g,T){for(var k=s.length,$=T?k:-1;(T?$--:++$<k)&&o(s[$],$,s););return g?dr(s,T?0:$,T?$+1:k):dr(s,T?$+1:0,T?k:$)}function tg(s,o){var g=s;return g instanceof $t&&(g=g.value()),ju(o,function(T,k){return k.func.apply(k.thisArg,vn([T],k.args))},g)}function gf(s,o,g){var T=s.length;if(T<2)return T?_n(s[0]):[];for(var k=-1,$=rt(T);++k<T;)for(var H=s[k],W=-1;++W<T;)W!=k&&($[k]=Os($[k]||H,s[W],o,g));return _n(Ne($,1),o,g)}function eg(s,o,g){for(var T=-1,k=s.length,$=o.length,H={};++T<k;){var W=T<$?o[T]:r;g(H,s[T],W)}return H}function yf(s){return me(s)?s:[]}function mf(s){return typeof s=="function"?s:Ve}function bn(s,o){return Mt(s)?s:Of(s,o)?[s]:Cg(Yt(s))}var YP=Bt;function xn(s,o,g){var T=s.length;return g=g===r?T:g,!o&&g>=T?s:dr(s,o,g)}var rg=BN||function(s){return Ce.clearTimeout(s)};function ng(s,o){if(o)return s.slice();var g=s.length,T=Tv?Tv(g):new s.constructor(g);return s.copy(T),T}function _f(s){var o=new s.constructor(s.byteLength);return new io(o).set(new io(s)),o}function ZP(s,o){var g=o?_f(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function JP(s){var o=new s.constructor(s.source,$p.exec(s));return o.lastIndex=s.lastIndex,o}function QP(s){return As?re(As.call(s)):{}}function ig(s,o){var g=o?_f(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function sg(s,o){if(s!==o){var g=s!==r,T=s===null,k=s===s,$=rr(s),H=o!==r,W=o===null,Q=o===o,lt=rr(o);if(!W&&!lt&&!$&&s>o||$&&H&&Q&&!W&&!lt||T&&H&&Q||!g&&Q||!k)return 1;if(!T&&!$&&!lt&&s<o||lt&&g&&k&&!T&&!$||W&&g&&k||!H&&k||!Q)return-1}return 0}function tM(s,o,g){for(var T=-1,k=s.criteria,$=o.criteria,H=k.length,W=g.length;++T<H;){var Q=sg(k[T],$[T]);if(Q){if(T>=W)return Q;var lt=g[T];return Q*(lt=="desc"?-1:1)}}return s.index-o.index}function ag(s,o,g,T){for(var k=-1,$=s.length,H=g.length,W=-1,Q=o.length,lt=we($-H,0),ut=rt(Q+lt),ct=!T;++W<Q;)ut[W]=o[W];for(;++k<H;)(ct||k<$)&&(ut[g[k]]=s[k]);for(;lt--;)ut[W++]=s[k++];return ut}function og(s,o,g,T){for(var k=-1,$=s.length,H=-1,W=g.length,Q=-1,lt=o.length,ut=we($-W,0),ct=rt(ut+lt),vt=!T;++k<ut;)ct[k]=s[k];for(var Et=k;++Q<lt;)ct[Et+Q]=o[Q];for(;++H<W;)(vt||k<$)&&(ct[Et+g[H]]=s[k++]);return ct}function je(s,o){var g=-1,T=s.length;for(o||(o=rt(T));++g<T;)o[g]=s[g];return o}function $r(s,o,g,T){var k=!g;g||(g={});for(var $=-1,H=o.length;++$<H;){var W=o[$],Q=T?T(g[W],s[W],W,g,s):r;Q===r&&(Q=s[W]),k?Jr(g,W,Q):Ss(g,W,Q)}return g}function eM(s,o){return $r(s,Sf(s),o)}function rM(s,o){return $r(s,bg(s),o)}function bo(s,o){return function(g,T){var k=Mt(g)?oN:TP,$=o?o():{};return k(g,s,At(T,2),$)}}function Gi(s){return Bt(function(o,g){var T=-1,k=g.length,$=k>1?g[k-1]:r,H=k>2?g[2]:r;for($=s.length>3&&typeof $=="function"?(k--,$):r,H&&De(g[0],g[1],H)&&($=k<3?r:$,k=1),o=re(o);++T<k;){var W=g[T];W&&s(o,W,T,$)}return o})}function lg(s,o){return function(g,T){if(g==null)return g;if(!He(g))return s(g,T);for(var k=g.length,$=o?k:-1,H=re(g);(o?$--:++$<k)&&T(H[$],$,H)!==!1;);return g}}function ug(s){return function(o,g,T){for(var k=-1,$=re(o),H=T(o),W=H.length;W--;){var Q=H[s?W:++k];if(g($[Q],Q,$)===!1)break}return o}}function nM(s,o,g){var T=o&_,k=Ns(s);function $(){var H=this&&this!==Ce&&this instanceof $?k:s;return H.apply(T?g:this,arguments)}return $}function fg(s){return function(o){o=Yt(o);var g=ki(o)?Or(o):r,T=g?g[0]:o.charAt(0),k=g?xn(g,1).join(""):o.slice(1);return T[s]()+k}}function qi(s){return function(o){return ju(ly(oy(o).replace(WC,"")),s,"")}}function Ns(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var g=$i(s.prototype),T=s.apply(g,o);return pe(T)?T:g}}function iM(s,o,g){var T=Ns(s);function k(){for(var $=arguments.length,H=rt($),W=$,Q=ji(k);W--;)H[W]=arguments[W];var lt=$<3&&H[0]!==Q&&H[$-1]!==Q?[]:gn(H,Q);if($-=lt.length,$<g)return vg(s,o,xo,k.placeholder,r,H,lt,r,r,g-$);var ut=this&&this!==Ce&&this instanceof k?T:s;return Qe(ut,this,H)}return k}function cg(s){return function(o,g,T){var k=re(o);if(!He(o)){var $=At(g,3);o=Ie(o),g=function(W){return $(k[W],W,k)}}var H=s(o,g,T);return H>-1?k[$?o[H]:H]:r}}function hg(s){return tn(function(o){var g=o.length,T=g,k=cr.prototype.thru;for(s&&o.reverse();T--;){var $=o[T];if(typeof $!="function")throw new fr(l);if(k&&!H&&Ao($)=="wrapper")var H=new cr([],!0)}for(T=H?T:g;++T<g;){$=o[T];var W=Ao($),Q=W=="wrapper"?Tf($):r;Q&&If(Q[0])&&Q[1]==(S|w|A|O)&&!Q[4].length&&Q[9]==1?H=H[Ao(Q[0])].apply(H,Q[3]):H=$.length==1&&If($)?H[W]():H.thru($)}return function(){var lt=arguments,ut=lt[0];if(H&<.length==1&&Mt(ut))return H.plant(ut).value();for(var ct=0,vt=g?o[ct].apply(this,lt):ut;++ct<g;)vt=o[ct].call(this,vt);return vt}})}function xo(s,o,g,T,k,$,H,W,Q,lt){var ut=o&S,ct=o&_,vt=o&b,Et=o&(w|x),St=o&L,Ft=vt?r:Ns(s);function Ot(){for(var Ut=arguments.length,qt=rt(Ut),nr=Ut;nr--;)qt[nr]=arguments[nr];if(Et)var $e=ji(Ot),ir=gN(qt,$e);if(T&&(qt=ag(qt,T,k,Et)),$&&(qt=og(qt,$,H,Et)),Ut-=ir,Et&&Ut<lt){var _e=gn(qt,$e);return vg(s,o,xo,Ot.placeholder,g,qt,_e,W,Q,lt-Ut)}var Cr=ct?g:this,sn=vt?Cr[s]:s;return Ut=qt.length,W?qt=TM(qt,W):St&&Ut>1&&qt.reverse(),ut&&Q<Ut&&(qt.length=Q),this&&this!==Ce&&this instanceof Ot&&(sn=Ft||Ns(sn)),sn.apply(Cr,qt)}return Ot}function dg(s,o){return function(g,T){return PP(g,s,o(T),{})}}function Eo(s,o){return function(g,T){var k;if(g===r&&T===r)return o;if(g!==r&&(k=g),T!==r){if(k===r)return T;typeof g=="string"||typeof T=="string"?(g=er(g),T=er(T)):(g=Jv(g),T=Jv(T)),k=s(g,T)}return k}}function bf(s){return tn(function(o){return o=fe(o,tr(At())),Bt(function(g){var T=this;return s(o,function(k){return Qe(k,T,g)})})})}function wo(s,o){o=o===r?" ":er(o);var g=o.length;if(g<2)return g?df(o,s):o;var T=df(o,lo(s/Li(o)));return ki(o)?xn(Or(T),0,s).join(""):T.slice(0,s)}function sM(s,o,g,T){var k=o&_,$=Ns(s);function H(){for(var W=-1,Q=arguments.length,lt=-1,ut=T.length,ct=rt(ut+Q),vt=this&&this!==Ce&&this instanceof H?$:s;++lt<ut;)ct[lt]=T[lt];for(;Q--;)ct[lt++]=arguments[++W];return Qe(vt,k?g:this,ct)}return H}function pg(s){return function(o,g,T){return T&&typeof T!="number"&&De(o,g,T)&&(g=T=r),o=nn(o),g===r?(g=o,o=0):g=nn(g),T=T===r?o<g?1:-1:nn(T),HP(o,g,T,s)}}function To(s){return function(o,g){return typeof o=="string"&&typeof g=="string"||(o=vr(o),g=vr(g)),s(o,g)}}function vg(s,o,g,T,k,$,H,W,Q,lt){var ut=o&w,ct=ut?H:r,vt=ut?r:H,Et=ut?$:r,St=ut?r:$;o|=ut?A:P,o&=~(ut?P:A),o&E||(o&=~(_|b));var Ft=[s,o,k,Et,ct,St,vt,W,Q,lt],Ot=g.apply(r,Ft);return If(s)&&Og(Ot,Ft),Ot.placeholder=T,Ig(Ot,s,o)}function xf(s){var o=Ee[s];return function(g,T){if(g=vr(g),T=T==null?0:ke(kt(T),292),T&&Iv(g)){var k=(Yt(g)+"e").split("e"),$=o(k[0]+"e"+(+k[1]+T));return k=(Yt($)+"e").split("e"),+(k[0]+"e"+(+k[1]-T))}return o(g)}}var aM=Ui&&1/Ja(new Ui([,-0]))[1]==V?function(s){return new Ui(s)}:jf;function gg(s){return function(o){var g=Le(o);return g==xt?Yu(o):g==pt?wN(o):vN(o,s(o))}}function Qr(s,o,g,T,k,$,H,W){var Q=o&b;if(!Q&&typeof s!="function")throw new fr(l);var lt=T?T.length:0;if(lt||(o&=~(A|P),T=k=r),H=H===r?H:we(kt(H),0),W=W===r?W:kt(W),lt-=k?k.length:0,o&P){var ut=T,ct=k;T=k=r}var vt=Q?r:Tf(s),Et=[s,o,g,T,k,ut,ct,$,H,W];if(vt&&xM(Et,vt),s=Et[0],o=Et[1],g=Et[2],T=Et[3],k=Et[4],W=Et[9]=Et[9]===r?Q?0:s.length:we(Et[9]-lt,0),!W&&o&(w|x)&&(o&=~(w|x)),!o||o==_)var St=nM(s,o,g);else o==w||o==x?St=iM(s,o,W):(o==A||o==(_|A))&&!k.length?St=sM(s,o,g,T):St=xo.apply(r,Et);var Ft=vt?Yv:Og;return Ig(Ft(St,Et),s,o)}function yg(s,o,g,T){return s===r||Rr(s,Bi[g])&&!te.call(T,g)?o:s}function mg(s,o,g,T,k,$){return pe(s)&&pe(o)&&($.set(o,s),yo(s,o,r,mg,$),$.delete(o)),s}function oM(s){return ks(s)?r:s}function _g(s,o,g,T,k,$){var H=g&y,W=s.length,Q=o.length;if(W!=Q&&!(H&&Q>W))return!1;var lt=$.get(s),ut=$.get(o);if(lt&&ut)return lt==o&&ut==s;var ct=-1,vt=!0,Et=g&m?new zn:r;for($.set(s,o),$.set(o,s);++ct<W;){var St=s[ct],Ft=o[ct];if(T)var Ot=H?T(Ft,St,ct,o,s,$):T(St,Ft,ct,s,o,$);if(Ot!==r){if(Ot)continue;vt=!1;break}if(Et){if(!Hu(o,function(Ut,qt){if(!bs(Et,qt)&&(St===Ut||k(St,Ut,g,T,$)))return Et.push(qt)})){vt=!1;break}}else if(!(St===Ft||k(St,Ft,g,T,$))){vt=!1;break}}return $.delete(s),$.delete(o),vt}function lM(s,o,g,T,k,$,H){switch(g){case Kt:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Be:return!(s.byteLength!=o.byteLength||!$(new io(s),new io(o)));case tt:case et:case It:return Rr(+s,+o);case ht:return s.name==o.name&&s.message==o.message;case dt:case ft:return s==o+"";case xt:var W=Yu;case pt:var Q=T&y;if(W||(W=Ja),s.size!=o.size&&!Q)return!1;var lt=H.get(s);if(lt)return lt==o;T|=m,H.set(s,o);var ut=_g(W(s),W(o),T,k,$,H);return H.delete(s),ut;case Nt:if(As)return As.call(s)==As.call(o)}return!1}function uM(s,o,g,T,k,$){var H=g&y,W=Ef(s),Q=W.length,lt=Ef(o),ut=lt.length;if(Q!=ut&&!H)return!1;for(var ct=Q;ct--;){var vt=W[ct];if(!(H?vt in o:te.call(o,vt)))return!1}var Et=$.get(s),St=$.get(o);if(Et&&St)return Et==o&&St==s;var Ft=!0;$.set(s,o),$.set(o,s);for(var Ot=H;++ct<Q;){vt=W[ct];var Ut=s[vt],qt=o[vt];if(T)var nr=H?T(qt,Ut,vt,o,s,$):T(Ut,qt,vt,s,o,$);if(!(nr===r?Ut===qt||k(Ut,qt,g,T,$):nr)){Ft=!1;break}Ot||(Ot=vt=="constructor")}if(Ft&&!Ot){var $e=s.constructor,ir=o.constructor;$e!=ir&&"constructor"in s&&"constructor"in o&&!(typeof $e=="function"&&$e instanceof $e&&typeof ir=="function"&&ir instanceof ir)&&(Ft=!1)}return $.delete(s),$.delete(o),Ft}function tn(s){return Cf(Ag(s,r,kg),s+"")}function Ef(s){return Dv(s,Ie,Sf)}function wf(s){return Dv(s,ze,bg)}var Tf=fo?function(s){return fo.get(s)}:jf;function Ao(s){for(var o=s.name+"",g=Di[o],T=te.call(Di,o)?g.length:0;T--;){var k=g[T],$=k.func;if($==null||$==s)return k.name}return o}function ji(s){var o=te.call(B,"placeholder")?B:s;return o.placeholder}function At(){var s=B.iteratee||Gf;return s=s===Gf?qv:s,arguments.length?s(arguments[0],arguments[1]):s}function So(s,o){var g=s.__data__;return yM(o)?g[typeof o=="string"?"string":"hash"]:g.map}function Af(s){for(var o=Ie(s),g=o.length;g--;){var T=o[g],k=s[T];o[g]=[T,k,wg(k)]}return o}function Xn(s,o){var g=bN(s,o);return Gv(g)?g:r}function fM(s){var o=te.call(s,jn),g=s[jn];try{s[jn]=r;var T=!0}catch{}var k=ro.call(s);return T&&(o?s[jn]=g:delete s[jn]),k}var Sf=Ju?function(s){return s==null?[]:(s=re(s),pn(Ju(s),function(o){return Sv.call(s,o)}))}:Hf,bg=Ju?function(s){for(var o=[];s;)vn(o,Sf(s)),s=so(s);return o}:Hf,Le=Ue;(Qu&&Le(new Qu(new ArrayBuffer(1)))!=Kt||Es&&Le(new Es)!=xt||tf&&Le(tf.resolve())!=st||Ui&&Le(new Ui)!=pt||ws&&Le(new ws)!=Pt)&&(Le=function(s){var o=Ue(s),g=o==Wt?s.constructor:r,T=g?Kn(g):"";if(T)switch(T){case VN:return Kt;case WN:return xt;case XN:return st;case KN:return pt;case YN:return Pt}return o});function cM(s,o,g){for(var T=-1,k=g.length;++T<k;){var $=g[T],H=$.size;switch($.type){case"drop":s+=H;break;case"dropRight":o-=H;break;case"take":o=ke(o,s+H);break;case"takeRight":s=we(s,o-H);break}}return{start:s,end:o}}function hM(s){var o=s.match(mC);return o?o[1].split(_C):[]}function xg(s,o,g){o=bn(o,s);for(var T=-1,k=o.length,$=!1;++T<k;){var H=Gr(o[T]);if(!($=s!=null&&g(s,H)))break;s=s[H]}return $||++T!=k?$:(k=s==null?0:s.length,!!k&&Mo(k)&&en(H,k)&&(Mt(s)||Yn(s)))}function dM(s){var o=s.length,g=new s.constructor(o);return o&&typeof s[0]=="string"&&te.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function Eg(s){return typeof s.constructor=="function"&&!Ps(s)?$i(so(s)):{}}function pM(s,o,g){var T=s.constructor;switch(o){case Be:return _f(s);case tt:case et:return new T(+s);case Kt:return ZP(s,g);case _s:case ue:case or:case Ou:case Iu:case Ru:case Cu:case Nu:case Pu:return ig(s,g);case xt:return new T;case It:case ft:return new T(s);case dt:return JP(s);case pt:return new T;case Nt:return QP(s)}}function vM(s,o){var g=o.length;if(!g)return s;var T=g-1;return o[T]=(g>1?"& ":"")+o[T],o=o.join(g>2?", ":" "),s.replace(yC,`{
|
|
557
|
+
*/Va.exports,function(e,t){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",d=1,c=2,v=4,y=1,_=2,b=1,m=2,E=4,w=8,x=16,A=32,P=64,S=128,O=256,L=512,R=30,I="...",M=800,C=16,F=1,j=2,X=3,V=1/0,st=9007199254740991,Y=17976931348623157e292,U=0/0,N=4294967295,D=N-1,q=N>>>1,Z=[["ary",S],["bind",b],["bindKey",m],["curry",w],["curryRight",x],["flip",L],["partial",A],["partialRight",P],["rearg",O]],K="[object Arguments]",G="[object Array]",z="[object AsyncFunction]",tt="[object Boolean]",et="[object Date]",nt="[object DOMException]",ht="[object Error]",vt="[object Function]",mt="[object GeneratorFunction]",xt="[object Map]",Rt="[object Number]",ve="[object Null]",Wt="[object Object]",it="[object Promise]",ot="[object Proxy]",dt="[object RegExp]",pt="[object Set]",ft="[object String]",Nt="[object Symbol]",Lt="[object Undefined]",Pt="[object WeakMap]",je="[object WeakSet]",Be="[object ArrayBuffer]",Kt="[object DataView]",_s="[object Float32Array]",le="[object Float64Array]",or="[object Int8Array]",Ou="[object Int16Array]",Iu="[object Int32Array]",Ru="[object Uint8Array]",Cu="[object Uint8ClampedArray]",Nu="[object Uint16Array]",Pu="[object Uint32Array]",sC=/\b__p \+= '';/g,aC=/\b(__p \+=) '' \+/g,oC=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bp=/&(?:amp|lt|gt|quot|#39);/g,Up=/[&<>"']/g,lC=RegExp(Bp.source),uC=RegExp(Up.source),fC=/<%-([\s\S]+?)%>/g,cC=/<%([\s\S]+?)%>/g,Dp=/<%=([\s\S]+?)%>/g,hC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dC=/^\w*$/,pC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mu=/[\\^$.*+?()[\]{}|]/g,vC=RegExp(Mu.source),ku=/^\s+/,gC=/\s/,yC=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,mC=/\{\n\/\* \[wrapped with (.+)\] \*/,_C=/,? & /,bC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xC=/[()=,{}\[\]\/\s]/,EC=/\\(\\)?/g,wC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$p=/\w*$/,TC=/^[-+]0x[0-9a-f]+$/i,AC=/^0b[01]+$/i,SC=/^\[object .+?Constructor\]$/,OC=/^0o[0-7]+$/i,IC=/^(?:0|[1-9]\d*)$/,RC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wa=/($^)/,CC=/['\n\r\u2028\u2029\\]/g,Xa="\\ud800-\\udfff",NC="\\u0300-\\u036f",PC="\\ufe20-\\ufe2f",MC="\\u20d0-\\u20ff",Gp=NC+PC+MC,qp="\\u2700-\\u27bf",jp="a-z\\xdf-\\xf6\\xf8-\\xff",kC="\\xac\\xb1\\xd7\\xf7",LC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",FC="\\u2000-\\u206f",BC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hp="A-Z\\xc0-\\xd6\\xd8-\\xde",zp="\\ufe0e\\ufe0f",Vp=kC+LC+FC+BC,Lu="['’]",UC="["+Xa+"]",Wp="["+Vp+"]",Ka="["+Gp+"]",Xp="\\d+",DC="["+qp+"]",Kp="["+jp+"]",Yp="[^"+Xa+Vp+Xp+qp+jp+Hp+"]",Fu="\\ud83c[\\udffb-\\udfff]",$C="(?:"+Ka+"|"+Fu+")",Zp="[^"+Xa+"]",Bu="(?:\\ud83c[\\udde6-\\uddff]){2}",Uu="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+Hp+"]",Jp="\\u200d",Qp="(?:"+Kp+"|"+Yp+")",GC="(?:"+Pi+"|"+Yp+")",tv="(?:"+Lu+"(?:d|ll|m|re|s|t|ve))?",ev="(?:"+Lu+"(?:D|LL|M|RE|S|T|VE))?",rv=$C+"?",nv="["+zp+"]?",qC="(?:"+Jp+"(?:"+[Zp,Bu,Uu].join("|")+")"+nv+rv+")*",jC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",iv=nv+rv+qC,zC="(?:"+[DC,Bu,Uu].join("|")+")"+iv,VC="(?:"+[Zp+Ka+"?",Ka,Bu,Uu,UC].join("|")+")",WC=RegExp(Lu,"g"),XC=RegExp(Ka,"g"),Du=RegExp(Fu+"(?="+Fu+")|"+VC+iv,"g"),KC=RegExp([Pi+"?"+Kp+"+"+tv+"(?="+[Wp,Pi,"$"].join("|")+")",GC+"+"+ev+"(?="+[Wp,Pi+Qp,"$"].join("|")+")",Pi+"?"+Qp+"+"+tv,Pi+"+"+ev,HC,jC,Xp,zC].join("|"),"g"),YC=RegExp("["+Jp+Xa+Gp+zp+"]"),ZC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,JC=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],QC=-1,ae={};ae[_s]=ae[le]=ae[or]=ae[Ou]=ae[Iu]=ae[Ru]=ae[Cu]=ae[Nu]=ae[Pu]=!0,ae[K]=ae[G]=ae[Be]=ae[tt]=ae[Kt]=ae[et]=ae[ht]=ae[vt]=ae[xt]=ae[Rt]=ae[Wt]=ae[dt]=ae[pt]=ae[ft]=ae[Pt]=!1;var ie={};ie[K]=ie[G]=ie[Be]=ie[Kt]=ie[tt]=ie[et]=ie[_s]=ie[le]=ie[or]=ie[Ou]=ie[Iu]=ie[xt]=ie[Rt]=ie[Wt]=ie[dt]=ie[pt]=ie[ft]=ie[Nt]=ie[Ru]=ie[Cu]=ie[Nu]=ie[Pu]=!0,ie[ht]=ie[vt]=ie[Pt]=!1;var tN={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},eN={"&":"&","<":"<",">":">",'"':""","'":"'"},rN={"&":"&","<":"<",">":">",""":'"',"'":"'"},nN={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},iN=parseFloat,sN=parseInt,sv=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,aN=typeof self=="object"&&self&&self.Object===Object&&self,Ce=sv||aN||Function("return this")(),$u=t&&!t.nodeType&&t,qn=$u&&!0&&e&&!e.nodeType&&e,av=qn&&qn.exports===$u,Gu=av&&sv.process,lr=function(){try{var J=qn&&qn.require&&qn.require("util").types;return J||Gu&&Gu.binding&&Gu.binding("util")}catch{}}(),ov=lr&&lr.isArrayBuffer,lv=lr&&lr.isDate,uv=lr&&lr.isMap,fv=lr&&lr.isRegExp,cv=lr&&lr.isSet,hv=lr&&lr.isTypedArray;function Qe(J,at,rt){switch(rt.length){case 0:return J.call(at);case 1:return J.call(at,rt[0]);case 2:return J.call(at,rt[0],rt[1]);case 3:return J.call(at,rt[0],rt[1],rt[2])}return J.apply(at,rt)}function oN(J,at,rt,bt){for(var Ct=-1,Xt=J==null?0:J.length;++Ct<Xt;){var Ee=J[Ct];at(bt,Ee,rt(Ee),J)}return bt}function ur(J,at){for(var rt=-1,bt=J==null?0:J.length;++rt<bt&&at(J[rt],rt,J)!==!1;);return J}function lN(J,at){for(var rt=J==null?0:J.length;rt--&&at(J[rt],rt,J)!==!1;);return J}function dv(J,at){for(var rt=-1,bt=J==null?0:J.length;++rt<bt;)if(!at(J[rt],rt,J))return!1;return!0}function pn(J,at){for(var rt=-1,bt=J==null?0:J.length,Ct=0,Xt=[];++rt<bt;){var Ee=J[rt];at(Ee,rt,J)&&(Xt[Ct++]=Ee)}return Xt}function Ya(J,at){var rt=J==null?0:J.length;return!!rt&&Mi(J,at,0)>-1}function qu(J,at,rt){for(var bt=-1,Ct=J==null?0:J.length;++bt<Ct;)if(rt(at,J[bt]))return!0;return!1}function ue(J,at){for(var rt=-1,bt=J==null?0:J.length,Ct=Array(bt);++rt<bt;)Ct[rt]=at(J[rt],rt,J);return Ct}function vn(J,at){for(var rt=-1,bt=at.length,Ct=J.length;++rt<bt;)J[Ct+rt]=at[rt];return J}function ju(J,at,rt,bt){var Ct=-1,Xt=J==null?0:J.length;for(bt&&Xt&&(rt=J[++Ct]);++Ct<Xt;)rt=at(rt,J[Ct],Ct,J);return rt}function uN(J,at,rt,bt){var Ct=J==null?0:J.length;for(bt&&Ct&&(rt=J[--Ct]);Ct--;)rt=at(rt,J[Ct],Ct,J);return rt}function Hu(J,at){for(var rt=-1,bt=J==null?0:J.length;++rt<bt;)if(at(J[rt],rt,J))return!0;return!1}var fN=zu("length");function cN(J){return J.split("")}function hN(J){return J.match(bC)||[]}function pv(J,at,rt){var bt;return rt(J,function(Ct,Xt,Ee){if(at(Ct,Xt,Ee))return bt=Xt,!1}),bt}function Za(J,at,rt,bt){for(var Ct=J.length,Xt=rt+(bt?1:-1);bt?Xt--:++Xt<Ct;)if(at(J[Xt],Xt,J))return Xt;return-1}function Mi(J,at,rt){return at===at?TN(J,at,rt):Za(J,vv,rt)}function dN(J,at,rt,bt){for(var Ct=rt-1,Xt=J.length;++Ct<Xt;)if(bt(J[Ct],at))return Ct;return-1}function vv(J){return J!==J}function gv(J,at){var rt=J==null?0:J.length;return rt?Wu(J,at)/rt:U}function zu(J){return function(at){return at==null?r:at[J]}}function Vu(J){return function(at){return J==null?r:J[at]}}function yv(J,at,rt,bt,Ct){return Ct(J,function(Xt,Ee,re){rt=bt?(bt=!1,Xt):at(rt,Xt,Ee,re)}),rt}function pN(J,at){var rt=J.length;for(J.sort(at);rt--;)J[rt]=J[rt].value;return J}function Wu(J,at){for(var rt,bt=-1,Ct=J.length;++bt<Ct;){var Xt=at(J[bt]);Xt!==r&&(rt=rt===r?Xt:rt+Xt)}return rt}function Xu(J,at){for(var rt=-1,bt=Array(J);++rt<J;)bt[rt]=at(rt);return bt}function vN(J,at){return ue(at,function(rt){return[rt,J[rt]]})}function mv(J){return J&&J.slice(0,Ev(J)+1).replace(ku,"")}function tr(J){return function(at){return J(at)}}function Ku(J,at){return ue(at,function(rt){return J[rt]})}function bs(J,at){return J.has(at)}function _v(J,at){for(var rt=-1,bt=J.length;++rt<bt&&Mi(at,J[rt],0)>-1;);return rt}function bv(J,at){for(var rt=J.length;rt--&&Mi(at,J[rt],0)>-1;);return rt}function gN(J,at){for(var rt=J.length,bt=0;rt--;)J[rt]===at&&++bt;return bt}var yN=Vu(tN),mN=Vu(eN);function _N(J){return"\\"+nN[J]}function bN(J,at){return J==null?r:J[at]}function ki(J){return YC.test(J)}function xN(J){return ZC.test(J)}function EN(J){for(var at,rt=[];!(at=J.next()).done;)rt.push(at.value);return rt}function Yu(J){var at=-1,rt=Array(J.size);return J.forEach(function(bt,Ct){rt[++at]=[Ct,bt]}),rt}function xv(J,at){return function(rt){return J(at(rt))}}function gn(J,at){for(var rt=-1,bt=J.length,Ct=0,Xt=[];++rt<bt;){var Ee=J[rt];(Ee===at||Ee===p)&&(J[rt]=p,Xt[Ct++]=rt)}return Xt}function Ja(J){var at=-1,rt=Array(J.size);return J.forEach(function(bt){rt[++at]=bt}),rt}function wN(J){var at=-1,rt=Array(J.size);return J.forEach(function(bt){rt[++at]=[bt,bt]}),rt}function TN(J,at,rt){for(var bt=rt-1,Ct=J.length;++bt<Ct;)if(J[bt]===at)return bt;return-1}function AN(J,at,rt){for(var bt=rt+1;bt--;)if(J[bt]===at)return bt;return bt}function Li(J){return ki(J)?ON(J):fN(J)}function Ir(J){return ki(J)?IN(J):cN(J)}function Ev(J){for(var at=J.length;at--&&gC.test(J.charAt(at)););return at}var SN=Vu(rN);function ON(J){for(var at=Du.lastIndex=0;Du.test(J);)++at;return at}function IN(J){return J.match(Du)||[]}function RN(J){return J.match(KC)||[]}var CN=function J(at){at=at==null?Ce:Fi.defaults(Ce.Object(),at,Fi.pick(Ce,JC));var rt=at.Array,bt=at.Date,Ct=at.Error,Xt=at.Function,Ee=at.Math,re=at.Object,Zu=at.RegExp,NN=at.String,fr=at.TypeError,Qa=rt.prototype,PN=Xt.prototype,Bi=re.prototype,to=at["__core-js_shared__"],eo=PN.toString,te=Bi.hasOwnProperty,MN=0,wv=function(){var s=/[^.]+$/.exec(to&&to.keys&&to.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ro=Bi.toString,kN=eo.call(re),LN=Ce._,FN=Zu("^"+eo.call(te).replace(Mu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),no=av?at.Buffer:r,yn=at.Symbol,io=at.Uint8Array,Tv=no?no.allocUnsafe:r,so=xv(re.getPrototypeOf,re),Av=re.create,Sv=Bi.propertyIsEnumerable,ao=Qa.splice,Ov=yn?yn.isConcatSpreadable:r,xs=yn?yn.iterator:r,jn=yn?yn.toStringTag:r,oo=function(){try{var s=Xn(re,"defineProperty");return s({},"",{}),s}catch{}}(),BN=at.clearTimeout!==Ce.clearTimeout&&at.clearTimeout,UN=bt&&bt.now!==Ce.Date.now&&bt.now,DN=at.setTimeout!==Ce.setTimeout&&at.setTimeout,lo=Ee.ceil,uo=Ee.floor,Ju=re.getOwnPropertySymbols,$N=no?no.isBuffer:r,Iv=at.isFinite,GN=Qa.join,qN=xv(re.keys,re),we=Ee.max,ke=Ee.min,jN=bt.now,HN=at.parseInt,Rv=Ee.random,zN=Qa.reverse,Qu=Xn(at,"DataView"),Es=Xn(at,"Map"),tf=Xn(at,"Promise"),Ui=Xn(at,"Set"),ws=Xn(at,"WeakMap"),Ts=Xn(re,"create"),fo=ws&&new ws,Di={},VN=Kn(Qu),WN=Kn(Es),XN=Kn(tf),KN=Kn(Ui),YN=Kn(ws),co=yn?yn.prototype:r,As=co?co.valueOf:r,Cv=co?co.toString:r;function B(s){if(ge(s)&&!Mt(s)&&!(s instanceof $t)){if(s instanceof cr)return s;if(te.call(s,"__wrapped__"))return Ng(s)}return new cr(s)}var $i=function(){function s(){}return function(o){if(!de(o))return{};if(Av)return Av(o);s.prototype=o;var g=new s;return s.prototype=r,g}}();function ho(){}function cr(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}B.templateSettings={escape:fC,evaluate:cC,interpolate:Dp,variable:"",imports:{_:B}},B.prototype=ho.prototype,B.prototype.constructor=B,cr.prototype=$i(ho.prototype),cr.prototype.constructor=cr;function $t(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=N,this.__views__=[]}function ZN(){var s=new $t(this.__wrapped__);return s.__actions__=He(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=He(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=He(this.__views__),s}function JN(){if(this.__filtered__){var s=new $t(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function QN(){var s=this.__wrapped__.value(),o=this.__dir__,g=Mt(s),T=o<0,k=g?s.length:0,$=cM(0,k,this.__views__),H=$.start,W=$.end,Q=W-H,lt=T?W:H-1,ut=this.__iteratees__,ct=ut.length,gt=0,Et=ke(Q,this.__takeCount__);if(!g||!T&&k==Q&&Et==Q)return tg(s,this.__actions__);var St=[];t:for(;Q--&><Et;){lt+=o;for(var Ft=-1,Ot=s[lt];++Ft<ct;){var Ut=ut[Ft],qt=Ut.iteratee,nr=Ut.type,$e=qt(Ot);if(nr==j)Ot=$e;else if(!$e){if(nr==F)continue t;break t}}St[gt++]=Ot}return St}$t.prototype=$i(ho.prototype),$t.prototype.constructor=$t;function Hn(s){var o=-1,g=s==null?0:s.length;for(this.clear();++o<g;){var T=s[o];this.set(T[0],T[1])}}function tP(){this.__data__=Ts?Ts(null):{},this.size=0}function eP(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function rP(s){var o=this.__data__;if(Ts){var g=o[s];return g===f?r:g}return te.call(o,s)?o[s]:r}function nP(s){var o=this.__data__;return Ts?o[s]!==r:te.call(o,s)}function iP(s,o){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Ts&&o===r?f:o,this}Hn.prototype.clear=tP,Hn.prototype.delete=eP,Hn.prototype.get=rP,Hn.prototype.has=nP,Hn.prototype.set=iP;function Yr(s){var o=-1,g=s==null?0:s.length;for(this.clear();++o<g;){var T=s[o];this.set(T[0],T[1])}}function sP(){this.__data__=[],this.size=0}function aP(s){var o=this.__data__,g=po(o,s);if(g<0)return!1;var T=o.length-1;return g==T?o.pop():ao.call(o,g,1),--this.size,!0}function oP(s){var o=this.__data__,g=po(o,s);return g<0?r:o[g][1]}function lP(s){return po(this.__data__,s)>-1}function uP(s,o){var g=this.__data__,T=po(g,s);return T<0?(++this.size,g.push([s,o])):g[T][1]=o,this}Yr.prototype.clear=sP,Yr.prototype.delete=aP,Yr.prototype.get=oP,Yr.prototype.has=lP,Yr.prototype.set=uP;function Zr(s){var o=-1,g=s==null?0:s.length;for(this.clear();++o<g;){var T=s[o];this.set(T[0],T[1])}}function fP(){this.size=0,this.__data__={hash:new Hn,map:new(Es||Yr),string:new Hn}}function cP(s){var o=So(this,s).delete(s);return this.size-=o?1:0,o}function hP(s){return So(this,s).get(s)}function dP(s){return So(this,s).has(s)}function pP(s,o){var g=So(this,s),T=g.size;return g.set(s,o),this.size+=g.size==T?0:1,this}Zr.prototype.clear=fP,Zr.prototype.delete=cP,Zr.prototype.get=hP,Zr.prototype.has=dP,Zr.prototype.set=pP;function zn(s){var o=-1,g=s==null?0:s.length;for(this.__data__=new Zr;++o<g;)this.add(s[o])}function vP(s){return this.__data__.set(s,f),this}function gP(s){return this.__data__.has(s)}zn.prototype.add=zn.prototype.push=vP,zn.prototype.has=gP;function Rr(s){var o=this.__data__=new Yr(s);this.size=o.size}function yP(){this.__data__=new Yr,this.size=0}function mP(s){var o=this.__data__,g=o.delete(s);return this.size=o.size,g}function _P(s){return this.__data__.get(s)}function bP(s){return this.__data__.has(s)}function xP(s,o){var g=this.__data__;if(g instanceof Yr){var T=g.__data__;if(!Es||T.length<i-1)return T.push([s,o]),this.size=++g.size,this;g=this.__data__=new Zr(T)}return g.set(s,o),this.size=g.size,this}Rr.prototype.clear=yP,Rr.prototype.delete=mP,Rr.prototype.get=_P,Rr.prototype.has=bP,Rr.prototype.set=xP;function Nv(s,o){var g=Mt(s),T=!g&&Yn(s),k=!g&&!T&&En(s),$=!g&&!T&&!k&&Hi(s),H=g||T||k||$,W=H?Xu(s.length,NN):[],Q=W.length;for(var lt in s)(o||te.call(s,lt))&&!(H&&(lt=="length"||k&&(lt=="offset"||lt=="parent")||$&&(lt=="buffer"||lt=="byteLength"||lt=="byteOffset")||en(lt,Q)))&&W.push(lt);return W}function Pv(s){var o=s.length;return o?s[hf(0,o-1)]:r}function EP(s,o){return Oo(He(s),Vn(o,0,s.length))}function wP(s){return Oo(He(s))}function ef(s,o,g){(g!==r&&!Cr(s[o],g)||g===r&&!(o in s))&&Jr(s,o,g)}function Ss(s,o,g){var T=s[o];(!(te.call(s,o)&&Cr(T,g))||g===r&&!(o in s))&&Jr(s,o,g)}function po(s,o){for(var g=s.length;g--;)if(Cr(s[g][0],o))return g;return-1}function TP(s,o,g,T){return mn(s,function(k,$,H){o(T,k,g(k),H)}),T}function Mv(s,o){return s&&$r(o,Ie(o),s)}function AP(s,o){return s&&$r(o,Ve(o),s)}function Jr(s,o,g){o=="__proto__"&&oo?oo(s,o,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[o]=g}function rf(s,o){for(var g=-1,T=o.length,k=rt(T),$=s==null;++g<T;)k[g]=$?r:Bf(s,o[g]);return k}function Vn(s,o,g){return s===s&&(g!==r&&(s=s<=g?s:g),o!==r&&(s=s>=o?s:o)),s}function hr(s,o,g,T,k,$){var H,W=o&d,Q=o&c,lt=o&v;if(g&&(H=k?g(s,T,k,$):g(s)),H!==r)return H;if(!de(s))return s;var ut=Mt(s);if(ut){if(H=dM(s),!W)return He(s,H)}else{var ct=Le(s),gt=ct==vt||ct==mt;if(En(s))return ng(s,W);if(ct==Wt||ct==K||gt&&!k){if(H=Q||gt?{}:Eg(s),!W)return Q?rM(s,AP(H,s)):eM(s,Mv(H,s))}else{if(!ie[ct])return k?s:{};H=pM(s,ct,W)}}$||($=new Rr);var Et=$.get(s);if(Et)return Et;$.set(s,H),Zg(s)?s.forEach(function(Ot){H.add(hr(Ot,o,g,Ot,s,$))}):Kg(s)&&s.forEach(function(Ot,Ut){H.set(Ut,hr(Ot,o,g,Ut,s,$))});var St=lt?Q?wf:Ef:Q?Ve:Ie,Ft=ut?r:St(s);return ur(Ft||s,function(Ot,Ut){Ft&&(Ut=Ot,Ot=s[Ut]),Ss(H,Ut,hr(Ot,o,g,Ut,s,$))}),H}function SP(s){var o=Ie(s);return function(g){return kv(g,s,o)}}function kv(s,o,g){var T=g.length;if(s==null)return!T;for(s=re(s);T--;){var k=g[T],$=o[k],H=s[k];if(H===r&&!(k in s)||!$(H))return!1}return!0}function Lv(s,o,g){if(typeof s!="function")throw new fr(l);return Ms(function(){s.apply(r,g)},o)}function Os(s,o,g,T){var k=-1,$=Ya,H=!0,W=s.length,Q=[],lt=o.length;if(!W)return Q;g&&(o=ue(o,tr(g))),T?($=qu,H=!1):o.length>=i&&($=bs,H=!1,o=new zn(o));t:for(;++k<W;){var ut=s[k],ct=g==null?ut:g(ut);if(ut=T||ut!==0?ut:0,H&&ct===ct){for(var gt=lt;gt--;)if(o[gt]===ct)continue t;Q.push(ut)}else $(o,ct,T)||Q.push(ut)}return Q}var mn=lg(Dr),Fv=lg(sf,!0);function OP(s,o){var g=!0;return mn(s,function(T,k,$){return g=!!o(T,k,$),g}),g}function vo(s,o,g){for(var T=-1,k=s.length;++T<k;){var $=s[T],H=o($);if(H!=null&&(W===r?H===H&&!rr(H):g(H,W)))var W=H,Q=$}return Q}function IP(s,o,g,T){var k=s.length;for(g=kt(g),g<0&&(g=-g>k?0:k+g),T=T===r||T>k?k:kt(T),T<0&&(T+=k),T=g>T?0:Qg(T);g<T;)s[g++]=o;return s}function Bv(s,o){var g=[];return mn(s,function(T,k,$){o(T,k,$)&&g.push(T)}),g}function Ne(s,o,g,T,k){var $=-1,H=s.length;for(g||(g=gM),k||(k=[]);++$<H;){var W=s[$];o>0&&g(W)?o>1?Ne(W,o-1,g,T,k):vn(k,W):T||(k[k.length]=W)}return k}var nf=ug(),Uv=ug(!0);function Dr(s,o){return s&&nf(s,o,Ie)}function sf(s,o){return s&&Uv(s,o,Ie)}function go(s,o){return pn(o,function(g){return rn(s[g])})}function Wn(s,o){o=bn(o,s);for(var g=0,T=o.length;s!=null&&g<T;)s=s[Gr(o[g++])];return g&&g==T?s:r}function Dv(s,o,g){var T=o(s);return Mt(s)?T:vn(T,g(s))}function Ue(s){return s==null?s===r?Lt:ve:jn&&jn in re(s)?fM(s):wM(s)}function af(s,o){return s>o}function RP(s,o){return s!=null&&te.call(s,o)}function CP(s,o){return s!=null&&o in re(s)}function NP(s,o,g){return s>=ke(o,g)&&s<we(o,g)}function of(s,o,g){for(var T=g?qu:Ya,k=s[0].length,$=s.length,H=$,W=rt($),Q=1/0,lt=[];H--;){var ut=s[H];H&&o&&(ut=ue(ut,tr(o))),Q=ke(ut.length,Q),W[H]=!g&&(o||k>=120&&ut.length>=120)?new zn(H&&ut):r}ut=s[0];var ct=-1,gt=W[0];t:for(;++ct<k&<.length<Q;){var Et=ut[ct],St=o?o(Et):Et;if(Et=g||Et!==0?Et:0,!(gt?bs(gt,St):T(lt,St,g))){for(H=$;--H;){var Ft=W[H];if(!(Ft?bs(Ft,St):T(s[H],St,g)))continue t}gt&>.push(St),lt.push(Et)}}return lt}function PP(s,o,g,T){return Dr(s,function(k,$,H){o(T,g(k),$,H)}),T}function Is(s,o,g){o=bn(o,s),s=Sg(s,o);var T=s==null?s:s[Gr(pr(o))];return T==null?r:Qe(T,s,g)}function $v(s){return ge(s)&&Ue(s)==K}function MP(s){return ge(s)&&Ue(s)==Be}function kP(s){return ge(s)&&Ue(s)==et}function Rs(s,o,g,T,k){return s===o?!0:s==null||o==null||!ge(s)&&!ge(o)?s!==s&&o!==o:LP(s,o,g,T,Rs,k)}function LP(s,o,g,T,k,$){var H=Mt(s),W=Mt(o),Q=H?G:Le(s),lt=W?G:Le(o);Q=Q==K?Wt:Q,lt=lt==K?Wt:lt;var ut=Q==Wt,ct=lt==Wt,gt=Q==lt;if(gt&&En(s)){if(!En(o))return!1;H=!0,ut=!1}if(gt&&!ut)return $||($=new Rr),H||Hi(s)?_g(s,o,g,T,k,$):lM(s,o,Q,g,T,k,$);if(!(g&y)){var Et=ut&&te.call(s,"__wrapped__"),St=ct&&te.call(o,"__wrapped__");if(Et||St){var Ft=Et?s.value():s,Ot=St?o.value():o;return $||($=new Rr),k(Ft,Ot,g,T,$)}}return gt?($||($=new Rr),uM(s,o,g,T,k,$)):!1}function FP(s){return ge(s)&&Le(s)==xt}function lf(s,o,g,T){var k=g.length,$=k,H=!T;if(s==null)return!$;for(s=re(s);k--;){var W=g[k];if(H&&W[2]?W[1]!==s[W[0]]:!(W[0]in s))return!1}for(;++k<$;){W=g[k];var Q=W[0],lt=s[Q],ut=W[1];if(H&&W[2]){if(lt===r&&!(Q in s))return!1}else{var ct=new Rr;if(T)var gt=T(lt,ut,Q,s,o,ct);if(!(gt===r?Rs(ut,lt,y|_,T,ct):gt))return!1}}return!0}function Gv(s){if(!de(s)||mM(s))return!1;var o=rn(s)?FN:SC;return o.test(Kn(s))}function BP(s){return ge(s)&&Ue(s)==dt}function UP(s){return ge(s)&&Le(s)==pt}function DP(s){return ge(s)&&Mo(s.length)&&!!ae[Ue(s)]}function qv(s){return typeof s=="function"?s:s==null?We:typeof s=="object"?Mt(s)?zv(s[0],s[1]):Hv(s):fy(s)}function uf(s){if(!Ps(s))return qN(s);var o=[];for(var g in re(s))te.call(s,g)&&g!="constructor"&&o.push(g);return o}function $P(s){if(!de(s))return EM(s);var o=Ps(s),g=[];for(var T in s)T=="constructor"&&(o||!te.call(s,T))||g.push(T);return g}function ff(s,o){return s<o}function jv(s,o){var g=-1,T=ze(s)?rt(s.length):[];return mn(s,function(k,$,H){T[++g]=o(k,$,H)}),T}function Hv(s){var o=Af(s);return o.length==1&&o[0][2]?Tg(o[0][0],o[0][1]):function(g){return g===s||lf(g,s,o)}}function zv(s,o){return Of(s)&&wg(o)?Tg(Gr(s),o):function(g){var T=Bf(g,s);return T===r&&T===o?Uf(g,s):Rs(o,T,y|_)}}function yo(s,o,g,T,k){s!==o&&nf(o,function($,H){if(k||(k=new Rr),de($))GP(s,o,H,g,yo,T,k);else{var W=T?T(Rf(s,H),$,H+"",s,o,k):r;W===r&&(W=$),ef(s,H,W)}},Ve)}function GP(s,o,g,T,k,$,H){var W=Rf(s,g),Q=Rf(o,g),lt=H.get(Q);if(lt){ef(s,g,lt);return}var ut=$?$(W,Q,g+"",s,o,H):r,ct=ut===r;if(ct){var gt=Mt(Q),Et=!gt&&En(Q),St=!gt&&!Et&&Hi(Q);ut=Q,gt||Et||St?Mt(W)?ut=W:me(W)?ut=He(W):Et?(ct=!1,ut=ng(Q,!0)):St?(ct=!1,ut=ig(Q,!0)):ut=[]:ks(Q)||Yn(Q)?(ut=W,Yn(W)?ut=ty(W):(!de(W)||rn(W))&&(ut=Eg(Q))):ct=!1}ct&&(H.set(Q,ut),k(ut,Q,T,$,H),H.delete(Q)),ef(s,g,ut)}function Vv(s,o){var g=s.length;if(g)return o+=o<0?g:0,en(o,g)?s[o]:r}function Wv(s,o,g){o.length?o=ue(o,function($){return Mt($)?function(H){return Wn(H,$.length===1?$[0]:$)}:$}):o=[We];var T=-1;o=ue(o,tr(At()));var k=jv(s,function($,H,W){var Q=ue(o,function(lt){return lt($)});return{criteria:Q,index:++T,value:$}});return pN(k,function($,H){return tM($,H,g)})}function qP(s,o){return Xv(s,o,function(g,T){return Uf(s,T)})}function Xv(s,o,g){for(var T=-1,k=o.length,$={};++T<k;){var H=o[T],W=Wn(s,H);g(W,H)&&Cs($,bn(H,s),W)}return $}function jP(s){return function(o){return Wn(o,s)}}function cf(s,o,g,T){var k=T?dN:Mi,$=-1,H=o.length,W=s;for(s===o&&(o=He(o)),g&&(W=ue(s,tr(g)));++$<H;)for(var Q=0,lt=o[$],ut=g?g(lt):lt;(Q=k(W,ut,Q,T))>-1;)W!==s&&ao.call(W,Q,1),ao.call(s,Q,1);return s}function Kv(s,o){for(var g=s?o.length:0,T=g-1;g--;){var k=o[g];if(g==T||k!==$){var $=k;en(k)?ao.call(s,k,1):vf(s,k)}}return s}function hf(s,o){return s+uo(Rv()*(o-s+1))}function HP(s,o,g,T){for(var k=-1,$=we(lo((o-s)/(g||1)),0),H=rt($);$--;)H[T?$:++k]=s,s+=g;return H}function df(s,o){var g="";if(!s||o<1||o>st)return g;do o%2&&(g+=s),o=uo(o/2),o&&(s+=s);while(o);return g}function Bt(s,o){return Cf(Ag(s,o,We),s+"")}function zP(s){return Pv(zi(s))}function VP(s,o){var g=zi(s);return Oo(g,Vn(o,0,g.length))}function Cs(s,o,g,T){if(!de(s))return s;o=bn(o,s);for(var k=-1,$=o.length,H=$-1,W=s;W!=null&&++k<$;){var Q=Gr(o[k]),lt=g;if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return s;if(k!=H){var ut=W[Q];lt=T?T(ut,Q,W):r,lt===r&&(lt=de(ut)?ut:en(o[k+1])?[]:{})}Ss(W,Q,lt),W=W[Q]}return s}var Yv=fo?function(s,o){return fo.set(s,o),s}:We,WP=oo?function(s,o){return oo(s,"toString",{configurable:!0,enumerable:!1,value:$f(o),writable:!0})}:We;function XP(s){return Oo(zi(s))}function dr(s,o,g){var T=-1,k=s.length;o<0&&(o=-o>k?0:k+o),g=g>k?k:g,g<0&&(g+=k),k=o>g?0:g-o>>>0,o>>>=0;for(var $=rt(k);++T<k;)$[T]=s[T+o];return $}function KP(s,o){var g;return mn(s,function(T,k,$){return g=o(T,k,$),!g}),!!g}function mo(s,o,g){var T=0,k=s==null?T:s.length;if(typeof o=="number"&&o===o&&k<=q){for(;T<k;){var $=T+k>>>1,H=s[$];H!==null&&!rr(H)&&(g?H<=o:H<o)?T=$+1:k=$}return k}return pf(s,o,We,g)}function pf(s,o,g,T){var k=0,$=s==null?0:s.length;if($===0)return 0;o=g(o);for(var H=o!==o,W=o===null,Q=rr(o),lt=o===r;k<$;){var ut=uo((k+$)/2),ct=g(s[ut]),gt=ct!==r,Et=ct===null,St=ct===ct,Ft=rr(ct);if(H)var Ot=T||St;else lt?Ot=St&&(T||gt):W?Ot=St&>&&(T||!Et):Q?Ot=St&>&&!Et&&(T||!Ft):Et||Ft?Ot=!1:Ot=T?ct<=o:ct<o;Ot?k=ut+1:$=ut}return ke($,D)}function Zv(s,o){for(var g=-1,T=s.length,k=0,$=[];++g<T;){var H=s[g],W=o?o(H):H;if(!g||!Cr(W,Q)){var Q=W;$[k++]=H===0?0:H}}return $}function Jv(s){return typeof s=="number"?s:rr(s)?U:+s}function er(s){if(typeof s=="string")return s;if(Mt(s))return ue(s,er)+"";if(rr(s))return Cv?Cv.call(s):"";var o=s+"";return o=="0"&&1/s==-V?"-0":o}function _n(s,o,g){var T=-1,k=Ya,$=s.length,H=!0,W=[],Q=W;if(g)H=!1,k=qu;else if($>=i){var lt=o?null:aM(s);if(lt)return Ja(lt);H=!1,k=bs,Q=new zn}else Q=o?[]:W;t:for(;++T<$;){var ut=s[T],ct=o?o(ut):ut;if(ut=g||ut!==0?ut:0,H&&ct===ct){for(var gt=Q.length;gt--;)if(Q[gt]===ct)continue t;o&&Q.push(ct),W.push(ut)}else k(Q,ct,g)||(Q!==W&&Q.push(ct),W.push(ut))}return W}function vf(s,o){return o=bn(o,s),s=Sg(s,o),s==null||delete s[Gr(pr(o))]}function Qv(s,o,g,T){return Cs(s,o,g(Wn(s,o)),T)}function _o(s,o,g,T){for(var k=s.length,$=T?k:-1;(T?$--:++$<k)&&o(s[$],$,s););return g?dr(s,T?0:$,T?$+1:k):dr(s,T?$+1:0,T?k:$)}function tg(s,o){var g=s;return g instanceof $t&&(g=g.value()),ju(o,function(T,k){return k.func.apply(k.thisArg,vn([T],k.args))},g)}function gf(s,o,g){var T=s.length;if(T<2)return T?_n(s[0]):[];for(var k=-1,$=rt(T);++k<T;)for(var H=s[k],W=-1;++W<T;)W!=k&&($[k]=Os($[k]||H,s[W],o,g));return _n(Ne($,1),o,g)}function eg(s,o,g){for(var T=-1,k=s.length,$=o.length,H={};++T<k;){var W=T<$?o[T]:r;g(H,s[T],W)}return H}function yf(s){return me(s)?s:[]}function mf(s){return typeof s=="function"?s:We}function bn(s,o){return Mt(s)?s:Of(s,o)?[s]:Cg(Yt(s))}var YP=Bt;function xn(s,o,g){var T=s.length;return g=g===r?T:g,!o&&g>=T?s:dr(s,o,g)}var rg=BN||function(s){return Ce.clearTimeout(s)};function ng(s,o){if(o)return s.slice();var g=s.length,T=Tv?Tv(g):new s.constructor(g);return s.copy(T),T}function _f(s){var o=new s.constructor(s.byteLength);return new io(o).set(new io(s)),o}function ZP(s,o){var g=o?_f(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function JP(s){var o=new s.constructor(s.source,$p.exec(s));return o.lastIndex=s.lastIndex,o}function QP(s){return As?re(As.call(s)):{}}function ig(s,o){var g=o?_f(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function sg(s,o){if(s!==o){var g=s!==r,T=s===null,k=s===s,$=rr(s),H=o!==r,W=o===null,Q=o===o,lt=rr(o);if(!W&&!lt&&!$&&s>o||$&&H&&Q&&!W&&!lt||T&&H&&Q||!g&&Q||!k)return 1;if(!T&&!$&&!lt&&s<o||lt&&g&&k&&!T&&!$||W&&g&&k||!H&&k||!Q)return-1}return 0}function tM(s,o,g){for(var T=-1,k=s.criteria,$=o.criteria,H=k.length,W=g.length;++T<H;){var Q=sg(k[T],$[T]);if(Q){if(T>=W)return Q;var lt=g[T];return Q*(lt=="desc"?-1:1)}}return s.index-o.index}function ag(s,o,g,T){for(var k=-1,$=s.length,H=g.length,W=-1,Q=o.length,lt=we($-H,0),ut=rt(Q+lt),ct=!T;++W<Q;)ut[W]=o[W];for(;++k<H;)(ct||k<$)&&(ut[g[k]]=s[k]);for(;lt--;)ut[W++]=s[k++];return ut}function og(s,o,g,T){for(var k=-1,$=s.length,H=-1,W=g.length,Q=-1,lt=o.length,ut=we($-W,0),ct=rt(ut+lt),gt=!T;++k<ut;)ct[k]=s[k];for(var Et=k;++Q<lt;)ct[Et+Q]=o[Q];for(;++H<W;)(gt||k<$)&&(ct[Et+g[H]]=s[k++]);return ct}function He(s,o){var g=-1,T=s.length;for(o||(o=rt(T));++g<T;)o[g]=s[g];return o}function $r(s,o,g,T){var k=!g;g||(g={});for(var $=-1,H=o.length;++$<H;){var W=o[$],Q=T?T(g[W],s[W],W,g,s):r;Q===r&&(Q=s[W]),k?Jr(g,W,Q):Ss(g,W,Q)}return g}function eM(s,o){return $r(s,Sf(s),o)}function rM(s,o){return $r(s,bg(s),o)}function bo(s,o){return function(g,T){var k=Mt(g)?oN:TP,$=o?o():{};return k(g,s,At(T,2),$)}}function Gi(s){return Bt(function(o,g){var T=-1,k=g.length,$=k>1?g[k-1]:r,H=k>2?g[2]:r;for($=s.length>3&&typeof $=="function"?(k--,$):r,H&&De(g[0],g[1],H)&&($=k<3?r:$,k=1),o=re(o);++T<k;){var W=g[T];W&&s(o,W,T,$)}return o})}function lg(s,o){return function(g,T){if(g==null)return g;if(!ze(g))return s(g,T);for(var k=g.length,$=o?k:-1,H=re(g);(o?$--:++$<k)&&T(H[$],$,H)!==!1;);return g}}function ug(s){return function(o,g,T){for(var k=-1,$=re(o),H=T(o),W=H.length;W--;){var Q=H[s?W:++k];if(g($[Q],Q,$)===!1)break}return o}}function nM(s,o,g){var T=o&b,k=Ns(s);function $(){var H=this&&this!==Ce&&this instanceof $?k:s;return H.apply(T?g:this,arguments)}return $}function fg(s){return function(o){o=Yt(o);var g=ki(o)?Ir(o):r,T=g?g[0]:o.charAt(0),k=g?xn(g,1).join(""):o.slice(1);return T[s]()+k}}function qi(s){return function(o){return ju(ly(oy(o).replace(WC,"")),s,"")}}function Ns(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var g=$i(s.prototype),T=s.apply(g,o);return de(T)?T:g}}function iM(s,o,g){var T=Ns(s);function k(){for(var $=arguments.length,H=rt($),W=$,Q=ji(k);W--;)H[W]=arguments[W];var lt=$<3&&H[0]!==Q&&H[$-1]!==Q?[]:gn(H,Q);if($-=lt.length,$<g)return vg(s,o,xo,k.placeholder,r,H,lt,r,r,g-$);var ut=this&&this!==Ce&&this instanceof k?T:s;return Qe(ut,this,H)}return k}function cg(s){return function(o,g,T){var k=re(o);if(!ze(o)){var $=At(g,3);o=Ie(o),g=function(W){return $(k[W],W,k)}}var H=s(o,g,T);return H>-1?k[$?o[H]:H]:r}}function hg(s){return tn(function(o){var g=o.length,T=g,k=cr.prototype.thru;for(s&&o.reverse();T--;){var $=o[T];if(typeof $!="function")throw new fr(l);if(k&&!H&&Ao($)=="wrapper")var H=new cr([],!0)}for(T=H?T:g;++T<g;){$=o[T];var W=Ao($),Q=W=="wrapper"?Tf($):r;Q&&If(Q[0])&&Q[1]==(S|w|A|O)&&!Q[4].length&&Q[9]==1?H=H[Ao(Q[0])].apply(H,Q[3]):H=$.length==1&&If($)?H[W]():H.thru($)}return function(){var lt=arguments,ut=lt[0];if(H&<.length==1&&Mt(ut))return H.plant(ut).value();for(var ct=0,gt=g?o[ct].apply(this,lt):ut;++ct<g;)gt=o[ct].call(this,gt);return gt}})}function xo(s,o,g,T,k,$,H,W,Q,lt){var ut=o&S,ct=o&b,gt=o&m,Et=o&(w|x),St=o&L,Ft=gt?r:Ns(s);function Ot(){for(var Ut=arguments.length,qt=rt(Ut),nr=Ut;nr--;)qt[nr]=arguments[nr];if(Et)var $e=ji(Ot),ir=gN(qt,$e);if(T&&(qt=ag(qt,T,k,Et)),$&&(qt=og(qt,$,H,Et)),Ut-=ir,Et&&Ut<lt){var _e=gn(qt,$e);return vg(s,o,xo,Ot.placeholder,g,qt,_e,W,Q,lt-Ut)}var Nr=ct?g:this,sn=gt?Nr[s]:s;return Ut=qt.length,W?qt=TM(qt,W):St&&Ut>1&&qt.reverse(),ut&&Q<Ut&&(qt.length=Q),this&&this!==Ce&&this instanceof Ot&&(sn=Ft||Ns(sn)),sn.apply(Nr,qt)}return Ot}function dg(s,o){return function(g,T){return PP(g,s,o(T),{})}}function Eo(s,o){return function(g,T){var k;if(g===r&&T===r)return o;if(g!==r&&(k=g),T!==r){if(k===r)return T;typeof g=="string"||typeof T=="string"?(g=er(g),T=er(T)):(g=Jv(g),T=Jv(T)),k=s(g,T)}return k}}function bf(s){return tn(function(o){return o=ue(o,tr(At())),Bt(function(g){var T=this;return s(o,function(k){return Qe(k,T,g)})})})}function wo(s,o){o=o===r?" ":er(o);var g=o.length;if(g<2)return g?df(o,s):o;var T=df(o,lo(s/Li(o)));return ki(o)?xn(Ir(T),0,s).join(""):T.slice(0,s)}function sM(s,o,g,T){var k=o&b,$=Ns(s);function H(){for(var W=-1,Q=arguments.length,lt=-1,ut=T.length,ct=rt(ut+Q),gt=this&&this!==Ce&&this instanceof H?$:s;++lt<ut;)ct[lt]=T[lt];for(;Q--;)ct[lt++]=arguments[++W];return Qe(gt,k?g:this,ct)}return H}function pg(s){return function(o,g,T){return T&&typeof T!="number"&&De(o,g,T)&&(g=T=r),o=nn(o),g===r?(g=o,o=0):g=nn(g),T=T===r?o<g?1:-1:nn(T),HP(o,g,T,s)}}function To(s){return function(o,g){return typeof o=="string"&&typeof g=="string"||(o=vr(o),g=vr(g)),s(o,g)}}function vg(s,o,g,T,k,$,H,W,Q,lt){var ut=o&w,ct=ut?H:r,gt=ut?r:H,Et=ut?$:r,St=ut?r:$;o|=ut?A:P,o&=~(ut?P:A),o&E||(o&=~(b|m));var Ft=[s,o,k,Et,ct,St,gt,W,Q,lt],Ot=g.apply(r,Ft);return If(s)&&Og(Ot,Ft),Ot.placeholder=T,Ig(Ot,s,o)}function xf(s){var o=Ee[s];return function(g,T){if(g=vr(g),T=T==null?0:ke(kt(T),292),T&&Iv(g)){var k=(Yt(g)+"e").split("e"),$=o(k[0]+"e"+(+k[1]+T));return k=(Yt($)+"e").split("e"),+(k[0]+"e"+(+k[1]-T))}return o(g)}}var aM=Ui&&1/Ja(new Ui([,-0]))[1]==V?function(s){return new Ui(s)}:jf;function gg(s){return function(o){var g=Le(o);return g==xt?Yu(o):g==pt?wN(o):vN(o,s(o))}}function Qr(s,o,g,T,k,$,H,W){var Q=o&m;if(!Q&&typeof s!="function")throw new fr(l);var lt=T?T.length:0;if(lt||(o&=~(A|P),T=k=r),H=H===r?H:we(kt(H),0),W=W===r?W:kt(W),lt-=k?k.length:0,o&P){var ut=T,ct=k;T=k=r}var gt=Q?r:Tf(s),Et=[s,o,g,T,k,ut,ct,$,H,W];if(gt&&xM(Et,gt),s=Et[0],o=Et[1],g=Et[2],T=Et[3],k=Et[4],W=Et[9]=Et[9]===r?Q?0:s.length:we(Et[9]-lt,0),!W&&o&(w|x)&&(o&=~(w|x)),!o||o==b)var St=nM(s,o,g);else o==w||o==x?St=iM(s,o,W):(o==A||o==(b|A))&&!k.length?St=sM(s,o,g,T):St=xo.apply(r,Et);var Ft=gt?Yv:Og;return Ig(Ft(St,Et),s,o)}function yg(s,o,g,T){return s===r||Cr(s,Bi[g])&&!te.call(T,g)?o:s}function mg(s,o,g,T,k,$){return de(s)&&de(o)&&($.set(o,s),yo(s,o,r,mg,$),$.delete(o)),s}function oM(s){return ks(s)?r:s}function _g(s,o,g,T,k,$){var H=g&y,W=s.length,Q=o.length;if(W!=Q&&!(H&&Q>W))return!1;var lt=$.get(s),ut=$.get(o);if(lt&&ut)return lt==o&&ut==s;var ct=-1,gt=!0,Et=g&_?new zn:r;for($.set(s,o),$.set(o,s);++ct<W;){var St=s[ct],Ft=o[ct];if(T)var Ot=H?T(Ft,St,ct,o,s,$):T(St,Ft,ct,s,o,$);if(Ot!==r){if(Ot)continue;gt=!1;break}if(Et){if(!Hu(o,function(Ut,qt){if(!bs(Et,qt)&&(St===Ut||k(St,Ut,g,T,$)))return Et.push(qt)})){gt=!1;break}}else if(!(St===Ft||k(St,Ft,g,T,$))){gt=!1;break}}return $.delete(s),$.delete(o),gt}function lM(s,o,g,T,k,$,H){switch(g){case Kt:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Be:return!(s.byteLength!=o.byteLength||!$(new io(s),new io(o)));case tt:case et:case Rt:return Cr(+s,+o);case ht:return s.name==o.name&&s.message==o.message;case dt:case ft:return s==o+"";case xt:var W=Yu;case pt:var Q=T&y;if(W||(W=Ja),s.size!=o.size&&!Q)return!1;var lt=H.get(s);if(lt)return lt==o;T|=_,H.set(s,o);var ut=_g(W(s),W(o),T,k,$,H);return H.delete(s),ut;case Nt:if(As)return As.call(s)==As.call(o)}return!1}function uM(s,o,g,T,k,$){var H=g&y,W=Ef(s),Q=W.length,lt=Ef(o),ut=lt.length;if(Q!=ut&&!H)return!1;for(var ct=Q;ct--;){var gt=W[ct];if(!(H?gt in o:te.call(o,gt)))return!1}var Et=$.get(s),St=$.get(o);if(Et&&St)return Et==o&&St==s;var Ft=!0;$.set(s,o),$.set(o,s);for(var Ot=H;++ct<Q;){gt=W[ct];var Ut=s[gt],qt=o[gt];if(T)var nr=H?T(qt,Ut,gt,o,s,$):T(Ut,qt,gt,s,o,$);if(!(nr===r?Ut===qt||k(Ut,qt,g,T,$):nr)){Ft=!1;break}Ot||(Ot=gt=="constructor")}if(Ft&&!Ot){var $e=s.constructor,ir=o.constructor;$e!=ir&&"constructor"in s&&"constructor"in o&&!(typeof $e=="function"&&$e instanceof $e&&typeof ir=="function"&&ir instanceof ir)&&(Ft=!1)}return $.delete(s),$.delete(o),Ft}function tn(s){return Cf(Ag(s,r,kg),s+"")}function Ef(s){return Dv(s,Ie,Sf)}function wf(s){return Dv(s,Ve,bg)}var Tf=fo?function(s){return fo.get(s)}:jf;function Ao(s){for(var o=s.name+"",g=Di[o],T=te.call(Di,o)?g.length:0;T--;){var k=g[T],$=k.func;if($==null||$==s)return k.name}return o}function ji(s){var o=te.call(B,"placeholder")?B:s;return o.placeholder}function At(){var s=B.iteratee||Gf;return s=s===Gf?qv:s,arguments.length?s(arguments[0],arguments[1]):s}function So(s,o){var g=s.__data__;return yM(o)?g[typeof o=="string"?"string":"hash"]:g.map}function Af(s){for(var o=Ie(s),g=o.length;g--;){var T=o[g],k=s[T];o[g]=[T,k,wg(k)]}return o}function Xn(s,o){var g=bN(s,o);return Gv(g)?g:r}function fM(s){var o=te.call(s,jn),g=s[jn];try{s[jn]=r;var T=!0}catch{}var k=ro.call(s);return T&&(o?s[jn]=g:delete s[jn]),k}var Sf=Ju?function(s){return s==null?[]:(s=re(s),pn(Ju(s),function(o){return Sv.call(s,o)}))}:Hf,bg=Ju?function(s){for(var o=[];s;)vn(o,Sf(s)),s=so(s);return o}:Hf,Le=Ue;(Qu&&Le(new Qu(new ArrayBuffer(1)))!=Kt||Es&&Le(new Es)!=xt||tf&&Le(tf.resolve())!=it||Ui&&Le(new Ui)!=pt||ws&&Le(new ws)!=Pt)&&(Le=function(s){var o=Ue(s),g=o==Wt?s.constructor:r,T=g?Kn(g):"";if(T)switch(T){case VN:return Kt;case WN:return xt;case XN:return it;case KN:return pt;case YN:return Pt}return o});function cM(s,o,g){for(var T=-1,k=g.length;++T<k;){var $=g[T],H=$.size;switch($.type){case"drop":s+=H;break;case"dropRight":o-=H;break;case"take":o=ke(o,s+H);break;case"takeRight":s=we(s,o-H);break}}return{start:s,end:o}}function hM(s){var o=s.match(mC);return o?o[1].split(_C):[]}function xg(s,o,g){o=bn(o,s);for(var T=-1,k=o.length,$=!1;++T<k;){var H=Gr(o[T]);if(!($=s!=null&&g(s,H)))break;s=s[H]}return $||++T!=k?$:(k=s==null?0:s.length,!!k&&Mo(k)&&en(H,k)&&(Mt(s)||Yn(s)))}function dM(s){var o=s.length,g=new s.constructor(o);return o&&typeof s[0]=="string"&&te.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function Eg(s){return typeof s.constructor=="function"&&!Ps(s)?$i(so(s)):{}}function pM(s,o,g){var T=s.constructor;switch(o){case Be:return _f(s);case tt:case et:return new T(+s);case Kt:return ZP(s,g);case _s:case le:case or:case Ou:case Iu:case Ru:case Cu:case Nu:case Pu:return ig(s,g);case xt:return new T;case Rt:case ft:return new T(s);case dt:return JP(s);case pt:return new T;case Nt:return QP(s)}}function vM(s,o){var g=o.length;if(!g)return s;var T=g-1;return o[T]=(g>1?"& ":"")+o[T],o=o.join(g>2?", ":" "),s.replace(yC,`{
|
|
558
558
|
/* [wrapped with `+o+`] */
|
|
559
|
-
`)}function gM(s){return Mt(s)||Yn(s)||!!(Ov&&s&&s[Ov])}function en(s,o){var g=typeof s;return o=o??it,!!o&&(g=="number"||g!="symbol"&&IC.test(s))&&s>-1&&s%1==0&&s<o}function De(s,o,g){if(!pe(g))return!1;var T=typeof o;return(T=="number"?He(g)&&en(o,g.length):T=="string"&&o in g)?Rr(g[o],s):!1}function Of(s,o){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||rr(s)?!0:dC.test(s)||!hC.test(s)||o!=null&&s in re(o)}function yM(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function If(s){var o=Ao(s),g=B[o];if(typeof g!="function"||!(o in $t.prototype))return!1;if(s===g)return!0;var T=Tf(g);return!!T&&s===T[0]}function mM(s){return!!wv&&wv in s}var _M=to?rn:zf;function Ps(s){var o=s&&s.constructor,g=typeof o=="function"&&o.prototype||Bi;return s===g}function wg(s){return s===s&&!pe(s)}function Tg(s,o){return function(g){return g==null?!1:g[s]===o&&(o!==r||s in re(g))}}function bM(s){var o=No(s,function(T){return g.size===h&&g.clear(),T}),g=o.cache;return o}function xM(s,o){var g=s[1],T=o[1],k=g|T,$=k<(_|b|S),H=T==S&&g==w||T==S&&g==O&&s[7].length<=o[8]||T==(S|O)&&o[7].length<=o[8]&&g==w;if(!($||H))return s;T&_&&(s[2]=o[2],k|=g&_?0:E);var W=o[3];if(W){var Q=s[3];s[3]=Q?ag(Q,W,o[4]):W,s[4]=Q?gn(s[3],p):o[4]}return W=o[5],W&&(Q=s[5],s[5]=Q?og(Q,W,o[6]):W,s[6]=Q?gn(s[5],p):o[6]),W=o[7],W&&(s[7]=W),T&S&&(s[8]=s[8]==null?o[8]:ke(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=k,s}function EM(s){var o=[];if(s!=null)for(var g in re(s))o.push(g);return o}function wM(s){return ro.call(s)}function Ag(s,o,g){return o=we(o===r?s.length-1:o,0),function(){for(var T=arguments,k=-1,$=we(T.length-o,0),H=rt($);++k<$;)H[k]=T[o+k];k=-1;for(var W=rt(o+1);++k<o;)W[k]=T[k];return W[o]=g(H),Qe(s,this,W)}}function Sg(s,o){return o.length<2?s:Wn(s,dr(o,0,-1))}function TM(s,o){for(var g=s.length,T=ke(o.length,g),k=je(s);T--;){var $=o[T];s[T]=en($,g)?k[$]:r}return s}function Rf(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var Og=Rg(Yv),Ms=DN||function(s,o){return Ce.setTimeout(s,o)},Cf=Rg(WP);function Ig(s,o,g){var T=o+"";return Cf(s,vM(T,AM(hM(T),g)))}function Rg(s){var o=0,g=0;return function(){var T=jN(),k=C-(T-g);if(g=T,k>0){if(++o>=M)return arguments[0]}else o=0;return s.apply(r,arguments)}}function Oo(s,o){var g=-1,T=s.length,k=T-1;for(o=o===r?T:o;++g<o;){var $=hf(g,k),H=s[$];s[$]=s[g],s[g]=H}return s.length=o,s}var Cg=bM(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(pC,function(g,T,k,$){o.push(k?$.replace(EC,"$1"):T||g)}),o});function Gr(s){if(typeof s=="string"||rr(s))return s;var o=s+"";return o=="0"&&1/s==-V?"-0":o}function Kn(s){if(s!=null){try{return eo.call(s)}catch{}try{return s+""}catch{}}return""}function AM(s,o){return ur(Z,function(g){var T="_."+g[0];o&g[1]&&!Ya(s,T)&&s.push(T)}),s.sort()}function Ng(s){if(s instanceof $t)return s.clone();var o=new cr(s.__wrapped__,s.__chain__);return o.__actions__=je(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function SM(s,o,g){(g?De(s,o,g):o===r)?o=1:o=we(kt(o),0);var T=s==null?0:s.length;if(!T||o<1)return[];for(var k=0,$=0,H=rt(lo(T/o));k<T;)H[$++]=dr(s,k,k+=o);return H}function OM(s){for(var o=-1,g=s==null?0:s.length,T=0,k=[];++o<g;){var $=s[o];$&&(k[T++]=$)}return k}function IM(){var s=arguments.length;if(!s)return[];for(var o=rt(s-1),g=arguments[0],T=s;T--;)o[T-1]=arguments[T];return vn(Mt(g)?je(g):[g],Ne(o,1))}var RM=Bt(function(s,o){return me(s)?Os(s,Ne(o,1,me,!0)):[]}),CM=Bt(function(s,o){var g=pr(o);return me(g)&&(g=r),me(s)?Os(s,Ne(o,1,me,!0),At(g,2)):[]}),NM=Bt(function(s,o){var g=pr(o);return me(g)&&(g=r),me(s)?Os(s,Ne(o,1,me,!0),r,g):[]});function PM(s,o,g){var T=s==null?0:s.length;return T?(o=g||o===r?1:kt(o),dr(s,o<0?0:o,T)):[]}function MM(s,o,g){var T=s==null?0:s.length;return T?(o=g||o===r?1:kt(o),o=T-o,dr(s,0,o<0?0:o)):[]}function kM(s,o){return s&&s.length?_o(s,At(o,3),!0,!0):[]}function LM(s,o){return s&&s.length?_o(s,At(o,3),!0):[]}function FM(s,o,g,T){var k=s==null?0:s.length;return k?(g&&typeof g!="number"&&De(s,o,g)&&(g=0,T=k),IP(s,o,g,T)):[]}function Pg(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=g==null?0:kt(g);return k<0&&(k=we(T+k,0)),Za(s,At(o,3),k)}function Mg(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=T-1;return g!==r&&(k=kt(g),k=g<0?we(T+k,0):ke(k,T-1)),Za(s,At(o,3),k,!0)}function kg(s){var o=s==null?0:s.length;return o?Ne(s,1):[]}function BM(s){var o=s==null?0:s.length;return o?Ne(s,V):[]}function UM(s,o){var g=s==null?0:s.length;return g?(o=o===r?1:kt(o),Ne(s,o)):[]}function DM(s){for(var o=-1,g=s==null?0:s.length,T={};++o<g;){var k=s[o];T[k[0]]=k[1]}return T}function Lg(s){return s&&s.length?s[0]:r}function $M(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=g==null?0:kt(g);return k<0&&(k=we(T+k,0)),Mi(s,o,k)}function GM(s){var o=s==null?0:s.length;return o?dr(s,0,-1):[]}var qM=Bt(function(s){var o=fe(s,yf);return o.length&&o[0]===s[0]?of(o):[]}),jM=Bt(function(s){var o=pr(s),g=fe(s,yf);return o===pr(g)?o=r:g.pop(),g.length&&g[0]===s[0]?of(g,At(o,2)):[]}),HM=Bt(function(s){var o=pr(s),g=fe(s,yf);return o=typeof o=="function"?o:r,o&&g.pop(),g.length&&g[0]===s[0]?of(g,r,o):[]});function zM(s,o){return s==null?"":GN.call(s,o)}function pr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function VM(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=T;return g!==r&&(k=kt(g),k=k<0?we(T+k,0):ke(k,T-1)),o===o?AN(s,o,k):Za(s,vv,k,!0)}function WM(s,o){return s&&s.length?Vv(s,kt(o)):r}var XM=Bt(Fg);function Fg(s,o){return s&&s.length&&o&&o.length?cf(s,o):s}function KM(s,o,g){return s&&s.length&&o&&o.length?cf(s,o,At(g,2)):s}function YM(s,o,g){return s&&s.length&&o&&o.length?cf(s,o,r,g):s}var ZM=tn(function(s,o){var g=s==null?0:s.length,T=rf(s,o);return Kv(s,fe(o,function(k){return en(k,g)?+k:k}).sort(sg)),T});function JM(s,o){var g=[];if(!(s&&s.length))return g;var T=-1,k=[],$=s.length;for(o=At(o,3);++T<$;){var H=s[T];o(H,T,s)&&(g.push(H),k.push(T))}return Kv(s,k),g}function Nf(s){return s==null?s:zN.call(s)}function QM(s,o,g){var T=s==null?0:s.length;return T?(g&&typeof g!="number"&&De(s,o,g)?(o=0,g=T):(o=o==null?0:kt(o),g=g===r?T:kt(g)),dr(s,o,g)):[]}function tk(s,o){return mo(s,o)}function ek(s,o,g){return pf(s,o,At(g,2))}function rk(s,o){var g=s==null?0:s.length;if(g){var T=mo(s,o);if(T<g&&Rr(s[T],o))return T}return-1}function nk(s,o){return mo(s,o,!0)}function ik(s,o,g){return pf(s,o,At(g,2),!0)}function sk(s,o){var g=s==null?0:s.length;if(g){var T=mo(s,o,!0)-1;if(Rr(s[T],o))return T}return-1}function ak(s){return s&&s.length?Zv(s):[]}function ok(s,o){return s&&s.length?Zv(s,At(o,2)):[]}function lk(s){var o=s==null?0:s.length;return o?dr(s,1,o):[]}function uk(s,o,g){return s&&s.length?(o=g||o===r?1:kt(o),dr(s,0,o<0?0:o)):[]}function fk(s,o,g){var T=s==null?0:s.length;return T?(o=g||o===r?1:kt(o),o=T-o,dr(s,o<0?0:o,T)):[]}function ck(s,o){return s&&s.length?_o(s,At(o,3),!1,!0):[]}function hk(s,o){return s&&s.length?_o(s,At(o,3)):[]}var dk=Bt(function(s){return _n(Ne(s,1,me,!0))}),pk=Bt(function(s){var o=pr(s);return me(o)&&(o=r),_n(Ne(s,1,me,!0),At(o,2))}),vk=Bt(function(s){var o=pr(s);return o=typeof o=="function"?o:r,_n(Ne(s,1,me,!0),r,o)});function gk(s){return s&&s.length?_n(s):[]}function yk(s,o){return s&&s.length?_n(s,At(o,2)):[]}function mk(s,o){return o=typeof o=="function"?o:r,s&&s.length?_n(s,r,o):[]}function Pf(s){if(!(s&&s.length))return[];var o=0;return s=pn(s,function(g){if(me(g))return o=we(g.length,o),!0}),Xu(o,function(g){return fe(s,zu(g))})}function Bg(s,o){if(!(s&&s.length))return[];var g=Pf(s);return o==null?g:fe(g,function(T){return Qe(o,r,T)})}var _k=Bt(function(s,o){return me(s)?Os(s,o):[]}),bk=Bt(function(s){return gf(pn(s,me))}),xk=Bt(function(s){var o=pr(s);return me(o)&&(o=r),gf(pn(s,me),At(o,2))}),Ek=Bt(function(s){var o=pr(s);return o=typeof o=="function"?o:r,gf(pn(s,me),r,o)}),wk=Bt(Pf);function Tk(s,o){return eg(s||[],o||[],Ss)}function Ak(s,o){return eg(s||[],o||[],Cs)}var Sk=Bt(function(s){var o=s.length,g=o>1?s[o-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Bg(s,g)});function Ug(s){var o=B(s);return o.__chain__=!0,o}function Ok(s,o){return o(s),s}function Io(s,o){return o(s)}var Ik=tn(function(s){var o=s.length,g=o?s[0]:0,T=this.__wrapped__,k=function($){return rf($,s)};return o>1||this.__actions__.length||!(T instanceof $t)||!en(g)?this.thru(k):(T=T.slice(g,+g+(o?1:0)),T.__actions__.push({func:Io,args:[k],thisArg:r}),new cr(T,this.__chain__).thru(function($){return o&&!$.length&&$.push(r),$}))});function Rk(){return Ug(this)}function Ck(){return new cr(this.value(),this.__chain__)}function Nk(){this.__values__===r&&(this.__values__=Jg(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function Pk(){return this}function Mk(s){for(var o,g=this;g instanceof ho;){var T=Ng(g);T.__index__=0,T.__values__=r,o?k.__wrapped__=T:o=T;var k=T;g=g.__wrapped__}return k.__wrapped__=s,o}function kk(){var s=this.__wrapped__;if(s instanceof $t){var o=s;return this.__actions__.length&&(o=new $t(this)),o=o.reverse(),o.__actions__.push({func:Io,args:[Nf],thisArg:r}),new cr(o,this.__chain__)}return this.thru(Nf)}function Lk(){return tg(this.__wrapped__,this.__actions__)}var Fk=bo(function(s,o,g){te.call(s,g)?++s[g]:Jr(s,g,1)});function Bk(s,o,g){var T=Mt(s)?dv:OP;return g&&De(s,o,g)&&(o=r),T(s,At(o,3))}function Uk(s,o){var g=Mt(s)?pn:Bv;return g(s,At(o,3))}var Dk=cg(Pg),$k=cg(Mg);function Gk(s,o){return Ne(Ro(s,o),1)}function qk(s,o){return Ne(Ro(s,o),V)}function jk(s,o,g){return g=g===r?1:kt(g),Ne(Ro(s,o),g)}function Dg(s,o){var g=Mt(s)?ur:mn;return g(s,At(o,3))}function $g(s,o){var g=Mt(s)?lN:Fv;return g(s,At(o,3))}var Hk=bo(function(s,o,g){te.call(s,g)?s[g].push(o):Jr(s,g,[o])});function zk(s,o,g,T){s=He(s)?s:zi(s),g=g&&!T?kt(g):0;var k=s.length;return g<0&&(g=we(k+g,0)),ko(s)?g<=k&&s.indexOf(o,g)>-1:!!k&&Mi(s,o,g)>-1}var Vk=Bt(function(s,o,g){var T=-1,k=typeof o=="function",$=He(s)?rt(s.length):[];return mn(s,function(H){$[++T]=k?Qe(o,H,g):Is(H,o,g)}),$}),Wk=bo(function(s,o,g){Jr(s,g,o)});function Ro(s,o){var g=Mt(s)?fe:jv;return g(s,At(o,3))}function Xk(s,o,g,T){return s==null?[]:(Mt(o)||(o=o==null?[]:[o]),g=T?r:g,Mt(g)||(g=g==null?[]:[g]),Wv(s,o,g))}var Kk=bo(function(s,o,g){s[g?0:1].push(o)},function(){return[[],[]]});function Yk(s,o,g){var T=Mt(s)?ju:yv,k=arguments.length<3;return T(s,At(o,4),g,k,mn)}function Zk(s,o,g){var T=Mt(s)?uN:yv,k=arguments.length<3;return T(s,At(o,4),g,k,Fv)}function Jk(s,o){var g=Mt(s)?pn:Bv;return g(s,Po(At(o,3)))}function Qk(s){var o=Mt(s)?Pv:zP;return o(s)}function tL(s,o,g){(g?De(s,o,g):o===r)?o=1:o=kt(o);var T=Mt(s)?EP:VP;return T(s,o)}function eL(s){var o=Mt(s)?wP:XP;return o(s)}function rL(s){if(s==null)return 0;if(He(s))return ko(s)?Li(s):s.length;var o=Le(s);return o==xt||o==pt?s.size:uf(s).length}function nL(s,o,g){var T=Mt(s)?Hu:KP;return g&&De(s,o,g)&&(o=r),T(s,At(o,3))}var iL=Bt(function(s,o){if(s==null)return[];var g=o.length;return g>1&&De(s,o[0],o[1])?o=[]:g>2&&De(o[0],o[1],o[2])&&(o=[o[0]]),Wv(s,Ne(o,1),[])}),Co=UN||function(){return Ce.Date.now()};function sL(s,o){if(typeof o!="function")throw new fr(l);return s=kt(s),function(){if(--s<1)return o.apply(this,arguments)}}function Gg(s,o,g){return o=g?r:o,o=s&&o==null?s.length:o,Qr(s,S,r,r,r,r,o)}function qg(s,o){var g;if(typeof o!="function")throw new fr(l);return s=kt(s),function(){return--s>0&&(g=o.apply(this,arguments)),s<=1&&(o=r),g}}var Mf=Bt(function(s,o,g){var T=_;if(g.length){var k=gn(g,ji(Mf));T|=A}return Qr(s,T,o,g,k)}),jg=Bt(function(s,o,g){var T=_|b;if(g.length){var k=gn(g,ji(jg));T|=A}return Qr(o,T,s,g,k)});function Hg(s,o,g){o=g?r:o;var T=Qr(s,w,r,r,r,r,r,o);return T.placeholder=Hg.placeholder,T}function zg(s,o,g){o=g?r:o;var T=Qr(s,x,r,r,r,r,r,o);return T.placeholder=zg.placeholder,T}function Vg(s,o,g){var T,k,$,H,W,Q,lt=0,ut=!1,ct=!1,vt=!0;if(typeof s!="function")throw new fr(l);o=vr(o)||0,pe(g)&&(ut=!!g.leading,ct="maxWait"in g,$=ct?we(vr(g.maxWait)||0,o):$,vt="trailing"in g?!!g.trailing:vt);function Et(_e){var Cr=T,sn=k;return T=k=r,lt=_e,H=s.apply(sn,Cr),H}function St(_e){return lt=_e,W=Ms(Ut,o),ut?Et(_e):H}function Ft(_e){var Cr=_e-Q,sn=_e-lt,cy=o-Cr;return ct?ke(cy,$-sn):cy}function Ot(_e){var Cr=_e-Q,sn=_e-lt;return Q===r||Cr>=o||Cr<0||ct&&sn>=$}function Ut(){var _e=Co();if(Ot(_e))return qt(_e);W=Ms(Ut,Ft(_e))}function qt(_e){return W=r,vt&&T?Et(_e):(T=k=r,H)}function nr(){W!==r&&rg(W),lt=0,T=Q=k=W=r}function $e(){return W===r?H:qt(Co())}function ir(){var _e=Co(),Cr=Ot(_e);if(T=arguments,k=this,Q=_e,Cr){if(W===r)return St(Q);if(ct)return rg(W),W=Ms(Ut,o),Et(Q)}return W===r&&(W=Ms(Ut,o)),H}return ir.cancel=nr,ir.flush=$e,ir}var aL=Bt(function(s,o){return Lv(s,1,o)}),oL=Bt(function(s,o,g){return Lv(s,vr(o)||0,g)});function lL(s){return Qr(s,L)}function No(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new fr(l);var g=function(){var T=arguments,k=o?o.apply(this,T):T[0],$=g.cache;if($.has(k))return $.get(k);var H=s.apply(this,T);return g.cache=$.set(k,H)||$,H};return g.cache=new(No.Cache||Zr),g}No.Cache=Zr;function Po(s){if(typeof s!="function")throw new fr(l);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function uL(s){return qg(2,s)}var fL=YP(function(s,o){o=o.length==1&&Mt(o[0])?fe(o[0],tr(At())):fe(Ne(o,1),tr(At()));var g=o.length;return Bt(function(T){for(var k=-1,$=ke(T.length,g);++k<$;)T[k]=o[k].call(this,T[k]);return Qe(s,this,T)})}),kf=Bt(function(s,o){var g=gn(o,ji(kf));return Qr(s,A,r,o,g)}),Wg=Bt(function(s,o){var g=gn(o,ji(Wg));return Qr(s,P,r,o,g)}),cL=tn(function(s,o){return Qr(s,O,r,r,r,o)});function hL(s,o){if(typeof s!="function")throw new fr(l);return o=o===r?o:kt(o),Bt(s,o)}function dL(s,o){if(typeof s!="function")throw new fr(l);return o=o==null?0:we(kt(o),0),Bt(function(g){var T=g[o],k=xn(g,0,o);return T&&vn(k,T),Qe(s,this,k)})}function pL(s,o,g){var T=!0,k=!0;if(typeof s!="function")throw new fr(l);return pe(g)&&(T="leading"in g?!!g.leading:T,k="trailing"in g?!!g.trailing:k),Vg(s,o,{leading:T,maxWait:o,trailing:k})}function vL(s){return Gg(s,1)}function gL(s,o){return kf(mf(o),s)}function yL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function mL(s){return hr(s,v)}function _L(s,o){return o=typeof o=="function"?o:r,hr(s,v,o)}function bL(s){return hr(s,d|v)}function xL(s,o){return o=typeof o=="function"?o:r,hr(s,d|v,o)}function EL(s,o){return o==null||kv(s,o,Ie(o))}function Rr(s,o){return s===o||s!==s&&o!==o}var wL=To(af),TL=To(function(s,o){return s>=o}),Yn=$v(function(){return arguments}())?$v:function(s){return ge(s)&&te.call(s,"callee")&&!Sv.call(s,"callee")},Mt=rt.isArray,AL=ov?tr(ov):MP;function He(s){return s!=null&&Mo(s.length)&&!rn(s)}function me(s){return ge(s)&&He(s)}function SL(s){return s===!0||s===!1||ge(s)&&Ue(s)==tt}var En=$N||zf,OL=lv?tr(lv):kP;function IL(s){return ge(s)&&s.nodeType===1&&!ks(s)}function RL(s){if(s==null)return!0;if(He(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||En(s)||Hi(s)||Yn(s)))return!s.length;var o=Le(s);if(o==xt||o==pt)return!s.size;if(Ps(s))return!uf(s).length;for(var g in s)if(te.call(s,g))return!1;return!0}function CL(s,o){return Rs(s,o)}function NL(s,o,g){g=typeof g=="function"?g:r;var T=g?g(s,o):r;return T===r?Rs(s,o,r,g):!!T}function Lf(s){if(!ge(s))return!1;var o=Ue(s);return o==ht||o==nt||typeof s.message=="string"&&typeof s.name=="string"&&!ks(s)}function PL(s){return typeof s=="number"&&Iv(s)}function rn(s){if(!pe(s))return!1;var o=Ue(s);return o==gt||o==mt||o==z||o==ot}function Xg(s){return typeof s=="number"&&s==kt(s)}function Mo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=it}function pe(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function ge(s){return s!=null&&typeof s=="object"}var Kg=uv?tr(uv):FP;function ML(s,o){return s===o||lf(s,o,Af(o))}function kL(s,o,g){return g=typeof g=="function"?g:r,lf(s,o,Af(o),g)}function LL(s){return Yg(s)&&s!=+s}function FL(s){if(_M(s))throw new Ct(a);return Gv(s)}function BL(s){return s===null}function UL(s){return s==null}function Yg(s){return typeof s=="number"||ge(s)&&Ue(s)==It}function ks(s){if(!ge(s)||Ue(s)!=Wt)return!1;var o=so(s);if(o===null)return!0;var g=te.call(o,"constructor")&&o.constructor;return typeof g=="function"&&g instanceof g&&eo.call(g)==kN}var Ff=fv?tr(fv):BP;function DL(s){return Xg(s)&&s>=-it&&s<=it}var Zg=cv?tr(cv):UP;function ko(s){return typeof s=="string"||!Mt(s)&&ge(s)&&Ue(s)==ft}function rr(s){return typeof s=="symbol"||ge(s)&&Ue(s)==Nt}var Hi=hv?tr(hv):DP;function $L(s){return s===r}function GL(s){return ge(s)&&Le(s)==Pt}function qL(s){return ge(s)&&Ue(s)==qe}var jL=To(ff),HL=To(function(s,o){return s<=o});function Jg(s){if(!s)return[];if(He(s))return ko(s)?Or(s):je(s);if(xs&&s[xs])return EN(s[xs]());var o=Le(s),g=o==xt?Yu:o==pt?Ja:zi;return g(s)}function nn(s){if(!s)return s===0?s:0;if(s=vr(s),s===V||s===-V){var o=s<0?-1:1;return o*Y}return s===s?s:0}function kt(s){var o=nn(s),g=o%1;return o===o?g?o-g:o:0}function Qg(s){return s?Vn(kt(s),0,N):0}function vr(s){if(typeof s=="number")return s;if(rr(s))return U;if(pe(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=pe(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=mv(s);var g=AC.test(s);return g||OC.test(s)?sN(s.slice(2),g?2:8):TC.test(s)?U:+s}function ty(s){return $r(s,ze(s))}function zL(s){return s?Vn(kt(s),-it,it):s===0?s:0}function Yt(s){return s==null?"":er(s)}var VL=Gi(function(s,o){if(Ps(o)||He(o)){$r(o,Ie(o),s);return}for(var g in o)te.call(o,g)&&Ss(s,g,o[g])}),ey=Gi(function(s,o){$r(o,ze(o),s)}),Lo=Gi(function(s,o,g,T){$r(o,ze(o),s,T)}),WL=Gi(function(s,o,g,T){$r(o,Ie(o),s,T)}),XL=tn(rf);function KL(s,o){var g=$i(s);return o==null?g:Mv(g,o)}var YL=Bt(function(s,o){s=re(s);var g=-1,T=o.length,k=T>2?o[2]:r;for(k&&De(o[0],o[1],k)&&(T=1);++g<T;)for(var $=o[g],H=ze($),W=-1,Q=H.length;++W<Q;){var lt=H[W],ut=s[lt];(ut===r||Rr(ut,Bi[lt])&&!te.call(s,lt))&&(s[lt]=$[lt])}return s}),ZL=Bt(function(s){return s.push(r,mg),Qe(ry,r,s)});function JL(s,o){return pv(s,At(o,3),Dr)}function QL(s,o){return pv(s,At(o,3),sf)}function t3(s,o){return s==null?s:nf(s,At(o,3),ze)}function e3(s,o){return s==null?s:Uv(s,At(o,3),ze)}function r3(s,o){return s&&Dr(s,At(o,3))}function n3(s,o){return s&&sf(s,At(o,3))}function i3(s){return s==null?[]:go(s,Ie(s))}function s3(s){return s==null?[]:go(s,ze(s))}function Bf(s,o,g){var T=s==null?r:Wn(s,o);return T===r?g:T}function a3(s,o){return s!=null&&xg(s,o,RP)}function Uf(s,o){return s!=null&&xg(s,o,CP)}var o3=dg(function(s,o,g){o!=null&&typeof o.toString!="function"&&(o=ro.call(o)),s[o]=g},$f(Ve)),l3=dg(function(s,o,g){o!=null&&typeof o.toString!="function"&&(o=ro.call(o)),te.call(s,o)?s[o].push(g):s[o]=[g]},At),u3=Bt(Is);function Ie(s){return He(s)?Nv(s):uf(s)}function ze(s){return He(s)?Nv(s,!0):$P(s)}function f3(s,o){var g={};return o=At(o,3),Dr(s,function(T,k,$){Jr(g,o(T,k,$),T)}),g}function c3(s,o){var g={};return o=At(o,3),Dr(s,function(T,k,$){Jr(g,k,o(T,k,$))}),g}var h3=Gi(function(s,o,g){yo(s,o,g)}),ry=Gi(function(s,o,g,T){yo(s,o,g,T)}),d3=tn(function(s,o){var g={};if(s==null)return g;var T=!1;o=fe(o,function($){return $=bn($,s),T||(T=$.length>1),$}),$r(s,wf(s),g),T&&(g=hr(g,d|c|v,oM));for(var k=o.length;k--;)vf(g,o[k]);return g});function p3(s,o){return ny(s,Po(At(o)))}var v3=tn(function(s,o){return s==null?{}:qP(s,o)});function ny(s,o){if(s==null)return{};var g=fe(wf(s),function(T){return[T]});return o=At(o),Xv(s,g,function(T,k){return o(T,k[0])})}function g3(s,o,g){o=bn(o,s);var T=-1,k=o.length;for(k||(k=1,s=r);++T<k;){var $=s==null?r:s[Gr(o[T])];$===r&&(T=k,$=g),s=rn($)?$.call(s):$}return s}function y3(s,o,g){return s==null?s:Cs(s,o,g)}function m3(s,o,g,T){return T=typeof T=="function"?T:r,s==null?s:Cs(s,o,g,T)}var iy=gg(Ie),sy=gg(ze);function _3(s,o,g){var T=Mt(s),k=T||En(s)||Hi(s);if(o=At(o,4),g==null){var $=s&&s.constructor;k?g=T?new $:[]:pe(s)?g=rn($)?$i(so(s)):{}:g={}}return(k?ur:Dr)(s,function(H,W,Q){return o(g,H,W,Q)}),g}function b3(s,o){return s==null?!0:vf(s,o)}function x3(s,o,g){return s==null?s:Qv(s,o,mf(g))}function E3(s,o,g,T){return T=typeof T=="function"?T:r,s==null?s:Qv(s,o,mf(g),T)}function zi(s){return s==null?[]:Ku(s,Ie(s))}function w3(s){return s==null?[]:Ku(s,ze(s))}function T3(s,o,g){return g===r&&(g=o,o=r),g!==r&&(g=vr(g),g=g===g?g:0),o!==r&&(o=vr(o),o=o===o?o:0),Vn(vr(s),o,g)}function A3(s,o,g){return o=nn(o),g===r?(g=o,o=0):g=nn(g),s=vr(s),NP(s,o,g)}function S3(s,o,g){if(g&&typeof g!="boolean"&&De(s,o,g)&&(o=g=r),g===r&&(typeof o=="boolean"?(g=o,o=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&o===r?(s=0,o=1):(s=nn(s),o===r?(o=s,s=0):o=nn(o)),s>o){var T=s;s=o,o=T}if(g||s%1||o%1){var k=Rv();return ke(s+k*(o-s+iN("1e-"+((k+"").length-1))),o)}return hf(s,o)}var O3=qi(function(s,o,g){return o=o.toLowerCase(),s+(g?ay(o):o)});function ay(s){return Df(Yt(s).toLowerCase())}function oy(s){return s=Yt(s),s&&s.replace(RC,yN).replace(XC,"")}function I3(s,o,g){s=Yt(s),o=er(o);var T=s.length;g=g===r?T:Vn(kt(g),0,T);var k=g;return g-=o.length,g>=0&&s.slice(g,k)==o}function R3(s){return s=Yt(s),s&&uC.test(s)?s.replace(Up,mN):s}function C3(s){return s=Yt(s),s&&vC.test(s)?s.replace(Mu,"\\$&"):s}var N3=qi(function(s,o,g){return s+(g?"-":"")+o.toLowerCase()}),P3=qi(function(s,o,g){return s+(g?" ":"")+o.toLowerCase()}),M3=fg("toLowerCase");function k3(s,o,g){s=Yt(s),o=kt(o);var T=o?Li(s):0;if(!o||T>=o)return s;var k=(o-T)/2;return wo(uo(k),g)+s+wo(lo(k),g)}function L3(s,o,g){s=Yt(s),o=kt(o);var T=o?Li(s):0;return o&&T<o?s+wo(o-T,g):s}function F3(s,o,g){s=Yt(s),o=kt(o);var T=o?Li(s):0;return o&&T<o?wo(o-T,g)+s:s}function B3(s,o,g){return g||o==null?o=0:o&&(o=+o),HN(Yt(s).replace(ku,""),o||0)}function U3(s,o,g){return(g?De(s,o,g):o===r)?o=1:o=kt(o),df(Yt(s),o)}function D3(){var s=arguments,o=Yt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var $3=qi(function(s,o,g){return s+(g?"_":"")+o.toLowerCase()});function G3(s,o,g){return g&&typeof g!="number"&&De(s,o,g)&&(o=g=r),g=g===r?N:g>>>0,g?(s=Yt(s),s&&(typeof o=="string"||o!=null&&!Ff(o))&&(o=er(o),!o&&ki(s))?xn(Or(s),0,g):s.split(o,g)):[]}var q3=qi(function(s,o,g){return s+(g?" ":"")+Df(o)});function j3(s,o,g){return s=Yt(s),g=g==null?0:Vn(kt(g),0,s.length),o=er(o),s.slice(g,g+o.length)==o}function H3(s,o,g){var T=B.templateSettings;g&&De(s,o,g)&&(o=r),s=Yt(s),o=Lo({},o,T,yg);var k=Lo({},o.imports,T.imports,yg),$=Ie(k),H=Ku(k,$),W,Q,lt=0,ut=o.interpolate||Wa,ct="__p += '",vt=Zu((o.escape||Wa).source+"|"+ut.source+"|"+(ut===Dp?wC:Wa).source+"|"+(o.evaluate||Wa).source+"|$","g"),Et="//# sourceURL="+(te.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++QC+"]")+`
|
|
560
|
-
`;s.replace(
|
|
559
|
+
`)}function gM(s){return Mt(s)||Yn(s)||!!(Ov&&s&&s[Ov])}function en(s,o){var g=typeof s;return o=o??st,!!o&&(g=="number"||g!="symbol"&&IC.test(s))&&s>-1&&s%1==0&&s<o}function De(s,o,g){if(!de(g))return!1;var T=typeof o;return(T=="number"?ze(g)&&en(o,g.length):T=="string"&&o in g)?Cr(g[o],s):!1}function Of(s,o){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||rr(s)?!0:dC.test(s)||!hC.test(s)||o!=null&&s in re(o)}function yM(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function If(s){var o=Ao(s),g=B[o];if(typeof g!="function"||!(o in $t.prototype))return!1;if(s===g)return!0;var T=Tf(g);return!!T&&s===T[0]}function mM(s){return!!wv&&wv in s}var _M=to?rn:zf;function Ps(s){var o=s&&s.constructor,g=typeof o=="function"&&o.prototype||Bi;return s===g}function wg(s){return s===s&&!de(s)}function Tg(s,o){return function(g){return g==null?!1:g[s]===o&&(o!==r||s in re(g))}}function bM(s){var o=No(s,function(T){return g.size===h&&g.clear(),T}),g=o.cache;return o}function xM(s,o){var g=s[1],T=o[1],k=g|T,$=k<(b|m|S),H=T==S&&g==w||T==S&&g==O&&s[7].length<=o[8]||T==(S|O)&&o[7].length<=o[8]&&g==w;if(!($||H))return s;T&b&&(s[2]=o[2],k|=g&b?0:E);var W=o[3];if(W){var Q=s[3];s[3]=Q?ag(Q,W,o[4]):W,s[4]=Q?gn(s[3],p):o[4]}return W=o[5],W&&(Q=s[5],s[5]=Q?og(Q,W,o[6]):W,s[6]=Q?gn(s[5],p):o[6]),W=o[7],W&&(s[7]=W),T&S&&(s[8]=s[8]==null?o[8]:ke(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=k,s}function EM(s){var o=[];if(s!=null)for(var g in re(s))o.push(g);return o}function wM(s){return ro.call(s)}function Ag(s,o,g){return o=we(o===r?s.length-1:o,0),function(){for(var T=arguments,k=-1,$=we(T.length-o,0),H=rt($);++k<$;)H[k]=T[o+k];k=-1;for(var W=rt(o+1);++k<o;)W[k]=T[k];return W[o]=g(H),Qe(s,this,W)}}function Sg(s,o){return o.length<2?s:Wn(s,dr(o,0,-1))}function TM(s,o){for(var g=s.length,T=ke(o.length,g),k=He(s);T--;){var $=o[T];s[T]=en($,g)?k[$]:r}return s}function Rf(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var Og=Rg(Yv),Ms=DN||function(s,o){return Ce.setTimeout(s,o)},Cf=Rg(WP);function Ig(s,o,g){var T=o+"";return Cf(s,vM(T,AM(hM(T),g)))}function Rg(s){var o=0,g=0;return function(){var T=jN(),k=C-(T-g);if(g=T,k>0){if(++o>=M)return arguments[0]}else o=0;return s.apply(r,arguments)}}function Oo(s,o){var g=-1,T=s.length,k=T-1;for(o=o===r?T:o;++g<o;){var $=hf(g,k),H=s[$];s[$]=s[g],s[g]=H}return s.length=o,s}var Cg=bM(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(pC,function(g,T,k,$){o.push(k?$.replace(EC,"$1"):T||g)}),o});function Gr(s){if(typeof s=="string"||rr(s))return s;var o=s+"";return o=="0"&&1/s==-V?"-0":o}function Kn(s){if(s!=null){try{return eo.call(s)}catch{}try{return s+""}catch{}}return""}function AM(s,o){return ur(Z,function(g){var T="_."+g[0];o&g[1]&&!Ya(s,T)&&s.push(T)}),s.sort()}function Ng(s){if(s instanceof $t)return s.clone();var o=new cr(s.__wrapped__,s.__chain__);return o.__actions__=He(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function SM(s,o,g){(g?De(s,o,g):o===r)?o=1:o=we(kt(o),0);var T=s==null?0:s.length;if(!T||o<1)return[];for(var k=0,$=0,H=rt(lo(T/o));k<T;)H[$++]=dr(s,k,k+=o);return H}function OM(s){for(var o=-1,g=s==null?0:s.length,T=0,k=[];++o<g;){var $=s[o];$&&(k[T++]=$)}return k}function IM(){var s=arguments.length;if(!s)return[];for(var o=rt(s-1),g=arguments[0],T=s;T--;)o[T-1]=arguments[T];return vn(Mt(g)?He(g):[g],Ne(o,1))}var RM=Bt(function(s,o){return me(s)?Os(s,Ne(o,1,me,!0)):[]}),CM=Bt(function(s,o){var g=pr(o);return me(g)&&(g=r),me(s)?Os(s,Ne(o,1,me,!0),At(g,2)):[]}),NM=Bt(function(s,o){var g=pr(o);return me(g)&&(g=r),me(s)?Os(s,Ne(o,1,me,!0),r,g):[]});function PM(s,o,g){var T=s==null?0:s.length;return T?(o=g||o===r?1:kt(o),dr(s,o<0?0:o,T)):[]}function MM(s,o,g){var T=s==null?0:s.length;return T?(o=g||o===r?1:kt(o),o=T-o,dr(s,0,o<0?0:o)):[]}function kM(s,o){return s&&s.length?_o(s,At(o,3),!0,!0):[]}function LM(s,o){return s&&s.length?_o(s,At(o,3),!0):[]}function FM(s,o,g,T){var k=s==null?0:s.length;return k?(g&&typeof g!="number"&&De(s,o,g)&&(g=0,T=k),IP(s,o,g,T)):[]}function Pg(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=g==null?0:kt(g);return k<0&&(k=we(T+k,0)),Za(s,At(o,3),k)}function Mg(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=T-1;return g!==r&&(k=kt(g),k=g<0?we(T+k,0):ke(k,T-1)),Za(s,At(o,3),k,!0)}function kg(s){var o=s==null?0:s.length;return o?Ne(s,1):[]}function BM(s){var o=s==null?0:s.length;return o?Ne(s,V):[]}function UM(s,o){var g=s==null?0:s.length;return g?(o=o===r?1:kt(o),Ne(s,o)):[]}function DM(s){for(var o=-1,g=s==null?0:s.length,T={};++o<g;){var k=s[o];T[k[0]]=k[1]}return T}function Lg(s){return s&&s.length?s[0]:r}function $M(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=g==null?0:kt(g);return k<0&&(k=we(T+k,0)),Mi(s,o,k)}function GM(s){var o=s==null?0:s.length;return o?dr(s,0,-1):[]}var qM=Bt(function(s){var o=ue(s,yf);return o.length&&o[0]===s[0]?of(o):[]}),jM=Bt(function(s){var o=pr(s),g=ue(s,yf);return o===pr(g)?o=r:g.pop(),g.length&&g[0]===s[0]?of(g,At(o,2)):[]}),HM=Bt(function(s){var o=pr(s),g=ue(s,yf);return o=typeof o=="function"?o:r,o&&g.pop(),g.length&&g[0]===s[0]?of(g,r,o):[]});function zM(s,o){return s==null?"":GN.call(s,o)}function pr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function VM(s,o,g){var T=s==null?0:s.length;if(!T)return-1;var k=T;return g!==r&&(k=kt(g),k=k<0?we(T+k,0):ke(k,T-1)),o===o?AN(s,o,k):Za(s,vv,k,!0)}function WM(s,o){return s&&s.length?Vv(s,kt(o)):r}var XM=Bt(Fg);function Fg(s,o){return s&&s.length&&o&&o.length?cf(s,o):s}function KM(s,o,g){return s&&s.length&&o&&o.length?cf(s,o,At(g,2)):s}function YM(s,o,g){return s&&s.length&&o&&o.length?cf(s,o,r,g):s}var ZM=tn(function(s,o){var g=s==null?0:s.length,T=rf(s,o);return Kv(s,ue(o,function(k){return en(k,g)?+k:k}).sort(sg)),T});function JM(s,o){var g=[];if(!(s&&s.length))return g;var T=-1,k=[],$=s.length;for(o=At(o,3);++T<$;){var H=s[T];o(H,T,s)&&(g.push(H),k.push(T))}return Kv(s,k),g}function Nf(s){return s==null?s:zN.call(s)}function QM(s,o,g){var T=s==null?0:s.length;return T?(g&&typeof g!="number"&&De(s,o,g)?(o=0,g=T):(o=o==null?0:kt(o),g=g===r?T:kt(g)),dr(s,o,g)):[]}function tk(s,o){return mo(s,o)}function ek(s,o,g){return pf(s,o,At(g,2))}function rk(s,o){var g=s==null?0:s.length;if(g){var T=mo(s,o);if(T<g&&Cr(s[T],o))return T}return-1}function nk(s,o){return mo(s,o,!0)}function ik(s,o,g){return pf(s,o,At(g,2),!0)}function sk(s,o){var g=s==null?0:s.length;if(g){var T=mo(s,o,!0)-1;if(Cr(s[T],o))return T}return-1}function ak(s){return s&&s.length?Zv(s):[]}function ok(s,o){return s&&s.length?Zv(s,At(o,2)):[]}function lk(s){var o=s==null?0:s.length;return o?dr(s,1,o):[]}function uk(s,o,g){return s&&s.length?(o=g||o===r?1:kt(o),dr(s,0,o<0?0:o)):[]}function fk(s,o,g){var T=s==null?0:s.length;return T?(o=g||o===r?1:kt(o),o=T-o,dr(s,o<0?0:o,T)):[]}function ck(s,o){return s&&s.length?_o(s,At(o,3),!1,!0):[]}function hk(s,o){return s&&s.length?_o(s,At(o,3)):[]}var dk=Bt(function(s){return _n(Ne(s,1,me,!0))}),pk=Bt(function(s){var o=pr(s);return me(o)&&(o=r),_n(Ne(s,1,me,!0),At(o,2))}),vk=Bt(function(s){var o=pr(s);return o=typeof o=="function"?o:r,_n(Ne(s,1,me,!0),r,o)});function gk(s){return s&&s.length?_n(s):[]}function yk(s,o){return s&&s.length?_n(s,At(o,2)):[]}function mk(s,o){return o=typeof o=="function"?o:r,s&&s.length?_n(s,r,o):[]}function Pf(s){if(!(s&&s.length))return[];var o=0;return s=pn(s,function(g){if(me(g))return o=we(g.length,o),!0}),Xu(o,function(g){return ue(s,zu(g))})}function Bg(s,o){if(!(s&&s.length))return[];var g=Pf(s);return o==null?g:ue(g,function(T){return Qe(o,r,T)})}var _k=Bt(function(s,o){return me(s)?Os(s,o):[]}),bk=Bt(function(s){return gf(pn(s,me))}),xk=Bt(function(s){var o=pr(s);return me(o)&&(o=r),gf(pn(s,me),At(o,2))}),Ek=Bt(function(s){var o=pr(s);return o=typeof o=="function"?o:r,gf(pn(s,me),r,o)}),wk=Bt(Pf);function Tk(s,o){return eg(s||[],o||[],Ss)}function Ak(s,o){return eg(s||[],o||[],Cs)}var Sk=Bt(function(s){var o=s.length,g=o>1?s[o-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Bg(s,g)});function Ug(s){var o=B(s);return o.__chain__=!0,o}function Ok(s,o){return o(s),s}function Io(s,o){return o(s)}var Ik=tn(function(s){var o=s.length,g=o?s[0]:0,T=this.__wrapped__,k=function($){return rf($,s)};return o>1||this.__actions__.length||!(T instanceof $t)||!en(g)?this.thru(k):(T=T.slice(g,+g+(o?1:0)),T.__actions__.push({func:Io,args:[k],thisArg:r}),new cr(T,this.__chain__).thru(function($){return o&&!$.length&&$.push(r),$}))});function Rk(){return Ug(this)}function Ck(){return new cr(this.value(),this.__chain__)}function Nk(){this.__values__===r&&(this.__values__=Jg(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function Pk(){return this}function Mk(s){for(var o,g=this;g instanceof ho;){var T=Ng(g);T.__index__=0,T.__values__=r,o?k.__wrapped__=T:o=T;var k=T;g=g.__wrapped__}return k.__wrapped__=s,o}function kk(){var s=this.__wrapped__;if(s instanceof $t){var o=s;return this.__actions__.length&&(o=new $t(this)),o=o.reverse(),o.__actions__.push({func:Io,args:[Nf],thisArg:r}),new cr(o,this.__chain__)}return this.thru(Nf)}function Lk(){return tg(this.__wrapped__,this.__actions__)}var Fk=bo(function(s,o,g){te.call(s,g)?++s[g]:Jr(s,g,1)});function Bk(s,o,g){var T=Mt(s)?dv:OP;return g&&De(s,o,g)&&(o=r),T(s,At(o,3))}function Uk(s,o){var g=Mt(s)?pn:Bv;return g(s,At(o,3))}var Dk=cg(Pg),$k=cg(Mg);function Gk(s,o){return Ne(Ro(s,o),1)}function qk(s,o){return Ne(Ro(s,o),V)}function jk(s,o,g){return g=g===r?1:kt(g),Ne(Ro(s,o),g)}function Dg(s,o){var g=Mt(s)?ur:mn;return g(s,At(o,3))}function $g(s,o){var g=Mt(s)?lN:Fv;return g(s,At(o,3))}var Hk=bo(function(s,o,g){te.call(s,g)?s[g].push(o):Jr(s,g,[o])});function zk(s,o,g,T){s=ze(s)?s:zi(s),g=g&&!T?kt(g):0;var k=s.length;return g<0&&(g=we(k+g,0)),ko(s)?g<=k&&s.indexOf(o,g)>-1:!!k&&Mi(s,o,g)>-1}var Vk=Bt(function(s,o,g){var T=-1,k=typeof o=="function",$=ze(s)?rt(s.length):[];return mn(s,function(H){$[++T]=k?Qe(o,H,g):Is(H,o,g)}),$}),Wk=bo(function(s,o,g){Jr(s,g,o)});function Ro(s,o){var g=Mt(s)?ue:jv;return g(s,At(o,3))}function Xk(s,o,g,T){return s==null?[]:(Mt(o)||(o=o==null?[]:[o]),g=T?r:g,Mt(g)||(g=g==null?[]:[g]),Wv(s,o,g))}var Kk=bo(function(s,o,g){s[g?0:1].push(o)},function(){return[[],[]]});function Yk(s,o,g){var T=Mt(s)?ju:yv,k=arguments.length<3;return T(s,At(o,4),g,k,mn)}function Zk(s,o,g){var T=Mt(s)?uN:yv,k=arguments.length<3;return T(s,At(o,4),g,k,Fv)}function Jk(s,o){var g=Mt(s)?pn:Bv;return g(s,Po(At(o,3)))}function Qk(s){var o=Mt(s)?Pv:zP;return o(s)}function tL(s,o,g){(g?De(s,o,g):o===r)?o=1:o=kt(o);var T=Mt(s)?EP:VP;return T(s,o)}function eL(s){var o=Mt(s)?wP:XP;return o(s)}function rL(s){if(s==null)return 0;if(ze(s))return ko(s)?Li(s):s.length;var o=Le(s);return o==xt||o==pt?s.size:uf(s).length}function nL(s,o,g){var T=Mt(s)?Hu:KP;return g&&De(s,o,g)&&(o=r),T(s,At(o,3))}var iL=Bt(function(s,o){if(s==null)return[];var g=o.length;return g>1&&De(s,o[0],o[1])?o=[]:g>2&&De(o[0],o[1],o[2])&&(o=[o[0]]),Wv(s,Ne(o,1),[])}),Co=UN||function(){return Ce.Date.now()};function sL(s,o){if(typeof o!="function")throw new fr(l);return s=kt(s),function(){if(--s<1)return o.apply(this,arguments)}}function Gg(s,o,g){return o=g?r:o,o=s&&o==null?s.length:o,Qr(s,S,r,r,r,r,o)}function qg(s,o){var g;if(typeof o!="function")throw new fr(l);return s=kt(s),function(){return--s>0&&(g=o.apply(this,arguments)),s<=1&&(o=r),g}}var Mf=Bt(function(s,o,g){var T=b;if(g.length){var k=gn(g,ji(Mf));T|=A}return Qr(s,T,o,g,k)}),jg=Bt(function(s,o,g){var T=b|m;if(g.length){var k=gn(g,ji(jg));T|=A}return Qr(o,T,s,g,k)});function Hg(s,o,g){o=g?r:o;var T=Qr(s,w,r,r,r,r,r,o);return T.placeholder=Hg.placeholder,T}function zg(s,o,g){o=g?r:o;var T=Qr(s,x,r,r,r,r,r,o);return T.placeholder=zg.placeholder,T}function Vg(s,o,g){var T,k,$,H,W,Q,lt=0,ut=!1,ct=!1,gt=!0;if(typeof s!="function")throw new fr(l);o=vr(o)||0,de(g)&&(ut=!!g.leading,ct="maxWait"in g,$=ct?we(vr(g.maxWait)||0,o):$,gt="trailing"in g?!!g.trailing:gt);function Et(_e){var Nr=T,sn=k;return T=k=r,lt=_e,H=s.apply(sn,Nr),H}function St(_e){return lt=_e,W=Ms(Ut,o),ut?Et(_e):H}function Ft(_e){var Nr=_e-Q,sn=_e-lt,cy=o-Nr;return ct?ke(cy,$-sn):cy}function Ot(_e){var Nr=_e-Q,sn=_e-lt;return Q===r||Nr>=o||Nr<0||ct&&sn>=$}function Ut(){var _e=Co();if(Ot(_e))return qt(_e);W=Ms(Ut,Ft(_e))}function qt(_e){return W=r,gt&&T?Et(_e):(T=k=r,H)}function nr(){W!==r&&rg(W),lt=0,T=Q=k=W=r}function $e(){return W===r?H:qt(Co())}function ir(){var _e=Co(),Nr=Ot(_e);if(T=arguments,k=this,Q=_e,Nr){if(W===r)return St(Q);if(ct)return rg(W),W=Ms(Ut,o),Et(Q)}return W===r&&(W=Ms(Ut,o)),H}return ir.cancel=nr,ir.flush=$e,ir}var aL=Bt(function(s,o){return Lv(s,1,o)}),oL=Bt(function(s,o,g){return Lv(s,vr(o)||0,g)});function lL(s){return Qr(s,L)}function No(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new fr(l);var g=function(){var T=arguments,k=o?o.apply(this,T):T[0],$=g.cache;if($.has(k))return $.get(k);var H=s.apply(this,T);return g.cache=$.set(k,H)||$,H};return g.cache=new(No.Cache||Zr),g}No.Cache=Zr;function Po(s){if(typeof s!="function")throw new fr(l);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function uL(s){return qg(2,s)}var fL=YP(function(s,o){o=o.length==1&&Mt(o[0])?ue(o[0],tr(At())):ue(Ne(o,1),tr(At()));var g=o.length;return Bt(function(T){for(var k=-1,$=ke(T.length,g);++k<$;)T[k]=o[k].call(this,T[k]);return Qe(s,this,T)})}),kf=Bt(function(s,o){var g=gn(o,ji(kf));return Qr(s,A,r,o,g)}),Wg=Bt(function(s,o){var g=gn(o,ji(Wg));return Qr(s,P,r,o,g)}),cL=tn(function(s,o){return Qr(s,O,r,r,r,o)});function hL(s,o){if(typeof s!="function")throw new fr(l);return o=o===r?o:kt(o),Bt(s,o)}function dL(s,o){if(typeof s!="function")throw new fr(l);return o=o==null?0:we(kt(o),0),Bt(function(g){var T=g[o],k=xn(g,0,o);return T&&vn(k,T),Qe(s,this,k)})}function pL(s,o,g){var T=!0,k=!0;if(typeof s!="function")throw new fr(l);return de(g)&&(T="leading"in g?!!g.leading:T,k="trailing"in g?!!g.trailing:k),Vg(s,o,{leading:T,maxWait:o,trailing:k})}function vL(s){return Gg(s,1)}function gL(s,o){return kf(mf(o),s)}function yL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function mL(s){return hr(s,v)}function _L(s,o){return o=typeof o=="function"?o:r,hr(s,v,o)}function bL(s){return hr(s,d|v)}function xL(s,o){return o=typeof o=="function"?o:r,hr(s,d|v,o)}function EL(s,o){return o==null||kv(s,o,Ie(o))}function Cr(s,o){return s===o||s!==s&&o!==o}var wL=To(af),TL=To(function(s,o){return s>=o}),Yn=$v(function(){return arguments}())?$v:function(s){return ge(s)&&te.call(s,"callee")&&!Sv.call(s,"callee")},Mt=rt.isArray,AL=ov?tr(ov):MP;function ze(s){return s!=null&&Mo(s.length)&&!rn(s)}function me(s){return ge(s)&&ze(s)}function SL(s){return s===!0||s===!1||ge(s)&&Ue(s)==tt}var En=$N||zf,OL=lv?tr(lv):kP;function IL(s){return ge(s)&&s.nodeType===1&&!ks(s)}function RL(s){if(s==null)return!0;if(ze(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||En(s)||Hi(s)||Yn(s)))return!s.length;var o=Le(s);if(o==xt||o==pt)return!s.size;if(Ps(s))return!uf(s).length;for(var g in s)if(te.call(s,g))return!1;return!0}function CL(s,o){return Rs(s,o)}function NL(s,o,g){g=typeof g=="function"?g:r;var T=g?g(s,o):r;return T===r?Rs(s,o,r,g):!!T}function Lf(s){if(!ge(s))return!1;var o=Ue(s);return o==ht||o==nt||typeof s.message=="string"&&typeof s.name=="string"&&!ks(s)}function PL(s){return typeof s=="number"&&Iv(s)}function rn(s){if(!de(s))return!1;var o=Ue(s);return o==vt||o==mt||o==z||o==ot}function Xg(s){return typeof s=="number"&&s==kt(s)}function Mo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=st}function de(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function ge(s){return s!=null&&typeof s=="object"}var Kg=uv?tr(uv):FP;function ML(s,o){return s===o||lf(s,o,Af(o))}function kL(s,o,g){return g=typeof g=="function"?g:r,lf(s,o,Af(o),g)}function LL(s){return Yg(s)&&s!=+s}function FL(s){if(_M(s))throw new Ct(a);return Gv(s)}function BL(s){return s===null}function UL(s){return s==null}function Yg(s){return typeof s=="number"||ge(s)&&Ue(s)==Rt}function ks(s){if(!ge(s)||Ue(s)!=Wt)return!1;var o=so(s);if(o===null)return!0;var g=te.call(o,"constructor")&&o.constructor;return typeof g=="function"&&g instanceof g&&eo.call(g)==kN}var Ff=fv?tr(fv):BP;function DL(s){return Xg(s)&&s>=-st&&s<=st}var Zg=cv?tr(cv):UP;function ko(s){return typeof s=="string"||!Mt(s)&&ge(s)&&Ue(s)==ft}function rr(s){return typeof s=="symbol"||ge(s)&&Ue(s)==Nt}var Hi=hv?tr(hv):DP;function $L(s){return s===r}function GL(s){return ge(s)&&Le(s)==Pt}function qL(s){return ge(s)&&Ue(s)==je}var jL=To(ff),HL=To(function(s,o){return s<=o});function Jg(s){if(!s)return[];if(ze(s))return ko(s)?Ir(s):He(s);if(xs&&s[xs])return EN(s[xs]());var o=Le(s),g=o==xt?Yu:o==pt?Ja:zi;return g(s)}function nn(s){if(!s)return s===0?s:0;if(s=vr(s),s===V||s===-V){var o=s<0?-1:1;return o*Y}return s===s?s:0}function kt(s){var o=nn(s),g=o%1;return o===o?g?o-g:o:0}function Qg(s){return s?Vn(kt(s),0,N):0}function vr(s){if(typeof s=="number")return s;if(rr(s))return U;if(de(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=de(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=mv(s);var g=AC.test(s);return g||OC.test(s)?sN(s.slice(2),g?2:8):TC.test(s)?U:+s}function ty(s){return $r(s,Ve(s))}function zL(s){return s?Vn(kt(s),-st,st):s===0?s:0}function Yt(s){return s==null?"":er(s)}var VL=Gi(function(s,o){if(Ps(o)||ze(o)){$r(o,Ie(o),s);return}for(var g in o)te.call(o,g)&&Ss(s,g,o[g])}),ey=Gi(function(s,o){$r(o,Ve(o),s)}),Lo=Gi(function(s,o,g,T){$r(o,Ve(o),s,T)}),WL=Gi(function(s,o,g,T){$r(o,Ie(o),s,T)}),XL=tn(rf);function KL(s,o){var g=$i(s);return o==null?g:Mv(g,o)}var YL=Bt(function(s,o){s=re(s);var g=-1,T=o.length,k=T>2?o[2]:r;for(k&&De(o[0],o[1],k)&&(T=1);++g<T;)for(var $=o[g],H=Ve($),W=-1,Q=H.length;++W<Q;){var lt=H[W],ut=s[lt];(ut===r||Cr(ut,Bi[lt])&&!te.call(s,lt))&&(s[lt]=$[lt])}return s}),ZL=Bt(function(s){return s.push(r,mg),Qe(ry,r,s)});function JL(s,o){return pv(s,At(o,3),Dr)}function QL(s,o){return pv(s,At(o,3),sf)}function t3(s,o){return s==null?s:nf(s,At(o,3),Ve)}function e3(s,o){return s==null?s:Uv(s,At(o,3),Ve)}function r3(s,o){return s&&Dr(s,At(o,3))}function n3(s,o){return s&&sf(s,At(o,3))}function i3(s){return s==null?[]:go(s,Ie(s))}function s3(s){return s==null?[]:go(s,Ve(s))}function Bf(s,o,g){var T=s==null?r:Wn(s,o);return T===r?g:T}function a3(s,o){return s!=null&&xg(s,o,RP)}function Uf(s,o){return s!=null&&xg(s,o,CP)}var o3=dg(function(s,o,g){o!=null&&typeof o.toString!="function"&&(o=ro.call(o)),s[o]=g},$f(We)),l3=dg(function(s,o,g){o!=null&&typeof o.toString!="function"&&(o=ro.call(o)),te.call(s,o)?s[o].push(g):s[o]=[g]},At),u3=Bt(Is);function Ie(s){return ze(s)?Nv(s):uf(s)}function Ve(s){return ze(s)?Nv(s,!0):$P(s)}function f3(s,o){var g={};return o=At(o,3),Dr(s,function(T,k,$){Jr(g,o(T,k,$),T)}),g}function c3(s,o){var g={};return o=At(o,3),Dr(s,function(T,k,$){Jr(g,k,o(T,k,$))}),g}var h3=Gi(function(s,o,g){yo(s,o,g)}),ry=Gi(function(s,o,g,T){yo(s,o,g,T)}),d3=tn(function(s,o){var g={};if(s==null)return g;var T=!1;o=ue(o,function($){return $=bn($,s),T||(T=$.length>1),$}),$r(s,wf(s),g),T&&(g=hr(g,d|c|v,oM));for(var k=o.length;k--;)vf(g,o[k]);return g});function p3(s,o){return ny(s,Po(At(o)))}var v3=tn(function(s,o){return s==null?{}:qP(s,o)});function ny(s,o){if(s==null)return{};var g=ue(wf(s),function(T){return[T]});return o=At(o),Xv(s,g,function(T,k){return o(T,k[0])})}function g3(s,o,g){o=bn(o,s);var T=-1,k=o.length;for(k||(k=1,s=r);++T<k;){var $=s==null?r:s[Gr(o[T])];$===r&&(T=k,$=g),s=rn($)?$.call(s):$}return s}function y3(s,o,g){return s==null?s:Cs(s,o,g)}function m3(s,o,g,T){return T=typeof T=="function"?T:r,s==null?s:Cs(s,o,g,T)}var iy=gg(Ie),sy=gg(Ve);function _3(s,o,g){var T=Mt(s),k=T||En(s)||Hi(s);if(o=At(o,4),g==null){var $=s&&s.constructor;k?g=T?new $:[]:de(s)?g=rn($)?$i(so(s)):{}:g={}}return(k?ur:Dr)(s,function(H,W,Q){return o(g,H,W,Q)}),g}function b3(s,o){return s==null?!0:vf(s,o)}function x3(s,o,g){return s==null?s:Qv(s,o,mf(g))}function E3(s,o,g,T){return T=typeof T=="function"?T:r,s==null?s:Qv(s,o,mf(g),T)}function zi(s){return s==null?[]:Ku(s,Ie(s))}function w3(s){return s==null?[]:Ku(s,Ve(s))}function T3(s,o,g){return g===r&&(g=o,o=r),g!==r&&(g=vr(g),g=g===g?g:0),o!==r&&(o=vr(o),o=o===o?o:0),Vn(vr(s),o,g)}function A3(s,o,g){return o=nn(o),g===r?(g=o,o=0):g=nn(g),s=vr(s),NP(s,o,g)}function S3(s,o,g){if(g&&typeof g!="boolean"&&De(s,o,g)&&(o=g=r),g===r&&(typeof o=="boolean"?(g=o,o=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&o===r?(s=0,o=1):(s=nn(s),o===r?(o=s,s=0):o=nn(o)),s>o){var T=s;s=o,o=T}if(g||s%1||o%1){var k=Rv();return ke(s+k*(o-s+iN("1e-"+((k+"").length-1))),o)}return hf(s,o)}var O3=qi(function(s,o,g){return o=o.toLowerCase(),s+(g?ay(o):o)});function ay(s){return Df(Yt(s).toLowerCase())}function oy(s){return s=Yt(s),s&&s.replace(RC,yN).replace(XC,"")}function I3(s,o,g){s=Yt(s),o=er(o);var T=s.length;g=g===r?T:Vn(kt(g),0,T);var k=g;return g-=o.length,g>=0&&s.slice(g,k)==o}function R3(s){return s=Yt(s),s&&uC.test(s)?s.replace(Up,mN):s}function C3(s){return s=Yt(s),s&&vC.test(s)?s.replace(Mu,"\\$&"):s}var N3=qi(function(s,o,g){return s+(g?"-":"")+o.toLowerCase()}),P3=qi(function(s,o,g){return s+(g?" ":"")+o.toLowerCase()}),M3=fg("toLowerCase");function k3(s,o,g){s=Yt(s),o=kt(o);var T=o?Li(s):0;if(!o||T>=o)return s;var k=(o-T)/2;return wo(uo(k),g)+s+wo(lo(k),g)}function L3(s,o,g){s=Yt(s),o=kt(o);var T=o?Li(s):0;return o&&T<o?s+wo(o-T,g):s}function F3(s,o,g){s=Yt(s),o=kt(o);var T=o?Li(s):0;return o&&T<o?wo(o-T,g)+s:s}function B3(s,o,g){return g||o==null?o=0:o&&(o=+o),HN(Yt(s).replace(ku,""),o||0)}function U3(s,o,g){return(g?De(s,o,g):o===r)?o=1:o=kt(o),df(Yt(s),o)}function D3(){var s=arguments,o=Yt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var $3=qi(function(s,o,g){return s+(g?"_":"")+o.toLowerCase()});function G3(s,o,g){return g&&typeof g!="number"&&De(s,o,g)&&(o=g=r),g=g===r?N:g>>>0,g?(s=Yt(s),s&&(typeof o=="string"||o!=null&&!Ff(o))&&(o=er(o),!o&&ki(s))?xn(Ir(s),0,g):s.split(o,g)):[]}var q3=qi(function(s,o,g){return s+(g?" ":"")+Df(o)});function j3(s,o,g){return s=Yt(s),g=g==null?0:Vn(kt(g),0,s.length),o=er(o),s.slice(g,g+o.length)==o}function H3(s,o,g){var T=B.templateSettings;g&&De(s,o,g)&&(o=r),s=Yt(s),o=Lo({},o,T,yg);var k=Lo({},o.imports,T.imports,yg),$=Ie(k),H=Ku(k,$),W,Q,lt=0,ut=o.interpolate||Wa,ct="__p += '",gt=Zu((o.escape||Wa).source+"|"+ut.source+"|"+(ut===Dp?wC:Wa).source+"|"+(o.evaluate||Wa).source+"|$","g"),Et="//# sourceURL="+(te.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++QC+"]")+`
|
|
560
|
+
`;s.replace(gt,function(Ot,Ut,qt,nr,$e,ir){return qt||(qt=nr),ct+=s.slice(lt,ir).replace(CC,_N),Ut&&(W=!0,ct+=`' +
|
|
561
561
|
__e(`+Ut+`) +
|
|
562
562
|
'`),$e&&(Q=!0,ct+=`';
|
|
563
563
|
`+$e+`;
|
|
@@ -573,44 +573,44 @@ __p += '`),qt&&(ct+=`' +
|
|
|
573
573
|
function print() { __p += __j.call(arguments, '') }
|
|
574
574
|
`:`;
|
|
575
575
|
`)+ct+`return __p
|
|
576
|
-
}`;var Ft=uy(function(){return Xt($,Et+"return "+ct).apply(r,H)});if(Ft.source=ct,Lf(Ft))throw Ft;return Ft}function z3(s){return Yt(s).toLowerCase()}function V3(s){return Yt(s).toUpperCase()}function W3(s,o,g){if(s=Yt(s),s&&(g||o===r))return mv(s);if(!s||!(o=er(o)))return s;var T=Or(s),k=Or(o),$=_v(T,k),H=bv(T,k)+1;return xn(T,$,H).join("")}function X3(s,o,g){if(s=Yt(s),s&&(g||o===r))return s.slice(0,Ev(s)+1);if(!s||!(o=er(o)))return s;var T=Or(s),k=bv(T,Or(o))+1;return xn(T,0,k).join("")}function K3(s,o,g){if(s=Yt(s),s&&(g||o===r))return s.replace(ku,"");if(!s||!(o=er(o)))return s;var T=Or(s),k=_v(T,Or(o));return xn(T,k).join("")}function Y3(s,o){var g=R,T=I;if(pe(o)){var k="separator"in o?o.separator:k;g="length"in o?kt(o.length):g,T="omission"in o?er(o.omission):T}s=Yt(s);var $=s.length;if(ki(s)){var H=Or(s);$=H.length}if(g>=$)return s;var W=g-Li(T);if(W<1)return T;var Q=H?xn(H,0,W).join(""):s.slice(0,W);if(k===r)return Q+T;if(H&&(W+=Q.length-W),Ff(k)){if(s.slice(W).search(k)){var lt,ut=Q;for(k.global||(k=Zu(k.source,Yt($p.exec(k))+"g")),k.lastIndex=0;lt=k.exec(ut);)var ct=lt.index;Q=Q.slice(0,ct===r?W:ct)}}else if(s.indexOf(er(k),W)!=W){var vt=Q.lastIndexOf(k);vt>-1&&(Q=Q.slice(0,vt))}return Q+T}function Z3(s){return s=Yt(s),s&&lC.test(s)?s.replace(Bp,SN):s}var J3=qi(function(s,o,g){return s+(g?" ":"")+o.toUpperCase()}),Df=fg("toUpperCase");function ly(s,o,g){return s=Yt(s),o=g?r:o,o===r?xN(s)?RN(s):hN(s):s.match(o)||[]}var uy=Bt(function(s,o){try{return Qe(s,r,o)}catch(g){return Lf(g)?g:new Ct(g)}}),Q3=tn(function(s,o){return ur(o,function(g){g=Gr(g),Jr(s,g,Mf(s[g],s))}),s});function tF(s){var o=s==null?0:s.length,g=At();return s=o?fe(s,function(T){if(typeof T[1]!="function")throw new fr(l);return[g(T[0]),T[1]]}):[],Bt(function(T){for(var k=-1;++k<o;){var $=s[k];if(Qe($[0],this,T))return Qe($[1],this,T)}})}function eF(s){return SP(hr(s,d))}function $f(s){return function(){return s}}function rF(s,o){return s==null||s!==s?o:s}var nF=hg(),iF=hg(!0);function Ve(s){return s}function Gf(s){return qv(typeof s=="function"?s:hr(s,d))}function sF(s){return Hv(hr(s,d))}function aF(s,o){return zv(s,hr(o,d))}var oF=Bt(function(s,o){return function(g){return Is(g,s,o)}}),lF=Bt(function(s,o){return function(g){return Is(s,g,o)}});function qf(s,o,g){var T=Ie(o),k=go(o,T);g==null&&!(pe(o)&&(k.length||!T.length))&&(g=o,o=s,s=this,k=go(o,Ie(o)));var $=!(pe(g)&&"chain"in g)||!!g.chain,H=rn(s);return ur(k,function(W){var Q=o[W];s[W]=Q,H&&(s.prototype[W]=function(){var lt=this.__chain__;if($||lt){var ut=s(this.__wrapped__),ct=ut.__actions__=je(this.__actions__);return ct.push({func:Q,args:arguments,thisArg:s}),ut.__chain__=lt,ut}return Q.apply(s,vn([this.value()],arguments))})}),s}function uF(){return Ce._===this&&(Ce._=LN),this}function jf(){}function fF(s){return s=kt(s),Bt(function(o){return Vv(o,s)})}var cF=bf(fe),hF=bf(dv),dF=bf(Hu);function fy(s){return Of(s)?zu(Gr(s)):jP(s)}function pF(s){return function(o){return s==null?r:Wn(s,o)}}var vF=pg(),gF=pg(!0);function Hf(){return[]}function zf(){return!1}function yF(){return{}}function mF(){return""}function _F(){return!0}function bF(s,o){if(s=kt(s),s<1||s>it)return[];var g=N,T=ke(s,N);o=At(o),s-=N;for(var k=Xu(T,o);++g<s;)o(g);return k}function xF(s){return Mt(s)?fe(s,Gr):rr(s)?[s]:je(Cg(Yt(s)))}function EF(s){var o=++MN;return Yt(s)+o}var wF=Eo(function(s,o){return s+o},0),TF=xf("ceil"),AF=Eo(function(s,o){return s/o},1),SF=xf("floor");function OF(s){return s&&s.length?vo(s,Ve,af):r}function IF(s,o){return s&&s.length?vo(s,At(o,2),af):r}function RF(s){return gv(s,Ve)}function CF(s,o){return gv(s,At(o,2))}function NF(s){return s&&s.length?vo(s,Ve,ff):r}function PF(s,o){return s&&s.length?vo(s,At(o,2),ff):r}var MF=Eo(function(s,o){return s*o},1),kF=xf("round"),LF=Eo(function(s,o){return s-o},0);function FF(s){return s&&s.length?Wu(s,Ve):0}function BF(s,o){return s&&s.length?Wu(s,At(o,2)):0}return B.after=sL,B.ary=Gg,B.assign=VL,B.assignIn=ey,B.assignInWith=Lo,B.assignWith=WL,B.at=XL,B.before=qg,B.bind=Mf,B.bindAll=Q3,B.bindKey=jg,B.castArray=yL,B.chain=Ug,B.chunk=SM,B.compact=OM,B.concat=IM,B.cond=tF,B.conforms=eF,B.constant=$f,B.countBy=Fk,B.create=KL,B.curry=Hg,B.curryRight=zg,B.debounce=Vg,B.defaults=YL,B.defaultsDeep=ZL,B.defer=aL,B.delay=oL,B.difference=RM,B.differenceBy=CM,B.differenceWith=NM,B.drop=PM,B.dropRight=MM,B.dropRightWhile=kM,B.dropWhile=LM,B.fill=FM,B.filter=Uk,B.flatMap=Gk,B.flatMapDeep=qk,B.flatMapDepth=jk,B.flatten=kg,B.flattenDeep=BM,B.flattenDepth=UM,B.flip=lL,B.flow=nF,B.flowRight=iF,B.fromPairs=DM,B.functions=i3,B.functionsIn=s3,B.groupBy=Hk,B.initial=GM,B.intersection=qM,B.intersectionBy=jM,B.intersectionWith=HM,B.invert=o3,B.invertBy=l3,B.invokeMap=Vk,B.iteratee=Gf,B.keyBy=Wk,B.keys=Ie,B.keysIn=ze,B.map=Ro,B.mapKeys=f3,B.mapValues=c3,B.matches=sF,B.matchesProperty=aF,B.memoize=No,B.merge=h3,B.mergeWith=ry,B.method=oF,B.methodOf=lF,B.mixin=qf,B.negate=Po,B.nthArg=fF,B.omit=d3,B.omitBy=p3,B.once=uL,B.orderBy=Xk,B.over=cF,B.overArgs=fL,B.overEvery=hF,B.overSome=dF,B.partial=kf,B.partialRight=Wg,B.partition=Kk,B.pick=v3,B.pickBy=ny,B.property=fy,B.propertyOf=pF,B.pull=XM,B.pullAll=Fg,B.pullAllBy=KM,B.pullAllWith=YM,B.pullAt=ZM,B.range=vF,B.rangeRight=gF,B.rearg=cL,B.reject=Jk,B.remove=JM,B.rest=hL,B.reverse=Nf,B.sampleSize=tL,B.set=y3,B.setWith=m3,B.shuffle=eL,B.slice=QM,B.sortBy=iL,B.sortedUniq=ak,B.sortedUniqBy=ok,B.split=G3,B.spread=dL,B.tail=lk,B.take=uk,B.takeRight=fk,B.takeRightWhile=ck,B.takeWhile=hk,B.tap=Ok,B.throttle=pL,B.thru=Io,B.toArray=Jg,B.toPairs=iy,B.toPairsIn=sy,B.toPath=xF,B.toPlainObject=ty,B.transform=_3,B.unary=vL,B.union=dk,B.unionBy=pk,B.unionWith=vk,B.uniq=gk,B.uniqBy=yk,B.uniqWith=mk,B.unset=b3,B.unzip=Pf,B.unzipWith=Bg,B.update=x3,B.updateWith=E3,B.values=zi,B.valuesIn=w3,B.without=_k,B.words=ly,B.wrap=gL,B.xor=bk,B.xorBy=xk,B.xorWith=Ek,B.zip=wk,B.zipObject=Tk,B.zipObjectDeep=Ak,B.zipWith=Sk,B.entries=iy,B.entriesIn=sy,B.extend=ey,B.extendWith=Lo,qf(B,B),B.add=wF,B.attempt=uy,B.camelCase=O3,B.capitalize=ay,B.ceil=TF,B.clamp=T3,B.clone=mL,B.cloneDeep=bL,B.cloneDeepWith=xL,B.cloneWith=_L,B.conformsTo=EL,B.deburr=oy,B.defaultTo=rF,B.divide=AF,B.endsWith=I3,B.eq=Rr,B.escape=R3,B.escapeRegExp=C3,B.every=Bk,B.find=Dk,B.findIndex=Pg,B.findKey=JL,B.findLast=$k,B.findLastIndex=Mg,B.findLastKey=QL,B.floor=SF,B.forEach=Dg,B.forEachRight=$g,B.forIn=t3,B.forInRight=e3,B.forOwn=r3,B.forOwnRight=n3,B.get=Bf,B.gt=wL,B.gte=TL,B.has=a3,B.hasIn=Uf,B.head=Lg,B.identity=Ve,B.includes=zk,B.indexOf=$M,B.inRange=A3,B.invoke=u3,B.isArguments=Yn,B.isArray=Mt,B.isArrayBuffer=AL,B.isArrayLike=He,B.isArrayLikeObject=me,B.isBoolean=SL,B.isBuffer=En,B.isDate=OL,B.isElement=IL,B.isEmpty=RL,B.isEqual=CL,B.isEqualWith=NL,B.isError=Lf,B.isFinite=PL,B.isFunction=rn,B.isInteger=Xg,B.isLength=Mo,B.isMap=Kg,B.isMatch=ML,B.isMatchWith=kL,B.isNaN=LL,B.isNative=FL,B.isNil=UL,B.isNull=BL,B.isNumber=Yg,B.isObject=pe,B.isObjectLike=ge,B.isPlainObject=ks,B.isRegExp=Ff,B.isSafeInteger=DL,B.isSet=Zg,B.isString=ko,B.isSymbol=rr,B.isTypedArray=Hi,B.isUndefined=$L,B.isWeakMap=GL,B.isWeakSet=qL,B.join=zM,B.kebabCase=N3,B.last=pr,B.lastIndexOf=VM,B.lowerCase=P3,B.lowerFirst=M3,B.lt=jL,B.lte=HL,B.max=OF,B.maxBy=IF,B.mean=RF,B.meanBy=CF,B.min=NF,B.minBy=PF,B.stubArray=Hf,B.stubFalse=zf,B.stubObject=yF,B.stubString=mF,B.stubTrue=_F,B.multiply=MF,B.nth=WM,B.noConflict=uF,B.noop=jf,B.now=Co,B.pad=k3,B.padEnd=L3,B.padStart=F3,B.parseInt=B3,B.random=S3,B.reduce=Yk,B.reduceRight=Zk,B.repeat=U3,B.replace=D3,B.result=g3,B.round=kF,B.runInContext=J,B.sample=Qk,B.size=rL,B.snakeCase=$3,B.some=nL,B.sortedIndex=tk,B.sortedIndexBy=ek,B.sortedIndexOf=rk,B.sortedLastIndex=nk,B.sortedLastIndexBy=ik,B.sortedLastIndexOf=sk,B.startCase=q3,B.startsWith=j3,B.subtract=LF,B.sum=FF,B.sumBy=BF,B.template=H3,B.times=bF,B.toFinite=nn,B.toInteger=kt,B.toLength=Qg,B.toLower=z3,B.toNumber=vr,B.toSafeInteger=zL,B.toString=Yt,B.toUpper=V3,B.trim=W3,B.trimEnd=X3,B.trimStart=K3,B.truncate=Y3,B.unescape=Z3,B.uniqueId=EF,B.upperCase=J3,B.upperFirst=Df,B.each=Dg,B.eachRight=$g,B.first=Lg,qf(B,function(){var s={};return Dr(B,function(o,g){te.call(B.prototype,g)||(s[g]=o)}),s}(),{chain:!1}),B.VERSION=n,ur(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),ur(["drop","take"],function(s,o){$t.prototype[s]=function(g){g=g===r?1:we(kt(g),0);var T=this.__filtered__&&!o?new $t(this):this.clone();return T.__filtered__?T.__takeCount__=ke(g,T.__takeCount__):T.__views__.push({size:ke(g,N),type:s+(T.__dir__<0?"Right":"")}),T},$t.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),ur(["filter","map","takeWhile"],function(s,o){var g=o+1,T=g==F||g==X;$t.prototype[s]=function(k){var $=this.clone();return $.__iteratees__.push({iteratee:At(k,3),type:g}),$.__filtered__=$.__filtered__||T,$}}),ur(["head","last"],function(s,o){var g="take"+(o?"Right":"");$t.prototype[s]=function(){return this[g](1).value()[0]}}),ur(["initial","tail"],function(s,o){var g="drop"+(o?"":"Right");$t.prototype[s]=function(){return this.__filtered__?new $t(this):this[g](1)}}),$t.prototype.compact=function(){return this.filter(Ve)},$t.prototype.find=function(s){return this.filter(s).head()},$t.prototype.findLast=function(s){return this.reverse().find(s)},$t.prototype.invokeMap=Bt(function(s,o){return typeof s=="function"?new $t(this):this.map(function(g){return Is(g,s,o)})}),$t.prototype.reject=function(s){return this.filter(Po(At(s)))},$t.prototype.slice=function(s,o){s=kt(s);var g=this;return g.__filtered__&&(s>0||o<0)?new $t(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),o!==r&&(o=kt(o),g=o<0?g.dropRight(-o):g.take(o-s)),g)},$t.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},$t.prototype.toArray=function(){return this.take(N)},Dr($t.prototype,function(s,o){var g=/^(?:filter|find|map|reject)|While$/.test(o),T=/^(?:head|last)$/.test(o),k=B[T?"take"+(o=="last"?"Right":""):o],$=T||/^find/.test(o);k&&(B.prototype[o]=function(){var H=this.__wrapped__,W=T?[1]:arguments,Q=H instanceof $t,lt=W[0],ut=Q||Mt(H),ct=function(Ut){var qt=k.apply(B,vn([Ut],W));return T&&vt?qt[0]:qt};ut&&g&&typeof lt=="function"&<.length!=1&&(Q=ut=!1);var vt=this.__chain__,Et=!!this.__actions__.length,St=$&&!vt,Ft=Q&&!Et;if(!$&&ut){H=Ft?H:new $t(this);var Ot=s.apply(H,W);return Ot.__actions__.push({func:Io,args:[ct],thisArg:r}),new cr(Ot,vt)}return St&&Ft?s.apply(this,W):(Ot=this.thru(ct),St?T?Ot.value()[0]:Ot.value():Ot)})}),ur(["pop","push","shift","sort","splice","unshift"],function(s){var o=Qa[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",T=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var k=arguments;if(T&&!this.__chain__){var $=this.value();return o.apply(Mt($)?$:[],k)}return this[g](function(H){return o.apply(Mt(H)?H:[],k)})}}),Dr($t.prototype,function(s,o){var g=B[o];if(g){var T=g.name+"";te.call(Di,T)||(Di[T]=[]),Di[T].push({name:o,func:g})}}),Di[xo(r,b).name]=[{name:"wrapper",func:r}],$t.prototype.clone=ZN,$t.prototype.reverse=JN,$t.prototype.value=QN,B.prototype.at=Ik,B.prototype.chain=Rk,B.prototype.commit=Ck,B.prototype.next=Nk,B.prototype.plant=Mk,B.prototype.reverse=kk,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=Lk,B.prototype.first=B.prototype.head,xs&&(B.prototype[xs]=Pk),B},Fi=CN();qn?((qn.exports=Fi)._=Fi,$u._=Fi):Ce._=Fi}).call(Xe)}(Va,Va.exports);var Mp=Va.exports;const JR={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},QR=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState([]),[,i]=Tt.useState(0),[a,l]=Tt.useState([]),[,u]=bt.useState(0),[,f]=bt.useState(!1),[h,p]=qR({autoPlay:!1}),d=bt.useRef(null),c=bt.useRef(null),v=bt.useRef(JR),y=bt.useRef(),{tl:m,isDragging:_}=bt.useContext(mi),{frames:b,delays:E}=h,{src:w,startAt:x,endAt:A,loop:P,transformation:{width:S=0,height:O=0,x:L,y:R,animation:I}}=e,M=.1;YR(w,p),Fr(Ze.PAUSE,U=>{console.log("pause event",U),d.current&&(d.current.stop(),v.current.isPlaying=!1)}),Tt.useEffect(()=>{v.current&&d.current&&(_?(d.current.stop(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[_]),Tt.useEffect(()=>{if(!xi(b)){const U=mR(b,q=>{const{data:Z,width:K,height:G}=q,z=new Uint8Array(Z);return wn.Texture.fromBuffer(z,K,G)}),N=U.map((q,Z)=>({texture:q,time:E[Z]}));n(U),l(N);let D=0;E.forEach(q=>{D+=q*10}),i(D),v.current.totalDuration=D,v.current.totalFrames=b.length}},[b,E]);const C=Mp.debounce(U=>{if(d.current){let N=U===0?0:U/M;const D=v.current.totalFrames;N=N>=D?D:N,d.current.gotoAndPlay(N||0),v.current.isPlaying=!0}},50),F=Mp.debounce(()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},150),j=U=>{if(d.current){let N=U===0?0:U/M;const D=v.current.totalFrames;N=N>=D?D:N,d.current.gotoAndPlay(N||0),v.current.isPlaying=!0}},X=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},V=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},it=U=>{var D;const N=U+((D=y.current)==null?void 0:D.time());d.current&&v.current.isDragging?(C(N),F(),v.current.isPlaying=!1):d.current&&!v.current.isPlaying&&(C(N),v.current.isPlaying=!0)},Y=()=>{f(!0)};return bt.useEffect(()=>{let U=We.context(()=>{});if(c.current&&m.current){const N={duration:Number(A)-Number(x),onStart:j,onComplete:X,onStartParams:[x,A],onCompleteParams:[],onInterrupt:V,onUpdate:it,onUpdateParams:[x,A]};U=We.context(()=>{y.current=We.from(c.current,N,x),m.current.add(y.current,x)})}return()=>U.revert()},[I,x,A]),Zt.jsx(Ei,{...e,ref:t,ignoreTlForVideo:!0,children:Zt.jsx(ve.Container,{ref:c,children:r&&r.length>0&&Zt.jsx(Pp,{x:L,y:R,width:S,height:O,animationSpeed:1,loop:P,textures:a,onComplete:Y,onFrameChange:U=>u(U),anchor:.5,forwardRef:d})})})});var kp={exports:{}};/*!
|
|
576
|
+
}`;var Ft=uy(function(){return Xt($,Et+"return "+ct).apply(r,H)});if(Ft.source=ct,Lf(Ft))throw Ft;return Ft}function z3(s){return Yt(s).toLowerCase()}function V3(s){return Yt(s).toUpperCase()}function W3(s,o,g){if(s=Yt(s),s&&(g||o===r))return mv(s);if(!s||!(o=er(o)))return s;var T=Ir(s),k=Ir(o),$=_v(T,k),H=bv(T,k)+1;return xn(T,$,H).join("")}function X3(s,o,g){if(s=Yt(s),s&&(g||o===r))return s.slice(0,Ev(s)+1);if(!s||!(o=er(o)))return s;var T=Ir(s),k=bv(T,Ir(o))+1;return xn(T,0,k).join("")}function K3(s,o,g){if(s=Yt(s),s&&(g||o===r))return s.replace(ku,"");if(!s||!(o=er(o)))return s;var T=Ir(s),k=_v(T,Ir(o));return xn(T,k).join("")}function Y3(s,o){var g=R,T=I;if(de(o)){var k="separator"in o?o.separator:k;g="length"in o?kt(o.length):g,T="omission"in o?er(o.omission):T}s=Yt(s);var $=s.length;if(ki(s)){var H=Ir(s);$=H.length}if(g>=$)return s;var W=g-Li(T);if(W<1)return T;var Q=H?xn(H,0,W).join(""):s.slice(0,W);if(k===r)return Q+T;if(H&&(W+=Q.length-W),Ff(k)){if(s.slice(W).search(k)){var lt,ut=Q;for(k.global||(k=Zu(k.source,Yt($p.exec(k))+"g")),k.lastIndex=0;lt=k.exec(ut);)var ct=lt.index;Q=Q.slice(0,ct===r?W:ct)}}else if(s.indexOf(er(k),W)!=W){var gt=Q.lastIndexOf(k);gt>-1&&(Q=Q.slice(0,gt))}return Q+T}function Z3(s){return s=Yt(s),s&&lC.test(s)?s.replace(Bp,SN):s}var J3=qi(function(s,o,g){return s+(g?" ":"")+o.toUpperCase()}),Df=fg("toUpperCase");function ly(s,o,g){return s=Yt(s),o=g?r:o,o===r?xN(s)?RN(s):hN(s):s.match(o)||[]}var uy=Bt(function(s,o){try{return Qe(s,r,o)}catch(g){return Lf(g)?g:new Ct(g)}}),Q3=tn(function(s,o){return ur(o,function(g){g=Gr(g),Jr(s,g,Mf(s[g],s))}),s});function tF(s){var o=s==null?0:s.length,g=At();return s=o?ue(s,function(T){if(typeof T[1]!="function")throw new fr(l);return[g(T[0]),T[1]]}):[],Bt(function(T){for(var k=-1;++k<o;){var $=s[k];if(Qe($[0],this,T))return Qe($[1],this,T)}})}function eF(s){return SP(hr(s,d))}function $f(s){return function(){return s}}function rF(s,o){return s==null||s!==s?o:s}var nF=hg(),iF=hg(!0);function We(s){return s}function Gf(s){return qv(typeof s=="function"?s:hr(s,d))}function sF(s){return Hv(hr(s,d))}function aF(s,o){return zv(s,hr(o,d))}var oF=Bt(function(s,o){return function(g){return Is(g,s,o)}}),lF=Bt(function(s,o){return function(g){return Is(s,g,o)}});function qf(s,o,g){var T=Ie(o),k=go(o,T);g==null&&!(de(o)&&(k.length||!T.length))&&(g=o,o=s,s=this,k=go(o,Ie(o)));var $=!(de(g)&&"chain"in g)||!!g.chain,H=rn(s);return ur(k,function(W){var Q=o[W];s[W]=Q,H&&(s.prototype[W]=function(){var lt=this.__chain__;if($||lt){var ut=s(this.__wrapped__),ct=ut.__actions__=He(this.__actions__);return ct.push({func:Q,args:arguments,thisArg:s}),ut.__chain__=lt,ut}return Q.apply(s,vn([this.value()],arguments))})}),s}function uF(){return Ce._===this&&(Ce._=LN),this}function jf(){}function fF(s){return s=kt(s),Bt(function(o){return Vv(o,s)})}var cF=bf(ue),hF=bf(dv),dF=bf(Hu);function fy(s){return Of(s)?zu(Gr(s)):jP(s)}function pF(s){return function(o){return s==null?r:Wn(s,o)}}var vF=pg(),gF=pg(!0);function Hf(){return[]}function zf(){return!1}function yF(){return{}}function mF(){return""}function _F(){return!0}function bF(s,o){if(s=kt(s),s<1||s>st)return[];var g=N,T=ke(s,N);o=At(o),s-=N;for(var k=Xu(T,o);++g<s;)o(g);return k}function xF(s){return Mt(s)?ue(s,Gr):rr(s)?[s]:He(Cg(Yt(s)))}function EF(s){var o=++MN;return Yt(s)+o}var wF=Eo(function(s,o){return s+o},0),TF=xf("ceil"),AF=Eo(function(s,o){return s/o},1),SF=xf("floor");function OF(s){return s&&s.length?vo(s,We,af):r}function IF(s,o){return s&&s.length?vo(s,At(o,2),af):r}function RF(s){return gv(s,We)}function CF(s,o){return gv(s,At(o,2))}function NF(s){return s&&s.length?vo(s,We,ff):r}function PF(s,o){return s&&s.length?vo(s,At(o,2),ff):r}var MF=Eo(function(s,o){return s*o},1),kF=xf("round"),LF=Eo(function(s,o){return s-o},0);function FF(s){return s&&s.length?Wu(s,We):0}function BF(s,o){return s&&s.length?Wu(s,At(o,2)):0}return B.after=sL,B.ary=Gg,B.assign=VL,B.assignIn=ey,B.assignInWith=Lo,B.assignWith=WL,B.at=XL,B.before=qg,B.bind=Mf,B.bindAll=Q3,B.bindKey=jg,B.castArray=yL,B.chain=Ug,B.chunk=SM,B.compact=OM,B.concat=IM,B.cond=tF,B.conforms=eF,B.constant=$f,B.countBy=Fk,B.create=KL,B.curry=Hg,B.curryRight=zg,B.debounce=Vg,B.defaults=YL,B.defaultsDeep=ZL,B.defer=aL,B.delay=oL,B.difference=RM,B.differenceBy=CM,B.differenceWith=NM,B.drop=PM,B.dropRight=MM,B.dropRightWhile=kM,B.dropWhile=LM,B.fill=FM,B.filter=Uk,B.flatMap=Gk,B.flatMapDeep=qk,B.flatMapDepth=jk,B.flatten=kg,B.flattenDeep=BM,B.flattenDepth=UM,B.flip=lL,B.flow=nF,B.flowRight=iF,B.fromPairs=DM,B.functions=i3,B.functionsIn=s3,B.groupBy=Hk,B.initial=GM,B.intersection=qM,B.intersectionBy=jM,B.intersectionWith=HM,B.invert=o3,B.invertBy=l3,B.invokeMap=Vk,B.iteratee=Gf,B.keyBy=Wk,B.keys=Ie,B.keysIn=Ve,B.map=Ro,B.mapKeys=f3,B.mapValues=c3,B.matches=sF,B.matchesProperty=aF,B.memoize=No,B.merge=h3,B.mergeWith=ry,B.method=oF,B.methodOf=lF,B.mixin=qf,B.negate=Po,B.nthArg=fF,B.omit=d3,B.omitBy=p3,B.once=uL,B.orderBy=Xk,B.over=cF,B.overArgs=fL,B.overEvery=hF,B.overSome=dF,B.partial=kf,B.partialRight=Wg,B.partition=Kk,B.pick=v3,B.pickBy=ny,B.property=fy,B.propertyOf=pF,B.pull=XM,B.pullAll=Fg,B.pullAllBy=KM,B.pullAllWith=YM,B.pullAt=ZM,B.range=vF,B.rangeRight=gF,B.rearg=cL,B.reject=Jk,B.remove=JM,B.rest=hL,B.reverse=Nf,B.sampleSize=tL,B.set=y3,B.setWith=m3,B.shuffle=eL,B.slice=QM,B.sortBy=iL,B.sortedUniq=ak,B.sortedUniqBy=ok,B.split=G3,B.spread=dL,B.tail=lk,B.take=uk,B.takeRight=fk,B.takeRightWhile=ck,B.takeWhile=hk,B.tap=Ok,B.throttle=pL,B.thru=Io,B.toArray=Jg,B.toPairs=iy,B.toPairsIn=sy,B.toPath=xF,B.toPlainObject=ty,B.transform=_3,B.unary=vL,B.union=dk,B.unionBy=pk,B.unionWith=vk,B.uniq=gk,B.uniqBy=yk,B.uniqWith=mk,B.unset=b3,B.unzip=Pf,B.unzipWith=Bg,B.update=x3,B.updateWith=E3,B.values=zi,B.valuesIn=w3,B.without=_k,B.words=ly,B.wrap=gL,B.xor=bk,B.xorBy=xk,B.xorWith=Ek,B.zip=wk,B.zipObject=Tk,B.zipObjectDeep=Ak,B.zipWith=Sk,B.entries=iy,B.entriesIn=sy,B.extend=ey,B.extendWith=Lo,qf(B,B),B.add=wF,B.attempt=uy,B.camelCase=O3,B.capitalize=ay,B.ceil=TF,B.clamp=T3,B.clone=mL,B.cloneDeep=bL,B.cloneDeepWith=xL,B.cloneWith=_L,B.conformsTo=EL,B.deburr=oy,B.defaultTo=rF,B.divide=AF,B.endsWith=I3,B.eq=Cr,B.escape=R3,B.escapeRegExp=C3,B.every=Bk,B.find=Dk,B.findIndex=Pg,B.findKey=JL,B.findLast=$k,B.findLastIndex=Mg,B.findLastKey=QL,B.floor=SF,B.forEach=Dg,B.forEachRight=$g,B.forIn=t3,B.forInRight=e3,B.forOwn=r3,B.forOwnRight=n3,B.get=Bf,B.gt=wL,B.gte=TL,B.has=a3,B.hasIn=Uf,B.head=Lg,B.identity=We,B.includes=zk,B.indexOf=$M,B.inRange=A3,B.invoke=u3,B.isArguments=Yn,B.isArray=Mt,B.isArrayBuffer=AL,B.isArrayLike=ze,B.isArrayLikeObject=me,B.isBoolean=SL,B.isBuffer=En,B.isDate=OL,B.isElement=IL,B.isEmpty=RL,B.isEqual=CL,B.isEqualWith=NL,B.isError=Lf,B.isFinite=PL,B.isFunction=rn,B.isInteger=Xg,B.isLength=Mo,B.isMap=Kg,B.isMatch=ML,B.isMatchWith=kL,B.isNaN=LL,B.isNative=FL,B.isNil=UL,B.isNull=BL,B.isNumber=Yg,B.isObject=de,B.isObjectLike=ge,B.isPlainObject=ks,B.isRegExp=Ff,B.isSafeInteger=DL,B.isSet=Zg,B.isString=ko,B.isSymbol=rr,B.isTypedArray=Hi,B.isUndefined=$L,B.isWeakMap=GL,B.isWeakSet=qL,B.join=zM,B.kebabCase=N3,B.last=pr,B.lastIndexOf=VM,B.lowerCase=P3,B.lowerFirst=M3,B.lt=jL,B.lte=HL,B.max=OF,B.maxBy=IF,B.mean=RF,B.meanBy=CF,B.min=NF,B.minBy=PF,B.stubArray=Hf,B.stubFalse=zf,B.stubObject=yF,B.stubString=mF,B.stubTrue=_F,B.multiply=MF,B.nth=WM,B.noConflict=uF,B.noop=jf,B.now=Co,B.pad=k3,B.padEnd=L3,B.padStart=F3,B.parseInt=B3,B.random=S3,B.reduce=Yk,B.reduceRight=Zk,B.repeat=U3,B.replace=D3,B.result=g3,B.round=kF,B.runInContext=J,B.sample=Qk,B.size=rL,B.snakeCase=$3,B.some=nL,B.sortedIndex=tk,B.sortedIndexBy=ek,B.sortedIndexOf=rk,B.sortedLastIndex=nk,B.sortedLastIndexBy=ik,B.sortedLastIndexOf=sk,B.startCase=q3,B.startsWith=j3,B.subtract=LF,B.sum=FF,B.sumBy=BF,B.template=H3,B.times=bF,B.toFinite=nn,B.toInteger=kt,B.toLength=Qg,B.toLower=z3,B.toNumber=vr,B.toSafeInteger=zL,B.toString=Yt,B.toUpper=V3,B.trim=W3,B.trimEnd=X3,B.trimStart=K3,B.truncate=Y3,B.unescape=Z3,B.uniqueId=EF,B.upperCase=J3,B.upperFirst=Df,B.each=Dg,B.eachRight=$g,B.first=Lg,qf(B,function(){var s={};return Dr(B,function(o,g){te.call(B.prototype,g)||(s[g]=o)}),s}(),{chain:!1}),B.VERSION=n,ur(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),ur(["drop","take"],function(s,o){$t.prototype[s]=function(g){g=g===r?1:we(kt(g),0);var T=this.__filtered__&&!o?new $t(this):this.clone();return T.__filtered__?T.__takeCount__=ke(g,T.__takeCount__):T.__views__.push({size:ke(g,N),type:s+(T.__dir__<0?"Right":"")}),T},$t.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),ur(["filter","map","takeWhile"],function(s,o){var g=o+1,T=g==F||g==X;$t.prototype[s]=function(k){var $=this.clone();return $.__iteratees__.push({iteratee:At(k,3),type:g}),$.__filtered__=$.__filtered__||T,$}}),ur(["head","last"],function(s,o){var g="take"+(o?"Right":"");$t.prototype[s]=function(){return this[g](1).value()[0]}}),ur(["initial","tail"],function(s,o){var g="drop"+(o?"":"Right");$t.prototype[s]=function(){return this.__filtered__?new $t(this):this[g](1)}}),$t.prototype.compact=function(){return this.filter(We)},$t.prototype.find=function(s){return this.filter(s).head()},$t.prototype.findLast=function(s){return this.reverse().find(s)},$t.prototype.invokeMap=Bt(function(s,o){return typeof s=="function"?new $t(this):this.map(function(g){return Is(g,s,o)})}),$t.prototype.reject=function(s){return this.filter(Po(At(s)))},$t.prototype.slice=function(s,o){s=kt(s);var g=this;return g.__filtered__&&(s>0||o<0)?new $t(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),o!==r&&(o=kt(o),g=o<0?g.dropRight(-o):g.take(o-s)),g)},$t.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},$t.prototype.toArray=function(){return this.take(N)},Dr($t.prototype,function(s,o){var g=/^(?:filter|find|map|reject)|While$/.test(o),T=/^(?:head|last)$/.test(o),k=B[T?"take"+(o=="last"?"Right":""):o],$=T||/^find/.test(o);k&&(B.prototype[o]=function(){var H=this.__wrapped__,W=T?[1]:arguments,Q=H instanceof $t,lt=W[0],ut=Q||Mt(H),ct=function(Ut){var qt=k.apply(B,vn([Ut],W));return T&>?qt[0]:qt};ut&&g&&typeof lt=="function"&<.length!=1&&(Q=ut=!1);var gt=this.__chain__,Et=!!this.__actions__.length,St=$&&!gt,Ft=Q&&!Et;if(!$&&ut){H=Ft?H:new $t(this);var Ot=s.apply(H,W);return Ot.__actions__.push({func:Io,args:[ct],thisArg:r}),new cr(Ot,gt)}return St&&Ft?s.apply(this,W):(Ot=this.thru(ct),St?T?Ot.value()[0]:Ot.value():Ot)})}),ur(["pop","push","shift","sort","splice","unshift"],function(s){var o=Qa[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",T=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var k=arguments;if(T&&!this.__chain__){var $=this.value();return o.apply(Mt($)?$:[],k)}return this[g](function(H){return o.apply(Mt(H)?H:[],k)})}}),Dr($t.prototype,function(s,o){var g=B[o];if(g){var T=g.name+"";te.call(Di,T)||(Di[T]=[]),Di[T].push({name:o,func:g})}}),Di[xo(r,m).name]=[{name:"wrapper",func:r}],$t.prototype.clone=ZN,$t.prototype.reverse=JN,$t.prototype.value=QN,B.prototype.at=Ik,B.prototype.chain=Rk,B.prototype.commit=Ck,B.prototype.next=Nk,B.prototype.plant=Mk,B.prototype.reverse=kk,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=Lk,B.prototype.first=B.prototype.head,xs&&(B.prototype[xs]=Pk),B},Fi=CN();qn?((qn.exports=Fi)._=Fi,$u._=Fi):Ce._=Fi}).call(Ke)}(Va,Va.exports);var Mp=Va.exports;const JR={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},QR=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState([]),[,i]=Tt.useState(0),[a,l]=Tt.useState([]),[,u]=_t.useState(0),[,f]=_t.useState(!1),[h,p]=qR({autoPlay:!1}),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(JR),y=_t.useRef(),{tl:_,isDragging:b}=_t.useContext(mi),{frames:m,delays:E}=h,{src:w,startAt:x,endAt:A,loop:P,transformation:{width:S=0,height:O=0,x:L,y:R,animation:I}}=e,M=.1;YR(w,p),wr(qe.PAUSE,U=>{console.log("pause event",U),d.current&&(d.current.stop(),v.current.isPlaying=!1)}),Tt.useEffect(()=>{v.current&&d.current&&(b?(d.current.stop(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[b]),Tt.useEffect(()=>{if(!xi(m)){const U=mR(m,q=>{const{data:Z,width:K,height:G}=q,z=new Uint8Array(Z);return wn.Texture.fromBuffer(z,K,G)}),N=U.map((q,Z)=>({texture:q,time:E[Z]}));n(U),l(N);let D=0;E.forEach(q=>{D+=q*10}),i(D),v.current.totalDuration=D,v.current.totalFrames=m.length}},[m,E]);const C=Mp.debounce(U=>{if(d.current){let N=U===0?0:U/M;const D=v.current.totalFrames;N=N>=D?D:N,d.current.gotoAndPlay(N||0),v.current.isPlaying=!0}},50),F=Mp.debounce(()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},150),j=U=>{if(d.current){let N=U===0?0:U/M;const D=v.current.totalFrames;N=N>=D?D:N,d.current.gotoAndPlay(N||0),v.current.isPlaying=!0}},X=()=>{console.log("local gif time complete"),d.current&&(d.current.stop(),v.current.isPlaying=!1)},V=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},st=U=>{var D;const N=U+((D=y.current)==null?void 0:D.time());d.current&&v.current.isDragging?(C(N),F(),v.current.isPlaying=!1):d.current&&!v.current.isPlaying&&(C(N),v.current.isPlaying=!0)},Y=()=>{f(!0)};return _t.useEffect(()=>{let U=Xe.context(()=>{});if(c.current&&_.current){const N={duration:Number(A)-Number(x),onStart:j,onComplete:X,onStartParams:[x,A],onCompleteParams:[],onInterrupt:V,onUpdate:st,onUpdateParams:[x,A]};U=Xe.context(()=>{y.current=Xe.from(c.current,N,x),_.current.add(y.current,x)})}return()=>U.revert()},[I,x,A]),Zt.jsx(Ei,{...e,ref:t,ignoreTlForVideo:!0,children:Zt.jsx(pe.Container,{ref:c,children:r&&r.length>0&&Zt.jsx(Pp,{x:L,y:R,width:S,height:O,animationSpeed:1,loop:P,textures:a,onComplete:Y,onFrameChange:U=>u(U),anchor:.5,forwardRef:d})})})});var kp={exports:{}};/*!
|
|
577
577
|
* Quill Editor v1.3.7
|
|
578
578
|
* https://quilljs.com/
|
|
579
579
|
* Copyright (c) 2014, Jason Chen
|
|
580
580
|
* Copyright (c) 2013, salesforce.com
|
|
581
|
-
*/(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:
|
|
582
|
-
`;for(var v=f.iterator(this.ops),y=new p,
|
|
581
|
+
*/(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:Ke,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var l=n[a]={i:a,l:!1,exports:{}};return r[a].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=r,i.c=n,i.d=function(a,l,u){i.o(a,l)||Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:u})},i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,"a",l),l},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),l=i(18),u=i(19),f=i(45),h=i(46),p=i(47),d=i(48),c=i(49),v=i(12),y=i(32),_=i(33),b=i(31),m=i(1),E={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:a.default,Format:l.default,Leaf:u.default,Embed:d.default,Scroll:f.default,Block:p.default,Inline:h.default,Text:c.default,Attributor:{Attribute:v.default,Class:y.default,Style:_.default,Store:b.default}};n.default=E},function(r,n,i){var a=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,E){m.__proto__=E}||function(m,E){for(var w in E)E.hasOwnProperty(w)&&(m[w]=E[w])};return function(m,E){b(m,E);function w(){this.constructor=m}m.prototype=E===null?Object.create(E):(w.prototype=E.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=function(b){a(m,b);function m(E){var w=this;return E="[Parchment] "+E,w=b.call(this,E)||this,w.message=E,w.name=w.constructor.name,w}return m}(Error);n.ParchmentError=l;var u={},f={},h={},p={};n.DATA_KEY="__blot";var d;(function(b){b[b.TYPE=3]="TYPE",b[b.LEVEL=12]="LEVEL",b[b.ATTRIBUTE=13]="ATTRIBUTE",b[b.BLOT=14]="BLOT",b[b.INLINE=7]="INLINE",b[b.BLOCK=11]="BLOCK",b[b.BLOCK_BLOT=10]="BLOCK_BLOT",b[b.INLINE_BLOT=6]="INLINE_BLOT",b[b.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",b[b.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",b[b.ANY=15]="ANY"})(d=n.Scope||(n.Scope={}));function c(b,m){var E=y(b);if(E==null)throw new l("Unable to create "+b+" blot");var w=E,x=b instanceof Node||b.nodeType===Node.TEXT_NODE?b:w.create(m);return new w(x,m)}n.create=c;function v(b,m){return m===void 0&&(m=!1),b==null?null:b[n.DATA_KEY]!=null?b[n.DATA_KEY].blot:m?v(b.parentNode,m):null}n.find=v;function y(b,m){m===void 0&&(m=d.ANY);var E;if(typeof b=="string")E=p[b]||u[b];else if(b instanceof Text||b.nodeType===Node.TEXT_NODE)E=p.text;else if(typeof b=="number")b&d.LEVEL&d.BLOCK?E=p.block:b&d.LEVEL&d.INLINE&&(E=p.inline);else if(b instanceof HTMLElement){var w=(b.getAttribute("class")||"").split(/\s+/);for(var x in w)if(E=f[w[x]],E)break;E=E||h[b.tagName]}return E==null?null:m&d.LEVEL&E.scope&&m&d.TYPE&E.scope?E:null}n.query=y;function _(){for(var b=[],m=0;m<arguments.length;m++)b[m]=arguments[m];if(b.length>1)return b.map(function(x){return _(x)});var E=b[0];if(typeof E.blotName!="string"&&typeof E.attrName!="string")throw new l("Invalid definition");if(E.blotName==="abstract")throw new l("Cannot register abstract class");if(p[E.blotName||E.attrName]=E,typeof E.keyName=="string")u[E.keyName]=E;else if(E.className!=null&&(f[E.className]=E),E.tagName!=null){Array.isArray(E.tagName)?E.tagName=E.tagName.map(function(x){return x.toUpperCase()}):E.tagName=E.tagName.toUpperCase();var w=Array.isArray(E.tagName)?E.tagName:[E.tagName];w.forEach(function(x){(h[x]==null||E.className==null)&&(h[x]=E)})}return E}n.register=_},function(r,n,i){var a=i(51),l=i(11),u=i(3),f=i(20),h=String.fromCharCode(0),p=function(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]};p.prototype.insert=function(d,c){var v={};return d.length===0?this:(v.insert=d,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v))},p.prototype.delete=function(d){return d<=0?this:this.push({delete:d})},p.prototype.retain=function(d,c){if(d<=0)return this;var v={retain:d};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v)},p.prototype.push=function(d){var c=this.ops.length,v=this.ops[c-1];if(d=u(!0,{},d),typeof v=="object"){if(typeof d.delete=="number"&&typeof v.delete=="number")return this.ops[c-1]={delete:v.delete+d.delete},this;if(typeof v.delete=="number"&&d.insert!=null&&(c-=1,v=this.ops[c-1],typeof v!="object"))return this.ops.unshift(d),this;if(l(d.attributes,v.attributes)){if(typeof d.insert=="string"&&typeof v.insert=="string")return this.ops[c-1]={insert:v.insert+d.insert},typeof d.attributes=="object"&&(this.ops[c-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof v.retain=="number")return this.ops[c-1]={retain:v.retain+d.retain},typeof d.attributes=="object"&&(this.ops[c-1].attributes=d.attributes),this}}return c===this.ops.length?this.ops.push(d):this.ops.splice(c,0,d),this},p.prototype.chop=function(){var d=this.ops[this.ops.length-1];return d&&d.retain&&!d.attributes&&this.ops.pop(),this},p.prototype.filter=function(d){return this.ops.filter(d)},p.prototype.forEach=function(d){this.ops.forEach(d)},p.prototype.map=function(d){return this.ops.map(d)},p.prototype.partition=function(d){var c=[],v=[];return this.forEach(function(y){var _=d(y)?c:v;_.push(y)}),[c,v]},p.prototype.reduce=function(d,c){return this.ops.reduce(d,c)},p.prototype.changeLength=function(){return this.reduce(function(d,c){return c.insert?d+f.length(c):c.delete?d-c.delete:d},0)},p.prototype.length=function(){return this.reduce(function(d,c){return d+f.length(c)},0)},p.prototype.slice=function(d,c){d=d||0,typeof c!="number"&&(c=1/0);for(var v=[],y=f.iterator(this.ops),_=0;_<c&&y.hasNext();){var b;_<d?b=y.next(d-_):(b=y.next(c-_),v.push(b)),_+=f.length(b)}return new p(v)},p.prototype.compose=function(d){var c=f.iterator(this.ops),v=f.iterator(d.ops),y=[],_=v.peek();if(_!=null&&typeof _.retain=="number"&&_.attributes==null){for(var b=_.retain;c.peekType()==="insert"&&c.peekLength()<=b;)b-=c.peekLength(),y.push(c.next());_.retain-b>0&&v.next(_.retain-b)}for(var m=new p(y);c.hasNext()||v.hasNext();)if(v.peekType()==="insert")m.push(v.next());else if(c.peekType()==="delete")m.push(c.next());else{var E=Math.min(c.peekLength(),v.peekLength()),w=c.next(E),x=v.next(E);if(typeof x.retain=="number"){var A={};typeof w.retain=="number"?A.retain=E:A.insert=w.insert;var P=f.attributes.compose(w.attributes,x.attributes,typeof w.retain=="number");if(P&&(A.attributes=P),m.push(A),!v.hasNext()&&l(m.ops[m.ops.length-1],A)){var S=new p(c.rest());return m.concat(S).chop()}}else typeof x.delete=="number"&&typeof w.retain=="number"&&m.push(x)}return m.chop()},p.prototype.concat=function(d){var c=new p(this.ops.slice());return d.ops.length>0&&(c.push(d.ops[0]),c.ops=c.ops.concat(d.ops.slice(1))),c},p.prototype.diff=function(d,c){if(this.ops===d.ops)return new p;var v=[this,d].map(function(E){return E.map(function(w){if(w.insert!=null)return typeof w.insert=="string"?w.insert:h;var x=E===d?"on":"with";throw new Error("diff() called "+x+" non-document")}).join("")}),y=new p,_=a(v[0],v[1],c),b=f.iterator(this.ops),m=f.iterator(d.ops);return _.forEach(function(E){for(var w=E[1].length;w>0;){var x=0;switch(E[0]){case a.INSERT:x=Math.min(m.peekLength(),w),y.push(m.next(x));break;case a.DELETE:x=Math.min(w,b.peekLength()),b.next(x),y.delete(x);break;case a.EQUAL:x=Math.min(b.peekLength(),m.peekLength(),w);var A=b.next(x),P=m.next(x);l(A.insert,P.insert)?y.retain(x,f.attributes.diff(A.attributes,P.attributes)):y.push(P).delete(x);break}w-=x}}),y.chop()},p.prototype.eachLine=function(d,c){c=c||`
|
|
582
|
+
`;for(var v=f.iterator(this.ops),y=new p,_=0;v.hasNext();){if(v.peekType()!=="insert")return;var b=v.peek(),m=f.length(b)-v.peekLength(),E=typeof b.insert=="string"?b.insert.indexOf(c,m)-m:-1;if(E<0)y.push(v.next());else if(E>0)y.push(v.next(E));else{if(d(y,v.next(1).attributes||{},_)===!1)return;_+=1,y=new p}}y.length()>0&&d(y,{},_)},p.prototype.transform=function(d,c){if(c=!!c,typeof d=="number")return this.transformPosition(d,c);for(var v=f.iterator(this.ops),y=f.iterator(d.ops),_=new p;v.hasNext()||y.hasNext();)if(v.peekType()==="insert"&&(c||y.peekType()!=="insert"))_.retain(f.length(v.next()));else if(y.peekType()==="insert")_.push(y.next());else{var b=Math.min(v.peekLength(),y.peekLength()),m=v.next(b),E=y.next(b);if(m.delete)continue;E.delete?_.push(E):_.retain(b,f.attributes.transform(m.attributes,E.attributes,c))}return _.chop()},p.prototype.transformPosition=function(d,c){c=!!c;for(var v=f.iterator(this.ops),y=0;v.hasNext()&&y<=d;){var _=v.peekLength(),b=v.peekType();if(v.next(),b==="delete"){d-=Math.min(_,d-y);continue}else b==="insert"&&(y<d||!c)&&(d+=_);y+=_}return d},r.exports=p},function(r,n){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,f=function(v){return typeof Array.isArray=="function"?Array.isArray(v):a.call(v)==="[object Array]"},h=function(v){if(!v||a.call(v)!=="[object Object]")return!1;var y=i.call(v,"constructor"),_=v.constructor&&v.constructor.prototype&&i.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!_)return!1;var b;for(b in v);return typeof b>"u"||i.call(v,b)},p=function(v,y){l&&y.name==="__proto__"?l(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},d=function(v,y){if(y==="__proto__")if(i.call(v,y)){if(u)return u(v,y).value}else return;return v[y]};r.exports=function c(){var v,y,_,b,m,E,w=arguments[0],x=1,A=arguments.length,P=!1;for(typeof w=="boolean"&&(P=w,w=arguments[1]||{},x=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});x<A;++x)if(v=arguments[x],v!=null)for(y in v)_=d(w,y),b=d(v,y),w!==b&&(P&&b&&(h(b)||(m=f(b)))?(m?(m=!1,E=_&&f(_)?_:[]):E=_&&h(_)?_:{},p(w,{name:y,newValue:c(P,E,b)})):typeof b<"u"&&p(w,{name:y,newValue:b}));return w}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var a=function(){function I(M,C){for(var F=0;F<C.length;F++){var j=C[F];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(M,j.key,j)}}return function(M,C,F){return C&&I(M.prototype,C),F&&I(M,F),M}}(),l=function I(M,C,F){M===null&&(M=Function.prototype);var j=Object.getOwnPropertyDescriptor(M,C);if(j===void 0){var X=Object.getPrototypeOf(M);return X===null?void 0:I(X,C,F)}else{if("value"in j)return j.value;var V=j.get;return V===void 0?void 0:V.call(F)}},u=i(3),f=w(u),h=i(2),p=w(h),d=i(0),c=w(d),v=i(16),y=w(v),_=i(6),b=w(_),m=i(7),E=w(m);function w(I){return I&&I.__esModule?I:{default:I}}function x(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}function A(I,M){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:I}function P(I,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);I.prototype=Object.create(M&&M.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(I,M):I.__proto__=M)}var S=1,O=function(I){P(M,I);function M(){return x(this,M),A(this,(M.__proto__||Object.getPrototypeOf(M)).apply(this,arguments))}return a(M,[{key:"attach",value:function(){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"attach",this).call(this),this.attributes=new c.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new p.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(F,j){var X=c.default.query(F,c.default.Scope.BLOCK_ATTRIBUTE);X!=null&&this.attributes.attribute(X,j)}},{key:"formatAt",value:function(F,j,X,V){this.format(X,V)}},{key:"insertAt",value:function(F,j,X){if(typeof j=="string"&&j.endsWith(`
|
|
583
583
|
`)){var V=c.default.create(L.blotName);this.parent.insertBefore(V,F===0?this:this.next),V.insertAt(0,j.slice(0,-1))}else l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,F,j,X)}}]),M}(c.default.Embed);O.scope=c.default.Scope.BLOCK_BLOT;var L=function(I){P(M,I);function M(C){x(this,M);var F=A(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,C));return F.cache={},F}return a(M,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(c.default.Leaf).reduce(function(F,j){return j.length()===0?F:F.insert(j.value(),R(j))},new p.default).insert(`
|
|
584
584
|
`,R(this))),this.cache.delta}},{key:"deleteAt",value:function(F,j){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"deleteAt",this).call(this,F,j),this.cache={}}},{key:"formatAt",value:function(F,j,X,V){j<=0||(c.default.query(X,c.default.Scope.BLOCK)?F+j===this.length()&&this.format(X,V):l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"formatAt",this).call(this,F,Math.min(j,this.length()-F-1),X,V),this.cache={})}},{key:"insertAt",value:function(F,j,X){if(X!=null)return l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,F,j,X);if(j.length!==0){var V=j.split(`
|
|
585
|
-
`),it=V.shift();it.length>0&&(F<this.length()-1||this.children.tail==null?l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),it):this.children.tail.insertAt(this.children.tail.length(),it),this.cache={});var Y=this;V.reduce(function(U,N){return Y=Y.split(U,!0),Y.insertAt(0,N),N.length},F+it.length)}}},{key:"insertBefore",value:function(F,j){var X=this.children.head;l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,F,j),X instanceof y.default&&X.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"length",this).call(this)+S),this.cache.length}},{key:"moveChildren",value:function(F,j){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"moveChildren",this).call(this,F,j),this.cache={}}},{key:"optimize",value:function(F){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(j&&(F===0||F>=this.length()-S)){var X=this.clone();return F===0?(this.parent.insertBefore(X,this),this):(this.parent.insertBefore(X,this.next),X)}else{var V=l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,F,j);return this.cache={},V}}}]),M}(c.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[_.default,c.default.Embed,E.default];function R(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I==null||(typeof I.formats=="function"&&(M=(0,f.default)(M,I.formats())),I.parent==null||I.parent.blotName=="scroll"||I.parent.statics.scope!==I.statics.scope)?M:R(I.parent,M)}n.bubbleFormats=R,n.BlockEmbed=O,n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},l=function(){function Y(U,N){var D=[],q=!0,Z=!1,K=void 0;try{for(var G=U[Symbol.iterator](),z;!(q=(z=G.next()).done)&&(D.push(z.value),!(N&&D.length===N));q=!0);}catch(tt){Z=!0,K=tt}finally{try{!q&&G.return&&G.return()}finally{if(Z)throw K}}return D}return function(U,N){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return Y(U,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function Y(U,N){for(var D=0;D<N.length;D++){var q=N[D];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,N,D){return N&&Y(U.prototype,N),D&&Y(U,D),U}}();i(50);var f=i(2),h=R(f),p=i(14),d=R(p),c=i(8),v=R(c),y=i(9),m=R(y),_=i(0),b=R(_),E=i(15),w=R(E),x=i(3),A=R(x),P=i(10),S=R(P),O=i(34),L=R(O);function R(Y){return Y&&Y.__esModule?Y:{default:Y}}function I(Y,U,N){return U in Y?Object.defineProperty(Y,U,{value:N,enumerable:!0,configurable:!0,writable:!0}):Y[U]=N,Y}function M(Y,U){if(!(Y instanceof U))throw new TypeError("Cannot call a class as a function")}var C=(0,S.default)("quill"),F=function(){u(Y,null,[{key:"debug",value:function(N){N===!0&&(N="log"),S.default.level(N)}},{key:"find",value:function(N){return N.__quill||b.default.find(N)}},{key:"import",value:function(N){return this.imports[N]==null&&C.error("Cannot import "+N+". Are you sure it was registered?"),this.imports[N]}},{key:"register",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof N!="string"){var K=N.attrName||N.blotName;typeof K=="string"?this.register("formats/"+K,N,D):Object.keys(N).forEach(function(G){q.register(G,N[G],D)})}else this.imports[N]!=null&&!Z&&C.warn("Overwriting "+N+" with",D),this.imports[N]=D,(N.startsWith("blots/")||N.startsWith("formats/"))&&D.blotName!=="abstract"?b.default.register(D):N.startsWith("modules")&&typeof D.register=="function"&&D.register()}}]);function Y(U){var N=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,Y),this.options=j(U,D),this.container=this.options.container,this.container==null)return C.error("Invalid Quill container",U);this.options.debug&&Y.debug(this.options.debug);var q=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=b.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new d.default(this.scroll),this.selection=new w.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(K){K===v.default.events.TEXT_CHANGE&&N.root.classList.toggle("ql-blank",N.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(K,G){var z=N.selection.lastRange,tt=z&&z.length===0?z.index:void 0;X.call(N,function(){return N.editor.update(null,G,tt)},K)});var Z=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+q+"<p><br></p></div>");this.setContents(Z),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(Y,[{key:"addContainer",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof N=="string"){var q=N;N=document.createElement("div"),N.classList.add(q)}return this.container.insertBefore(N,D),N}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(N,D,q){var Z=this,K=V(N,D,q),G=l(K,4);return N=G[0],D=G[1],q=G[3],X.call(this,function(){return Z.editor.deleteText(N,D)},q,N,-1*D)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(N),this.container.classList.toggle("ql-disabled",!N)}},{key:"focus",value:function(){var N=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=N,this.scrollIntoView()}},{key:"format",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return X.call(this,function(){var K=q.getSelection(!0),G=new h.default;if(K==null)return G;if(b.default.query(N,b.default.Scope.BLOCK))G=q.editor.formatLine(K.index,K.length,I({},N,D));else{if(K.length===0)return q.selection.format(N,D),G;G=q.editor.formatText(K.index,K.length,I({},N,D))}return q.setSelection(K,v.default.sources.SILENT),G},Z)}},{key:"formatLine",value:function(N,D,q,Z,K){var G=this,z=void 0,tt=V(N,D,q,Z,K),et=l(tt,4);return N=et[0],D=et[1],z=et[2],K=et[3],X.call(this,function(){return G.editor.formatLine(N,D,z)},K,N,0)}},{key:"formatText",value:function(N,D,q,Z,K){var G=this,z=void 0,tt=V(N,D,q,Z,K),et=l(tt,4);return N=et[0],D=et[1],z=et[2],K=et[3],X.call(this,function(){return G.editor.formatText(N,D,z)},K,N,0)}},{key:"getBounds",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=void 0;typeof N=="number"?q=this.selection.getBounds(N,D):q=this.selection.getBounds(N.index,N.length);var Z=this.container.getBoundingClientRect();return{bottom:q.bottom-Z.top,height:q.height,left:q.left-Z.left,right:q.right-Z.left,top:q.top-Z.top,width:q.width}}},{key:"getContents",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,q=V(N,D),Z=l(q,2);return N=Z[0],D=Z[1],this.editor.getContents(N,D)}},{key:"getFormat",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof N=="number"?this.editor.getFormat(N,D):this.editor.getFormat(N.index,N.length)}},{key:"getIndex",value:function(N){return N.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(N){return this.scroll.leaf(N)}},{key:"getLine",value:function(N){return this.scroll.line(N)}},{key:"getLines",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof N!="number"?this.scroll.lines(N.index,N.length):this.scroll.lines(N,D)}},{key:"getModule",value:function(N){return this.theme.modules[N]}},{key:"getSelection",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return N&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,q=V(N,D),Z=l(q,2);return N=Z[0],D=Z[1],this.editor.getText(N,D)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(N,D,q){var Z=this,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Y.sources.API;return X.call(this,function(){return Z.editor.insertEmbed(N,D,q)},K,N)}},{key:"insertText",value:function(N,D,q,Z,K){var G=this,z=void 0,tt=V(N,0,q,Z,K),et=l(tt,4);return N=et[0],z=et[2],K=et[3],X.call(this,function(){return G.editor.insertText(N,D,z)},K,N,D.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(N,D,q){this.clipboard.dangerouslyPasteHTML(N,D,q)}},{key:"removeFormat",value:function(N,D,q){var Z=this,K=V(N,D,q),G=l(K,4);return N=G[0],D=G[1],q=G[3],X.call(this,function(){return Z.editor.removeFormat(N,D)},q,N)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(N){var D=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return X.call(this,function(){N=new h.default(N);var Z=D.getLength(),K=D.editor.deleteText(0,Z),G=D.editor.applyDelta(N),z=G.ops[G.ops.length-1];z!=null&&typeof z.insert=="string"&&z.insert[z.insert.length-1]===`
|
|
586
|
-
`&&(D.editor.deleteText(D.getLength()-1,1),G.delete(1));var tt=K.compose(G);return tt},q)}},{key:"setSelection",value:function(N,D,q){if(N==null)this.selection.setRange(null,D||Y.sources.API);else{var Z=V(N,D,q),K=l(Z,4);N=K[0],D=K[1],q=K[3],this.selection.setRange(new E.Range(N,D),q),q!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,q=new h.default().insert(N);return this.setContents(q,D)}},{key:"update",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,D=this.scroll.update(N);return this.selection.update(N),D}},{key:"updateContents",value:function(N){var D=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return X.call(this,function(){return N=new h.default(N),D.editor.applyDelta(N,q)},q,!0)}}]),Y}();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=v.default.events,F.sources=v.default.sources,F.version="1.3.7",F.imports={delta:h.default,parchment:b.default,"core/module":m.default,"core/theme":L.default};function j(Y,U){if(U=(0,A.default)(!0,{container:Y,modules:{clipboard:!0,keyboard:!0,history:!0}},U),!U.theme||U.theme===F.DEFAULTS.theme)U.theme=L.default;else if(U.theme=F.import("themes/"+U.theme),U.theme==null)throw new Error("Invalid theme "+U.theme+". Did you register it?");var N=(0,A.default)(!0,{},U.theme.DEFAULTS);[N,U].forEach(function(Z){Z.modules=Z.modules||{},Object.keys(Z.modules).forEach(function(K){Z.modules[K]===!0&&(Z.modules[K]={})})});var D=Object.keys(N.modules).concat(Object.keys(U.modules)),q=D.reduce(function(Z,K){var G=F.import("modules/"+K);return G==null?C.error("Cannot load "+K+" module. Are you sure you registered it?"):Z[K]=G.DEFAULTS||{},Z},{});return U.modules!=null&&U.modules.toolbar&&U.modules.toolbar.constructor!==Object&&(U.modules.toolbar={container:U.modules.toolbar}),U=(0,A.default)(!0,{},F.DEFAULTS,{modules:q},N,U),["bounds","container","scrollingContainer"].forEach(function(Z){typeof U[Z]=="string"&&(U[Z]=document.querySelector(U[Z]))}),U.modules=Object.keys(U.modules).reduce(function(Z,K){return U.modules[K]&&(Z[K]=U.modules[K]),Z},{}),U}function X(Y,U,N,D){if(this.options.strict&&!this.isEnabled()&&U===v.default.sources.USER)return new h.default;var q=N==null?null:this.getSelection(),Z=this.editor.delta,K=Y();if(q!=null&&(N===!0&&(N=q.index),D==null?q=it(q,K,U):D!==0&&(q=it(q,N,D,U)),this.setSelection(q,v.default.sources.SILENT)),K.length()>0){var G,z=[v.default.events.TEXT_CHANGE,K,Z,U];if((G=this.emitter).emit.apply(G,[v.default.events.EDITOR_CHANGE].concat(z)),U!==v.default.sources.SILENT){var tt;(tt=this.emitter).emit.apply(tt,z)}}return K}function V(Y,U,N,D,q){var Z={};return typeof Y.index=="number"&&typeof Y.length=="number"?typeof U!="number"?(q=D,D=N,N=U,U=Y.length,Y=Y.index):(U=Y.length,Y=Y.index):typeof U!="number"&&(q=D,D=N,N=U,U=0),(typeof N>"u"?"undefined":a(N))==="object"?(Z=N,q=D):typeof N=="string"&&(D!=null?Z[N]=D:q=N),q=q||v.default.sources.API,[Y,U,Z,q]}function it(Y,U,N,D){if(Y==null)return null;var q=void 0,Z=void 0;if(U instanceof h.default){var K=[Y.index,Y.index+Y.length].map(function(et){return U.transformPosition(et,D!==v.default.sources.USER)}),G=l(K,2);q=G[0],Z=G[1]}else{var z=[Y.index,Y.index+Y.length].map(function(et){return et<U||et===U&&D===v.default.sources.USER?et:N>=0?et+N:Math.max(U,et+N)}),tt=l(z,2);q=tt[0],Z=tt[1]}return new E.Range(q,Z-q)}n.expandConfig=j,n.overload=V,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(b,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,E,w){return E&&_(b.prototype,E),w&&_(b,w),b}}(),l=function _(b,E,w){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,E);if(x===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:_(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(7),f=d(u),h=i(0),p=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function c(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function v(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function y(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var m=function(_){y(b,_);function b(){return c(this,b),v(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"formatAt",value:function(w,x,A,P){if(b.compare(this.statics.blotName,A)<0&&p.default.query(A,p.default.Scope.BLOT)){var S=this.isolate(w,x);P&&S.wrap(A,P)}else l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,w,x,A,P)}},{key:"optimize",value:function(w){if(l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,w),this.parent instanceof b&&b.compare(this.statics.blotName,this.parent.statics.blotName)>0){var x=this.parent.isolate(this.offset(),this.length());this.moveChildren(x),x.wrap(this)}}}],[{key:"compare",value:function(w,x){var A=b.order.indexOf(w),P=b.order.indexOf(x);return A>=0||P>=0?A-P:w===x?0:w<x?-1:1}}]),b}(p.default.Inline);m.allowedChildren=[m,p.default.Embed,f.default],m.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default.Text);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(w,x){for(var A=0;A<x.length;A++){var P=x[A];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(w,P.key,P)}}return function(w,x,A){return x&&E(w.prototype,x),A&&E(w,A),w}}(),l=function E(w,x,A){w===null&&(w=Function.prototype);var P=Object.getOwnPropertyDescriptor(w,x);if(P===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:E(S,x,A)}else{if("value"in P)return P.value;var O=P.get;return O===void 0?void 0:O.call(A)}},u=i(54),f=d(u),h=i(10),p=d(h);function d(E){return E&&E.__esModule?E:{default:E}}function c(E,w){if(!(E instanceof w))throw new TypeError("Cannot call a class as a function")}function v(E,w){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:E}function y(E,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);E.prototype=Object.create(w&&w.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(E,w):E.__proto__=w)}var m=(0,p.default)("quill:events"),_=["selectionchange","mousedown","mouseup","click"];_.forEach(function(E){document.addEventListener(E,function(){for(var w=arguments.length,x=Array(w),A=0;A<w;A++)x[A]=arguments[A];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(P){if(P.__quill&&P.__quill.emitter){var S;(S=P.__quill.emitter).handleDOM.apply(S,x)}})})});var b=function(E){y(w,E);function w(){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));return x.listeners={},x.on("error",m.error),x}return a(w,[{key:"emit",value:function(){m.log.apply(m,arguments),l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(A){for(var P=arguments.length,S=Array(P>1?P-1:0),O=1;O<P;O++)S[O-1]=arguments[O];(this.listeners[A.type]||[]).forEach(function(L){var R=L.node,I=L.handler;(A.target===R||R.contains(A.target))&&I.apply(void 0,[A].concat(S))})}},{key:"listenDOM",value:function(A,P,S){this.listeners[A]||(this.listeners[A]=[]),this.listeners[A].push({node:P,handler:S})}}]),w}(f.default);b.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},b.sources={API:"api",SILENT:"silent",USER:"user"},n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function a(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var l=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,u),this.quill=f,this.options=h};l.DEFAULTS={},n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=["error","warn","log","info"],l="warn";function u(h){if(a.indexOf(h)<=a.indexOf(l)){for(var p,d=arguments.length,c=Array(d>1?d-1:0),v=1;v<d;v++)c[v-1]=arguments[v];(p=console)[h].apply(p,c)}}function f(h){return a.reduce(function(p,d){return p[d]=u.bind(console,d,h),p},{})}u.level=f.level=function(h){l=h},n.default=f},function(r,n,i){var a=Array.prototype.slice,l=i(52),u=i(53),f=r.exports=function(c,v,y){return y||(y={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?y.strict?c===v:c==v:d(c,v,y)};function h(c){return c==null}function p(c){return!(!c||typeof c!="object"||typeof c.length!="number"||typeof c.copy!="function"||typeof c.slice!="function"||c.length>0&&typeof c[0]!="number")}function d(c,v,y){var m,_;if(h(c)||h(v)||c.prototype!==v.prototype)return!1;if(u(c))return u(v)?(c=a.call(c),v=a.call(v),f(c,v,y)):!1;if(p(c)){if(!p(v)||c.length!==v.length)return!1;for(m=0;m<c.length;m++)if(c[m]!==v[m])return!1;return!0}try{var b=l(c),E=l(v)}catch{return!1}if(b.length!=E.length)return!1;for(b.sort(),E.sort(),m=b.length-1;m>=0;m--)if(b[m]!=E[m])return!1;for(m=b.length-1;m>=0;m--)if(_=b[m],!f(c[_],v[_],y))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),l=function(){function u(f,h,p){p===void 0&&(p={}),this.attrName=f,this.keyName=h;var d=a.Scope.TYPE&a.Scope.ATTRIBUTE;p.scope!=null?this.scope=p.scope&a.Scope.LEVEL|d:this.scope=a.Scope.ATTRIBUTE,p.whitelist!=null&&(this.whitelist=p.whitelist)}return u.keys=function(f){return[].map.call(f.attributes,function(h){return h.name})},u.prototype.add=function(f,h){return this.canAdd(f,h)?(f.setAttribute(this.keyName,h),!0):!1},u.prototype.canAdd=function(f,h){var p=a.query(f,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return p==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},u.prototype.remove=function(f){f.removeAttribute(this.keyName)},u.prototype.value=function(f){var h=f.getAttribute(this.keyName);return this.canAdd(f,h)&&h?h:""},u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var a=function(){function O(L,R){var I=[],M=!0,C=!1,F=void 0;try{for(var j=L[Symbol.iterator](),X;!(M=(X=j.next()).done)&&(I.push(X.value),!(R&&I.length===R));M=!0);}catch(V){C=!0,F=V}finally{try{!M&&j.return&&j.return()}finally{if(C)throw F}}return I}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(L,R){for(var I=0;I<R.length;I++){var M=R[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,R,I){return R&&O(L.prototype,R),I&&O(L,I),L}}(),u=function O(L,R,I){L===null&&(L=Function.prototype);var M=Object.getOwnPropertyDescriptor(L,R);if(M===void 0){var C=Object.getPrototypeOf(L);return C===null?void 0:O(C,R,I)}else{if("value"in M)return M.value;var F=M.get;return F===void 0?void 0:F.call(I)}},f=i(2),h=E(f),p=i(0),d=E(p),c=i(4),v=E(c),y=i(6),m=E(y),_=i(7),b=E(_);function E(O){return O&&O.__esModule?O:{default:O}}function w(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function x(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function A(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var P=function(O){A(L,O);function L(){return w(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(m.default);P.blotName="code",P.tagName="CODE";var S=function(O){A(L,O);function L(){return w(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return l(L,[{key:"delta",value:function(){var I=this,M=this.domNode.textContent;return M.endsWith(`
|
|
585
|
+
`),st=V.shift();st.length>0&&(F<this.length()-1||this.children.tail==null?l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),st):this.children.tail.insertAt(this.children.tail.length(),st),this.cache={});var Y=this;V.reduce(function(U,N){return Y=Y.split(U,!0),Y.insertAt(0,N),N.length},F+st.length)}}},{key:"insertBefore",value:function(F,j){var X=this.children.head;l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,F,j),X instanceof y.default&&X.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"length",this).call(this)+S),this.cache.length}},{key:"moveChildren",value:function(F,j){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"moveChildren",this).call(this,F,j),this.cache={}}},{key:"optimize",value:function(F){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(j&&(F===0||F>=this.length()-S)){var X=this.clone();return F===0?(this.parent.insertBefore(X,this),this):(this.parent.insertBefore(X,this.next),X)}else{var V=l(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,F,j);return this.cache={},V}}}]),M}(c.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[b.default,c.default.Embed,E.default];function R(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I==null||(typeof I.formats=="function"&&(M=(0,f.default)(M,I.formats())),I.parent==null||I.parent.blotName=="scroll"||I.parent.statics.scope!==I.statics.scope)?M:R(I.parent,M)}n.bubbleFormats=R,n.BlockEmbed=O,n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},l=function(){function Y(U,N){var D=[],q=!0,Z=!1,K=void 0;try{for(var G=U[Symbol.iterator](),z;!(q=(z=G.next()).done)&&(D.push(z.value),!(N&&D.length===N));q=!0);}catch(tt){Z=!0,K=tt}finally{try{!q&&G.return&&G.return()}finally{if(Z)throw K}}return D}return function(U,N){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return Y(U,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function Y(U,N){for(var D=0;D<N.length;D++){var q=N[D];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,N,D){return N&&Y(U.prototype,N),D&&Y(U,D),U}}();i(50);var f=i(2),h=R(f),p=i(14),d=R(p),c=i(8),v=R(c),y=i(9),_=R(y),b=i(0),m=R(b),E=i(15),w=R(E),x=i(3),A=R(x),P=i(10),S=R(P),O=i(34),L=R(O);function R(Y){return Y&&Y.__esModule?Y:{default:Y}}function I(Y,U,N){return U in Y?Object.defineProperty(Y,U,{value:N,enumerable:!0,configurable:!0,writable:!0}):Y[U]=N,Y}function M(Y,U){if(!(Y instanceof U))throw new TypeError("Cannot call a class as a function")}var C=(0,S.default)("quill"),F=function(){u(Y,null,[{key:"debug",value:function(N){N===!0&&(N="log"),S.default.level(N)}},{key:"find",value:function(N){return N.__quill||m.default.find(N)}},{key:"import",value:function(N){return this.imports[N]==null&&C.error("Cannot import "+N+". Are you sure it was registered?"),this.imports[N]}},{key:"register",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof N!="string"){var K=N.attrName||N.blotName;typeof K=="string"?this.register("formats/"+K,N,D):Object.keys(N).forEach(function(G){q.register(G,N[G],D)})}else this.imports[N]!=null&&!Z&&C.warn("Overwriting "+N+" with",D),this.imports[N]=D,(N.startsWith("blots/")||N.startsWith("formats/"))&&D.blotName!=="abstract"?m.default.register(D):N.startsWith("modules")&&typeof D.register=="function"&&D.register()}}]);function Y(U){var N=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,Y),this.options=j(U,D),this.container=this.options.container,this.container==null)return C.error("Invalid Quill container",U);this.options.debug&&Y.debug(this.options.debug);var q=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new d.default(this.scroll),this.selection=new w.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(K){K===v.default.events.TEXT_CHANGE&&N.root.classList.toggle("ql-blank",N.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(K,G){var z=N.selection.lastRange,tt=z&&z.length===0?z.index:void 0;X.call(N,function(){return N.editor.update(null,G,tt)},K)});var Z=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+q+"<p><br></p></div>");this.setContents(Z),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(Y,[{key:"addContainer",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof N=="string"){var q=N;N=document.createElement("div"),N.classList.add(q)}return this.container.insertBefore(N,D),N}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(N,D,q){var Z=this,K=V(N,D,q),G=l(K,4);return N=G[0],D=G[1],q=G[3],X.call(this,function(){return Z.editor.deleteText(N,D)},q,N,-1*D)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(N),this.container.classList.toggle("ql-disabled",!N)}},{key:"focus",value:function(){var N=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=N,this.scrollIntoView()}},{key:"format",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return X.call(this,function(){var K=q.getSelection(!0),G=new h.default;if(K==null)return G;if(m.default.query(N,m.default.Scope.BLOCK))G=q.editor.formatLine(K.index,K.length,I({},N,D));else{if(K.length===0)return q.selection.format(N,D),G;G=q.editor.formatText(K.index,K.length,I({},N,D))}return q.setSelection(K,v.default.sources.SILENT),G},Z)}},{key:"formatLine",value:function(N,D,q,Z,K){var G=this,z=void 0,tt=V(N,D,q,Z,K),et=l(tt,4);return N=et[0],D=et[1],z=et[2],K=et[3],X.call(this,function(){return G.editor.formatLine(N,D,z)},K,N,0)}},{key:"formatText",value:function(N,D,q,Z,K){var G=this,z=void 0,tt=V(N,D,q,Z,K),et=l(tt,4);return N=et[0],D=et[1],z=et[2],K=et[3],X.call(this,function(){return G.editor.formatText(N,D,z)},K,N,0)}},{key:"getBounds",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=void 0;typeof N=="number"?q=this.selection.getBounds(N,D):q=this.selection.getBounds(N.index,N.length);var Z=this.container.getBoundingClientRect();return{bottom:q.bottom-Z.top,height:q.height,left:q.left-Z.left,right:q.right-Z.left,top:q.top-Z.top,width:q.width}}},{key:"getContents",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,q=V(N,D),Z=l(q,2);return N=Z[0],D=Z[1],this.editor.getContents(N,D)}},{key:"getFormat",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof N=="number"?this.editor.getFormat(N,D):this.editor.getFormat(N.index,N.length)}},{key:"getIndex",value:function(N){return N.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(N){return this.scroll.leaf(N)}},{key:"getLine",value:function(N){return this.scroll.line(N)}},{key:"getLines",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof N!="number"?this.scroll.lines(N.index,N.length):this.scroll.lines(N,D)}},{key:"getModule",value:function(N){return this.theme.modules[N]}},{key:"getSelection",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return N&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,q=V(N,D),Z=l(q,2);return N=Z[0],D=Z[1],this.editor.getText(N,D)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(N,D,q){var Z=this,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Y.sources.API;return X.call(this,function(){return Z.editor.insertEmbed(N,D,q)},K,N)}},{key:"insertText",value:function(N,D,q,Z,K){var G=this,z=void 0,tt=V(N,0,q,Z,K),et=l(tt,4);return N=et[0],z=et[2],K=et[3],X.call(this,function(){return G.editor.insertText(N,D,z)},K,N,D.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(N,D,q){this.clipboard.dangerouslyPasteHTML(N,D,q)}},{key:"removeFormat",value:function(N,D,q){var Z=this,K=V(N,D,q),G=l(K,4);return N=G[0],D=G[1],q=G[3],X.call(this,function(){return Z.editor.removeFormat(N,D)},q,N)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(N){var D=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return X.call(this,function(){N=new h.default(N);var Z=D.getLength(),K=D.editor.deleteText(0,Z),G=D.editor.applyDelta(N),z=G.ops[G.ops.length-1];z!=null&&typeof z.insert=="string"&&z.insert[z.insert.length-1]===`
|
|
586
|
+
`&&(D.editor.deleteText(D.getLength()-1,1),G.delete(1));var tt=K.compose(G);return tt},q)}},{key:"setSelection",value:function(N,D,q){if(N==null)this.selection.setRange(null,D||Y.sources.API);else{var Z=V(N,D,q),K=l(Z,4);N=K[0],D=K[1],q=K[3],this.selection.setRange(new E.Range(N,D),q),q!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,q=new h.default().insert(N);return this.setContents(q,D)}},{key:"update",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,D=this.scroll.update(N);return this.selection.update(N),D}},{key:"updateContents",value:function(N){var D=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return X.call(this,function(){return N=new h.default(N),D.editor.applyDelta(N,q)},q,!0)}}]),Y}();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=v.default.events,F.sources=v.default.sources,F.version="1.3.7",F.imports={delta:h.default,parchment:m.default,"core/module":_.default,"core/theme":L.default};function j(Y,U){if(U=(0,A.default)(!0,{container:Y,modules:{clipboard:!0,keyboard:!0,history:!0}},U),!U.theme||U.theme===F.DEFAULTS.theme)U.theme=L.default;else if(U.theme=F.import("themes/"+U.theme),U.theme==null)throw new Error("Invalid theme "+U.theme+". Did you register it?");var N=(0,A.default)(!0,{},U.theme.DEFAULTS);[N,U].forEach(function(Z){Z.modules=Z.modules||{},Object.keys(Z.modules).forEach(function(K){Z.modules[K]===!0&&(Z.modules[K]={})})});var D=Object.keys(N.modules).concat(Object.keys(U.modules)),q=D.reduce(function(Z,K){var G=F.import("modules/"+K);return G==null?C.error("Cannot load "+K+" module. Are you sure you registered it?"):Z[K]=G.DEFAULTS||{},Z},{});return U.modules!=null&&U.modules.toolbar&&U.modules.toolbar.constructor!==Object&&(U.modules.toolbar={container:U.modules.toolbar}),U=(0,A.default)(!0,{},F.DEFAULTS,{modules:q},N,U),["bounds","container","scrollingContainer"].forEach(function(Z){typeof U[Z]=="string"&&(U[Z]=document.querySelector(U[Z]))}),U.modules=Object.keys(U.modules).reduce(function(Z,K){return U.modules[K]&&(Z[K]=U.modules[K]),Z},{}),U}function X(Y,U,N,D){if(this.options.strict&&!this.isEnabled()&&U===v.default.sources.USER)return new h.default;var q=N==null?null:this.getSelection(),Z=this.editor.delta,K=Y();if(q!=null&&(N===!0&&(N=q.index),D==null?q=st(q,K,U):D!==0&&(q=st(q,N,D,U)),this.setSelection(q,v.default.sources.SILENT)),K.length()>0){var G,z=[v.default.events.TEXT_CHANGE,K,Z,U];if((G=this.emitter).emit.apply(G,[v.default.events.EDITOR_CHANGE].concat(z)),U!==v.default.sources.SILENT){var tt;(tt=this.emitter).emit.apply(tt,z)}}return K}function V(Y,U,N,D,q){var Z={};return typeof Y.index=="number"&&typeof Y.length=="number"?typeof U!="number"?(q=D,D=N,N=U,U=Y.length,Y=Y.index):(U=Y.length,Y=Y.index):typeof U!="number"&&(q=D,D=N,N=U,U=0),(typeof N>"u"?"undefined":a(N))==="object"?(Z=N,q=D):typeof N=="string"&&(D!=null?Z[N]=D:q=N),q=q||v.default.sources.API,[Y,U,Z,q]}function st(Y,U,N,D){if(Y==null)return null;var q=void 0,Z=void 0;if(U instanceof h.default){var K=[Y.index,Y.index+Y.length].map(function(et){return U.transformPosition(et,D!==v.default.sources.USER)}),G=l(K,2);q=G[0],Z=G[1]}else{var z=[Y.index,Y.index+Y.length].map(function(et){return et<U||et===U&&D===v.default.sources.USER?et:N>=0?et+N:Math.max(U,et+N)}),tt=l(z,2);q=tt[0],Z=tt[1]}return new E.Range(q,Z-q)}n.expandConfig=j,n.overload=V,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function b(m,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,E,w){return E&&b(m.prototype,E),w&&b(m,w),m}}(),l=function b(m,E,w){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,E);if(x===void 0){var A=Object.getPrototypeOf(m);return A===null?void 0:b(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(7),f=d(u),h=i(0),p=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function c(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function v(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function y(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var _=function(b){y(m,b);function m(){return c(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"formatAt",value:function(w,x,A,P){if(m.compare(this.statics.blotName,A)<0&&p.default.query(A,p.default.Scope.BLOT)){var S=this.isolate(w,x);P&&S.wrap(A,P)}else l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,w,x,A,P)}},{key:"optimize",value:function(w){if(l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,w),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var x=this.parent.isolate(this.offset(),this.length());this.moveChildren(x),x.wrap(this)}}}],[{key:"compare",value:function(w,x){var A=m.order.indexOf(w),P=m.order.indexOf(x);return A>=0||P>=0?A-P:w===x?0:w<x?-1:1}}]),m}(p.default.Inline);_.allowedChildren=[_,p.default.Embed,f.default],_.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default.Text);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(w,x){for(var A=0;A<x.length;A++){var P=x[A];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(w,P.key,P)}}return function(w,x,A){return x&&E(w.prototype,x),A&&E(w,A),w}}(),l=function E(w,x,A){w===null&&(w=Function.prototype);var P=Object.getOwnPropertyDescriptor(w,x);if(P===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:E(S,x,A)}else{if("value"in P)return P.value;var O=P.get;return O===void 0?void 0:O.call(A)}},u=i(54),f=d(u),h=i(10),p=d(h);function d(E){return E&&E.__esModule?E:{default:E}}function c(E,w){if(!(E instanceof w))throw new TypeError("Cannot call a class as a function")}function v(E,w){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:E}function y(E,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);E.prototype=Object.create(w&&w.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(E,w):E.__proto__=w)}var _=(0,p.default)("quill:events"),b=["selectionchange","mousedown","mouseup","click"];b.forEach(function(E){document.addEventListener(E,function(){for(var w=arguments.length,x=Array(w),A=0;A<w;A++)x[A]=arguments[A];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(P){if(P.__quill&&P.__quill.emitter){var S;(S=P.__quill.emitter).handleDOM.apply(S,x)}})})});var m=function(E){y(w,E);function w(){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));return x.listeners={},x.on("error",_.error),x}return a(w,[{key:"emit",value:function(){_.log.apply(_,arguments),l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(A){for(var P=arguments.length,S=Array(P>1?P-1:0),O=1;O<P;O++)S[O-1]=arguments[O];(this.listeners[A.type]||[]).forEach(function(L){var R=L.node,I=L.handler;(A.target===R||R.contains(A.target))&&I.apply(void 0,[A].concat(S))})}},{key:"listenDOM",value:function(A,P,S){this.listeners[A]||(this.listeners[A]=[]),this.listeners[A].push({node:P,handler:S})}}]),w}(f.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function a(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var l=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,u),this.quill=f,this.options=h};l.DEFAULTS={},n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=["error","warn","log","info"],l="warn";function u(h){if(a.indexOf(h)<=a.indexOf(l)){for(var p,d=arguments.length,c=Array(d>1?d-1:0),v=1;v<d;v++)c[v-1]=arguments[v];(p=console)[h].apply(p,c)}}function f(h){return a.reduce(function(p,d){return p[d]=u.bind(console,d,h),p},{})}u.level=f.level=function(h){l=h},n.default=f},function(r,n,i){var a=Array.prototype.slice,l=i(52),u=i(53),f=r.exports=function(c,v,y){return y||(y={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?y.strict?c===v:c==v:d(c,v,y)};function h(c){return c==null}function p(c){return!(!c||typeof c!="object"||typeof c.length!="number"||typeof c.copy!="function"||typeof c.slice!="function"||c.length>0&&typeof c[0]!="number")}function d(c,v,y){var _,b;if(h(c)||h(v)||c.prototype!==v.prototype)return!1;if(u(c))return u(v)?(c=a.call(c),v=a.call(v),f(c,v,y)):!1;if(p(c)){if(!p(v)||c.length!==v.length)return!1;for(_=0;_<c.length;_++)if(c[_]!==v[_])return!1;return!0}try{var m=l(c),E=l(v)}catch{return!1}if(m.length!=E.length)return!1;for(m.sort(),E.sort(),_=m.length-1;_>=0;_--)if(m[_]!=E[_])return!1;for(_=m.length-1;_>=0;_--)if(b=m[_],!f(c[b],v[b],y))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),l=function(){function u(f,h,p){p===void 0&&(p={}),this.attrName=f,this.keyName=h;var d=a.Scope.TYPE&a.Scope.ATTRIBUTE;p.scope!=null?this.scope=p.scope&a.Scope.LEVEL|d:this.scope=a.Scope.ATTRIBUTE,p.whitelist!=null&&(this.whitelist=p.whitelist)}return u.keys=function(f){return[].map.call(f.attributes,function(h){return h.name})},u.prototype.add=function(f,h){return this.canAdd(f,h)?(f.setAttribute(this.keyName,h),!0):!1},u.prototype.canAdd=function(f,h){var p=a.query(f,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return p==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},u.prototype.remove=function(f){f.removeAttribute(this.keyName)},u.prototype.value=function(f){var h=f.getAttribute(this.keyName);return this.canAdd(f,h)&&h?h:""},u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var a=function(){function O(L,R){var I=[],M=!0,C=!1,F=void 0;try{for(var j=L[Symbol.iterator](),X;!(M=(X=j.next()).done)&&(I.push(X.value),!(R&&I.length===R));M=!0);}catch(V){C=!0,F=V}finally{try{!M&&j.return&&j.return()}finally{if(C)throw F}}return I}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(L,R){for(var I=0;I<R.length;I++){var M=R[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,R,I){return R&&O(L.prototype,R),I&&O(L,I),L}}(),u=function O(L,R,I){L===null&&(L=Function.prototype);var M=Object.getOwnPropertyDescriptor(L,R);if(M===void 0){var C=Object.getPrototypeOf(L);return C===null?void 0:O(C,R,I)}else{if("value"in M)return M.value;var F=M.get;return F===void 0?void 0:F.call(I)}},f=i(2),h=E(f),p=i(0),d=E(p),c=i(4),v=E(c),y=i(6),_=E(y),b=i(7),m=E(b);function E(O){return O&&O.__esModule?O:{default:O}}function w(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function x(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function A(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var P=function(O){A(L,O);function L(){return w(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(_.default);P.blotName="code",P.tagName="CODE";var S=function(O){A(L,O);function L(){return w(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return l(L,[{key:"delta",value:function(){var I=this,M=this.domNode.textContent;return M.endsWith(`
|
|
587
587
|
`)&&(M=M.slice(0,-1)),M.split(`
|
|
588
588
|
`).reduce(function(C,F){return C.insert(F).insert(`
|
|
589
|
-
`,I.formats())},new h.default)}},{key:"format",value:function(I,M){if(!(I===this.statics.blotName&&M)){var C=this.descendant(
|
|
589
|
+
`,I.formats())},new h.default)}},{key:"format",value:function(I,M){if(!(I===this.statics.blotName&&M)){var C=this.descendant(m.default,this.length()-1),F=a(C,1),j=F[0];j!=null&&j.deleteAt(j.length()-1,1),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"format",this).call(this,I,M)}}},{key:"formatAt",value:function(I,M,C,F){if(M!==0&&!(d.default.query(C,d.default.Scope.BLOCK)==null||C===this.statics.blotName&&F===this.statics.formats(this.domNode))){var j=this.newlineIndex(I);if(!(j<0||j>=I+M)){var X=this.newlineIndex(I,!0)+1,V=j-X+1,st=this.isolate(X,V),Y=st.next;st.format(C,F),Y instanceof L&&Y.formatAt(0,I-X+M-V,C,F)}}}},{key:"insertAt",value:function(I,M,C){if(C==null){var F=this.descendant(m.default,I),j=a(F,2),X=j[0],V=j[1];X.insertAt(V,M)}}},{key:"length",value:function(){var I=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
590
590
|
`)?I:I+1}},{key:"newlineIndex",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(M)return this.domNode.textContent.slice(0,I).lastIndexOf(`
|
|
591
591
|
`);var C=this.domNode.textContent.slice(I).indexOf(`
|
|
592
592
|
`);return C>-1?I+C:-1}},{key:"optimize",value:function(I){this.domNode.textContent.endsWith(`
|
|
593
593
|
`)||this.appendChild(d.default.create("text",`
|
|
594
|
-
`)),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,I);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===M.statics.formats(M.domNode)&&(M.optimize(I),M.moveChildren(this),M.remove())}},{key:"replace",value:function(I){u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,I),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(M){var C=d.default.find(M);C==null?M.parentNode.removeChild(M):C instanceof d.default.Embed?C.remove():C.unwrap()})}}],[{key:"create",value:function(I){var M=u(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,I);return M.setAttribute("spellcheck",!1),M}},{key:"formats",value:function(){return!0}}]),L}(v.default);S.blotName="code-block",S.tagName="PRE",S.TAB=" ",n.Code=P,n.default=S},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},l=function(){function Y(U,N){var D=[],q=!0,Z=!1,K=void 0;try{for(var G=U[Symbol.iterator](),z;!(q=(z=G.next()).done)&&(D.push(z.value),!(N&&D.length===N));q=!0);}catch(tt){Z=!0,K=tt}finally{try{!q&&G.return&&G.return()}finally{if(Z)throw K}}return D}return function(U,N){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return Y(U,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function Y(U,N){for(var D=0;D<N.length;D++){var q=N[D];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,N,D){return N&&Y(U.prototype,N),D&&Y(U,D),U}}(),f=i(2),h=M(f),p=i(20),d=M(p),c=i(0),v=M(c),y=i(13),
|
|
594
|
+
`)),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,I);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===M.statics.formats(M.domNode)&&(M.optimize(I),M.moveChildren(this),M.remove())}},{key:"replace",value:function(I){u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,I),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(M){var C=d.default.find(M);C==null?M.parentNode.removeChild(M):C instanceof d.default.Embed?C.remove():C.unwrap()})}}],[{key:"create",value:function(I){var M=u(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,I);return M.setAttribute("spellcheck",!1),M}},{key:"formats",value:function(){return!0}}]),L}(v.default);S.blotName="code-block",S.tagName="PRE",S.TAB=" ",n.Code=P,n.default=S},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},l=function(){function Y(U,N){var D=[],q=!0,Z=!1,K=void 0;try{for(var G=U[Symbol.iterator](),z;!(q=(z=G.next()).done)&&(D.push(z.value),!(N&&D.length===N));q=!0);}catch(tt){Z=!0,K=tt}finally{try{!q&&G.return&&G.return()}finally{if(Z)throw K}}return D}return function(U,N){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return Y(U,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function Y(U,N){for(var D=0;D<N.length;D++){var q=N[D];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,N,D){return N&&Y(U.prototype,N),D&&Y(U,D),U}}(),f=i(2),h=M(f),p=i(20),d=M(p),c=i(0),v=M(c),y=i(13),_=M(y),b=i(24),m=M(b),E=i(4),w=M(E),x=i(16),A=M(x),P=i(21),S=M(P),O=i(11),L=M(O),R=i(3),I=M(R);function M(Y){return Y&&Y.__esModule?Y:{default:Y}}function C(Y,U,N){return U in Y?Object.defineProperty(Y,U,{value:N,enumerable:!0,configurable:!0,writable:!0}):Y[U]=N,Y}function F(Y,U){if(!(Y instanceof U))throw new TypeError("Cannot call a class as a function")}var j=/^[ -~]*$/,X=function(){function Y(U){F(this,Y),this.scroll=U,this.delta=this.getDelta()}return u(Y,[{key:"applyDelta",value:function(N){var D=this,q=!1;this.scroll.update();var Z=this.scroll.length();return this.scroll.batchStart(),N=st(N),N.reduce(function(K,G){var z=G.retain||G.delete||G.insert.length||1,tt=G.attributes||{};if(G.insert!=null){if(typeof G.insert=="string"){var et=G.insert;et.endsWith(`
|
|
595
595
|
`)&&q&&(q=!1,et=et.slice(0,-1)),K>=Z&&!et.endsWith(`
|
|
596
|
-
`)&&(q=!0),D.scroll.insertAt(K,et);var nt=D.scroll.line(K),ht=l(nt,2),
|
|
596
|
+
`)&&(q=!0),D.scroll.insertAt(K,et);var nt=D.scroll.line(K),ht=l(nt,2),vt=ht[0],mt=ht[1],xt=(0,I.default)({},(0,E.bubbleFormats)(vt));if(vt instanceof w.default){var Rt=vt.descendant(v.default.Leaf,mt),ve=l(Rt,1),Wt=ve[0];xt=(0,I.default)(xt,(0,E.bubbleFormats)(Wt))}tt=d.default.attributes.diff(xt,tt)||{}}else if(a(G.insert)==="object"){var it=Object.keys(G.insert)[0];if(it==null)return K;D.scroll.insertAt(K,it,G.insert[it])}Z+=z}return Object.keys(tt).forEach(function(ot){D.scroll.formatAt(K,z,ot,tt[ot])}),K+z},0),N.reduce(function(K,G){return typeof G.delete=="number"?(D.scroll.deleteAt(K,G.delete),K):K+(G.retain||G.insert.length||1)},0),this.scroll.batchEnd(),this.update(N)}},{key:"deleteText",value:function(N,D){return this.scroll.deleteAt(N,D),this.update(new h.default().retain(N).delete(D))}},{key:"formatLine",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Z).forEach(function(K){if(!(q.scroll.whitelist!=null&&!q.scroll.whitelist[K])){var G=q.scroll.lines(N,Math.max(D,1)),z=D;G.forEach(function(tt){var et=tt.length();if(!(tt instanceof _.default))tt.format(K,Z[K]);else{var nt=N-tt.offset(q.scroll),ht=tt.newlineIndex(nt+z)-nt+1;tt.formatAt(nt,ht,K,Z[K])}z-=et})}}),this.scroll.optimize(),this.update(new h.default().retain(N).retain(D,(0,S.default)(Z)))}},{key:"formatText",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Z).forEach(function(K){q.scroll.formatAt(N,D,K,Z[K])}),this.update(new h.default().retain(N).retain(D,(0,S.default)(Z)))}},{key:"getContents",value:function(N,D){return this.delta.slice(N,N+D)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(N,D){return N.concat(D.delta())},new h.default)}},{key:"getFormat",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=[],Z=[];D===0?this.scroll.path(N).forEach(function(G){var z=l(G,1),tt=z[0];tt instanceof w.default?q.push(tt):tt instanceof v.default.Leaf&&Z.push(tt)}):(q=this.scroll.lines(N,D),Z=this.scroll.descendants(v.default.Leaf,N,D));var K=[q,Z].map(function(G){if(G.length===0)return{};for(var z=(0,E.bubbleFormats)(G.shift());Object.keys(z).length>0;){var tt=G.shift();if(tt==null)return z;z=V((0,E.bubbleFormats)(tt),z)}return z});return I.default.apply(I.default,K)}},{key:"getText",value:function(N,D){return this.getContents(N,D).filter(function(q){return typeof q.insert=="string"}).map(function(q){return q.insert}).join("")}},{key:"insertEmbed",value:function(N,D,q){return this.scroll.insertAt(N,D,q),this.update(new h.default().retain(N).insert(C({},D,q)))}},{key:"insertText",value:function(N,D){var q=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return D=D.replace(/\r\n/g,`
|
|
597
597
|
`).replace(/\r/g,`
|
|
598
|
-
`),this.scroll.insertAt(N,D),Object.keys(Z).forEach(function(K){q.scroll.formatAt(N,D.length,K,Z[K])}),this.update(new h.default().retain(N).insert(D,(0,S.default)(Z)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var N=this.scroll.children.head;return N.statics.blotName!==w.default.blotName||N.children.length>1?!1:N.children.head instanceof A.default}},{key:"removeFormat",value:function(N,D){var q=this.getText(N,D),Z=this.scroll.line(N+D),K=l(Z,2),G=K[0],z=K[1],tt=0,et=new h.default;G!=null&&(G instanceof
|
|
599
|
-
`));var nt=this.getContents(N,D+tt),ht=nt.diff(new h.default().insert(q).concat(et)),
|
|
598
|
+
`),this.scroll.insertAt(N,D),Object.keys(Z).forEach(function(K){q.scroll.formatAt(N,D.length,K,Z[K])}),this.update(new h.default().retain(N).insert(D,(0,S.default)(Z)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var N=this.scroll.children.head;return N.statics.blotName!==w.default.blotName||N.children.length>1?!1:N.children.head instanceof A.default}},{key:"removeFormat",value:function(N,D){var q=this.getText(N,D),Z=this.scroll.line(N+D),K=l(Z,2),G=K[0],z=K[1],tt=0,et=new h.default;G!=null&&(G instanceof _.default?tt=G.newlineIndex(z)-z+1:tt=G.length()-z,et=G.delta().slice(z,z+tt-1).insert(`
|
|
599
|
+
`));var nt=this.getContents(N,D+tt),ht=nt.diff(new h.default().insert(q).concat(et)),vt=new h.default().retain(N).concat(ht);return this.applyDelta(vt)}},{key:"update",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Z=this.delta;if(D.length===1&&D[0].type==="characterData"&&D[0].target.data.match(j)&&v.default.find(D[0].target)){var K=v.default.find(D[0].target),G=(0,E.bubbleFormats)(K),z=K.offset(this.scroll),tt=D[0].oldValue.replace(m.default.CONTENTS,""),et=new h.default().insert(tt),nt=new h.default().insert(K.value()),ht=new h.default().retain(z).concat(et.diff(nt,q));N=ht.reduce(function(vt,mt){return mt.insert?vt.insert(mt.insert,G):vt.push(mt)},new h.default),this.delta=Z.compose(N)}else this.delta=this.getDelta(),(!N||!(0,L.default)(Z.compose(N),this.delta))&&(N=Z.diff(this.delta,q));return N}}]),Y}();function V(Y,U){return Object.keys(U).reduce(function(N,D){return Y[D]==null||(U[D]===Y[D]?N[D]=U[D]:Array.isArray(U[D])?U[D].indexOf(Y[D])<0&&(N[D]=U[D].concat([Y[D]])):N[D]=[U[D],Y[D]]),N},{})}function st(Y){return Y.reduce(function(U,N){if(N.insert===1){var D=(0,S.default)(N.attributes);return delete D.image,U.insert({image:N.attributes.image},D)}if(N.attributes!=null&&(N.attributes.list===!0||N.attributes.bullet===!0)&&(N=(0,S.default)(N),N.attributes.list?N.attributes.list="ordered":(N.attributes.list="bullet",delete N.attributes.bullet)),typeof N.insert=="string"){var q=N.insert.replace(/\r\n/g,`
|
|
600
600
|
`).replace(/\r/g,`
|
|
601
|
-
`);return U.insert(q,N.attributes)}return U.push(N)},new h.default)}n.default=X},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var a=function(){function O(L,R){var I=[],M=!0,C=!1,F=void 0;try{for(var j=L[Symbol.iterator](),X;!(M=(X=j.next()).done)&&(I.push(X.value),!(R&&I.length===R));M=!0);}catch(V){C=!0,F=V}finally{try{!M&&j.return&&j.return()}finally{if(C)throw F}}return I}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(L,R){for(var I=0;I<R.length;I++){var M=R[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,R,I){return R&&O(L.prototype,R),I&&O(L,I),L}}(),u=i(0),f=b(u),h=i(21),p=b(h),d=i(11),c=b(d),v=i(8),y=b(v),m=i(10),_=b(m);function b(O){return O&&O.__esModule?O:{default:O}}function E(O){if(Array.isArray(O)){for(var L=0,R=Array(O.length);L<O.length;L++)R[L]=O[L];return R}else return Array.from(O)}function w(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,_.default)("quill:selection"),A=function O(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;w(this,O),this.index=L,this.length=R},P=function(){function O(L,R){var I=this;w(this,O),this.emitter=R,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new A(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){I.mouseDown||setTimeout(I.update.bind(I,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(M,C){M===y.default.events.TEXT_CHANGE&&C.length()>0&&I.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(I.hasFocus()){var M=I.getNativeRange();M!=null&&M.start.node!==I.cursor.textNode&&I.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{I.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(M,C){if(C.range){var F=C.range,j=F.startNode,X=F.startOffset,V=F.endNode,it=F.endOffset;I.setNativeRange(j,X,V,it)}}),this.update(y.default.sources.SILENT)}return l(O,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var I=R.cursor.restore();if(!I)return;setTimeout(function(){R.setNativeRange(I.startNode,I.startOffset,I.endNode,I.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,I){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||f.default.query(R,f.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var C=f.default.find(M.start.node,!1);if(C==null)return;if(C instanceof f.default.Leaf){var F=C.split(M.start.offset);C.parent.insertBefore(this.cursor,F)}else C.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(R,I),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();R=Math.min(R,M-1),I=Math.min(R+I,M-1)-R;var C=void 0,F=this.scroll.leaf(R),j=a(F,2),X=j[0],V=j[1];if(X==null)return null;var it=X.position(V,!0),Y=a(it,2);C=Y[0],V=Y[1];var U=document.createRange();if(I>0){U.setStart(C,V);var N=this.scroll.leaf(R+I),D=a(N,2);if(X=D[0],V=D[1],X==null)return null;var q=X.position(V,!0),Z=a(q,2);return C=Z[0],V=Z[1],U.setEnd(C,V),U.getBoundingClientRect()}else{var K="left",G=void 0;return C instanceof Text?(V<C.data.length?(U.setStart(C,V),U.setEnd(C,V+1)):(U.setStart(C,V-1),U.setEnd(C,V),K="right"),G=U.getBoundingClientRect()):(G=X.domNode.getBoundingClientRect(),V>0&&(K="right")),{bottom:G.top+G.height,height:G.height,left:G[K],right:G[K],top:G.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var I=R.getRangeAt(0);if(I==null)return null;var M=this.normalizeNative(I);return x.info("getNativeRange",M),M}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var I=this.normalizedToRange(R);return[I,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var I=this,M=[[R.start.node,R.start.offset]];R.native.collapsed||M.push([R.end.node,R.end.offset]);var C=M.map(function(X){var V=a(X,2),it=V[0],Y=V[1],U=f.default.find(it,!0),N=U.offset(I.scroll);return Y===0?N:U instanceof f.default.Container?N+U.length():N+U.index(it,Y)}),F=Math.min(Math.max.apply(Math,E(C)),this.scroll.length()-1),j=Math.min.apply(Math,[F].concat(E(C)));return new A(j,F-j)}},{key:"normalizeNative",value:function(R){if(!S(this.root,R.startContainer)||!R.collapsed&&!S(this.root,R.endContainer))return null;var I={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[I.start,I.end].forEach(function(M){for(var C=M.node,F=M.offset;!(C instanceof Text)&&C.childNodes.length>0;)if(C.childNodes.length>F)C=C.childNodes[F],F=0;else if(C.childNodes.length===F)C=C.lastChild,F=C instanceof Text?C.data.length:C.childNodes.length+1;else break;M.node=C,M.offset=F}),I}},{key:"rangeToNative",value:function(R){var I=this,M=R.collapsed?[R.index]:[R.index,R.index+R.length],C=[],F=this.scroll.length();return M.forEach(function(j,X){j=Math.min(F-1,j);var V=void 0,it=I.scroll.leaf(j),Y=a(it,2),U=Y[0],N=Y[1],D=U.position(N,X!==0),q=a(D,2);V=q[0],N=q[1],C.push(V,N)}),C.length<2&&(C=C.concat(C)),C}},{key:"scrollIntoView",value:function(R){var I=this.lastRange;if(I!=null){var M=this.getBounds(I.index,I.length);if(M!=null){var C=this.scroll.length()-1,F=this.scroll.line(Math.min(I.index,C)),j=a(F,1),X=j[0],V=X;if(I.length>0){var it=this.scroll.line(Math.min(I.index+I.length,C)),Y=a(it,1);V=Y[0]}if(!(X==null||V==null)){var U=R.getBoundingClientRect();M.top<U.top?R.scrollTop-=U.top-M.top:M.bottom>U.bottom&&(R.scrollTop+=M.bottom-U.bottom)}}}}},{key:"setNativeRange",value:function(R,I){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",R,I,M,C),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||M.parentNode==null))){var j=document.getSelection();if(j!=null)if(R!=null){this.hasFocus()||this.root.focus();var X=(this.getNativeRange()||{}).native;if(X==null||F||R!==X.startContainer||I!==X.startOffset||M!==X.endContainer||C!==X.endOffset){R.tagName=="BR"&&(I=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),M.tagName=="BR"&&(C=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var V=document.createRange();V.setStart(R,I),V.setEnd(M,C),j.removeAllRanges(),j.addRange(V)}}else j.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof I=="string"&&(M=I,I=!1),x.info("setRange",R),R!=null){var C=this.rangeToNative(R);this.setNativeRange.apply(this,E(C).concat([I]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,I=this.lastRange,M=this.getRange(),C=a(M,2),F=C[0],j=C[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(I,this.lastRange)){var X;!this.composing&&j!=null&&j.native.collapsed&&j.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[y.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(I),R];if((X=this.emitter).emit.apply(X,[y.default.events.EDITOR_CHANGE].concat(V)),R!==y.default.sources.SILENT){var it;(it=this.emitter).emit.apply(it,V)}}}}]),O}();function S(O,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),O.contains(L)}n.Range=A,n.default=P},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,_){for(var b=0;b<_.length;b++){var E=_[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,_,b){return _&&y(m.prototype,_),b&&y(m,b),m}}(),l=function y(m,_,b){m===null&&(m=Function.prototype);var E=Object.getOwnPropertyDescriptor(m,_);if(E===void 0){var w=Object.getPrototypeOf(m);return w===null?void 0:y(w,_,b)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(b)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function d(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function c(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var v=function(y){c(m,y);function m(){return p(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"insertInto",value:function(b,E){b.children.length===0?l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"insertInto",this).call(this,b,E):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),m}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){d(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(44),u=i(30),f=i(1),h=function(d){a(c,d);function c(v){var y=d.call(this,v)||this;return y.build(),y}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){d.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var m=p(y);v.insertBefore(m,v.children.head||void 0)}catch(_){if(_ instanceof f.ParchmentError)return;throw _}})},c.prototype.deleteAt=function(v,y){if(v===0&&y===this.length())return this.remove();this.children.forEachAt(v,y,function(m,_,b){m.deleteAt(_,b)})},c.prototype.descendant=function(v,y){var m=this.children.find(y),_=m[0],b=m[1];return v.blotName==null&&v(_)||v.blotName!=null&&_ instanceof v?[_,b]:_ instanceof c?_.descendant(v,b):[null,-1]},c.prototype.descendants=function(v,y,m){y===void 0&&(y=0),m===void 0&&(m=Number.MAX_VALUE);var _=[],b=m;return this.children.forEachAt(y,m,function(E,w,x){(v.blotName==null&&v(E)||v.blotName!=null&&E instanceof v)&&_.push(E),E instanceof c&&(_=_.concat(E.descendants(v,w,b))),b-=x}),_},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),d.prototype.detach.call(this)},c.prototype.formatAt=function(v,y,m,_){this.children.forEachAt(v,y,function(b,E,w){b.formatAt(E,w,m,_)})},c.prototype.insertAt=function(v,y,m){var _=this.children.find(v),b=_[0],E=_[1];if(b)b.insertAt(E,y,m);else{var w=m==null?f.create("text",y):f.create(y,m);this.appendChild(w)}},c.prototype.insertBefore=function(v,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(m){return v instanceof m}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,y)},c.prototype.length=function(){return this.children.reduce(function(v,y){return v+y.length()},0)},c.prototype.moveChildren=function(v,y){this.children.forEach(function(m){v.insertBefore(m,y)})},c.prototype.optimize=function(v){if(d.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(v)}else this.remove()},c.prototype.path=function(v,y){y===void 0&&(y=!1);var m=this.children.find(v,y),_=m[0],b=m[1],E=[[this,v]];return _ instanceof c?E.concat(_.path(b,y)):(_!=null&&E.push([_,b]),E)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),d.prototype.replace.call(this,v)},c.prototype.split=function(v,y){if(y===void 0&&(y=!1),!y){if(v===0)return this;if(v===this.length())return this.next}var m=this.clone();return this.parent.insertBefore(m,this.next),this.children.forEachAt(v,this.length(),function(_,b,E){_=_.split(b,y),m.appendChild(_)}),m},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,y){var m=this,_=[],b=[];v.forEach(function(E){E.target===m.domNode&&E.type==="childList"&&(_.push.apply(_,E.addedNodes),b.push.apply(b,E.removedNodes))}),b.forEach(function(E){if(!(E.parentNode!=null&&E.tagName!=="IFRAME"&&document.body.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var w=f.find(E);w!=null&&(w.domNode.parentNode==null||w.domNode.parentNode===m.domNode)&&w.detach()}}),_.filter(function(E){return E.parentNode==m.domNode}).sort(function(E,w){return E===w?0:E.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(E){var w=null;E.nextSibling!=null&&(w=f.find(E.nextSibling));var x=p(E);(x.next!=w||x.next==null)&&(x.parent!=null&&x.parent.removeChild(m),m.insertBefore(x,w||void 0))})},c}(u.default);function p(d){var c=f.find(d);if(c==null)try{c=f.create(d)}catch{c=f.create(f.Scope.INLINE),[].slice.call(d.childNodes).forEach(function(y){c.domNode.appendChild(y)}),d.parentNode&&d.parentNode.replaceChild(c.domNode,d),c.attach()}return c}n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){d(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12),u=i(31),f=i(17),h=i(1),p=function(d){a(c,d);function c(v){var y=d.call(this,v)||this;return y.attributes=new u.default(y.domNode),y}return c.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},c.prototype.format=function(v,y){var m=h.query(v);m instanceof l.default?this.attributes.attribute(m,y):y&&m!=null&&(v!==this.statics.blotName||this.formats()[v]!==y)&&this.replaceWith(v,y)},c.prototype.formats=function(){var v=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(v[this.statics.blotName]=y),v},c.prototype.replaceWith=function(v,y){var m=d.prototype.replaceWith.call(this,v,y);return this.attributes.copy(m),m},c.prototype.update=function(v,y){var m=this;d.prototype.update.call(this,v,y),v.some(function(_){return _.target===m.domNode&&_.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,y){var m=d.prototype.wrap.call(this,v,y);return m instanceof c&&m.statics.scope===this.statics.scope&&this.attributes.move(m),m},c}(f.default);n.default=p},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(30),u=i(1),f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.value=function(d){return!0},p.prototype.index=function(d,c){return this.domNode===d||this.domNode.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},p.prototype.position=function(d,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return d>0&&(v+=1),[this.parent.domNode,v]},p.prototype.value=function(){var d;return d={},d[this.statics.blotName]=this.statics.value(this.domNode)||!0,d},p.scope=u.Scope.INLINE_BLOT,p}(l.default);n.default=f},function(r,n,i){var a=i(11),l=i(3),u={attributes:{compose:function(h,p,d){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var c=l(!0,{},p);d||(c=Object.keys(c).reduce(function(y,m){return c[m]!=null&&(y[m]=c[m]),y},{}));for(var v in h)h[v]!==void 0&&p[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,p){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var d=Object.keys(h).concat(Object.keys(p)).reduce(function(c,v){return a(h[v],p[v])||(c[v]=p[v]===void 0?null:p[v]),c},{});return Object.keys(d).length>0?d:void 0},transform:function(h,p,d){if(typeof h!="object")return p;if(typeof p=="object"){if(!d)return p;var c=Object.keys(p).reduce(function(v,y){return h[y]===void 0&&(v[y]=p[y]),v},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var p=this.ops[this.index];if(p){var d=this.offset,c=u.length(p);if(h>=c-d?(h=c-d,this.index+=1,this.offset=0):this.offset+=h,typeof p.delete=="number")return{delete:h};var v={};return p.attributes&&(v.attributes=p.attributes),typeof p.retain=="number"?v.retain=h:typeof p.insert=="string"?v.insert=p.insert.substr(d,h):v.insert=p.insert,v}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,p=this.index,d=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=p,[d].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function a(m,_){return _!=null&&m instanceof _}var l;try{l=Map}catch{l=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(m,_,b,E,w){typeof _=="object"&&(b=_.depth,E=_.prototype,w=_.includeNonEnumerable,_=_.circular);var x=[],A=[],P=typeof Buffer<"u";typeof _>"u"&&(_=!0),typeof b>"u"&&(b=1/0);function S(O,L){if(O===null)return null;if(L===0)return O;var R,I;if(typeof O!="object")return O;if(a(O,l))R=new l;else if(a(O,u))R=new u;else if(a(O,f))R=new f(function(U,N){O.then(function(D){U(S(D,L-1))},function(D){N(S(D,L-1))})});else if(h.__isArray(O))R=[];else if(h.__isRegExp(O))R=new RegExp(O.source,y(O)),O.lastIndex&&(R.lastIndex=O.lastIndex);else if(h.__isDate(O))R=new Date(O.getTime());else{if(P&&Buffer.isBuffer(O))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(O.length):R=new Buffer(O.length),O.copy(R),R;a(O,Error)?R=Object.create(O):typeof E>"u"?(I=Object.getPrototypeOf(O),R=Object.create(I)):(R=Object.create(E),I=E)}if(_){var M=x.indexOf(O);if(M!=-1)return A[M];x.push(O),A.push(R)}a(O,l)&&O.forEach(function(U,N){var D=S(N,L-1),q=S(U,L-1);R.set(D,q)}),a(O,u)&&O.forEach(function(U){var N=S(U,L-1);R.add(N)});for(var C in O){var F;I&&(F=Object.getOwnPropertyDescriptor(I,C)),!(F&&F.set==null)&&(R[C]=S(O[C],L-1))}if(Object.getOwnPropertySymbols)for(var j=Object.getOwnPropertySymbols(O),C=0;C<j.length;C++){var X=j[C],V=Object.getOwnPropertyDescriptor(O,X);V&&!V.enumerable&&!w||(R[X]=S(O[X],L-1),V.enumerable||Object.defineProperty(R,X,{enumerable:!1}))}if(w)for(var it=Object.getOwnPropertyNames(O),C=0;C<it.length;C++){var Y=it[C],V=Object.getOwnPropertyDescriptor(O,Y);V&&V.enumerable||(R[Y]=S(O[Y],L-1),Object.defineProperty(R,Y,{enumerable:!1}))}return R}return S(m,b)}h.clonePrototype=function(_){if(_===null)return null;var b=function(){};return b.prototype=_,new b};function p(m){return Object.prototype.toString.call(m)}h.__objToStr=p;function d(m){return typeof m=="object"&&p(m)==="[object Date]"}h.__isDate=d;function c(m){return typeof m=="object"&&p(m)==="[object Array]"}h.__isArray=c;function v(m){return typeof m=="object"&&p(m)==="[object RegExp]"}h.__isRegExp=v;function y(m){var _="";return m.global&&(_+="g"),m.ignoreCase&&(_+="i"),m.multiline&&(_+="m"),_}return h.__getRegExpFlags=y,h}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function R(I,M){var C=[],F=!0,j=!1,X=void 0;try{for(var V=I[Symbol.iterator](),it;!(F=(it=V.next()).done)&&(C.push(it.value),!(M&&C.length===M));F=!0);}catch(Y){j=!0,X=Y}finally{try{!F&&V.return&&V.return()}finally{if(j)throw X}}return C}return function(I,M){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return R(I,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function R(I,M){for(var C=0;C<M.length;C++){var F=M[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(I,F.key,F)}}return function(I,M,C){return M&&R(I.prototype,M),C&&R(I,C),I}}(),u=function R(I,M,C){I===null&&(I=Function.prototype);var F=Object.getOwnPropertyDescriptor(I,M);if(F===void 0){var j=Object.getPrototypeOf(I);return j===null?void 0:R(j,M,C)}else{if("value"in F)return F.value;var X=F.get;return X===void 0?void 0:X.call(C)}},f=i(0),h=x(f),p=i(8),d=x(p),c=i(4),v=x(c),y=i(16),m=x(y),_=i(13),b=x(_),E=i(25),w=x(E);function x(R){return R&&R.__esModule?R:{default:R}}function A(R,I){if(!(R instanceof I))throw new TypeError("Cannot call a class as a function")}function P(R,I){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:R}function S(R,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);R.prototype=Object.create(I&&I.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(R,I):R.__proto__=I)}function O(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){S(I,R);function I(M,C){A(this,I);var F=P(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,M));return F.emitter=C.emitter,Array.isArray(C.whitelist)&&(F.whitelist=C.whitelist.reduce(function(j,X){return j[X]=!0,j},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return l(I,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(C,F){var j=this.line(C),X=a(j,2),V=X[0],it=X[1],Y=this.line(C+F),U=a(Y,1),N=U[0];if(u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"deleteAt",this).call(this,C,F),N!=null&&V!==N&&it>0){if(V instanceof c.BlockEmbed||N instanceof c.BlockEmbed){this.optimize();return}if(V instanceof b.default){var D=V.newlineIndex(V.length(),!0);if(D>-1&&(V=V.split(D+1),V===N)){this.optimize();return}}else if(N instanceof b.default){var q=N.newlineIndex(0);q>-1&&N.split(q+1)}var Z=N.children.head instanceof m.default?null:N.children.head;V.moveChildren(N,Z),V.remove()}this.optimize()}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",C)}},{key:"formatAt",value:function(C,F,j,X){this.whitelist!=null&&!this.whitelist[j]||(u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"formatAt",this).call(this,C,F,j,X),this.optimize())}},{key:"insertAt",value:function(C,F,j){if(!(j!=null&&this.whitelist!=null&&!this.whitelist[F])){if(C>=this.length())if(j==null||h.default.query(F,h.default.Scope.BLOCK)==null){var X=h.default.create(this.statics.defaultChild);this.appendChild(X),j==null&&F.endsWith(`
|
|
602
|
-
`)&&(F=F.slice(0,-1)),X.insertAt(0,F,j)}else{var V=h.default.create(F,j);this.appendChild(V)}else u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"insertAt",this).call(this,C,F,j);this.optimize()}}},{key:"insertBefore",value:function(C,F){if(C.statics.scope===h.default.Scope.INLINE_BLOT){var j=h.default.create(this.statics.defaultChild);j.appendChild(C),C=j}u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"insertBefore",this).call(this,C,F)}},{key:"leaf",value:function(C){return this.path(C).pop()||[null,-1]}},{key:"line",value:function(C){return C===this.length()?this.line(C-1):this.descendant(O,C)}},{key:"lines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,j=function X(V,
|
|
603
|
-
`,
|
|
604
|
-
`,tt.format).retain(ht.length()-
|
|
605
|
-
`,et,A.default.sources.USER),this.quill.setSelection(G.index+1,A.default.sources.SILENT),this.quill.focus(),Object.keys(z.format).forEach(function(nt){et[nt]==null&&(Array.isArray(z.format[nt])||nt!=="link"&&tt.quill.format(nt,z.format[nt],A.default.sources.USER))})}function q(G){return{key:V.keys.TAB,shiftKey:!G,format:{"code-block":!0},handler:function(tt){var et=w.default.query("code-block"),nt=tt.index,ht=tt.length,
|
|
606
|
-
`);It=0,ot.forEach(function(dt,pt){G?(xt.insertAt(Wt+It,et.TAB),It+=et.TAB.length,pt===0?nt+=et.TAB.length:ht+=et.TAB.length):dt.startsWith(et.TAB)&&(xt.deleteAt(Wt+It,et.TAB.length),It-=et.TAB.length,pt===0?nt-=et.TAB.length:ht-=et.TAB.length),It+=dt.length+1}),this.quill.update(A.default.sources.USER),this.quill.setSelection(nt,ht,A.default.sources.SILENT)}}}}function Z(G){return{key:G[0].toUpperCase(),shortKey:!0,handler:function(tt,et){this.quill.format(G,!et.format[G],A.default.sources.USER)}}}function K(G){if(typeof G=="string"||typeof G=="number")return K({key:G});if((typeof G>"u"?"undefined":a(G))==="object"&&(G=(0,h.default)(G,!1)),typeof G.key=="string")if(V.keys[G.key.toUpperCase()]!=null)G.key=V.keys[G.key.toUpperCase()];else if(G.key.length===1)G.key=G.key.toUpperCase().charCodeAt(0);else return null;return G.shortKey&&(G[X]=G.shortKey,delete G.shortKey),G}n.default=V,n.SHORTKEY=X},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function b(E,w){var x=[],A=!0,P=!1,S=void 0;try{for(var O=E[Symbol.iterator](),L;!(A=(L=O.next()).done)&&(x.push(L.value),!(w&&x.length===w));A=!0);}catch(R){P=!0,S=R}finally{try{!A&&O.return&&O.return()}finally{if(P)throw S}}return x}return function(E,w){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return b(E,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function b(E,w,x){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,w);if(A===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:b(P,w,x)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(x)}},u=function(){function b(E,w){for(var x=0;x<w.length;x++){var A=w[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,w,x){return w&&b(E.prototype,w),x&&b(E,x),E}}(),f=i(0),h=c(f),p=i(7),d=c(p);function c(b){return b&&b.__esModule?b:{default:b}}function v(b,E){if(!(b instanceof E))throw new TypeError("Cannot call a class as a function")}function y(b,E){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:b}function m(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);b.prototype=Object.create(E&&E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(b,E):b.__proto__=E)}var _=function(b){m(E,b),u(E,null,[{key:"value",value:function(){}}]);function E(w,x){v(this,E);var A=y(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,w));return A.selection=x,A.textNode=document.createTextNode(E.CONTENTS),A.domNode.appendChild(A.textNode),A._length=0,A}return u(E,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,A){if(this._length!==0)return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,x,A);for(var P=this,S=0;P!=null&&P.statics.scope!==h.default.Scope.BLOCK_BLOT;)S+=P.offset(P.parent),P=P.parent;P!=null&&(this._length=E.CONTENTS.length,P.optimize(),P.formatAt(S,E.CONTENTS.length,x,A),this._length=0)}},{key:"index",value:function(x,A){return x===this.textNode?0:l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"index",this).call(this,x,A)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,A=this.selection.getNativeRange(),P=void 0,S=void 0,O=void 0;if(A!=null&&A.start.node===x&&A.end.node===x){var L=[x,A.start.offset,A.end.offset];P=L[0],S=L[1],O=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==E.CONTENTS){var R=this.textNode.data.split(E.CONTENTS).join("");this.next instanceof d.default?(P=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=E.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(E.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),S!=null){var I=[S,O].map(function(C){return Math.max(0,Math.min(P.data.length,C-1))}),M=a(I,2);return S=M[0],O=M[1],{startNode:P,startOffset:S,endNode:P,endOffset:O}}}}},{key:"update",value:function(x,A){var P=this;if(x.some(function(O){return O.type==="characterData"&&O.target===P.textNode})){var S=this.restore();S&&(A.range=S)}}},{key:"value",value:function(){return""}}]),E}(h.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),l=h(a),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function d(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function c(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var v=function(y){c(m,y);function m(){return p(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m}(l.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var a=function(){function _(b,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,E,w){return E&&_(b.prototype,E),w&&_(b,w),b}}(),l=function _(b,E,w){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,E);if(x===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:_(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function p(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function d(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return p(this,b),d(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"value",value:function(w){var x=l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,w);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(A){return("00"+parseInt(A).toString(16)).slice(-2)}).join("")):x}}]),b}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),m=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var a=function(){function m(_,b){for(var E=0;E<b.length;E++){var w=b[E];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,E){return b&&m(_.prototype,b),E&&m(_,E),_}}(),l=function m(_,b,E){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:m(x,b,E)}else{if("value"in w)return w.value;var A=w.get;return A===void 0?void 0:A.call(E)}},u=i(6),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function c(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var v=function(m){c(_,m);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"format",value:function(E,w){if(E!==this.statics.blotName||!w)return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,E,w);w=this.constructor.sanitize(w),this.domNode.setAttribute("href",w)}}],[{key:"create",value:function(E){var w=l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,E);return E=this.sanitize(E),w.setAttribute("href",E),w.setAttribute("rel","noopener noreferrer"),w.setAttribute("target","_blank"),w}},{key:"formats",value:function(E){return E.getAttribute("href")}},{key:"sanitize",value:function(E){return y(E,this.PROTOCOL_WHITELIST)?E:this.SANITIZED_URL}}]),_}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(m,_){var b=document.createElement("a");b.href=m;var E=b.href.slice(0,b.href.indexOf(":"));return _.indexOf(E)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},l=function(){function _(b,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,E,w){return E&&_(b.prototype,E),w&&_(b,w),b}}(),u=i(23),f=d(u),h=i(107),p=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function c(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}var v=0;function y(_,b){_.setAttribute(b,_.getAttribute(b)!=="true")}var m=function(){function _(b){var E=this;c(this,_),this.select=b,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){E.togglePicker()}),this.label.addEventListener("keydown",function(w){switch(w.keyCode){case f.default.keys.ENTER:E.togglePicker();break;case f.default.keys.ESCAPE:E.escape(),w.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return l(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(E){var w=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),E.hasAttribute("value")&&x.setAttribute("data-value",E.getAttribute("value")),E.textContent&&x.setAttribute("data-label",E.textContent),x.addEventListener("click",function(){w.selectItem(x,!0)}),x.addEventListener("keydown",function(A){switch(A.keyCode){case f.default.keys.ENTER:w.selectItem(x,!0),A.preventDefault();break;case f.default.keys.ESCAPE:w.escape(),A.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var E=document.createElement("span");return E.classList.add("ql-picker-label"),E.innerHTML=p.default,E.tabIndex="0",E.setAttribute("role","button"),E.setAttribute("aria-expanded","false"),this.container.appendChild(E),E}},{key:"buildOptions",value:function(){var E=this,w=document.createElement("span");w.classList.add("ql-picker-options"),w.setAttribute("aria-hidden","true"),w.tabIndex="-1",w.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",w.id),this.options=w,[].slice.call(this.select.options).forEach(function(x){var A=E.buildItem(x);w.appendChild(A),x.selected===!0&&E.selectItem(A)}),this.container.appendChild(w)}},{key:"buildPicker",value:function(){var E=this;[].slice.call(this.select.attributes).forEach(function(w){E.container.setAttribute(w.name,w.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var E=this;this.close(),setTimeout(function(){return E.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(E!==x&&(x!=null&&x.classList.remove("ql-selected"),E!=null&&(E.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(E.parentNode.children,E),E.hasAttribute("data-value")?this.label.setAttribute("data-value",E.getAttribute("data-value")):this.label.removeAttribute("data-value"),E.hasAttribute("data-label")?this.label.setAttribute("data-label",E.getAttribute("data-label")):this.label.removeAttribute("data-label"),w))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var A=document.createEvent("Event");A.initEvent("change",!0,!0),this.select.dispatchEvent(A)}this.close()}}},{key:"update",value:function(){var E=void 0;if(this.select.selectedIndex>-1){var w=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];E=this.select.options[this.select.selectedIndex],this.selectItem(w)}else this.selectItem(null);var x=E!=null&&E!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),_}();n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),l=j(a),u=i(5),f=j(u),h=i(4),p=j(h),d=i(16),c=j(d),v=i(25),y=j(v),m=i(24),_=j(m),b=i(35),E=j(b),w=i(6),x=j(w),A=i(22),P=j(A),S=i(7),O=j(S),L=i(55),R=j(L),I=i(42),M=j(I),C=i(23),F=j(C);function j(X){return X&&X.__esModule?X:{default:X}}f.default.register({"blots/block":p.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":_.default,"blots/embed":E.default,"blots/inline":x.default,"blots/scroll":P.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":M.default,"modules/keyboard":F.default}),l.default.register(p.default,c.default,_.default,x.default,P.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),l=function(){function u(f){this.domNode=f,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return a.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},u.prototype.deleteAt=function(f,h){var p=this.isolate(f,h);p.remove()},u.prototype.formatAt=function(f,h,p,d){var c=this.isolate(f,h);if(a.query(p,a.Scope.BLOT)!=null&&d)c.wrap(p,d);else if(a.query(p,a.Scope.ATTRIBUTE)!=null){var v=a.create(this.statics.scope);c.wrap(v),v.format(p,d)}},u.prototype.insertAt=function(f,h,p){var d=p==null?a.create("text",h):a.create(h,p),c=this.split(f);this.parent.insertBefore(d,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var p=null;f.children.insertBefore(this,h),h!=null&&(p=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=p)&&f.domNode.insertBefore(this.domNode,p),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var p=this.split(f);return p.split(h),p},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var p=typeof f=="string"?a.create(f,h):f;return p.replace(this),p},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var p=typeof f=="string"?a.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(p,this.next),p.appendChild(this),p},u.blotName="abstract",u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),l=i(32),u=i(33),f=i(1),h=function(){function p(d){this.attributes={},this.domNode=d,this.build()}return p.prototype.attribute=function(d,c){c?d.add(this.domNode,c)&&(d.value(this.domNode)!=null?this.attributes[d.attrName]=d:delete this.attributes[d.attrName]):(d.remove(this.domNode),delete this.attributes[d.attrName])},p.prototype.build=function(){var d=this;this.attributes={};var c=a.default.keys(this.domNode),v=l.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(m){var _=f.query(m,f.Scope.ATTRIBUTE);_ instanceof a.default&&(d.attributes[_.attrName]=_)})},p.prototype.copy=function(d){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);d.format(v,y)})},p.prototype.move=function(d){var c=this;this.copy(d),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},p.prototype.values=function(){var d=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=d.attributes[v].value(d.domNode),c},{})},p}();n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h,p){var d=h.getAttribute("class")||"";return d.split(/\s+/).filter(function(c){return c.indexOf(p+"-")===0})}var f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(this.remove(d),d.classList.add(this.keyName+"-"+c),!0):!1},p.prototype.remove=function(d){var c=u(d,this.keyName);c.forEach(function(v){d.classList.remove(v)}),d.classList.length===0&&d.removeAttribute("class")},p.prototype.value=function(d){var c=u(d,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(d,v)?v:""},p}(l.default);n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h){var p=h.split("-"),d=p.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return p[0]+d}var f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(d.style[u(this.keyName)]=c,!0):!1},p.prototype.remove=function(d){d.style[u(this.keyName)]="",d.getAttribute("style")||d.removeAttribute("style")},p.prototype.value=function(d){var c=d.style[u(this.keyName)];return this.canAdd(d,c)?c:""},p}(l.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){l(this,f),this.quill=h,this.options=p,this.modules={}}return a(f,[{key:"init",value:function(){var p=this;Object.keys(this.options.modules).forEach(function(d){p.modules[d]==null&&p.addModule(d)})}},{key:"addModule",value:function(p){var d=this.quill.constructor.import("modules/"+p);return this.modules[p]=new d(this.quill,this.options.modules[p]||{}),this.modules[p]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function b(E,w){for(var x=0;x<w.length;x++){var A=w[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,w,x){return w&&b(E.prototype,w),x&&b(E,x),E}}(),l=function b(E,w,x){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,w);if(A===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:b(P,w,x)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(x)}},u=i(0),f=d(u),h=i(7),p=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function c(b,E){if(!(b instanceof E))throw new TypeError("Cannot call a class as a function")}function v(b,E){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:b}function y(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);b.prototype=Object.create(E&&E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(b,E):b.__proto__=E)}var m="\uFEFF",_=function(b){y(E,b);function E(w){c(this,E);var x=v(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,w));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(A){x.contentNode.appendChild(A)}),x.leftGuard=document.createTextNode(m),x.rightGuard=document.createTextNode(m),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return a(E,[{key:"index",value:function(x,A){return x===this.leftGuard?0:x===this.rightGuard?1:l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"index",this).call(this,x,A)}},{key:"restore",value:function(x){var A=void 0,P=void 0,S=x.data.split(m).join("");if(x===this.leftGuard)if(this.prev instanceof p.default){var O=this.prev.length();this.prev.insertAt(O,S),A={startNode:this.prev.domNode,startOffset:O+S.length}}else P=document.createTextNode(S),this.parent.insertBefore(f.default.create(P),this),A={startNode:P,startOffset:S.length};else x===this.rightGuard&&(this.next instanceof p.default?(this.next.insertAt(0,S),A={startNode:this.next.domNode,startOffset:S.length}):(P=document.createTextNode(S),this.parent.insertBefore(f.default.create(P),this.next),A={startNode:P,startOffset:S.length}));return x.data=m,A}},{key:"update",value:function(x,A){var P=this;x.forEach(function(S){if(S.type==="characterData"&&(S.target===P.leftGuard||S.target===P.rightGuard)){var O=P.restore(S.target);O&&(A.range=O)}})}}]),E}(f.default.Embed);n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var a=i(0),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new l.default.Attributor.Attribute("align","align",f),p=new l.default.Attributor.Class("align","ql-align",f),d=new l.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=p,n.AlignStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var a=i(0),l=f(a),u=i(26);function f(d){return d&&d.__esModule?d:{default:d}}var h=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),p=new u.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var a=i(0),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},h=new l.default.Attributor.Attribute("direction","dir",f),p=new l.default.Attributor.Class("direction","ql-direction",f),d=new l.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=p,n.DirectionStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var a=function(){function b(E,w){for(var x=0;x<w.length;x++){var A=w[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,w,x){return w&&b(E.prototype,w),x&&b(E,x),E}}(),l=function b(E,w,x){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,w);if(A===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:b(P,w,x)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(x)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function p(b,E){if(!(b instanceof E))throw new TypeError("Cannot call a class as a function")}function d(b,E){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:b}function c(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);b.prototype=Object.create(E&&E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(b,E):b.__proto__=E)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),m=function(b){c(E,b);function E(){return p(this,E),d(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return a(E,[{key:"value",value:function(x){return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),E}(f.default.Attributor.Style),_=new m("font","font-family",v);n.FontStyle=_,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var a=i(0),l=u(a);function u(p){return p&&p.__esModule?p:{default:p}}var f=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new l.default.Attributor.Style("size","font-size",{scope:l.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var a=function(){function w(x,A){for(var P=0;P<A.length;P++){var S=A[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(x,S.key,S)}}return function(x,A,P){return A&&w(x.prototype,A),P&&w(x,P),x}}(),l=i(0),u=c(l),f=i(5),h=c(f),p=i(9),d=c(p);function c(w){return w&&w.__esModule?w:{default:w}}function v(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function y(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var _=function(w){m(x,w);function x(A,P){v(this,x);var S=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,A,P));return S.lastRecorded=0,S.ignoreChange=!1,S.clear(),S.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,I){O!==h.default.events.TEXT_CHANGE||S.ignoreChange||(!S.options.userOnly||I===h.default.sources.USER?S.record(L,R):S.transform(L))}),S.quill.keyboard.addBinding({key:"Z",shortKey:!0},S.undo.bind(S)),S.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},S.redo.bind(S)),/Win/i.test(navigator.platform)&&S.quill.keyboard.addBinding({key:"Y",shortKey:!0},S.redo.bind(S)),S}return a(x,[{key:"change",value:function(P,S){if(this.stack[P].length!==0){var O=this.stack[P].pop();this.stack[S].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[P],h.default.sources.USER),this.ignoreChange=!1;var L=E(O[P]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(P,S){if(P.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(S),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),P=R.redo.compose(P)}else this.lastRecorded=L;this.stack.undo.push({redo:P,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(P){this.stack.undo.forEach(function(S){S.undo=P.transform(S.undo,!0),S.redo=P.transform(S.redo,!0)}),this.stack.redo.forEach(function(S){S.undo=P.transform(S.undo,!0),S.redo=P.transform(S.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(d.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function b(w){var x=w.ops[w.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
|
|
607
|
-
`):x.attributes!=null?Object.keys(x.attributes).some(function(A){return u.default.query(A,u.default.Scope.BLOCK)!=null}):!1}function E(w){var x=w.reduce(function(P,S){return P+=S.delete||0,P},0),A=w.length()-x;return b(w)&&(A-=1),A}n.default=_,n.getLastChangeIndex=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var a=function(){function D(q,Z){for(var K=0;K<Z.length;K++){var G=Z[K];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(q,G.key,G)}}return function(q,Z,K){return Z&&D(q.prototype,Z),K&&D(q,K),q}}(),l=function D(q,Z,K){q===null&&(q=Function.prototype);var G=Object.getOwnPropertyDescriptor(q,Z);if(G===void 0){var z=Object.getPrototypeOf(q);return z===null?void 0:D(z,Z,K)}else{if("value"in G)return G.value;var tt=G.get;return tt===void 0?void 0:tt.call(K)}},u=i(3),f=L(u),h=i(2),p=L(h),d=i(8),c=L(d),v=i(23),y=L(v),m=i(34),_=L(m),b=i(59),E=L(b),w=i(60),x=L(w),A=i(28),P=L(A),S=i(61),O=L(S);function L(D){return D&&D.__esModule?D:{default:D}}function R(D,q){if(!(D instanceof q))throw new TypeError("Cannot call a class as a function")}function I(D,q){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:D}function M(D,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);D.prototype=Object.create(q&&q.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(D,q):D.__proto__=q)}var C=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],j=[!1,"serif","monospace"],X=["1","2","3",!1],V=["small",!1,"large","huge"],it=function(D){M(q,D);function q(Z,K){R(this,q);var G=I(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,Z,K)),z=function tt(et){if(!document.body.contains(Z.root))return document.body.removeEventListener("click",tt);G.tooltip!=null&&!G.tooltip.root.contains(et.target)&&document.activeElement!==G.tooltip.textbox&&!G.quill.hasFocus()&&G.tooltip.hide(),G.pickers!=null&&G.pickers.forEach(function(nt){nt.container.contains(et.target)||nt.close()})};return Z.emitter.listenDOM("click",document.body,z),G}return a(q,[{key:"addModule",value:function(K){var G=l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"addModule",this).call(this,K);return K==="toolbar"&&this.extendToolbar(G),G}},{key:"buildButtons",value:function(K,G){K.forEach(function(z){var tt=z.getAttribute("class")||"";tt.split(/\s+/).forEach(function(et){if(et.startsWith("ql-")&&(et=et.slice(3),G[et]!=null))if(et==="direction")z.innerHTML=G[et][""]+G[et].rtl;else if(typeof G[et]=="string")z.innerHTML=G[et];else{var nt=z.value||"";nt!=null&&G[et][nt]&&(z.innerHTML=G[et][nt])}})})}},{key:"buildPickers",value:function(K,G){var z=this;this.pickers=K.map(function(et){if(et.classList.contains("ql-align"))return et.querySelector("option")==null&&N(et,C),new x.default(et,G.align);if(et.classList.contains("ql-background")||et.classList.contains("ql-color")){var nt=et.classList.contains("ql-background")?"background":"color";return et.querySelector("option")==null&&N(et,F,nt==="background"?"#ffffff":"#000000"),new E.default(et,G[nt])}else return et.querySelector("option")==null&&(et.classList.contains("ql-font")?N(et,j):et.classList.contains("ql-header")?N(et,X):et.classList.contains("ql-size")&&N(et,V)),new P.default(et)});var tt=function(){z.pickers.forEach(function(nt){nt.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,tt)}}]),q}(_.default);it.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var q=this,Z=this.container.querySelector("input.ql-image[type=file]");Z==null&&(Z=document.createElement("input"),Z.setAttribute("type","file"),Z.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Z.classList.add("ql-image"),Z.addEventListener("change",function(){if(Z.files!=null&&Z.files[0]!=null){var K=new FileReader;K.onload=function(G){var z=q.quill.getSelection(!0);q.quill.updateContents(new p.default().retain(z.index).delete(z.length).insert({image:G.target.result}),c.default.sources.USER),q.quill.setSelection(z.index+1,c.default.sources.SILENT),Z.value=""},K.readAsDataURL(Z.files[0])}}),this.container.appendChild(Z)),Z.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Y=function(D){M(q,D);function q(Z,K){R(this,q);var G=I(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,Z,K));return G.textbox=G.root.querySelector('input[type="text"]'),G.listen(),G}return a(q,[{key:"listen",value:function(){var K=this;this.textbox.addEventListener("keydown",function(G){y.default.match(G,"enter")?(K.save(),G.preventDefault()):y.default.match(G,"escape")&&(K.cancel(),G.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),G!=null?this.textbox.value=G:K!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+K)||""),this.root.setAttribute("data-mode",K)}},{key:"restoreFocus",value:function(){var K=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=K}},{key:"save",value:function(){var K=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var G=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",K,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",K,c.default.sources.USER)),this.quill.root.scrollTop=G;break}case"video":K=U(K);case"formula":{if(!K)break;var z=this.quill.getSelection(!0);if(z!=null){var tt=z.index+z.length;this.quill.insertEmbed(tt,this.root.getAttribute("data-mode"),K,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(tt+1," ",c.default.sources.USER),this.quill.setSelection(tt+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),q}(O.default);function U(D){var q=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return q?(q[1]||"https")+"://www.youtube.com/embed/"+q[2]+"?showinfo=0":(q=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(q[1]||"https")+"://player.vimeo.com/video/"+q[2]+"/":D}function N(D,q){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;q.forEach(function(K){var G=document.createElement("option");K===Z?G.setAttribute("selected","selected"):G.setAttribute("value",K),D.appendChild(G)})}n.BaseTooltip=Y,n.default=it},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function l(){this.head=this.tail=null,this.length=0}return l.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},l.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},l.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},l.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},l.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},l.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},l.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,p=this.iterator();h=p();){var d=h.length();if(u<d||f&&u===d&&(h.next==null||h.next.length()!==0))return[h,u];u-=d}return[null,0]},l.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},l.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var p=this.find(u),d=p[0],c=p[1],v,y=u-c,m=this.iterator(d);(v=m())&&y<u+f;){var _=v.length();u>y?h(v,u-y,Math.min(f,y+_-u)):h(v,0,Math.min(_,u+f-y)),y+=_}},l.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},l.prototype.reduce=function(u,f){for(var h,p=this.iterator();h=p();)f=u(f,h);return f},l}();n.default=a},function(r,n,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){d(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,p=function(d){a(c,d);function c(v){var y=d.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(m){y.update(m)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){d.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(m){m.remove()}):d.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,m,_){this.update(),d.prototype.formatAt.call(this,v,y,m,_)},c.prototype.insertAt=function(v,y,m){this.update(),d.prototype.insertAt.call(this,v,y,m)},c.prototype.optimize=function(v,y){var m=this;v===void 0&&(v=[]),y===void 0&&(y={}),d.prototype.optimize.call(this,y);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)v.push(_.pop());for(var b=function(A,P){P===void 0&&(P=!0),!(A==null||A===m)&&A.domNode.parentNode!=null&&(A.domNode[u.DATA_KEY].mutations==null&&(A.domNode[u.DATA_KEY].mutations=[]),P&&b(A.parent))},E=function(A){A.domNode[u.DATA_KEY]==null||A.domNode[u.DATA_KEY].mutations==null||(A instanceof l.default&&A.children.forEach(E),A.optimize(y))},w=v,x=0;w.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(w.forEach(function(A){var P=u.find(A.target,!0);P!=null&&(P.domNode===A.target&&(A.type==="childList"?(b(u.find(A.previousSibling,!1)),[].forEach.call(A.addedNodes,function(S){var O=u.find(S,!1);b(O,!1),O instanceof l.default&&O.children.forEach(function(L){b(L,!1)})})):A.type==="attributes"&&b(P.prev)),b(P))}),this.children.forEach(E),w=[].slice.call(this.observer.takeRecords()),_=w.slice();_.length>0;)v.push(_.pop())}},c.prototype.update=function(v,y){var m=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(_){var b=u.find(_.target,!0);return b==null?null:b.domNode[u.DATA_KEY].mutations==null?(b.domNode[u.DATA_KEY].mutations=[_],b):(b.domNode[u.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===m||_.domNode[u.DATA_KEY]==null||_.update(_.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&d.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(l.default);n.default=p},function(r,n,i){var a=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var v in c)c.hasOwnProperty(v)&&(d[v]=c[v])};return function(d,c){p(d,c);function v(){this.constructor=d}d.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1);function f(p,d){if(Object.keys(p).length!==Object.keys(d).length)return!1;for(var c in p)if(p[c]!==d[c])return!1;return!0}var h=function(p){a(d,p);function d(){return p!==null&&p.apply(this,arguments)||this}return d.formats=function(c){if(c.tagName!==d.tagName)return p.formats.call(this,c)},d.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(m){m instanceof l.default||(m=m.wrap(d.blotName,!0)),y.attributes.copy(m)}),this.unwrap()):p.prototype.format.call(this,c,v)},d.prototype.formatAt=function(c,v,y,m){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var _=this.isolate(c,v);_.format(y,m)}else p.prototype.formatAt.call(this,c,v,y,m)},d.prototype.optimize=function(c){p.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof d&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},d.blotName="inline",d.scope=u.Scope.INLINE_BLOT,d.tagName="SPAN",d}(l.default);n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1),f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.formats=function(d){var c=u.query(p.blotName).tagName;if(d.tagName!==c)return h.formats.call(this,d)},p.prototype.format=function(d,c){u.query(d,u.Scope.BLOCK)!=null&&(d===this.statics.blotName&&!c?this.replaceWith(p.blotName):h.prototype.format.call(this,d,c))},p.prototype.formatAt=function(d,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,d,c,v,y)},p.prototype.insertAt=function(d,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,d,c,v);else{var y=this.split(d),m=u.create(c,v);y.parent.insertBefore(m,y)}},p.prototype.update=function(d,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,d,c)},p.blotName="block",p.scope=u.Scope.BLOCK_BLOT,p.tagName="P",p}(l.default);n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var d in p)p.hasOwnProperty(d)&&(h[d]=p[d])};return function(h,p){f(h,p);function d(){this.constructor=h}h.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=function(f){a(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(p){},h.prototype.format=function(p,d){f.prototype.formatAt.call(this,0,this.length(),p,d)},h.prototype.formatAt=function(p,d,c,v){p===0&&d===this.length()?this.format(c,v):f.prototype.formatAt.call(this,p,d,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(l.default);n.default=u},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=i(1),f=function(h){a(p,h);function p(d){var c=h.call(this,d)||this;return c.text=c.statics.value(c.domNode),c}return p.create=function(d){return document.createTextNode(d)},p.value=function(d){var c=d.data;return c.normalize&&(c=c.normalize()),c},p.prototype.deleteAt=function(d,c){this.domNode.data=this.text=this.text.slice(0,d)+this.text.slice(d+c)},p.prototype.index=function(d,c){return this.domNode===d?c:-1},p.prototype.insertAt=function(d,c,v){v==null?(this.text=this.text.slice(0,d)+c+this.text.slice(d),this.domNode.data=this.text):h.prototype.insertAt.call(this,d,c,v)},p.prototype.length=function(){return this.text.length},p.prototype.optimize=function(d){h.prototype.optimize.call(this,d),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof p&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},p.prototype.position=function(d,c){return[this.domNode,d]},p.prototype.split=function(d,c){if(c===void 0&&(c=!1),!c){if(d===0)return this;if(d===this.length())return this.next}var v=u.create(this.domNode.splitText(d));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},p.prototype.update=function(d,c){var v=this;d.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},p.prototype.value=function(){return this.text},p.blotName="text",p.scope=u.Scope.INLINE_BLOT,p}(l.default);n.default=f},function(r,n,i){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:l.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var p=h.indexOf(u,f);return p!==-1&&p===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),p=h.length>>>0,d=arguments[1],c,v=0;v<p;v++)if(c=h[v],f.call(d,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,a=1,l=0;function u(x,A,P){if(x==A)return x?[[l,x]]:[];(P<0||x.length<P)&&(P=null);var S=d(x,A),O=x.substring(0,S);x=x.substring(S),A=A.substring(S),S=c(x,A);var L=x.substring(x.length-S);x=x.substring(0,x.length-S),A=A.substring(0,A.length-S);var R=f(x,A);return O&&R.unshift([l,O]),L&&R.push([l,L]),y(R),P!=null&&(R=b(R,P)),R=E(R),R}function f(x,A){var P;if(!x)return[[a,A]];if(!A)return[[i,x]];var S=x.length>A.length?x:A,O=x.length>A.length?A:x,L=S.indexOf(O);if(L!=-1)return P=[[a,S.substring(0,L)],[l,O],[a,S.substring(L+O.length)]],x.length>A.length&&(P[0][0]=P[2][0]=i),P;if(O.length==1)return[[i,x],[a,A]];var R=v(x,A);if(R){var I=R[0],M=R[1],C=R[2],F=R[3],j=R[4],X=u(I,C),V=u(M,F);return X.concat([[l,j]],V)}return h(x,A)}function h(x,A){for(var P=x.length,S=A.length,O=Math.ceil((P+S)/2),L=O,R=2*O,I=new Array(R),M=new Array(R),C=0;C<R;C++)I[C]=-1,M[C]=-1;I[L+1]=0,M[L+1]=0;for(var F=P-S,j=F%2!=0,X=0,V=0,it=0,Y=0,U=0;U<O;U++){for(var N=-U+X;N<=U-V;N+=2){var D=L+N,q;N==-U||N!=U&&I[D-1]<I[D+1]?q=I[D+1]:q=I[D-1]+1;for(var Z=q-N;q<P&&Z<S&&x.charAt(q)==A.charAt(Z);)q++,Z++;if(I[D]=q,q>P)V+=2;else if(Z>S)X+=2;else if(j){var K=L+F-N;if(K>=0&&K<R&&M[K]!=-1){var G=P-M[K];if(q>=G)return p(x,A,q,Z)}}}for(var z=-U+it;z<=U-Y;z+=2){var K=L+z,G;z==-U||z!=U&&M[K-1]<M[K+1]?G=M[K+1]:G=M[K-1]+1;for(var tt=G-z;G<P&&tt<S&&x.charAt(P-G-1)==A.charAt(S-tt-1);)G++,tt++;if(M[K]=G,G>P)Y+=2;else if(tt>S)it+=2;else if(!j){var D=L+F-z;if(D>=0&&D<R&&I[D]!=-1){var q=I[D],Z=L+q-D;if(G=P-G,q>=G)return p(x,A,q,Z)}}}}return[[i,x],[a,A]]}function p(x,A,P,S){var O=x.substring(0,P),L=A.substring(0,S),R=x.substring(P),I=A.substring(S),M=u(O,L),C=u(R,I);return M.concat(C)}function d(x,A){if(!x||!A||x.charAt(0)!=A.charAt(0))return 0;for(var P=0,S=Math.min(x.length,A.length),O=S,L=0;P<O;)x.substring(L,O)==A.substring(L,O)?(P=O,L=P):S=O,O=Math.floor((S-P)/2+P);return O}function c(x,A){if(!x||!A||x.charAt(x.length-1)!=A.charAt(A.length-1))return 0;for(var P=0,S=Math.min(x.length,A.length),O=S,L=0;P<O;)x.substring(x.length-O,x.length-L)==A.substring(A.length-O,A.length-L)?(P=O,L=P):S=O,O=Math.floor((S-P)/2+P);return O}function v(x,A){var P=x.length>A.length?x:A,S=x.length>A.length?A:x;if(P.length<4||S.length*2<P.length)return null;function O(V,it,Y){for(var U=V.substring(Y,Y+Math.floor(V.length/4)),N=-1,D="",q,Z,K,G;(N=it.indexOf(U,N+1))!=-1;){var z=d(V.substring(Y),it.substring(N)),tt=c(V.substring(0,Y),it.substring(0,N));D.length<tt+z&&(D=it.substring(N-tt,N)+it.substring(N,N+z),q=V.substring(0,Y-tt),Z=V.substring(Y+z),K=it.substring(0,N-tt),G=it.substring(N+z))}return D.length*2>=V.length?[q,Z,K,G,D]:null}var L=O(P,S,Math.ceil(P.length/4)),R=O(P,S,Math.ceil(P.length/2)),I;if(!L&&!R)return null;R?L?I=L[4].length>R[4].length?L:R:I=R:I=L;var M,C,F,j;x.length>A.length?(M=I[0],C=I[1],F=I[2],j=I[3]):(F=I[0],j=I[1],M=I[2],C=I[3]);var X=I[4];return[M,C,F,j,X]}function y(x){x.push([l,""]);for(var A=0,P=0,S=0,O="",L="",R;A<x.length;)switch(x[A][0]){case a:S++,L+=x[A][1],A++;break;case i:P++,O+=x[A][1],A++;break;case l:P+S>1?(P!==0&&S!==0&&(R=d(L,O),R!==0&&(A-P-S>0&&x[A-P-S-1][0]==l?x[A-P-S-1][1]+=L.substring(0,R):(x.splice(0,0,[l,L.substring(0,R)]),A++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[A][1]=L.substring(L.length-R)+x[A][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),P===0?x.splice(A-S,P+S,[a,L]):S===0?x.splice(A-P,P+S,[i,O]):x.splice(A-P-S,P+S,[i,O],[a,L]),A=A-P-S+(P?1:0)+(S?1:0)+1):A!==0&&x[A-1][0]==l?(x[A-1][1]+=x[A][1],x.splice(A,1)):A++,S=0,P=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var I=!1;for(A=1;A<x.length-1;)x[A-1][0]==l&&x[A+1][0]==l&&(x[A][1].substring(x[A][1].length-x[A-1][1].length)==x[A-1][1]?(x[A][1]=x[A-1][1]+x[A][1].substring(0,x[A][1].length-x[A-1][1].length),x[A+1][1]=x[A-1][1]+x[A+1][1],x.splice(A-1,1),I=!0):x[A][1].substring(0,x[A+1][1].length)==x[A+1][1]&&(x[A-1][1]+=x[A+1][1],x[A][1]=x[A][1].substring(x[A+1][1].length)+x[A+1][1],x.splice(A+1,1),I=!0)),A++;I&&y(x)}var m=u;m.INSERT=a,m.DELETE=i,m.EQUAL=l,r.exports=m;function _(x,A){if(A===0)return[l,x];for(var P=0,S=0;S<x.length;S++){var O=x[S];if(O[0]===i||O[0]===l){var L=P+O[1].length;if(A===L)return[S+1,x];if(A<L){x=x.slice();var R=A-P,I=[O[0],O[1].slice(0,R)],M=[O[0],O[1].slice(R)];return x.splice(S,1,I,M),[S+1,x]}else P=L}}throw new Error("cursor_pos is out of bounds!")}function b(x,A){var P=_(x,A),S=P[1],O=P[0],L=S[O],R=S[O+1];if(L==null)return x;if(L[0]!==l)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return S.splice(O,2,R,L),w(S,O,2);if(R!=null&&R[1].indexOf(L[1])===0){S.splice(O,2,[R[0],L[1]],[0,L[1]]);var I=R[1].slice(L[1].length);return I.length>0&&S.splice(O+2,0,[R[0],I]),w(S,O,3)}else return x}function E(x){for(var A=!1,P=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},S=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===l&&S(x[O-2][1])&&x[O-1][0]===i&&P(x[O-1][1])&&x[O][0]===a&&P(x[O][1])&&(A=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!A)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function w(x,A,P){for(var S=A+P-1;S>=0&&S>=A-1;S--)if(S+1<x.length){var O=x[S],L=x[S+1];O[0]===L[1]&&x.splice(S,2,[O[0],O[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(a){var l=[];for(var u in a)l.push(u);return l}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?a:l,n.supported=a;function a(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=l;function l(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,a="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(a=!1));function u(h,p,d){this.fn=h,this.context=p,this.once=d||!1}function f(){this._events=new l,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],d,c;if(this._eventsCount===0)return p;for(c in d=this._events)i.call(d,c)&&p.push(a?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(d)):p},f.prototype.listeners=function(p,d){var c=a?a+p:p,v=this._events[c];if(d)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,m=v.length,_=new Array(m);y<m;y++)_[y]=v[y].fn;return _},f.prototype.emit=function(p,d,c,v,y,m){var _=a?a+p:p;if(!this._events[_])return!1;var b=this._events[_],E=arguments.length,w,x;if(b.fn){switch(b.once&&this.removeListener(p,b.fn,void 0,!0),E){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,c),!0;case 4:return b.fn.call(b.context,d,c,v),!0;case 5:return b.fn.call(b.context,d,c,v,y),!0;case 6:return b.fn.call(b.context,d,c,v,y,m),!0}for(x=1,w=new Array(E-1);x<E;x++)w[x-1]=arguments[x];b.fn.apply(b.context,w)}else{var A=b.length,P;for(x=0;x<A;x++)switch(b[x].once&&this.removeListener(p,b[x].fn,void 0,!0),E){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,d);break;case 3:b[x].fn.call(b[x].context,d,c);break;case 4:b[x].fn.call(b[x].context,d,c,v);break;default:if(!w)for(P=1,w=new Array(E-1);P<E;P++)w[P-1]=arguments[P];b[x].fn.apply(b[x].context,w)}}return!0},f.prototype.on=function(p,d,c){var v=new u(d,c||this),y=a?a+p:p;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(p,d,c){var v=new u(d,c||this,!0),y=a?a+p:p;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(p,d,c,v){var y=a?a+p:p;if(!this._events[y])return this;if(!d)return--this._eventsCount===0?this._events=new l:delete this._events[y],this;var m=this._events[y];if(m.fn)m.fn===d&&(!v||m.once)&&(!c||m.context===c)&&(--this._eventsCount===0?this._events=new l:delete this._events[y]);else{for(var _=0,b=[],E=m.length;_<E;_++)(m[_].fn!==d||v&&!m[_].once||c&&m[_].context!==c)&&b.push(m[_]);b.length?this._events[y]=b.length===1?b[0]:b:--this._eventsCount===0?this._events=new l:delete this._events[y]}return this},f.prototype.removeAllListeners=function(p){var d;return p?(d=a?a+p:p,this._events[d]&&(--this._eventsCount===0?this._events=new l:delete this._events[d])):(this._events=new l,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=a,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},l=function(){function st(ot,dt){var pt=[],ft=!0,Nt=!1,Lt=void 0;try{for(var Pt=ot[Symbol.iterator](),qe;!(ft=(qe=Pt.next()).done)&&(pt.push(qe.value),!(dt&&pt.length===dt));ft=!0);}catch(Be){Nt=!0,Lt=Be}finally{try{!ft&&Pt.return&&Pt.return()}finally{if(Nt)throw Lt}}return pt}return function(ot,dt){if(Array.isArray(ot))return ot;if(Symbol.iterator in Object(ot))return st(ot,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function st(ot,dt){for(var pt=0;pt<dt.length;pt++){var ft=dt[pt];ft.enumerable=ft.enumerable||!1,ft.configurable=!0,"value"in ft&&(ft.writable=!0),Object.defineProperty(ot,ft.key,ft)}}return function(ot,dt,pt){return dt&&st(ot.prototype,dt),pt&&st(ot,pt),ot}}(),f=i(3),h=M(f),p=i(2),d=M(p),c=i(0),v=M(c),y=i(5),m=M(y),_=i(10),b=M(_),E=i(9),w=M(E),x=i(36),A=i(37),P=i(13),S=M(P),O=i(26),L=i(38),R=i(39),I=i(40);function M(st){return st&&st.__esModule?st:{default:st}}function C(st,ot,dt){return ot in st?Object.defineProperty(st,ot,{value:dt,enumerable:!0,configurable:!0,writable:!0}):st[ot]=dt,st}function F(st,ot){if(!(st instanceof ot))throw new TypeError("Cannot call a class as a function")}function j(st,ot){if(!st)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ot&&(typeof ot=="object"||typeof ot=="function")?ot:st}function X(st,ot){if(typeof ot!="function"&&ot!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ot);st.prototype=Object.create(ot&&ot.prototype,{constructor:{value:st,enumerable:!1,writable:!0,configurable:!0}}),ot&&(Object.setPrototypeOf?Object.setPrototypeOf(st,ot):st.__proto__=ot)}var V=(0,b.default)("quill:clipboard"),it="__ql-matcher",Y=[[Node.TEXT_NODE,Wt],[Node.TEXT_NODE,xt],["br",ht],[Node.ELEMENT_NODE,xt],[Node.ELEMENT_NODE,nt],[Node.ELEMENT_NODE,It],[Node.ELEMENT_NODE,et],[Node.ELEMENT_NODE,ae],["li",mt],["b",tt.bind(tt,"bold")],["i",tt.bind(tt,"italic")],["style",gt]],U=[x.AlignAttribute,L.DirectionAttribute].reduce(function(st,ot){return st[ot.keyName]=ot,st},{}),N=[x.AlignStyle,A.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,I.SizeStyle].reduce(function(st,ot){return st[ot.keyName]=ot,st},{}),D=function(st){X(ot,st);function ot(dt,pt){F(this,ot);var ft=j(this,(ot.__proto__||Object.getPrototypeOf(ot)).call(this,dt,pt));return ft.quill.root.addEventListener("paste",ft.onPaste.bind(ft)),ft.container=ft.quill.addContainer("ql-clipboard"),ft.container.setAttribute("contenteditable",!0),ft.container.setAttribute("tabindex",-1),ft.matchers=[],Y.concat(ft.options.matchers).forEach(function(Nt){var Lt=l(Nt,2),Pt=Lt[0],qe=Lt[1];!pt.matchVisual&&qe===It||ft.addMatcher(Pt,qe)}),ft}return u(ot,[{key:"addMatcher",value:function(pt,ft){this.matchers.push([pt,ft])}},{key:"convert",value:function(pt){if(typeof pt=="string")return this.container.innerHTML=pt.replace(/\>\r?\n +\</g,"><"),this.convert();var ft=this.quill.getFormat(this.quill.selection.savedRange.index);if(ft[S.default.blotName]){var Nt=this.container.innerText;return this.container.innerHTML="",new d.default().insert(Nt,C({},S.default.blotName,ft[S.default.blotName]))}var Lt=this.prepareMatching(),Pt=l(Lt,2),qe=Pt[0],Be=Pt[1],Kt=z(this.container,qe,Be);return K(Kt,`
|
|
608
|
-
`)&&Kt.ops[Kt.ops.length-1].attributes==null&&(Kt=Kt.compose(new d.default().retain(Kt.length()-1).delete(1))),V.log("convert",this.container.innerHTML,Kt),this.container.innerHTML="",Kt}},{key:"dangerouslyPasteHTML",value:function(pt,ft){var Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:
|
|
601
|
+
`);return U.insert(q,N.attributes)}return U.push(N)},new h.default)}n.default=X},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var a=function(){function O(L,R){var I=[],M=!0,C=!1,F=void 0;try{for(var j=L[Symbol.iterator](),X;!(M=(X=j.next()).done)&&(I.push(X.value),!(R&&I.length===R));M=!0);}catch(V){C=!0,F=V}finally{try{!M&&j.return&&j.return()}finally{if(C)throw F}}return I}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(L,R){for(var I=0;I<R.length;I++){var M=R[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,R,I){return R&&O(L.prototype,R),I&&O(L,I),L}}(),u=i(0),f=m(u),h=i(21),p=m(h),d=i(11),c=m(d),v=i(8),y=m(v),_=i(10),b=m(_);function m(O){return O&&O.__esModule?O:{default:O}}function E(O){if(Array.isArray(O)){for(var L=0,R=Array(O.length);L<O.length;L++)R[L]=O[L];return R}else return Array.from(O)}function w(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,b.default)("quill:selection"),A=function O(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;w(this,O),this.index=L,this.length=R},P=function(){function O(L,R){var I=this;w(this,O),this.emitter=R,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new A(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){I.mouseDown||setTimeout(I.update.bind(I,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(M,C){M===y.default.events.TEXT_CHANGE&&C.length()>0&&I.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(I.hasFocus()){var M=I.getNativeRange();M!=null&&M.start.node!==I.cursor.textNode&&I.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{I.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(M,C){if(C.range){var F=C.range,j=F.startNode,X=F.startOffset,V=F.endNode,st=F.endOffset;I.setNativeRange(j,X,V,st)}}),this.update(y.default.sources.SILENT)}return l(O,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var I=R.cursor.restore();if(!I)return;setTimeout(function(){R.setNativeRange(I.startNode,I.startOffset,I.endNode,I.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,I){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||f.default.query(R,f.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var C=f.default.find(M.start.node,!1);if(C==null)return;if(C instanceof f.default.Leaf){var F=C.split(M.start.offset);C.parent.insertBefore(this.cursor,F)}else C.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(R,I),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();R=Math.min(R,M-1),I=Math.min(R+I,M-1)-R;var C=void 0,F=this.scroll.leaf(R),j=a(F,2),X=j[0],V=j[1];if(X==null)return null;var st=X.position(V,!0),Y=a(st,2);C=Y[0],V=Y[1];var U=document.createRange();if(I>0){U.setStart(C,V);var N=this.scroll.leaf(R+I),D=a(N,2);if(X=D[0],V=D[1],X==null)return null;var q=X.position(V,!0),Z=a(q,2);return C=Z[0],V=Z[1],U.setEnd(C,V),U.getBoundingClientRect()}else{var K="left",G=void 0;return C instanceof Text?(V<C.data.length?(U.setStart(C,V),U.setEnd(C,V+1)):(U.setStart(C,V-1),U.setEnd(C,V),K="right"),G=U.getBoundingClientRect()):(G=X.domNode.getBoundingClientRect(),V>0&&(K="right")),{bottom:G.top+G.height,height:G.height,left:G[K],right:G[K],top:G.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var I=R.getRangeAt(0);if(I==null)return null;var M=this.normalizeNative(I);return x.info("getNativeRange",M),M}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var I=this.normalizedToRange(R);return[I,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var I=this,M=[[R.start.node,R.start.offset]];R.native.collapsed||M.push([R.end.node,R.end.offset]);var C=M.map(function(X){var V=a(X,2),st=V[0],Y=V[1],U=f.default.find(st,!0),N=U.offset(I.scroll);return Y===0?N:U instanceof f.default.Container?N+U.length():N+U.index(st,Y)}),F=Math.min(Math.max.apply(Math,E(C)),this.scroll.length()-1),j=Math.min.apply(Math,[F].concat(E(C)));return new A(j,F-j)}},{key:"normalizeNative",value:function(R){if(!S(this.root,R.startContainer)||!R.collapsed&&!S(this.root,R.endContainer))return null;var I={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[I.start,I.end].forEach(function(M){for(var C=M.node,F=M.offset;!(C instanceof Text)&&C.childNodes.length>0;)if(C.childNodes.length>F)C=C.childNodes[F],F=0;else if(C.childNodes.length===F)C=C.lastChild,F=C instanceof Text?C.data.length:C.childNodes.length+1;else break;M.node=C,M.offset=F}),I}},{key:"rangeToNative",value:function(R){var I=this,M=R.collapsed?[R.index]:[R.index,R.index+R.length],C=[],F=this.scroll.length();return M.forEach(function(j,X){j=Math.min(F-1,j);var V=void 0,st=I.scroll.leaf(j),Y=a(st,2),U=Y[0],N=Y[1],D=U.position(N,X!==0),q=a(D,2);V=q[0],N=q[1],C.push(V,N)}),C.length<2&&(C=C.concat(C)),C}},{key:"scrollIntoView",value:function(R){var I=this.lastRange;if(I!=null){var M=this.getBounds(I.index,I.length);if(M!=null){var C=this.scroll.length()-1,F=this.scroll.line(Math.min(I.index,C)),j=a(F,1),X=j[0],V=X;if(I.length>0){var st=this.scroll.line(Math.min(I.index+I.length,C)),Y=a(st,1);V=Y[0]}if(!(X==null||V==null)){var U=R.getBoundingClientRect();M.top<U.top?R.scrollTop-=U.top-M.top:M.bottom>U.bottom&&(R.scrollTop+=M.bottom-U.bottom)}}}}},{key:"setNativeRange",value:function(R,I){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",R,I,M,C),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||M.parentNode==null))){var j=document.getSelection();if(j!=null)if(R!=null){this.hasFocus()||this.root.focus();var X=(this.getNativeRange()||{}).native;if(X==null||F||R!==X.startContainer||I!==X.startOffset||M!==X.endContainer||C!==X.endOffset){R.tagName=="BR"&&(I=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),M.tagName=="BR"&&(C=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var V=document.createRange();V.setStart(R,I),V.setEnd(M,C),j.removeAllRanges(),j.addRange(V)}}else j.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof I=="string"&&(M=I,I=!1),x.info("setRange",R),R!=null){var C=this.rangeToNative(R);this.setNativeRange.apply(this,E(C).concat([I]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,I=this.lastRange,M=this.getRange(),C=a(M,2),F=C[0],j=C[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(I,this.lastRange)){var X;!this.composing&&j!=null&&j.native.collapsed&&j.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[y.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(I),R];if((X=this.emitter).emit.apply(X,[y.default.events.EDITOR_CHANGE].concat(V)),R!==y.default.sources.SILENT){var st;(st=this.emitter).emit.apply(st,V)}}}}]),O}();function S(O,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),O.contains(L)}n.Range=A,n.default=P},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(_,b){for(var m=0;m<b.length;m++){var E=b[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),l=function y(_,b,m){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,b);if(E===void 0){var w=Object.getPrototypeOf(_);return w===null?void 0:y(w,b,m)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(m)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"insertInto",value:function(m,E){m.children.length===0?l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertInto",this).call(this,m,E):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),_}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){d(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(44),u=i(30),f=i(1),h=function(d){a(c,d);function c(v){var y=d.call(this,v)||this;return y.build(),y}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){d.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var _=p(y);v.insertBefore(_,v.children.head||void 0)}catch(b){if(b instanceof f.ParchmentError)return;throw b}})},c.prototype.deleteAt=function(v,y){if(v===0&&y===this.length())return this.remove();this.children.forEachAt(v,y,function(_,b,m){_.deleteAt(b,m)})},c.prototype.descendant=function(v,y){var _=this.children.find(y),b=_[0],m=_[1];return v.blotName==null&&v(b)||v.blotName!=null&&b instanceof v?[b,m]:b instanceof c?b.descendant(v,m):[null,-1]},c.prototype.descendants=function(v,y,_){y===void 0&&(y=0),_===void 0&&(_=Number.MAX_VALUE);var b=[],m=_;return this.children.forEachAt(y,_,function(E,w,x){(v.blotName==null&&v(E)||v.blotName!=null&&E instanceof v)&&b.push(E),E instanceof c&&(b=b.concat(E.descendants(v,w,m))),m-=x}),b},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),d.prototype.detach.call(this)},c.prototype.formatAt=function(v,y,_,b){this.children.forEachAt(v,y,function(m,E,w){m.formatAt(E,w,_,b)})},c.prototype.insertAt=function(v,y,_){var b=this.children.find(v),m=b[0],E=b[1];if(m)m.insertAt(E,y,_);else{var w=_==null?f.create("text",y):f.create(y,_);this.appendChild(w)}},c.prototype.insertBefore=function(v,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(_){return v instanceof _}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,y)},c.prototype.length=function(){return this.children.reduce(function(v,y){return v+y.length()},0)},c.prototype.moveChildren=function(v,y){this.children.forEach(function(_){v.insertBefore(_,y)})},c.prototype.optimize=function(v){if(d.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(v)}else this.remove()},c.prototype.path=function(v,y){y===void 0&&(y=!1);var _=this.children.find(v,y),b=_[0],m=_[1],E=[[this,v]];return b instanceof c?E.concat(b.path(m,y)):(b!=null&&E.push([b,m]),E)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),d.prototype.replace.call(this,v)},c.prototype.split=function(v,y){if(y===void 0&&(y=!1),!y){if(v===0)return this;if(v===this.length())return this.next}var _=this.clone();return this.parent.insertBefore(_,this.next),this.children.forEachAt(v,this.length(),function(b,m,E){b=b.split(m,y),_.appendChild(b)}),_},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,y){var _=this,b=[],m=[];v.forEach(function(E){E.target===_.domNode&&E.type==="childList"&&(b.push.apply(b,E.addedNodes),m.push.apply(m,E.removedNodes))}),m.forEach(function(E){if(!(E.parentNode!=null&&E.tagName!=="IFRAME"&&document.body.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var w=f.find(E);w!=null&&(w.domNode.parentNode==null||w.domNode.parentNode===_.domNode)&&w.detach()}}),b.filter(function(E){return E.parentNode==_.domNode}).sort(function(E,w){return E===w?0:E.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(E){var w=null;E.nextSibling!=null&&(w=f.find(E.nextSibling));var x=p(E);(x.next!=w||x.next==null)&&(x.parent!=null&&x.parent.removeChild(_),_.insertBefore(x,w||void 0))})},c}(u.default);function p(d){var c=f.find(d);if(c==null)try{c=f.create(d)}catch{c=f.create(f.Scope.INLINE),[].slice.call(d.childNodes).forEach(function(y){c.domNode.appendChild(y)}),d.parentNode&&d.parentNode.replaceChild(c.domNode,d),c.attach()}return c}n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){d(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12),u=i(31),f=i(17),h=i(1),p=function(d){a(c,d);function c(v){var y=d.call(this,v)||this;return y.attributes=new u.default(y.domNode),y}return c.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},c.prototype.format=function(v,y){var _=h.query(v);_ instanceof l.default?this.attributes.attribute(_,y):y&&_!=null&&(v!==this.statics.blotName||this.formats()[v]!==y)&&this.replaceWith(v,y)},c.prototype.formats=function(){var v=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(v[this.statics.blotName]=y),v},c.prototype.replaceWith=function(v,y){var _=d.prototype.replaceWith.call(this,v,y);return this.attributes.copy(_),_},c.prototype.update=function(v,y){var _=this;d.prototype.update.call(this,v,y),v.some(function(b){return b.target===_.domNode&&b.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,y){var _=d.prototype.wrap.call(this,v,y);return _ instanceof c&&_.statics.scope===this.statics.scope&&this.attributes.move(_),_},c}(f.default);n.default=p},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(30),u=i(1),f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.value=function(d){return!0},p.prototype.index=function(d,c){return this.domNode===d||this.domNode.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},p.prototype.position=function(d,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return d>0&&(v+=1),[this.parent.domNode,v]},p.prototype.value=function(){var d;return d={},d[this.statics.blotName]=this.statics.value(this.domNode)||!0,d},p.scope=u.Scope.INLINE_BLOT,p}(l.default);n.default=f},function(r,n,i){var a=i(11),l=i(3),u={attributes:{compose:function(h,p,d){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var c=l(!0,{},p);d||(c=Object.keys(c).reduce(function(y,_){return c[_]!=null&&(y[_]=c[_]),y},{}));for(var v in h)h[v]!==void 0&&p[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,p){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var d=Object.keys(h).concat(Object.keys(p)).reduce(function(c,v){return a(h[v],p[v])||(c[v]=p[v]===void 0?null:p[v]),c},{});return Object.keys(d).length>0?d:void 0},transform:function(h,p,d){if(typeof h!="object")return p;if(typeof p=="object"){if(!d)return p;var c=Object.keys(p).reduce(function(v,y){return h[y]===void 0&&(v[y]=p[y]),v},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var p=this.ops[this.index];if(p){var d=this.offset,c=u.length(p);if(h>=c-d?(h=c-d,this.index+=1,this.offset=0):this.offset+=h,typeof p.delete=="number")return{delete:h};var v={};return p.attributes&&(v.attributes=p.attributes),typeof p.retain=="number"?v.retain=h:typeof p.insert=="string"?v.insert=p.insert.substr(d,h):v.insert=p.insert,v}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,p=this.index,d=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=p,[d].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function a(_,b){return b!=null&&_ instanceof b}var l;try{l=Map}catch{l=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(_,b,m,E,w){typeof b=="object"&&(m=b.depth,E=b.prototype,w=b.includeNonEnumerable,b=b.circular);var x=[],A=[],P=typeof Buffer<"u";typeof b>"u"&&(b=!0),typeof m>"u"&&(m=1/0);function S(O,L){if(O===null)return null;if(L===0)return O;var R,I;if(typeof O!="object")return O;if(a(O,l))R=new l;else if(a(O,u))R=new u;else if(a(O,f))R=new f(function(U,N){O.then(function(D){U(S(D,L-1))},function(D){N(S(D,L-1))})});else if(h.__isArray(O))R=[];else if(h.__isRegExp(O))R=new RegExp(O.source,y(O)),O.lastIndex&&(R.lastIndex=O.lastIndex);else if(h.__isDate(O))R=new Date(O.getTime());else{if(P&&Buffer.isBuffer(O))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(O.length):R=new Buffer(O.length),O.copy(R),R;a(O,Error)?R=Object.create(O):typeof E>"u"?(I=Object.getPrototypeOf(O),R=Object.create(I)):(R=Object.create(E),I=E)}if(b){var M=x.indexOf(O);if(M!=-1)return A[M];x.push(O),A.push(R)}a(O,l)&&O.forEach(function(U,N){var D=S(N,L-1),q=S(U,L-1);R.set(D,q)}),a(O,u)&&O.forEach(function(U){var N=S(U,L-1);R.add(N)});for(var C in O){var F;I&&(F=Object.getOwnPropertyDescriptor(I,C)),!(F&&F.set==null)&&(R[C]=S(O[C],L-1))}if(Object.getOwnPropertySymbols)for(var j=Object.getOwnPropertySymbols(O),C=0;C<j.length;C++){var X=j[C],V=Object.getOwnPropertyDescriptor(O,X);V&&!V.enumerable&&!w||(R[X]=S(O[X],L-1),V.enumerable||Object.defineProperty(R,X,{enumerable:!1}))}if(w)for(var st=Object.getOwnPropertyNames(O),C=0;C<st.length;C++){var Y=st[C],V=Object.getOwnPropertyDescriptor(O,Y);V&&V.enumerable||(R[Y]=S(O[Y],L-1),Object.defineProperty(R,Y,{enumerable:!1}))}return R}return S(_,m)}h.clonePrototype=function(b){if(b===null)return null;var m=function(){};return m.prototype=b,new m};function p(_){return Object.prototype.toString.call(_)}h.__objToStr=p;function d(_){return typeof _=="object"&&p(_)==="[object Date]"}h.__isDate=d;function c(_){return typeof _=="object"&&p(_)==="[object Array]"}h.__isArray=c;function v(_){return typeof _=="object"&&p(_)==="[object RegExp]"}h.__isRegExp=v;function y(_){var b="";return _.global&&(b+="g"),_.ignoreCase&&(b+="i"),_.multiline&&(b+="m"),b}return h.__getRegExpFlags=y,h}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function R(I,M){var C=[],F=!0,j=!1,X=void 0;try{for(var V=I[Symbol.iterator](),st;!(F=(st=V.next()).done)&&(C.push(st.value),!(M&&C.length===M));F=!0);}catch(Y){j=!0,X=Y}finally{try{!F&&V.return&&V.return()}finally{if(j)throw X}}return C}return function(I,M){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return R(I,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function R(I,M){for(var C=0;C<M.length;C++){var F=M[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(I,F.key,F)}}return function(I,M,C){return M&&R(I.prototype,M),C&&R(I,C),I}}(),u=function R(I,M,C){I===null&&(I=Function.prototype);var F=Object.getOwnPropertyDescriptor(I,M);if(F===void 0){var j=Object.getPrototypeOf(I);return j===null?void 0:R(j,M,C)}else{if("value"in F)return F.value;var X=F.get;return X===void 0?void 0:X.call(C)}},f=i(0),h=x(f),p=i(8),d=x(p),c=i(4),v=x(c),y=i(16),_=x(y),b=i(13),m=x(b),E=i(25),w=x(E);function x(R){return R&&R.__esModule?R:{default:R}}function A(R,I){if(!(R instanceof I))throw new TypeError("Cannot call a class as a function")}function P(R,I){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:R}function S(R,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);R.prototype=Object.create(I&&I.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(R,I):R.__proto__=I)}function O(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){S(I,R);function I(M,C){A(this,I);var F=P(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,M));return F.emitter=C.emitter,Array.isArray(C.whitelist)&&(F.whitelist=C.whitelist.reduce(function(j,X){return j[X]=!0,j},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return l(I,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(C,F){var j=this.line(C),X=a(j,2),V=X[0],st=X[1],Y=this.line(C+F),U=a(Y,1),N=U[0];if(u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"deleteAt",this).call(this,C,F),N!=null&&V!==N&&st>0){if(V instanceof c.BlockEmbed||N instanceof c.BlockEmbed){this.optimize();return}if(V instanceof m.default){var D=V.newlineIndex(V.length(),!0);if(D>-1&&(V=V.split(D+1),V===N)){this.optimize();return}}else if(N instanceof m.default){var q=N.newlineIndex(0);q>-1&&N.split(q+1)}var Z=N.children.head instanceof _.default?null:N.children.head;V.moveChildren(N,Z),V.remove()}this.optimize()}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",C)}},{key:"formatAt",value:function(C,F,j,X){this.whitelist!=null&&!this.whitelist[j]||(u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"formatAt",this).call(this,C,F,j,X),this.optimize())}},{key:"insertAt",value:function(C,F,j){if(!(j!=null&&this.whitelist!=null&&!this.whitelist[F])){if(C>=this.length())if(j==null||h.default.query(F,h.default.Scope.BLOCK)==null){var X=h.default.create(this.statics.defaultChild);this.appendChild(X),j==null&&F.endsWith(`
|
|
602
|
+
`)&&(F=F.slice(0,-1)),X.insertAt(0,F,j)}else{var V=h.default.create(F,j);this.appendChild(V)}else u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"insertAt",this).call(this,C,F,j);this.optimize()}}},{key:"insertBefore",value:function(C,F){if(C.statics.scope===h.default.Scope.INLINE_BLOT){var j=h.default.create(this.statics.defaultChild);j.appendChild(C),C=j}u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"insertBefore",this).call(this,C,F)}},{key:"leaf",value:function(C){return this.path(C).pop()||[null,-1]}},{key:"line",value:function(C){return C===this.length()?this.line(C-1):this.descendant(O,C)}},{key:"lines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,j=function X(V,st,Y){var U=[],N=Y;return V.children.forEachAt(st,Y,function(D,q,Z){O(D)?U.push(D):D instanceof h.default.Container&&(U=U.concat(X(D,q,N))),N-=Z}),U};return j(this,C,F)}},{key:"optimize",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"optimize",this).call(this,C,F),C.length>0&&this.emitter.emit(d.default.events.SCROLL_OPTIMIZE,C,F))}},{key:"path",value:function(C){return u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"path",this).call(this,C).slice(1)}},{key:"update",value:function(C){if(this.batch!==!0){var F=d.default.sources.USER;typeof C=="string"&&(F=C),Array.isArray(C)||(C=this.observer.takeRecords()),C.length>0&&this.emitter.emit(d.default.events.SCROLL_BEFORE_UPDATE,F,C),u(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"update",this).call(this,C.concat([])),C.length>0&&this.emitter.emit(d.default.events.SCROLL_UPDATE,F,C)}}}]),I}(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[v.default,c.BlockEmbed,w.default],n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},l=function(){function G(z,tt){var et=[],nt=!0,ht=!1,vt=void 0;try{for(var mt=z[Symbol.iterator](),xt;!(nt=(xt=mt.next()).done)&&(et.push(xt.value),!(tt&&et.length===tt));nt=!0);}catch(Rt){ht=!0,vt=Rt}finally{try{!nt&&mt.return&&mt.return()}finally{if(ht)throw vt}}return et}return function(z,tt){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return G(z,tt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function G(z,tt){for(var et=0;et<tt.length;et++){var nt=tt[et];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(z,nt.key,nt)}}return function(z,tt,et){return tt&&G(z.prototype,tt),et&&G(z,et),z}}(),f=i(21),h=R(f),p=i(11),d=R(p),c=i(3),v=R(c),y=i(2),_=R(y),b=i(20),m=R(b),E=i(0),w=R(E),x=i(5),A=R(x),P=i(10),S=R(P),O=i(9),L=R(O);function R(G){return G&&G.__esModule?G:{default:G}}function I(G,z,tt){return z in G?Object.defineProperty(G,z,{value:tt,enumerable:!0,configurable:!0,writable:!0}):G[z]=tt,G}function M(G,z){if(!(G instanceof z))throw new TypeError("Cannot call a class as a function")}function C(G,z){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z&&(typeof z=="object"||typeof z=="function")?z:G}function F(G,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof z);G.prototype=Object.create(z&&z.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),z&&(Object.setPrototypeOf?Object.setPrototypeOf(G,z):G.__proto__=z)}var j=(0,S.default)("quill:keyboard"),X=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",V=function(G){F(z,G),u(z,null,[{key:"match",value:function(et,nt){return nt=K(nt),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ht){return!!nt[ht]!==et[ht]&&nt[ht]!==null})?!1:nt.key===(et.which||et.keyCode)}}]);function z(tt,et){M(this,z);var nt=C(this,(z.__proto__||Object.getPrototypeOf(z)).call(this,tt,et));return nt.bindings={},Object.keys(nt.options.bindings).forEach(function(ht){ht==="list autofill"&&tt.scroll.whitelist!=null&&!tt.scroll.whitelist.list||nt.options.bindings[ht]&&nt.addBinding(nt.options.bindings[ht])}),nt.addBinding({key:z.keys.ENTER,shiftKey:null},D),nt.addBinding({key:z.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(nt.addBinding({key:z.keys.BACKSPACE},{collapsed:!0},Y),nt.addBinding({key:z.keys.DELETE},{collapsed:!0},U)):(nt.addBinding({key:z.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Y),nt.addBinding({key:z.keys.DELETE},{collapsed:!0,suffix:/^.?$/},U)),nt.addBinding({key:z.keys.BACKSPACE},{collapsed:!1},N),nt.addBinding({key:z.keys.DELETE},{collapsed:!1},N),nt.addBinding({key:z.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Y),nt.listen(),nt}return u(z,[{key:"addBinding",value:function(et){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},vt=K(et);if(vt==null||vt.key==null)return j.warn("Attempted to add invalid keyboard binding",vt);typeof nt=="function"&&(nt={handler:nt}),typeof ht=="function"&&(ht={handler:ht}),vt=(0,v.default)(vt,nt,ht),this.bindings[vt.key]=this.bindings[vt.key]||[],this.bindings[vt.key].push(vt)}},{key:"listen",value:function(){var et=this;this.quill.root.addEventListener("keydown",function(nt){if(!nt.defaultPrevented){var ht=nt.which||nt.keyCode,vt=(et.bindings[ht]||[]).filter(function(le){return z.match(nt,le)});if(vt.length!==0){var mt=et.quill.getSelection();if(!(mt==null||!et.quill.hasFocus())){var xt=et.quill.getLine(mt.index),Rt=l(xt,2),ve=Rt[0],Wt=Rt[1],it=et.quill.getLeaf(mt.index),ot=l(it,2),dt=ot[0],pt=ot[1],ft=mt.length===0?[dt,pt]:et.quill.getLeaf(mt.index+mt.length),Nt=l(ft,2),Lt=Nt[0],Pt=Nt[1],je=dt instanceof w.default.Text?dt.value().slice(0,pt):"",Be=Lt instanceof w.default.Text?Lt.value().slice(Pt):"",Kt={collapsed:mt.length===0,empty:mt.length===0&&ve.length()<=1,format:et.quill.getFormat(mt),offset:Wt,prefix:je,suffix:Be},_s=vt.some(function(le){if(le.collapsed!=null&&le.collapsed!==Kt.collapsed||le.empty!=null&&le.empty!==Kt.empty||le.offset!=null&&le.offset!==Kt.offset)return!1;if(Array.isArray(le.format)){if(le.format.every(function(or){return Kt.format[or]==null}))return!1}else if(a(le.format)==="object"&&!Object.keys(le.format).every(function(or){return le.format[or]===!0?Kt.format[or]!=null:le.format[or]===!1?Kt.format[or]==null:(0,d.default)(le.format[or],Kt.format[or])}))return!1;return le.prefix!=null&&!le.prefix.test(Kt.prefix)||le.suffix!=null&&!le.suffix.test(Kt.suffix)?!1:le.handler.call(et,mt,Kt)!==!0});_s&&nt.preventDefault()}}}})}}]),z}(L.default);V.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},V.DEFAULTS={bindings:{bold:Z("bold"),italic:Z("italic"),underline:Z("underline"),indent:{key:V.keys.TAB,format:["blockquote","indent","list"],handler:function(z,tt){if(tt.collapsed&&tt.offset!==0)return!0;this.quill.format("indent","+1",A.default.sources.USER)}},outdent:{key:V.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(z,tt){if(tt.collapsed&&tt.offset!==0)return!0;this.quill.format("indent","-1",A.default.sources.USER)}},"outdent backspace":{key:V.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(z,tt){tt.format.indent!=null?this.quill.format("indent","-1",A.default.sources.USER):tt.format.list!=null&&this.quill.format("list",!1,A.default.sources.USER)}},"indent code-block":q(!0),"outdent code-block":q(!1),"remove tab":{key:V.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(z){this.quill.deleteText(z.index-1,1,A.default.sources.USER)}},tab:{key:V.keys.TAB,handler:function(z){this.quill.history.cutoff();var tt=new _.default().retain(z.index).delete(z.length).insert(" ");this.quill.updateContents(tt,A.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(z.index+1,A.default.sources.SILENT)}},"list empty enter":{key:V.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(z,tt){this.quill.format("list",!1,A.default.sources.USER),tt.format.indent&&this.quill.format("indent",!1,A.default.sources.USER)}},"checklist enter":{key:V.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(z){var tt=this.quill.getLine(z.index),et=l(tt,2),nt=et[0],ht=et[1],vt=(0,v.default)({},nt.formats(),{list:"checked"}),mt=new _.default().retain(z.index).insert(`
|
|
603
|
+
`,vt).retain(nt.length()-ht-1).retain(1,{list:"unchecked"});this.quill.updateContents(mt,A.default.sources.USER),this.quill.setSelection(z.index+1,A.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:V.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(z,tt){var et=this.quill.getLine(z.index),nt=l(et,2),ht=nt[0],vt=nt[1],mt=new _.default().retain(z.index).insert(`
|
|
604
|
+
`,tt.format).retain(ht.length()-vt-1).retain(1,{header:null});this.quill.updateContents(mt,A.default.sources.USER),this.quill.setSelection(z.index+1,A.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(z,tt){var et=tt.prefix.length,nt=this.quill.getLine(z.index),ht=l(nt,2),vt=ht[0],mt=ht[1];if(mt>et)return!0;var xt=void 0;switch(tt.prefix.trim()){case"[]":case"[ ]":xt="unchecked";break;case"[x]":xt="checked";break;case"-":case"*":xt="bullet";break;default:xt="ordered"}this.quill.insertText(z.index," ",A.default.sources.USER),this.quill.history.cutoff();var Rt=new _.default().retain(z.index-mt).delete(et+1).retain(vt.length()-2-mt).retain(1,{list:xt});this.quill.updateContents(Rt,A.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(z.index-et,A.default.sources.SILENT)}},"code exit":{key:V.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(z){var tt=this.quill.getLine(z.index),et=l(tt,2),nt=et[0],ht=et[1],vt=new _.default().retain(z.index+nt.length()-ht-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(vt,A.default.sources.USER)}},"embed left":st(V.keys.LEFT,!1),"embed left shift":st(V.keys.LEFT,!0),"embed right":st(V.keys.RIGHT,!1),"embed right shift":st(V.keys.RIGHT,!0)}};function st(G,z){var tt,et=G===V.keys.LEFT?"prefix":"suffix";return tt={key:G,shiftKey:z,altKey:null},I(tt,et,/^$/),I(tt,"handler",function(ht){var vt=ht.index;G===V.keys.RIGHT&&(vt+=ht.length+1);var mt=this.quill.getLeaf(vt),xt=l(mt,1),Rt=xt[0];return Rt instanceof w.default.Embed?(G===V.keys.LEFT?z?this.quill.setSelection(ht.index-1,ht.length+1,A.default.sources.USER):this.quill.setSelection(ht.index-1,A.default.sources.USER):z?this.quill.setSelection(ht.index,ht.length+1,A.default.sources.USER):this.quill.setSelection(ht.index+ht.length+1,A.default.sources.USER),!1):!0}),tt}function Y(G,z){if(!(G.index===0||this.quill.getLength()<=1)){var tt=this.quill.getLine(G.index),et=l(tt,1),nt=et[0],ht={};if(z.offset===0){var vt=this.quill.getLine(G.index-1),mt=l(vt,1),xt=mt[0];if(xt!=null&&xt.length()>1){var Rt=nt.formats(),ve=this.quill.getFormat(G.index-1,1);ht=m.default.attributes.diff(Rt,ve)||{}}}var Wt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(z.prefix)?2:1;this.quill.deleteText(G.index-Wt,Wt,A.default.sources.USER),Object.keys(ht).length>0&&this.quill.formatLine(G.index-Wt,Wt,ht,A.default.sources.USER),this.quill.focus()}}function U(G,z){var tt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(z.suffix)?2:1;if(!(G.index>=this.quill.getLength()-tt)){var et={},nt=0,ht=this.quill.getLine(G.index),vt=l(ht,1),mt=vt[0];if(z.offset>=mt.length()-1){var xt=this.quill.getLine(G.index+1),Rt=l(xt,1),ve=Rt[0];if(ve){var Wt=mt.formats(),it=this.quill.getFormat(G.index,1);et=m.default.attributes.diff(Wt,it)||{},nt=ve.length()}}this.quill.deleteText(G.index,tt,A.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine(G.index+nt-1,tt,et,A.default.sources.USER)}}function N(G){var z=this.quill.getLines(G),tt={};if(z.length>1){var et=z[0].formats(),nt=z[z.length-1].formats();tt=m.default.attributes.diff(nt,et)||{}}this.quill.deleteText(G,A.default.sources.USER),Object.keys(tt).length>0&&this.quill.formatLine(G.index,1,tt,A.default.sources.USER),this.quill.setSelection(G.index,A.default.sources.SILENT),this.quill.focus()}function D(G,z){var tt=this;G.length>0&&this.quill.scroll.deleteAt(G.index,G.length);var et=Object.keys(z.format).reduce(function(nt,ht){return w.default.query(ht,w.default.Scope.BLOCK)&&!Array.isArray(z.format[ht])&&(nt[ht]=z.format[ht]),nt},{});this.quill.insertText(G.index,`
|
|
605
|
+
`,et,A.default.sources.USER),this.quill.setSelection(G.index+1,A.default.sources.SILENT),this.quill.focus(),Object.keys(z.format).forEach(function(nt){et[nt]==null&&(Array.isArray(z.format[nt])||nt!=="link"&&tt.quill.format(nt,z.format[nt],A.default.sources.USER))})}function q(G){return{key:V.keys.TAB,shiftKey:!G,format:{"code-block":!0},handler:function(tt){var et=w.default.query("code-block"),nt=tt.index,ht=tt.length,vt=this.quill.scroll.descendant(et,nt),mt=l(vt,2),xt=mt[0],Rt=mt[1];if(xt!=null){var ve=this.quill.getIndex(xt),Wt=xt.newlineIndex(Rt,!0)+1,it=xt.newlineIndex(ve+Rt+ht),ot=xt.domNode.textContent.slice(Wt,it).split(`
|
|
606
|
+
`);Rt=0,ot.forEach(function(dt,pt){G?(xt.insertAt(Wt+Rt,et.TAB),Rt+=et.TAB.length,pt===0?nt+=et.TAB.length:ht+=et.TAB.length):dt.startsWith(et.TAB)&&(xt.deleteAt(Wt+Rt,et.TAB.length),Rt-=et.TAB.length,pt===0?nt-=et.TAB.length:ht-=et.TAB.length),Rt+=dt.length+1}),this.quill.update(A.default.sources.USER),this.quill.setSelection(nt,ht,A.default.sources.SILENT)}}}}function Z(G){return{key:G[0].toUpperCase(),shortKey:!0,handler:function(tt,et){this.quill.format(G,!et.format[G],A.default.sources.USER)}}}function K(G){if(typeof G=="string"||typeof G=="number")return K({key:G});if((typeof G>"u"?"undefined":a(G))==="object"&&(G=(0,h.default)(G,!1)),typeof G.key=="string")if(V.keys[G.key.toUpperCase()]!=null)G.key=V.keys[G.key.toUpperCase()];else if(G.key.length===1)G.key=G.key.toUpperCase().charCodeAt(0);else return null;return G.shortKey&&(G[X]=G.shortKey,delete G.shortKey),G}n.default=V,n.SHORTKEY=X},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function m(E,w){var x=[],A=!0,P=!1,S=void 0;try{for(var O=E[Symbol.iterator](),L;!(A=(L=O.next()).done)&&(x.push(L.value),!(w&&x.length===w));A=!0);}catch(R){P=!0,S=R}finally{try{!A&&O.return&&O.return()}finally{if(P)throw S}}return x}return function(E,w){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return m(E,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function m(E,w,x){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,w);if(A===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:m(P,w,x)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(x)}},u=function(){function m(E,w){for(var x=0;x<w.length;x++){var A=w[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,w,x){return w&&m(E.prototype,w),x&&m(E,x),E}}(),f=i(0),h=c(f),p=i(7),d=c(p);function c(m){return m&&m.__esModule?m:{default:m}}function v(m,E){if(!(m instanceof E))throw new TypeError("Cannot call a class as a function")}function y(m,E){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:m}function _(m,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);m.prototype=Object.create(E&&E.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(m,E):m.__proto__=E)}var b=function(m){_(E,m),u(E,null,[{key:"value",value:function(){}}]);function E(w,x){v(this,E);var A=y(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,w));return A.selection=x,A.textNode=document.createTextNode(E.CONTENTS),A.domNode.appendChild(A.textNode),A._length=0,A}return u(E,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,A){if(this._length!==0)return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,x,A);for(var P=this,S=0;P!=null&&P.statics.scope!==h.default.Scope.BLOCK_BLOT;)S+=P.offset(P.parent),P=P.parent;P!=null&&(this._length=E.CONTENTS.length,P.optimize(),P.formatAt(S,E.CONTENTS.length,x,A),this._length=0)}},{key:"index",value:function(x,A){return x===this.textNode?0:l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"index",this).call(this,x,A)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,A=this.selection.getNativeRange(),P=void 0,S=void 0,O=void 0;if(A!=null&&A.start.node===x&&A.end.node===x){var L=[x,A.start.offset,A.end.offset];P=L[0],S=L[1],O=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==E.CONTENTS){var R=this.textNode.data.split(E.CONTENTS).join("");this.next instanceof d.default?(P=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=E.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(E.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),S!=null){var I=[S,O].map(function(C){return Math.max(0,Math.min(P.data.length,C-1))}),M=a(I,2);return S=M[0],O=M[1],{startNode:P,startOffset:S,endNode:P,endOffset:O}}}}},{key:"update",value:function(x,A){var P=this;if(x.some(function(O){return O.type==="characterData"&&O.target===P.textNode})){var S=this.restore();S&&(A.range=S)}}},{key:"value",value:function(){return""}}]),E}(h.default.Embed);b.blotName="cursor",b.className="ql-cursor",b.tagName="span",b.CONTENTS="\uFEFF",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),l=h(a),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return _}(l.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var a=function(){function b(m,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,E,w){return E&&b(m.prototype,E),w&&b(m,w),m}}(),l=function b(m,E,w){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,E);if(x===void 0){var A=Object.getPrototypeOf(m);return A===null?void 0:b(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function p(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function d(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function c(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var v=function(b){c(m,b);function m(){return p(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"value",value:function(w){var x=l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,w);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(A){return("00"+parseInt(A).toString(16)).slice(-2)}).join("")):x}}]),m}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),_=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var a=function(){function _(b,m){for(var E=0;E<m.length;E++){var w=m[E];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,m,E){return m&&_(b.prototype,m),E&&_(b,E),b}}(),l=function _(b,m,E){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,m);if(w===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:_(x,m,E)}else{if("value"in w)return w.value;var A=w.get;return A===void 0?void 0:A.call(E)}},u=i(6),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function p(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function d(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return p(this,b),d(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"format",value:function(E,w){if(E!==this.statics.blotName||!w)return l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,E,w);w=this.constructor.sanitize(w),this.domNode.setAttribute("href",w)}}],[{key:"create",value:function(E){var w=l(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,E);return E=this.sanitize(E),w.setAttribute("href",E),w.setAttribute("rel","noopener noreferrer"),w.setAttribute("target","_blank"),w}},{key:"formats",value:function(E){return E.getAttribute("href")}},{key:"sanitize",value:function(E){return y(E,this.PROTOCOL_WHITELIST)?E:this.SANITIZED_URL}}]),b}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(_,b){var m=document.createElement("a");m.href=_;var E=m.href.slice(0,m.href.indexOf(":"));return b.indexOf(E)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},l=function(){function b(m,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,E,w){return E&&b(m.prototype,E),w&&b(m,w),m}}(),u=i(23),f=d(u),h=i(107),p=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function c(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}var v=0;function y(b,m){b.setAttribute(m,b.getAttribute(m)!=="true")}var _=function(){function b(m){var E=this;c(this,b),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){E.togglePicker()}),this.label.addEventListener("keydown",function(w){switch(w.keyCode){case f.default.keys.ENTER:E.togglePicker();break;case f.default.keys.ESCAPE:E.escape(),w.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return l(b,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(E){var w=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),E.hasAttribute("value")&&x.setAttribute("data-value",E.getAttribute("value")),E.textContent&&x.setAttribute("data-label",E.textContent),x.addEventListener("click",function(){w.selectItem(x,!0)}),x.addEventListener("keydown",function(A){switch(A.keyCode){case f.default.keys.ENTER:w.selectItem(x,!0),A.preventDefault();break;case f.default.keys.ESCAPE:w.escape(),A.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var E=document.createElement("span");return E.classList.add("ql-picker-label"),E.innerHTML=p.default,E.tabIndex="0",E.setAttribute("role","button"),E.setAttribute("aria-expanded","false"),this.container.appendChild(E),E}},{key:"buildOptions",value:function(){var E=this,w=document.createElement("span");w.classList.add("ql-picker-options"),w.setAttribute("aria-hidden","true"),w.tabIndex="-1",w.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",w.id),this.options=w,[].slice.call(this.select.options).forEach(function(x){var A=E.buildItem(x);w.appendChild(A),x.selected===!0&&E.selectItem(A)}),this.container.appendChild(w)}},{key:"buildPicker",value:function(){var E=this;[].slice.call(this.select.attributes).forEach(function(w){E.container.setAttribute(w.name,w.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var E=this;this.close(),setTimeout(function(){return E.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(E!==x&&(x!=null&&x.classList.remove("ql-selected"),E!=null&&(E.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(E.parentNode.children,E),E.hasAttribute("data-value")?this.label.setAttribute("data-value",E.getAttribute("data-value")):this.label.removeAttribute("data-value"),E.hasAttribute("data-label")?this.label.setAttribute("data-label",E.getAttribute("data-label")):this.label.removeAttribute("data-label"),w))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var A=document.createEvent("Event");A.initEvent("change",!0,!0),this.select.dispatchEvent(A)}this.close()}}},{key:"update",value:function(){var E=void 0;if(this.select.selectedIndex>-1){var w=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];E=this.select.options[this.select.selectedIndex],this.selectItem(w)}else this.selectItem(null);var x=E!=null&&E!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),b}();n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),l=j(a),u=i(5),f=j(u),h=i(4),p=j(h),d=i(16),c=j(d),v=i(25),y=j(v),_=i(24),b=j(_),m=i(35),E=j(m),w=i(6),x=j(w),A=i(22),P=j(A),S=i(7),O=j(S),L=i(55),R=j(L),I=i(42),M=j(I),C=i(23),F=j(C);function j(X){return X&&X.__esModule?X:{default:X}}f.default.register({"blots/block":p.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":b.default,"blots/embed":E.default,"blots/inline":x.default,"blots/scroll":P.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":M.default,"modules/keyboard":F.default}),l.default.register(p.default,c.default,b.default,x.default,P.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),l=function(){function u(f){this.domNode=f,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return a.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},u.prototype.deleteAt=function(f,h){var p=this.isolate(f,h);p.remove()},u.prototype.formatAt=function(f,h,p,d){var c=this.isolate(f,h);if(a.query(p,a.Scope.BLOT)!=null&&d)c.wrap(p,d);else if(a.query(p,a.Scope.ATTRIBUTE)!=null){var v=a.create(this.statics.scope);c.wrap(v),v.format(p,d)}},u.prototype.insertAt=function(f,h,p){var d=p==null?a.create("text",h):a.create(h,p),c=this.split(f);this.parent.insertBefore(d,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var p=null;f.children.insertBefore(this,h),h!=null&&(p=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=p)&&f.domNode.insertBefore(this.domNode,p),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var p=this.split(f);return p.split(h),p},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var p=typeof f=="string"?a.create(f,h):f;return p.replace(this),p},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var p=typeof f=="string"?a.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(p,this.next),p.appendChild(this),p},u.blotName="abstract",u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),l=i(32),u=i(33),f=i(1),h=function(){function p(d){this.attributes={},this.domNode=d,this.build()}return p.prototype.attribute=function(d,c){c?d.add(this.domNode,c)&&(d.value(this.domNode)!=null?this.attributes[d.attrName]=d:delete this.attributes[d.attrName]):(d.remove(this.domNode),delete this.attributes[d.attrName])},p.prototype.build=function(){var d=this;this.attributes={};var c=a.default.keys(this.domNode),v=l.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(_){var b=f.query(_,f.Scope.ATTRIBUTE);b instanceof a.default&&(d.attributes[b.attrName]=b)})},p.prototype.copy=function(d){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);d.format(v,y)})},p.prototype.move=function(d){var c=this;this.copy(d),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},p.prototype.values=function(){var d=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=d.attributes[v].value(d.domNode),c},{})},p}();n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h,p){var d=h.getAttribute("class")||"";return d.split(/\s+/).filter(function(c){return c.indexOf(p+"-")===0})}var f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(this.remove(d),d.classList.add(this.keyName+"-"+c),!0):!1},p.prototype.remove=function(d){var c=u(d,this.keyName);c.forEach(function(v){d.classList.remove(v)}),d.classList.length===0&&d.removeAttribute("class")},p.prototype.value=function(d){var c=u(d,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(d,v)?v:""},p}(l.default);n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h){var p=h.split("-"),d=p.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return p[0]+d}var f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(d.style[u(this.keyName)]=c,!0):!1},p.prototype.remove=function(d){d.style[u(this.keyName)]="",d.getAttribute("style")||d.removeAttribute("style")},p.prototype.value=function(d){var c=d.style[u(this.keyName)];return this.canAdd(d,c)?c:""},p}(l.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){l(this,f),this.quill=h,this.options=p,this.modules={}}return a(f,[{key:"init",value:function(){var p=this;Object.keys(this.options.modules).forEach(function(d){p.modules[d]==null&&p.addModule(d)})}},{key:"addModule",value:function(p){var d=this.quill.constructor.import("modules/"+p);return this.modules[p]=new d(this.quill,this.options.modules[p]||{}),this.modules[p]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function m(E,w){for(var x=0;x<w.length;x++){var A=w[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,w,x){return w&&m(E.prototype,w),x&&m(E,x),E}}(),l=function m(E,w,x){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,w);if(A===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:m(P,w,x)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(x)}},u=i(0),f=d(u),h=i(7),p=d(h);function d(m){return m&&m.__esModule?m:{default:m}}function c(m,E){if(!(m instanceof E))throw new TypeError("Cannot call a class as a function")}function v(m,E){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:m}function y(m,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);m.prototype=Object.create(E&&E.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(m,E):m.__proto__=E)}var _="\uFEFF",b=function(m){y(E,m);function E(w){c(this,E);var x=v(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,w));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(A){x.contentNode.appendChild(A)}),x.leftGuard=document.createTextNode(_),x.rightGuard=document.createTextNode(_),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return a(E,[{key:"index",value:function(x,A){return x===this.leftGuard?0:x===this.rightGuard?1:l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"index",this).call(this,x,A)}},{key:"restore",value:function(x){var A=void 0,P=void 0,S=x.data.split(_).join("");if(x===this.leftGuard)if(this.prev instanceof p.default){var O=this.prev.length();this.prev.insertAt(O,S),A={startNode:this.prev.domNode,startOffset:O+S.length}}else P=document.createTextNode(S),this.parent.insertBefore(f.default.create(P),this),A={startNode:P,startOffset:S.length};else x===this.rightGuard&&(this.next instanceof p.default?(this.next.insertAt(0,S),A={startNode:this.next.domNode,startOffset:S.length}):(P=document.createTextNode(S),this.parent.insertBefore(f.default.create(P),this.next),A={startNode:P,startOffset:S.length}));return x.data=_,A}},{key:"update",value:function(x,A){var P=this;x.forEach(function(S){if(S.type==="characterData"&&(S.target===P.leftGuard||S.target===P.rightGuard)){var O=P.restore(S.target);O&&(A.range=O)}})}}]),E}(f.default.Embed);n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var a=i(0),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new l.default.Attributor.Attribute("align","align",f),p=new l.default.Attributor.Class("align","ql-align",f),d=new l.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=p,n.AlignStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var a=i(0),l=f(a),u=i(26);function f(d){return d&&d.__esModule?d:{default:d}}var h=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),p=new u.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var a=i(0),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},h=new l.default.Attributor.Attribute("direction","dir",f),p=new l.default.Attributor.Class("direction","ql-direction",f),d=new l.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=p,n.DirectionStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var a=function(){function m(E,w){for(var x=0;x<w.length;x++){var A=w[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,w,x){return w&&m(E.prototype,w),x&&m(E,x),E}}(),l=function m(E,w,x){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,w);if(A===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:m(P,w,x)}else{if("value"in A)return A.value;var S=A.get;return S===void 0?void 0:S.call(x)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,E){if(!(m instanceof E))throw new TypeError("Cannot call a class as a function")}function d(m,E){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:m}function c(m,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);m.prototype=Object.create(E&&E.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(m,E):m.__proto__=E)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),_=function(m){c(E,m);function E(){return p(this,E),d(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return a(E,[{key:"value",value:function(x){return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),E}(f.default.Attributor.Style),b=new _("font","font-family",v);n.FontStyle=b,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var a=i(0),l=u(a);function u(p){return p&&p.__esModule?p:{default:p}}var f=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new l.default.Attributor.Style("size","font-size",{scope:l.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var a=function(){function w(x,A){for(var P=0;P<A.length;P++){var S=A[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(x,S.key,S)}}return function(x,A,P){return A&&w(x.prototype,A),P&&w(x,P),x}}(),l=i(0),u=c(l),f=i(5),h=c(f),p=i(9),d=c(p);function c(w){return w&&w.__esModule?w:{default:w}}function v(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function y(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function _(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var b=function(w){_(x,w);function x(A,P){v(this,x);var S=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,A,P));return S.lastRecorded=0,S.ignoreChange=!1,S.clear(),S.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,I){O!==h.default.events.TEXT_CHANGE||S.ignoreChange||(!S.options.userOnly||I===h.default.sources.USER?S.record(L,R):S.transform(L))}),S.quill.keyboard.addBinding({key:"Z",shortKey:!0},S.undo.bind(S)),S.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},S.redo.bind(S)),/Win/i.test(navigator.platform)&&S.quill.keyboard.addBinding({key:"Y",shortKey:!0},S.redo.bind(S)),S}return a(x,[{key:"change",value:function(P,S){if(this.stack[P].length!==0){var O=this.stack[P].pop();this.stack[S].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[P],h.default.sources.USER),this.ignoreChange=!1;var L=E(O[P]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(P,S){if(P.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(S),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),P=R.redo.compose(P)}else this.lastRecorded=L;this.stack.undo.push({redo:P,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(P){this.stack.undo.forEach(function(S){S.undo=P.transform(S.undo,!0),S.redo=P.transform(S.redo,!0)}),this.stack.redo.forEach(function(S){S.undo=P.transform(S.undo,!0),S.redo=P.transform(S.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(d.default);b.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(w){var x=w.ops[w.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
|
|
607
|
+
`):x.attributes!=null?Object.keys(x.attributes).some(function(A){return u.default.query(A,u.default.Scope.BLOCK)!=null}):!1}function E(w){var x=w.reduce(function(P,S){return P+=S.delete||0,P},0),A=w.length()-x;return m(w)&&(A-=1),A}n.default=b,n.getLastChangeIndex=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var a=function(){function D(q,Z){for(var K=0;K<Z.length;K++){var G=Z[K];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(q,G.key,G)}}return function(q,Z,K){return Z&&D(q.prototype,Z),K&&D(q,K),q}}(),l=function D(q,Z,K){q===null&&(q=Function.prototype);var G=Object.getOwnPropertyDescriptor(q,Z);if(G===void 0){var z=Object.getPrototypeOf(q);return z===null?void 0:D(z,Z,K)}else{if("value"in G)return G.value;var tt=G.get;return tt===void 0?void 0:tt.call(K)}},u=i(3),f=L(u),h=i(2),p=L(h),d=i(8),c=L(d),v=i(23),y=L(v),_=i(34),b=L(_),m=i(59),E=L(m),w=i(60),x=L(w),A=i(28),P=L(A),S=i(61),O=L(S);function L(D){return D&&D.__esModule?D:{default:D}}function R(D,q){if(!(D instanceof q))throw new TypeError("Cannot call a class as a function")}function I(D,q){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:D}function M(D,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);D.prototype=Object.create(q&&q.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(D,q):D.__proto__=q)}var C=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],j=[!1,"serif","monospace"],X=["1","2","3",!1],V=["small",!1,"large","huge"],st=function(D){M(q,D);function q(Z,K){R(this,q);var G=I(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,Z,K)),z=function tt(et){if(!document.body.contains(Z.root))return document.body.removeEventListener("click",tt);G.tooltip!=null&&!G.tooltip.root.contains(et.target)&&document.activeElement!==G.tooltip.textbox&&!G.quill.hasFocus()&&G.tooltip.hide(),G.pickers!=null&&G.pickers.forEach(function(nt){nt.container.contains(et.target)||nt.close()})};return Z.emitter.listenDOM("click",document.body,z),G}return a(q,[{key:"addModule",value:function(K){var G=l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"addModule",this).call(this,K);return K==="toolbar"&&this.extendToolbar(G),G}},{key:"buildButtons",value:function(K,G){K.forEach(function(z){var tt=z.getAttribute("class")||"";tt.split(/\s+/).forEach(function(et){if(et.startsWith("ql-")&&(et=et.slice(3),G[et]!=null))if(et==="direction")z.innerHTML=G[et][""]+G[et].rtl;else if(typeof G[et]=="string")z.innerHTML=G[et];else{var nt=z.value||"";nt!=null&&G[et][nt]&&(z.innerHTML=G[et][nt])}})})}},{key:"buildPickers",value:function(K,G){var z=this;this.pickers=K.map(function(et){if(et.classList.contains("ql-align"))return et.querySelector("option")==null&&N(et,C),new x.default(et,G.align);if(et.classList.contains("ql-background")||et.classList.contains("ql-color")){var nt=et.classList.contains("ql-background")?"background":"color";return et.querySelector("option")==null&&N(et,F,nt==="background"?"#ffffff":"#000000"),new E.default(et,G[nt])}else return et.querySelector("option")==null&&(et.classList.contains("ql-font")?N(et,j):et.classList.contains("ql-header")?N(et,X):et.classList.contains("ql-size")&&N(et,V)),new P.default(et)});var tt=function(){z.pickers.forEach(function(nt){nt.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,tt)}}]),q}(b.default);st.DEFAULTS=(0,f.default)(!0,{},b.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var q=this,Z=this.container.querySelector("input.ql-image[type=file]");Z==null&&(Z=document.createElement("input"),Z.setAttribute("type","file"),Z.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Z.classList.add("ql-image"),Z.addEventListener("change",function(){if(Z.files!=null&&Z.files[0]!=null){var K=new FileReader;K.onload=function(G){var z=q.quill.getSelection(!0);q.quill.updateContents(new p.default().retain(z.index).delete(z.length).insert({image:G.target.result}),c.default.sources.USER),q.quill.setSelection(z.index+1,c.default.sources.SILENT),Z.value=""},K.readAsDataURL(Z.files[0])}}),this.container.appendChild(Z)),Z.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Y=function(D){M(q,D);function q(Z,K){R(this,q);var G=I(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,Z,K));return G.textbox=G.root.querySelector('input[type="text"]'),G.listen(),G}return a(q,[{key:"listen",value:function(){var K=this;this.textbox.addEventListener("keydown",function(G){y.default.match(G,"enter")?(K.save(),G.preventDefault()):y.default.match(G,"escape")&&(K.cancel(),G.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),G!=null?this.textbox.value=G:K!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+K)||""),this.root.setAttribute("data-mode",K)}},{key:"restoreFocus",value:function(){var K=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=K}},{key:"save",value:function(){var K=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var G=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",K,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",K,c.default.sources.USER)),this.quill.root.scrollTop=G;break}case"video":K=U(K);case"formula":{if(!K)break;var z=this.quill.getSelection(!0);if(z!=null){var tt=z.index+z.length;this.quill.insertEmbed(tt,this.root.getAttribute("data-mode"),K,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(tt+1," ",c.default.sources.USER),this.quill.setSelection(tt+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),q}(O.default);function U(D){var q=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return q?(q[1]||"https")+"://www.youtube.com/embed/"+q[2]+"?showinfo=0":(q=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(q[1]||"https")+"://player.vimeo.com/video/"+q[2]+"/":D}function N(D,q){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;q.forEach(function(K){var G=document.createElement("option");K===Z?G.setAttribute("selected","selected"):G.setAttribute("value",K),D.appendChild(G)})}n.BaseTooltip=Y,n.default=st},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function l(){this.head=this.tail=null,this.length=0}return l.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},l.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},l.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},l.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},l.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},l.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},l.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,p=this.iterator();h=p();){var d=h.length();if(u<d||f&&u===d&&(h.next==null||h.next.length()!==0))return[h,u];u-=d}return[null,0]},l.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},l.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var p=this.find(u),d=p[0],c=p[1],v,y=u-c,_=this.iterator(d);(v=_())&&y<u+f;){var b=v.length();u>y?h(v,u-y,Math.min(f,y+b-u)):h(v,0,Math.min(b,u+f-y)),y+=b}},l.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},l.prototype.reduce=function(u,f){for(var h,p=this.iterator();h=p();)f=u(f,h);return f},l}();n.default=a},function(r,n,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){d(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,p=function(d){a(c,d);function c(v){var y=d.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(_){y.update(_)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){d.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(_){_.remove()}):d.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,_,b){this.update(),d.prototype.formatAt.call(this,v,y,_,b)},c.prototype.insertAt=function(v,y,_){this.update(),d.prototype.insertAt.call(this,v,y,_)},c.prototype.optimize=function(v,y){var _=this;v===void 0&&(v=[]),y===void 0&&(y={}),d.prototype.optimize.call(this,y);for(var b=[].slice.call(this.observer.takeRecords());b.length>0;)v.push(b.pop());for(var m=function(A,P){P===void 0&&(P=!0),!(A==null||A===_)&&A.domNode.parentNode!=null&&(A.domNode[u.DATA_KEY].mutations==null&&(A.domNode[u.DATA_KEY].mutations=[]),P&&m(A.parent))},E=function(A){A.domNode[u.DATA_KEY]==null||A.domNode[u.DATA_KEY].mutations==null||(A instanceof l.default&&A.children.forEach(E),A.optimize(y))},w=v,x=0;w.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(w.forEach(function(A){var P=u.find(A.target,!0);P!=null&&(P.domNode===A.target&&(A.type==="childList"?(m(u.find(A.previousSibling,!1)),[].forEach.call(A.addedNodes,function(S){var O=u.find(S,!1);m(O,!1),O instanceof l.default&&O.children.forEach(function(L){m(L,!1)})})):A.type==="attributes"&&m(P.prev)),m(P))}),this.children.forEach(E),w=[].slice.call(this.observer.takeRecords()),b=w.slice();b.length>0;)v.push(b.pop())}},c.prototype.update=function(v,y){var _=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(b){var m=u.find(b.target,!0);return m==null?null:m.domNode[u.DATA_KEY].mutations==null?(m.domNode[u.DATA_KEY].mutations=[b],m):(m.domNode[u.DATA_KEY].mutations.push(b),null)}).forEach(function(b){b==null||b===_||b.domNode[u.DATA_KEY]==null||b.update(b.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&d.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(l.default);n.default=p},function(r,n,i){var a=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var v in c)c.hasOwnProperty(v)&&(d[v]=c[v])};return function(d,c){p(d,c);function v(){this.constructor=d}d.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1);function f(p,d){if(Object.keys(p).length!==Object.keys(d).length)return!1;for(var c in p)if(p[c]!==d[c])return!1;return!0}var h=function(p){a(d,p);function d(){return p!==null&&p.apply(this,arguments)||this}return d.formats=function(c){if(c.tagName!==d.tagName)return p.formats.call(this,c)},d.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(_){_ instanceof l.default||(_=_.wrap(d.blotName,!0)),y.attributes.copy(_)}),this.unwrap()):p.prototype.format.call(this,c,v)},d.prototype.formatAt=function(c,v,y,_){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var b=this.isolate(c,v);b.format(y,_)}else p.prototype.formatAt.call(this,c,v,y,_)},d.prototype.optimize=function(c){p.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof d&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},d.blotName="inline",d.scope=u.Scope.INLINE_BLOT,d.tagName="SPAN",d}(l.default);n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1),f=function(h){a(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.formats=function(d){var c=u.query(p.blotName).tagName;if(d.tagName!==c)return h.formats.call(this,d)},p.prototype.format=function(d,c){u.query(d,u.Scope.BLOCK)!=null&&(d===this.statics.blotName&&!c?this.replaceWith(p.blotName):h.prototype.format.call(this,d,c))},p.prototype.formatAt=function(d,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,d,c,v,y)},p.prototype.insertAt=function(d,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,d,c,v);else{var y=this.split(d),_=u.create(c,v);y.parent.insertBefore(_,y)}},p.prototype.update=function(d,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,d,c)},p.blotName="block",p.scope=u.Scope.BLOCK_BLOT,p.tagName="P",p}(l.default);n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var d in p)p.hasOwnProperty(d)&&(h[d]=p[d])};return function(h,p){f(h,p);function d(){this.constructor=h}h.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=function(f){a(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(p){},h.prototype.format=function(p,d){f.prototype.formatAt.call(this,0,this.length(),p,d)},h.prototype.formatAt=function(p,d,c,v){p===0&&d===this.length()?this.format(c,v):f.prototype.formatAt.call(this,p,d,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(l.default);n.default=u},function(r,n,i){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=i(1),f=function(h){a(p,h);function p(d){var c=h.call(this,d)||this;return c.text=c.statics.value(c.domNode),c}return p.create=function(d){return document.createTextNode(d)},p.value=function(d){var c=d.data;return c.normalize&&(c=c.normalize()),c},p.prototype.deleteAt=function(d,c){this.domNode.data=this.text=this.text.slice(0,d)+this.text.slice(d+c)},p.prototype.index=function(d,c){return this.domNode===d?c:-1},p.prototype.insertAt=function(d,c,v){v==null?(this.text=this.text.slice(0,d)+c+this.text.slice(d),this.domNode.data=this.text):h.prototype.insertAt.call(this,d,c,v)},p.prototype.length=function(){return this.text.length},p.prototype.optimize=function(d){h.prototype.optimize.call(this,d),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof p&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},p.prototype.position=function(d,c){return[this.domNode,d]},p.prototype.split=function(d,c){if(c===void 0&&(c=!1),!c){if(d===0)return this;if(d===this.length())return this.next}var v=u.create(this.domNode.splitText(d));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},p.prototype.update=function(d,c){var v=this;d.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},p.prototype.value=function(){return this.text},p.blotName="text",p.scope=u.Scope.INLINE_BLOT,p}(l.default);n.default=f},function(r,n,i){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:l.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var p=h.indexOf(u,f);return p!==-1&&p===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),p=h.length>>>0,d=arguments[1],c,v=0;v<p;v++)if(c=h[v],f.call(d,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,a=1,l=0;function u(x,A,P){if(x==A)return x?[[l,x]]:[];(P<0||x.length<P)&&(P=null);var S=d(x,A),O=x.substring(0,S);x=x.substring(S),A=A.substring(S),S=c(x,A);var L=x.substring(x.length-S);x=x.substring(0,x.length-S),A=A.substring(0,A.length-S);var R=f(x,A);return O&&R.unshift([l,O]),L&&R.push([l,L]),y(R),P!=null&&(R=m(R,P)),R=E(R),R}function f(x,A){var P;if(!x)return[[a,A]];if(!A)return[[i,x]];var S=x.length>A.length?x:A,O=x.length>A.length?A:x,L=S.indexOf(O);if(L!=-1)return P=[[a,S.substring(0,L)],[l,O],[a,S.substring(L+O.length)]],x.length>A.length&&(P[0][0]=P[2][0]=i),P;if(O.length==1)return[[i,x],[a,A]];var R=v(x,A);if(R){var I=R[0],M=R[1],C=R[2],F=R[3],j=R[4],X=u(I,C),V=u(M,F);return X.concat([[l,j]],V)}return h(x,A)}function h(x,A){for(var P=x.length,S=A.length,O=Math.ceil((P+S)/2),L=O,R=2*O,I=new Array(R),M=new Array(R),C=0;C<R;C++)I[C]=-1,M[C]=-1;I[L+1]=0,M[L+1]=0;for(var F=P-S,j=F%2!=0,X=0,V=0,st=0,Y=0,U=0;U<O;U++){for(var N=-U+X;N<=U-V;N+=2){var D=L+N,q;N==-U||N!=U&&I[D-1]<I[D+1]?q=I[D+1]:q=I[D-1]+1;for(var Z=q-N;q<P&&Z<S&&x.charAt(q)==A.charAt(Z);)q++,Z++;if(I[D]=q,q>P)V+=2;else if(Z>S)X+=2;else if(j){var K=L+F-N;if(K>=0&&K<R&&M[K]!=-1){var G=P-M[K];if(q>=G)return p(x,A,q,Z)}}}for(var z=-U+st;z<=U-Y;z+=2){var K=L+z,G;z==-U||z!=U&&M[K-1]<M[K+1]?G=M[K+1]:G=M[K-1]+1;for(var tt=G-z;G<P&&tt<S&&x.charAt(P-G-1)==A.charAt(S-tt-1);)G++,tt++;if(M[K]=G,G>P)Y+=2;else if(tt>S)st+=2;else if(!j){var D=L+F-z;if(D>=0&&D<R&&I[D]!=-1){var q=I[D],Z=L+q-D;if(G=P-G,q>=G)return p(x,A,q,Z)}}}}return[[i,x],[a,A]]}function p(x,A,P,S){var O=x.substring(0,P),L=A.substring(0,S),R=x.substring(P),I=A.substring(S),M=u(O,L),C=u(R,I);return M.concat(C)}function d(x,A){if(!x||!A||x.charAt(0)!=A.charAt(0))return 0;for(var P=0,S=Math.min(x.length,A.length),O=S,L=0;P<O;)x.substring(L,O)==A.substring(L,O)?(P=O,L=P):S=O,O=Math.floor((S-P)/2+P);return O}function c(x,A){if(!x||!A||x.charAt(x.length-1)!=A.charAt(A.length-1))return 0;for(var P=0,S=Math.min(x.length,A.length),O=S,L=0;P<O;)x.substring(x.length-O,x.length-L)==A.substring(A.length-O,A.length-L)?(P=O,L=P):S=O,O=Math.floor((S-P)/2+P);return O}function v(x,A){var P=x.length>A.length?x:A,S=x.length>A.length?A:x;if(P.length<4||S.length*2<P.length)return null;function O(V,st,Y){for(var U=V.substring(Y,Y+Math.floor(V.length/4)),N=-1,D="",q,Z,K,G;(N=st.indexOf(U,N+1))!=-1;){var z=d(V.substring(Y),st.substring(N)),tt=c(V.substring(0,Y),st.substring(0,N));D.length<tt+z&&(D=st.substring(N-tt,N)+st.substring(N,N+z),q=V.substring(0,Y-tt),Z=V.substring(Y+z),K=st.substring(0,N-tt),G=st.substring(N+z))}return D.length*2>=V.length?[q,Z,K,G,D]:null}var L=O(P,S,Math.ceil(P.length/4)),R=O(P,S,Math.ceil(P.length/2)),I;if(!L&&!R)return null;R?L?I=L[4].length>R[4].length?L:R:I=R:I=L;var M,C,F,j;x.length>A.length?(M=I[0],C=I[1],F=I[2],j=I[3]):(F=I[0],j=I[1],M=I[2],C=I[3]);var X=I[4];return[M,C,F,j,X]}function y(x){x.push([l,""]);for(var A=0,P=0,S=0,O="",L="",R;A<x.length;)switch(x[A][0]){case a:S++,L+=x[A][1],A++;break;case i:P++,O+=x[A][1],A++;break;case l:P+S>1?(P!==0&&S!==0&&(R=d(L,O),R!==0&&(A-P-S>0&&x[A-P-S-1][0]==l?x[A-P-S-1][1]+=L.substring(0,R):(x.splice(0,0,[l,L.substring(0,R)]),A++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[A][1]=L.substring(L.length-R)+x[A][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),P===0?x.splice(A-S,P+S,[a,L]):S===0?x.splice(A-P,P+S,[i,O]):x.splice(A-P-S,P+S,[i,O],[a,L]),A=A-P-S+(P?1:0)+(S?1:0)+1):A!==0&&x[A-1][0]==l?(x[A-1][1]+=x[A][1],x.splice(A,1)):A++,S=0,P=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var I=!1;for(A=1;A<x.length-1;)x[A-1][0]==l&&x[A+1][0]==l&&(x[A][1].substring(x[A][1].length-x[A-1][1].length)==x[A-1][1]?(x[A][1]=x[A-1][1]+x[A][1].substring(0,x[A][1].length-x[A-1][1].length),x[A+1][1]=x[A-1][1]+x[A+1][1],x.splice(A-1,1),I=!0):x[A][1].substring(0,x[A+1][1].length)==x[A+1][1]&&(x[A-1][1]+=x[A+1][1],x[A][1]=x[A][1].substring(x[A+1][1].length)+x[A+1][1],x.splice(A+1,1),I=!0)),A++;I&&y(x)}var _=u;_.INSERT=a,_.DELETE=i,_.EQUAL=l,r.exports=_;function b(x,A){if(A===0)return[l,x];for(var P=0,S=0;S<x.length;S++){var O=x[S];if(O[0]===i||O[0]===l){var L=P+O[1].length;if(A===L)return[S+1,x];if(A<L){x=x.slice();var R=A-P,I=[O[0],O[1].slice(0,R)],M=[O[0],O[1].slice(R)];return x.splice(S,1,I,M),[S+1,x]}else P=L}}throw new Error("cursor_pos is out of bounds!")}function m(x,A){var P=b(x,A),S=P[1],O=P[0],L=S[O],R=S[O+1];if(L==null)return x;if(L[0]!==l)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return S.splice(O,2,R,L),w(S,O,2);if(R!=null&&R[1].indexOf(L[1])===0){S.splice(O,2,[R[0],L[1]],[0,L[1]]);var I=R[1].slice(L[1].length);return I.length>0&&S.splice(O+2,0,[R[0],I]),w(S,O,3)}else return x}function E(x){for(var A=!1,P=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},S=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===l&&S(x[O-2][1])&&x[O-1][0]===i&&P(x[O-1][1])&&x[O][0]===a&&P(x[O][1])&&(A=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!A)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function w(x,A,P){for(var S=A+P-1;S>=0&&S>=A-1;S--)if(S+1<x.length){var O=x[S],L=x[S+1];O[0]===L[1]&&x.splice(S,2,[O[0],O[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(a){var l=[];for(var u in a)l.push(u);return l}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?a:l,n.supported=a;function a(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=l;function l(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,a="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(a=!1));function u(h,p,d){this.fn=h,this.context=p,this.once=d||!1}function f(){this._events=new l,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],d,c;if(this._eventsCount===0)return p;for(c in d=this._events)i.call(d,c)&&p.push(a?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(d)):p},f.prototype.listeners=function(p,d){var c=a?a+p:p,v=this._events[c];if(d)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,_=v.length,b=new Array(_);y<_;y++)b[y]=v[y].fn;return b},f.prototype.emit=function(p,d,c,v,y,_){var b=a?a+p:p;if(!this._events[b])return!1;var m=this._events[b],E=arguments.length,w,x;if(m.fn){switch(m.once&&this.removeListener(p,m.fn,void 0,!0),E){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,c),!0;case 4:return m.fn.call(m.context,d,c,v),!0;case 5:return m.fn.call(m.context,d,c,v,y),!0;case 6:return m.fn.call(m.context,d,c,v,y,_),!0}for(x=1,w=new Array(E-1);x<E;x++)w[x-1]=arguments[x];m.fn.apply(m.context,w)}else{var A=m.length,P;for(x=0;x<A;x++)switch(m[x].once&&this.removeListener(p,m[x].fn,void 0,!0),E){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,d);break;case 3:m[x].fn.call(m[x].context,d,c);break;case 4:m[x].fn.call(m[x].context,d,c,v);break;default:if(!w)for(P=1,w=new Array(E-1);P<E;P++)w[P-1]=arguments[P];m[x].fn.apply(m[x].context,w)}}return!0},f.prototype.on=function(p,d,c){var v=new u(d,c||this),y=a?a+p:p;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(p,d,c){var v=new u(d,c||this,!0),y=a?a+p:p;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(p,d,c,v){var y=a?a+p:p;if(!this._events[y])return this;if(!d)return--this._eventsCount===0?this._events=new l:delete this._events[y],this;var _=this._events[y];if(_.fn)_.fn===d&&(!v||_.once)&&(!c||_.context===c)&&(--this._eventsCount===0?this._events=new l:delete this._events[y]);else{for(var b=0,m=[],E=_.length;b<E;b++)(_[b].fn!==d||v&&!_[b].once||c&&_[b].context!==c)&&m.push(_[b]);m.length?this._events[y]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new l:delete this._events[y]}return this},f.prototype.removeAllListeners=function(p){var d;return p?(d=a?a+p:p,this._events[d]&&(--this._eventsCount===0?this._events=new l:delete this._events[d])):(this._events=new l,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=a,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},l=function(){function it(ot,dt){var pt=[],ft=!0,Nt=!1,Lt=void 0;try{for(var Pt=ot[Symbol.iterator](),je;!(ft=(je=Pt.next()).done)&&(pt.push(je.value),!(dt&&pt.length===dt));ft=!0);}catch(Be){Nt=!0,Lt=Be}finally{try{!ft&&Pt.return&&Pt.return()}finally{if(Nt)throw Lt}}return pt}return function(ot,dt){if(Array.isArray(ot))return ot;if(Symbol.iterator in Object(ot))return it(ot,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function it(ot,dt){for(var pt=0;pt<dt.length;pt++){var ft=dt[pt];ft.enumerable=ft.enumerable||!1,ft.configurable=!0,"value"in ft&&(ft.writable=!0),Object.defineProperty(ot,ft.key,ft)}}return function(ot,dt,pt){return dt&&it(ot.prototype,dt),pt&&it(ot,pt),ot}}(),f=i(3),h=M(f),p=i(2),d=M(p),c=i(0),v=M(c),y=i(5),_=M(y),b=i(10),m=M(b),E=i(9),w=M(E),x=i(36),A=i(37),P=i(13),S=M(P),O=i(26),L=i(38),R=i(39),I=i(40);function M(it){return it&&it.__esModule?it:{default:it}}function C(it,ot,dt){return ot in it?Object.defineProperty(it,ot,{value:dt,enumerable:!0,configurable:!0,writable:!0}):it[ot]=dt,it}function F(it,ot){if(!(it instanceof ot))throw new TypeError("Cannot call a class as a function")}function j(it,ot){if(!it)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ot&&(typeof ot=="object"||typeof ot=="function")?ot:it}function X(it,ot){if(typeof ot!="function"&&ot!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ot);it.prototype=Object.create(ot&&ot.prototype,{constructor:{value:it,enumerable:!1,writable:!0,configurable:!0}}),ot&&(Object.setPrototypeOf?Object.setPrototypeOf(it,ot):it.__proto__=ot)}var V=(0,m.default)("quill:clipboard"),st="__ql-matcher",Y=[[Node.TEXT_NODE,Wt],[Node.TEXT_NODE,xt],["br",ht],[Node.ELEMENT_NODE,xt],[Node.ELEMENT_NODE,nt],[Node.ELEMENT_NODE,Rt],[Node.ELEMENT_NODE,et],[Node.ELEMENT_NODE,ve],["li",mt],["b",tt.bind(tt,"bold")],["i",tt.bind(tt,"italic")],["style",vt]],U=[x.AlignAttribute,L.DirectionAttribute].reduce(function(it,ot){return it[ot.keyName]=ot,it},{}),N=[x.AlignStyle,A.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,I.SizeStyle].reduce(function(it,ot){return it[ot.keyName]=ot,it},{}),D=function(it){X(ot,it);function ot(dt,pt){F(this,ot);var ft=j(this,(ot.__proto__||Object.getPrototypeOf(ot)).call(this,dt,pt));return ft.quill.root.addEventListener("paste",ft.onPaste.bind(ft)),ft.container=ft.quill.addContainer("ql-clipboard"),ft.container.setAttribute("contenteditable",!0),ft.container.setAttribute("tabindex",-1),ft.matchers=[],Y.concat(ft.options.matchers).forEach(function(Nt){var Lt=l(Nt,2),Pt=Lt[0],je=Lt[1];!pt.matchVisual&&je===Rt||ft.addMatcher(Pt,je)}),ft}return u(ot,[{key:"addMatcher",value:function(pt,ft){this.matchers.push([pt,ft])}},{key:"convert",value:function(pt){if(typeof pt=="string")return this.container.innerHTML=pt.replace(/\>\r?\n +\</g,"><"),this.convert();var ft=this.quill.getFormat(this.quill.selection.savedRange.index);if(ft[S.default.blotName]){var Nt=this.container.innerText;return this.container.innerHTML="",new d.default().insert(Nt,C({},S.default.blotName,ft[S.default.blotName]))}var Lt=this.prepareMatching(),Pt=l(Lt,2),je=Pt[0],Be=Pt[1],Kt=z(this.container,je,Be);return K(Kt,`
|
|
608
|
+
`)&&Kt.ops[Kt.ops.length-1].attributes==null&&(Kt=Kt.compose(new d.default().retain(Kt.length()-1).delete(1))),V.log("convert",this.container.innerHTML,Kt),this.container.innerHTML="",Kt}},{key:"dangerouslyPasteHTML",value:function(pt,ft){var Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.default.sources.API;if(typeof pt=="string")this.quill.setContents(this.convert(pt),ft),this.quill.setSelection(0,_.default.sources.SILENT);else{var Lt=this.convert(ft);this.quill.updateContents(new d.default().retain(pt).concat(Lt),Nt),this.quill.setSelection(pt+Lt.length(),_.default.sources.SILENT)}}},{key:"onPaste",value:function(pt){var ft=this;if(!(pt.defaultPrevented||!this.quill.isEnabled())){var Nt=this.quill.getSelection(),Lt=new d.default().retain(Nt.index),Pt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(_.default.sources.SILENT),setTimeout(function(){Lt=Lt.concat(ft.convert()).delete(Nt.length),ft.quill.updateContents(Lt,_.default.sources.USER),ft.quill.setSelection(Lt.length()-Nt.length,_.default.sources.SILENT),ft.quill.scrollingContainer.scrollTop=Pt,ft.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var pt=this,ft=[],Nt=[];return this.matchers.forEach(function(Lt){var Pt=l(Lt,2),je=Pt[0],Be=Pt[1];switch(je){case Node.TEXT_NODE:Nt.push(Be);break;case Node.ELEMENT_NODE:ft.push(Be);break;default:[].forEach.call(pt.container.querySelectorAll(je),function(Kt){Kt[st]=Kt[st]||[],Kt[st].push(Be)});break}}),[ft,Nt]}}]),ot}(w.default);D.DEFAULTS={matchers:[],matchVisual:!0};function q(it,ot,dt){return(typeof ot>"u"?"undefined":a(ot))==="object"?Object.keys(ot).reduce(function(pt,ft){return q(pt,ft,ot[ft])},it):it.reduce(function(pt,ft){return ft.attributes&&ft.attributes[ot]?pt.push(ft):pt.insert(ft.insert,(0,h.default)({},C({},ot,dt),ft.attributes))},new d.default)}function Z(it){if(it.nodeType!==Node.ELEMENT_NODE)return{};var ot="__ql-computed-style";return it[ot]||(it[ot]=window.getComputedStyle(it))}function K(it,ot){for(var dt="",pt=it.ops.length-1;pt>=0&&dt.length<ot.length;--pt){var ft=it.ops[pt];if(typeof ft.insert!="string")break;dt=ft.insert+dt}return dt.slice(-1*ot.length)===ot}function G(it){if(it.childNodes.length===0)return!1;var ot=Z(it);return["block","list-item"].indexOf(ot.display)>-1}function z(it,ot,dt){return it.nodeType===it.TEXT_NODE?dt.reduce(function(pt,ft){return ft(it,pt)},new d.default):it.nodeType===it.ELEMENT_NODE?[].reduce.call(it.childNodes||[],function(pt,ft){var Nt=z(ft,ot,dt);return ft.nodeType===it.ELEMENT_NODE&&(Nt=ot.reduce(function(Lt,Pt){return Pt(ft,Lt)},Nt),Nt=(ft[st]||[]).reduce(function(Lt,Pt){return Pt(ft,Lt)},Nt)),pt.concat(Nt)},new d.default):new d.default}function tt(it,ot,dt){return q(dt,it,!0)}function et(it,ot){var dt=v.default.Attributor.Attribute.keys(it),pt=v.default.Attributor.Class.keys(it),ft=v.default.Attributor.Style.keys(it),Nt={};return dt.concat(pt).concat(ft).forEach(function(Lt){var Pt=v.default.query(Lt,v.default.Scope.ATTRIBUTE);Pt!=null&&(Nt[Pt.attrName]=Pt.value(it),Nt[Pt.attrName])||(Pt=U[Lt],Pt!=null&&(Pt.attrName===Lt||Pt.keyName===Lt)&&(Nt[Pt.attrName]=Pt.value(it)||void 0),Pt=N[Lt],Pt!=null&&(Pt.attrName===Lt||Pt.keyName===Lt)&&(Pt=N[Lt],Nt[Pt.attrName]=Pt.value(it)||void 0))}),Object.keys(Nt).length>0&&(ot=q(ot,Nt)),ot}function nt(it,ot){var dt=v.default.query(it);if(dt==null)return ot;if(dt.prototype instanceof v.default.Embed){var pt={},ft=dt.value(it);ft!=null&&(pt[dt.blotName]=ft,ot=new d.default().insert(pt,dt.formats(it)))}else typeof dt.formats=="function"&&(ot=q(ot,dt.blotName,dt.formats(it)));return ot}function ht(it,ot){return K(ot,`
|
|
609
609
|
`)||ot.insert(`
|
|
610
|
-
`),ot}function
|
|
611
|
-
`))return ot;for(var pt=-1,ft=
|
|
612
|
-
`)||(G(
|
|
613
|
-
`),ot}function
|
|
610
|
+
`),ot}function vt(){return new d.default}function mt(it,ot){var dt=v.default.query(it);if(dt==null||dt.blotName!=="list-item"||!K(ot,`
|
|
611
|
+
`))return ot;for(var pt=-1,ft=it.parentNode;!ft.classList.contains("ql-clipboard");)(v.default.query(ft)||{}).blotName==="list"&&(pt+=1),ft=ft.parentNode;return pt<=0?ot:ot.compose(new d.default().retain(ot.length()-1).retain(1,{indent:pt}))}function xt(it,ot){return K(ot,`
|
|
612
|
+
`)||(G(it)||ot.length()>0&&it.nextSibling&&G(it.nextSibling))&&ot.insert(`
|
|
613
|
+
`),ot}function Rt(it,ot){if(G(it)&&it.nextElementSibling!=null&&!K(ot,`
|
|
614
614
|
|
|
615
|
-
`)){var dt=
|
|
616
|
-
`)}return ot}function ae(st,ot){var dt={},pt=st.style||{};return pt.fontStyle&&Z(st).fontStyle==="italic"&&(dt.italic=!0),pt.fontWeight&&(Z(st).fontWeight.startsWith("bold")||parseInt(Z(st).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(ot=q(ot,dt)),parseFloat(pt.textIndent||0)>0&&(ot=new d.default().insert(" ").concat(ot)),ot}function Wt(st,ot){var dt=st.data;if(st.parentNode.tagName==="O:P")return ot.insert(dt.trim());if(dt.trim().length===0&&st.parentNode.classList.contains("ql-clipboard"))return ot;if(!Z(st.parentNode).whiteSpace.startsWith("pre")){var pt=function(Nt,Lt){return Lt=Lt.replace(/[^\u00a0]/g,""),Lt.length<1&&Nt?" ":Lt};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,pt.bind(pt,!0)),(st.previousSibling==null&&G(st.parentNode)||st.previousSibling!=null&&G(st.previousSibling))&&(dt=dt.replace(/^\s+/,pt.bind(pt,!1))),(st.nextSibling==null&&G(st.parentNode)||st.nextSibling!=null&&G(st.nextSibling))&&(dt=dt.replace(/\s+$/,pt.bind(pt,!1)))}return ot.insert(dt)}n.default=D,n.matchAttributor=et,n.matchBlot=nt,n.matchNewline=xt,n.matchSpacing=It,n.matchText=Wt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,_){for(var b=0;b<_.length;b++){var E=_[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,_,b){return _&&y(m.prototype,_),b&&y(m,b),m}}(),l=function y(m,_,b){m===null&&(m=Function.prototype);var E=Object.getOwnPropertyDescriptor(m,_);if(E===void 0){var w=Object.getPrototypeOf(m);return w===null?void 0:y(w,_,b)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(b)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function d(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function c(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var v=function(y){c(m,y);function m(){return p(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"optimize",value:function(b){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,b),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),m}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var a=function(){function I(M,C){var F=[],j=!0,X=!1,V=void 0;try{for(var it=M[Symbol.iterator](),Y;!(j=(Y=it.next()).done)&&(F.push(Y.value),!(C&&F.length===C));j=!0);}catch(U){X=!0,V=U}finally{try{!j&&it.return&&it.return()}finally{if(X)throw V}}return F}return function(M,C){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return I(M,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function I(M,C){for(var F=0;F<C.length;F++){var j=C[F];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(M,j.key,j)}}return function(M,C,F){return C&&I(M.prototype,C),F&&I(M,F),M}}(),u=i(2),f=b(u),h=i(0),p=b(h),d=i(5),c=b(d),v=i(10),y=b(v),m=i(9),_=b(m);function b(I){return I&&I.__esModule?I:{default:I}}function E(I,M,C){return M in I?Object.defineProperty(I,M,{value:C,enumerable:!0,configurable:!0,writable:!0}):I[M]=C,I}function w(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}function x(I,M){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:I}function A(I,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);I.prototype=Object.create(M&&M.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(I,M):I.__proto__=M)}var P=(0,y.default)("quill:toolbar"),S=function(I){A(M,I);function M(C,F){w(this,M);var j=x(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,C,F));if(Array.isArray(j.options.container)){var X=document.createElement("div");L(X,j.options.container),C.container.parentNode.insertBefore(X,C.container),j.container=X}else typeof j.options.container=="string"?j.container=document.querySelector(j.options.container):j.container=j.options.container;if(!(j.container instanceof HTMLElement)){var V;return V=P.error("Container required for toolbar",j.options),x(j,V)}return j.container.classList.add("ql-toolbar"),j.controls=[],j.handlers={},Object.keys(j.options.handlers).forEach(function(it){j.addHandler(it,j.options.handlers[it])}),[].forEach.call(j.container.querySelectorAll("button, select"),function(it){j.attach(it)}),j.quill.on(c.default.events.EDITOR_CHANGE,function(it,Y){it===c.default.events.SELECTION_CHANGE&&j.update(Y)}),j.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var it=j.quill.selection.getRange(),Y=a(it,1),U=Y[0];j.update(U)}),j}return l(M,[{key:"addHandler",value:function(F,j){this.handlers[F]=j}},{key:"attach",value:function(F){var j=this,X=[].find.call(F.classList,function(it){return it.indexOf("ql-")===0});if(X){if(X=X.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[X]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[X]==null){P.warn("ignoring attaching to disabled format",X,F);return}if(p.default.query(X)==null){P.warn("ignoring attaching to nonexistent format",X,F);return}}var V=F.tagName==="SELECT"?"change":"click";F.addEventListener(V,function(it){var Y=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var U=F.options[F.selectedIndex];U.hasAttribute("selected")?Y=!1:Y=U.value||!1}else F.classList.contains("ql-active")?Y=!1:Y=F.value||!F.hasAttribute("value"),it.preventDefault();j.quill.focus();var N=j.quill.selection.getRange(),D=a(N,1),q=D[0];if(j.handlers[X]!=null)j.handlers[X].call(j,Y);else if(p.default.query(X).prototype instanceof p.default.Embed){if(Y=prompt("Enter "+X),!Y)return;j.quill.updateContents(new f.default().retain(q.index).delete(q.length).insert(E({},X,Y)),c.default.sources.USER)}else j.quill.format(X,Y,c.default.sources.USER);j.update(q)}),this.controls.push([X,F])}}},{key:"update",value:function(F){var j=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(X){var V=a(X,2),it=V[0],Y=V[1];if(Y.tagName==="SELECT"){var U=void 0;if(F==null)U=null;else if(j[it]==null)U=Y.querySelector("option[selected]");else if(!Array.isArray(j[it])){var N=j[it];typeof N=="string"&&(N=N.replace(/\"/g,'\\"')),U=Y.querySelector('option[value="'+N+'"]')}U==null?(Y.value="",Y.selectedIndex=-1):U.selected=!0}else if(F==null)Y.classList.remove("ql-active");else if(Y.hasAttribute("value")){var D=j[it]===Y.getAttribute("value")||j[it]!=null&&j[it].toString()===Y.getAttribute("value")||j[it]==null&&!Y.getAttribute("value");Y.classList.toggle("ql-active",D)}else Y.classList.toggle("ql-active",j[it]!=null)})}}]),M}(_.default);S.DEFAULTS={};function O(I,M,C){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+M),C!=null&&(F.value=C),I.appendChild(F)}function L(I,M){Array.isArray(M[0])||(M=[M]),M.forEach(function(C){var F=document.createElement("span");F.classList.add("ql-formats"),C.forEach(function(j){if(typeof j=="string")O(F,j);else{var X=Object.keys(j)[0],V=j[X];Array.isArray(V)?R(F,X,V):O(F,X,V)}}),I.appendChild(F)})}function R(I,M,C){var F=document.createElement("select");F.classList.add("ql-"+M),C.forEach(function(j){var X=document.createElement("option");j!==!1?X.setAttribute("value",j):X.setAttribute("selected","selected"),F.appendChild(X)}),I.appendChild(F)}S.DEFAULTS={container:null,handlers:{clean:function(){var M=this,C=this.quill.getSelection();if(C!=null)if(C.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(j){p.default.query(j,p.default.Scope.INLINE)!=null&&M.quill.format(j,!1)})}else this.quill.removeFormat(C,c.default.sources.USER)},direction:function(M){var C=this.quill.getFormat().align;M==="rtl"&&C==null?this.quill.format("align","right",c.default.sources.USER):!M&&C==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",M,c.default.sources.USER)},indent:function(M){var C=this.quill.getSelection(),F=this.quill.getFormat(C),j=parseInt(F.indent||0);if(M==="+1"||M==="-1"){var X=M==="+1"?1:-1;F.direction==="rtl"&&(X*=-1),this.quill.format("indent",j+X,c.default.sources.USER)}},link:function(M){M===!0&&(M=prompt("Enter link URL:")),this.quill.format("link",M,c.default.sources.USER)},list:function(M){var C=this.quill.getSelection(),F=this.quill.getFormat(C);M==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",M,c.default.sources.USER)}}},n.default=S,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,_){for(var b=0;b<_.length;b++){var E=_[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,_,b){return _&&y(m.prototype,_),b&&y(m,b),m}}(),l=function y(m,_,b){m===null&&(m=Function.prototype);var E=Object.getOwnPropertyDescriptor(m,_);if(E===void 0){var w=Object.getPrototypeOf(m);return w===null?void 0:y(w,_,b)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(b)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function d(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function c(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var v=function(y){c(m,y);function m(_,b){p(this,m);var E=d(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,_));return E.label.innerHTML=b,E.container.classList.add("ql-color-picker"),[].slice.call(E.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(w){w.classList.add("ql-primary")}),E}return a(m,[{key:"buildItem",value:function(b){var E=l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"buildItem",this).call(this,b);return E.style.backgroundColor=b.getAttribute("value")||"",E}},{key:"selectItem",value:function(b,E){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,b,E);var w=this.label.querySelector(".ql-color-label"),x=b&&b.getAttribute("data-value")||"";w&&(w.tagName==="line"?w.style.stroke=x:w.style.fill=x)}}]),m}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,_){for(var b=0;b<_.length;b++){var E=_[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,_,b){return _&&y(m.prototype,_),b&&y(m,b),m}}(),l=function y(m,_,b){m===null&&(m=Function.prototype);var E=Object.getOwnPropertyDescriptor(m,_);if(E===void 0){var w=Object.getPrototypeOf(m);return w===null?void 0:y(w,_,b)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(b)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function d(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function c(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var v=function(y){c(m,y);function m(_,b){p(this,m);var E=d(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,_));return E.container.classList.add("ql-icon-picker"),[].forEach.call(E.container.querySelectorAll(".ql-picker-item"),function(w){w.innerHTML=b[w.getAttribute("data-value")||""]}),E.defaultItem=E.container.querySelector(".ql-selected"),E.selectItem(E.defaultItem),E}return a(m,[{key:"selectItem",value:function(b,E){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,b,E),b=b||this.defaultItem,this.label.innerHTML=b.innerHTML}}]),m}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){var d=this;l(this,f),this.quill=h,this.boundsContainer=p||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return a(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(p){var d=p.left+p.width/2-this.root.offsetWidth/2,c=p.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),m=0;if(y.right>v.right&&(m=v.right-y.right,this.root.style.left=d+m+"px"),y.left<v.left&&(m=v.left-y.left,this.root.style.left=d+m+"px"),y.bottom>v.bottom){var _=y.bottom-y.top,b=p.bottom-p.top+_;this.root.style.top=c-b+"px",this.root.classList.add("ql-flip")}return m}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function R(I,M){var C=[],F=!0,j=!1,X=void 0;try{for(var V=I[Symbol.iterator](),it;!(F=(it=V.next()).done)&&(C.push(it.value),!(M&&C.length===M));F=!0);}catch(Y){j=!0,X=Y}finally{try{!F&&V.return&&V.return()}finally{if(j)throw X}}return C}return function(I,M){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return R(I,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function R(I,M,C){I===null&&(I=Function.prototype);var F=Object.getOwnPropertyDescriptor(I,M);if(F===void 0){var j=Object.getPrototypeOf(I);return j===null?void 0:R(j,M,C)}else{if("value"in F)return F.value;var X=F.get;return X===void 0?void 0:X.call(C)}},u=function(){function R(I,M){for(var C=0;C<M.length;C++){var F=M[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(I,F.key,F)}}return function(I,M,C){return M&&R(I.prototype,M),C&&R(I,C),I}}(),f=i(3),h=w(f),p=i(8),d=w(p),c=i(43),v=w(c),y=i(27),m=w(y),_=i(15),b=i(41),E=w(b);function w(R){return R&&R.__esModule?R:{default:R}}function x(R,I){if(!(R instanceof I))throw new TypeError("Cannot call a class as a function")}function A(R,I){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:R}function P(R,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);R.prototype=Object.create(I&&I.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(R,I):R.__proto__=I)}var S=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=function(R){P(I,R);function I(M,C){x(this,I),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=S);var F=A(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,M,C));return F.quill.container.classList.add("ql-snow"),F}return u(I,[{key:"extendToolbar",value:function(C){C.container.classList.add("ql-snow"),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),E.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),E.default),this.tooltip=new L(this.quill,this.options.bounds),C.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,j){C.handlers.link.call(C,!j.format.link)})}}]),I}(v.default);O.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(I){if(I){var M=this.quill.getSelection();if(M==null||M.length==0)return;var C=this.quill.getText(M);/^\S+@\S+\.\S+$/.test(C)&&C.indexOf("mailto:")!==0&&(C="mailto:"+C);var F=this.quill.theme.tooltip;F.edit("link",C)}else this.quill.format("link",!1)}}}}});var L=function(R){P(I,R);function I(M,C){x(this,I);var F=A(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,M,C));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(I,[{key:"listen",value:function(){var C=this;l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){C.root.classList.contains("ql-editing")?C.save():C.edit("link",C.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(C.linkRange!=null){var j=C.linkRange;C.restoreFocus(),C.quill.formatText(j,"link",!1,d.default.sources.USER),delete C.linkRange}F.preventDefault(),C.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(F,j,X){if(F!=null){if(F.length===0&&X===d.default.sources.USER){var V=C.quill.scroll.descendant(m.default,F.index),it=a(V,2),Y=it[0],U=it[1];if(Y!=null){C.linkRange=new _.Range(F.index-U,Y.length());var N=m.default.formats(Y.domNode);C.preview.textContent=N,C.preview.setAttribute("href",N),C.show(),C.position(C.quill.getBounds(C.linkRange));return}}else delete C.linkRange;C.hide()}})}},{key:"show",value:function(){l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),I}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(29),l=ft(a),u=i(36),f=i(38),h=i(64),p=i(65),d=ft(p),c=i(66),v=ft(c),y=i(67),m=ft(y),_=i(37),b=i(26),E=i(39),w=i(40),x=i(56),A=ft(x),P=i(68),S=ft(P),O=i(27),L=ft(O),R=i(69),I=ft(R),M=i(70),C=ft(M),F=i(71),j=ft(F),X=i(72),V=ft(X),it=i(73),Y=ft(it),U=i(13),N=ft(U),D=i(74),q=ft(D),Z=i(75),K=ft(Z),G=i(57),z=ft(G),tt=i(41),et=ft(tt),nt=i(28),ht=ft(nt),gt=i(59),mt=ft(gt),xt=i(60),It=ft(xt),ae=i(61),Wt=ft(ae),st=i(108),ot=ft(st),dt=i(62),pt=ft(dt);function ft(Nt){return Nt&&Nt.__esModule?Nt:{default:Nt}}l.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":E.FontClass,"attributors/class/size":w.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":E.FontStyle,"attributors/style/size":w.SizeStyle},!0),l.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":E.FontClass,"formats/size":w.SizeClass,"formats/blockquote":d.default,"formats/code-block":N.default,"formats/header":v.default,"formats/list":m.default,"formats/bold":A.default,"formats/code":U.Code,"formats/italic":S.default,"formats/link":L.default,"formats/script":I.default,"formats/strike":C.default,"formats/underline":j.default,"formats/image":V.default,"formats/video":Y.default,"formats/list/item":y.ListItem,"modules/formula":q.default,"modules/syntax":K.default,"modules/toolbar":z.default,"themes/bubble":ot.default,"themes/snow":pt.default,"ui/icons":et.default,"ui/picker":ht.default,"ui/icon-picker":It.default,"ui/color-picker":mt.default,"ui/tooltip":Wt.default},!0),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var a=function(){function m(_,b){for(var E=0;E<b.length;E++){var w=b[E];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,E){return b&&m(_.prototype,b),E&&m(_,E),_}}(),l=function m(_,b,E){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:m(x,b,E)}else{if("value"in w)return w.value;var A=w.get;return A===void 0?void 0:A.call(E)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function d(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function c(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var v=function(m){c(_,m);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"add",value:function(E,w){if(w==="+1"||w==="-1"){var x=this.value(E)||0;w=w==="+1"?x+1:x-1}return w===0?(this.remove(E),!0):l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,E,w)}},{key:"canAdd",value:function(E,w){return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,E,w)||l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,E,parseInt(w))}},{key:"value",value:function(E){return parseInt(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,E))||void 0}}]),_}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="blockquote",d.tagName="blockquote",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function v(y,m){for(var _=0;_<m.length;_++){var b=m[_];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(y,b.key,b)}}return function(y,m,_){return m&&v(y.prototype,m),_&&v(y,_),y}}(),l=i(4),u=f(l);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function p(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function d(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){d(y,v);function y(){return h(this,y),p(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var a=function(){function x(A,P){for(var S=0;S<P.length;S++){var O=P[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}return function(A,P,S){return P&&x(A.prototype,P),S&&x(A,S),A}}(),l=function x(A,P,S){A===null&&(A=Function.prototype);var O=Object.getOwnPropertyDescriptor(A,P);if(O===void 0){var L=Object.getPrototypeOf(A);return L===null?void 0:x(L,P,S)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(S)}},u=i(0),f=v(u),h=i(4),p=v(h),d=i(25),c=v(d);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,A,P){return A in x?Object.defineProperty(x,A,{value:P,enumerable:!0,configurable:!0,writable:!0}):x[A]=P,x}function m(x,A){if(!(x instanceof A))throw new TypeError("Cannot call a class as a function")}function _(x,A){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:x}function b(x,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);x.prototype=Object.create(A&&A.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(x,A):x.__proto__=A)}var E=function(x){b(A,x);function A(){return m(this,A),_(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return a(A,[{key:"format",value:function(S,O){S===w.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,S,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(S,O){return this.parent.isolate(this.offset(this.parent),this.length()),S===this.parent.statics.blotName?(this.parent.replaceWith(S,O),this):(this.parent.unwrap(),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,S,O))}}],[{key:"formats",value:function(S){return S.tagName===this.tagName?void 0:l(A.__proto__||Object.getPrototypeOf(A),"formats",this).call(this,S)}}]),A}(p.default);E.blotName="list-item",E.tagName="LI";var w=function(x){b(A,x),a(A,null,[{key:"create",value:function(S){var O=S==="ordered"?"OL":"UL",L=l(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,O);return(S==="checked"||S==="unchecked")&&L.setAttribute("data-checked",S==="checked"),L}},{key:"formats",value:function(S){if(S.tagName==="OL")return"ordered";if(S.tagName==="UL")return S.hasAttribute("data-checked")?S.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function A(P){m(this,A);var S=_(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,P)),O=function(R){if(R.target.parentNode===P){var I=S.statics.formats(P),M=f.default.find(R.target);I==="checked"?M.format("list","unchecked"):I==="unchecked"&&M.format("list","checked")}};return P.addEventListener("touchstart",O),P.addEventListener("mousedown",O),S}return a(A,[{key:"format",value:function(S,O){this.children.length>0&&this.children.tail.format(S,O)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(S,O){if(S instanceof E)l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,S,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(S,R)}}},{key:"optimize",value:function(S){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,S);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(S){if(S.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);S.moveChildren(O),this.appendChild(O)}l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,S)}}]),A}(c.default);w.blotName="list",w.scope=f.default.Scope.BLOCK_BLOT,w.tagName=["OL","UL"],w.defaultChild="list-item",w.allowedChildren=[E],n.ListItem=E,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(56),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="italic",d.tagName=["EM","I"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,_){for(var b=0;b<_.length;b++){var E=_[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,_,b){return _&&y(m.prototype,_),b&&y(m,b),m}}(),l=function y(m,_,b){m===null&&(m=Function.prototype);var E=Object.getOwnPropertyDescriptor(m,_);if(E===void 0){var w=Object.getPrototypeOf(m);return w===null?void 0:y(w,_,b)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(b)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function d(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function c(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var v=function(y){c(m,y);function m(){return p(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,null,[{key:"create",value:function(b){return b==="super"?document.createElement("sup"):b==="sub"?document.createElement("sub"):l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,b)}},{key:"formats",value:function(b){if(b.tagName==="SUB")return"sub";if(b.tagName==="SUP")return"super"}}]),m}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="strike",d.tagName="S",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="underline",d.tagName="U",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(b,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,E,w){return E&&_(b.prototype,E),w&&_(b,w),b}}(),l=function _(b,E,w){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,E);if(x===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:_(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(0),f=p(u),h=i(27);function p(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function c(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function v(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var y=["alt","height","width"],m=function(_){v(b,_);function b(){return d(this,b),c(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"format",value:function(w,x){y.indexOf(w)>-1?x?this.domNode.setAttribute(w,x):this.domNode.removeAttribute(w):l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,w,x)}}],[{key:"create",value:function(w){var x=l(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,w);return typeof w=="string"&&x.setAttribute("src",this.sanitize(w)),x}},{key:"formats",value:function(w){return y.reduce(function(x,A){return w.hasAttribute(A)&&(x[A]=w.getAttribute(A)),x},{})}},{key:"match",value:function(w){return/\.(jpe?g|gif|png)$/.test(w)||/^data:image\/.+;base64/.test(w)}},{key:"sanitize",value:function(w){return(0,h.sanitize)(w,["http","https","data"])?w:"//:0"}},{key:"value",value:function(w){return w.getAttribute("src")}}]),b}(f.default.Embed);m.blotName="image",m.tagName="IMG",n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(b,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,E,w){return E&&_(b.prototype,E),w&&_(b,w),b}}(),l=function _(b,E,w){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,E);if(x===void 0){var A=Object.getPrototypeOf(b);return A===null?void 0:_(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(4),f=i(27),h=p(f);function p(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function c(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function v(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var y=["height","width"],m=function(_){v(b,_);function b(){return d(this,b),c(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"format",value:function(w,x){y.indexOf(w)>-1?x?this.domNode.setAttribute(w,x):this.domNode.removeAttribute(w):l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,w,x)}}],[{key:"create",value:function(w){var x=l(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,w);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(w)),x}},{key:"formats",value:function(w){return y.reduce(function(x,A){return w.hasAttribute(A)&&(x[A]=w.getAttribute(A)),x},{})}},{key:"sanitize",value:function(w){return h.default.sanitize(w)}},{key:"value",value:function(w){return w.getAttribute("src")}}]),b}(u.BlockEmbed);m.blotName="video",m.className="ql-video",m.tagName="IFRAME",n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var a=function(){function w(x,A){for(var P=0;P<A.length;P++){var S=A[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(x,S.key,S)}}return function(x,A,P){return A&&w(x.prototype,A),P&&w(x,P),x}}(),l=function w(x,A,P){x===null&&(x=Function.prototype);var S=Object.getOwnPropertyDescriptor(x,A);if(S===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:w(O,A,P)}else{if("value"in S)return S.value;var L=S.get;return L===void 0?void 0:L.call(P)}},u=i(35),f=v(u),h=i(5),p=v(h),d=i(9),c=v(d);function v(w){return w&&w.__esModule?w:{default:w}}function y(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function m(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function _(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var b=function(w){_(x,w);function x(){return y(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,null,[{key:"create",value:function(P){var S=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,P);return typeof P=="string"&&(window.katex.render(P,S,{throwOnError:!1,errorColor:"#f00"}),S.setAttribute("data-value",P)),S}},{key:"value",value:function(P){return P.getAttribute("data-value")}}]),x}(f.default);b.blotName="formula",b.className="ql-formula",b.tagName="SPAN";var E=function(w){_(x,w),a(x,null,[{key:"register",value:function(){p.default.register(b,!0)}}]);function x(){y(this,x);var A=m(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return A}return x}(c.default);n.FormulaBlot=b,n.default=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var a=function(){function P(S,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(S,R.key,R)}}return function(S,O,L){return O&&P(S.prototype,O),L&&P(S,L),S}}(),l=function P(S,O,L){S===null&&(S=Function.prototype);var R=Object.getOwnPropertyDescriptor(S,O);if(R===void 0){var I=Object.getPrototypeOf(S);return I===null?void 0:P(I,O,L)}else{if("value"in R)return R.value;var M=R.get;return M===void 0?void 0:M.call(L)}},u=i(0),f=m(u),h=i(5),p=m(h),d=i(9),c=m(d),v=i(13),y=m(v);function m(P){return P&&P.__esModule?P:{default:P}}function _(P,S){if(!(P instanceof S))throw new TypeError("Cannot call a class as a function")}function b(P,S){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:P}function E(P,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);P.prototype=Object.create(S&&S.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(P,S):P.__proto__=S)}var w=function(P){E(S,P);function S(){return _(this,S),b(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),S}(y.default);w.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),A=function(P){E(S,P),a(S,null,[{key:"register",value:function(){p.default.register(x,!0),p.default.register(w,!0)}}]);function S(O,L){_(this,S);var R=b(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,O,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var I=null;return R.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(I),I=setTimeout(function(){R.highlight(),I=null},R.options.interval)}),R.highlight(),R}return a(S,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(p.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(w).forEach(function(I){I.highlight(L.options.highlight)}),this.quill.update(p.default.sources.SILENT),R!=null&&this.quill.setSelection(R,p.default.sources.SILENT)}}}]),S}(c.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(P){var S=window.hljs.highlightAuto(P);return S.value}}(),interval:1e3},n.CodeBlock=w,n.CodeToken=x,n.default=A},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var a=function S(O,L,R){O===null&&(O=Function.prototype);var I=Object.getOwnPropertyDescriptor(O,L);if(I===void 0){var M=Object.getPrototypeOf(O);return M===null?void 0:S(M,L,R)}else{if("value"in I)return I.value;var C=I.get;return C===void 0?void 0:C.call(R)}},l=function(){function S(O,L){for(var R=0;R<L.length;R++){var I=L[R];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(O,I.key,I)}}return function(O,L,R){return L&&S(O.prototype,L),R&&S(O,R),O}}(),u=i(3),f=_(u),h=i(8),p=_(h),d=i(43),c=_(d),v=i(15),y=i(41),m=_(y);function _(S){return S&&S.__esModule?S:{default:S}}function b(S,O){if(!(S instanceof O))throw new TypeError("Cannot call a class as a function")}function E(S,O){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:S}function w(S,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);S.prototype=Object.create(O&&O.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(S,O):S.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],A=function(S){w(O,S);function O(L,R){b(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var I=E(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return I.quill.container.classList.add("ql-bubble"),I}return l(O,[{key:"extendToolbar",value:function(R){this.tooltip=new P(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),m.default)}}]),O}(c.default);A.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var P=function(S){w(O,S);function O(L,R){b(this,O);var I=E(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return I.quill.on(p.default.events.EDITOR_CHANGE,function(M,C,F,j){if(M===p.default.events.SELECTION_CHANGE)if(C!=null&&C.length>0&&j===p.default.sources.USER){I.show(),I.root.style.left="0px",I.root.style.width="",I.root.style.width=I.root.offsetWidth+"px";var X=I.quill.getLines(C.index,C.length);if(X.length===1)I.position(I.quill.getBounds(C));else{var V=X[X.length-1],it=I.quill.getIndex(V),Y=Math.min(V.length()-1,C.index+C.length-it),U=I.quill.getBounds(new v.Range(it,Y));I.position(U)}}else document.activeElement!==I.textbox&&I.quill.hasFocus()&&I.hide()}),I}return l(O,[{key:"listen",value:function(){var R=this;a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var I=R.quill.getSelection();I!=null&&R.position(R.quill.getBounds(I))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var I=a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,R),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",I===0)return I;M.style.marginLeft=-1*I-M.offsetWidth/2+"px"}}]),O}(d.BaseTooltip);P.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=P,n.default=A},function(r,n,i){r.exports=i(63)}]).default})})(kp);var tC=kp.exports;const eC=Tn(tC),qF="",rC=Tt.forwardRef((e,t)=>{const[r,n]=bt.useState(!1);console.log("allProps",e);const i=bt.useRef(null),a=bt.useRef(null),l=bt.useRef(null),u=bt.useRef(null),f=bt.useRef(16),h=bt.useRef(null),{uniqueId:p,text:d,disabled:c,transformation:v,onTextUpdate:y,pointerdown:m}=e,{x:_,y:b,fontFamily:E="Arial",fontWeight:w="normal",fontStyle:x="normal",fontSize:A=16,fill:P="black",stroke:S,strokeThickness:O=0,blurRadius:L=0,blurEnabled:R=!1,dropShadowColor:I=null,wordWrapWidth:M=5e7,leading:C=0,letterSpacing:F}=v;Tt.useEffect(()=>{f.current=Number(A)},[A]);const j=["italic","oblique"].includes(x)?x:void 0,X=["bold","lighter","100","200","300"].includes(w)?w:void 0,V=Number(F)>0?F:void 0,it=Tt.useMemo(()=>new wn.TextStyle({fontFamily:E,fontSize:A,fill:P||"white",...S&&O>0&&{stroke:S,strokeThickness:O},...j&&{fontStyle:j},...X&&{fontWeight:X},...V&&{letterSpacing:V},...R&&{dropShadow:!0,dropShadowBlur:Number(L),dropShadowColor:(I==null?void 0:I.toString())||"black",dropShadowDistance:0},wordWrap:!0,breakWords:!0,wordWrapWidth:M||500,leading:C||0}),[R,L,P,E,A,C,j,X,V,I,S,O,M]);Tt.useEffect(()=>{h.current={...v}},[v]);const Y=U=>{y&&y({text:U,uniqueId:p,droptype:"titles"})};return Tt.useEffect(()=>{if(r&&l.current){let N=document.getElementById("note-editor");if(N){N.style.position="absolute",N.style.zIndex="10",N.style.left=_+"px",N.style.top=b+"px",N.style.backgroundColor="var(--chakra-color-darkShark)",N.style.transform="scale(1.5)",N.style.width="300px",N.style.height="100px",N.style.color="#fff",N.style.fontSize="20px",N.style.border="1px solid #CBCEE0";const D={esc:{key:27,handler:function(){n(!1)}},enter:{key:13,handler:function(){n(!1)}}};var U=new eC("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...D}}},placeholder:"Compose your text here...",theme:"snow"});U.on("text-change",function(){Y(U.root.innerText)}),U.setText(d),U.focus(),U.off("text-change",()=>{console.log("removed")}),U.hasFocus()||(N.style.display="none")}}},[_,b,r]),Zt.jsx(Ei,{...e,ref:t,children:Zt.jsxs(ve.Container,{ref:i,children:[r&&Zt.jsx(ve.Container,{ref:l}),Zt.jsx(ve.Container,{alpha:r?0:1,ref:u,children:Zt.jsx(ve.Text,{style:it,x:_,y:b,anchor:.5,text:d,...!r&&!c&&{interactive:!0,buttonMode:!0,pointerdown:m},ref:a})})]})})}),nC={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},iC=Tt.forwardRef((e,t)=>{const[,r]=Tt.useState(!1),[,n]=Tt.useState({isWaiting:!1,isStalled:!1}),[i,a]=Tt.useState(),l=bt.useRef(null),u=bt.useRef(null),f=bt.useRef(null),h=bt.useRef(nC),p=bt.useRef(),{tl:d,isDragging:c}=bt.useContext(mi),{uniqueId:v,mute:y=!1,src:m,frameStartAt:_,frameEndAt:b,transformation:{x:E,y:w,width:x,height:A,animation:P}}=e,S=m||"",O=Tt.useMemo(()=>{const C=document.createElement("video");return C.src=m,C.crossOrigin="Anonymus",C.autoplay=!1,C.currentTime=_,C},[m,_]);Fr(Ze.PAUSE,()=>{if(f.current){const C=f.current;C.currentTime>0&&!C.paused&&!C.ended&&C.readyState>C.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}}),Tt.useEffect(()=>{f.current&&(c?(f.current.pause(),h.current.isPlaying=!1,h.current.isDragging=!0):h.current.isDragging=!1)},[c]);const L=C=>{f.current&&(f.current.currentTime=Number(C),c||(f.current.currentTime=Number(C),f.current.play(),h.current.isPlaying=!0))},R=()=>{if(f.current){const C=f.current;C.currentTime>0&&!C.paused&&!C.ended&&C.readyState>C.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}},I=()=>{},M=()=>{var C;if(f.current&&p.current){const F=_+((C=p.current)==null?void 0:C.time());Math.abs(f.current.currentTime-F);const j=f.current,X=j.currentTime>0&&!j.paused&&!j.ended&&j.readyState>j.HAVE_CURRENT_DATA;h.current.isDragging?(f.current.currentTime=F,f.current.play(),setTimeout(()=>{h.current.isPlaying=!1,f.current&&f.current.pause()},300),h.current.isPlaying=!1):h.current.isPlaying||(X||f.current.play(),h.current.isPlaying=!0)}};return bt.useEffect(()=>{let C=We.context(()=>{});if(u.current&&d.current){const F={duration:Number(b)-Number(_),onStart:L,onComplete:R,onStartParams:[_,b],onCompleteParams:[],onInterrupt:I,onUpdate:M,onUpdateParams:[_,b]};C=We.context(()=>{p.current=We.from(u.current,F,_),d.current.add(p.current,_)})}return()=>C.revert()},[P,_,b]),Tt.useEffect(()=>{u.current&&r(!0)},[]),Tt.useEffect(()=>{f.current&&(f.current.muted=y)},[y]),Tt.useEffect(()=>{if(f.current){const C=f.current;C.currentTime>0&&!C.paused&&!C.ended&&C.readyState>C.HAVE_CURRENT_DATA&&c&&(f.current.pause(),h.current.isPlaying=!1)}},[c]),Tt.useEffect(()=>{const C=Math.round((Number(_)+Number.EPSILON)*100)/100,F=function(){f.current&&(f.current.currentTime=C)},j=function(){if(f.current){const D=f.current;D.currentTime>0&&!D.paused&&!D.ended&&D.readyState>D.HAVE_CURRENT_DATA&&f.current.pause()}n({isWaiting:!1,isStalled:!1})},X=function(){f.current&&f.current.pause(),n({isWaiting:!0,isStalled:!1})},V=function(){n({isWaiting:!1,isStalled:!1})},it=function(){n({isWaiting:!1,isStalled:!0})},Y=Math.round((Number(_)+Number.EPSILON)*100)/100,U=Math.round((Number(b)+Number.EPSILON)*100)/100,N=`${S}#t=${Y},${U}`;return console.log("urlTimestap",N),wn.Texture.fromLoader(O,N,v,{pixiIdPrefix:v,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(D=>{D&&(a(D),f.current=D.baseTexture.resource.source,f.current.id=v,f.current.addEventListener("loadedmetadata",F),f.current.addEventListener("ended",j),f.current.addEventListener("loadstart",X),f.current.addEventListener("canplaythrough",V),f.current.addEventListener("stalled",it))}),()=>{f.current&&(f.current.removeEventListener("loadedmetadata",F),f.current.removeEventListener("ended",j),f.current.removeEventListener("loadstart",X),f.current.removeEventListener("canplaythrough",V),f.current.removeEventListener("stalled",it))}},[S,v,_,b,O]),Zt.jsx(Ei,{...e,ref:t,ignoreTlForVideo:!0,children:Zt.jsx(ve.Container,{ref:u,children:i&&Zt.jsx(ve.Sprite,{texture:i,width:x,height:A,anchor:.5,x:E,y:w,ref:l})})})});var Lp=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Lp||{}),Fp=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Fp||{});ne.Animations=Lp,ne.BlendModes=Fp,ne.Events=Ze,ne.GsapPixieContext=mi,ne.GsapPixieContextProvider=P1,ne.PixiAnimatedSprite=Pp,ne.PixiAudioSprite=yT,ne.PixiGifSprite=QR,ne.PixiImageSprite=CE,ne.PixiSvgPathSprite=qw,ne.PixiTextSprite=rC,ne.PixiVideoSprite=iC,ne.emitCustomEvent=Ea,ne.newCustomEventEmitter=N1,ne.useCustomEventListener=Fr,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
615
|
+
`)){var dt=it.offsetHeight+parseFloat(Z(it).marginTop)+parseFloat(Z(it).marginBottom);it.nextElementSibling.offsetTop>it.offsetTop+dt*1.5&&ot.insert(`
|
|
616
|
+
`)}return ot}function ve(it,ot){var dt={},pt=it.style||{};return pt.fontStyle&&Z(it).fontStyle==="italic"&&(dt.italic=!0),pt.fontWeight&&(Z(it).fontWeight.startsWith("bold")||parseInt(Z(it).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(ot=q(ot,dt)),parseFloat(pt.textIndent||0)>0&&(ot=new d.default().insert(" ").concat(ot)),ot}function Wt(it,ot){var dt=it.data;if(it.parentNode.tagName==="O:P")return ot.insert(dt.trim());if(dt.trim().length===0&&it.parentNode.classList.contains("ql-clipboard"))return ot;if(!Z(it.parentNode).whiteSpace.startsWith("pre")){var pt=function(Nt,Lt){return Lt=Lt.replace(/[^\u00a0]/g,""),Lt.length<1&&Nt?" ":Lt};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,pt.bind(pt,!0)),(it.previousSibling==null&&G(it.parentNode)||it.previousSibling!=null&&G(it.previousSibling))&&(dt=dt.replace(/^\s+/,pt.bind(pt,!1))),(it.nextSibling==null&&G(it.parentNode)||it.nextSibling!=null&&G(it.nextSibling))&&(dt=dt.replace(/\s+$/,pt.bind(pt,!1)))}return ot.insert(dt)}n.default=D,n.matchAttributor=et,n.matchBlot=nt,n.matchNewline=xt,n.matchSpacing=Rt,n.matchText=Wt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(_,b){for(var m=0;m<b.length;m++){var E=b[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),l=function y(_,b,m){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,b);if(E===void 0){var w=Object.getPrototypeOf(_);return w===null?void 0:y(w,b,m)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"optimize",value:function(m){l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),_}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var a=function(){function I(M,C){var F=[],j=!0,X=!1,V=void 0;try{for(var st=M[Symbol.iterator](),Y;!(j=(Y=st.next()).done)&&(F.push(Y.value),!(C&&F.length===C));j=!0);}catch(U){X=!0,V=U}finally{try{!j&&st.return&&st.return()}finally{if(X)throw V}}return F}return function(M,C){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return I(M,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function I(M,C){for(var F=0;F<C.length;F++){var j=C[F];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(M,j.key,j)}}return function(M,C,F){return C&&I(M.prototype,C),F&&I(M,F),M}}(),u=i(2),f=m(u),h=i(0),p=m(h),d=i(5),c=m(d),v=i(10),y=m(v),_=i(9),b=m(_);function m(I){return I&&I.__esModule?I:{default:I}}function E(I,M,C){return M in I?Object.defineProperty(I,M,{value:C,enumerable:!0,configurable:!0,writable:!0}):I[M]=C,I}function w(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}function x(I,M){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:I}function A(I,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);I.prototype=Object.create(M&&M.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(I,M):I.__proto__=M)}var P=(0,y.default)("quill:toolbar"),S=function(I){A(M,I);function M(C,F){w(this,M);var j=x(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,C,F));if(Array.isArray(j.options.container)){var X=document.createElement("div");L(X,j.options.container),C.container.parentNode.insertBefore(X,C.container),j.container=X}else typeof j.options.container=="string"?j.container=document.querySelector(j.options.container):j.container=j.options.container;if(!(j.container instanceof HTMLElement)){var V;return V=P.error("Container required for toolbar",j.options),x(j,V)}return j.container.classList.add("ql-toolbar"),j.controls=[],j.handlers={},Object.keys(j.options.handlers).forEach(function(st){j.addHandler(st,j.options.handlers[st])}),[].forEach.call(j.container.querySelectorAll("button, select"),function(st){j.attach(st)}),j.quill.on(c.default.events.EDITOR_CHANGE,function(st,Y){st===c.default.events.SELECTION_CHANGE&&j.update(Y)}),j.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var st=j.quill.selection.getRange(),Y=a(st,1),U=Y[0];j.update(U)}),j}return l(M,[{key:"addHandler",value:function(F,j){this.handlers[F]=j}},{key:"attach",value:function(F){var j=this,X=[].find.call(F.classList,function(st){return st.indexOf("ql-")===0});if(X){if(X=X.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[X]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[X]==null){P.warn("ignoring attaching to disabled format",X,F);return}if(p.default.query(X)==null){P.warn("ignoring attaching to nonexistent format",X,F);return}}var V=F.tagName==="SELECT"?"change":"click";F.addEventListener(V,function(st){var Y=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var U=F.options[F.selectedIndex];U.hasAttribute("selected")?Y=!1:Y=U.value||!1}else F.classList.contains("ql-active")?Y=!1:Y=F.value||!F.hasAttribute("value"),st.preventDefault();j.quill.focus();var N=j.quill.selection.getRange(),D=a(N,1),q=D[0];if(j.handlers[X]!=null)j.handlers[X].call(j,Y);else if(p.default.query(X).prototype instanceof p.default.Embed){if(Y=prompt("Enter "+X),!Y)return;j.quill.updateContents(new f.default().retain(q.index).delete(q.length).insert(E({},X,Y)),c.default.sources.USER)}else j.quill.format(X,Y,c.default.sources.USER);j.update(q)}),this.controls.push([X,F])}}},{key:"update",value:function(F){var j=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(X){var V=a(X,2),st=V[0],Y=V[1];if(Y.tagName==="SELECT"){var U=void 0;if(F==null)U=null;else if(j[st]==null)U=Y.querySelector("option[selected]");else if(!Array.isArray(j[st])){var N=j[st];typeof N=="string"&&(N=N.replace(/\"/g,'\\"')),U=Y.querySelector('option[value="'+N+'"]')}U==null?(Y.value="",Y.selectedIndex=-1):U.selected=!0}else if(F==null)Y.classList.remove("ql-active");else if(Y.hasAttribute("value")){var D=j[st]===Y.getAttribute("value")||j[st]!=null&&j[st].toString()===Y.getAttribute("value")||j[st]==null&&!Y.getAttribute("value");Y.classList.toggle("ql-active",D)}else Y.classList.toggle("ql-active",j[st]!=null)})}}]),M}(b.default);S.DEFAULTS={};function O(I,M,C){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+M),C!=null&&(F.value=C),I.appendChild(F)}function L(I,M){Array.isArray(M[0])||(M=[M]),M.forEach(function(C){var F=document.createElement("span");F.classList.add("ql-formats"),C.forEach(function(j){if(typeof j=="string")O(F,j);else{var X=Object.keys(j)[0],V=j[X];Array.isArray(V)?R(F,X,V):O(F,X,V)}}),I.appendChild(F)})}function R(I,M,C){var F=document.createElement("select");F.classList.add("ql-"+M),C.forEach(function(j){var X=document.createElement("option");j!==!1?X.setAttribute("value",j):X.setAttribute("selected","selected"),F.appendChild(X)}),I.appendChild(F)}S.DEFAULTS={container:null,handlers:{clean:function(){var M=this,C=this.quill.getSelection();if(C!=null)if(C.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(j){p.default.query(j,p.default.Scope.INLINE)!=null&&M.quill.format(j,!1)})}else this.quill.removeFormat(C,c.default.sources.USER)},direction:function(M){var C=this.quill.getFormat().align;M==="rtl"&&C==null?this.quill.format("align","right",c.default.sources.USER):!M&&C==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",M,c.default.sources.USER)},indent:function(M){var C=this.quill.getSelection(),F=this.quill.getFormat(C),j=parseInt(F.indent||0);if(M==="+1"||M==="-1"){var X=M==="+1"?1:-1;F.direction==="rtl"&&(X*=-1),this.quill.format("indent",j+X,c.default.sources.USER)}},link:function(M){M===!0&&(M=prompt("Enter link URL:")),this.quill.format("link",M,c.default.sources.USER)},list:function(M){var C=this.quill.getSelection(),F=this.quill.getFormat(C);M==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",M,c.default.sources.USER)}}},n.default=S,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(_,b){for(var m=0;m<b.length;m++){var E=b[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),l=function y(_,b,m){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,b);if(E===void 0){var w=Object.getPrototypeOf(_);return w===null?void 0:y(w,b,m)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(b,m){p(this,_);var E=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,b));return E.label.innerHTML=m,E.container.classList.add("ql-color-picker"),[].slice.call(E.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(w){w.classList.add("ql-primary")}),E}return a(_,[{key:"buildItem",value:function(m){var E=l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"buildItem",this).call(this,m);return E.style.backgroundColor=m.getAttribute("value")||"",E}},{key:"selectItem",value:function(m,E){l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,m,E);var w=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";w&&(w.tagName==="line"?w.style.stroke=x:w.style.fill=x)}}]),_}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(_,b){for(var m=0;m<b.length;m++){var E=b[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),l=function y(_,b,m){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,b);if(E===void 0){var w=Object.getPrototypeOf(_);return w===null?void 0:y(w,b,m)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(b,m){p(this,_);var E=d(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,b));return E.container.classList.add("ql-icon-picker"),[].forEach.call(E.container.querySelectorAll(".ql-picker-item"),function(w){w.innerHTML=m[w.getAttribute("data-value")||""]}),E.defaultItem=E.container.querySelector(".ql-selected"),E.selectItem(E.defaultItem),E}return a(_,[{key:"selectItem",value:function(m,E){l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,m,E),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),_}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){var d=this;l(this,f),this.quill=h,this.boundsContainer=p||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return a(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(p){var d=p.left+p.width/2-this.root.offsetWidth/2,c=p.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),_=0;if(y.right>v.right&&(_=v.right-y.right,this.root.style.left=d+_+"px"),y.left<v.left&&(_=v.left-y.left,this.root.style.left=d+_+"px"),y.bottom>v.bottom){var b=y.bottom-y.top,m=p.bottom-p.top+b;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return _}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function R(I,M){var C=[],F=!0,j=!1,X=void 0;try{for(var V=I[Symbol.iterator](),st;!(F=(st=V.next()).done)&&(C.push(st.value),!(M&&C.length===M));F=!0);}catch(Y){j=!0,X=Y}finally{try{!F&&V.return&&V.return()}finally{if(j)throw X}}return C}return function(I,M){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return R(I,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function R(I,M,C){I===null&&(I=Function.prototype);var F=Object.getOwnPropertyDescriptor(I,M);if(F===void 0){var j=Object.getPrototypeOf(I);return j===null?void 0:R(j,M,C)}else{if("value"in F)return F.value;var X=F.get;return X===void 0?void 0:X.call(C)}},u=function(){function R(I,M){for(var C=0;C<M.length;C++){var F=M[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(I,F.key,F)}}return function(I,M,C){return M&&R(I.prototype,M),C&&R(I,C),I}}(),f=i(3),h=w(f),p=i(8),d=w(p),c=i(43),v=w(c),y=i(27),_=w(y),b=i(15),m=i(41),E=w(m);function w(R){return R&&R.__esModule?R:{default:R}}function x(R,I){if(!(R instanceof I))throw new TypeError("Cannot call a class as a function")}function A(R,I){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:R}function P(R,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);R.prototype=Object.create(I&&I.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(R,I):R.__proto__=I)}var S=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=function(R){P(I,R);function I(M,C){x(this,I),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=S);var F=A(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,M,C));return F.quill.container.classList.add("ql-snow"),F}return u(I,[{key:"extendToolbar",value:function(C){C.container.classList.add("ql-snow"),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),E.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),E.default),this.tooltip=new L(this.quill,this.options.bounds),C.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,j){C.handlers.link.call(C,!j.format.link)})}}]),I}(v.default);O.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(I){if(I){var M=this.quill.getSelection();if(M==null||M.length==0)return;var C=this.quill.getText(M);/^\S+@\S+\.\S+$/.test(C)&&C.indexOf("mailto:")!==0&&(C="mailto:"+C);var F=this.quill.theme.tooltip;F.edit("link",C)}else this.quill.format("link",!1)}}}}});var L=function(R){P(I,R);function I(M,C){x(this,I);var F=A(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,M,C));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(I,[{key:"listen",value:function(){var C=this;l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){C.root.classList.contains("ql-editing")?C.save():C.edit("link",C.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(C.linkRange!=null){var j=C.linkRange;C.restoreFocus(),C.quill.formatText(j,"link",!1,d.default.sources.USER),delete C.linkRange}F.preventDefault(),C.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(F,j,X){if(F!=null){if(F.length===0&&X===d.default.sources.USER){var V=C.quill.scroll.descendant(_.default,F.index),st=a(V,2),Y=st[0],U=st[1];if(Y!=null){C.linkRange=new b.Range(F.index-U,Y.length());var N=_.default.formats(Y.domNode);C.preview.textContent=N,C.preview.setAttribute("href",N),C.show(),C.position(C.quill.getBounds(C.linkRange));return}}else delete C.linkRange;C.hide()}})}},{key:"show",value:function(){l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),I}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(29),l=ft(a),u=i(36),f=i(38),h=i(64),p=i(65),d=ft(p),c=i(66),v=ft(c),y=i(67),_=ft(y),b=i(37),m=i(26),E=i(39),w=i(40),x=i(56),A=ft(x),P=i(68),S=ft(P),O=i(27),L=ft(O),R=i(69),I=ft(R),M=i(70),C=ft(M),F=i(71),j=ft(F),X=i(72),V=ft(X),st=i(73),Y=ft(st),U=i(13),N=ft(U),D=i(74),q=ft(D),Z=i(75),K=ft(Z),G=i(57),z=ft(G),tt=i(41),et=ft(tt),nt=i(28),ht=ft(nt),vt=i(59),mt=ft(vt),xt=i(60),Rt=ft(xt),ve=i(61),Wt=ft(ve),it=i(108),ot=ft(it),dt=i(62),pt=ft(dt);function ft(Nt){return Nt&&Nt.__esModule?Nt:{default:Nt}}l.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":b.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":E.FontClass,"attributors/class/size":w.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":b.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":E.FontStyle,"attributors/style/size":w.SizeStyle},!0),l.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":b.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":E.FontClass,"formats/size":w.SizeClass,"formats/blockquote":d.default,"formats/code-block":N.default,"formats/header":v.default,"formats/list":_.default,"formats/bold":A.default,"formats/code":U.Code,"formats/italic":S.default,"formats/link":L.default,"formats/script":I.default,"formats/strike":C.default,"formats/underline":j.default,"formats/image":V.default,"formats/video":Y.default,"formats/list/item":y.ListItem,"modules/formula":q.default,"modules/syntax":K.default,"modules/toolbar":z.default,"themes/bubble":ot.default,"themes/snow":pt.default,"ui/icons":et.default,"ui/picker":ht.default,"ui/icon-picker":Rt.default,"ui/color-picker":mt.default,"ui/tooltip":Wt.default},!0),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var a=function(){function _(b,m){for(var E=0;E<m.length;E++){var w=m[E];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,m,E){return m&&_(b.prototype,m),E&&_(b,E),b}}(),l=function _(b,m,E){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,m);if(w===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:_(x,m,E)}else{if("value"in w)return w.value;var A=w.get;return A===void 0?void 0:A.call(E)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function p(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function d(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return p(this,b),d(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"add",value:function(E,w){if(w==="+1"||w==="-1"){var x=this.value(E)||0;w=w==="+1"?x+1:x-1}return w===0?(this.remove(E),!0):l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"add",this).call(this,E,w)}},{key:"canAdd",value:function(E,w){return l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,E,w)||l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,E,parseInt(w))}},{key:"value",value:function(E){return parseInt(l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,E))||void 0}}]),b}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="blockquote",d.tagName="blockquote",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function v(y,_){for(var b=0;b<_.length;b++){var m=_[b];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,_,b){return _&&v(y.prototype,_),b&&v(y,b),y}}(),l=i(4),u=f(l);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function p(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function d(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){d(y,v);function y(){return h(this,y),p(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,null,[{key:"formats",value:function(b){return this.tagName.indexOf(b.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var a=function(){function x(A,P){for(var S=0;S<P.length;S++){var O=P[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}return function(A,P,S){return P&&x(A.prototype,P),S&&x(A,S),A}}(),l=function x(A,P,S){A===null&&(A=Function.prototype);var O=Object.getOwnPropertyDescriptor(A,P);if(O===void 0){var L=Object.getPrototypeOf(A);return L===null?void 0:x(L,P,S)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(S)}},u=i(0),f=v(u),h=i(4),p=v(h),d=i(25),c=v(d);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,A,P){return A in x?Object.defineProperty(x,A,{value:P,enumerable:!0,configurable:!0,writable:!0}):x[A]=P,x}function _(x,A){if(!(x instanceof A))throw new TypeError("Cannot call a class as a function")}function b(x,A){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:x}function m(x,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);x.prototype=Object.create(A&&A.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(x,A):x.__proto__=A)}var E=function(x){m(A,x);function A(){return _(this,A),b(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return a(A,[{key:"format",value:function(S,O){S===w.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,S,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(S,O){return this.parent.isolate(this.offset(this.parent),this.length()),S===this.parent.statics.blotName?(this.parent.replaceWith(S,O),this):(this.parent.unwrap(),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,S,O))}}],[{key:"formats",value:function(S){return S.tagName===this.tagName?void 0:l(A.__proto__||Object.getPrototypeOf(A),"formats",this).call(this,S)}}]),A}(p.default);E.blotName="list-item",E.tagName="LI";var w=function(x){m(A,x),a(A,null,[{key:"create",value:function(S){var O=S==="ordered"?"OL":"UL",L=l(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,O);return(S==="checked"||S==="unchecked")&&L.setAttribute("data-checked",S==="checked"),L}},{key:"formats",value:function(S){if(S.tagName==="OL")return"ordered";if(S.tagName==="UL")return S.hasAttribute("data-checked")?S.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function A(P){_(this,A);var S=b(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,P)),O=function(R){if(R.target.parentNode===P){var I=S.statics.formats(P),M=f.default.find(R.target);I==="checked"?M.format("list","unchecked"):I==="unchecked"&&M.format("list","checked")}};return P.addEventListener("touchstart",O),P.addEventListener("mousedown",O),S}return a(A,[{key:"format",value:function(S,O){this.children.length>0&&this.children.tail.format(S,O)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(S,O){if(S instanceof E)l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,S,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(S,R)}}},{key:"optimize",value:function(S){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,S);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(S){if(S.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);S.moveChildren(O),this.appendChild(O)}l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,S)}}]),A}(c.default);w.blotName="list",w.scope=f.default.Scope.BLOCK_BLOT,w.tagName=["OL","UL"],w.defaultChild="list-item",w.allowedChildren=[E],n.ListItem=E,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(56),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="italic",d.tagName=["EM","I"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(_,b){for(var m=0;m<b.length;m++){var E=b[m];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),l=function y(_,b,m){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,b);if(E===void 0){var w=Object.getPrototypeOf(_);return w===null?void 0:y(w,b,m)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),_}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="strike",d.tagName="S",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),l=u(a);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function p(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="underline",d.tagName="U",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function b(m,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,E,w){return E&&b(m.prototype,E),w&&b(m,w),m}}(),l=function b(m,E,w){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,E);if(x===void 0){var A=Object.getPrototypeOf(m);return A===null?void 0:b(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(0),f=p(u),h=i(27);function p(b){return b&&b.__esModule?b:{default:b}}function d(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function c(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function v(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var y=["alt","height","width"],_=function(b){v(m,b);function m(){return d(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"format",value:function(w,x){y.indexOf(w)>-1?x?this.domNode.setAttribute(w,x):this.domNode.removeAttribute(w):l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,w,x)}}],[{key:"create",value:function(w){var x=l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,w);return typeof w=="string"&&x.setAttribute("src",this.sanitize(w)),x}},{key:"formats",value:function(w){return y.reduce(function(x,A){return w.hasAttribute(A)&&(x[A]=w.getAttribute(A)),x},{})}},{key:"match",value:function(w){return/\.(jpe?g|gif|png)$/.test(w)||/^data:image\/.+;base64/.test(w)}},{key:"sanitize",value:function(w){return(0,h.sanitize)(w,["http","https","data"])?w:"//:0"}},{key:"value",value:function(w){return w.getAttribute("src")}}]),m}(f.default.Embed);_.blotName="image",_.tagName="IMG",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function b(m,E){for(var w=0;w<E.length;w++){var x=E[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,E,w){return E&&b(m.prototype,E),w&&b(m,w),m}}(),l=function b(m,E,w){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,E);if(x===void 0){var A=Object.getPrototypeOf(m);return A===null?void 0:b(A,E,w)}else{if("value"in x)return x.value;var P=x.get;return P===void 0?void 0:P.call(w)}},u=i(4),f=i(27),h=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function d(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function c(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function v(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var y=["height","width"],_=function(b){v(m,b);function m(){return d(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"format",value:function(w,x){y.indexOf(w)>-1?x?this.domNode.setAttribute(w,x):this.domNode.removeAttribute(w):l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,w,x)}}],[{key:"create",value:function(w){var x=l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,w);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(w)),x}},{key:"formats",value:function(w){return y.reduce(function(x,A){return w.hasAttribute(A)&&(x[A]=w.getAttribute(A)),x},{})}},{key:"sanitize",value:function(w){return h.default.sanitize(w)}},{key:"value",value:function(w){return w.getAttribute("src")}}]),m}(u.BlockEmbed);_.blotName="video",_.className="ql-video",_.tagName="IFRAME",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var a=function(){function w(x,A){for(var P=0;P<A.length;P++){var S=A[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(x,S.key,S)}}return function(x,A,P){return A&&w(x.prototype,A),P&&w(x,P),x}}(),l=function w(x,A,P){x===null&&(x=Function.prototype);var S=Object.getOwnPropertyDescriptor(x,A);if(S===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:w(O,A,P)}else{if("value"in S)return S.value;var L=S.get;return L===void 0?void 0:L.call(P)}},u=i(35),f=v(u),h=i(5),p=v(h),d=i(9),c=v(d);function v(w){return w&&w.__esModule?w:{default:w}}function y(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function _(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function b(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var m=function(w){b(x,w);function x(){return y(this,x),_(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,null,[{key:"create",value:function(P){var S=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,P);return typeof P=="string"&&(window.katex.render(P,S,{throwOnError:!1,errorColor:"#f00"}),S.setAttribute("data-value",P)),S}},{key:"value",value:function(P){return P.getAttribute("data-value")}}]),x}(f.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var E=function(w){b(x,w),a(x,null,[{key:"register",value:function(){p.default.register(m,!0)}}]);function x(){y(this,x);var A=_(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return A}return x}(c.default);n.FormulaBlot=m,n.default=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var a=function(){function P(S,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(S,R.key,R)}}return function(S,O,L){return O&&P(S.prototype,O),L&&P(S,L),S}}(),l=function P(S,O,L){S===null&&(S=Function.prototype);var R=Object.getOwnPropertyDescriptor(S,O);if(R===void 0){var I=Object.getPrototypeOf(S);return I===null?void 0:P(I,O,L)}else{if("value"in R)return R.value;var M=R.get;return M===void 0?void 0:M.call(L)}},u=i(0),f=_(u),h=i(5),p=_(h),d=i(9),c=_(d),v=i(13),y=_(v);function _(P){return P&&P.__esModule?P:{default:P}}function b(P,S){if(!(P instanceof S))throw new TypeError("Cannot call a class as a function")}function m(P,S){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:P}function E(P,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);P.prototype=Object.create(S&&S.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(P,S):P.__proto__=S)}var w=function(P){E(S,P);function S(){return b(this,S),m(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),S}(y.default);w.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),A=function(P){E(S,P),a(S,null,[{key:"register",value:function(){p.default.register(x,!0),p.default.register(w,!0)}}]);function S(O,L){b(this,S);var R=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,O,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var I=null;return R.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(I),I=setTimeout(function(){R.highlight(),I=null},R.options.interval)}),R.highlight(),R}return a(S,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(p.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(w).forEach(function(I){I.highlight(L.options.highlight)}),this.quill.update(p.default.sources.SILENT),R!=null&&this.quill.setSelection(R,p.default.sources.SILENT)}}}]),S}(c.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(P){var S=window.hljs.highlightAuto(P);return S.value}}(),interval:1e3},n.CodeBlock=w,n.CodeToken=x,n.default=A},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var a=function S(O,L,R){O===null&&(O=Function.prototype);var I=Object.getOwnPropertyDescriptor(O,L);if(I===void 0){var M=Object.getPrototypeOf(O);return M===null?void 0:S(M,L,R)}else{if("value"in I)return I.value;var C=I.get;return C===void 0?void 0:C.call(R)}},l=function(){function S(O,L){for(var R=0;R<L.length;R++){var I=L[R];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(O,I.key,I)}}return function(O,L,R){return L&&S(O.prototype,L),R&&S(O,R),O}}(),u=i(3),f=b(u),h=i(8),p=b(h),d=i(43),c=b(d),v=i(15),y=i(41),_=b(y);function b(S){return S&&S.__esModule?S:{default:S}}function m(S,O){if(!(S instanceof O))throw new TypeError("Cannot call a class as a function")}function E(S,O){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:S}function w(S,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);S.prototype=Object.create(O&&O.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(S,O):S.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],A=function(S){w(O,S);function O(L,R){m(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var I=E(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return I.quill.container.classList.add("ql-bubble"),I}return l(O,[{key:"extendToolbar",value:function(R){this.tooltip=new P(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),_.default)}}]),O}(c.default);A.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var P=function(S){w(O,S);function O(L,R){m(this,O);var I=E(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return I.quill.on(p.default.events.EDITOR_CHANGE,function(M,C,F,j){if(M===p.default.events.SELECTION_CHANGE)if(C!=null&&C.length>0&&j===p.default.sources.USER){I.show(),I.root.style.left="0px",I.root.style.width="",I.root.style.width=I.root.offsetWidth+"px";var X=I.quill.getLines(C.index,C.length);if(X.length===1)I.position(I.quill.getBounds(C));else{var V=X[X.length-1],st=I.quill.getIndex(V),Y=Math.min(V.length()-1,C.index+C.length-st),U=I.quill.getBounds(new v.Range(st,Y));I.position(U)}}else document.activeElement!==I.textbox&&I.quill.hasFocus()&&I.hide()}),I}return l(O,[{key:"listen",value:function(){var R=this;a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var I=R.quill.getSelection();I!=null&&R.position(R.quill.getBounds(I))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var I=a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,R),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",I===0)return I;M.style.marginLeft=-1*I-M.offsetWidth/2+"px"}}]),O}(d.BaseTooltip);P.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=P,n.default=A},function(r,n,i){r.exports=i(63)}]).default})})(kp);var tC=kp.exports;const eC=Tn(tC),qF="",rC=Tt.forwardRef((e,t)=>{const[r,n]=_t.useState(!1);console.log("allProps",e);const i=_t.useRef(null),a=_t.useRef(null),l=_t.useRef(null),u=_t.useRef(null),f=_t.useRef(16),h=_t.useRef(null),{uniqueId:p,text:d,disabled:c,transformation:v,onTextUpdate:y,pointerdown:_}=e,{x:b,y:m,fontFamily:E="Arial",fontWeight:w="normal",fontStyle:x="normal",fontSize:A=16,fill:P="black",stroke:S,strokeThickness:O=0,blurRadius:L=0,blurEnabled:R=!1,dropShadowColor:I=null,wordWrapWidth:M=5e7,leading:C=0,letterSpacing:F}=v;Tt.useEffect(()=>{f.current=Number(A)},[A]);const j=["italic","oblique"].includes(x)?x:void 0,X=["bold","lighter","100","200","300"].includes(w)?w:void 0,V=Number(F)>0?F:void 0,st=Tt.useMemo(()=>new wn.TextStyle({fontFamily:E,fontSize:A,fill:P||"white",...S&&O>0&&{stroke:S,strokeThickness:O},...j&&{fontStyle:j},...X&&{fontWeight:X},...V&&{letterSpacing:V},...R&&{dropShadow:!0,dropShadowBlur:Number(L),dropShadowColor:(I==null?void 0:I.toString())||"black",dropShadowDistance:0},wordWrap:!0,breakWords:!0,wordWrapWidth:M||500,leading:C||0}),[R,L,P,E,A,C,j,X,V,I,S,O,M]);Tt.useEffect(()=>{h.current={...v}},[v]);const Y=U=>{y&&y({text:U,uniqueId:p,droptype:"titles"})};return Tt.useEffect(()=>{if(r&&l.current){let N=document.getElementById("note-editor");if(N){N.style.position="absolute",N.style.zIndex="10",N.style.left=b+"px",N.style.top=m+"px",N.style.backgroundColor="var(--chakra-color-darkShark)",N.style.transform="scale(1.5)",N.style.width="300px",N.style.height="100px",N.style.color="#fff",N.style.fontSize="20px",N.style.border="1px solid #CBCEE0";const D={esc:{key:27,handler:function(){n(!1)}},enter:{key:13,handler:function(){n(!1)}}};var U=new eC("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...D}}},placeholder:"Compose your text here...",theme:"snow"});U.on("text-change",function(){Y(U.root.innerText)}),U.setText(d),U.focus(),U.off("text-change",()=>{console.log("removed")}),U.hasFocus()||(N.style.display="none")}}},[b,m,r]),Zt.jsx(Ei,{...e,ref:t,children:Zt.jsxs(pe.Container,{ref:i,children:[r&&Zt.jsx(pe.Container,{ref:l}),Zt.jsx(pe.Container,{alpha:r?0:1,ref:u,children:Zt.jsx(pe.Text,{style:st,x:b,y:m,anchor:.5,text:d,...!r&&!c&&{interactive:!0,buttonMode:!0,pointerdown:_},ref:a})})]})})}),nC={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},iC=Tt.forwardRef((e,t)=>{const[,r]=Tt.useState(!1),[,n]=Tt.useState({isWaiting:!1,isStalled:!1}),[i,a]=Tt.useState(),l=_t.useRef(null),u=_t.useRef(null),f=_t.useRef(null),h=_t.useRef(nC),p=_t.useRef(),{tl:d,isDragging:c}=_t.useContext(mi),{uniqueId:v,mute:y=!1,src:_,frameStartAt:b,frameEndAt:m,transformation:{x:E,y:w,width:x,height:A,animation:P}}=e,S=_||"",O=Tt.useMemo(()=>{const C=document.createElement("video");return C.src=_,C.crossOrigin="Anonymus",C.autoplay=!1,C.currentTime=b,C},[_,b]);wr(qe.PAUSE,()=>{if(f.current){const C=f.current;C.currentTime>0&&!C.paused&&!C.ended&&C.readyState>C.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}}),Tt.useEffect(()=>{f.current&&(c?(f.current.pause(),h.current.isPlaying=!1,h.current.isDragging=!0):h.current.isDragging=!1)},[c]);const L=C=>{f.current&&(f.current.currentTime=Number(C),c||(f.current.currentTime=Number(C),f.current.play(),h.current.isPlaying=!0))},R=()=>{if(f.current){const C=f.current;C.currentTime>0&&!C.paused&&!C.ended&&C.readyState>C.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}},I=()=>{},M=()=>{var C;if(f.current&&p.current){const F=b+((C=p.current)==null?void 0:C.time());Math.abs(f.current.currentTime-F);const j=f.current,X=j.currentTime>0&&!j.paused&&!j.ended&&j.readyState>j.HAVE_CURRENT_DATA;h.current.isDragging?(f.current.currentTime=F,f.current.play(),setTimeout(()=>{h.current.isPlaying=!1,f.current&&f.current.pause()},300),h.current.isPlaying=!1):h.current.isPlaying||(X||f.current.play(),h.current.isPlaying=!0)}};return _t.useEffect(()=>{let C=Xe.context(()=>{});if(u.current&&d.current){const F={duration:Number(m)-Number(b),onStart:L,onComplete:R,onStartParams:[b,m],onCompleteParams:[],onInterrupt:I,onUpdate:M,onUpdateParams:[b,m]};C=Xe.context(()=>{p.current=Xe.from(u.current,F,b),d.current.add(p.current,b)})}return()=>C.revert()},[P,b,m]),Tt.useEffect(()=>{u.current&&r(!0)},[]),Tt.useEffect(()=>{f.current&&(f.current.muted=y)},[y]),Tt.useEffect(()=>{if(f.current){const C=f.current;C.currentTime>0&&!C.paused&&!C.ended&&C.readyState>C.HAVE_CURRENT_DATA&&c&&(f.current.pause(),h.current.isPlaying=!1)}},[c]),Tt.useEffect(()=>{const C=Math.round((Number(b)+Number.EPSILON)*100)/100,F=function(){f.current&&(f.current.currentTime=C)},j=function(){if(f.current){const D=f.current;D.currentTime>0&&!D.paused&&!D.ended&&D.readyState>D.HAVE_CURRENT_DATA&&f.current.pause()}n({isWaiting:!1,isStalled:!1})},X=function(){f.current&&f.current.pause(),n({isWaiting:!0,isStalled:!1})},V=function(){n({isWaiting:!1,isStalled:!1})},st=function(){n({isWaiting:!1,isStalled:!0})},Y=Math.round((Number(b)+Number.EPSILON)*100)/100,U=Math.round((Number(m)+Number.EPSILON)*100)/100,N=`${S}#t=${Y},${U}`;return console.log("urlTimestap",N),wn.Texture.fromLoader(O,N,v,{pixiIdPrefix:v,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(D=>{D&&(a(D),f.current=D.baseTexture.resource.source,f.current.id=v,f.current.addEventListener("loadedmetadata",F),f.current.addEventListener("ended",j),f.current.addEventListener("loadstart",X),f.current.addEventListener("canplaythrough",V),f.current.addEventListener("stalled",st))}),()=>{f.current&&(f.current.removeEventListener("loadedmetadata",F),f.current.removeEventListener("ended",j),f.current.removeEventListener("loadstart",X),f.current.removeEventListener("canplaythrough",V),f.current.removeEventListener("stalled",st))}},[S,v,b,m,O]),Zt.jsx(Ei,{...e,ref:t,ignoreTlForVideo:!0,children:Zt.jsx(pe.Container,{ref:u,children:i&&Zt.jsx(pe.Sprite,{texture:i,width:x,height:A,anchor:.5,x:E,y:w,ref:l})})})});var Lp=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Lp||{}),Fp=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Fp||{});ne.Animations=Lp,ne.BlendModes=Fp,ne.Events=qe,ne.GsapPixieContext=mi,ne.GsapPixieContextProvider=P1,ne.PixiAnimatedSprite=Pp,ne.PixiAudioSprite=yT,ne.PixiGifSprite=QR,ne.PixiImageSprite=CE,ne.PixiSvgPathSprite=qw,ne.PixiTextSprite=rC,ne.PixiVideoSprite=iC,ne.emitCustomEvent=Ea,ne.newCustomEventEmitter=N1,ne.useCustomEventListener=wr,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|