@netless/app-slide 0.2.8 → 0.2.9
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/SlideController/index.d.ts +1 -0
- package/dist/SlideDocsViewer/index.d.ts +3 -0
- package/dist/main.cjs.js +14 -14
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +19 -2
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +14 -14
- package/dist/main.iife.js.map +1 -1
- package/package.json +1 -2
- package/src/SlideController/index.ts +1 -0
- package/src/SlideDocsViewer/index.ts +18 -0
- package/src/SlideDocsViewer/style.scss +16 -0
- package/src/index.ts +1 -0
package/dist/main.iife.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var NetlessAppSlide=function(yn){"use strict";var LO=Object.defineProperty,OO=Object.defineProperties;var NO=Object.getOwnPropertyDescriptors;var VT=Object.getOwnPropertySymbols;var DO=Object.prototype.hasOwnProperty,FO=Object.prototype.propertyIsEnumerable;var WT=(yn,yi,vo)=>yi in yn?LO(yn,yi,{enumerable:!0,configurable:!0,writable:!0,value:vo}):yn[yi]=vo,ly=(yn,yi)=>{for(var vo in yi||(yi={}))DO.call(yi,vo)&&WT(yn,vo,yi[vo]);if(VT)for(var vo of VT(yi))FO.call(yi,vo)&&WT(yn,vo,yi[vo]);return yn},XT=(yn,yi)=>OO(yn,NO(yi));var yi=function(T){var M={};function v(b){if(M[b])return M[b].exports;var q=M[b]={i:b,l:!1,exports:{}};return T[b].call(q.exports,q,q.exports,v),q.l=!0,q.exports}return v.m=T,v.c=M,v.d=function(b,q,ht){v.o(b,q)||Object.defineProperty(b,q,{enumerable:!0,get:ht})},v.r=function(b){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(b,"__esModule",{value:!0})},v.t=function(b,q){if(1&q&&(b=v(b)),8&q||4&q&&typeof b=="object"&&b&&b.__esModule)return b;var ht=Object.create(null);if(v.r(ht),Object.defineProperty(ht,"default",{enumerable:!0,value:b}),2&q&&typeof b!="string")for(var
|
|
1
|
+
var NetlessAppSlide=function(yn){"use strict";var LO=Object.defineProperty,OO=Object.defineProperties;var NO=Object.getOwnPropertyDescriptors;var VT=Object.getOwnPropertySymbols;var DO=Object.prototype.hasOwnProperty,FO=Object.prototype.propertyIsEnumerable;var WT=(yn,yi,vo)=>yi in yn?LO(yn,yi,{enumerable:!0,configurable:!0,writable:!0,value:vo}):yn[yi]=vo,ly=(yn,yi)=>{for(var vo in yi||(yi={}))DO.call(yi,vo)&&WT(yn,vo,yi[vo]);if(VT)for(var vo of VT(yi))FO.call(yi,vo)&&WT(yn,vo,yi[vo]);return yn},XT=(yn,yi)=>OO(yn,NO(yi));var yi=function(T){var M={};function v(b){if(M[b])return M[b].exports;var q=M[b]={i:b,l:!1,exports:{}};return T[b].call(q.exports,q,q.exports,v),q.l=!0,q.exports}return v.m=T,v.c=M,v.d=function(b,q,ht){v.o(b,q)||Object.defineProperty(b,q,{enumerable:!0,get:ht})},v.r=function(b){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(b,"__esModule",{value:!0})},v.t=function(b,q){if(1&q&&(b=v(b)),8&q||4&q&&typeof b=="object"&&b&&b.__esModule)return b;var ht=Object.create(null);if(v.r(ht),Object.defineProperty(ht,"default",{enumerable:!0,value:b}),2&q&&typeof b!="string")for(var V in b)v.d(ht,V,function(P){return b[P]}.bind(null,V));return ht},v.n=function(b){var q=b&&b.__esModule?function(){return b.default}:function(){return b};return v.d(q,"a",q),q},v.o=function(b,q){return Object.prototype.hasOwnProperty.call(b,q)},v.p="",v(v.s=64)}([function(T,M,v){(function(b,q){var ht;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Lodash <https://lodash.com/>
|
|
4
4
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
5
|
* Released under MIT license <https://lodash.com/license>
|
|
6
6
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
7
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/(function(){var W="Expected a function",P="__lodash_placeholder__",V=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],z="[object Arguments]",k="[object Array]",Z="[object Boolean]",vt="[object Date]",Ot="[object Error]",Nt="[object Function]",E="[object GeneratorFunction]",L="[object Map]",O="[object Number]",Y="[object Object]",C="[object RegExp]",j="[object Set]",X="[object String]",K="[object Symbol]",qt="[object WeakMap]",ge="[object ArrayBuffer]",Ct="[object DataView]",ot="[object Float32Array]",yt="[object Float64Array]",Pt="[object Int8Array]",H="[object Int16Array]",ft="[object Int32Array]",Et="[object Uint8Array]",At="[object Uint16Array]",Rt="[object Uint32Array]",Wt=/\b__p \+= '';/g,$t=/\b(__p \+=) '' \+/g,ye=/(__e\(.*?\)|\b__t\)) \+\n'';/g,me=/&(?:amp|lt|gt|quot|#39);/g,ui=/[&<>"']/g,be=RegExp(me.source),ei=RegExp(ui.source),Ze=/<%-([\s\S]+?)%>/g,ri=/<%([\s\S]+?)%>/g,De=/<%=([\s\S]+?)%>/g,ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fi=/^\w*$/,Pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qi=/[\\^$.*+?()[\]{}|]/g,Li=RegExp(Qi.source),Gi=/^\s+/,Nn=/\s/,tn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zn=/\{\n\/\* \[wrapped with (.+)\] \*/,Kn=/,? & /,ka=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ws=/[()=,{}\[\]\/\s]/,qu=/\\(\\)?/g,Ua=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,to=/\w*$/,J=/^[-+]0x[0-9a-f]+$/i,st=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,Tt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zt=/($^)/,ne=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",xe="[\\ud800-\\udfff]",Ie="["+ae+"]",Ge="["+se+"]",qe="\\d+",pi="[\\u2700-\\u27bf]",fi="[a-z\\xdf-\\xf6\\xf8-\\xff]",Tr="[^\\ud800-\\udfff"+ae+qe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Do="\\ud83c[\\udffb-\\udfff]",Xs="[^\\ud800-\\udfff]",Nl="(?:\\ud83c[\\udde6-\\uddff]){2}",Yi="[\\ud800-\\udbff][\\udc00-\\udfff]",cs="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Kp="(?:"+fi+"|"+Tr+")",qs="(?:"+cs+"|"+Tr+")",Qp="(?:"+Ge+"|"+Do+")?",ds="[\\ufe0e\\ufe0f]?"+Qp+("(?:\\u200d(?:"+[Xs,Nl,Yi].join("|")+")[\\ufe0e\\ufe0f]?"+Qp+")*"),tf="(?:"+[pi,Nl,Yi].join("|")+")"+ds,ef="(?:"+[Xs+Ge+"?",Ge,Nl,Yi,xe].join("|")+")",Dl=RegExp("['\u2019]","g"),nf=RegExp(Ge,"g"),Ys=RegExp(Do+"(?="+Do+")|"+ef+ds,"g"),Fo=RegExp([cs+"?"+fi+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[Ie,cs,"$"].join("|")+")",qs+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[Ie,cs+Kp,"$"].join("|")+")",cs+"?"+Kp+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",cs+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qe,tf].join("|"),"g"),$s=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),rf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,of=["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"],sf=-1,Ii={};Ii[ot]=Ii[yt]=Ii[Pt]=Ii[H]=Ii[ft]=Ii[Et]=Ii["[object Uint8ClampedArray]"]=Ii[At]=Ii[Rt]=!0,Ii[z]=Ii[k]=Ii[ge]=Ii[Z]=Ii[Ct]=Ii[vt]=Ii[Ot]=Ii[Nt]=Ii[L]=Ii[O]=Ii[Y]=Ii[C]=Ii[j]=Ii[X]=Ii[qt]=!1;var Bi={};Bi[z]=Bi[k]=Bi[ge]=Bi[Ct]=Bi[Z]=Bi[vt]=Bi[ot]=Bi[yt]=Bi[Pt]=Bi[H]=Bi[ft]=Bi[L]=Bi[O]=Bi[Y]=Bi[C]=Bi[j]=Bi[X]=Bi[K]=Bi[Et]=Bi["[object Uint8ClampedArray]"]=Bi[At]=Bi[Rt]=!0,Bi[Ot]=Bi[Nt]=Bi[qt]=!1;var Bo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Er=parseFloat,af=parseInt,Xc=typeof b=="object"&&b&&b.Object===Object&&b,lf=typeof self=="object"&&self&&self.Object===Object&&self,en=Xc||lf||Function("return this")(),Js=M&&!M.nodeType&&M,Ga=Js&&typeof q=="object"&&q&&!q.nodeType&&q,qc=Ga&&Ga.exports===Js,Yu=qc&&Xc.process,Mr=function(){try{var It=Ga&&Ga.require&&Ga.require("util").types;return It||Yu&&Yu.binding&&Yu.binding("util")}catch{}}(),Yc=Mr&&Mr.isArrayBuffer,$c=Mr&&Mr.isDate,$u=Mr&&Mr.isMap,Ju=Mr&&Mr.isRegExp,Zu=Mr&&Mr.isSet,Ku=Mr&&Mr.isTypedArray;function rr(It,Qt,ie){switch(ie.length){case 0:return It.call(Qt);case 1:return It.call(Qt,ie[0]);case 2:return It.call(Qt,ie[0],ie[1]);case 3:return It.call(Qt,ie[0],ie[1],ie[2])}return It.apply(Qt,ie)}function Jc(It,Qt,ie,Se){for(var Be=-1,gi=It==null?0:It.length;++Be<gi;){var ln=It[Be];Qt(Se,ln,ie(ln),It)}return Se}function dr(It,Qt){for(var ie=-1,Se=It==null?0:It.length;++ie<Se&&Qt(It[ie],ie,It)!==!1;);return It}function Zc(It,Qt){for(var ie=It==null?0:It.length;ie--&&Qt(It[ie],ie,It)!==!1;);return It}function Kc(It,Qt){for(var ie=-1,Se=It==null?0:It.length;++ie<Se;)if(!Qt(It[ie],ie,It))return!1;return!0}function yo(It,Qt){for(var ie=-1,Se=It==null?0:It.length,Be=0,gi=[];++ie<Se;){var ln=It[ie];Qt(ln,ie,It)&&(gi[Be++]=ln)}return gi}function Ha(It,Qt){return!!(It!=null&&It.length)&&Zs(It,Qt,0)>-1}function Qu(It,Qt,ie){for(var Se=-1,Be=It==null?0:It.length;++Se<Be;)if(ie(Qt,It[Se]))return!0;return!1}function Hi(It,Qt){for(var ie=-1,Se=It==null?0:It.length,Be=Array(Se);++ie<Se;)Be[ie]=Qt(It[ie],ie,It);return Be}function ko(It,Qt){for(var ie=-1,Se=Qt.length,Be=It.length;++ie<Se;)It[Be+ie]=Qt[ie];return It}function th(It,Qt,ie,Se){var Be=-1,gi=It==null?0:It.length;for(Se&&gi&&(ie=It[++Be]);++Be<gi;)ie=Qt(ie,It[Be],Be,It);return ie}function uf(It,Qt,ie,Se){var Be=It==null?0:It.length;for(Se&&Be&&(ie=It[--Be]);Be--;)ie=Qt(ie,It[Be],Be,It);return ie}function eh(It,Qt){for(var ie=-1,Se=It==null?0:It.length;++ie<Se;)if(Qt(It[ie],ie,It))return!0;return!1}var hf=ih("length");function Qc(It,Qt,ie){var Se;return ie(It,function(Be,gi,ln){if(Qt(Be,gi,ln))return Se=gi,!1}),Se}function Fl(It,Qt,ie,Se){for(var Be=It.length,gi=ie+(Se?1:-1);Se?gi--:++gi<Be;)if(Qt(It[gi],gi,It))return gi;return-1}function Zs(It,Qt,ie){return Qt==Qt?function(Se,Be,gi){for(var ln=gi-1,Ar=Se.length;++ln<Ar;)if(Se[ln]===Be)return ln;return-1}(It,Qt,ie):Fl(It,td,ie)}function cf(It,Qt,ie,Se){for(var Be=ie-1,gi=It.length;++Be<gi;)if(Se(It[Be],Qt))return Be;return-1}function td(It){return It!=It}function ed(It,Qt){var ie=It==null?0:It.length;return ie?rh(It,Qt)/ie:NaN}function ih(It){return function(Qt){return Qt==null?void 0:Qt[It]}}function nh(It){return function(Qt){return It==null?void 0:It[Qt]}}function id(It,Qt,ie,Se,Be){return Be(It,function(gi,ln,Ar){ie=Se?(Se=!1,gi):Qt(ie,gi,ln,Ar)}),ie}function rh(It,Qt){for(var ie,Se=-1,Be=It.length;++Se<Be;){var gi=Qt(It[Se]);gi!==void 0&&(ie=ie===void 0?gi:ie+gi)}return ie}function oh(It,Qt){for(var ie=-1,Se=Array(It);++ie<It;)Se[ie]=Qt(ie);return Se}function nd(It){return It&&It.slice(0,fs(It)+1).replace(Gi,"")}function pr(It){return function(Qt){return It(Qt)}}function sh(It,Qt){return Hi(Qt,function(ie){return It[ie]})}function za(It,Qt){return It.has(Qt)}function rd(It,Qt){for(var ie=-1,Se=It.length;++ie<Se&&Zs(Qt,It[ie],0)>-1;);return ie}function od(It,Qt){for(var ie=It.length;ie--&&Zs(Qt,It[ie],0)>-1;);return ie}function df(It,Qt){for(var ie=It.length,Se=0;ie--;)It[ie]===Qt&&++Se;return Se}var pf=nh({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),ff=nh({"&":"&","<":"<",">":">",'"':""","'":"'"});function mf(It){return"\\"+Bo[It]}function Ks(It){return $s.test(It)}function ah(It){var Qt=-1,ie=Array(It.size);return It.forEach(function(Se,Be){ie[++Qt]=[Be,Se]}),ie}function sd(It,Qt){return function(ie){return It(Qt(ie))}}function Uo(It,Qt){for(var ie=-1,Se=It.length,Be=0,gi=[];++ie<Se;){var ln=It[ie];ln!==Qt&&ln!==P||(It[ie]=P,gi[Be++]=ie)}return gi}function ps(It){var Qt=-1,ie=Array(It.size);return It.forEach(function(Se){ie[++Qt]=Se}),ie}function Bl(It){var Qt=-1,ie=Array(It.size);return It.forEach(function(Se){ie[++Qt]=[Se,Se]}),ie}function Go(It){return Ks(It)?function(Qt){for(var ie=Ys.lastIndex=0;Ys.test(Qt);)++ie;return ie}(It):hf(It)}function jn(It){return Ks(It)?function(Qt){return Qt.match(Ys)||[]}(It):function(Qt){return Qt.split("")}(It)}function fs(It){for(var Qt=It.length;Qt--&&Nn.test(It.charAt(Qt)););return Qt}var kl=nh({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Qs=function It(Qt){var ie,Se=(Qt=Qt==null?en:Qs.defaults(en.Object(),Qt,Qs.pick(en,of))).Array,Be=Qt.Date,gi=Qt.Error,ln=Qt.Function,Ar=Qt.Math,Ui=Qt.Object,Ul=Qt.RegExp,ad=Qt.String,fr=Qt.TypeError,Gl=Se.prototype,ld=ln.prototype,Ur=Ui.prototype,Hl=Qt["__core-js_shared__"],lh=ld.toString,Mi=Ur.hasOwnProperty,iv=0,gf=(ie=/[^.]+$/.exec(Hl&&Hl.keys&&Hl.keys.IE_PROTO||""))?"Symbol(src)_1."+ie:"",uh=Ur.toString,nv=lh.call(Ui),rv=en._,ov=Ul("^"+lh.call(Mi).replace(Qi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=qc?Qt.Buffer:void 0,ms=Qt.Symbol,ch=Qt.Uint8Array,vf=hh?hh.allocUnsafe:void 0,dh=sd(Ui.getPrototypeOf,Ui),_f=Ui.create,yf=Ur.propertyIsEnumerable,zl=Gl.splice,ta=ms?ms.isConcatSpreadable:void 0,xo=ms?ms.iterator:void 0,ea=ms?ms.toStringTag:void 0,ph=function(){try{var c=fa(Ui,"defineProperty");return c({},"",{}),c}catch{}}(),sv=Qt.clearTimeout!==en.clearTimeout&&Qt.clearTimeout,av=Be&&Be.now!==en.Date.now&&Be.now,lv=Qt.setTimeout!==en.setTimeout&&Qt.setTimeout,fh=Ar.ceil,mh=Ar.floor,ud=Ui.getOwnPropertySymbols,hd=hh?hh.isBuffer:void 0,Ho=Qt.isFinite,Vn=Gl.join,gh=sd(Ui.keys,Ui),zi=Ar.max,xn=Ar.min,Rr=Be.now,Wn=Qt.parseInt,vh=Ar.random,jl=Gl.reverse,Vl=fa(Qt,"DataView"),ja=fa(Qt,"Map"),_h=fa(Qt,"Promise"),ia=fa(Qt,"Set"),ce=fa(Qt,"WeakMap"),ji=fa(Ui,"create"),zo=ce&&new ce,Gr={},uv=Ss(Vl),pn=Ss(ja),cd=Ss(_h),Oi=Ss(ia),eo=Ss(ce),Wl=ms?ms.prototype:void 0,na=Wl?Wl.valueOf:void 0,Dn=Wl?Wl.toString:void 0;function S(c){if(on(c)&&!ti(c)&&!(c instanceof oi)){if(c instanceof $i)return c;if(Mi.call(c,"__wrapped__"))return Df(c)}return new $i(c)}var gs=function(){function c(){}return function(f){if(!rn(f))return{};if(_f)return _f(f);c.prototype=f;var x=new c;return c.prototype=void 0,x}}();function Xl(){}function $i(c,f){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=void 0}function oi(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function io(c){var f=-1,x=c==null?0:c.length;for(this.clear();++f<x;){var R=c[f];this.set(R[0],R[1])}}function no(c){var f=-1,x=c==null?0:c.length;for(this.clear();++f<x;){var R=c[f];this.set(R[0],R[1])}}function mr(c){var f=-1,x=c==null?0:c.length;for(this.clear();++f<x;){var R=c[f];this.set(R[0],R[1])}}function Hr(c){var f=-1,x=c==null?0:c.length;for(this.__data__=new mr;++f<x;)this.add(c[f])}function Qn(c){var f=this.__data__=new no(c);this.size=f.size}function jo(c,f){var x=ti(c),R=!x&&Es(c),D=!x&&!R&&$o(c),$=!x&&!R&&!D&&ga(c),ut=x||R||D||$,mt=ut?oh(c.length,ad):[],Mt=mt.length;for(var Jt in c)!f&&!Mi.call(c,Jt)||ut&&(Jt=="length"||D&&(Jt=="offset"||Jt=="parent")||$&&(Jt=="buffer"||Jt=="byteLength"||Jt=="byteOffset")||er(Jt,Mt))||mt.push(Jt);return mt}function Vo(c){var f=c.length;return f?c[xs(0,f-1)]:void 0}function ra(c,f){return Lh(An(c),Wo(f,0,c.length))}function ql(c){return Lh(An(c))}function Va(c,f,x){(x!==void 0&&!qr(c[f],x)||x===void 0&&!(f in c))&&wo(c,f,x)}function vs(c,f,x){var R=c[f];Mi.call(c,f)&&qr(R,x)&&(x!==void 0||f in c)||wo(c,f,x)}function bo(c,f){for(var x=c.length;x--;)if(qr(c[x][0],f))return x;return-1}function dd(c,f,x,R){return or(c,function(D,$,ut){f(R,D,x(D),ut)}),R}function xf(c,f){return c&&hn(f,Cn(f),c)}function wo(c,f,x){f=="__proto__"&&ph?ph(c,f,{configurable:!0,enumerable:!0,value:x,writable:!0}):c[f]=x}function Yl(c,f){for(var x=-1,R=f.length,D=Se(R),$=c==null;++x<R;)D[x]=$?void 0:Wd(c,f[x]);return D}function Wo(c,f,x){return c==c&&(x!==void 0&&(c=c<=x?c:x),f!==void 0&&(c=c>=f?c:f)),c}function Mn(c,f,x,R,D,$){var ut,mt=1&f,Mt=2&f,Jt=4&f;if(x&&(ut=D?x(c,R,D,$):x(c)),ut!==void 0)return ut;if(!rn(c))return c;var Zt=ti(c);if(Zt){if(ut=function(re){var pe=re.length,He=new re.constructor(pe);return pe&&typeof re[0]=="string"&&Mi.call(re,"index")&&(He.index=re.index,He.input=re.input),He}(c),!mt)return An(c,ut)}else{var de=Rn(c),Oe=de==Nt||de==E;if($o(c))return Td(c,mt);if(de==Y||de==z||Oe&&!D){if(ut=Mt||Oe?{}:Cd(c),!mt)return Mt?function(re,pe){return hn(re,ma(re),pe)}(c,function(re,pe){return re&&hn(pe,Bn(pe),re)}(ut,c)):function(re,pe){return hn(re,Wr(re),pe)}(c,xf(ut,c))}else{if(!Bi[de])return D?c:{};ut=function(re,pe,He){var Ce=re.constructor;switch(pe){case ge:return Ed(re);case Z:case vt:return new Ce(+re);case Ct:return function(Ye,li){var ke=li?Ed(Ye.buffer):Ye.buffer;return new Ye.constructor(ke,Ye.byteOffset,Ye.byteLength)}(re,He);case ot:case yt:case Pt:case H:case ft:case Et:case"[object Uint8ClampedArray]":case At:case Rt:return la(re,He);case L:return new Ce;case O:case X:return new Ce(re);case C:return function(Ye){var li=new Ye.constructor(Ye.source,to.exec(Ye));return li.lastIndex=Ye.lastIndex,li}(re);case j:return new Ce;case K:return Ue=re,na?Ui(na.call(Ue)):{}}var Ue}(c,de,mt)}}$||($=new Qn);var Fe=$.get(c);if(Fe)return Fe;$.set(c,ut),Kf(c)?c.forEach(function(re){ut.add(Mn(re,f,x,re,c,$))}):Zf(c)&&c.forEach(function(re,pe){ut.set(pe,Mn(re,f,x,pe,c,$))});var Ve=Zt?void 0:(Jt?Mt?da:sr:Mt?Bn:Cn)(c);return dr(Ve||c,function(re,pe){Ve&&(re=c[pe=re]),vs(ut,pe,Mn(re,f,x,pe,c,$))}),ut}function So(c,f,x){var R=x.length;if(c==null)return!R;for(c=Ui(c);R--;){var D=x[R],$=f[D],ut=c[D];if(ut===void 0&&!(D in c)||!$(ut))return!1}return!0}function yh(c,f,x){if(typeof c!="function")throw new fr(W);return iu(function(){c.apply(void 0,x)},f)}function _s(c,f,x,R){var D=-1,$=Ha,ut=!0,mt=c.length,Mt=[],Jt=f.length;if(!mt)return Mt;x&&(f=Hi(f,pr(x))),R?($=Qu,ut=!1):f.length>=200&&($=za,ut=!1,f=new Hr(f));t:for(;++D<mt;){var Zt=c[D],de=x==null?Zt:x(Zt);if(Zt=R||Zt!==0?Zt:0,ut&&de==de){for(var Oe=Jt;Oe--;)if(f[Oe]===de)continue t;Mt.push(Zt)}else $(f,de,R)||Mt.push(Zt)}return Mt}S.templateSettings={escape:Ze,evaluate:ri,interpolate:De,variable:"",imports:{_:S}},S.prototype=Xl.prototype,S.prototype.constructor=S,$i.prototype=gs(Xl.prototype),$i.prototype.constructor=$i,oi.prototype=gs(Xl.prototype),oi.prototype.constructor=oi,io.prototype.clear=function(){this.__data__=ji?ji(null):{},this.size=0},io.prototype.delete=function(c){var f=this.has(c)&&delete this.__data__[c];return this.size-=f?1:0,f},io.prototype.get=function(c){var f=this.__data__;if(ji){var x=f[c];return x==="__lodash_hash_undefined__"?void 0:x}return Mi.call(f,c)?f[c]:void 0},io.prototype.has=function(c){var f=this.__data__;return ji?f[c]!==void 0:Mi.call(f,c)},io.prototype.set=function(c,f){var x=this.__data__;return this.size+=this.has(c)?0:1,x[c]=ji&&f===void 0?"__lodash_hash_undefined__":f,this},no.prototype.clear=function(){this.__data__=[],this.size=0},no.prototype.delete=function(c){var f=this.__data__,x=bo(f,c);return!(x<0)&&(x==f.length-1?f.pop():zl.call(f,x,1),--this.size,!0)},no.prototype.get=function(c){var f=this.__data__,x=bo(f,c);return x<0?void 0:f[x][1]},no.prototype.has=function(c){return bo(this.__data__,c)>-1},no.prototype.set=function(c,f){var x=this.__data__,R=bo(x,c);return R<0?(++this.size,x.push([c,f])):x[R][1]=f,this},mr.prototype.clear=function(){this.size=0,this.__data__={hash:new io,map:new(ja||no),string:new io}},mr.prototype.delete=function(c){var f=nl(this,c).delete(c);return this.size-=f?1:0,f},mr.prototype.get=function(c){return nl(this,c).get(c)},mr.prototype.has=function(c){return nl(this,c).has(c)},mr.prototype.set=function(c,f){var x=nl(this,c),R=x.size;return x.set(c,f),this.size+=x.size==R?0:1,this},Hr.prototype.add=Hr.prototype.push=function(c){return this.__data__.set(c,"__lodash_hash_undefined__"),this},Hr.prototype.has=function(c){return this.__data__.has(c)},Qn.prototype.clear=function(){this.__data__=new no,this.size=0},Qn.prototype.delete=function(c){var f=this.__data__,x=f.delete(c);return this.size=f.size,x},Qn.prototype.get=function(c){return this.__data__.get(c)},Qn.prototype.has=function(c){return this.__data__.has(c)},Qn.prototype.set=function(c,f){var x=this.__data__;if(x instanceof no){var R=x.__data__;if(!ja||R.length<199)return R.push([c,f]),this.size=++x.size,this;x=this.__data__=new mr(R)}return x.set(c,f),this.size=x.size,this};var or=ze(To),xh=ze(pd,!0);function bh(c,f){var x=!0;return or(c,function(R,D,$){return x=!!f(R,D,$)}),x}function Wa(c,f,x){for(var R=-1,D=c.length;++R<D;){var $=c[R],ut=f($);if(ut!=null&&(mt===void 0?ut==ut&&!Or(ut):x(ut,mt)))var mt=ut,Mt=$}return Mt}function Xo(c,f){var x=[];return or(c,function(R,D,$){f(R,D,$)&&x.push(R)}),x}function Ee(c,f,x,R,D){var $=-1,ut=c.length;for(x||(x=hv),D||(D=[]);++$<ut;){var mt=c[$];f>0&&x(mt)?f>1?Ee(mt,f-1,x,R,D):ko(D,mt):R||(D[D.length]=mt)}return D}var ys=Md(),zr=Md(!0);function To(c,f){return c&&ys(c,f,Cn)}function pd(c,f){return c&&zr(c,f,Cn)}function ro(c,f){return yo(f,function(x){return lo(c[x])})}function Eo(c,f){for(var x=0,R=(f=so(f,c)).length;c!=null&&x<R;)c=c[Xr(f[x++])];return x&&x==R?c:void 0}function gr(c,f,x){var R=f(c);return ti(c)?R:ko(R,x(c))}function tr(c){return c==null?c===void 0?"[object Undefined]":"[object Null]":ea&&ea in Ui(c)?function(f){var x=Mi.call(f,ea),R=f[ea];try{f[ea]=void 0;var D=!0}catch{}var $=uh.call(f);return D&&(x?f[ea]=R:delete f[ea]),$}(c):function(f){return uh.call(f)}(c)}function wh(c,f){return c>f}function oa(c,f){return c!=null&&Mi.call(c,f)}function fd(c,f){return c!=null&&f in Ui(c)}function md(c,f,x){for(var R=x?Qu:Ha,D=c[0].length,$=c.length,ut=$,mt=Se($),Mt=1/0,Jt=[];ut--;){var Zt=c[ut];ut&&f&&(Zt=Hi(Zt,pr(f))),Mt=xn(Zt.length,Mt),mt[ut]=!x&&(f||D>=120&&Zt.length>=120)?new Hr(ut&&Zt):void 0}Zt=c[0];var de=-1,Oe=mt[0];t:for(;++de<D&&Jt.length<Mt;){var Fe=Zt[de],Ve=f?f(Fe):Fe;if(Fe=x||Fe!==0?Fe:0,!(Oe?za(Oe,Ve):R(Jt,Ve,x))){for(ut=$;--ut;){var re=mt[ut];if(!(re?za(re,Ve):R(c[ut],Ve,x)))continue t}Oe&&Oe.push(Ve),Jt.push(Fe)}}return Jt}function Xa(c,f,x){var R=(c=If(c,f=so(f,c)))==null?c:c[Xr(Lr(f))];return R==null?void 0:rr(R,c,x)}function sa(c){return on(c)&&tr(c)==z}function Cr(c,f,x,R,D){return c===f||(c==null||f==null||!on(c)&&!on(f)?c!=c&&f!=f:function($,ut,mt,Mt,Jt,Zt){var de=ti($),Oe=ti(ut),Fe=de?k:Rn($),Ve=Oe?k:Rn(ut),re=(Fe=Fe==z?Y:Fe)==Y,pe=(Ve=Ve==z?Y:Ve)==Y,He=Fe==Ve;if(He&&$o($)){if(!$o(ut))return!1;de=!0,re=!1}if(He&&!re)return Zt||(Zt=new Qn),de||ga($)?Xn($,ut,mt,Mt,Jt,Zt):function(ke,Je,cn,qn,dn,sn,uo){switch(cn){case Ct:if(ke.byteLength!=Je.byteLength||ke.byteOffset!=Je.byteOffset)return!1;ke=ke.buffer,Je=Je.buffer;case ge:return!(ke.byteLength!=Je.byteLength||!sn(new ch(ke),new ch(Je)));case Z:case vt:case O:return qr(+ke,+Je);case Ot:return ke.name==Je.name&&ke.message==Je.message;case C:case X:return ke==Je+"";case L:var Po=ah;case j:var As=1&qn;if(Po||(Po=ps),ke.size!=Je.size&&!As)return!1;var dl=uo.get(ke);if(dl)return dl==Je;qn|=2,uo.set(ke,Je);var Rs=Xn(Po(ke),Po(Je),qn,dn,sn,uo);return uo.delete(ke),Rs;case K:if(na)return na.call(ke)==na.call(Je)}return!1}($,ut,Fe,mt,Mt,Jt,Zt);if(!(1&mt)){var Ce=re&&Mi.call($,"__wrapped__"),Ue=pe&&Mi.call(ut,"__wrapped__");if(Ce||Ue){var Ye=Ce?$.value():$,li=Ue?ut.value():ut;return Zt||(Zt=new Qn),Jt(Ye,li,mt,Mt,Zt)}}return He?(Zt||(Zt=new Qn),function(ke,Je,cn,qn,dn,sn){var uo=1&cn,Po=sr(ke),As=Po.length,dl=sr(Je).length;if(As!=dl&&!uo)return!1;for(var Rs=As;Rs--;){var Io=Po[Rs];if(!(uo?Io in Je:Mi.call(Je,Io)))return!1}var Kh=sn.get(ke),$d=sn.get(Je);if(Kh&&$d)return Kh==Je&&$d==ke;var Cs=!0;sn.set(ke,Je),sn.set(Je,ke);for(var wa=uo;++Rs<As;){Io=Po[Rs];var Sa=ke[Io],pl=Je[Io];if(qn)var fl=uo?qn(pl,Sa,Io,Je,ke,sn):qn(Sa,pl,Io,ke,Je,sn);if(!(fl===void 0?Sa===pl||dn(Sa,pl,cn,qn,sn):fl)){Cs=!1;break}wa||(wa=Io=="constructor")}if(Cs&&!wa){var pu=ke.constructor,Ta=Je.constructor;pu==Ta||!("constructor"in ke)||!("constructor"in Je)||typeof pu=="function"&&pu instanceof pu&&typeof Ta=="function"&&Ta instanceof Ta||(Cs=!1)}return sn.delete(ke),sn.delete(Je),Cs}($,ut,mt,Mt,Jt,Zt)):!1}(c,f,x,R,Cr,D))}function qa(c,f,x,R){var D=x.length,$=D,ut=!R;if(c==null)return!$;for(c=Ui(c);D--;){var mt=x[D];if(ut&&mt[2]?mt[1]!==c[mt[0]]:!(mt[0]in c))return!1}for(;++D<$;){var Mt=(mt=x[D])[0],Jt=c[Mt],Zt=mt[1];if(ut&&mt[2]){if(Jt===void 0&&!(Mt in c))return!1}else{var de=new Qn;if(R)var Oe=R(Jt,Zt,Mt,c,f,de);if(!(Oe===void 0?Cr(Zt,Jt,3,R,de):Oe))return!1}}return!0}function Ya(c){return!(!rn(c)||(f=c,gf&&gf in f))&&(lo(c)?ov:at).test(Ss(c));var f}function bf(c){return typeof c=="function"?c:c==null?lr:typeof c=="object"?ti(c)?_d(c[0],c[1]):Sf(c):hm(c)}function gd(c){if(!eu(c))return gh(c);var f=[];for(var x in Ui(c))Mi.call(c,x)&&x!="constructor"&&f.push(x);return f}function wf(c){if(!rn(c))return function(D){var $=[];if(D!=null)for(var ut in Ui(D))$.push(ut);return $}(c);var f=eu(c),x=[];for(var R in c)(R!="constructor"||!f&&Mi.call(c,R))&&x.push(R);return x}function Sh(c,f){return c<f}function vd(c,f){var x=-1,R=vr(c)?Se(c.length):[];return or(c,function(D,$,ut){R[++x]=f(D,$,ut)}),R}function Sf(c){var f=Rd(c);return f.length==1&&f[0][2]?Cf(f[0][0],f[0][1]):function(x){return x===c||qa(x,c,f)}}function _d(c,f){return Te(c)&&Rf(f)?Cf(Xr(c),f):function(x){var R=Wd(x,c);return R===void 0&&R===f?ou(x,c):Cr(f,R,3)}}function hi(c,f,x,R,D){c!==f&&ys(f,function($,ut){if(D||(D=new Qn),rn($))(function(Mt,Jt,Zt,de,Oe,Fe,Ve){var re=Pd(Mt,Zt),pe=Pd(Jt,Zt),He=Ve.get(pe);if(He)return void Va(Mt,Zt,He);var Ce=Fe?Fe(re,pe,Zt+"",Mt,Jt,Ve):void 0,Ue=Ce===void 0;if(Ue){var Ye=ti(pe),li=!Ye&&$o(pe),ke=!Ye&&!li&&ga(pe);Ce=pe,Ye||li||ke?ti(re)?Ce=re:Wi(re)?Ce=An(re):li?(Ue=!1,Ce=Td(pe,!0)):ke?(Ue=!1,Ce=la(pe,!0)):Ce=[]:sl(pe)||Es(pe)?(Ce=re,Es(re)?Ce=im(re):rn(re)&&!lo(re)||(Ce=Cd(pe))):Ue=!1}Ue&&(Ve.set(pe,Ce),Oe(Ce,pe,de,Fe,Ve),Ve.delete(pe)),Va(Mt,Zt,Ce)})(c,f,ut,x,hi,R,D);else{var mt=R?R(Pd(c,ut),$,ut+"",c,f,D):void 0;mt===void 0&&(mt=$),Va(c,ut,mt)}},Bn)}function jr(c,f){var x=c.length;if(x)return er(f+=f<0?x:0,x)?c[f]:void 0}function Mo(c,f,x){f=f.length?Hi(f,function(D){return ti(D)?function($){return Eo($,D.length===1?D[0]:D)}:D}):[lr];var R=-1;return f=Hi(f,pr(je())),function(D,$){var ut=D.length;for(D.sort($);ut--;)D[ut]=D[ut].value;return D}(vd(c,function(D,$,ut){return{criteria:Hi(f,function(mt){return mt(D)}),index:++R,value:D}}),function(D,$){return function(ut,mt,Mt){for(var Jt=-1,Zt=ut.criteria,de=mt.criteria,Oe=Zt.length,Fe=Mt.length;++Jt<Oe;){var Ve=Af(Zt[Jt],de[Jt]);if(Ve){if(Jt>=Fe)return Ve;var re=Mt[Jt];return Ve*(re=="desc"?-1:1)}}return ut.index-mt.index}(D,$,x)})}function Th(c,f,x){for(var R=-1,D=f.length,$={};++R<D;){var ut=f[R],mt=Eo(c,ut);x(mt,ut)&&Vi($,so(ut,c),mt)}return $}function oo(c,f,x,R){var D=R?cf:Zs,$=-1,ut=f.length,mt=c;for(c===f&&(f=An(f)),x&&(mt=Hi(c,pr(x)));++$<ut;)for(var Mt=0,Jt=f[$],Zt=x?x(Jt):Jt;(Mt=D(mt,Zt,Mt,R))>-1;)mt!==c&&zl.call(mt,Mt,1),zl.call(c,Mt,1);return c}function aa(c,f){for(var x=c?f.length:0,R=x-1;x--;){var D=f[x];if(x==R||D!==$){var $=D;er(D)?zl.call(c,D,1):Ja(c,D)}}return c}function xs(c,f){return c+mh(vh()*(f-c+1))}function Eh(c,f){var x="";if(!c||f<1||f>9007199254740991)return x;do f%2&&(x+=c),(f=mh(f/2))&&(c+=c);while(f);return x}function ci(c,f){return Id(Pf(c,f,lr),c+"")}function yd(c){return Vo(Co(c))}function xd(c,f){var x=Co(c);return Lh(x,Wo(f,0,x.length))}function Vi(c,f,x,R){if(!rn(c))return c;for(var D=-1,$=(f=so(f,c)).length,ut=$-1,mt=c;mt!=null&&++D<$;){var Mt=Xr(f[D]),Jt=x;if(Mt==="__proto__"||Mt==="constructor"||Mt==="prototype")return c;if(D!=ut){var Zt=mt[Mt];(Jt=R?R(Zt,Mt,mt):void 0)===void 0&&(Jt=rn(Zt)?Zt:er(f[D+1])?[]:{})}vs(mt,Mt,Jt),mt=mt[Mt]}return c}var Tf=zo?function(c,f){return zo.set(c,f),c}:lr,Fn=ph?function(c,f){return ph(c,"toString",{configurable:!0,enumerable:!1,value:ul(f),writable:!0})}:lr;function Ef(c){return Lh(Co(c))}function un(c,f,x){var R=-1,D=c.length;f<0&&(f=-f>D?0:D+f),(x=x>D?D:x)<0&&(x+=D),D=f>x?0:x-f>>>0,f>>>=0;for(var $=Se(D);++R<D;)$[R]=c[R+f];return $}function Mh(c,f){var x;return or(c,function(R,D,$){return!(x=f(R,D,$))}),!!x}function $a(c,f,x){var R=0,D=c==null?R:c.length;if(typeof f=="number"&&f==f&&D<=2147483647){for(;R<D;){var $=R+D>>>1,ut=c[$];ut!==null&&!Or(ut)&&(x?ut<=f:ut<f)?R=$+1:D=$}return D}return $l(c,f,lr,x)}function $l(c,f,x,R){var D=0,$=c==null?0:c.length;if($===0)return 0;for(var ut=(f=x(f))!=f,mt=f===null,Mt=Or(f),Jt=f===void 0;D<$;){var Zt=mh((D+$)/2),de=x(c[Zt]),Oe=de!==void 0,Fe=de===null,Ve=de==de,re=Or(de);if(ut)var pe=R||Ve;else pe=Jt?Ve&&(R||Oe):mt?Ve&&Oe&&(R||!Fe):Mt?Ve&&Oe&&!Fe&&(R||!re):!Fe&&!re&&(R?de<=f:de<f);pe?D=Zt+1:$=Zt}return xn($,4294967294)}function Ah(c,f){for(var x=-1,R=c.length,D=0,$=[];++x<R;){var ut=c[x],mt=f?f(ut):ut;if(!x||!qr(mt,Mt)){var Mt=mt;$[D++]=ut===0?0:ut}}return $}function Le(c){return typeof c=="number"?c:Or(c)?NaN:+c}function fn(c){if(typeof c=="string")return c;if(ti(c))return Hi(c,fn)+"";if(Or(c))return Dn?Dn.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}function Ti(c,f,x){var R=-1,D=Ha,$=c.length,ut=!0,mt=[],Mt=mt;if(x)ut=!1,D=Qu;else if($>=200){var Jt=f?null:Ad(c);if(Jt)return ps(Jt);ut=!1,D=za,Mt=new Hr}else Mt=f?[]:mt;t:for(;++R<$;){var Zt=c[R],de=f?f(Zt):Zt;if(Zt=x||Zt!==0?Zt:0,ut&&de==de){for(var Oe=Mt.length;Oe--;)if(Mt[Oe]===de)continue t;f&&Mt.push(de),mt.push(Zt)}else D(Mt,de,x)||(Mt!==mt&&Mt.push(de),mt.push(Zt))}return mt}function Ja(c,f){return(c=If(c,f=so(f,c)))==null||delete c[Xr(Lr(f))]}function mi(c,f,x,R){return Vi(c,f,x(Eo(c,f)),R)}function Jl(c,f,x,R){for(var D=c.length,$=R?D:-1;(R?$--:++$<D)&&f(c[$],$,c););return x?un(c,R?0:$,R?$+1:D):un(c,R?$+1:0,R?D:$)}function bd(c,f){var x=c;return x instanceof oi&&(x=x.value()),th(f,function(R,D){return D.func.apply(D.thisArg,ko([R],D.args))},x)}function Rh(c,f,x){var R=c.length;if(R<2)return R?Ti(c[0]):[];for(var D=-1,$=Se(R);++D<R;)for(var ut=c[D],mt=-1;++mt<R;)mt!=D&&($[D]=_s($[D]||ut,c[mt],f,x));return Ti(Ee($,1),f,x)}function wd(c,f,x){for(var R=-1,D=c.length,$=f.length,ut={};++R<D;){var mt=R<$?f[R]:void 0;x(ut,c[R],mt)}return ut}function Za(c){return Wi(c)?c:[]}function Ch(c){return typeof c=="function"?c:lr}function so(c,f){return ti(c)?c:Te(c,f)?[c]:Oh(wi(c))}var Mf=ci;function _e(c,f,x){var R=c.length;return x=x===void 0?R:x,!f&&x>=R?c:un(c,f,x)}var Sd=sv||function(c){return en.clearTimeout(c)};function Td(c,f){if(f)return c.slice();var x=c.length,R=vf?vf(x):new c.constructor(x);return c.copy(R),R}function Ed(c){var f=new c.constructor(c.byteLength);return new ch(f).set(new ch(c)),f}function la(c,f){var x=f?Ed(c.buffer):c.buffer;return new c.constructor(x,c.byteOffset,c.length)}function Af(c,f){if(c!==f){var x=c!==void 0,R=c===null,D=c==c,$=Or(c),ut=f!==void 0,mt=f===null,Mt=f==f,Jt=Or(f);if(!mt&&!Jt&&!$&&c>f||$&&ut&&Mt&&!mt&&!Jt||R&&ut&&Mt||!x&&Mt||!D)return 1;if(!R&&!$&&!Jt&&c<f||Jt&&x&&D&&!R&&!$||mt&&x&&D||!ut&&D||!Mt)return-1}return 0}function Pr(c,f,x,R){for(var D=-1,$=c.length,ut=x.length,mt=-1,Mt=f.length,Jt=zi($-ut,0),Zt=Se(Mt+Jt),de=!R;++mt<Mt;)Zt[mt]=f[mt];for(;++D<ut;)(de||D<$)&&(Zt[x[D]]=c[D]);for(;Jt--;)Zt[mt++]=c[D++];return Zt}function Ph(c,f,x,R){for(var D=-1,$=c.length,ut=-1,mt=x.length,Mt=-1,Jt=f.length,Zt=zi($-mt,0),de=Se(Zt+Jt),Oe=!R;++D<Zt;)de[D]=c[D];for(var Fe=D;++Mt<Jt;)de[Fe+Mt]=f[Mt];for(;++ut<mt;)(Oe||D<$)&&(de[Fe+x[ut]]=c[D++]);return de}function An(c,f){var x=-1,R=c.length;for(f||(f=Se(R));++x<R;)f[x]=c[x];return f}function hn(c,f,x,R){var D=!x;x||(x={});for(var $=-1,ut=f.length;++$<ut;){var mt=f[$],Mt=R?R(x[mt],c[mt],mt,x,c):void 0;Mt===void 0&&(Mt=c[mt]),D?wo(x,mt,Mt):vs(x,mt,Mt)}return x}function bs(c,f){return function(x,R){var D=ti(x)?Jc:dd,$=f?f():{};return D(x,c,je(R,2),$)}}function nn(c){return ci(function(f,x){var R=-1,D=x.length,$=D>1?x[D-1]:void 0,ut=D>2?x[2]:void 0;for($=c.length>3&&typeof $=="function"?(D--,$):void 0,ut&&$e(x[0],x[1],ut)&&($=D<3?void 0:$,D=1),f=Ui(f);++R<D;){var mt=x[R];mt&&c(f,mt,R,$)}return f})}function ze(c,f){return function(x,R){if(x==null)return x;if(!vr(x))return c(x,R);for(var D=x.length,$=f?D:-1,ut=Ui(x);(f?$--:++$<D)&&R(ut[$],$,ut)!==!1;);return x}}function Md(c){return function(f,x,R){for(var D=-1,$=Ui(f),ut=R(f),mt=ut.length;mt--;){var Mt=ut[c?mt:++D];if(x($[Mt],Mt,$)===!1)break}return f}}function ua(c){return function(f){var x=Ks(f=wi(f))?jn(f):void 0,R=x?x[0]:f.charAt(0),D=x?_e(x,1).join(""):f.slice(1);return R[c]()+D}}function ws(c){return function(f){return th(Xd(ba(f).replace(Dl,"")),c,"")}}function Vr(c){return function(){var f=arguments;switch(f.length){case 0:return new c;case 1:return new c(f[0]);case 2:return new c(f[0],f[1]);case 3:return new c(f[0],f[1],f[2]);case 4:return new c(f[0],f[1],f[2],f[3]);case 5:return new c(f[0],f[1],f[2],f[3],f[4]);case 6:return new c(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new c(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var x=gs(c.prototype),R=c.apply(x,f);return rn(R)?R:x}}function qo(c){return function(f,x,R){var D=Ui(f);if(!vr(f)){var $=je(x,3);f=Cn(f),x=function(mt){return $(D[mt],mt,D)}}var ut=c(f,x,R);return ut>-1?D[$?f[ut]:ut]:void 0}}function Yo(c){return Ro(function(f){var x=f.length,R=x,D=$i.prototype.thru;for(c&&f.reverse();R--;){var $=f[R];if(typeof $!="function")throw new fr(W);if(D&&!ut&&pa($)=="wrapper")var ut=new $i([],!0)}for(R=ut?R:x;++R<x;){var mt=pa($=f[R]),Mt=mt=="wrapper"?mn($):void 0;ut=Mt&&Ir(Mt[0])&&Mt[1]==424&&!Mt[4].length&&Mt[9]==1?ut[pa(Mt[0])].apply(ut,Mt[3]):$.length==1&&Ir($)?ut[mt]():ut.thru($)}return function(){var Jt=arguments,Zt=Jt[0];if(ut&&Jt.length==1&&ti(Zt))return ut.plant(Zt).value();for(var de=0,Oe=x?f[de].apply(this,Jt):Zt;++de<x;)Oe=f[de].call(this,Oe);return Oe}})}function Ka(c,f,x,R,D,$,ut,mt,Mt,Jt){var Zt=128&f,de=1&f,Oe=2&f,Fe=24&f,Ve=512&f,re=Oe?void 0:Vr(c);return function pe(){for(var He=arguments.length,Ce=Se(He),Ue=He;Ue--;)Ce[Ue]=arguments[Ue];if(Fe)var Ye=ao(pe),li=df(Ce,Ye);if(R&&(Ce=Pr(Ce,R,D,Fe)),$&&(Ce=Ph(Ce,$,ut,Fe)),He-=li,Fe&&He<Jt){var ke=Uo(Ce,Ye);return Kl(c,f,Ka,pe.placeholder,x,Ce,ke,mt,Mt,Jt-He)}var Je=de?x:this,cn=Oe?Je[c]:c;return He=Ce.length,mt?Ce=dv(Ce,mt):Ve&&He>1&&Ce.reverse(),Zt&&Mt<He&&(Ce.length=Mt),this&&this!==en&&this instanceof pe&&(cn=re||Vr(cn)),cn.apply(Je,Ce)}}function Ih(c,f){return function(x,R){return function(D,$,ut,mt){return To(D,function(Mt,Jt,Zt){$(mt,ut(Mt),Jt,Zt)}),mt}(x,c,f(R),{})}}function Qa(c,f){return function(x,R){var D;if(x===void 0&&R===void 0)return f;if(x!==void 0&&(D=x),R!==void 0){if(D===void 0)return R;typeof x=="string"||typeof R=="string"?(x=fn(x),R=fn(R)):(x=Le(x),R=Le(R)),D=c(x,R)}return D}}function tl(c){return Ro(function(f){return f=Hi(f,pr(je())),ci(function(x){var R=this;return c(f,function(D){return rr(D,R,x)})})})}function ha(c,f){var x=(f=f===void 0?" ":fn(f)).length;if(x<2)return x?Eh(f,c):f;var R=Eh(f,fh(c/Go(f)));return Ks(f)?_e(jn(R),0,c).join(""):R.slice(0,c)}function Zl(c){return function(f,x,R){return R&&typeof R!="number"&&$e(f,x,R)&&(x=R=void 0),f=Jo(f),x===void 0?(x=f,f=0):x=Jo(x),function(D,$,ut,mt){for(var Mt=-1,Jt=zi(fh(($-D)/(ut||1)),0),Zt=Se(Jt);Jt--;)Zt[mt?Jt:++Mt]=D,D+=ut;return Zt}(f,x,R=R===void 0?f<x?1:-1:Jo(R),c)}}function ca(c){return function(f,x){return typeof f=="string"&&typeof x=="string"||(f=Nr(f),x=Nr(x)),c(f,x)}}function Kl(c,f,x,R,D,$,ut,mt,Mt,Jt){var Zt=8&f;f|=Zt?32:64,4&(f&=~(Zt?64:32))||(f&=-4);var de=[c,f,D,Zt?$:void 0,Zt?ut:void 0,Zt?void 0:$,Zt?void 0:ut,mt,Mt,Jt],Oe=x.apply(void 0,de);return Ir(c)&&Lf(Oe,de),Oe.placeholder=R,Of(Oe,c,f)}function el(c){var f=Ar[c];return function(x,R){if(x=Nr(x),(R=R==null?0:xn(di(R),292))&&Ho(x)){var D=(wi(x)+"e").split("e");return+((D=(wi(f(D[0]+"e"+(+D[1]+R)))+"e").split("e"))[0]+"e"+(+D[1]-R))}return f(x)}}var Ad=ia&&1/ps(new ia([,-0]))[1]==1/0?function(c){return new ia(c)}:hl;function Ql(c){return function(f){var x=Rn(f);return x==L?ah(f):x==j?Bl(f):function(R,D){return Hi(D,function($){return[$,R[$]]})}(f,c(f))}}function Ei(c,f,x,R,D,$,ut,mt){var Mt=2&f;if(!Mt&&typeof c!="function")throw new fr(W);var Jt=R?R.length:0;if(Jt||(f&=-97,R=D=void 0),ut=ut===void 0?ut:zi(di(ut),0),mt=mt===void 0?mt:di(mt),Jt-=D?D.length:0,64&f){var Zt=R,de=D;R=D=void 0}var Oe=Mt?void 0:mn(c),Fe=[c,f,x,R,D,Zt,de,$,ut,mt];if(Oe&&function(re,pe){var He=re[1],Ce=pe[1],Ue=He|Ce,Ye=Ue<131,li=Ce==128&&He==8||Ce==128&&He==256&&re[7].length<=pe[8]||Ce==384&&pe[7].length<=pe[8]&&He==8;if(!Ye&&!li)return re;1&Ce&&(re[2]=pe[2],Ue|=1&He?0:4);var ke=pe[3];if(ke){var Je=re[3];re[3]=Je?Pr(Je,ke,pe[4]):ke,re[4]=Je?Uo(re[3],P):pe[4]}(ke=pe[5])&&(Je=re[5],re[5]=Je?Ph(Je,ke,pe[6]):ke,re[6]=Je?Uo(re[5],P):pe[6]),(ke=pe[7])&&(re[7]=ke),128&Ce&&(re[8]=re[8]==null?pe[8]:xn(re[8],pe[8])),re[9]==null&&(re[9]=pe[9]),re[0]=pe[0],re[1]=Ue}(Fe,Oe),c=Fe[0],f=Fe[1],x=Fe[2],R=Fe[3],D=Fe[4],!(mt=Fe[9]=Fe[9]===void 0?Mt?0:c.length:zi(Fe[9]-Jt,0))&&24&f&&(f&=-25),f&&f!=1)Ve=f==8||f==16?function(re,pe,He){var Ce=Vr(re);return function Ue(){for(var Ye=arguments.length,li=Se(Ye),ke=Ye,Je=ao(Ue);ke--;)li[ke]=arguments[ke];var cn=Ye<3&&li[0]!==Je&&li[Ye-1]!==Je?[]:Uo(li,Je);if((Ye-=cn.length)<He)return Kl(re,pe,Ka,Ue.placeholder,void 0,li,cn,void 0,void 0,He-Ye);var qn=this&&this!==en&&this instanceof Ue?Ce:re;return rr(qn,this,li)}}(c,f,mt):f!=32&&f!=33||D.length?Ka.apply(void 0,Fe):function(re,pe,He,Ce){var Ue=1&pe,Ye=Vr(re);return function li(){for(var ke=-1,Je=arguments.length,cn=-1,qn=Ce.length,dn=Se(qn+Je),sn=this&&this!==en&&this instanceof li?Ye:re;++cn<qn;)dn[cn]=Ce[cn];for(;Je--;)dn[cn++]=arguments[++ke];return rr(sn,Ue?He:this,dn)}}(c,f,x,R);else var Ve=function(re,pe,He){var Ce=1&pe,Ue=Vr(re);return function Ye(){var li=this&&this!==en&&this instanceof Ye?Ue:re;return li.apply(Ce?He:this,arguments)}}(c,f,x);return Of((Oe?Tf:Lf)(Ve,Fe),c,f)}function tu(c,f,x,R){return c===void 0||qr(c,Ur[x])&&!Mi.call(R,x)?f:c}function Ao(c,f,x,R,D,$){return rn(c)&&rn(f)&&($.set(f,c),hi(c,f,void 0,Ao,$),$.delete(f)),c}function il(c){return sl(c)?void 0:c}function Xn(c,f,x,R,D,$){var ut=1&x,mt=c.length,Mt=f.length;if(mt!=Mt&&!(ut&&Mt>mt))return!1;var Jt=$.get(c),Zt=$.get(f);if(Jt&&Zt)return Jt==f&&Zt==c;var de=-1,Oe=!0,Fe=2&x?new Hr:void 0;for($.set(c,f),$.set(f,c);++de<mt;){var Ve=c[de],re=f[de];if(R)var pe=ut?R(re,Ve,de,f,c,$):R(Ve,re,de,c,f,$);if(pe!==void 0){if(pe)continue;Oe=!1;break}if(Fe){if(!eh(f,function(He,Ce){if(!za(Fe,Ce)&&(Ve===He||D(Ve,He,x,R,$)))return Fe.push(Ce)})){Oe=!1;break}}else if(Ve!==re&&!D(Ve,re,x,R,$)){Oe=!1;break}}return $.delete(c),$.delete(f),Oe}function Ro(c){return Id(Pf(c,void 0,Nd),c+"")}function sr(c){return gr(c,Cn,Wr)}function da(c){return gr(c,Bn,ma)}var mn=zo?function(c){return zo.get(c)}:hl;function pa(c){for(var f=c.name+"",x=Gr[f],R=Mi.call(Gr,f)?x.length:0;R--;){var D=x[R],$=D.func;if($==null||$==c)return D.name}return f}function ao(c){return(Mi.call(S,"placeholder")?S:c).placeholder}function je(){var c=S.iteratee||Wh;return c=c===Wh?bf:c,arguments.length?c(arguments[0],arguments[1]):c}function nl(c,f){var x,R,D=c.__data__;return((R=typeof(x=f))=="string"||R=="number"||R=="symbol"||R=="boolean"?x!=="__proto__":x===null)?D[typeof f=="string"?"string":"hash"]:D.map}function Rd(c){for(var f=Cn(c),x=f.length;x--;){var R=f[x],D=c[R];f[x]=[R,D,Rf(D)]}return f}function fa(c,f){var x=function(R,D){return R==null?void 0:R[D]}(c,f);return Ya(x)?x:void 0}var Wr=ud?function(c){return c==null?[]:(c=Ui(c),yo(ud(c),function(f){return yf.call(c,f)}))}:$h,ma=ud?function(c){for(var f=[];c;)ko(f,Wr(c)),c=dh(c);return f}:$h,Rn=tr;function rl(c,f,x){for(var R=-1,D=(f=so(f,c)).length,$=!1;++R<D;){var ut=Xr(f[R]);if(!($=c!=null&&x(c,ut)))break;c=c[ut]}return $||++R!=D?$:!!(D=c==null?0:c.length)&&kh(D)&&er(ut,D)&&(ti(c)||Es(c))}function Cd(c){return typeof c.constructor!="function"||eu(c)?{}:gs(dh(c))}function hv(c){return ti(c)||Es(c)||!!(ta&&c&&c[ta])}function er(c,f){var x=typeof c;return!!(f=f==null?9007199254740991:f)&&(x=="number"||x!="symbol"&&bt.test(c))&&c>-1&&c%1==0&&c<f}function $e(c,f,x){if(!rn(x))return!1;var R=typeof f;return!!(R=="number"?vr(x)&&er(f,x.length):R=="string"&&f in x)&&qr(x[f],c)}function Te(c,f){if(ti(c))return!1;var x=typeof c;return!(x!="number"&&x!="symbol"&&x!="boolean"&&c!=null&&!Or(c))||Fi.test(c)||!ki.test(c)||f!=null&&c in Ui(f)}function Ir(c){var f=pa(c),x=S[f];if(typeof x!="function"||!(f in oi.prototype))return!1;if(c===x)return!0;var R=mn(x);return!!R&&c===R[0]}(Vl&&Rn(new Vl(new ArrayBuffer(1)))!=Ct||ja&&Rn(new ja)!=L||_h&&Rn(_h.resolve())!="[object Promise]"||ia&&Rn(new ia)!=j||ce&&Rn(new ce)!=qt)&&(Rn=function(c){var f=tr(c),x=f==Y?c.constructor:void 0,R=x?Ss(x):"";if(R)switch(R){case uv:return Ct;case pn:return L;case cd:return"[object Promise]";case Oi:return j;case eo:return qt}return f});var cv=Hl?lo:cl;function eu(c){var f=c&&c.constructor;return c===(typeof f=="function"&&f.prototype||Ur)}function Rf(c){return c==c&&!rn(c)}function Cf(c,f){return function(x){return x!=null&&x[c]===f&&(f!==void 0||c in Ui(x))}}function Pf(c,f,x){return f=zi(f===void 0?c.length-1:f,0),function(){for(var R=arguments,D=-1,$=zi(R.length-f,0),ut=Se($);++D<$;)ut[D]=R[f+D];D=-1;for(var mt=Se(f+1);++D<f;)mt[D]=R[D];return mt[f]=x(ut),rr(c,this,mt)}}function If(c,f){return f.length<2?c:Eo(c,un(f,0,-1))}function dv(c,f){for(var x=c.length,R=xn(f.length,x),D=An(c);R--;){var $=f[R];c[R]=er($,x)?D[$]:void 0}return c}function Pd(c,f){if((f!=="constructor"||typeof c[f]!="function")&&f!="__proto__")return c[f]}var Lf=Nf(Tf),iu=lv||function(c,f){return en.setTimeout(c,f)},Id=Nf(Fn);function Of(c,f,x){var R=f+"";return Id(c,function(D,$){var ut=$.length;if(!ut)return D;var mt=ut-1;return $[mt]=(ut>1?"& ":"")+$[mt],$=$.join(ut>2?", ":" "),D.replace(tn,`{
|
|
8
|
+
*/(function(){var V="Expected a function",P="__lodash_placeholder__",W=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],z="[object Arguments]",k="[object Array]",Z="[object Boolean]",vt="[object Date]",Ot="[object Error]",Nt="[object Function]",E="[object GeneratorFunction]",L="[object Map]",O="[object Number]",Y="[object Object]",C="[object RegExp]",j="[object Set]",X="[object String]",K="[object Symbol]",qt="[object WeakMap]",ge="[object ArrayBuffer]",Ct="[object DataView]",ot="[object Float32Array]",yt="[object Float64Array]",Pt="[object Int8Array]",H="[object Int16Array]",ft="[object Int32Array]",Et="[object Uint8Array]",At="[object Uint16Array]",Rt="[object Uint32Array]",Wt=/\b__p \+= '';/g,$t=/\b(__p \+=) '' \+/g,ye=/(__e\(.*?\)|\b__t\)) \+\n'';/g,me=/&(?:amp|lt|gt|quot|#39);/g,ui=/[&<>"']/g,be=RegExp(me.source),ei=RegExp(ui.source),Ze=/<%-([\s\S]+?)%>/g,ri=/<%([\s\S]+?)%>/g,De=/<%=([\s\S]+?)%>/g,ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fi=/^\w*$/,Pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qi=/[\\^$.*+?()[\]{}|]/g,Li=RegExp(Qi.source),Gi=/^\s+/,Nn=/\s/,tn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zn=/\{\n\/\* \[wrapped with (.+)\] \*/,Kn=/,? & /,ka=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ws=/[()=,{}\[\]\/\s]/,qu=/\\(\\)?/g,Ua=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,to=/\w*$/,J=/^[-+]0x[0-9a-f]+$/i,st=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,Tt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zt=/($^)/,ne=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",xe="[\\ud800-\\udfff]",Ie="["+ae+"]",Ge="["+se+"]",qe="\\d+",pi="[\\u2700-\\u27bf]",fi="[a-z\\xdf-\\xf6\\xf8-\\xff]",Tr="[^\\ud800-\\udfff"+ae+qe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Do="\\ud83c[\\udffb-\\udfff]",Xs="[^\\ud800-\\udfff]",Nl="(?:\\ud83c[\\udde6-\\uddff]){2}",Yi="[\\ud800-\\udbff][\\udc00-\\udfff]",cs="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Kp="(?:"+fi+"|"+Tr+")",qs="(?:"+cs+"|"+Tr+")",Qp="(?:"+Ge+"|"+Do+")?",ds="[\\ufe0e\\ufe0f]?"+Qp+("(?:\\u200d(?:"+[Xs,Nl,Yi].join("|")+")[\\ufe0e\\ufe0f]?"+Qp+")*"),tf="(?:"+[pi,Nl,Yi].join("|")+")"+ds,ef="(?:"+[Xs+Ge+"?",Ge,Nl,Yi,xe].join("|")+")",Dl=RegExp("['\u2019]","g"),nf=RegExp(Ge,"g"),Ys=RegExp(Do+"(?="+Do+")|"+ef+ds,"g"),Fo=RegExp([cs+"?"+fi+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[Ie,cs,"$"].join("|")+")",qs+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[Ie,cs+Kp,"$"].join("|")+")",cs+"?"+Kp+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",cs+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qe,tf].join("|"),"g"),$s=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),rf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,of=["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"],sf=-1,Ii={};Ii[ot]=Ii[yt]=Ii[Pt]=Ii[H]=Ii[ft]=Ii[Et]=Ii["[object Uint8ClampedArray]"]=Ii[At]=Ii[Rt]=!0,Ii[z]=Ii[k]=Ii[ge]=Ii[Z]=Ii[Ct]=Ii[vt]=Ii[Ot]=Ii[Nt]=Ii[L]=Ii[O]=Ii[Y]=Ii[C]=Ii[j]=Ii[X]=Ii[qt]=!1;var Bi={};Bi[z]=Bi[k]=Bi[ge]=Bi[Ct]=Bi[Z]=Bi[vt]=Bi[ot]=Bi[yt]=Bi[Pt]=Bi[H]=Bi[ft]=Bi[L]=Bi[O]=Bi[Y]=Bi[C]=Bi[j]=Bi[X]=Bi[K]=Bi[Et]=Bi["[object Uint8ClampedArray]"]=Bi[At]=Bi[Rt]=!0,Bi[Ot]=Bi[Nt]=Bi[qt]=!1;var Bo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Er=parseFloat,af=parseInt,Xc=typeof b=="object"&&b&&b.Object===Object&&b,lf=typeof self=="object"&&self&&self.Object===Object&&self,en=Xc||lf||Function("return this")(),Js=M&&!M.nodeType&&M,Ga=Js&&typeof q=="object"&&q&&!q.nodeType&&q,qc=Ga&&Ga.exports===Js,Yu=qc&&Xc.process,Mr=function(){try{var It=Ga&&Ga.require&&Ga.require("util").types;return It||Yu&&Yu.binding&&Yu.binding("util")}catch{}}(),Yc=Mr&&Mr.isArrayBuffer,$c=Mr&&Mr.isDate,$u=Mr&&Mr.isMap,Ju=Mr&&Mr.isRegExp,Zu=Mr&&Mr.isSet,Ku=Mr&&Mr.isTypedArray;function rr(It,Qt,ie){switch(ie.length){case 0:return It.call(Qt);case 1:return It.call(Qt,ie[0]);case 2:return It.call(Qt,ie[0],ie[1]);case 3:return It.call(Qt,ie[0],ie[1],ie[2])}return It.apply(Qt,ie)}function Jc(It,Qt,ie,Se){for(var Be=-1,gi=It==null?0:It.length;++Be<gi;){var ln=It[Be];Qt(Se,ln,ie(ln),It)}return Se}function dr(It,Qt){for(var ie=-1,Se=It==null?0:It.length;++ie<Se&&Qt(It[ie],ie,It)!==!1;);return It}function Zc(It,Qt){for(var ie=It==null?0:It.length;ie--&&Qt(It[ie],ie,It)!==!1;);return It}function Kc(It,Qt){for(var ie=-1,Se=It==null?0:It.length;++ie<Se;)if(!Qt(It[ie],ie,It))return!1;return!0}function yo(It,Qt){for(var ie=-1,Se=It==null?0:It.length,Be=0,gi=[];++ie<Se;){var ln=It[ie];Qt(ln,ie,It)&&(gi[Be++]=ln)}return gi}function Ha(It,Qt){return!!(It!=null&&It.length)&&Zs(It,Qt,0)>-1}function Qu(It,Qt,ie){for(var Se=-1,Be=It==null?0:It.length;++Se<Be;)if(ie(Qt,It[Se]))return!0;return!1}function Hi(It,Qt){for(var ie=-1,Se=It==null?0:It.length,Be=Array(Se);++ie<Se;)Be[ie]=Qt(It[ie],ie,It);return Be}function ko(It,Qt){for(var ie=-1,Se=Qt.length,Be=It.length;++ie<Se;)It[Be+ie]=Qt[ie];return It}function th(It,Qt,ie,Se){var Be=-1,gi=It==null?0:It.length;for(Se&&gi&&(ie=It[++Be]);++Be<gi;)ie=Qt(ie,It[Be],Be,It);return ie}function uf(It,Qt,ie,Se){var Be=It==null?0:It.length;for(Se&&Be&&(ie=It[--Be]);Be--;)ie=Qt(ie,It[Be],Be,It);return ie}function eh(It,Qt){for(var ie=-1,Se=It==null?0:It.length;++ie<Se;)if(Qt(It[ie],ie,It))return!0;return!1}var hf=ih("length");function Qc(It,Qt,ie){var Se;return ie(It,function(Be,gi,ln){if(Qt(Be,gi,ln))return Se=gi,!1}),Se}function Fl(It,Qt,ie,Se){for(var Be=It.length,gi=ie+(Se?1:-1);Se?gi--:++gi<Be;)if(Qt(It[gi],gi,It))return gi;return-1}function Zs(It,Qt,ie){return Qt==Qt?function(Se,Be,gi){for(var ln=gi-1,Ar=Se.length;++ln<Ar;)if(Se[ln]===Be)return ln;return-1}(It,Qt,ie):Fl(It,td,ie)}function cf(It,Qt,ie,Se){for(var Be=ie-1,gi=It.length;++Be<gi;)if(Se(It[Be],Qt))return Be;return-1}function td(It){return It!=It}function ed(It,Qt){var ie=It==null?0:It.length;return ie?rh(It,Qt)/ie:NaN}function ih(It){return function(Qt){return Qt==null?void 0:Qt[It]}}function nh(It){return function(Qt){return It==null?void 0:It[Qt]}}function id(It,Qt,ie,Se,Be){return Be(It,function(gi,ln,Ar){ie=Se?(Se=!1,gi):Qt(ie,gi,ln,Ar)}),ie}function rh(It,Qt){for(var ie,Se=-1,Be=It.length;++Se<Be;){var gi=Qt(It[Se]);gi!==void 0&&(ie=ie===void 0?gi:ie+gi)}return ie}function oh(It,Qt){for(var ie=-1,Se=Array(It);++ie<It;)Se[ie]=Qt(ie);return Se}function nd(It){return It&&It.slice(0,fs(It)+1).replace(Gi,"")}function pr(It){return function(Qt){return It(Qt)}}function sh(It,Qt){return Hi(Qt,function(ie){return It[ie]})}function za(It,Qt){return It.has(Qt)}function rd(It,Qt){for(var ie=-1,Se=It.length;++ie<Se&&Zs(Qt,It[ie],0)>-1;);return ie}function od(It,Qt){for(var ie=It.length;ie--&&Zs(Qt,It[ie],0)>-1;);return ie}function df(It,Qt){for(var ie=It.length,Se=0;ie--;)It[ie]===Qt&&++Se;return Se}var pf=nh({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),ff=nh({"&":"&","<":"<",">":">",'"':""","'":"'"});function mf(It){return"\\"+Bo[It]}function Ks(It){return $s.test(It)}function ah(It){var Qt=-1,ie=Array(It.size);return It.forEach(function(Se,Be){ie[++Qt]=[Be,Se]}),ie}function sd(It,Qt){return function(ie){return It(Qt(ie))}}function Uo(It,Qt){for(var ie=-1,Se=It.length,Be=0,gi=[];++ie<Se;){var ln=It[ie];ln!==Qt&&ln!==P||(It[ie]=P,gi[Be++]=ie)}return gi}function ps(It){var Qt=-1,ie=Array(It.size);return It.forEach(function(Se){ie[++Qt]=Se}),ie}function Bl(It){var Qt=-1,ie=Array(It.size);return It.forEach(function(Se){ie[++Qt]=[Se,Se]}),ie}function Go(It){return Ks(It)?function(Qt){for(var ie=Ys.lastIndex=0;Ys.test(Qt);)++ie;return ie}(It):hf(It)}function jn(It){return Ks(It)?function(Qt){return Qt.match(Ys)||[]}(It):function(Qt){return Qt.split("")}(It)}function fs(It){for(var Qt=It.length;Qt--&&Nn.test(It.charAt(Qt)););return Qt}var kl=nh({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Qs=function It(Qt){var ie,Se=(Qt=Qt==null?en:Qs.defaults(en.Object(),Qt,Qs.pick(en,of))).Array,Be=Qt.Date,gi=Qt.Error,ln=Qt.Function,Ar=Qt.Math,Ui=Qt.Object,Ul=Qt.RegExp,ad=Qt.String,fr=Qt.TypeError,Gl=Se.prototype,ld=ln.prototype,Ur=Ui.prototype,Hl=Qt["__core-js_shared__"],lh=ld.toString,Mi=Ur.hasOwnProperty,iv=0,gf=(ie=/[^.]+$/.exec(Hl&&Hl.keys&&Hl.keys.IE_PROTO||""))?"Symbol(src)_1."+ie:"",uh=Ur.toString,nv=lh.call(Ui),rv=en._,ov=Ul("^"+lh.call(Mi).replace(Qi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=qc?Qt.Buffer:void 0,ms=Qt.Symbol,ch=Qt.Uint8Array,vf=hh?hh.allocUnsafe:void 0,dh=sd(Ui.getPrototypeOf,Ui),_f=Ui.create,yf=Ur.propertyIsEnumerable,zl=Gl.splice,ta=ms?ms.isConcatSpreadable:void 0,xo=ms?ms.iterator:void 0,ea=ms?ms.toStringTag:void 0,ph=function(){try{var c=fa(Ui,"defineProperty");return c({},"",{}),c}catch{}}(),sv=Qt.clearTimeout!==en.clearTimeout&&Qt.clearTimeout,av=Be&&Be.now!==en.Date.now&&Be.now,lv=Qt.setTimeout!==en.setTimeout&&Qt.setTimeout,fh=Ar.ceil,mh=Ar.floor,ud=Ui.getOwnPropertySymbols,hd=hh?hh.isBuffer:void 0,Ho=Qt.isFinite,Vn=Gl.join,gh=sd(Ui.keys,Ui),zi=Ar.max,xn=Ar.min,Rr=Be.now,Wn=Qt.parseInt,vh=Ar.random,jl=Gl.reverse,Vl=fa(Qt,"DataView"),ja=fa(Qt,"Map"),_h=fa(Qt,"Promise"),ia=fa(Qt,"Set"),ce=fa(Qt,"WeakMap"),ji=fa(Ui,"create"),zo=ce&&new ce,Gr={},uv=Ss(Vl),pn=Ss(ja),cd=Ss(_h),Oi=Ss(ia),eo=Ss(ce),Wl=ms?ms.prototype:void 0,na=Wl?Wl.valueOf:void 0,Dn=Wl?Wl.toString:void 0;function S(c){if(on(c)&&!ti(c)&&!(c instanceof oi)){if(c instanceof $i)return c;if(Mi.call(c,"__wrapped__"))return Df(c)}return new $i(c)}var gs=function(){function c(){}return function(f){if(!rn(f))return{};if(_f)return _f(f);c.prototype=f;var x=new c;return c.prototype=void 0,x}}();function Xl(){}function $i(c,f){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=void 0}function oi(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function io(c){var f=-1,x=c==null?0:c.length;for(this.clear();++f<x;){var R=c[f];this.set(R[0],R[1])}}function no(c){var f=-1,x=c==null?0:c.length;for(this.clear();++f<x;){var R=c[f];this.set(R[0],R[1])}}function mr(c){var f=-1,x=c==null?0:c.length;for(this.clear();++f<x;){var R=c[f];this.set(R[0],R[1])}}function Hr(c){var f=-1,x=c==null?0:c.length;for(this.__data__=new mr;++f<x;)this.add(c[f])}function Qn(c){var f=this.__data__=new no(c);this.size=f.size}function jo(c,f){var x=ti(c),R=!x&&Es(c),D=!x&&!R&&$o(c),$=!x&&!R&&!D&&ga(c),ut=x||R||D||$,mt=ut?oh(c.length,ad):[],Mt=mt.length;for(var Jt in c)!f&&!Mi.call(c,Jt)||ut&&(Jt=="length"||D&&(Jt=="offset"||Jt=="parent")||$&&(Jt=="buffer"||Jt=="byteLength"||Jt=="byteOffset")||er(Jt,Mt))||mt.push(Jt);return mt}function Vo(c){var f=c.length;return f?c[xs(0,f-1)]:void 0}function ra(c,f){return Lh(An(c),Wo(f,0,c.length))}function ql(c){return Lh(An(c))}function Va(c,f,x){(x!==void 0&&!qr(c[f],x)||x===void 0&&!(f in c))&&wo(c,f,x)}function vs(c,f,x){var R=c[f];Mi.call(c,f)&&qr(R,x)&&(x!==void 0||f in c)||wo(c,f,x)}function bo(c,f){for(var x=c.length;x--;)if(qr(c[x][0],f))return x;return-1}function dd(c,f,x,R){return or(c,function(D,$,ut){f(R,D,x(D),ut)}),R}function xf(c,f){return c&&hn(f,Cn(f),c)}function wo(c,f,x){f=="__proto__"&&ph?ph(c,f,{configurable:!0,enumerable:!0,value:x,writable:!0}):c[f]=x}function Yl(c,f){for(var x=-1,R=f.length,D=Se(R),$=c==null;++x<R;)D[x]=$?void 0:Wd(c,f[x]);return D}function Wo(c,f,x){return c==c&&(x!==void 0&&(c=c<=x?c:x),f!==void 0&&(c=c>=f?c:f)),c}function Mn(c,f,x,R,D,$){var ut,mt=1&f,Mt=2&f,Jt=4&f;if(x&&(ut=D?x(c,R,D,$):x(c)),ut!==void 0)return ut;if(!rn(c))return c;var Zt=ti(c);if(Zt){if(ut=function(re){var pe=re.length,He=new re.constructor(pe);return pe&&typeof re[0]=="string"&&Mi.call(re,"index")&&(He.index=re.index,He.input=re.input),He}(c),!mt)return An(c,ut)}else{var de=Rn(c),Oe=de==Nt||de==E;if($o(c))return Td(c,mt);if(de==Y||de==z||Oe&&!D){if(ut=Mt||Oe?{}:Cd(c),!mt)return Mt?function(re,pe){return hn(re,ma(re),pe)}(c,function(re,pe){return re&&hn(pe,Bn(pe),re)}(ut,c)):function(re,pe){return hn(re,Wr(re),pe)}(c,xf(ut,c))}else{if(!Bi[de])return D?c:{};ut=function(re,pe,He){var Ce=re.constructor;switch(pe){case ge:return Ed(re);case Z:case vt:return new Ce(+re);case Ct:return function(Ye,li){var ke=li?Ed(Ye.buffer):Ye.buffer;return new Ye.constructor(ke,Ye.byteOffset,Ye.byteLength)}(re,He);case ot:case yt:case Pt:case H:case ft:case Et:case"[object Uint8ClampedArray]":case At:case Rt:return la(re,He);case L:return new Ce;case O:case X:return new Ce(re);case C:return function(Ye){var li=new Ye.constructor(Ye.source,to.exec(Ye));return li.lastIndex=Ye.lastIndex,li}(re);case j:return new Ce;case K:return Ue=re,na?Ui(na.call(Ue)):{}}var Ue}(c,de,mt)}}$||($=new Qn);var Fe=$.get(c);if(Fe)return Fe;$.set(c,ut),Kf(c)?c.forEach(function(re){ut.add(Mn(re,f,x,re,c,$))}):Zf(c)&&c.forEach(function(re,pe){ut.set(pe,Mn(re,f,x,pe,c,$))});var Ve=Zt?void 0:(Jt?Mt?da:sr:Mt?Bn:Cn)(c);return dr(Ve||c,function(re,pe){Ve&&(re=c[pe=re]),vs(ut,pe,Mn(re,f,x,pe,c,$))}),ut}function So(c,f,x){var R=x.length;if(c==null)return!R;for(c=Ui(c);R--;){var D=x[R],$=f[D],ut=c[D];if(ut===void 0&&!(D in c)||!$(ut))return!1}return!0}function yh(c,f,x){if(typeof c!="function")throw new fr(V);return iu(function(){c.apply(void 0,x)},f)}function _s(c,f,x,R){var D=-1,$=Ha,ut=!0,mt=c.length,Mt=[],Jt=f.length;if(!mt)return Mt;x&&(f=Hi(f,pr(x))),R?($=Qu,ut=!1):f.length>=200&&($=za,ut=!1,f=new Hr(f));t:for(;++D<mt;){var Zt=c[D],de=x==null?Zt:x(Zt);if(Zt=R||Zt!==0?Zt:0,ut&&de==de){for(var Oe=Jt;Oe--;)if(f[Oe]===de)continue t;Mt.push(Zt)}else $(f,de,R)||Mt.push(Zt)}return Mt}S.templateSettings={escape:Ze,evaluate:ri,interpolate:De,variable:"",imports:{_:S}},S.prototype=Xl.prototype,S.prototype.constructor=S,$i.prototype=gs(Xl.prototype),$i.prototype.constructor=$i,oi.prototype=gs(Xl.prototype),oi.prototype.constructor=oi,io.prototype.clear=function(){this.__data__=ji?ji(null):{},this.size=0},io.prototype.delete=function(c){var f=this.has(c)&&delete this.__data__[c];return this.size-=f?1:0,f},io.prototype.get=function(c){var f=this.__data__;if(ji){var x=f[c];return x==="__lodash_hash_undefined__"?void 0:x}return Mi.call(f,c)?f[c]:void 0},io.prototype.has=function(c){var f=this.__data__;return ji?f[c]!==void 0:Mi.call(f,c)},io.prototype.set=function(c,f){var x=this.__data__;return this.size+=this.has(c)?0:1,x[c]=ji&&f===void 0?"__lodash_hash_undefined__":f,this},no.prototype.clear=function(){this.__data__=[],this.size=0},no.prototype.delete=function(c){var f=this.__data__,x=bo(f,c);return!(x<0)&&(x==f.length-1?f.pop():zl.call(f,x,1),--this.size,!0)},no.prototype.get=function(c){var f=this.__data__,x=bo(f,c);return x<0?void 0:f[x][1]},no.prototype.has=function(c){return bo(this.__data__,c)>-1},no.prototype.set=function(c,f){var x=this.__data__,R=bo(x,c);return R<0?(++this.size,x.push([c,f])):x[R][1]=f,this},mr.prototype.clear=function(){this.size=0,this.__data__={hash:new io,map:new(ja||no),string:new io}},mr.prototype.delete=function(c){var f=nl(this,c).delete(c);return this.size-=f?1:0,f},mr.prototype.get=function(c){return nl(this,c).get(c)},mr.prototype.has=function(c){return nl(this,c).has(c)},mr.prototype.set=function(c,f){var x=nl(this,c),R=x.size;return x.set(c,f),this.size+=x.size==R?0:1,this},Hr.prototype.add=Hr.prototype.push=function(c){return this.__data__.set(c,"__lodash_hash_undefined__"),this},Hr.prototype.has=function(c){return this.__data__.has(c)},Qn.prototype.clear=function(){this.__data__=new no,this.size=0},Qn.prototype.delete=function(c){var f=this.__data__,x=f.delete(c);return this.size=f.size,x},Qn.prototype.get=function(c){return this.__data__.get(c)},Qn.prototype.has=function(c){return this.__data__.has(c)},Qn.prototype.set=function(c,f){var x=this.__data__;if(x instanceof no){var R=x.__data__;if(!ja||R.length<199)return R.push([c,f]),this.size=++x.size,this;x=this.__data__=new mr(R)}return x.set(c,f),this.size=x.size,this};var or=ze(To),xh=ze(pd,!0);function bh(c,f){var x=!0;return or(c,function(R,D,$){return x=!!f(R,D,$)}),x}function Wa(c,f,x){for(var R=-1,D=c.length;++R<D;){var $=c[R],ut=f($);if(ut!=null&&(mt===void 0?ut==ut&&!Or(ut):x(ut,mt)))var mt=ut,Mt=$}return Mt}function Xo(c,f){var x=[];return or(c,function(R,D,$){f(R,D,$)&&x.push(R)}),x}function Ee(c,f,x,R,D){var $=-1,ut=c.length;for(x||(x=hv),D||(D=[]);++$<ut;){var mt=c[$];f>0&&x(mt)?f>1?Ee(mt,f-1,x,R,D):ko(D,mt):R||(D[D.length]=mt)}return D}var ys=Md(),zr=Md(!0);function To(c,f){return c&&ys(c,f,Cn)}function pd(c,f){return c&&zr(c,f,Cn)}function ro(c,f){return yo(f,function(x){return lo(c[x])})}function Eo(c,f){for(var x=0,R=(f=so(f,c)).length;c!=null&&x<R;)c=c[Xr(f[x++])];return x&&x==R?c:void 0}function gr(c,f,x){var R=f(c);return ti(c)?R:ko(R,x(c))}function tr(c){return c==null?c===void 0?"[object Undefined]":"[object Null]":ea&&ea in Ui(c)?function(f){var x=Mi.call(f,ea),R=f[ea];try{f[ea]=void 0;var D=!0}catch{}var $=uh.call(f);return D&&(x?f[ea]=R:delete f[ea]),$}(c):function(f){return uh.call(f)}(c)}function wh(c,f){return c>f}function oa(c,f){return c!=null&&Mi.call(c,f)}function fd(c,f){return c!=null&&f in Ui(c)}function md(c,f,x){for(var R=x?Qu:Ha,D=c[0].length,$=c.length,ut=$,mt=Se($),Mt=1/0,Jt=[];ut--;){var Zt=c[ut];ut&&f&&(Zt=Hi(Zt,pr(f))),Mt=xn(Zt.length,Mt),mt[ut]=!x&&(f||D>=120&&Zt.length>=120)?new Hr(ut&&Zt):void 0}Zt=c[0];var de=-1,Oe=mt[0];t:for(;++de<D&&Jt.length<Mt;){var Fe=Zt[de],Ve=f?f(Fe):Fe;if(Fe=x||Fe!==0?Fe:0,!(Oe?za(Oe,Ve):R(Jt,Ve,x))){for(ut=$;--ut;){var re=mt[ut];if(!(re?za(re,Ve):R(c[ut],Ve,x)))continue t}Oe&&Oe.push(Ve),Jt.push(Fe)}}return Jt}function Xa(c,f,x){var R=(c=If(c,f=so(f,c)))==null?c:c[Xr(Lr(f))];return R==null?void 0:rr(R,c,x)}function sa(c){return on(c)&&tr(c)==z}function Cr(c,f,x,R,D){return c===f||(c==null||f==null||!on(c)&&!on(f)?c!=c&&f!=f:function($,ut,mt,Mt,Jt,Zt){var de=ti($),Oe=ti(ut),Fe=de?k:Rn($),Ve=Oe?k:Rn(ut),re=(Fe=Fe==z?Y:Fe)==Y,pe=(Ve=Ve==z?Y:Ve)==Y,He=Fe==Ve;if(He&&$o($)){if(!$o(ut))return!1;de=!0,re=!1}if(He&&!re)return Zt||(Zt=new Qn),de||ga($)?Xn($,ut,mt,Mt,Jt,Zt):function(ke,Je,cn,qn,dn,sn,uo){switch(cn){case Ct:if(ke.byteLength!=Je.byteLength||ke.byteOffset!=Je.byteOffset)return!1;ke=ke.buffer,Je=Je.buffer;case ge:return!(ke.byteLength!=Je.byteLength||!sn(new ch(ke),new ch(Je)));case Z:case vt:case O:return qr(+ke,+Je);case Ot:return ke.name==Je.name&&ke.message==Je.message;case C:case X:return ke==Je+"";case L:var Po=ah;case j:var As=1&qn;if(Po||(Po=ps),ke.size!=Je.size&&!As)return!1;var dl=uo.get(ke);if(dl)return dl==Je;qn|=2,uo.set(ke,Je);var Rs=Xn(Po(ke),Po(Je),qn,dn,sn,uo);return uo.delete(ke),Rs;case K:if(na)return na.call(ke)==na.call(Je)}return!1}($,ut,Fe,mt,Mt,Jt,Zt);if(!(1&mt)){var Ce=re&&Mi.call($,"__wrapped__"),Ue=pe&&Mi.call(ut,"__wrapped__");if(Ce||Ue){var Ye=Ce?$.value():$,li=Ue?ut.value():ut;return Zt||(Zt=new Qn),Jt(Ye,li,mt,Mt,Zt)}}return He?(Zt||(Zt=new Qn),function(ke,Je,cn,qn,dn,sn){var uo=1&cn,Po=sr(ke),As=Po.length,dl=sr(Je).length;if(As!=dl&&!uo)return!1;for(var Rs=As;Rs--;){var Io=Po[Rs];if(!(uo?Io in Je:Mi.call(Je,Io)))return!1}var Kh=sn.get(ke),$d=sn.get(Je);if(Kh&&$d)return Kh==Je&&$d==ke;var Cs=!0;sn.set(ke,Je),sn.set(Je,ke);for(var wa=uo;++Rs<As;){Io=Po[Rs];var Sa=ke[Io],pl=Je[Io];if(qn)var fl=uo?qn(pl,Sa,Io,Je,ke,sn):qn(Sa,pl,Io,ke,Je,sn);if(!(fl===void 0?Sa===pl||dn(Sa,pl,cn,qn,sn):fl)){Cs=!1;break}wa||(wa=Io=="constructor")}if(Cs&&!wa){var pu=ke.constructor,Ta=Je.constructor;pu==Ta||!("constructor"in ke)||!("constructor"in Je)||typeof pu=="function"&&pu instanceof pu&&typeof Ta=="function"&&Ta instanceof Ta||(Cs=!1)}return sn.delete(ke),sn.delete(Je),Cs}($,ut,mt,Mt,Jt,Zt)):!1}(c,f,x,R,Cr,D))}function qa(c,f,x,R){var D=x.length,$=D,ut=!R;if(c==null)return!$;for(c=Ui(c);D--;){var mt=x[D];if(ut&&mt[2]?mt[1]!==c[mt[0]]:!(mt[0]in c))return!1}for(;++D<$;){var Mt=(mt=x[D])[0],Jt=c[Mt],Zt=mt[1];if(ut&&mt[2]){if(Jt===void 0&&!(Mt in c))return!1}else{var de=new Qn;if(R)var Oe=R(Jt,Zt,Mt,c,f,de);if(!(Oe===void 0?Cr(Zt,Jt,3,R,de):Oe))return!1}}return!0}function Ya(c){return!(!rn(c)||(f=c,gf&&gf in f))&&(lo(c)?ov:at).test(Ss(c));var f}function bf(c){return typeof c=="function"?c:c==null?lr:typeof c=="object"?ti(c)?_d(c[0],c[1]):Sf(c):hm(c)}function gd(c){if(!eu(c))return gh(c);var f=[];for(var x in Ui(c))Mi.call(c,x)&&x!="constructor"&&f.push(x);return f}function wf(c){if(!rn(c))return function(D){var $=[];if(D!=null)for(var ut in Ui(D))$.push(ut);return $}(c);var f=eu(c),x=[];for(var R in c)(R!="constructor"||!f&&Mi.call(c,R))&&x.push(R);return x}function Sh(c,f){return c<f}function vd(c,f){var x=-1,R=vr(c)?Se(c.length):[];return or(c,function(D,$,ut){R[++x]=f(D,$,ut)}),R}function Sf(c){var f=Rd(c);return f.length==1&&f[0][2]?Cf(f[0][0],f[0][1]):function(x){return x===c||qa(x,c,f)}}function _d(c,f){return Te(c)&&Rf(f)?Cf(Xr(c),f):function(x){var R=Wd(x,c);return R===void 0&&R===f?ou(x,c):Cr(f,R,3)}}function hi(c,f,x,R,D){c!==f&&ys(f,function($,ut){if(D||(D=new Qn),rn($))(function(Mt,Jt,Zt,de,Oe,Fe,Ve){var re=Pd(Mt,Zt),pe=Pd(Jt,Zt),He=Ve.get(pe);if(He)return void Va(Mt,Zt,He);var Ce=Fe?Fe(re,pe,Zt+"",Mt,Jt,Ve):void 0,Ue=Ce===void 0;if(Ue){var Ye=ti(pe),li=!Ye&&$o(pe),ke=!Ye&&!li&&ga(pe);Ce=pe,Ye||li||ke?ti(re)?Ce=re:Wi(re)?Ce=An(re):li?(Ue=!1,Ce=Td(pe,!0)):ke?(Ue=!1,Ce=la(pe,!0)):Ce=[]:sl(pe)||Es(pe)?(Ce=re,Es(re)?Ce=im(re):rn(re)&&!lo(re)||(Ce=Cd(pe))):Ue=!1}Ue&&(Ve.set(pe,Ce),Oe(Ce,pe,de,Fe,Ve),Ve.delete(pe)),Va(Mt,Zt,Ce)})(c,f,ut,x,hi,R,D);else{var mt=R?R(Pd(c,ut),$,ut+"",c,f,D):void 0;mt===void 0&&(mt=$),Va(c,ut,mt)}},Bn)}function jr(c,f){var x=c.length;if(x)return er(f+=f<0?x:0,x)?c[f]:void 0}function Mo(c,f,x){f=f.length?Hi(f,function(D){return ti(D)?function($){return Eo($,D.length===1?D[0]:D)}:D}):[lr];var R=-1;return f=Hi(f,pr(je())),function(D,$){var ut=D.length;for(D.sort($);ut--;)D[ut]=D[ut].value;return D}(vd(c,function(D,$,ut){return{criteria:Hi(f,function(mt){return mt(D)}),index:++R,value:D}}),function(D,$){return function(ut,mt,Mt){for(var Jt=-1,Zt=ut.criteria,de=mt.criteria,Oe=Zt.length,Fe=Mt.length;++Jt<Oe;){var Ve=Af(Zt[Jt],de[Jt]);if(Ve){if(Jt>=Fe)return Ve;var re=Mt[Jt];return Ve*(re=="desc"?-1:1)}}return ut.index-mt.index}(D,$,x)})}function Th(c,f,x){for(var R=-1,D=f.length,$={};++R<D;){var ut=f[R],mt=Eo(c,ut);x(mt,ut)&&Vi($,so(ut,c),mt)}return $}function oo(c,f,x,R){var D=R?cf:Zs,$=-1,ut=f.length,mt=c;for(c===f&&(f=An(f)),x&&(mt=Hi(c,pr(x)));++$<ut;)for(var Mt=0,Jt=f[$],Zt=x?x(Jt):Jt;(Mt=D(mt,Zt,Mt,R))>-1;)mt!==c&&zl.call(mt,Mt,1),zl.call(c,Mt,1);return c}function aa(c,f){for(var x=c?f.length:0,R=x-1;x--;){var D=f[x];if(x==R||D!==$){var $=D;er(D)?zl.call(c,D,1):Ja(c,D)}}return c}function xs(c,f){return c+mh(vh()*(f-c+1))}function Eh(c,f){var x="";if(!c||f<1||f>9007199254740991)return x;do f%2&&(x+=c),(f=mh(f/2))&&(c+=c);while(f);return x}function ci(c,f){return Id(Pf(c,f,lr),c+"")}function yd(c){return Vo(Co(c))}function xd(c,f){var x=Co(c);return Lh(x,Wo(f,0,x.length))}function Vi(c,f,x,R){if(!rn(c))return c;for(var D=-1,$=(f=so(f,c)).length,ut=$-1,mt=c;mt!=null&&++D<$;){var Mt=Xr(f[D]),Jt=x;if(Mt==="__proto__"||Mt==="constructor"||Mt==="prototype")return c;if(D!=ut){var Zt=mt[Mt];(Jt=R?R(Zt,Mt,mt):void 0)===void 0&&(Jt=rn(Zt)?Zt:er(f[D+1])?[]:{})}vs(mt,Mt,Jt),mt=mt[Mt]}return c}var Tf=zo?function(c,f){return zo.set(c,f),c}:lr,Fn=ph?function(c,f){return ph(c,"toString",{configurable:!0,enumerable:!1,value:ul(f),writable:!0})}:lr;function Ef(c){return Lh(Co(c))}function un(c,f,x){var R=-1,D=c.length;f<0&&(f=-f>D?0:D+f),(x=x>D?D:x)<0&&(x+=D),D=f>x?0:x-f>>>0,f>>>=0;for(var $=Se(D);++R<D;)$[R]=c[R+f];return $}function Mh(c,f){var x;return or(c,function(R,D,$){return!(x=f(R,D,$))}),!!x}function $a(c,f,x){var R=0,D=c==null?R:c.length;if(typeof f=="number"&&f==f&&D<=2147483647){for(;R<D;){var $=R+D>>>1,ut=c[$];ut!==null&&!Or(ut)&&(x?ut<=f:ut<f)?R=$+1:D=$}return D}return $l(c,f,lr,x)}function $l(c,f,x,R){var D=0,$=c==null?0:c.length;if($===0)return 0;for(var ut=(f=x(f))!=f,mt=f===null,Mt=Or(f),Jt=f===void 0;D<$;){var Zt=mh((D+$)/2),de=x(c[Zt]),Oe=de!==void 0,Fe=de===null,Ve=de==de,re=Or(de);if(ut)var pe=R||Ve;else pe=Jt?Ve&&(R||Oe):mt?Ve&&Oe&&(R||!Fe):Mt?Ve&&Oe&&!Fe&&(R||!re):!Fe&&!re&&(R?de<=f:de<f);pe?D=Zt+1:$=Zt}return xn($,4294967294)}function Ah(c,f){for(var x=-1,R=c.length,D=0,$=[];++x<R;){var ut=c[x],mt=f?f(ut):ut;if(!x||!qr(mt,Mt)){var Mt=mt;$[D++]=ut===0?0:ut}}return $}function Le(c){return typeof c=="number"?c:Or(c)?NaN:+c}function fn(c){if(typeof c=="string")return c;if(ti(c))return Hi(c,fn)+"";if(Or(c))return Dn?Dn.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}function Ti(c,f,x){var R=-1,D=Ha,$=c.length,ut=!0,mt=[],Mt=mt;if(x)ut=!1,D=Qu;else if($>=200){var Jt=f?null:Ad(c);if(Jt)return ps(Jt);ut=!1,D=za,Mt=new Hr}else Mt=f?[]:mt;t:for(;++R<$;){var Zt=c[R],de=f?f(Zt):Zt;if(Zt=x||Zt!==0?Zt:0,ut&&de==de){for(var Oe=Mt.length;Oe--;)if(Mt[Oe]===de)continue t;f&&Mt.push(de),mt.push(Zt)}else D(Mt,de,x)||(Mt!==mt&&Mt.push(de),mt.push(Zt))}return mt}function Ja(c,f){return(c=If(c,f=so(f,c)))==null||delete c[Xr(Lr(f))]}function mi(c,f,x,R){return Vi(c,f,x(Eo(c,f)),R)}function Jl(c,f,x,R){for(var D=c.length,$=R?D:-1;(R?$--:++$<D)&&f(c[$],$,c););return x?un(c,R?0:$,R?$+1:D):un(c,R?$+1:0,R?D:$)}function bd(c,f){var x=c;return x instanceof oi&&(x=x.value()),th(f,function(R,D){return D.func.apply(D.thisArg,ko([R],D.args))},x)}function Rh(c,f,x){var R=c.length;if(R<2)return R?Ti(c[0]):[];for(var D=-1,$=Se(R);++D<R;)for(var ut=c[D],mt=-1;++mt<R;)mt!=D&&($[D]=_s($[D]||ut,c[mt],f,x));return Ti(Ee($,1),f,x)}function wd(c,f,x){for(var R=-1,D=c.length,$=f.length,ut={};++R<D;){var mt=R<$?f[R]:void 0;x(ut,c[R],mt)}return ut}function Za(c){return Wi(c)?c:[]}function Ch(c){return typeof c=="function"?c:lr}function so(c,f){return ti(c)?c:Te(c,f)?[c]:Oh(wi(c))}var Mf=ci;function _e(c,f,x){var R=c.length;return x=x===void 0?R:x,!f&&x>=R?c:un(c,f,x)}var Sd=sv||function(c){return en.clearTimeout(c)};function Td(c,f){if(f)return c.slice();var x=c.length,R=vf?vf(x):new c.constructor(x);return c.copy(R),R}function Ed(c){var f=new c.constructor(c.byteLength);return new ch(f).set(new ch(c)),f}function la(c,f){var x=f?Ed(c.buffer):c.buffer;return new c.constructor(x,c.byteOffset,c.length)}function Af(c,f){if(c!==f){var x=c!==void 0,R=c===null,D=c==c,$=Or(c),ut=f!==void 0,mt=f===null,Mt=f==f,Jt=Or(f);if(!mt&&!Jt&&!$&&c>f||$&&ut&&Mt&&!mt&&!Jt||R&&ut&&Mt||!x&&Mt||!D)return 1;if(!R&&!$&&!Jt&&c<f||Jt&&x&&D&&!R&&!$||mt&&x&&D||!ut&&D||!Mt)return-1}return 0}function Pr(c,f,x,R){for(var D=-1,$=c.length,ut=x.length,mt=-1,Mt=f.length,Jt=zi($-ut,0),Zt=Se(Mt+Jt),de=!R;++mt<Mt;)Zt[mt]=f[mt];for(;++D<ut;)(de||D<$)&&(Zt[x[D]]=c[D]);for(;Jt--;)Zt[mt++]=c[D++];return Zt}function Ph(c,f,x,R){for(var D=-1,$=c.length,ut=-1,mt=x.length,Mt=-1,Jt=f.length,Zt=zi($-mt,0),de=Se(Zt+Jt),Oe=!R;++D<Zt;)de[D]=c[D];for(var Fe=D;++Mt<Jt;)de[Fe+Mt]=f[Mt];for(;++ut<mt;)(Oe||D<$)&&(de[Fe+x[ut]]=c[D++]);return de}function An(c,f){var x=-1,R=c.length;for(f||(f=Se(R));++x<R;)f[x]=c[x];return f}function hn(c,f,x,R){var D=!x;x||(x={});for(var $=-1,ut=f.length;++$<ut;){var mt=f[$],Mt=R?R(x[mt],c[mt],mt,x,c):void 0;Mt===void 0&&(Mt=c[mt]),D?wo(x,mt,Mt):vs(x,mt,Mt)}return x}function bs(c,f){return function(x,R){var D=ti(x)?Jc:dd,$=f?f():{};return D(x,c,je(R,2),$)}}function nn(c){return ci(function(f,x){var R=-1,D=x.length,$=D>1?x[D-1]:void 0,ut=D>2?x[2]:void 0;for($=c.length>3&&typeof $=="function"?(D--,$):void 0,ut&&$e(x[0],x[1],ut)&&($=D<3?void 0:$,D=1),f=Ui(f);++R<D;){var mt=x[R];mt&&c(f,mt,R,$)}return f})}function ze(c,f){return function(x,R){if(x==null)return x;if(!vr(x))return c(x,R);for(var D=x.length,$=f?D:-1,ut=Ui(x);(f?$--:++$<D)&&R(ut[$],$,ut)!==!1;);return x}}function Md(c){return function(f,x,R){for(var D=-1,$=Ui(f),ut=R(f),mt=ut.length;mt--;){var Mt=ut[c?mt:++D];if(x($[Mt],Mt,$)===!1)break}return f}}function ua(c){return function(f){var x=Ks(f=wi(f))?jn(f):void 0,R=x?x[0]:f.charAt(0),D=x?_e(x,1).join(""):f.slice(1);return R[c]()+D}}function ws(c){return function(f){return th(Xd(ba(f).replace(Dl,"")),c,"")}}function Vr(c){return function(){var f=arguments;switch(f.length){case 0:return new c;case 1:return new c(f[0]);case 2:return new c(f[0],f[1]);case 3:return new c(f[0],f[1],f[2]);case 4:return new c(f[0],f[1],f[2],f[3]);case 5:return new c(f[0],f[1],f[2],f[3],f[4]);case 6:return new c(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new c(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var x=gs(c.prototype),R=c.apply(x,f);return rn(R)?R:x}}function qo(c){return function(f,x,R){var D=Ui(f);if(!vr(f)){var $=je(x,3);f=Cn(f),x=function(mt){return $(D[mt],mt,D)}}var ut=c(f,x,R);return ut>-1?D[$?f[ut]:ut]:void 0}}function Yo(c){return Ro(function(f){var x=f.length,R=x,D=$i.prototype.thru;for(c&&f.reverse();R--;){var $=f[R];if(typeof $!="function")throw new fr(V);if(D&&!ut&&pa($)=="wrapper")var ut=new $i([],!0)}for(R=ut?R:x;++R<x;){var mt=pa($=f[R]),Mt=mt=="wrapper"?mn($):void 0;ut=Mt&&Ir(Mt[0])&&Mt[1]==424&&!Mt[4].length&&Mt[9]==1?ut[pa(Mt[0])].apply(ut,Mt[3]):$.length==1&&Ir($)?ut[mt]():ut.thru($)}return function(){var Jt=arguments,Zt=Jt[0];if(ut&&Jt.length==1&&ti(Zt))return ut.plant(Zt).value();for(var de=0,Oe=x?f[de].apply(this,Jt):Zt;++de<x;)Oe=f[de].call(this,Oe);return Oe}})}function Ka(c,f,x,R,D,$,ut,mt,Mt,Jt){var Zt=128&f,de=1&f,Oe=2&f,Fe=24&f,Ve=512&f,re=Oe?void 0:Vr(c);return function pe(){for(var He=arguments.length,Ce=Se(He),Ue=He;Ue--;)Ce[Ue]=arguments[Ue];if(Fe)var Ye=ao(pe),li=df(Ce,Ye);if(R&&(Ce=Pr(Ce,R,D,Fe)),$&&(Ce=Ph(Ce,$,ut,Fe)),He-=li,Fe&&He<Jt){var ke=Uo(Ce,Ye);return Kl(c,f,Ka,pe.placeholder,x,Ce,ke,mt,Mt,Jt-He)}var Je=de?x:this,cn=Oe?Je[c]:c;return He=Ce.length,mt?Ce=dv(Ce,mt):Ve&&He>1&&Ce.reverse(),Zt&&Mt<He&&(Ce.length=Mt),this&&this!==en&&this instanceof pe&&(cn=re||Vr(cn)),cn.apply(Je,Ce)}}function Ih(c,f){return function(x,R){return function(D,$,ut,mt){return To(D,function(Mt,Jt,Zt){$(mt,ut(Mt),Jt,Zt)}),mt}(x,c,f(R),{})}}function Qa(c,f){return function(x,R){var D;if(x===void 0&&R===void 0)return f;if(x!==void 0&&(D=x),R!==void 0){if(D===void 0)return R;typeof x=="string"||typeof R=="string"?(x=fn(x),R=fn(R)):(x=Le(x),R=Le(R)),D=c(x,R)}return D}}function tl(c){return Ro(function(f){return f=Hi(f,pr(je())),ci(function(x){var R=this;return c(f,function(D){return rr(D,R,x)})})})}function ha(c,f){var x=(f=f===void 0?" ":fn(f)).length;if(x<2)return x?Eh(f,c):f;var R=Eh(f,fh(c/Go(f)));return Ks(f)?_e(jn(R),0,c).join(""):R.slice(0,c)}function Zl(c){return function(f,x,R){return R&&typeof R!="number"&&$e(f,x,R)&&(x=R=void 0),f=Jo(f),x===void 0?(x=f,f=0):x=Jo(x),function(D,$,ut,mt){for(var Mt=-1,Jt=zi(fh(($-D)/(ut||1)),0),Zt=Se(Jt);Jt--;)Zt[mt?Jt:++Mt]=D,D+=ut;return Zt}(f,x,R=R===void 0?f<x?1:-1:Jo(R),c)}}function ca(c){return function(f,x){return typeof f=="string"&&typeof x=="string"||(f=Nr(f),x=Nr(x)),c(f,x)}}function Kl(c,f,x,R,D,$,ut,mt,Mt,Jt){var Zt=8&f;f|=Zt?32:64,4&(f&=~(Zt?64:32))||(f&=-4);var de=[c,f,D,Zt?$:void 0,Zt?ut:void 0,Zt?void 0:$,Zt?void 0:ut,mt,Mt,Jt],Oe=x.apply(void 0,de);return Ir(c)&&Lf(Oe,de),Oe.placeholder=R,Of(Oe,c,f)}function el(c){var f=Ar[c];return function(x,R){if(x=Nr(x),(R=R==null?0:xn(di(R),292))&&Ho(x)){var D=(wi(x)+"e").split("e");return+((D=(wi(f(D[0]+"e"+(+D[1]+R)))+"e").split("e"))[0]+"e"+(+D[1]-R))}return f(x)}}var Ad=ia&&1/ps(new ia([,-0]))[1]==1/0?function(c){return new ia(c)}:hl;function Ql(c){return function(f){var x=Rn(f);return x==L?ah(f):x==j?Bl(f):function(R,D){return Hi(D,function($){return[$,R[$]]})}(f,c(f))}}function Ei(c,f,x,R,D,$,ut,mt){var Mt=2&f;if(!Mt&&typeof c!="function")throw new fr(V);var Jt=R?R.length:0;if(Jt||(f&=-97,R=D=void 0),ut=ut===void 0?ut:zi(di(ut),0),mt=mt===void 0?mt:di(mt),Jt-=D?D.length:0,64&f){var Zt=R,de=D;R=D=void 0}var Oe=Mt?void 0:mn(c),Fe=[c,f,x,R,D,Zt,de,$,ut,mt];if(Oe&&function(re,pe){var He=re[1],Ce=pe[1],Ue=He|Ce,Ye=Ue<131,li=Ce==128&&He==8||Ce==128&&He==256&&re[7].length<=pe[8]||Ce==384&&pe[7].length<=pe[8]&&He==8;if(!Ye&&!li)return re;1&Ce&&(re[2]=pe[2],Ue|=1&He?0:4);var ke=pe[3];if(ke){var Je=re[3];re[3]=Je?Pr(Je,ke,pe[4]):ke,re[4]=Je?Uo(re[3],P):pe[4]}(ke=pe[5])&&(Je=re[5],re[5]=Je?Ph(Je,ke,pe[6]):ke,re[6]=Je?Uo(re[5],P):pe[6]),(ke=pe[7])&&(re[7]=ke),128&Ce&&(re[8]=re[8]==null?pe[8]:xn(re[8],pe[8])),re[9]==null&&(re[9]=pe[9]),re[0]=pe[0],re[1]=Ue}(Fe,Oe),c=Fe[0],f=Fe[1],x=Fe[2],R=Fe[3],D=Fe[4],!(mt=Fe[9]=Fe[9]===void 0?Mt?0:c.length:zi(Fe[9]-Jt,0))&&24&f&&(f&=-25),f&&f!=1)Ve=f==8||f==16?function(re,pe,He){var Ce=Vr(re);return function Ue(){for(var Ye=arguments.length,li=Se(Ye),ke=Ye,Je=ao(Ue);ke--;)li[ke]=arguments[ke];var cn=Ye<3&&li[0]!==Je&&li[Ye-1]!==Je?[]:Uo(li,Je);if((Ye-=cn.length)<He)return Kl(re,pe,Ka,Ue.placeholder,void 0,li,cn,void 0,void 0,He-Ye);var qn=this&&this!==en&&this instanceof Ue?Ce:re;return rr(qn,this,li)}}(c,f,mt):f!=32&&f!=33||D.length?Ka.apply(void 0,Fe):function(re,pe,He,Ce){var Ue=1&pe,Ye=Vr(re);return function li(){for(var ke=-1,Je=arguments.length,cn=-1,qn=Ce.length,dn=Se(qn+Je),sn=this&&this!==en&&this instanceof li?Ye:re;++cn<qn;)dn[cn]=Ce[cn];for(;Je--;)dn[cn++]=arguments[++ke];return rr(sn,Ue?He:this,dn)}}(c,f,x,R);else var Ve=function(re,pe,He){var Ce=1&pe,Ue=Vr(re);return function Ye(){var li=this&&this!==en&&this instanceof Ye?Ue:re;return li.apply(Ce?He:this,arguments)}}(c,f,x);return Of((Oe?Tf:Lf)(Ve,Fe),c,f)}function tu(c,f,x,R){return c===void 0||qr(c,Ur[x])&&!Mi.call(R,x)?f:c}function Ao(c,f,x,R,D,$){return rn(c)&&rn(f)&&($.set(f,c),hi(c,f,void 0,Ao,$),$.delete(f)),c}function il(c){return sl(c)?void 0:c}function Xn(c,f,x,R,D,$){var ut=1&x,mt=c.length,Mt=f.length;if(mt!=Mt&&!(ut&&Mt>mt))return!1;var Jt=$.get(c),Zt=$.get(f);if(Jt&&Zt)return Jt==f&&Zt==c;var de=-1,Oe=!0,Fe=2&x?new Hr:void 0;for($.set(c,f),$.set(f,c);++de<mt;){var Ve=c[de],re=f[de];if(R)var pe=ut?R(re,Ve,de,f,c,$):R(Ve,re,de,c,f,$);if(pe!==void 0){if(pe)continue;Oe=!1;break}if(Fe){if(!eh(f,function(He,Ce){if(!za(Fe,Ce)&&(Ve===He||D(Ve,He,x,R,$)))return Fe.push(Ce)})){Oe=!1;break}}else if(Ve!==re&&!D(Ve,re,x,R,$)){Oe=!1;break}}return $.delete(c),$.delete(f),Oe}function Ro(c){return Id(Pf(c,void 0,Nd),c+"")}function sr(c){return gr(c,Cn,Wr)}function da(c){return gr(c,Bn,ma)}var mn=zo?function(c){return zo.get(c)}:hl;function pa(c){for(var f=c.name+"",x=Gr[f],R=Mi.call(Gr,f)?x.length:0;R--;){var D=x[R],$=D.func;if($==null||$==c)return D.name}return f}function ao(c){return(Mi.call(S,"placeholder")?S:c).placeholder}function je(){var c=S.iteratee||Wh;return c=c===Wh?bf:c,arguments.length?c(arguments[0],arguments[1]):c}function nl(c,f){var x,R,D=c.__data__;return((R=typeof(x=f))=="string"||R=="number"||R=="symbol"||R=="boolean"?x!=="__proto__":x===null)?D[typeof f=="string"?"string":"hash"]:D.map}function Rd(c){for(var f=Cn(c),x=f.length;x--;){var R=f[x],D=c[R];f[x]=[R,D,Rf(D)]}return f}function fa(c,f){var x=function(R,D){return R==null?void 0:R[D]}(c,f);return Ya(x)?x:void 0}var Wr=ud?function(c){return c==null?[]:(c=Ui(c),yo(ud(c),function(f){return yf.call(c,f)}))}:$h,ma=ud?function(c){for(var f=[];c;)ko(f,Wr(c)),c=dh(c);return f}:$h,Rn=tr;function rl(c,f,x){for(var R=-1,D=(f=so(f,c)).length,$=!1;++R<D;){var ut=Xr(f[R]);if(!($=c!=null&&x(c,ut)))break;c=c[ut]}return $||++R!=D?$:!!(D=c==null?0:c.length)&&kh(D)&&er(ut,D)&&(ti(c)||Es(c))}function Cd(c){return typeof c.constructor!="function"||eu(c)?{}:gs(dh(c))}function hv(c){return ti(c)||Es(c)||!!(ta&&c&&c[ta])}function er(c,f){var x=typeof c;return!!(f=f==null?9007199254740991:f)&&(x=="number"||x!="symbol"&&bt.test(c))&&c>-1&&c%1==0&&c<f}function $e(c,f,x){if(!rn(x))return!1;var R=typeof f;return!!(R=="number"?vr(x)&&er(f,x.length):R=="string"&&f in x)&&qr(x[f],c)}function Te(c,f){if(ti(c))return!1;var x=typeof c;return!(x!="number"&&x!="symbol"&&x!="boolean"&&c!=null&&!Or(c))||Fi.test(c)||!ki.test(c)||f!=null&&c in Ui(f)}function Ir(c){var f=pa(c),x=S[f];if(typeof x!="function"||!(f in oi.prototype))return!1;if(c===x)return!0;var R=mn(x);return!!R&&c===R[0]}(Vl&&Rn(new Vl(new ArrayBuffer(1)))!=Ct||ja&&Rn(new ja)!=L||_h&&Rn(_h.resolve())!="[object Promise]"||ia&&Rn(new ia)!=j||ce&&Rn(new ce)!=qt)&&(Rn=function(c){var f=tr(c),x=f==Y?c.constructor:void 0,R=x?Ss(x):"";if(R)switch(R){case uv:return Ct;case pn:return L;case cd:return"[object Promise]";case Oi:return j;case eo:return qt}return f});var cv=Hl?lo:cl;function eu(c){var f=c&&c.constructor;return c===(typeof f=="function"&&f.prototype||Ur)}function Rf(c){return c==c&&!rn(c)}function Cf(c,f){return function(x){return x!=null&&x[c]===f&&(f!==void 0||c in Ui(x))}}function Pf(c,f,x){return f=zi(f===void 0?c.length-1:f,0),function(){for(var R=arguments,D=-1,$=zi(R.length-f,0),ut=Se($);++D<$;)ut[D]=R[f+D];D=-1;for(var mt=Se(f+1);++D<f;)mt[D]=R[D];return mt[f]=x(ut),rr(c,this,mt)}}function If(c,f){return f.length<2?c:Eo(c,un(f,0,-1))}function dv(c,f){for(var x=c.length,R=xn(f.length,x),D=An(c);R--;){var $=f[R];c[R]=er($,x)?D[$]:void 0}return c}function Pd(c,f){if((f!=="constructor"||typeof c[f]!="function")&&f!="__proto__")return c[f]}var Lf=Nf(Tf),iu=lv||function(c,f){return en.setTimeout(c,f)},Id=Nf(Fn);function Of(c,f,x){var R=f+"";return Id(c,function(D,$){var ut=$.length;if(!ut)return D;var mt=ut-1;return $[mt]=(ut>1?"& ":"")+$[mt],$=$.join(ut>2?", ":" "),D.replace(tn,`{
|
|
9
9
|
/* [wrapped with `+$+`] */
|
|
10
|
-
`)}(R,function(D,$){return dr(V,function(ut){var mt="_."+ut[0];$&ut[1]&&!Ha(D,mt)&&D.push(mt)}),D.sort()}(function(D){var $=D.match(Zn);return $?$[1].split(Kn):[]}(R),x)))}function Nf(c){var f=0,x=0;return function(){var R=Rr(),D=16-(R-x);if(x=R,D>0){if(++f>=800)return arguments[0]}else f=0;return c.apply(void 0,arguments)}}function Lh(c,f){var x=-1,R=c.length,D=R-1;for(f=f===void 0?R:f;++x<f;){var $=xs(x,D),ut=c[$];c[$]=c[x],c[x]=ut}return c.length=f,c}var Oh=function(c){var f=nu(c,function(R){return x.size===500&&x.clear(),R}),x=f.cache;return f}(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(Pi,function(x,R,D,$){f.push(D?$.replace(qu,"$1"):R||x)}),f});function Xr(c){if(typeof c=="string"||Or(c))return c;var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}function Ss(c){if(c!=null){try{return lh.call(c)}catch{}try{return c+""}catch{}}return""}function Df(c){if(c instanceof oi)return c.clone();var f=new $i(c.__wrapped__,c.__chain__);return f.__actions__=An(c.__actions__),f.__index__=c.__index__,f.__values__=c.__values__,f}var pv=ci(function(c,f){return Wi(c)?_s(c,Ee(f,1,Wi,!0)):[]}),Ff=ci(function(c,f){var x=Lr(f);return Wi(x)&&(x=void 0),Wi(c)?_s(c,Ee(f,1,Wi,!0),je(x,2)):[]}),Bf=ci(function(c,f){var x=Lr(f);return Wi(x)&&(x=void 0),Wi(c)?_s(c,Ee(f,1,Wi,!0),void 0,x):[]});function Ld(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=x==null?0:di(x);return D<0&&(D=zi(R+D,0)),Fl(c,je(f,3),D)}function Od(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=R-1;return x!==void 0&&(D=di(x),D=x<0?zi(R+D,0):xn(D,R-1)),Fl(c,je(f,3),D,!0)}function Nd(c){return c!=null&&c.length?Ee(c,1):[]}function Dd(c){return c&&c.length?c[0]:void 0}var ol=ci(function(c){var f=Hi(c,Za);return f.length&&f[0]===c[0]?md(f):[]}),ar=ci(function(c){var f=Lr(c),x=Hi(c,Za);return f===Lr(x)?f=void 0:x.pop(),x.length&&x[0]===c[0]?md(x,je(f,2)):[]}),ir=ci(function(c){var f=Lr(c),x=Hi(c,Za);return(f=typeof f=="function"?f:void 0)&&x.pop(),x.length&&x[0]===c[0]?md(x,void 0,f):[]});function Lr(c){var f=c==null?0:c.length;return f?c[f-1]:void 0}var fv=ci(kf);function kf(c,f){return c&&c.length&&f&&f.length?oo(c,f):c}var mv=Ro(function(c,f){var x=c==null?0:c.length,R=Yl(c,f);return aa(c,Hi(f,function(D){return er(D,x)?+D:D}).sort(Af)),R});function Fd(c){return c==null?c:jl.call(c)}var gv=ci(function(c){return Ti(Ee(c,1,Wi,!0))}),vv=ci(function(c){var f=Lr(c);return Wi(f)&&(f=void 0),Ti(Ee(c,1,Wi,!0),je(f,2))}),_v=ci(function(c){var f=Lr(c);return f=typeof f=="function"?f:void 0,Ti(Ee(c,1,Wi,!0),void 0,f)});function Bd(c){if(!c||!c.length)return[];var f=0;return c=yo(c,function(x){if(Wi(x))return f=zi(x.length,f),!0}),oh(f,function(x){return Hi(c,ih(x))})}function Uf(c,f){if(!c||!c.length)return[];var x=Bd(c);return f==null?x:Hi(x,function(R){return rr(f,void 0,R)})}var yv=ci(function(c,f){return Wi(c)?_s(c,f):[]}),xv=ci(function(c){return Rh(yo(c,Wi))}),bv=ci(function(c){var f=Lr(c);return Wi(f)&&(f=void 0),Rh(yo(c,Wi),je(f,2))}),wv=ci(function(c){var f=Lr(c);return f=typeof f=="function"?f:void 0,Rh(yo(c,Wi),void 0,f)}),Sv=ci(Bd),Tv=ci(function(c){var f=c.length,x=f>1?c[f-1]:void 0;return x=typeof x=="function"?(c.pop(),x):void 0,Uf(c,x)});function Gf(c){var f=S(c);return f.__chain__=!0,f}function Nh(c,f){return f(c)}var Ev=Ro(function(c){var f=c.length,x=f?c[0]:0,R=this.__wrapped__,D=function($){return Yl($,c)};return!(f>1||this.__actions__.length)&&R instanceof oi&&er(x)?((R=R.slice(x,+x+(f?1:0))).__actions__.push({func:Nh,args:[D],thisArg:void 0}),new $i(R,this.__chain__).thru(function($){return f&&!$.length&&$.push(void 0),$})):this.thru(D)}),Mv=bs(function(c,f,x){Mi.call(c,x)?++c[x]:wo(c,x,1)}),Av=qo(Ld),Rv=qo(Od);function Hf(c,f){return(ti(c)?dr:or)(c,je(f,3))}function zf(c,f){return(ti(c)?Zc:xh)(c,je(f,3))}var Cv=bs(function(c,f,x){Mi.call(c,x)?c[x].push(f):wo(c,x,[f])}),Pv=ci(function(c,f,x){var R=-1,D=typeof f=="function",$=vr(c)?Se(c.length):[];return or(c,function(ut){$[++R]=D?rr(f,ut,x):Xa(ut,f,x)}),$}),Iv=bs(function(c,f,x){wo(c,x,f)});function Dh(c,f){return(ti(c)?Hi:vd)(c,je(f,3))}var Lv=bs(function(c,f,x){c[x?0:1].push(f)},function(){return[[],[]]}),Ov=ci(function(c,f){if(c==null)return[];var x=f.length;return x>1&&$e(c,f[0],f[1])?f=[]:x>2&&$e(f[0],f[1],f[2])&&(f=[f[0]]),Mo(c,Ee(f,1),[])}),Fh=av||function(){return en.Date.now()};function jf(c,f,x){return f=x?void 0:f,Ei(c,128,void 0,void 0,void 0,void 0,f=c&&f==null?c.length:f)}function Vf(c,f){var x;if(typeof f!="function")throw new fr(W);return c=di(c),function(){return--c>0&&(x=f.apply(this,arguments)),c<=1&&(f=void 0),x}}var kd=ci(function(c,f,x){var R=1;if(x.length){var D=Uo(x,ao(kd));R|=32}return Ei(c,R,f,x,D)}),Wf=ci(function(c,f,x){var R=3;if(x.length){var D=Uo(x,ao(Wf));R|=32}return Ei(f,R,c,x,D)});function Xf(c,f,x){var R,D,$,ut,mt,Mt,Jt=0,Zt=!1,de=!1,Oe=!0;if(typeof c!="function")throw new fr(W);function Fe(Ue){var Ye=R,li=D;return R=D=void 0,Jt=Ue,ut=c.apply(li,Ye)}function Ve(Ue){return Jt=Ue,mt=iu(pe,f),Zt?Fe(Ue):ut}function re(Ue){var Ye=Ue-Mt;return Mt===void 0||Ye>=f||Ye<0||de&&Ue-Jt>=$}function pe(){var Ue=Fh();if(re(Ue))return He(Ue);mt=iu(pe,function(Ye){var li=f-(Ye-Mt);return de?xn(li,$-(Ye-Jt)):li}(Ue))}function He(Ue){return mt=void 0,Oe&&R?Fe(Ue):(R=D=void 0,ut)}function Ce(){var Ue=Fh(),Ye=re(Ue);if(R=arguments,D=this,Mt=Ue,Ye){if(mt===void 0)return Ve(Mt);if(de)return Sd(mt),mt=iu(pe,f),Fe(Mt)}return mt===void 0&&(mt=iu(pe,f)),ut}return f=Nr(f)||0,rn(x)&&(Zt=!!x.leading,$=(de="maxWait"in x)?zi(Nr(x.maxWait)||0,f):$,Oe="trailing"in x?!!x.trailing:Oe),Ce.cancel=function(){mt!==void 0&&Sd(mt),Jt=0,R=Mt=D=mt=void 0},Ce.flush=function(){return mt===void 0?ut:He(Fh())},Ce}var Nv=ci(function(c,f){return yh(c,1,f)}),Dv=ci(function(c,f,x){return yh(c,Nr(f)||0,x)});function nu(c,f){if(typeof c!="function"||f!=null&&typeof f!="function")throw new fr(W);var x=function(){var R=arguments,D=f?f.apply(this,R):R[0],$=x.cache;if($.has(D))return $.get(D);var ut=c.apply(this,R);return x.cache=$.set(D,ut)||$,ut};return x.cache=new(nu.Cache||mr),x}function ru(c){if(typeof c!="function")throw new fr(W);return function(){var f=arguments;switch(f.length){case 0:return!c.call(this);case 1:return!c.call(this,f[0]);case 2:return!c.call(this,f[0],f[1]);case 3:return!c.call(this,f[0],f[1],f[2])}return!c.apply(this,f)}}nu.Cache=mr;var Ud=Mf(function(c,f){var x=(f=f.length==1&&ti(f[0])?Hi(f[0],pr(je())):Hi(Ee(f,1),pr(je()))).length;return ci(function(R){for(var D=-1,$=xn(R.length,x);++D<$;)R[D]=f[D].call(this,R[D]);return rr(c,this,R)})}),Bh=ci(function(c,f){return Ei(c,32,void 0,f,Uo(f,ao(Bh)))}),qf=ci(function(c,f){return Ei(c,64,void 0,f,Uo(f,ao(qf)))}),Ts=Ro(function(c,f){return Ei(c,256,void 0,void 0,void 0,f)});function qr(c,f){return c===f||c!=c&&f!=f}var Fv=ca(wh),Yf=ca(function(c,f){return c>=f}),Es=sa(function(){return arguments}())?sa:function(c){return on(c)&&Mi.call(c,"callee")&&!yf.call(c,"callee")},ti=Se.isArray,Bv=Yc?pr(Yc):function(c){return on(c)&&tr(c)==ge};function vr(c){return c!=null&&kh(c.length)&&!lo(c)}function Wi(c){return on(c)&&vr(c)}var $o=hd||cl,$f=$c?pr($c):function(c){return on(c)&&tr(c)==vt};function Gd(c){if(!on(c))return!1;var f=tr(c);return f==Ot||f=="[object DOMException]"||typeof c.message=="string"&&typeof c.name=="string"&&!sl(c)}function lo(c){if(!rn(c))return!1;var f=tr(c);return f==Nt||f==E||f=="[object AsyncFunction]"||f=="[object Proxy]"}function Jf(c){return typeof c=="number"&&c==di(c)}function kh(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=9007199254740991}function rn(c){var f=typeof c;return c!=null&&(f=="object"||f=="function")}function on(c){return c!=null&&typeof c=="object"}var Zf=$u?pr($u):function(c){return on(c)&&Rn(c)==L};function Hd(c){return typeof c=="number"||on(c)&&tr(c)==O}function sl(c){if(!on(c)||tr(c)!=Y)return!1;var f=dh(c);if(f===null)return!0;var x=Mi.call(f,"constructor")&&f.constructor;return typeof x=="function"&&x instanceof x&&lh.call(x)==nv}var zd=Ju?pr(Ju):function(c){return on(c)&&tr(c)==C},Kf=Zu?pr(Zu):function(c){return on(c)&&Rn(c)==j};function Uh(c){return typeof c=="string"||!ti(c)&&on(c)&&tr(c)==X}function Or(c){return typeof c=="symbol"||on(c)&&tr(c)==K}var ga=Ku?pr(Ku):function(c){return on(c)&&kh(c.length)&&!!Ii[tr(c)]},Qf=ca(Sh),kv=ca(function(c,f){return c<=f});function tm(c){if(!c)return[];if(vr(c))return Uh(c)?jn(c):An(c);if(xo&&c[xo])return function(x){for(var R,D=[];!(R=x.next()).done;)D.push(R.value);return D}(c[xo]());var f=Rn(c);return(f==L?ah:f==j?ps:Co)(c)}function Jo(c){return c?(c=Nr(c))===1/0||c===-1/0?17976931348623157e292*(c<0?-1:1):c==c?c:0:c===0?c:0}function di(c){var f=Jo(c),x=f%1;return f==f?x?f-x:f:0}function em(c){return c?Wo(di(c),0,4294967295):0}function Nr(c){if(typeof c=="number")return c;if(Or(c))return NaN;if(rn(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=rn(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=nd(c);var x=st.test(c);return x||Tt.test(c)?af(c.slice(2),x?2:8):J.test(c)?NaN:+c}function im(c){return hn(c,Bn(c))}function wi(c){return c==null?"":fn(c)}var Gh=nn(function(c,f){if(eu(f)||vr(f))hn(f,Cn(f),c);else for(var x in f)Mi.call(f,x)&&vs(c,x,f[x])}),jd=nn(function(c,f){hn(f,Bn(f),c)}),Hh=nn(function(c,f,x,R){hn(f,Bn(f),c,R)}),Uv=nn(function(c,f,x,R){hn(f,Cn(f),c,R)}),nm=Ro(Yl),Vd=ci(function(c,f){c=Ui(c);var x=-1,R=f.length,D=R>2?f[2]:void 0;for(D&&$e(f[0],f[1],D)&&(R=1);++x<R;)for(var $=f[x],ut=Bn($),mt=-1,Mt=ut.length;++mt<Mt;){var Jt=ut[mt],Zt=c[Jt];(Zt===void 0||qr(Zt,Ur[Jt])&&!Mi.call(c,Jt))&&(c[Jt]=$[Jt])}return c}),va=ci(function(c){return c.push(void 0,Ao),rr(al,void 0,c)});function Wd(c,f,x){var R=c==null?void 0:Eo(c,f);return R===void 0?x:R}function ou(c,f){return c!=null&&rl(c,f,fd)}var Gv=Ih(function(c,f,x){f!=null&&typeof f.toString!="function"&&(f=uh.call(f)),c[f]=x},ul(lr)),Hv=Ih(function(c,f,x){f!=null&&typeof f.toString!="function"&&(f=uh.call(f)),Mi.call(c,f)?c[f].push(x):c[f]=[x]},je),Ni=ci(Xa);function Cn(c){return vr(c)?jo(c):gd(c)}function Bn(c){return vr(c)?jo(c,!0):wf(c)}var su=nn(function(c,f,x){hi(c,f,x)}),al=nn(function(c,f,x,R){hi(c,f,x,R)}),_a=Ro(function(c,f){var x={};if(c==null)return x;var R=!1;f=Hi(f,function($){return $=so($,c),R||(R=$.length>1),$}),hn(c,da(c),x),R&&(x=Mn(x,7,il));for(var D=f.length;D--;)Ja(x,f[D]);return x}),gn=Ro(function(c,f){return c==null?{}:function(x,R){return Th(x,R,function(D,$){return ou(x,$)})}(c,f)});function Zo(c,f){if(c==null)return{};var x=Hi(da(c),function(R){return[R]});return f=je(f),Th(c,x,function(R,D){return f(R,D[0])})}var au=Ql(Cn),ya=Ql(Bn);function Co(c){return c==null?[]:sh(c,Cn(c))}var ll=ws(function(c,f,x){return f=f.toLowerCase(),c+(x?xa(f):f)});function xa(c){return hu(wi(c).toLowerCase())}function ba(c){return(c=wi(c))&&c.replace(wt,pf).replace(nf,"")}var lu=ws(function(c,f,x){return c+(x?"-":"")+f.toLowerCase()}),rm=ws(function(c,f,x){return c+(x?" ":"")+f.toLowerCase()}),zh=ua("toLowerCase"),uu=ws(function(c,f,x){return c+(x?"_":"")+f.toLowerCase()}),jh=ws(function(c,f,x){return c+(x?" ":"")+hu(f)}),om=ws(function(c,f,x){return c+(x?" ":"")+f.toUpperCase()}),hu=ua("toUpperCase");function Xd(c,f,x){return c=wi(c),(f=x?void 0:f)===void 0?function(R){return rf.test(R)}(c)?function(R){return R.match(Fo)||[]}(c):function(R){return R.match(ka)||[]}(c):c.match(f)||[]}var cu=ci(function(c,f){try{return rr(c,void 0,f)}catch(x){return Gd(x)?x:new gi(x)}}),Vh=Ro(function(c,f){return dr(f,function(x){x=Xr(x),wo(c,x,kd(c[x],c))}),c});function ul(c){return function(){return c}}var sm=Yo(),am=Yo(!0);function lr(c){return c}function Wh(c){return bf(typeof c=="function"?c:Mn(c,1))}var lm=ci(function(c,f){return function(x){return Xa(x,c,f)}}),zv=ci(function(c,f){return function(x){return Xa(c,x,f)}});function Xh(c,f,x){var R=Cn(f),D=ro(f,R);x!=null||rn(f)&&(D.length||!R.length)||(x=f,f=c,c=this,D=ro(f,Cn(f)));var $=!(rn(x)&&"chain"in x&&!x.chain),ut=lo(c);return dr(D,function(mt){var Mt=f[mt];c[mt]=Mt,ut&&(c.prototype[mt]=function(){var Jt=this.__chain__;if($||Jt){var Zt=c(this.__wrapped__),de=Zt.__actions__=An(this.__actions__);return de.push({func:Mt,args:arguments,thisArg:c}),Zt.__chain__=Jt,Zt}return Mt.apply(c,ko([this.value()],arguments))})}),c}function hl(){}var qh=tl(Hi),Ms=tl(Kc),um=tl(eh);function hm(c){return Te(c)?ih(Xr(c)):function(f){return function(x){return Eo(x,f)}}(c)}var Yh=Zl(),cm=Zl(!0);function $h(){return[]}function cl(){return!1}var du=Qa(function(c,f){return c+f},0),qd=el("ceil"),kn=Qa(function(c,f){return c/f},1),dm=el("floor"),Jh,pm=Qa(function(c,f){return c*f},1),Yd=el("round"),Zh=Qa(function(c,f){return c-f},0);return S.after=function(c,f){if(typeof f!="function")throw new fr(W);return c=di(c),function(){if(--c<1)return f.apply(this,arguments)}},S.ary=jf,S.assign=Gh,S.assignIn=jd,S.assignInWith=Hh,S.assignWith=Uv,S.at=nm,S.before=Vf,S.bind=kd,S.bindAll=Vh,S.bindKey=Wf,S.castArray=function(){if(!arguments.length)return[];var c=arguments[0];return ti(c)?c:[c]},S.chain=Gf,S.chunk=function(c,f,x){f=(x?$e(c,f,x):f===void 0)?1:zi(di(f),0);var R=c==null?0:c.length;if(!R||f<1)return[];for(var D=0,$=0,ut=Se(fh(R/f));D<R;)ut[$++]=un(c,D,D+=f);return ut},S.compact=function(c){for(var f=-1,x=c==null?0:c.length,R=0,D=[];++f<x;){var $=c[f];$&&(D[R++]=$)}return D},S.concat=function(){var c=arguments.length;if(!c)return[];for(var f=Se(c-1),x=arguments[0],R=c;R--;)f[R-1]=arguments[R];return ko(ti(x)?An(x):[x],Ee(f,1))},S.cond=function(c){var f=c==null?0:c.length,x=je();return c=f?Hi(c,function(R){if(typeof R[1]!="function")throw new fr(W);return[x(R[0]),R[1]]}):[],ci(function(R){for(var D=-1;++D<f;){var $=c[D];if(rr($[0],this,R))return rr($[1],this,R)}})},S.conforms=function(c){return function(f){var x=Cn(f);return function(R){return So(R,f,x)}}(Mn(c,1))},S.constant=ul,S.countBy=Mv,S.create=function(c,f){var x=gs(c);return f==null?x:xf(x,f)},S.curry=function c(f,x,R){var D=Ei(f,8,void 0,void 0,void 0,void 0,void 0,x=R?void 0:x);return D.placeholder=c.placeholder,D},S.curryRight=function c(f,x,R){var D=Ei(f,16,void 0,void 0,void 0,void 0,void 0,x=R?void 0:x);return D.placeholder=c.placeholder,D},S.debounce=Xf,S.defaults=Vd,S.defaultsDeep=va,S.defer=Nv,S.delay=Dv,S.difference=pv,S.differenceBy=Ff,S.differenceWith=Bf,S.drop=function(c,f,x){var R=c==null?0:c.length;return R?un(c,(f=x||f===void 0?1:di(f))<0?0:f,R):[]},S.dropRight=function(c,f,x){var R=c==null?0:c.length;return R?un(c,0,(f=R-(f=x||f===void 0?1:di(f)))<0?0:f):[]},S.dropRightWhile=function(c,f){return c&&c.length?Jl(c,je(f,3),!0,!0):[]},S.dropWhile=function(c,f){return c&&c.length?Jl(c,je(f,3),!0):[]},S.fill=function(c,f,x,R){var D=c==null?0:c.length;return D?(x&&typeof x!="number"&&$e(c,f,x)&&(x=0,R=D),function($,ut,mt,Mt){var Jt=$.length;for((mt=di(mt))<0&&(mt=-mt>Jt?0:Jt+mt),(Mt=Mt===void 0||Mt>Jt?Jt:di(Mt))<0&&(Mt+=Jt),Mt=mt>Mt?0:em(Mt);mt<Mt;)$[mt++]=ut;return $}(c,f,x,R)):[]},S.filter=function(c,f){return(ti(c)?yo:Xo)(c,je(f,3))},S.flatMap=function(c,f){return Ee(Dh(c,f),1)},S.flatMapDeep=function(c,f){return Ee(Dh(c,f),1/0)},S.flatMapDepth=function(c,f,x){return x=x===void 0?1:di(x),Ee(Dh(c,f),x)},S.flatten=Nd,S.flattenDeep=function(c){return c!=null&&c.length?Ee(c,1/0):[]},S.flattenDepth=function(c,f){return c!=null&&c.length?Ee(c,f=f===void 0?1:di(f)):[]},S.flip=function(c){return Ei(c,512)},S.flow=sm,S.flowRight=am,S.fromPairs=function(c){for(var f=-1,x=c==null?0:c.length,R={};++f<x;){var D=c[f];R[D[0]]=D[1]}return R},S.functions=function(c){return c==null?[]:ro(c,Cn(c))},S.functionsIn=function(c){return c==null?[]:ro(c,Bn(c))},S.groupBy=Cv,S.initial=function(c){return c!=null&&c.length?un(c,0,-1):[]},S.intersection=ol,S.intersectionBy=ar,S.intersectionWith=ir,S.invert=Gv,S.invertBy=Hv,S.invokeMap=Pv,S.iteratee=Wh,S.keyBy=Iv,S.keys=Cn,S.keysIn=Bn,S.map=Dh,S.mapKeys=function(c,f){var x={};return f=je(f,3),To(c,function(R,D,$){wo(x,f(R,D,$),R)}),x},S.mapValues=function(c,f){var x={};return f=je(f,3),To(c,function(R,D,$){wo(x,D,f(R,D,$))}),x},S.matches=function(c){return Sf(Mn(c,1))},S.matchesProperty=function(c,f){return _d(c,Mn(f,1))},S.memoize=nu,S.merge=su,S.mergeWith=al,S.method=lm,S.methodOf=zv,S.mixin=Xh,S.negate=ru,S.nthArg=function(c){return c=di(c),ci(function(f){return jr(f,c)})},S.omit=_a,S.omitBy=function(c,f){return Zo(c,ru(je(f)))},S.once=function(c){return Vf(2,c)},S.orderBy=function(c,f,x,R){return c==null?[]:(ti(f)||(f=f==null?[]:[f]),ti(x=R?void 0:x)||(x=x==null?[]:[x]),Mo(c,f,x))},S.over=qh,S.overArgs=Ud,S.overEvery=Ms,S.overSome=um,S.partial=Bh,S.partialRight=qf,S.partition=Lv,S.pick=gn,S.pickBy=Zo,S.property=hm,S.propertyOf=function(c){return function(f){return c==null?void 0:Eo(c,f)}},S.pull=fv,S.pullAll=kf,S.pullAllBy=function(c,f,x){return c&&c.length&&f&&f.length?oo(c,f,je(x,2)):c},S.pullAllWith=function(c,f,x){return c&&c.length&&f&&f.length?oo(c,f,void 0,x):c},S.pullAt=mv,S.range=Yh,S.rangeRight=cm,S.rearg=Ts,S.reject=function(c,f){return(ti(c)?yo:Xo)(c,ru(je(f,3)))},S.remove=function(c,f){var x=[];if(!c||!c.length)return x;var R=-1,D=[],$=c.length;for(f=je(f,3);++R<$;){var ut=c[R];f(ut,R,c)&&(x.push(ut),D.push(R))}return aa(c,D),x},S.rest=function(c,f){if(typeof c!="function")throw new fr(W);return ci(c,f=f===void 0?f:di(f))},S.reverse=Fd,S.sampleSize=function(c,f,x){return f=(x?$e(c,f,x):f===void 0)?1:di(f),(ti(c)?ra:xd)(c,f)},S.set=function(c,f,x){return c==null?c:Vi(c,f,x)},S.setWith=function(c,f,x,R){return R=typeof R=="function"?R:void 0,c==null?c:Vi(c,f,x,R)},S.shuffle=function(c){return(ti(c)?ql:Ef)(c)},S.slice=function(c,f,x){var R=c==null?0:c.length;return R?(x&&typeof x!="number"&&$e(c,f,x)?(f=0,x=R):(f=f==null?0:di(f),x=x===void 0?R:di(x)),un(c,f,x)):[]},S.sortBy=Ov,S.sortedUniq=function(c){return c&&c.length?Ah(c):[]},S.sortedUniqBy=function(c,f){return c&&c.length?Ah(c,je(f,2)):[]},S.split=function(c,f,x){return x&&typeof x!="number"&&$e(c,f,x)&&(f=x=void 0),(x=x===void 0?4294967295:x>>>0)?(c=wi(c))&&(typeof f=="string"||f!=null&&!zd(f))&&!(f=fn(f))&&Ks(c)?_e(jn(c),0,x):c.split(f,x):[]},S.spread=function(c,f){if(typeof c!="function")throw new fr(W);return f=f==null?0:zi(di(f),0),ci(function(x){var R=x[f],D=_e(x,0,f);return R&&ko(D,R),rr(c,this,D)})},S.tail=function(c){var f=c==null?0:c.length;return f?un(c,1,f):[]},S.take=function(c,f,x){return c&&c.length?un(c,0,(f=x||f===void 0?1:di(f))<0?0:f):[]},S.takeRight=function(c,f,x){var R=c==null?0:c.length;return R?un(c,(f=R-(f=x||f===void 0?1:di(f)))<0?0:f,R):[]},S.takeRightWhile=function(c,f){return c&&c.length?Jl(c,je(f,3),!1,!0):[]},S.takeWhile=function(c,f){return c&&c.length?Jl(c,je(f,3)):[]},S.tap=function(c,f){return f(c),c},S.throttle=function(c,f,x){var R=!0,D=!0;if(typeof c!="function")throw new fr(W);return rn(x)&&(R="leading"in x?!!x.leading:R,D="trailing"in x?!!x.trailing:D),Xf(c,f,{leading:R,maxWait:f,trailing:D})},S.thru=Nh,S.toArray=tm,S.toPairs=au,S.toPairsIn=ya,S.toPath=function(c){return ti(c)?Hi(c,Xr):Or(c)?[c]:An(Oh(wi(c)))},S.toPlainObject=im,S.transform=function(c,f,x){var R=ti(c),D=R||$o(c)||ga(c);if(f=je(f,4),x==null){var $=c&&c.constructor;x=D?R?new $:[]:rn(c)&&lo($)?gs(dh(c)):{}}return(D?dr:To)(c,function(ut,mt,Mt){return f(x,ut,mt,Mt)}),x},S.unary=function(c){return jf(c,1)},S.union=gv,S.unionBy=vv,S.unionWith=_v,S.uniq=function(c){return c&&c.length?Ti(c):[]},S.uniqBy=function(c,f){return c&&c.length?Ti(c,je(f,2)):[]},S.uniqWith=function(c,f){return f=typeof f=="function"?f:void 0,c&&c.length?Ti(c,void 0,f):[]},S.unset=function(c,f){return c==null||Ja(c,f)},S.unzip=Bd,S.unzipWith=Uf,S.update=function(c,f,x){return c==null?c:mi(c,f,Ch(x))},S.updateWith=function(c,f,x,R){return R=typeof R=="function"?R:void 0,c==null?c:mi(c,f,Ch(x),R)},S.values=Co,S.valuesIn=function(c){return c==null?[]:sh(c,Bn(c))},S.without=yv,S.words=Xd,S.wrap=function(c,f){return Bh(Ch(f),c)},S.xor=xv,S.xorBy=bv,S.xorWith=wv,S.zip=Sv,S.zipObject=function(c,f){return wd(c||[],f||[],vs)},S.zipObjectDeep=function(c,f){return wd(c||[],f||[],Vi)},S.zipWith=Tv,S.entries=au,S.entriesIn=ya,S.extend=jd,S.extendWith=Hh,Xh(S,S),S.add=du,S.attempt=cu,S.camelCase=ll,S.capitalize=xa,S.ceil=qd,S.clamp=function(c,f,x){return x===void 0&&(x=f,f=void 0),x!==void 0&&(x=(x=Nr(x))==x?x:0),f!==void 0&&(f=(f=Nr(f))==f?f:0),Wo(Nr(c),f,x)},S.clone=function(c){return Mn(c,4)},S.cloneDeep=function(c){return Mn(c,5)},S.cloneDeepWith=function(c,f){return Mn(c,5,f=typeof f=="function"?f:void 0)},S.cloneWith=function(c,f){return Mn(c,4,f=typeof f=="function"?f:void 0)},S.conformsTo=function(c,f){return f==null||So(c,f,Cn(f))},S.deburr=ba,S.defaultTo=function(c,f){return c==null||c!=c?f:c},S.divide=kn,S.endsWith=function(c,f,x){c=wi(c),f=fn(f);var R=c.length,D=x=x===void 0?R:Wo(di(x),0,R);return(x-=f.length)>=0&&c.slice(x,D)==f},S.eq=qr,S.escape=function(c){return(c=wi(c))&&ei.test(c)?c.replace(ui,ff):c},S.escapeRegExp=function(c){return(c=wi(c))&&Li.test(c)?c.replace(Qi,"\\$&"):c},S.every=function(c,f,x){var R=ti(c)?Kc:bh;return x&&$e(c,f,x)&&(f=void 0),R(c,je(f,3))},S.find=Av,S.findIndex=Ld,S.findKey=function(c,f){return Qc(c,je(f,3),To)},S.findLast=Rv,S.findLastIndex=Od,S.findLastKey=function(c,f){return Qc(c,je(f,3),pd)},S.floor=dm,S.forEach=Hf,S.forEachRight=zf,S.forIn=function(c,f){return c==null?c:ys(c,je(f,3),Bn)},S.forInRight=function(c,f){return c==null?c:zr(c,je(f,3),Bn)},S.forOwn=function(c,f){return c&&To(c,je(f,3))},S.forOwnRight=function(c,f){return c&&pd(c,je(f,3))},S.get=Wd,S.gt=Fv,S.gte=Yf,S.has=function(c,f){return c!=null&&rl(c,f,oa)},S.hasIn=ou,S.head=Dd,S.identity=lr,S.includes=function(c,f,x,R){c=vr(c)?c:Co(c),x=x&&!R?di(x):0;var D=c.length;return x<0&&(x=zi(D+x,0)),Uh(c)?x<=D&&c.indexOf(f,x)>-1:!!D&&Zs(c,f,x)>-1},S.indexOf=function(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=x==null?0:di(x);return D<0&&(D=zi(R+D,0)),Zs(c,f,D)},S.inRange=function(c,f,x){return f=Jo(f),x===void 0?(x=f,f=0):x=Jo(x),function(R,D,$){return R>=xn(D,$)&&R<zi(D,$)}(c=Nr(c),f,x)},S.invoke=Ni,S.isArguments=Es,S.isArray=ti,S.isArrayBuffer=Bv,S.isArrayLike=vr,S.isArrayLikeObject=Wi,S.isBoolean=function(c){return c===!0||c===!1||on(c)&&tr(c)==Z},S.isBuffer=$o,S.isDate=$f,S.isElement=function(c){return on(c)&&c.nodeType===1&&!sl(c)},S.isEmpty=function(c){if(c==null)return!0;if(vr(c)&&(ti(c)||typeof c=="string"||typeof c.splice=="function"||$o(c)||ga(c)||Es(c)))return!c.length;var f=Rn(c);if(f==L||f==j)return!c.size;if(eu(c))return!gd(c).length;for(var x in c)if(Mi.call(c,x))return!1;return!0},S.isEqual=function(c,f){return Cr(c,f)},S.isEqualWith=function(c,f,x){var R=(x=typeof x=="function"?x:void 0)?x(c,f):void 0;return R===void 0?Cr(c,f,void 0,x):!!R},S.isError=Gd,S.isFinite=function(c){return typeof c=="number"&&Ho(c)},S.isFunction=lo,S.isInteger=Jf,S.isLength=kh,S.isMap=Zf,S.isMatch=function(c,f){return c===f||qa(c,f,Rd(f))},S.isMatchWith=function(c,f,x){return x=typeof x=="function"?x:void 0,qa(c,f,Rd(f),x)},S.isNaN=function(c){return Hd(c)&&c!=+c},S.isNative=function(c){if(cv(c))throw new gi("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ya(c)},S.isNil=function(c){return c==null},S.isNull=function(c){return c===null},S.isNumber=Hd,S.isObject=rn,S.isObjectLike=on,S.isPlainObject=sl,S.isRegExp=zd,S.isSafeInteger=function(c){return Jf(c)&&c>=-9007199254740991&&c<=9007199254740991},S.isSet=Kf,S.isString=Uh,S.isSymbol=Or,S.isTypedArray=ga,S.isUndefined=function(c){return c===void 0},S.isWeakMap=function(c){return on(c)&&Rn(c)==qt},S.isWeakSet=function(c){return on(c)&&tr(c)=="[object WeakSet]"},S.join=function(c,f){return c==null?"":Vn.call(c,f)},S.kebabCase=lu,S.last=Lr,S.lastIndexOf=function(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=R;return x!==void 0&&(D=(D=di(x))<0?zi(R+D,0):xn(D,R-1)),f==f?function($,ut,mt){for(var Mt=mt+1;Mt--;)if($[Mt]===ut)return Mt;return Mt}(c,f,D):Fl(c,td,D,!0)},S.lowerCase=rm,S.lowerFirst=zh,S.lt=Qf,S.lte=kv,S.max=function(c){return c&&c.length?Wa(c,lr,wh):void 0},S.maxBy=function(c,f){return c&&c.length?Wa(c,je(f,2),wh):void 0},S.mean=function(c){return ed(c,lr)},S.meanBy=function(c,f){return ed(c,je(f,2))},S.min=function(c){return c&&c.length?Wa(c,lr,Sh):void 0},S.minBy=function(c,f){return c&&c.length?Wa(c,je(f,2),Sh):void 0},S.stubArray=$h,S.stubFalse=cl,S.stubObject=function(){return{}},S.stubString=function(){return""},S.stubTrue=function(){return!0},S.multiply=pm,S.nth=function(c,f){return c&&c.length?jr(c,di(f)):void 0},S.noConflict=function(){return en._===this&&(en._=rv),this},S.noop=hl,S.now=Fh,S.pad=function(c,f,x){c=wi(c);var R=(f=di(f))?Go(c):0;if(!f||R>=f)return c;var D=(f-R)/2;return ha(mh(D),x)+c+ha(fh(D),x)},S.padEnd=function(c,f,x){c=wi(c);var R=(f=di(f))?Go(c):0;return f&&R<f?c+ha(f-R,x):c},S.padStart=function(c,f,x){c=wi(c);var R=(f=di(f))?Go(c):0;return f&&R<f?ha(f-R,x)+c:c},S.parseInt=function(c,f,x){return x||f==null?f=0:f&&(f=+f),Wn(wi(c).replace(Gi,""),f||0)},S.random=function(c,f,x){if(x&&typeof x!="boolean"&&$e(c,f,x)&&(f=x=void 0),x===void 0&&(typeof f=="boolean"?(x=f,f=void 0):typeof c=="boolean"&&(x=c,c=void 0)),c===void 0&&f===void 0?(c=0,f=1):(c=Jo(c),f===void 0?(f=c,c=0):f=Jo(f)),c>f){var R=c;c=f,f=R}if(x||c%1||f%1){var D=vh();return xn(c+D*(f-c+Er("1e-"+((D+"").length-1))),f)}return xs(c,f)},S.reduce=function(c,f,x){var R=ti(c)?th:id,D=arguments.length<3;return R(c,je(f,4),x,D,or)},S.reduceRight=function(c,f,x){var R=ti(c)?uf:id,D=arguments.length<3;return R(c,je(f,4),x,D,xh)},S.repeat=function(c,f,x){return f=(x?$e(c,f,x):f===void 0)?1:di(f),Eh(wi(c),f)},S.replace=function(){var c=arguments,f=wi(c[0]);return c.length<3?f:f.replace(c[1],c[2])},S.result=function(c,f,x){var R=-1,D=(f=so(f,c)).length;for(D||(D=1,c=void 0);++R<D;){var $=c==null?void 0:c[Xr(f[R])];$===void 0&&(R=D,$=x),c=lo($)?$.call(c):$}return c},S.round=Yd,S.runInContext=It,S.sample=function(c){return(ti(c)?Vo:yd)(c)},S.size=function(c){if(c==null)return 0;if(vr(c))return Uh(c)?Go(c):c.length;var f=Rn(c);return f==L||f==j?c.size:gd(c).length},S.snakeCase=uu,S.some=function(c,f,x){var R=ti(c)?eh:Mh;return x&&$e(c,f,x)&&(f=void 0),R(c,je(f,3))},S.sortedIndex=function(c,f){return $a(c,f)},S.sortedIndexBy=function(c,f,x){return $l(c,f,je(x,2))},S.sortedIndexOf=function(c,f){var x=c==null?0:c.length;if(x){var R=$a(c,f);if(R<x&&qr(c[R],f))return R}return-1},S.sortedLastIndex=function(c,f){return $a(c,f,!0)},S.sortedLastIndexBy=function(c,f,x){return $l(c,f,je(x,2),!0)},S.sortedLastIndexOf=function(c,f){if(c!=null&&c.length){var x=$a(c,f,!0)-1;if(qr(c[x],f))return x}return-1},S.startCase=jh,S.startsWith=function(c,f,x){return c=wi(c),x=x==null?0:Wo(di(x),0,c.length),f=fn(f),c.slice(x,x+f.length)==f},S.subtract=Zh,S.sum=function(c){return c&&c.length?rh(c,lr):0},S.sumBy=function(c,f){return c&&c.length?rh(c,je(f,2)):0},S.template=function(c,f,x){var R=S.templateSettings;x&&$e(c,f,x)&&(f=void 0),c=wi(c),f=Hh({},f,R,tu);var D,$,ut=Hh({},f.imports,R.imports,tu),mt=Cn(ut),Mt=sh(ut,mt),Jt=0,Zt=f.interpolate||zt,de="__p += '",Oe=Ul((f.escape||zt).source+"|"+Zt.source+"|"+(Zt===De?Ua:zt).source+"|"+(f.evaluate||zt).source+"|$","g"),Fe="//# sourceURL="+(Mi.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sf+"]")+`
|
|
10
|
+
`)}(R,function(D,$){return dr(W,function(ut){var mt="_."+ut[0];$&ut[1]&&!Ha(D,mt)&&D.push(mt)}),D.sort()}(function(D){var $=D.match(Zn);return $?$[1].split(Kn):[]}(R),x)))}function Nf(c){var f=0,x=0;return function(){var R=Rr(),D=16-(R-x);if(x=R,D>0){if(++f>=800)return arguments[0]}else f=0;return c.apply(void 0,arguments)}}function Lh(c,f){var x=-1,R=c.length,D=R-1;for(f=f===void 0?R:f;++x<f;){var $=xs(x,D),ut=c[$];c[$]=c[x],c[x]=ut}return c.length=f,c}var Oh=function(c){var f=nu(c,function(R){return x.size===500&&x.clear(),R}),x=f.cache;return f}(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(Pi,function(x,R,D,$){f.push(D?$.replace(qu,"$1"):R||x)}),f});function Xr(c){if(typeof c=="string"||Or(c))return c;var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}function Ss(c){if(c!=null){try{return lh.call(c)}catch{}try{return c+""}catch{}}return""}function Df(c){if(c instanceof oi)return c.clone();var f=new $i(c.__wrapped__,c.__chain__);return f.__actions__=An(c.__actions__),f.__index__=c.__index__,f.__values__=c.__values__,f}var pv=ci(function(c,f){return Wi(c)?_s(c,Ee(f,1,Wi,!0)):[]}),Ff=ci(function(c,f){var x=Lr(f);return Wi(x)&&(x=void 0),Wi(c)?_s(c,Ee(f,1,Wi,!0),je(x,2)):[]}),Bf=ci(function(c,f){var x=Lr(f);return Wi(x)&&(x=void 0),Wi(c)?_s(c,Ee(f,1,Wi,!0),void 0,x):[]});function Ld(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=x==null?0:di(x);return D<0&&(D=zi(R+D,0)),Fl(c,je(f,3),D)}function Od(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=R-1;return x!==void 0&&(D=di(x),D=x<0?zi(R+D,0):xn(D,R-1)),Fl(c,je(f,3),D,!0)}function Nd(c){return c!=null&&c.length?Ee(c,1):[]}function Dd(c){return c&&c.length?c[0]:void 0}var ol=ci(function(c){var f=Hi(c,Za);return f.length&&f[0]===c[0]?md(f):[]}),ar=ci(function(c){var f=Lr(c),x=Hi(c,Za);return f===Lr(x)?f=void 0:x.pop(),x.length&&x[0]===c[0]?md(x,je(f,2)):[]}),ir=ci(function(c){var f=Lr(c),x=Hi(c,Za);return(f=typeof f=="function"?f:void 0)&&x.pop(),x.length&&x[0]===c[0]?md(x,void 0,f):[]});function Lr(c){var f=c==null?0:c.length;return f?c[f-1]:void 0}var fv=ci(kf);function kf(c,f){return c&&c.length&&f&&f.length?oo(c,f):c}var mv=Ro(function(c,f){var x=c==null?0:c.length,R=Yl(c,f);return aa(c,Hi(f,function(D){return er(D,x)?+D:D}).sort(Af)),R});function Fd(c){return c==null?c:jl.call(c)}var gv=ci(function(c){return Ti(Ee(c,1,Wi,!0))}),vv=ci(function(c){var f=Lr(c);return Wi(f)&&(f=void 0),Ti(Ee(c,1,Wi,!0),je(f,2))}),_v=ci(function(c){var f=Lr(c);return f=typeof f=="function"?f:void 0,Ti(Ee(c,1,Wi,!0),void 0,f)});function Bd(c){if(!c||!c.length)return[];var f=0;return c=yo(c,function(x){if(Wi(x))return f=zi(x.length,f),!0}),oh(f,function(x){return Hi(c,ih(x))})}function Uf(c,f){if(!c||!c.length)return[];var x=Bd(c);return f==null?x:Hi(x,function(R){return rr(f,void 0,R)})}var yv=ci(function(c,f){return Wi(c)?_s(c,f):[]}),xv=ci(function(c){return Rh(yo(c,Wi))}),bv=ci(function(c){var f=Lr(c);return Wi(f)&&(f=void 0),Rh(yo(c,Wi),je(f,2))}),wv=ci(function(c){var f=Lr(c);return f=typeof f=="function"?f:void 0,Rh(yo(c,Wi),void 0,f)}),Sv=ci(Bd),Tv=ci(function(c){var f=c.length,x=f>1?c[f-1]:void 0;return x=typeof x=="function"?(c.pop(),x):void 0,Uf(c,x)});function Gf(c){var f=S(c);return f.__chain__=!0,f}function Nh(c,f){return f(c)}var Ev=Ro(function(c){var f=c.length,x=f?c[0]:0,R=this.__wrapped__,D=function($){return Yl($,c)};return!(f>1||this.__actions__.length)&&R instanceof oi&&er(x)?((R=R.slice(x,+x+(f?1:0))).__actions__.push({func:Nh,args:[D],thisArg:void 0}),new $i(R,this.__chain__).thru(function($){return f&&!$.length&&$.push(void 0),$})):this.thru(D)}),Mv=bs(function(c,f,x){Mi.call(c,x)?++c[x]:wo(c,x,1)}),Av=qo(Ld),Rv=qo(Od);function Hf(c,f){return(ti(c)?dr:or)(c,je(f,3))}function zf(c,f){return(ti(c)?Zc:xh)(c,je(f,3))}var Cv=bs(function(c,f,x){Mi.call(c,x)?c[x].push(f):wo(c,x,[f])}),Pv=ci(function(c,f,x){var R=-1,D=typeof f=="function",$=vr(c)?Se(c.length):[];return or(c,function(ut){$[++R]=D?rr(f,ut,x):Xa(ut,f,x)}),$}),Iv=bs(function(c,f,x){wo(c,x,f)});function Dh(c,f){return(ti(c)?Hi:vd)(c,je(f,3))}var Lv=bs(function(c,f,x){c[x?0:1].push(f)},function(){return[[],[]]}),Ov=ci(function(c,f){if(c==null)return[];var x=f.length;return x>1&&$e(c,f[0],f[1])?f=[]:x>2&&$e(f[0],f[1],f[2])&&(f=[f[0]]),Mo(c,Ee(f,1),[])}),Fh=av||function(){return en.Date.now()};function jf(c,f,x){return f=x?void 0:f,Ei(c,128,void 0,void 0,void 0,void 0,f=c&&f==null?c.length:f)}function Vf(c,f){var x;if(typeof f!="function")throw new fr(V);return c=di(c),function(){return--c>0&&(x=f.apply(this,arguments)),c<=1&&(f=void 0),x}}var kd=ci(function(c,f,x){var R=1;if(x.length){var D=Uo(x,ao(kd));R|=32}return Ei(c,R,f,x,D)}),Wf=ci(function(c,f,x){var R=3;if(x.length){var D=Uo(x,ao(Wf));R|=32}return Ei(f,R,c,x,D)});function Xf(c,f,x){var R,D,$,ut,mt,Mt,Jt=0,Zt=!1,de=!1,Oe=!0;if(typeof c!="function")throw new fr(V);function Fe(Ue){var Ye=R,li=D;return R=D=void 0,Jt=Ue,ut=c.apply(li,Ye)}function Ve(Ue){return Jt=Ue,mt=iu(pe,f),Zt?Fe(Ue):ut}function re(Ue){var Ye=Ue-Mt;return Mt===void 0||Ye>=f||Ye<0||de&&Ue-Jt>=$}function pe(){var Ue=Fh();if(re(Ue))return He(Ue);mt=iu(pe,function(Ye){var li=f-(Ye-Mt);return de?xn(li,$-(Ye-Jt)):li}(Ue))}function He(Ue){return mt=void 0,Oe&&R?Fe(Ue):(R=D=void 0,ut)}function Ce(){var Ue=Fh(),Ye=re(Ue);if(R=arguments,D=this,Mt=Ue,Ye){if(mt===void 0)return Ve(Mt);if(de)return Sd(mt),mt=iu(pe,f),Fe(Mt)}return mt===void 0&&(mt=iu(pe,f)),ut}return f=Nr(f)||0,rn(x)&&(Zt=!!x.leading,$=(de="maxWait"in x)?zi(Nr(x.maxWait)||0,f):$,Oe="trailing"in x?!!x.trailing:Oe),Ce.cancel=function(){mt!==void 0&&Sd(mt),Jt=0,R=Mt=D=mt=void 0},Ce.flush=function(){return mt===void 0?ut:He(Fh())},Ce}var Nv=ci(function(c,f){return yh(c,1,f)}),Dv=ci(function(c,f,x){return yh(c,Nr(f)||0,x)});function nu(c,f){if(typeof c!="function"||f!=null&&typeof f!="function")throw new fr(V);var x=function(){var R=arguments,D=f?f.apply(this,R):R[0],$=x.cache;if($.has(D))return $.get(D);var ut=c.apply(this,R);return x.cache=$.set(D,ut)||$,ut};return x.cache=new(nu.Cache||mr),x}function ru(c){if(typeof c!="function")throw new fr(V);return function(){var f=arguments;switch(f.length){case 0:return!c.call(this);case 1:return!c.call(this,f[0]);case 2:return!c.call(this,f[0],f[1]);case 3:return!c.call(this,f[0],f[1],f[2])}return!c.apply(this,f)}}nu.Cache=mr;var Ud=Mf(function(c,f){var x=(f=f.length==1&&ti(f[0])?Hi(f[0],pr(je())):Hi(Ee(f,1),pr(je()))).length;return ci(function(R){for(var D=-1,$=xn(R.length,x);++D<$;)R[D]=f[D].call(this,R[D]);return rr(c,this,R)})}),Bh=ci(function(c,f){return Ei(c,32,void 0,f,Uo(f,ao(Bh)))}),qf=ci(function(c,f){return Ei(c,64,void 0,f,Uo(f,ao(qf)))}),Ts=Ro(function(c,f){return Ei(c,256,void 0,void 0,void 0,f)});function qr(c,f){return c===f||c!=c&&f!=f}var Fv=ca(wh),Yf=ca(function(c,f){return c>=f}),Es=sa(function(){return arguments}())?sa:function(c){return on(c)&&Mi.call(c,"callee")&&!yf.call(c,"callee")},ti=Se.isArray,Bv=Yc?pr(Yc):function(c){return on(c)&&tr(c)==ge};function vr(c){return c!=null&&kh(c.length)&&!lo(c)}function Wi(c){return on(c)&&vr(c)}var $o=hd||cl,$f=$c?pr($c):function(c){return on(c)&&tr(c)==vt};function Gd(c){if(!on(c))return!1;var f=tr(c);return f==Ot||f=="[object DOMException]"||typeof c.message=="string"&&typeof c.name=="string"&&!sl(c)}function lo(c){if(!rn(c))return!1;var f=tr(c);return f==Nt||f==E||f=="[object AsyncFunction]"||f=="[object Proxy]"}function Jf(c){return typeof c=="number"&&c==di(c)}function kh(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=9007199254740991}function rn(c){var f=typeof c;return c!=null&&(f=="object"||f=="function")}function on(c){return c!=null&&typeof c=="object"}var Zf=$u?pr($u):function(c){return on(c)&&Rn(c)==L};function Hd(c){return typeof c=="number"||on(c)&&tr(c)==O}function sl(c){if(!on(c)||tr(c)!=Y)return!1;var f=dh(c);if(f===null)return!0;var x=Mi.call(f,"constructor")&&f.constructor;return typeof x=="function"&&x instanceof x&&lh.call(x)==nv}var zd=Ju?pr(Ju):function(c){return on(c)&&tr(c)==C},Kf=Zu?pr(Zu):function(c){return on(c)&&Rn(c)==j};function Uh(c){return typeof c=="string"||!ti(c)&&on(c)&&tr(c)==X}function Or(c){return typeof c=="symbol"||on(c)&&tr(c)==K}var ga=Ku?pr(Ku):function(c){return on(c)&&kh(c.length)&&!!Ii[tr(c)]},Qf=ca(Sh),kv=ca(function(c,f){return c<=f});function tm(c){if(!c)return[];if(vr(c))return Uh(c)?jn(c):An(c);if(xo&&c[xo])return function(x){for(var R,D=[];!(R=x.next()).done;)D.push(R.value);return D}(c[xo]());var f=Rn(c);return(f==L?ah:f==j?ps:Co)(c)}function Jo(c){return c?(c=Nr(c))===1/0||c===-1/0?17976931348623157e292*(c<0?-1:1):c==c?c:0:c===0?c:0}function di(c){var f=Jo(c),x=f%1;return f==f?x?f-x:f:0}function em(c){return c?Wo(di(c),0,4294967295):0}function Nr(c){if(typeof c=="number")return c;if(Or(c))return NaN;if(rn(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=rn(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=nd(c);var x=st.test(c);return x||Tt.test(c)?af(c.slice(2),x?2:8):J.test(c)?NaN:+c}function im(c){return hn(c,Bn(c))}function wi(c){return c==null?"":fn(c)}var Gh=nn(function(c,f){if(eu(f)||vr(f))hn(f,Cn(f),c);else for(var x in f)Mi.call(f,x)&&vs(c,x,f[x])}),jd=nn(function(c,f){hn(f,Bn(f),c)}),Hh=nn(function(c,f,x,R){hn(f,Bn(f),c,R)}),Uv=nn(function(c,f,x,R){hn(f,Cn(f),c,R)}),nm=Ro(Yl),Vd=ci(function(c,f){c=Ui(c);var x=-1,R=f.length,D=R>2?f[2]:void 0;for(D&&$e(f[0],f[1],D)&&(R=1);++x<R;)for(var $=f[x],ut=Bn($),mt=-1,Mt=ut.length;++mt<Mt;){var Jt=ut[mt],Zt=c[Jt];(Zt===void 0||qr(Zt,Ur[Jt])&&!Mi.call(c,Jt))&&(c[Jt]=$[Jt])}return c}),va=ci(function(c){return c.push(void 0,Ao),rr(al,void 0,c)});function Wd(c,f,x){var R=c==null?void 0:Eo(c,f);return R===void 0?x:R}function ou(c,f){return c!=null&&rl(c,f,fd)}var Gv=Ih(function(c,f,x){f!=null&&typeof f.toString!="function"&&(f=uh.call(f)),c[f]=x},ul(lr)),Hv=Ih(function(c,f,x){f!=null&&typeof f.toString!="function"&&(f=uh.call(f)),Mi.call(c,f)?c[f].push(x):c[f]=[x]},je),Ni=ci(Xa);function Cn(c){return vr(c)?jo(c):gd(c)}function Bn(c){return vr(c)?jo(c,!0):wf(c)}var su=nn(function(c,f,x){hi(c,f,x)}),al=nn(function(c,f,x,R){hi(c,f,x,R)}),_a=Ro(function(c,f){var x={};if(c==null)return x;var R=!1;f=Hi(f,function($){return $=so($,c),R||(R=$.length>1),$}),hn(c,da(c),x),R&&(x=Mn(x,7,il));for(var D=f.length;D--;)Ja(x,f[D]);return x}),gn=Ro(function(c,f){return c==null?{}:function(x,R){return Th(x,R,function(D,$){return ou(x,$)})}(c,f)});function Zo(c,f){if(c==null)return{};var x=Hi(da(c),function(R){return[R]});return f=je(f),Th(c,x,function(R,D){return f(R,D[0])})}var au=Ql(Cn),ya=Ql(Bn);function Co(c){return c==null?[]:sh(c,Cn(c))}var ll=ws(function(c,f,x){return f=f.toLowerCase(),c+(x?xa(f):f)});function xa(c){return hu(wi(c).toLowerCase())}function ba(c){return(c=wi(c))&&c.replace(wt,pf).replace(nf,"")}var lu=ws(function(c,f,x){return c+(x?"-":"")+f.toLowerCase()}),rm=ws(function(c,f,x){return c+(x?" ":"")+f.toLowerCase()}),zh=ua("toLowerCase"),uu=ws(function(c,f,x){return c+(x?"_":"")+f.toLowerCase()}),jh=ws(function(c,f,x){return c+(x?" ":"")+hu(f)}),om=ws(function(c,f,x){return c+(x?" ":"")+f.toUpperCase()}),hu=ua("toUpperCase");function Xd(c,f,x){return c=wi(c),(f=x?void 0:f)===void 0?function(R){return rf.test(R)}(c)?function(R){return R.match(Fo)||[]}(c):function(R){return R.match(ka)||[]}(c):c.match(f)||[]}var cu=ci(function(c,f){try{return rr(c,void 0,f)}catch(x){return Gd(x)?x:new gi(x)}}),Vh=Ro(function(c,f){return dr(f,function(x){x=Xr(x),wo(c,x,kd(c[x],c))}),c});function ul(c){return function(){return c}}var sm=Yo(),am=Yo(!0);function lr(c){return c}function Wh(c){return bf(typeof c=="function"?c:Mn(c,1))}var lm=ci(function(c,f){return function(x){return Xa(x,c,f)}}),zv=ci(function(c,f){return function(x){return Xa(c,x,f)}});function Xh(c,f,x){var R=Cn(f),D=ro(f,R);x!=null||rn(f)&&(D.length||!R.length)||(x=f,f=c,c=this,D=ro(f,Cn(f)));var $=!(rn(x)&&"chain"in x&&!x.chain),ut=lo(c);return dr(D,function(mt){var Mt=f[mt];c[mt]=Mt,ut&&(c.prototype[mt]=function(){var Jt=this.__chain__;if($||Jt){var Zt=c(this.__wrapped__),de=Zt.__actions__=An(this.__actions__);return de.push({func:Mt,args:arguments,thisArg:c}),Zt.__chain__=Jt,Zt}return Mt.apply(c,ko([this.value()],arguments))})}),c}function hl(){}var qh=tl(Hi),Ms=tl(Kc),um=tl(eh);function hm(c){return Te(c)?ih(Xr(c)):function(f){return function(x){return Eo(x,f)}}(c)}var Yh=Zl(),cm=Zl(!0);function $h(){return[]}function cl(){return!1}var du=Qa(function(c,f){return c+f},0),qd=el("ceil"),kn=Qa(function(c,f){return c/f},1),dm=el("floor"),Jh,pm=Qa(function(c,f){return c*f},1),Yd=el("round"),Zh=Qa(function(c,f){return c-f},0);return S.after=function(c,f){if(typeof f!="function")throw new fr(V);return c=di(c),function(){if(--c<1)return f.apply(this,arguments)}},S.ary=jf,S.assign=Gh,S.assignIn=jd,S.assignInWith=Hh,S.assignWith=Uv,S.at=nm,S.before=Vf,S.bind=kd,S.bindAll=Vh,S.bindKey=Wf,S.castArray=function(){if(!arguments.length)return[];var c=arguments[0];return ti(c)?c:[c]},S.chain=Gf,S.chunk=function(c,f,x){f=(x?$e(c,f,x):f===void 0)?1:zi(di(f),0);var R=c==null?0:c.length;if(!R||f<1)return[];for(var D=0,$=0,ut=Se(fh(R/f));D<R;)ut[$++]=un(c,D,D+=f);return ut},S.compact=function(c){for(var f=-1,x=c==null?0:c.length,R=0,D=[];++f<x;){var $=c[f];$&&(D[R++]=$)}return D},S.concat=function(){var c=arguments.length;if(!c)return[];for(var f=Se(c-1),x=arguments[0],R=c;R--;)f[R-1]=arguments[R];return ko(ti(x)?An(x):[x],Ee(f,1))},S.cond=function(c){var f=c==null?0:c.length,x=je();return c=f?Hi(c,function(R){if(typeof R[1]!="function")throw new fr(V);return[x(R[0]),R[1]]}):[],ci(function(R){for(var D=-1;++D<f;){var $=c[D];if(rr($[0],this,R))return rr($[1],this,R)}})},S.conforms=function(c){return function(f){var x=Cn(f);return function(R){return So(R,f,x)}}(Mn(c,1))},S.constant=ul,S.countBy=Mv,S.create=function(c,f){var x=gs(c);return f==null?x:xf(x,f)},S.curry=function c(f,x,R){var D=Ei(f,8,void 0,void 0,void 0,void 0,void 0,x=R?void 0:x);return D.placeholder=c.placeholder,D},S.curryRight=function c(f,x,R){var D=Ei(f,16,void 0,void 0,void 0,void 0,void 0,x=R?void 0:x);return D.placeholder=c.placeholder,D},S.debounce=Xf,S.defaults=Vd,S.defaultsDeep=va,S.defer=Nv,S.delay=Dv,S.difference=pv,S.differenceBy=Ff,S.differenceWith=Bf,S.drop=function(c,f,x){var R=c==null?0:c.length;return R?un(c,(f=x||f===void 0?1:di(f))<0?0:f,R):[]},S.dropRight=function(c,f,x){var R=c==null?0:c.length;return R?un(c,0,(f=R-(f=x||f===void 0?1:di(f)))<0?0:f):[]},S.dropRightWhile=function(c,f){return c&&c.length?Jl(c,je(f,3),!0,!0):[]},S.dropWhile=function(c,f){return c&&c.length?Jl(c,je(f,3),!0):[]},S.fill=function(c,f,x,R){var D=c==null?0:c.length;return D?(x&&typeof x!="number"&&$e(c,f,x)&&(x=0,R=D),function($,ut,mt,Mt){var Jt=$.length;for((mt=di(mt))<0&&(mt=-mt>Jt?0:Jt+mt),(Mt=Mt===void 0||Mt>Jt?Jt:di(Mt))<0&&(Mt+=Jt),Mt=mt>Mt?0:em(Mt);mt<Mt;)$[mt++]=ut;return $}(c,f,x,R)):[]},S.filter=function(c,f){return(ti(c)?yo:Xo)(c,je(f,3))},S.flatMap=function(c,f){return Ee(Dh(c,f),1)},S.flatMapDeep=function(c,f){return Ee(Dh(c,f),1/0)},S.flatMapDepth=function(c,f,x){return x=x===void 0?1:di(x),Ee(Dh(c,f),x)},S.flatten=Nd,S.flattenDeep=function(c){return c!=null&&c.length?Ee(c,1/0):[]},S.flattenDepth=function(c,f){return c!=null&&c.length?Ee(c,f=f===void 0?1:di(f)):[]},S.flip=function(c){return Ei(c,512)},S.flow=sm,S.flowRight=am,S.fromPairs=function(c){for(var f=-1,x=c==null?0:c.length,R={};++f<x;){var D=c[f];R[D[0]]=D[1]}return R},S.functions=function(c){return c==null?[]:ro(c,Cn(c))},S.functionsIn=function(c){return c==null?[]:ro(c,Bn(c))},S.groupBy=Cv,S.initial=function(c){return c!=null&&c.length?un(c,0,-1):[]},S.intersection=ol,S.intersectionBy=ar,S.intersectionWith=ir,S.invert=Gv,S.invertBy=Hv,S.invokeMap=Pv,S.iteratee=Wh,S.keyBy=Iv,S.keys=Cn,S.keysIn=Bn,S.map=Dh,S.mapKeys=function(c,f){var x={};return f=je(f,3),To(c,function(R,D,$){wo(x,f(R,D,$),R)}),x},S.mapValues=function(c,f){var x={};return f=je(f,3),To(c,function(R,D,$){wo(x,D,f(R,D,$))}),x},S.matches=function(c){return Sf(Mn(c,1))},S.matchesProperty=function(c,f){return _d(c,Mn(f,1))},S.memoize=nu,S.merge=su,S.mergeWith=al,S.method=lm,S.methodOf=zv,S.mixin=Xh,S.negate=ru,S.nthArg=function(c){return c=di(c),ci(function(f){return jr(f,c)})},S.omit=_a,S.omitBy=function(c,f){return Zo(c,ru(je(f)))},S.once=function(c){return Vf(2,c)},S.orderBy=function(c,f,x,R){return c==null?[]:(ti(f)||(f=f==null?[]:[f]),ti(x=R?void 0:x)||(x=x==null?[]:[x]),Mo(c,f,x))},S.over=qh,S.overArgs=Ud,S.overEvery=Ms,S.overSome=um,S.partial=Bh,S.partialRight=qf,S.partition=Lv,S.pick=gn,S.pickBy=Zo,S.property=hm,S.propertyOf=function(c){return function(f){return c==null?void 0:Eo(c,f)}},S.pull=fv,S.pullAll=kf,S.pullAllBy=function(c,f,x){return c&&c.length&&f&&f.length?oo(c,f,je(x,2)):c},S.pullAllWith=function(c,f,x){return c&&c.length&&f&&f.length?oo(c,f,void 0,x):c},S.pullAt=mv,S.range=Yh,S.rangeRight=cm,S.rearg=Ts,S.reject=function(c,f){return(ti(c)?yo:Xo)(c,ru(je(f,3)))},S.remove=function(c,f){var x=[];if(!c||!c.length)return x;var R=-1,D=[],$=c.length;for(f=je(f,3);++R<$;){var ut=c[R];f(ut,R,c)&&(x.push(ut),D.push(R))}return aa(c,D),x},S.rest=function(c,f){if(typeof c!="function")throw new fr(V);return ci(c,f=f===void 0?f:di(f))},S.reverse=Fd,S.sampleSize=function(c,f,x){return f=(x?$e(c,f,x):f===void 0)?1:di(f),(ti(c)?ra:xd)(c,f)},S.set=function(c,f,x){return c==null?c:Vi(c,f,x)},S.setWith=function(c,f,x,R){return R=typeof R=="function"?R:void 0,c==null?c:Vi(c,f,x,R)},S.shuffle=function(c){return(ti(c)?ql:Ef)(c)},S.slice=function(c,f,x){var R=c==null?0:c.length;return R?(x&&typeof x!="number"&&$e(c,f,x)?(f=0,x=R):(f=f==null?0:di(f),x=x===void 0?R:di(x)),un(c,f,x)):[]},S.sortBy=Ov,S.sortedUniq=function(c){return c&&c.length?Ah(c):[]},S.sortedUniqBy=function(c,f){return c&&c.length?Ah(c,je(f,2)):[]},S.split=function(c,f,x){return x&&typeof x!="number"&&$e(c,f,x)&&(f=x=void 0),(x=x===void 0?4294967295:x>>>0)?(c=wi(c))&&(typeof f=="string"||f!=null&&!zd(f))&&!(f=fn(f))&&Ks(c)?_e(jn(c),0,x):c.split(f,x):[]},S.spread=function(c,f){if(typeof c!="function")throw new fr(V);return f=f==null?0:zi(di(f),0),ci(function(x){var R=x[f],D=_e(x,0,f);return R&&ko(D,R),rr(c,this,D)})},S.tail=function(c){var f=c==null?0:c.length;return f?un(c,1,f):[]},S.take=function(c,f,x){return c&&c.length?un(c,0,(f=x||f===void 0?1:di(f))<0?0:f):[]},S.takeRight=function(c,f,x){var R=c==null?0:c.length;return R?un(c,(f=R-(f=x||f===void 0?1:di(f)))<0?0:f,R):[]},S.takeRightWhile=function(c,f){return c&&c.length?Jl(c,je(f,3),!1,!0):[]},S.takeWhile=function(c,f){return c&&c.length?Jl(c,je(f,3)):[]},S.tap=function(c,f){return f(c),c},S.throttle=function(c,f,x){var R=!0,D=!0;if(typeof c!="function")throw new fr(V);return rn(x)&&(R="leading"in x?!!x.leading:R,D="trailing"in x?!!x.trailing:D),Xf(c,f,{leading:R,maxWait:f,trailing:D})},S.thru=Nh,S.toArray=tm,S.toPairs=au,S.toPairsIn=ya,S.toPath=function(c){return ti(c)?Hi(c,Xr):Or(c)?[c]:An(Oh(wi(c)))},S.toPlainObject=im,S.transform=function(c,f,x){var R=ti(c),D=R||$o(c)||ga(c);if(f=je(f,4),x==null){var $=c&&c.constructor;x=D?R?new $:[]:rn(c)&&lo($)?gs(dh(c)):{}}return(D?dr:To)(c,function(ut,mt,Mt){return f(x,ut,mt,Mt)}),x},S.unary=function(c){return jf(c,1)},S.union=gv,S.unionBy=vv,S.unionWith=_v,S.uniq=function(c){return c&&c.length?Ti(c):[]},S.uniqBy=function(c,f){return c&&c.length?Ti(c,je(f,2)):[]},S.uniqWith=function(c,f){return f=typeof f=="function"?f:void 0,c&&c.length?Ti(c,void 0,f):[]},S.unset=function(c,f){return c==null||Ja(c,f)},S.unzip=Bd,S.unzipWith=Uf,S.update=function(c,f,x){return c==null?c:mi(c,f,Ch(x))},S.updateWith=function(c,f,x,R){return R=typeof R=="function"?R:void 0,c==null?c:mi(c,f,Ch(x),R)},S.values=Co,S.valuesIn=function(c){return c==null?[]:sh(c,Bn(c))},S.without=yv,S.words=Xd,S.wrap=function(c,f){return Bh(Ch(f),c)},S.xor=xv,S.xorBy=bv,S.xorWith=wv,S.zip=Sv,S.zipObject=function(c,f){return wd(c||[],f||[],vs)},S.zipObjectDeep=function(c,f){return wd(c||[],f||[],Vi)},S.zipWith=Tv,S.entries=au,S.entriesIn=ya,S.extend=jd,S.extendWith=Hh,Xh(S,S),S.add=du,S.attempt=cu,S.camelCase=ll,S.capitalize=xa,S.ceil=qd,S.clamp=function(c,f,x){return x===void 0&&(x=f,f=void 0),x!==void 0&&(x=(x=Nr(x))==x?x:0),f!==void 0&&(f=(f=Nr(f))==f?f:0),Wo(Nr(c),f,x)},S.clone=function(c){return Mn(c,4)},S.cloneDeep=function(c){return Mn(c,5)},S.cloneDeepWith=function(c,f){return Mn(c,5,f=typeof f=="function"?f:void 0)},S.cloneWith=function(c,f){return Mn(c,4,f=typeof f=="function"?f:void 0)},S.conformsTo=function(c,f){return f==null||So(c,f,Cn(f))},S.deburr=ba,S.defaultTo=function(c,f){return c==null||c!=c?f:c},S.divide=kn,S.endsWith=function(c,f,x){c=wi(c),f=fn(f);var R=c.length,D=x=x===void 0?R:Wo(di(x),0,R);return(x-=f.length)>=0&&c.slice(x,D)==f},S.eq=qr,S.escape=function(c){return(c=wi(c))&&ei.test(c)?c.replace(ui,ff):c},S.escapeRegExp=function(c){return(c=wi(c))&&Li.test(c)?c.replace(Qi,"\\$&"):c},S.every=function(c,f,x){var R=ti(c)?Kc:bh;return x&&$e(c,f,x)&&(f=void 0),R(c,je(f,3))},S.find=Av,S.findIndex=Ld,S.findKey=function(c,f){return Qc(c,je(f,3),To)},S.findLast=Rv,S.findLastIndex=Od,S.findLastKey=function(c,f){return Qc(c,je(f,3),pd)},S.floor=dm,S.forEach=Hf,S.forEachRight=zf,S.forIn=function(c,f){return c==null?c:ys(c,je(f,3),Bn)},S.forInRight=function(c,f){return c==null?c:zr(c,je(f,3),Bn)},S.forOwn=function(c,f){return c&&To(c,je(f,3))},S.forOwnRight=function(c,f){return c&&pd(c,je(f,3))},S.get=Wd,S.gt=Fv,S.gte=Yf,S.has=function(c,f){return c!=null&&rl(c,f,oa)},S.hasIn=ou,S.head=Dd,S.identity=lr,S.includes=function(c,f,x,R){c=vr(c)?c:Co(c),x=x&&!R?di(x):0;var D=c.length;return x<0&&(x=zi(D+x,0)),Uh(c)?x<=D&&c.indexOf(f,x)>-1:!!D&&Zs(c,f,x)>-1},S.indexOf=function(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=x==null?0:di(x);return D<0&&(D=zi(R+D,0)),Zs(c,f,D)},S.inRange=function(c,f,x){return f=Jo(f),x===void 0?(x=f,f=0):x=Jo(x),function(R,D,$){return R>=xn(D,$)&&R<zi(D,$)}(c=Nr(c),f,x)},S.invoke=Ni,S.isArguments=Es,S.isArray=ti,S.isArrayBuffer=Bv,S.isArrayLike=vr,S.isArrayLikeObject=Wi,S.isBoolean=function(c){return c===!0||c===!1||on(c)&&tr(c)==Z},S.isBuffer=$o,S.isDate=$f,S.isElement=function(c){return on(c)&&c.nodeType===1&&!sl(c)},S.isEmpty=function(c){if(c==null)return!0;if(vr(c)&&(ti(c)||typeof c=="string"||typeof c.splice=="function"||$o(c)||ga(c)||Es(c)))return!c.length;var f=Rn(c);if(f==L||f==j)return!c.size;if(eu(c))return!gd(c).length;for(var x in c)if(Mi.call(c,x))return!1;return!0},S.isEqual=function(c,f){return Cr(c,f)},S.isEqualWith=function(c,f,x){var R=(x=typeof x=="function"?x:void 0)?x(c,f):void 0;return R===void 0?Cr(c,f,void 0,x):!!R},S.isError=Gd,S.isFinite=function(c){return typeof c=="number"&&Ho(c)},S.isFunction=lo,S.isInteger=Jf,S.isLength=kh,S.isMap=Zf,S.isMatch=function(c,f){return c===f||qa(c,f,Rd(f))},S.isMatchWith=function(c,f,x){return x=typeof x=="function"?x:void 0,qa(c,f,Rd(f),x)},S.isNaN=function(c){return Hd(c)&&c!=+c},S.isNative=function(c){if(cv(c))throw new gi("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ya(c)},S.isNil=function(c){return c==null},S.isNull=function(c){return c===null},S.isNumber=Hd,S.isObject=rn,S.isObjectLike=on,S.isPlainObject=sl,S.isRegExp=zd,S.isSafeInteger=function(c){return Jf(c)&&c>=-9007199254740991&&c<=9007199254740991},S.isSet=Kf,S.isString=Uh,S.isSymbol=Or,S.isTypedArray=ga,S.isUndefined=function(c){return c===void 0},S.isWeakMap=function(c){return on(c)&&Rn(c)==qt},S.isWeakSet=function(c){return on(c)&&tr(c)=="[object WeakSet]"},S.join=function(c,f){return c==null?"":Vn.call(c,f)},S.kebabCase=lu,S.last=Lr,S.lastIndexOf=function(c,f,x){var R=c==null?0:c.length;if(!R)return-1;var D=R;return x!==void 0&&(D=(D=di(x))<0?zi(R+D,0):xn(D,R-1)),f==f?function($,ut,mt){for(var Mt=mt+1;Mt--;)if($[Mt]===ut)return Mt;return Mt}(c,f,D):Fl(c,td,D,!0)},S.lowerCase=rm,S.lowerFirst=zh,S.lt=Qf,S.lte=kv,S.max=function(c){return c&&c.length?Wa(c,lr,wh):void 0},S.maxBy=function(c,f){return c&&c.length?Wa(c,je(f,2),wh):void 0},S.mean=function(c){return ed(c,lr)},S.meanBy=function(c,f){return ed(c,je(f,2))},S.min=function(c){return c&&c.length?Wa(c,lr,Sh):void 0},S.minBy=function(c,f){return c&&c.length?Wa(c,je(f,2),Sh):void 0},S.stubArray=$h,S.stubFalse=cl,S.stubObject=function(){return{}},S.stubString=function(){return""},S.stubTrue=function(){return!0},S.multiply=pm,S.nth=function(c,f){return c&&c.length?jr(c,di(f)):void 0},S.noConflict=function(){return en._===this&&(en._=rv),this},S.noop=hl,S.now=Fh,S.pad=function(c,f,x){c=wi(c);var R=(f=di(f))?Go(c):0;if(!f||R>=f)return c;var D=(f-R)/2;return ha(mh(D),x)+c+ha(fh(D),x)},S.padEnd=function(c,f,x){c=wi(c);var R=(f=di(f))?Go(c):0;return f&&R<f?c+ha(f-R,x):c},S.padStart=function(c,f,x){c=wi(c);var R=(f=di(f))?Go(c):0;return f&&R<f?ha(f-R,x)+c:c},S.parseInt=function(c,f,x){return x||f==null?f=0:f&&(f=+f),Wn(wi(c).replace(Gi,""),f||0)},S.random=function(c,f,x){if(x&&typeof x!="boolean"&&$e(c,f,x)&&(f=x=void 0),x===void 0&&(typeof f=="boolean"?(x=f,f=void 0):typeof c=="boolean"&&(x=c,c=void 0)),c===void 0&&f===void 0?(c=0,f=1):(c=Jo(c),f===void 0?(f=c,c=0):f=Jo(f)),c>f){var R=c;c=f,f=R}if(x||c%1||f%1){var D=vh();return xn(c+D*(f-c+Er("1e-"+((D+"").length-1))),f)}return xs(c,f)},S.reduce=function(c,f,x){var R=ti(c)?th:id,D=arguments.length<3;return R(c,je(f,4),x,D,or)},S.reduceRight=function(c,f,x){var R=ti(c)?uf:id,D=arguments.length<3;return R(c,je(f,4),x,D,xh)},S.repeat=function(c,f,x){return f=(x?$e(c,f,x):f===void 0)?1:di(f),Eh(wi(c),f)},S.replace=function(){var c=arguments,f=wi(c[0]);return c.length<3?f:f.replace(c[1],c[2])},S.result=function(c,f,x){var R=-1,D=(f=so(f,c)).length;for(D||(D=1,c=void 0);++R<D;){var $=c==null?void 0:c[Xr(f[R])];$===void 0&&(R=D,$=x),c=lo($)?$.call(c):$}return c},S.round=Yd,S.runInContext=It,S.sample=function(c){return(ti(c)?Vo:yd)(c)},S.size=function(c){if(c==null)return 0;if(vr(c))return Uh(c)?Go(c):c.length;var f=Rn(c);return f==L||f==j?c.size:gd(c).length},S.snakeCase=uu,S.some=function(c,f,x){var R=ti(c)?eh:Mh;return x&&$e(c,f,x)&&(f=void 0),R(c,je(f,3))},S.sortedIndex=function(c,f){return $a(c,f)},S.sortedIndexBy=function(c,f,x){return $l(c,f,je(x,2))},S.sortedIndexOf=function(c,f){var x=c==null?0:c.length;if(x){var R=$a(c,f);if(R<x&&qr(c[R],f))return R}return-1},S.sortedLastIndex=function(c,f){return $a(c,f,!0)},S.sortedLastIndexBy=function(c,f,x){return $l(c,f,je(x,2),!0)},S.sortedLastIndexOf=function(c,f){if(c!=null&&c.length){var x=$a(c,f,!0)-1;if(qr(c[x],f))return x}return-1},S.startCase=jh,S.startsWith=function(c,f,x){return c=wi(c),x=x==null?0:Wo(di(x),0,c.length),f=fn(f),c.slice(x,x+f.length)==f},S.subtract=Zh,S.sum=function(c){return c&&c.length?rh(c,lr):0},S.sumBy=function(c,f){return c&&c.length?rh(c,je(f,2)):0},S.template=function(c,f,x){var R=S.templateSettings;x&&$e(c,f,x)&&(f=void 0),c=wi(c),f=Hh({},f,R,tu);var D,$,ut=Hh({},f.imports,R.imports,tu),mt=Cn(ut),Mt=sh(ut,mt),Jt=0,Zt=f.interpolate||zt,de="__p += '",Oe=Ul((f.escape||zt).source+"|"+Zt.source+"|"+(Zt===De?Ua:zt).source+"|"+(f.evaluate||zt).source+"|$","g"),Fe="//# sourceURL="+(Mi.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sf+"]")+`
|
|
11
11
|
`;c.replace(Oe,function(pe,He,Ce,Ue,Ye,li){return Ce||(Ce=Ue),de+=c.slice(Jt,li).replace(ne,mf),He&&(D=!0,de+=`' +
|
|
12
12
|
__e(`+He+`) +
|
|
13
13
|
'`),Ye&&($=!0,de+=`';
|
|
@@ -24,8 +24,8 @@ __p += '`),Ce&&(de+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+de+`return __p
|
|
27
|
-
}`;var re=cu(function(){return ln(mt,Fe+"return "+de).apply(void 0,Mt)});if(re.source=de,Gd(re))throw re;return re},S.times=function(c,f){if((c=di(c))<1||c>9007199254740991)return[];var x=4294967295,R=xn(c,4294967295);c-=4294967295;for(var D=oh(R,f=je(f));++x<c;)f(x);return D},S.toFinite=Jo,S.toInteger=di,S.toLength=em,S.toLower=function(c){return wi(c).toLowerCase()},S.toNumber=Nr,S.toSafeInteger=function(c){return c?Wo(di(c),-9007199254740991,9007199254740991):c===0?c:0},S.toString=wi,S.toUpper=function(c){return wi(c).toUpperCase()},S.trim=function(c,f,x){if((c=wi(c))&&(x||f===void 0))return nd(c);if(!c||!(f=fn(f)))return c;var R=jn(c),D=jn(f);return _e(R,rd(R,D),od(R,D)+1).join("")},S.trimEnd=function(c,f,x){if((c=wi(c))&&(x||f===void 0))return c.slice(0,fs(c)+1);if(!c||!(f=fn(f)))return c;var R=jn(c);return _e(R,0,od(R,jn(f))+1).join("")},S.trimStart=function(c,f,x){if((c=wi(c))&&(x||f===void 0))return c.replace(Gi,"");if(!c||!(f=fn(f)))return c;var R=jn(c);return _e(R,rd(R,jn(f))).join("")},S.truncate=function(c,f){var x=30,R="...";if(rn(f)){var D="separator"in f?f.separator:D;x="length"in f?di(f.length):x,R="omission"in f?fn(f.omission):R}var $=(c=wi(c)).length;if(Ks(c)){var ut=jn(c);$=ut.length}if(x>=$)return c;var mt=x-Go(R);if(mt<1)return R;var Mt=ut?_e(ut,0,mt).join(""):c.slice(0,mt);if(D===void 0)return Mt+R;if(ut&&(mt+=Mt.length-mt),zd(D)){if(c.slice(mt).search(D)){var Jt,Zt=Mt;for(D.global||(D=Ul(D.source,wi(to.exec(D))+"g")),D.lastIndex=0;Jt=D.exec(Zt);)var de=Jt.index;Mt=Mt.slice(0,de===void 0?mt:de)}}else if(c.indexOf(fn(D),mt)!=mt){var Oe=Mt.lastIndexOf(D);Oe>-1&&(Mt=Mt.slice(0,Oe))}return Mt+R},S.unescape=function(c){return(c=wi(c))&&be.test(c)?c.replace(me,kl):c},S.uniqueId=function(c){var f=++iv;return wi(c)+f},S.upperCase=om,S.upperFirst=hu,S.each=Hf,S.eachRight=zf,S.first=Dd,Xh(S,(Jh={},To(S,function(c,f){Mi.call(S.prototype,f)||(Jh[f]=c)}),Jh),{chain:!1}),S.VERSION="4.17.21",dr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){S[c].placeholder=S}),dr(["drop","take"],function(c,f){oi.prototype[c]=function(x){x=x===void 0?1:zi(di(x),0);var R=this.__filtered__&&!f?new oi(this):this.clone();return R.__filtered__?R.__takeCount__=xn(x,R.__takeCount__):R.__views__.push({size:xn(x,4294967295),type:c+(R.__dir__<0?"Right":"")}),R},oi.prototype[c+"Right"]=function(x){return this.reverse()[c](x).reverse()}}),dr(["filter","map","takeWhile"],function(c,f){var x=f+1,R=x==1||x==3;oi.prototype[c]=function(D){var $=this.clone();return $.__iteratees__.push({iteratee:je(D,3),type:x}),$.__filtered__=$.__filtered__||R,$}}),dr(["head","last"],function(c,f){var x="take"+(f?"Right":"");oi.prototype[c]=function(){return this[x](1).value()[0]}}),dr(["initial","tail"],function(c,f){var x="drop"+(f?"":"Right");oi.prototype[c]=function(){return this.__filtered__?new oi(this):this[x](1)}}),oi.prototype.compact=function(){return this.filter(lr)},oi.prototype.find=function(c){return this.filter(c).head()},oi.prototype.findLast=function(c){return this.reverse().find(c)},oi.prototype.invokeMap=ci(function(c,f){return typeof c=="function"?new oi(this):this.map(function(x){return Xa(x,c,f)})}),oi.prototype.reject=function(c){return this.filter(ru(je(c)))},oi.prototype.slice=function(c,f){c=di(c);var x=this;return x.__filtered__&&(c>0||f<0)?new oi(x):(c<0?x=x.takeRight(-c):c&&(x=x.drop(c)),f!==void 0&&(x=(f=di(f))<0?x.dropRight(-f):x.take(f-c)),x)},oi.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},oi.prototype.toArray=function(){return this.take(4294967295)},To(oi.prototype,function(c,f){var x=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),D=S[R?"take"+(f=="last"?"Right":""):f],$=R||/^find/.test(f);D&&(S.prototype[f]=function(){var ut=this.__wrapped__,mt=R?[1]:arguments,Mt=ut instanceof oi,Jt=mt[0],Zt=Mt||ti(ut),de=function(He){var Ce=D.apply(S,ko([He],mt));return R&&Oe?Ce[0]:Ce};Zt&&x&&typeof Jt=="function"&&Jt.length!=1&&(Mt=Zt=!1);var Oe=this.__chain__,Fe=!!this.__actions__.length,Ve=$&&!Oe,re=Mt&&!Fe;if(!$&&Zt){ut=re?ut:new oi(this);var pe=c.apply(ut,mt);return pe.__actions__.push({func:Nh,args:[de],thisArg:void 0}),new $i(pe,Oe)}return Ve&&re?c.apply(this,mt):(pe=this.thru(de),Ve?R?pe.value()[0]:pe.value():pe)})}),dr(["pop","push","shift","sort","splice","unshift"],function(c){var f=Gl[c],x=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",R=/^(?:pop|shift)$/.test(c);S.prototype[c]=function(){var D=arguments;if(R&&!this.__chain__){var $=this.value();return f.apply(ti($)?$:[],D)}return this[x](function(ut){return f.apply(ti(ut)?ut:[],D)})}}),To(oi.prototype,function(c,f){var x=S[f];if(x){var R=x.name+"";Mi.call(Gr,R)||(Gr[R]=[]),Gr[R].push({name:f,func:x})}}),Gr[Ka(void 0,2).name]=[{name:"wrapper",func:void 0}],oi.prototype.clone=function(){var c=new oi(this.__wrapped__);return c.__actions__=An(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=An(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=An(this.__views__),c},oi.prototype.reverse=function(){if(this.__filtered__){var c=new oi(this);c.__dir__=-1,c.__filtered__=!0}else(c=this.clone()).__dir__*=-1;return c},oi.prototype.value=function(){var c=this.__wrapped__.value(),f=this.__dir__,x=ti(c),R=f<0,D=x?c.length:0,$=function(li,ke,Je){for(var cn=-1,qn=Je.length;++cn<qn;){var dn=Je[cn],sn=dn.size;switch(dn.type){case"drop":li+=sn;break;case"dropRight":ke-=sn;break;case"take":ke=xn(ke,li+sn);break;case"takeRight":li=zi(li,ke-sn)}}return{start:li,end:ke}}(0,D,this.__views__),ut=$.start,mt=$.end,Mt=mt-ut,Jt=R?mt:ut-1,Zt=this.__iteratees__,de=Zt.length,Oe=0,Fe=xn(Mt,this.__takeCount__);if(!x||!R&&D==Mt&&Fe==Mt)return bd(c,this.__actions__);var Ve=[];t:for(;Mt--&&Oe<Fe;){for(var re=-1,pe=c[Jt+=f];++re<de;){var He=Zt[re],Ce=He.iteratee,Ue=He.type,Ye=Ce(pe);if(Ue==2)pe=Ye;else if(!Ye){if(Ue==1)continue t;break t}}Ve[Oe++]=pe}return Ve},S.prototype.at=Ev,S.prototype.chain=function(){return Gf(this)},S.prototype.commit=function(){return new $i(this.value(),this.__chain__)},S.prototype.next=function(){this.__values__===void 0&&(this.__values__=tm(this.value()));var c=this.__index__>=this.__values__.length;return{done:c,value:c?void 0:this.__values__[this.__index__++]}},S.prototype.plant=function(c){for(var f,x=this;x instanceof Xl;){var R=Df(x);R.__index__=0,R.__values__=void 0,f?D.__wrapped__=R:f=R;var D=R;x=x.__wrapped__}return D.__wrapped__=c,f},S.prototype.reverse=function(){var c=this.__wrapped__;if(c instanceof oi){var f=c;return this.__actions__.length&&(f=new oi(this)),(f=f.reverse()).__actions__.push({func:Nh,args:[Fd],thisArg:void 0}),new $i(f,this.__chain__)}return this.thru(Fd)},S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=function(){return bd(this.__wrapped__,this.__actions__)},S.prototype.first=S.prototype.head,xo&&(S.prototype[xo]=function(){return this}),S}();en._=Qs,(ht=function(){return Qs}.call(M,v,M,q))===void 0||(q.exports=ht)}).call(this)}).call(this,v(3),v(7)(T))},function(T,M,v){var b=Object.prototype.hasOwnProperty,q="~";function ht(){}function W(k,Z,vt){this.fn=k,this.context=Z,this.once=vt||!1}function P(k,Z,vt,Ot,Nt){if(typeof vt!="function")throw new TypeError("The listener must be a function");var E=new W(vt,Ot||k,Nt),L=q?q+Z:Z;return k._events[L]?k._events[L].fn?k._events[L]=[k._events[L],E]:k._events[L].push(E):(k._events[L]=E,k._eventsCount++),k}function V(k,Z){--k._eventsCount==0?k._events=new ht:delete k._events[Z]}function z(){this._events=new ht,this._eventsCount=0}Object.create&&(ht.prototype=Object.create(null),new ht().__proto__||(q=!1)),z.prototype.eventNames=function(){var k,Z,vt=[];if(this._eventsCount===0)return vt;for(Z in k=this._events)b.call(k,Z)&&vt.push(q?Z.slice(1):Z);return Object.getOwnPropertySymbols?vt.concat(Object.getOwnPropertySymbols(k)):vt},z.prototype.listeners=function(k){var Z=q?q+k:k,vt=this._events[Z];if(!vt)return[];if(vt.fn)return[vt.fn];for(var Ot=0,Nt=vt.length,E=new Array(Nt);Ot<Nt;Ot++)E[Ot]=vt[Ot].fn;return E},z.prototype.listenerCount=function(k){var Z=q?q+k:k,vt=this._events[Z];return vt?vt.fn?1:vt.length:0},z.prototype.emit=function(k,Z,vt,Ot,Nt,E){var L=q?q+k:k;if(!this._events[L])return!1;var O,Y,C=this._events[L],j=arguments.length;if(C.fn){switch(C.once&&this.removeListener(k,C.fn,void 0,!0),j){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,Z),!0;case 3:return C.fn.call(C.context,Z,vt),!0;case 4:return C.fn.call(C.context,Z,vt,Ot),!0;case 5:return C.fn.call(C.context,Z,vt,Ot,Nt),!0;case 6:return C.fn.call(C.context,Z,vt,Ot,Nt,E),!0}for(Y=1,O=new Array(j-1);Y<j;Y++)O[Y-1]=arguments[Y];C.fn.apply(C.context,O)}else{var X,K=C.length;for(Y=0;Y<K;Y++)switch(C[Y].once&&this.removeListener(k,C[Y].fn,void 0,!0),j){case 1:C[Y].fn.call(C[Y].context);break;case 2:C[Y].fn.call(C[Y].context,Z);break;case 3:C[Y].fn.call(C[Y].context,Z,vt);break;case 4:C[Y].fn.call(C[Y].context,Z,vt,Ot);break;default:if(!O)for(X=1,O=new Array(j-1);X<j;X++)O[X-1]=arguments[X];C[Y].fn.apply(C[Y].context,O)}}return!0},z.prototype.on=function(k,Z,vt){return P(this,k,Z,vt,!1)},z.prototype.once=function(k,Z,vt){return P(this,k,Z,vt,!0)},z.prototype.removeListener=function(k,Z,vt,Ot){var Nt=q?q+k:k;if(!this._events[Nt])return this;if(!Z)return V(this,Nt),this;var E=this._events[Nt];if(E.fn)E.fn!==Z||Ot&&!E.once||vt&&E.context!==vt||V(this,Nt);else{for(var L=0,O=[],Y=E.length;L<Y;L++)(E[L].fn!==Z||Ot&&!E[L].once||vt&&E[L].context!==vt)&&O.push(E[L]);O.length?this._events[Nt]=O.length===1?O[0]:O:V(this,Nt)}return this},z.prototype.removeAllListeners=function(k){var Z;return k?(Z=q?q+k:k,this._events[Z]&&V(this,Z)):(this._events=new ht,this._eventsCount=0),this},z.prototype.off=z.prototype.removeListener,z.prototype.addListener=z.prototype.on,z.prefixed=q,z.EventEmitter=z,T.exports=z},function(T,M,v){var b;(function(q){function ht(C,j){var X=(65535&C)+(65535&j);return(C>>16)+(j>>16)+(X>>16)<<16|65535&X}function W(C,j,X,K,qt,ge){return ht((Ct=ht(ht(j,C),ht(K,ge)))<<(ot=qt)|Ct>>>32-ot,X);var Ct,ot}function P(C,j,X,K,qt,ge,Ct){return W(j&X|~j&K,C,j,qt,ge,Ct)}function V(C,j,X,K,qt,ge,Ct){return W(j&K|X&~K,C,j,qt,ge,Ct)}function z(C,j,X,K,qt,ge,Ct){return W(j^X^K,C,j,qt,ge,Ct)}function k(C,j,X,K,qt,ge,Ct){return W(X^(j|~K),C,j,qt,ge,Ct)}function Z(C,j){var X,K,qt,ge,Ct;C[j>>5]|=128<<j%32,C[14+(j+64>>>9<<4)]=j;var ot=1732584193,yt=-271733879,Pt=-1732584194,H=271733878;for(X=0;X<C.length;X+=16)K=ot,qt=yt,ge=Pt,Ct=H,ot=P(ot,yt,Pt,H,C[X],7,-680876936),H=P(H,ot,yt,Pt,C[X+1],12,-389564586),Pt=P(Pt,H,ot,yt,C[X+2],17,606105819),yt=P(yt,Pt,H,ot,C[X+3],22,-1044525330),ot=P(ot,yt,Pt,H,C[X+4],7,-176418897),H=P(H,ot,yt,Pt,C[X+5],12,1200080426),Pt=P(Pt,H,ot,yt,C[X+6],17,-1473231341),yt=P(yt,Pt,H,ot,C[X+7],22,-45705983),ot=P(ot,yt,Pt,H,C[X+8],7,1770035416),H=P(H,ot,yt,Pt,C[X+9],12,-1958414417),Pt=P(Pt,H,ot,yt,C[X+10],17,-42063),yt=P(yt,Pt,H,ot,C[X+11],22,-1990404162),ot=P(ot,yt,Pt,H,C[X+12],7,1804603682),H=P(H,ot,yt,Pt,C[X+13],12,-40341101),Pt=P(Pt,H,ot,yt,C[X+14],17,-1502002290),ot=V(ot,yt=P(yt,Pt,H,ot,C[X+15],22,1236535329),Pt,H,C[X+1],5,-165796510),H=V(H,ot,yt,Pt,C[X+6],9,-1069501632),Pt=V(Pt,H,ot,yt,C[X+11],14,643717713),yt=V(yt,Pt,H,ot,C[X],20,-373897302),ot=V(ot,yt,Pt,H,C[X+5],5,-701558691),H=V(H,ot,yt,Pt,C[X+10],9,38016083),Pt=V(Pt,H,ot,yt,C[X+15],14,-660478335),yt=V(yt,Pt,H,ot,C[X+4],20,-405537848),ot=V(ot,yt,Pt,H,C[X+9],5,568446438),H=V(H,ot,yt,Pt,C[X+14],9,-1019803690),Pt=V(Pt,H,ot,yt,C[X+3],14,-187363961),yt=V(yt,Pt,H,ot,C[X+8],20,1163531501),ot=V(ot,yt,Pt,H,C[X+13],5,-1444681467),H=V(H,ot,yt,Pt,C[X+2],9,-51403784),Pt=V(Pt,H,ot,yt,C[X+7],14,1735328473),ot=z(ot,yt=V(yt,Pt,H,ot,C[X+12],20,-1926607734),Pt,H,C[X+5],4,-378558),H=z(H,ot,yt,Pt,C[X+8],11,-2022574463),Pt=z(Pt,H,ot,yt,C[X+11],16,1839030562),yt=z(yt,Pt,H,ot,C[X+14],23,-35309556),ot=z(ot,yt,Pt,H,C[X+1],4,-1530992060),H=z(H,ot,yt,Pt,C[X+4],11,1272893353),Pt=z(Pt,H,ot,yt,C[X+7],16,-155497632),yt=z(yt,Pt,H,ot,C[X+10],23,-1094730640),ot=z(ot,yt,Pt,H,C[X+13],4,681279174),H=z(H,ot,yt,Pt,C[X],11,-358537222),Pt=z(Pt,H,ot,yt,C[X+3],16,-722521979),yt=z(yt,Pt,H,ot,C[X+6],23,76029189),ot=z(ot,yt,Pt,H,C[X+9],4,-640364487),H=z(H,ot,yt,Pt,C[X+12],11,-421815835),Pt=z(Pt,H,ot,yt,C[X+15],16,530742520),ot=k(ot,yt=z(yt,Pt,H,ot,C[X+2],23,-995338651),Pt,H,C[X],6,-198630844),H=k(H,ot,yt,Pt,C[X+7],10,1126891415),Pt=k(Pt,H,ot,yt,C[X+14],15,-1416354905),yt=k(yt,Pt,H,ot,C[X+5],21,-57434055),ot=k(ot,yt,Pt,H,C[X+12],6,1700485571),H=k(H,ot,yt,Pt,C[X+3],10,-1894986606),Pt=k(Pt,H,ot,yt,C[X+10],15,-1051523),yt=k(yt,Pt,H,ot,C[X+1],21,-2054922799),ot=k(ot,yt,Pt,H,C[X+8],6,1873313359),H=k(H,ot,yt,Pt,C[X+15],10,-30611744),Pt=k(Pt,H,ot,yt,C[X+6],15,-1560198380),yt=k(yt,Pt,H,ot,C[X+13],21,1309151649),ot=k(ot,yt,Pt,H,C[X+4],6,-145523070),H=k(H,ot,yt,Pt,C[X+11],10,-1120210379),Pt=k(Pt,H,ot,yt,C[X+2],15,718787259),yt=k(yt,Pt,H,ot,C[X+9],21,-343485551),ot=ht(ot,K),yt=ht(yt,qt),Pt=ht(Pt,ge),H=ht(H,Ct);return[ot,yt,Pt,H]}function vt(C){var j,X="",K=32*C.length;for(j=0;j<K;j+=8)X+=String.fromCharCode(C[j>>5]>>>j%32&255);return X}function Ot(C){var j,X=[];for(X[(C.length>>2)-1]=void 0,j=0;j<X.length;j+=1)X[j]=0;var K=8*C.length;for(j=0;j<K;j+=8)X[j>>5]|=(255&C.charCodeAt(j/8))<<j%32;return X}function Nt(C){var j,X,K="";for(X=0;X<C.length;X+=1)j=C.charCodeAt(X),K+="0123456789abcdef".charAt(j>>>4&15)+"0123456789abcdef".charAt(15&j);return K}function E(C){return unescape(encodeURIComponent(C))}function L(C){return function(j){return vt(Z(Ot(j),8*j.length))}(E(C))}function O(C,j){return function(X,K){var qt,ge,Ct=Ot(X),ot=[],yt=[];for(ot[15]=yt[15]=void 0,Ct.length>16&&(Ct=Z(Ct,8*X.length)),qt=0;qt<16;qt+=1)ot[qt]=909522486^Ct[qt],yt[qt]=1549556828^Ct[qt];return ge=Z(ot.concat(Ot(K)),512+8*K.length),vt(Z(yt.concat(ge),640))}(E(C),E(j))}function Y(C,j,X){return j?X?O(j,C):Nt(O(j,C)):X?L(C):Nt(L(C))}(b=function(){return Y}.call(M,v,M,T))===void 0||(T.exports=b)})()},function(T,M){var v;v=function(){return this}();try{v=v||new Function("return this")()}catch{typeof window=="object"&&(v=window)}T.exports=v},function(T,M,v){(function(b){T.exports=function q(ht,W,P){function V(Z,vt){if(!W[Z]){if(!ht[Z]){if(z)return z(Z,!0);var Ot=new Error("Cannot find module '"+Z+"'");throw Ot.code="MODULE_NOT_FOUND",Ot}var Nt=W[Z]={exports:{}};ht[Z][0].call(Nt.exports,function(E){var L=ht[Z][1][E];return V(L||E)},Nt,Nt.exports,q,ht,W,P)}return W[Z].exports}for(var z=!1,k=0;k<P.length;k++)V(P[k]);return V}({1:[function(q,ht,W){(function(P){var V,z,k=P.MutationObserver||P.WebKitMutationObserver;if(k){var Z=0,vt=new k(L),Ot=P.document.createTextNode("");vt.observe(Ot,{characterData:!0}),V=function(){Ot.data=Z=++Z%2}}else if(P.setImmediate||P.MessageChannel===void 0)V="document"in P&&"onreadystatechange"in P.document.createElement("script")?function(){var O=P.document.createElement("script");O.onreadystatechange=function(){L(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},P.document.documentElement.appendChild(O)}:function(){setTimeout(L,0)};else{var Nt=new P.MessageChannel;Nt.port1.onmessage=L,V=function(){Nt.port2.postMessage(0)}}var E=[];function L(){var O,Y;z=!0;for(var C=E.length;C;){for(Y=E,E=[],O=-1;++O<C;)Y[O]();C=E.length}z=!1}ht.exports=function(O){E.push(O)!==1||z||V()}}).call(this,b!==void 0?b:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(q,ht,W){var P=q(1);function V(){}var z={},k=["REJECTED"],Z=["FULFILLED"],vt=["PENDING"];function Ot(C){if(typeof C!="function")throw new TypeError("resolver must be a function");this.state=vt,this.queue=[],this.outcome=void 0,C!==V&&O(this,C)}function Nt(C,j,X){this.promise=C,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof X=="function"&&(this.onRejected=X,this.callRejected=this.otherCallRejected)}function E(C,j,X){P(function(){var K;try{K=j(X)}catch(qt){return z.reject(C,qt)}K===C?z.reject(C,new TypeError("Cannot resolve promise with itself")):z.resolve(C,K)})}function L(C){var j=C&&C.then;if(C&&(typeof C=="object"||typeof C=="function")&&typeof j=="function")return function(){j.apply(C,arguments)}}function O(C,j){var X=!1;function K(Ct){X||(X=!0,z.reject(C,Ct))}function qt(Ct){X||(X=!0,z.resolve(C,Ct))}var ge=Y(function(){j(qt,K)});ge.status==="error"&&K(ge.value)}function Y(C,j){var X={};try{X.value=C(j),X.status="success"}catch(K){X.status="error",X.value=K}return X}ht.exports=Ot,Ot.prototype.catch=function(C){return this.then(null,C)},Ot.prototype.then=function(C,j){if(typeof C!="function"&&this.state===Z||typeof j!="function"&&this.state===k)return this;var X=new this.constructor(V);return this.state!==vt?E(X,this.state===Z?C:j,this.outcome):this.queue.push(new Nt(X,C,j)),X},Nt.prototype.callFulfilled=function(C){z.resolve(this.promise,C)},Nt.prototype.otherCallFulfilled=function(C){E(this.promise,this.onFulfilled,C)},Nt.prototype.callRejected=function(C){z.reject(this.promise,C)},Nt.prototype.otherCallRejected=function(C){E(this.promise,this.onRejected,C)},z.resolve=function(C,j){var X=Y(L,j);if(X.status==="error")return z.reject(C,X.value);var K=X.value;if(K)O(C,K);else{C.state=Z,C.outcome=j;for(var qt=-1,ge=C.queue.length;++qt<ge;)C.queue[qt].callFulfilled(j)}return C},z.reject=function(C,j){C.state=k,C.outcome=j;for(var X=-1,K=C.queue.length;++X<K;)C.queue[X].callRejected(j);return C},Ot.resolve=function(C){return C instanceof this?C:z.resolve(new this(V),C)},Ot.reject=function(C){var j=new this(V);return z.reject(j,C)},Ot.all=function(C){var j=this;if(Object.prototype.toString.call(C)!=="[object Array]")return this.reject(new TypeError("must be an array"));var X=C.length,K=!1;if(!X)return this.resolve([]);for(var qt=new Array(X),ge=0,Ct=-1,ot=new this(V);++Ct<X;)yt(C[Ct],Ct);return ot;function yt(Pt,H){j.resolve(Pt).then(function(ft){qt[H]=ft,++ge!==X||K||(K=!0,z.resolve(ot,qt))},function(ft){K||(K=!0,z.reject(ot,ft))})}},Ot.race=function(C){var j=this;if(Object.prototype.toString.call(C)!=="[object Array]")return this.reject(new TypeError("must be an array"));var X=C.length,K=!1;if(!X)return this.resolve([]);for(var qt,ge=-1,Ct=new this(V);++ge<X;)qt=C[ge],j.resolve(qt).then(function(ot){K||(K=!0,z.resolve(Ct,ot))},function(ot){K||(K=!0,z.reject(Ct,ot))});return Ct}},{1:1}],3:[function(q,ht,W){(function(P){typeof P.Promise!="function"&&(P.Promise=q(2))}).call(this,b!==void 0?b:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(q,ht,W){var P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},V=function(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}();function z(J,st){J=J||[],st=st||{};try{return new Blob(J,st)}catch(bt){if(bt.name!=="TypeError")throw bt;for(var at=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),Tt=0;Tt<J.length;Tt+=1)at.append(J[Tt]);return at.getBlob(st.type)}}typeof Promise=="undefined"&&q(3);var k=Promise;function Z(J,st){st&&J.then(function(at){st(null,at)},function(at){st(at)})}function vt(J,st,at){typeof st=="function"&&J.then(st),typeof at=="function"&&J.catch(at)}function Ot(J){return typeof J!="string"&&(console.warn(J+" used as a key, but it is not a string."),J=String(J)),J}function Nt(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var E=void 0,L={},O=Object.prototype.toString;function Y(J){return typeof E=="boolean"?k.resolve(E):function(st){return new k(function(at){var Tt=st.transaction("local-forage-detect-blob-support","readwrite"),bt=z([""]);Tt.objectStore("local-forage-detect-blob-support").put(bt,"key"),Tt.onabort=function(wt){wt.preventDefault(),wt.stopPropagation(),at(!1)},Tt.oncomplete=function(){var wt=navigator.userAgent.match(/Chrome\/(\d+)/),zt=navigator.userAgent.match(/Edge\//);at(zt||!wt||parseInt(wt[1],10)>=43)}}).catch(function(){return!1})}(J).then(function(st){return E=st})}function C(J){var st=L[J.name],at={};at.promise=new k(function(Tt,bt){at.resolve=Tt,at.reject=bt}),st.deferredOperations.push(at),st.dbReady?st.dbReady=st.dbReady.then(function(){return at.promise}):st.dbReady=at.promise}function j(J){var st=L[J.name].deferredOperations.pop();if(st)return st.resolve(),st.promise}function X(J,st){var at=L[J.name].deferredOperations.pop();if(at)return at.reject(st),at.promise}function K(J,st){return new k(function(at,Tt){if(L[J.name]=L[J.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},J.db){if(!st)return at(J.db);C(J),J.db.close()}var bt=[J.name];st&&bt.push(J.version);var wt=V.open.apply(V,bt);st&&(wt.onupgradeneeded=function(zt){var ne=wt.result;try{ne.createObjectStore(J.storeName),zt.oldVersion<=1&&ne.createObjectStore("local-forage-detect-blob-support")}catch(se){if(se.name!=="ConstraintError")throw se;console.warn('The database "'+J.name+'" has been upgraded from version '+zt.oldVersion+" to version "+zt.newVersion+', but the storage "'+J.storeName+'" already exists.')}}),wt.onerror=function(zt){zt.preventDefault(),Tt(wt.error)},wt.onsuccess=function(){var zt=wt.result;zt.onversionchange=function(ne){ne.target.close()},at(zt),j(J)}})}function qt(J){return K(J,!1)}function ge(J){return K(J,!0)}function Ct(J,st){if(!J.db)return!0;var at=!J.db.objectStoreNames.contains(J.storeName),Tt=J.version<J.db.version,bt=J.version>J.db.version;if(Tt&&(J.version!==st&&console.warn('The database "'+J.name+`" can't be downgraded from version `+J.db.version+" to version "+J.version+"."),J.version=J.db.version),bt||at){if(at){var wt=J.db.version+1;wt>J.version&&(J.version=wt)}return!0}return!1}function ot(J){return z([function(st){for(var at=st.length,Tt=new ArrayBuffer(at),bt=new Uint8Array(Tt),wt=0;wt<at;wt++)bt[wt]=st.charCodeAt(wt);return Tt}(atob(J.data))],{type:J.type})}function yt(J){return J&&J.__local_forage_encoded_blob}function Pt(J){var st=this,at=st._initReady().then(function(){var Tt=L[st._dbInfo.name];if(Tt&&Tt.dbReady)return Tt.dbReady});return vt(at,J,J),at}function H(J,st,at,Tt){Tt===void 0&&(Tt=1);try{var bt=J.db.transaction(J.storeName,st);at(null,bt)}catch(wt){if(Tt>0&&(!J.db||wt.name==="InvalidStateError"||wt.name==="NotFoundError"))return k.resolve().then(function(){if(!J.db||wt.name==="NotFoundError"&&!J.db.objectStoreNames.contains(J.storeName)&&J.version<=J.db.version)return J.db&&(J.version=J.db.version+1),ge(J)}).then(function(){return function(zt){C(zt);for(var ne=L[zt.name],se=ne.forages,ae=0;ae<se.length;ae++){var xe=se[ae];xe._dbInfo.db&&(xe._dbInfo.db.close(),xe._dbInfo.db=null)}return zt.db=null,qt(zt).then(function(Ie){return zt.db=Ie,Ct(zt)?ge(zt):Ie}).then(function(Ie){zt.db=ne.db=Ie;for(var Ge=0;Ge<se.length;Ge++)se[Ge]._dbInfo.db=Ie}).catch(function(Ie){throw X(zt,Ie),Ie})}(J).then(function(){H(J,st,at,Tt-1)})}).catch(at);at(wt)}}var ft={_driver:"asyncStorage",_initStorage:function(J){var st=this,at={db:null};if(J)for(var Tt in J)at[Tt]=J[Tt];var bt=L[at.name];bt||(bt={forages:[],db:null,dbReady:null,deferredOperations:[]},L[at.name]=bt),bt.forages.push(st),st._initReady||(st._initReady=st.ready,st.ready=Pt);var wt=[];function zt(){return k.resolve()}for(var ne=0;ne<bt.forages.length;ne++){var se=bt.forages[ne];se!==st&&wt.push(se._initReady().catch(zt))}var ae=bt.forages.slice(0);return k.all(wt).then(function(){return at.db=bt.db,qt(at)}).then(function(xe){return at.db=xe,Ct(at,st._defaultConfig.version)?ge(at):xe}).then(function(xe){at.db=bt.db=xe,st._dbInfo=at;for(var Ie=0;Ie<ae.length;Ie++){var Ge=ae[Ie];Ge!==st&&(Ge._dbInfo.db=at.db,Ge._dbInfo.version=at.version)}})},_support:function(){try{if(!V||!V.open)return!1;var J=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),st=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!J||st)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}(),iterate:function(J,st){var at=this,Tt=new k(function(bt,wt){at.ready().then(function(){H(at._dbInfo,"readonly",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName).openCursor(),ae=1;se.onsuccess=function(){var xe=se.result;if(xe){var Ie=xe.value;yt(Ie)&&(Ie=ot(Ie));var Ge=J(Ie,xe.key,ae++);Ge!==void 0?bt(Ge):xe.continue()}else bt()},se.onerror=function(){wt(se.error)}}catch(xe){wt(xe)}})}).catch(wt)});return Z(Tt,st),Tt},getItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){H(at._dbInfo,"readonly",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName).get(J);se.onsuccess=function(){var ae=se.result;ae===void 0&&(ae=null),yt(ae)&&(ae=ot(ae)),bt(ae)},se.onerror=function(){wt(se.error)}}catch(ae){wt(ae)}})}).catch(wt)});return Z(Tt,st),Tt},setItem:function(J,st,at){var Tt=this;J=Ot(J);var bt=new k(function(wt,zt){var ne;Tt.ready().then(function(){return ne=Tt._dbInfo,O.call(st)==="[object Blob]"?Y(ne.db).then(function(se){return se?st:(ae=st,new k(function(xe,Ie){var Ge=new FileReader;Ge.onerror=Ie,Ge.onloadend=function(qe){var pi=btoa(qe.target.result||"");xe({__local_forage_encoded_blob:!0,data:pi,type:ae.type})},Ge.readAsBinaryString(ae)}));var ae}):st}).then(function(se){H(Tt._dbInfo,"readwrite",function(ae,xe){if(ae)return zt(ae);try{var Ie=xe.objectStore(Tt._dbInfo.storeName);se===null&&(se=void 0);var Ge=Ie.put(se,J);xe.oncomplete=function(){se===void 0&&(se=null),wt(se)},xe.onabort=xe.onerror=function(){var qe=Ge.error?Ge.error:Ge.transaction.error;zt(qe)}}catch(qe){zt(qe)}})}).catch(zt)});return Z(bt,at),bt},removeItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){H(at._dbInfo,"readwrite",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName).delete(J);ne.oncomplete=function(){bt()},ne.onerror=function(){wt(se.error)},ne.onabort=function(){var ae=se.error?se.error:se.transaction.error;wt(ae)}}catch(ae){wt(ae)}})}).catch(wt)});return Z(Tt,st),Tt},clear:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){H(st._dbInfo,"readwrite",function(wt,zt){if(wt)return bt(wt);try{var ne=zt.objectStore(st._dbInfo.storeName).clear();zt.oncomplete=function(){Tt()},zt.onabort=zt.onerror=function(){var se=ne.error?ne.error:ne.transaction.error;bt(se)}}catch(se){bt(se)}})}).catch(bt)});return Z(at,J),at},length:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){H(st._dbInfo,"readonly",function(wt,zt){if(wt)return bt(wt);try{var ne=zt.objectStore(st._dbInfo.storeName).count();ne.onsuccess=function(){Tt(ne.result)},ne.onerror=function(){bt(ne.error)}}catch(se){bt(se)}})}).catch(bt)});return Z(at,J),at},key:function(J,st){var at=this,Tt=new k(function(bt,wt){J<0?bt(null):at.ready().then(function(){H(at._dbInfo,"readonly",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName),ae=!1,xe=se.openKeyCursor();xe.onsuccess=function(){var Ie=xe.result;Ie?J===0||ae?bt(Ie.key):(ae=!0,Ie.advance(J)):bt(null)},xe.onerror=function(){wt(xe.error)}}catch(Ie){wt(Ie)}})}).catch(wt)});return Z(Tt,st),Tt},keys:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){H(st._dbInfo,"readonly",function(wt,zt){if(wt)return bt(wt);try{var ne=zt.objectStore(st._dbInfo.storeName).openKeyCursor(),se=[];ne.onsuccess=function(){var ae=ne.result;ae?(se.push(ae.key),ae.continue()):Tt(se)},ne.onerror=function(){bt(ne.error)}}catch(ae){bt(ae)}})}).catch(bt)});return Z(at,J),at},dropInstance:function(J,st){st=Nt.apply(this,arguments);var at=this.config();(J=typeof J!="function"&&J||{}).name||(J.name=J.name||at.name,J.storeName=J.storeName||at.storeName);var Tt,bt=this;if(J.name){var wt=J.name===at.name&&bt._dbInfo.db,zt=wt?k.resolve(bt._dbInfo.db):qt(J).then(function(ne){var se=L[J.name],ae=se.forages;se.db=ne;for(var xe=0;xe<ae.length;xe++)ae[xe]._dbInfo.db=ne;return ne});Tt=J.storeName?zt.then(function(ne){if(ne.objectStoreNames.contains(J.storeName)){var se=ne.version+1;C(J);var ae=L[J.name],xe=ae.forages;ne.close();for(var Ie=0;Ie<xe.length;Ie++){var Ge=xe[Ie];Ge._dbInfo.db=null,Ge._dbInfo.version=se}return new k(function(qe,pi){var fi=V.open(J.name,se);fi.onerror=function(Tr){fi.result.close(),pi(Tr)},fi.onupgradeneeded=function(){fi.result.deleteObjectStore(J.storeName)},fi.onsuccess=function(){var Tr=fi.result;Tr.close(),qe(Tr)}}).then(function(qe){ae.db=qe;for(var pi=0;pi<xe.length;pi++){var fi=xe[pi];fi._dbInfo.db=qe,j(fi._dbInfo)}}).catch(function(qe){throw(X(J,qe)||k.resolve()).catch(function(){}),qe})}}):zt.then(function(ne){C(J);var se=L[J.name],ae=se.forages;ne.close();for(var xe=0;xe<ae.length;xe++)ae[xe]._dbInfo.db=null;return new k(function(Ie,Ge){var qe=V.deleteDatabase(J.name);qe.onerror=function(){var pi=qe.result;pi&&pi.close(),Ge(qe.error)},qe.onblocked=function(){console.warn('dropInstance blocked for database "'+J.name+'" until all open connections are closed')},qe.onsuccess=function(){var pi=qe.result;pi&&pi.close(),Ie(pi)}}).then(function(Ie){se.db=Ie;for(var Ge=0;Ge<ae.length;Ge++)j(ae[Ge]._dbInfo)}).catch(function(Ie){throw(X(J,Ie)||k.resolve()).catch(function(){}),Ie})})}else Tt=k.reject("Invalid arguments");return Z(Tt,st),Tt}},Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At=/^~~local_forage_type~([^~]+)~/,Rt=9,Wt=Rt+4,$t=Object.prototype.toString;function ye(J){var st,at,Tt,bt,wt,zt=.75*J.length,ne=J.length,se=0;J[J.length-1]==="="&&(zt--,J[J.length-2]==="="&&zt--);var ae=new ArrayBuffer(zt),xe=new Uint8Array(ae);for(st=0;st<ne;st+=4)at=Et.indexOf(J[st]),Tt=Et.indexOf(J[st+1]),bt=Et.indexOf(J[st+2]),wt=Et.indexOf(J[st+3]),xe[se++]=at<<2|Tt>>4,xe[se++]=(15&Tt)<<4|bt>>2,xe[se++]=(3&bt)<<6|63&wt;return ae}function me(J){var st,at=new Uint8Array(J),Tt="";for(st=0;st<at.length;st+=3)Tt+=Et[at[st]>>2],Tt+=Et[(3&at[st])<<4|at[st+1]>>4],Tt+=Et[(15&at[st+1])<<2|at[st+2]>>6],Tt+=Et[63&at[st+2]];return at.length%3==2?Tt=Tt.substring(0,Tt.length-1)+"=":at.length%3==1&&(Tt=Tt.substring(0,Tt.length-2)+"=="),Tt}var ui={serialize:function(J,st){var at="";if(J&&(at=$t.call(J)),J&&(at==="[object ArrayBuffer]"||J.buffer&&$t.call(J.buffer)==="[object ArrayBuffer]")){var Tt,bt="__lfsc__:";J instanceof ArrayBuffer?(Tt=J,bt+="arbf"):(Tt=J.buffer,at==="[object Int8Array]"?bt+="si08":at==="[object Uint8Array]"?bt+="ui08":at==="[object Uint8ClampedArray]"?bt+="uic8":at==="[object Int16Array]"?bt+="si16":at==="[object Uint16Array]"?bt+="ur16":at==="[object Int32Array]"?bt+="si32":at==="[object Uint32Array]"?bt+="ui32":at==="[object Float32Array]"?bt+="fl32":at==="[object Float64Array]"?bt+="fl64":st(new Error("Failed to get type for BinaryArray"))),st(bt+me(Tt))}else if(at==="[object Blob]"){var wt=new FileReader;wt.onload=function(){var zt="~~local_forage_type~"+J.type+"~"+me(this.result);st("__lfsc__:blob"+zt)},wt.readAsArrayBuffer(J)}else try{st(JSON.stringify(J))}catch(zt){console.error("Couldn't convert value into a JSON string: ",J),st(null,zt)}},deserialize:function(J){if(J.substring(0,Rt)!=="__lfsc__:")return JSON.parse(J);var st,at=J.substring(Wt),Tt=J.substring(Rt,Wt);if(Tt==="blob"&&At.test(at)){var bt=at.match(At);st=bt[1],at=at.substring(bt[0].length)}var wt=ye(at);switch(Tt){case"arbf":return wt;case"blob":return z([wt],{type:st});case"si08":return new Int8Array(wt);case"ui08":return new Uint8Array(wt);case"uic8":return new Uint8ClampedArray(wt);case"si16":return new Int16Array(wt);case"ur16":return new Uint16Array(wt);case"si32":return new Int32Array(wt);case"ui32":return new Uint32Array(wt);case"fl32":return new Float32Array(wt);case"fl64":return new Float64Array(wt);default:throw new Error("Unkown type: "+Tt)}},stringToBuffer:ye,bufferToString:me};function be(J,st,at,Tt){J.executeSql("CREATE TABLE IF NOT EXISTS "+st.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],at,Tt)}function ei(J,st,at,Tt,bt,wt){J.executeSql(at,Tt,bt,function(zt,ne){ne.code===ne.SYNTAX_ERR?zt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[st.storeName],function(se,ae){ae.rows.length?wt(se,ne):be(se,st,function(){se.executeSql(at,Tt,bt,wt)},wt)},wt):wt(zt,ne)},wt)}function Ze(J,st,at,Tt){var bt=this;J=Ot(J);var wt=new k(function(zt,ne){bt.ready().then(function(){st===void 0&&(st=null);var se=st,ae=bt._dbInfo;ae.serializer.serialize(st,function(xe,Ie){Ie?ne(Ie):ae.db.transaction(function(Ge){ei(Ge,ae,"INSERT OR REPLACE INTO "+ae.storeName+" (key, value) VALUES (?, ?)",[J,xe],function(){zt(se)},function(qe,pi){ne(pi)})},function(Ge){if(Ge.code===Ge.QUOTA_ERR){if(Tt>0)return void zt(Ze.apply(bt,[J,se,at,Tt-1]));ne(Ge)}})})}).catch(ne)});return Z(wt,at),wt}function ri(J){return new k(function(st,at){J.transaction(function(Tt){Tt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(bt,wt){for(var zt=[],ne=0;ne<wt.rows.length;ne++)zt.push(wt.rows.item(ne).name);st({db:J,storeNames:zt})},function(bt,wt){at(wt)})},function(Tt){at(Tt)})})}var De={_driver:"webSQLStorage",_initStorage:function(J){var st=this,at={db:null};if(J)for(var Tt in J)at[Tt]=typeof J[Tt]!="string"?J[Tt].toString():J[Tt];var bt=new k(function(wt,zt){try{at.db=openDatabase(at.name,String(at.version),at.description,at.size)}catch(ne){return zt(ne)}at.db.transaction(function(ne){be(ne,at,function(){st._dbInfo=at,wt()},function(se,ae){zt(ae)})},zt)});return at.serializer=ui,bt},_support:typeof openDatabase=="function",iterate:function(J,st){var at=this,Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"SELECT * FROM "+zt.storeName,[],function(se,ae){for(var xe=ae.rows,Ie=xe.length,Ge=0;Ge<Ie;Ge++){var qe=xe.item(Ge),pi=qe.value;if(pi&&(pi=zt.serializer.deserialize(pi)),(pi=J(pi,qe.key,Ge+1))!==void 0)return void bt(pi)}bt()},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},getItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"SELECT * FROM "+zt.storeName+" WHERE key = ? LIMIT 1",[J],function(se,ae){var xe=ae.rows.length?ae.rows.item(0).value:null;xe&&(xe=zt.serializer.deserialize(xe)),bt(xe)},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},setItem:function(J,st,at){return Ze.apply(this,[J,st,at,1])},removeItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"DELETE FROM "+zt.storeName+" WHERE key = ?",[J],function(){bt()},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},clear:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){var wt=st._dbInfo;wt.db.transaction(function(zt){ei(zt,wt,"DELETE FROM "+wt.storeName,[],function(){Tt()},function(ne,se){bt(se)})})}).catch(bt)});return Z(at,J),at},length:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){var wt=st._dbInfo;wt.db.transaction(function(zt){ei(zt,wt,"SELECT COUNT(key) as c FROM "+wt.storeName,[],function(ne,se){var ae=se.rows.item(0).c;Tt(ae)},function(ne,se){bt(se)})})}).catch(bt)});return Z(at,J),at},key:function(J,st){var at=this,Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"SELECT key FROM "+zt.storeName+" WHERE id = ? LIMIT 1",[J+1],function(se,ae){var xe=ae.rows.length?ae.rows.item(0).key:null;bt(xe)},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},keys:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){var wt=st._dbInfo;wt.db.transaction(function(zt){ei(zt,wt,"SELECT key FROM "+wt.storeName,[],function(ne,se){for(var ae=[],xe=0;xe<se.rows.length;xe++)ae.push(se.rows.item(xe).key);Tt(ae)},function(ne,se){bt(se)})})}).catch(bt)});return Z(at,J),at},dropInstance:function(J,st){st=Nt.apply(this,arguments);var at=this.config();(J=typeof J!="function"&&J||{}).name||(J.name=J.name||at.name,J.storeName=J.storeName||at.storeName);var Tt,bt=this;return Z(Tt=J.name?new k(function(wt){var zt;zt=J.name===at.name?bt._dbInfo.db:openDatabase(J.name,"","",0),J.storeName?wt({db:zt,storeNames:[J.storeName]}):wt(ri(zt))}).then(function(wt){return new k(function(zt,ne){wt.db.transaction(function(se){function ae(qe){return new k(function(pi,fi){se.executeSql("DROP TABLE IF EXISTS "+qe,[],function(){pi()},function(Tr,Do){fi(Do)})})}for(var xe=[],Ie=0,Ge=wt.storeNames.length;Ie<Ge;Ie++)xe.push(ae(wt.storeNames[Ie]));k.all(xe).then(function(){zt()}).catch(function(qe){ne(qe)})},function(se){ne(se)})})}):k.reject("Invalid arguments"),st),Tt}};function ki(J,st){var at=J.name+"/";return J.storeName!==st.storeName&&(at+=J.storeName+"/"),at}function Fi(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch{return!0}}()||localStorage.length>0}var Pi={_driver:"localStorageWrapper",_initStorage:function(J){var st={};if(J)for(var at in J)st[at]=J[at];return st.keyPrefix=ki(J,this._defaultConfig),Fi()?(this._dbInfo=st,st.serializer=ui,k.resolve()):k.reject()},_support:function(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(J,st){var at=this,Tt=at.ready().then(function(){for(var bt=at._dbInfo,wt=bt.keyPrefix,zt=wt.length,ne=localStorage.length,se=1,ae=0;ae<ne;ae++){var xe=localStorage.key(ae);if(xe.indexOf(wt)===0){var Ie=localStorage.getItem(xe);if(Ie&&(Ie=bt.serializer.deserialize(Ie)),(Ie=J(Ie,xe.substring(zt),se++))!==void 0)return Ie}}});return Z(Tt,st),Tt},getItem:function(J,st){var at=this;J=Ot(J);var Tt=at.ready().then(function(){var bt=at._dbInfo,wt=localStorage.getItem(bt.keyPrefix+J);return wt&&(wt=bt.serializer.deserialize(wt)),wt});return Z(Tt,st),Tt},setItem:function(J,st,at){var Tt=this;J=Ot(J);var bt=Tt.ready().then(function(){st===void 0&&(st=null);var wt=st;return new k(function(zt,ne){var se=Tt._dbInfo;se.serializer.serialize(st,function(ae,xe){if(xe)ne(xe);else try{localStorage.setItem(se.keyPrefix+J,ae),zt(wt)}catch(Ie){Ie.name!=="QuotaExceededError"&&Ie.name!=="NS_ERROR_DOM_QUOTA_REACHED"||ne(Ie),ne(Ie)}})})});return Z(bt,at),bt},removeItem:function(J,st){var at=this;J=Ot(J);var Tt=at.ready().then(function(){var bt=at._dbInfo;localStorage.removeItem(bt.keyPrefix+J)});return Z(Tt,st),Tt},clear:function(J){var st=this,at=st.ready().then(function(){for(var Tt=st._dbInfo.keyPrefix,bt=localStorage.length-1;bt>=0;bt--){var wt=localStorage.key(bt);wt.indexOf(Tt)===0&&localStorage.removeItem(wt)}});return Z(at,J),at},length:function(J){var st=this.keys().then(function(at){return at.length});return Z(st,J),st},key:function(J,st){var at=this,Tt=at.ready().then(function(){var bt,wt=at._dbInfo;try{bt=localStorage.key(J)}catch{bt=null}return bt&&(bt=bt.substring(wt.keyPrefix.length)),bt});return Z(Tt,st),Tt},keys:function(J){var st=this,at=st.ready().then(function(){for(var Tt=st._dbInfo,bt=localStorage.length,wt=[],zt=0;zt<bt;zt++){var ne=localStorage.key(zt);ne.indexOf(Tt.keyPrefix)===0&&wt.push(ne.substring(Tt.keyPrefix.length))}return wt});return Z(at,J),at},dropInstance:function(J,st){if(st=Nt.apply(this,arguments),!(J=typeof J!="function"&&J||{}).name){var at=this.config();J.name=J.name||at.name,J.storeName=J.storeName||at.storeName}var Tt,bt=this;return Z(Tt=J.name?new k(function(wt){J.storeName?wt(ki(J,bt._defaultConfig)):wt(J.name+"/")}).then(function(wt){for(var zt=localStorage.length-1;zt>=0;zt--){var ne=localStorage.key(zt);ne.indexOf(wt)===0&&localStorage.removeItem(ne)}}):k.reject("Invalid arguments"),st),Tt}},Qi=function(J,st){for(var at,Tt,bt=J.length,wt=0;wt<bt;){if((at=J[wt])===(Tt=st)||typeof at=="number"&&typeof Tt=="number"&&isNaN(at)&&isNaN(Tt))return!0;wt++}return!1},Li=Array.isArray||function(J){return Object.prototype.toString.call(J)==="[object Array]"},Gi={},Nn={},tn={INDEXEDDB:ft,WEBSQL:De,LOCALSTORAGE:Pi},Zn=[tn.INDEXEDDB._driver,tn.WEBSQL._driver,tn.LOCALSTORAGE._driver],Kn=["dropInstance"],ka=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Kn),Ws={description:"",driver:Zn.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function qu(J,st){J[st]=function(){var at=arguments;return J.ready().then(function(){return J[st].apply(J,at)})}}function Ua(){for(var J=1;J<arguments.length;J++){var st=arguments[J];if(st)for(var at in st)st.hasOwnProperty(at)&&(Li(st[at])?arguments[0][at]=st[at].slice():arguments[0][at]=st[at])}return arguments[0]}var to=new(function(){function J(st){for(var at in function(wt,zt){if(!(wt instanceof zt))throw new TypeError("Cannot call a class as a function")}(this,J),tn)if(tn.hasOwnProperty(at)){var Tt=tn[at],bt=Tt._driver;this[at]=bt,Gi[bt]||this.defineDriver(Tt)}this._defaultConfig=Ua({},Ws),this._config=Ua({},this._defaultConfig,st),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return J.prototype.config=function(st){if((st===void 0?"undefined":P(st))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var at in st){if(at==="storeName"&&(st[at]=st[at].replace(/\W/g,"_")),at==="version"&&typeof st[at]!="number")return new Error("Database version must be a number.");this._config[at]=st[at]}return!("driver"in st)||!st.driver||this.setDriver(this._config.driver)}return typeof st=="string"?this._config[st]:this._config},J.prototype.defineDriver=function(st,at,Tt){var bt=new k(function(wt,zt){try{var ne=st._driver,se=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!st._driver)return void zt(se);for(var ae=ka.concat("_initStorage"),xe=0,Ie=ae.length;xe<Ie;xe++){var Ge=ae[xe];if((!Qi(Kn,Ge)||st[Ge])&&typeof st[Ge]!="function")return void zt(se)}(function(){for(var pi=function(Xs){return function(){var Nl=new Error("Method "+Xs+" is not implemented by the current driver"),Yi=k.reject(Nl);return Z(Yi,arguments[arguments.length-1]),Yi}},fi=0,Tr=Kn.length;fi<Tr;fi++){var Do=Kn[fi];st[Do]||(st[Do]=pi(Do))}})();var qe=function(pi){Gi[ne]&&console.info("Redefining LocalForage driver: "+ne),Gi[ne]=st,Nn[ne]=pi,wt()};"_support"in st?st._support&&typeof st._support=="function"?st._support().then(qe,zt):qe(!!st._support):qe(!0)}catch(pi){zt(pi)}});return vt(bt,at,Tt),bt},J.prototype.driver=function(){return this._driver||null},J.prototype.getDriver=function(st,at,Tt){var bt=Gi[st]?k.resolve(Gi[st]):k.reject(new Error("Driver not found."));return vt(bt,at,Tt),bt},J.prototype.getSerializer=function(st){var at=k.resolve(ui);return vt(at,st),at},J.prototype.ready=function(st){var at=this,Tt=at._driverSet.then(function(){return at._ready===null&&(at._ready=at._initDriver()),at._ready});return vt(Tt,st,st),Tt},J.prototype.setDriver=function(st,at,Tt){var bt=this;Li(st)||(st=[st]);var wt=this._getSupportedDrivers(st);function zt(){bt._config.driver=bt.driver()}function ne(ae){return bt._extend(ae),zt(),bt._ready=bt._initStorage(bt._config),bt._ready}var se=this._driverSet!==null?this._driverSet.catch(function(){return k.resolve()}):k.resolve();return this._driverSet=se.then(function(){var ae=wt[0];return bt._dbInfo=null,bt._ready=null,bt.getDriver(ae).then(function(xe){bt._driver=xe._driver,zt(),bt._wrapLibraryMethodsWithReady(),bt._initDriver=function(Ie){return function(){var Ge=0;return function qe(){for(;Ge<Ie.length;){var pi=Ie[Ge];return Ge++,bt._dbInfo=null,bt._ready=null,bt.getDriver(pi).then(ne).catch(qe)}zt();var fi=new Error("No available storage method found.");return bt._driverSet=k.reject(fi),bt._driverSet}()}}(wt)})}).catch(function(){zt();var ae=new Error("No available storage method found.");return bt._driverSet=k.reject(ae),bt._driverSet}),vt(this._driverSet,at,Tt),this._driverSet},J.prototype.supports=function(st){return!!Nn[st]},J.prototype._extend=function(st){Ua(this,st)},J.prototype._getSupportedDrivers=function(st){for(var at=[],Tt=0,bt=st.length;Tt<bt;Tt++){var wt=st[Tt];this.supports(wt)&&at.push(wt)}return at},J.prototype._wrapLibraryMethodsWithReady=function(){for(var st=0,at=ka.length;st<at;st++)qu(this,ka[st])},J.prototype.createInstance=function(st){return new J(st)},J}());ht.exports=to},{3:3}]},{},[4])(4)}).call(this,v(3))},function(T,M,v){var b=v(57),q=v(58);function ht(){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}M.parse=C,M.resolve=function(j,X){return C(j,!1,!0).resolve(X)},M.resolveObject=function(j,X){return j?C(j,!1,!0).resolveObject(X):X},M.format=function(j){return q.isString(j)&&(j=C(j)),j instanceof ht?j.format():ht.prototype.format.call(j)},M.Url=ht;var W=/^([a-z0-9.+-]+:)/i,P=/:[0-9]*$/,V=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
28
|
-
`," "]),k=["'"].concat(z),Z=["%","/","?",";","#"].concat(k),vt=["/","?","#"],Ot=/^[+a-z0-9A-Z_-]{0,63}$/,Nt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},L={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Y=v(59);function C(j,X,K){if(j&&q.isObject(j)&&j instanceof ht)return j;var qt=new ht;return qt.parse(j,X,K),qt}ht.prototype.parse=function(j,X,K){if(!q.isString(j))throw new TypeError("Parameter 'url' must be a string, not "+typeof j);var qt=j.indexOf("?"),ge=qt!==-1&&qt<j.indexOf("#")?"?":"#",Ct=j.split(ge);Ct[0]=Ct[0].replace(/\\/g,"/");var ot=j=Ct.join(ge);if(ot=ot.trim(),!K&&j.split("#").length===1){var yt=V.exec(ot);if(yt)return this.path=ot,this.href=ot,this.pathname=yt[1],yt[2]?(this.search=yt[2],this.query=X?Y.parse(this.search.substr(1)):this.search.substr(1)):X&&(this.search="",this.query={}),this}var Pt=W.exec(ot);if(Pt){var H=(Pt=Pt[0]).toLowerCase();this.protocol=H,ot=ot.substr(Pt.length)}if(K||Pt||ot.match(/^\/\/[^@\/]+@[^@\/]+/)){var ft=ot.substr(0,2)==="//";!ft||Pt&&L[Pt]||(ot=ot.substr(2),this.slashes=!0)}if(!L[Pt]&&(ft||Pt&&!O[Pt])){for(var Et,At,Rt=-1,Wt=0;Wt<vt.length;Wt++)($t=ot.indexOf(vt[Wt]))!==-1&&(Rt===-1||$t<Rt)&&(Rt=$t);for((At=Rt===-1?ot.lastIndexOf("@"):ot.lastIndexOf("@",Rt))!==-1&&(Et=ot.slice(0,At),ot=ot.slice(At+1),this.auth=decodeURIComponent(Et)),Rt=-1,Wt=0;Wt<Z.length;Wt++){var $t;($t=ot.indexOf(Z[Wt]))!==-1&&(Rt===-1||$t<Rt)&&(Rt=$t)}Rt===-1&&(Rt=ot.length),this.host=ot.slice(0,Rt),ot=ot.slice(Rt),this.parseHost(),this.hostname=this.hostname||"";var ye=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ye)for(var me=this.hostname.split(/\./),ui=(Wt=0,me.length);Wt<ui;Wt++){var be=me[Wt];if(be&&!be.match(Ot)){for(var ei="",Ze=0,ri=be.length;Ze<ri;Ze++)be.charCodeAt(Ze)>127?ei+="x":ei+=be[Ze];if(!ei.match(Ot)){var De=me.slice(0,Wt),ki=me.slice(Wt+1),Fi=be.match(Nt);Fi&&(De.push(Fi[1]),ki.unshift(Fi[2])),ki.length&&(ot="/"+ki.join(".")+ot),this.hostname=De.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ye||(this.hostname=b.toASCII(this.hostname));var Pi=this.port?":"+this.port:"",Qi=this.hostname||"";this.host=Qi+Pi,this.href+=this.host,ye&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ot[0]!=="/"&&(ot="/"+ot))}if(!E[H])for(Wt=0,ui=k.length;Wt<ui;Wt++){var Li=k[Wt];if(ot.indexOf(Li)!==-1){var Gi=encodeURIComponent(Li);Gi===Li&&(Gi=escape(Li)),ot=ot.split(Li).join(Gi)}}var Nn=ot.indexOf("#");Nn!==-1&&(this.hash=ot.substr(Nn),ot=ot.slice(0,Nn));var tn=ot.indexOf("?");if(tn!==-1?(this.search=ot.substr(tn),this.query=ot.substr(tn+1),X&&(this.query=Y.parse(this.query)),ot=ot.slice(0,tn)):X&&(this.search="",this.query={}),ot&&(this.pathname=ot),O[H]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Pi=this.pathname||"";var Zn=this.search||"";this.path=Pi+Zn}return this.href=this.format(),this},ht.prototype.format=function(){var j=this.auth||"";j&&(j=(j=encodeURIComponent(j)).replace(/%3A/i,":"),j+="@");var X=this.protocol||"",K=this.pathname||"",qt=this.hash||"",ge=!1,Ct="";this.host?ge=j+this.host:this.hostname&&(ge=j+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ge+=":"+this.port)),this.query&&q.isObject(this.query)&&Object.keys(this.query).length&&(Ct=Y.stringify(this.query));var ot=this.search||Ct&&"?"+Ct||"";return X&&X.substr(-1)!==":"&&(X+=":"),this.slashes||(!X||O[X])&&ge!==!1?(ge="//"+(ge||""),K&&K.charAt(0)!=="/"&&(K="/"+K)):ge||(ge=""),qt&&qt.charAt(0)!=="#"&&(qt="#"+qt),ot&&ot.charAt(0)!=="?"&&(ot="?"+ot),X+ge+(K=K.replace(/[?#]/g,function(yt){return encodeURIComponent(yt)}))+(ot=ot.replace("#","%23"))+qt},ht.prototype.resolve=function(j){return this.resolveObject(C(j,!1,!0)).format()},ht.prototype.resolveObject=function(j){if(q.isString(j)){var X=new ht;X.parse(j,!1,!0),j=X}for(var K=new ht,qt=Object.keys(this),ge=0;ge<qt.length;ge++){var Ct=qt[ge];K[Ct]=this[Ct]}if(K.hash=j.hash,j.href==="")return K.href=K.format(),K;if(j.slashes&&!j.protocol){for(var ot=Object.keys(j),yt=0;yt<ot.length;yt++){var Pt=ot[yt];Pt!=="protocol"&&(K[Pt]=j[Pt])}return O[K.protocol]&&K.hostname&&!K.pathname&&(K.path=K.pathname="/"),K.href=K.format(),K}if(j.protocol&&j.protocol!==K.protocol){if(!O[j.protocol]){for(var H=Object.keys(j),ft=0;ft<H.length;ft++){var Et=H[ft];K[Et]=j[Et]}return K.href=K.format(),K}if(K.protocol=j.protocol,j.host||L[j.protocol])K.pathname=j.pathname;else{for(var At=(j.pathname||"").split("/");At.length&&!(j.host=At.shift()););j.host||(j.host=""),j.hostname||(j.hostname=""),At[0]!==""&&At.unshift(""),At.length<2&&At.unshift(""),K.pathname=At.join("/")}if(K.search=j.search,K.query=j.query,K.host=j.host||"",K.auth=j.auth,K.hostname=j.hostname||j.host,K.port=j.port,K.pathname||K.search){var Rt=K.pathname||"",Wt=K.search||"";K.path=Rt+Wt}return K.slashes=K.slashes||j.slashes,K.href=K.format(),K}var $t=K.pathname&&K.pathname.charAt(0)==="/",ye=j.host||j.pathname&&j.pathname.charAt(0)==="/",me=ye||$t||K.host&&j.pathname,ui=me,be=K.pathname&&K.pathname.split("/")||[],ei=(At=j.pathname&&j.pathname.split("/")||[],K.protocol&&!O[K.protocol]);if(ei&&(K.hostname="",K.port=null,K.host&&(be[0]===""?be[0]=K.host:be.unshift(K.host)),K.host="",j.protocol&&(j.hostname=null,j.port=null,j.host&&(At[0]===""?At[0]=j.host:At.unshift(j.host)),j.host=null),me=me&&(At[0]===""||be[0]==="")),ye)K.host=j.host||j.host===""?j.host:K.host,K.hostname=j.hostname||j.hostname===""?j.hostname:K.hostname,K.search=j.search,K.query=j.query,be=At;else if(At.length)be||(be=[]),be.pop(),be=be.concat(At),K.search=j.search,K.query=j.query;else if(!q.isNullOrUndefined(j.search))return ei&&(K.hostname=K.host=be.shift(),(Fi=!!(K.host&&K.host.indexOf("@")>0)&&K.host.split("@"))&&(K.auth=Fi.shift(),K.host=K.hostname=Fi.shift())),K.search=j.search,K.query=j.query,q.isNull(K.pathname)&&q.isNull(K.search)||(K.path=(K.pathname?K.pathname:"")+(K.search?K.search:"")),K.href=K.format(),K;if(!be.length)return K.pathname=null,K.search?K.path="/"+K.search:K.path=null,K.href=K.format(),K;for(var Ze=be.slice(-1)[0],ri=(K.host||j.host||be.length>1)&&(Ze==="."||Ze==="..")||Ze==="",De=0,ki=be.length;ki>=0;ki--)(Ze=be[ki])==="."?be.splice(ki,1):Ze===".."?(be.splice(ki,1),De++):De&&(be.splice(ki,1),De--);if(!me&&!ui)for(;De--;De)be.unshift("..");!me||be[0]===""||be[0]&&be[0].charAt(0)==="/"||be.unshift(""),ri&&be.join("/").substr(-1)!=="/"&&be.push("");var Fi,Pi=be[0]===""||be[0]&&be[0].charAt(0)==="/";return ei&&(K.hostname=K.host=Pi?"":be.length?be.shift():"",(Fi=!!(K.host&&K.host.indexOf("@")>0)&&K.host.split("@"))&&(K.auth=Fi.shift(),K.host=K.hostname=Fi.shift())),(me=me||K.host&&be.length)&&!Pi&&be.unshift(""),be.length?K.pathname=be.join("/"):(K.pathname=null,K.path=null),q.isNull(K.pathname)&&q.isNull(K.search)||(K.path=(K.pathname?K.pathname:"")+(K.search?K.search:"")),K.auth=j.auth||K.auth,K.slashes=K.slashes||j.slashes,K.href=K.format(),K},ht.prototype.parseHost=function(){var j=this.host,X=P.exec(j);X&&((X=X[0])!==":"&&(this.port=X.substr(1)),j=j.substr(0,j.length-X.length)),j&&(this.hostname=j)}},function(T,M,v){var b=v(62);T.exports=function(q,ht){ht=ht||{};var W=new b,P=ht.inPlace||!1,V=q.map(function(k){return P?k:{width:k.width,height:k.height,item:k}});V=V.sort(function(k,Z){return Z.width*Z.height-k.width*k.height}),W.fit(V);var z={width:V.reduce(function(k,Z){return Math.max(k,Z.x+Z.width)},0),height:V.reduce(function(k,Z){return Math.max(k,Z.y+Z.height)},0)};return P||(z.items=V),z}},function(T,M){T.exports=function(v){return v.webpackPolyfill||(v.deprecate=function(){},v.paths=[],v.children||(v.children=[]),Object.defineProperty(v,"loaded",{enumerable:!0,get:function(){return v.l}}),Object.defineProperty(v,"id",{enumerable:!0,get:function(){return v.i}}),v.webpackPolyfill=1),v}},function(T,M,v){var b=Object.prototype.hasOwnProperty,q="~";function ht(){}function W(k,Z,vt){this.fn=k,this.context=Z,this.once=vt||!1}function P(k,Z,vt,Ot,Nt){if(typeof vt!="function")throw new TypeError("The listener must be a function");var E=new W(vt,Ot||k,Nt),L=q?q+Z:Z;return k._events[L]?k._events[L].fn?k._events[L]=[k._events[L],E]:k._events[L].push(E):(k._events[L]=E,k._eventsCount++),k}function V(k,Z){--k._eventsCount==0?k._events=new ht:delete k._events[Z]}function z(){this._events=new ht,this._eventsCount=0}Object.create&&(ht.prototype=Object.create(null),new ht().__proto__||(q=!1)),z.prototype.eventNames=function(){var k,Z,vt=[];if(this._eventsCount===0)return vt;for(Z in k=this._events)b.call(k,Z)&&vt.push(q?Z.slice(1):Z);return Object.getOwnPropertySymbols?vt.concat(Object.getOwnPropertySymbols(k)):vt},z.prototype.listeners=function(k){var Z=q?q+k:k,vt=this._events[Z];if(!vt)return[];if(vt.fn)return[vt.fn];for(var Ot=0,Nt=vt.length,E=new Array(Nt);Ot<Nt;Ot++)E[Ot]=vt[Ot].fn;return E},z.prototype.listenerCount=function(k){var Z=q?q+k:k,vt=this._events[Z];return vt?vt.fn?1:vt.length:0},z.prototype.emit=function(k,Z,vt,Ot,Nt,E){var L=q?q+k:k;if(!this._events[L])return!1;var O,Y,C=this._events[L],j=arguments.length;if(C.fn){switch(C.once&&this.removeListener(k,C.fn,void 0,!0),j){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,Z),!0;case 3:return C.fn.call(C.context,Z,vt),!0;case 4:return C.fn.call(C.context,Z,vt,Ot),!0;case 5:return C.fn.call(C.context,Z,vt,Ot,Nt),!0;case 6:return C.fn.call(C.context,Z,vt,Ot,Nt,E),!0}for(Y=1,O=new Array(j-1);Y<j;Y++)O[Y-1]=arguments[Y];C.fn.apply(C.context,O)}else{var X,K=C.length;for(Y=0;Y<K;Y++)switch(C[Y].once&&this.removeListener(k,C[Y].fn,void 0,!0),j){case 1:C[Y].fn.call(C[Y].context);break;case 2:C[Y].fn.call(C[Y].context,Z);break;case 3:C[Y].fn.call(C[Y].context,Z,vt);break;case 4:C[Y].fn.call(C[Y].context,Z,vt,Ot);break;default:if(!O)for(X=1,O=new Array(j-1);X<j;X++)O[X-1]=arguments[X];C[Y].fn.apply(C[Y].context,O)}}return!0},z.prototype.on=function(k,Z,vt){return P(this,k,Z,vt,!1)},z.prototype.once=function(k,Z,vt){return P(this,k,Z,vt,!0)},z.prototype.removeListener=function(k,Z,vt,Ot){var Nt=q?q+k:k;if(!this._events[Nt])return this;if(!Z)return V(this,Nt),this;var E=this._events[Nt];if(E.fn)E.fn!==Z||Ot&&!E.once||vt&&E.context!==vt||V(this,Nt);else{for(var L=0,O=[],Y=E.length;L<Y;L++)(E[L].fn!==Z||Ot&&!E[L].once||vt&&E[L].context!==vt)&&O.push(E[L]);O.length?this._events[Nt]=O.length===1?O[0]:O:V(this,Nt)}return this},z.prototype.removeAllListeners=function(k){var Z;return k?(Z=q?q+k:k,this._events[Z]&&V(this,Z)):(this._events=new ht,this._eventsCount=0),this},z.prototype.off=z.prototype.removeListener,z.prototype.addListener=z.prototype.on,z.prefixed=q,z.EventEmitter=z,T.exports=z},function(T,M,v){function b(H,ft,Et){Et=Et||2;var At,Rt,Wt,$t,ye,me,ui,be=ft&&ft.length,ei=be?ft[0]*Et:H.length,Ze=q(H,0,ei,Et,!0),ri=[];if(!Ze||Ze.next===Ze.prev)return ri;if(be&&(Ze=function(ki,Fi,Pi,Qi){var Li,Gi,Nn,tn,Zn,Kn=[];for(Li=0,Gi=Fi.length;Li<Gi;Li++)Nn=Fi[Li]*Qi,tn=Li<Gi-1?Fi[Li+1]*Qi:ki.length,(Zn=q(ki,Nn,tn,Qi,!1))===Zn.next&&(Zn.steiner=!0),Kn.push(E(Zn));for(Kn.sort(Z),Li=0;Li<Kn.length;Li++)Pi=ht(Pi=vt(Kn[Li],Pi),Pi.next);return Pi}(H,ft,Ze,Et)),H.length>80*Et){At=Wt=H[0],Rt=$t=H[1];for(var De=Et;De<ei;De+=Et)(ye=H[De])<At&&(At=ye),(me=H[De+1])<Rt&&(Rt=me),ye>Wt&&(Wt=ye),me>$t&&($t=me);ui=(ui=Math.max(Wt-At,$t-Rt))!==0?1/ui:0}return W(Ze,ri,Et,At,Rt,ui),ri}function q(H,ft,Et,At,Rt){var Wt,$t;if(Rt===Pt(H,ft,Et,At)>0)for(Wt=ft;Wt<Et;Wt+=At)$t=Ct(Wt,H[Wt],H[Wt+1],$t);else for(Wt=Et-At;Wt>=ft;Wt-=At)$t=Ct(Wt,H[Wt],H[Wt+1],$t);return $t&&C($t,$t.next)&&(ot($t),$t=$t.next),$t}function ht(H,ft){if(!H)return H;ft||(ft=H);var Et,At=H;do if(Et=!1,At.steiner||!C(At,At.next)&&Y(At.prev,At,At.next)!==0)At=At.next;else{if(ot(At),(At=ft=At.prev)===At.next)break;Et=!0}while(Et||At!==ft);return ft}function W(H,ft,Et,At,Rt,Wt,$t){if(H){!$t&&Wt&&function(be,ei,Ze,ri){var De=be;do De.z===null&&(De.z=Nt(De.x,De.y,ei,Ze,ri)),De.prevZ=De.prev,De.nextZ=De.next,De=De.next;while(De!==be);De.prevZ.nextZ=null,De.prevZ=null,function(ki){var Fi,Pi,Qi,Li,Gi,Nn,tn,Zn,Kn=1;do{for(Pi=ki,ki=null,Gi=null,Nn=0;Pi;){for(Nn++,Qi=Pi,tn=0,Fi=0;Fi<Kn&&(tn++,Qi=Qi.nextZ);Fi++);for(Zn=Kn;tn>0||Zn>0&&Qi;)tn!==0&&(Zn===0||!Qi||Pi.z<=Qi.z)?(Li=Pi,Pi=Pi.nextZ,tn--):(Li=Qi,Qi=Qi.nextZ,Zn--),Gi?Gi.nextZ=Li:ki=Li,Li.prevZ=Gi,Gi=Li;Pi=Qi}Gi.nextZ=null,Kn*=2}while(Nn>1)}(De)}(H,At,Rt,Wt);for(var ye,me,ui=H;H.prev!==H.next;)if(ye=H.prev,me=H.next,Wt?V(H,At,Rt,Wt):P(H))ft.push(ye.i/Et),ft.push(H.i/Et),ft.push(me.i/Et),ot(H),H=me.next,ui=me.next;else if((H=me)===ui){$t?$t===1?W(H=z(ht(H),ft,Et),ft,Et,At,Rt,Wt,2):$t===2&&k(H,ft,Et,At,Rt,Wt):W(ht(H),ft,Et,At,Rt,Wt,1);break}}}function P(H){var ft=H.prev,Et=H,At=H.next;if(Y(ft,Et,At)>=0)return!1;for(var Rt=H.next.next;Rt!==H.prev;){if(L(ft.x,ft.y,Et.x,Et.y,At.x,At.y,Rt.x,Rt.y)&&Y(Rt.prev,Rt,Rt.next)>=0)return!1;Rt=Rt.next}return!0}function V(H,ft,Et,At){var Rt=H.prev,Wt=H,$t=H.next;if(Y(Rt,Wt,$t)>=0)return!1;for(var ye=Rt.x<Wt.x?Rt.x<$t.x?Rt.x:$t.x:Wt.x<$t.x?Wt.x:$t.x,me=Rt.y<Wt.y?Rt.y<$t.y?Rt.y:$t.y:Wt.y<$t.y?Wt.y:$t.y,ui=Rt.x>Wt.x?Rt.x>$t.x?Rt.x:$t.x:Wt.x>$t.x?Wt.x:$t.x,be=Rt.y>Wt.y?Rt.y>$t.y?Rt.y:$t.y:Wt.y>$t.y?Wt.y:$t.y,ei=Nt(ye,me,ft,Et,At),Ze=Nt(ui,be,ft,Et,At),ri=H.prevZ,De=H.nextZ;ri&&ri.z>=ei&&De&&De.z<=Ze;){if(ri!==H.prev&&ri!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,ri.x,ri.y)&&Y(ri.prev,ri,ri.next)>=0||(ri=ri.prevZ,De!==H.prev&&De!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,De.x,De.y)&&Y(De.prev,De,De.next)>=0))return!1;De=De.nextZ}for(;ri&&ri.z>=ei;){if(ri!==H.prev&&ri!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,ri.x,ri.y)&&Y(ri.prev,ri,ri.next)>=0)return!1;ri=ri.prevZ}for(;De&&De.z<=Ze;){if(De!==H.prev&&De!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,De.x,De.y)&&Y(De.prev,De,De.next)>=0)return!1;De=De.nextZ}return!0}function z(H,ft,Et){var At=H;do{var Rt=At.prev,Wt=At.next.next;!C(Rt,Wt)&&j(Rt,At,At.next,Wt)&&qt(Rt,Wt)&&qt(Wt,Rt)&&(ft.push(Rt.i/Et),ft.push(At.i/Et),ft.push(Wt.i/Et),ot(At),ot(At.next),At=H=Wt),At=At.next}while(At!==H);return ht(At)}function k(H,ft,Et,At,Rt,Wt){var $t=H;do{for(var ye=$t.next.next;ye!==$t.prev;){if($t.i!==ye.i&&O($t,ye)){var me=ge($t,ye);return $t=ht($t,$t.next),me=ht(me,me.next),W($t,ft,Et,At,Rt,Wt),void W(me,ft,Et,At,Rt,Wt)}ye=ye.next}$t=$t.next}while($t!==H)}function Z(H,ft){return H.x-ft.x}function vt(H,ft){var Et=function(Wt,$t){var ye,me=$t,ui=Wt.x,be=Wt.y,ei=-1/0;do{if(be<=me.y&&be>=me.next.y&&me.next.y!==me.y){var Ze=me.x+(be-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Ze<=ui&&Ze>ei){if(ei=Ze,Ze===ui){if(be===me.y)return me;if(be===me.next.y)return me.next}ye=me.x<me.next.x?me:me.next}}me=me.next}while(me!==$t);if(!ye)return null;if(ui===ei)return ye;var ri,De=ye,ki=ye.x,Fi=ye.y,Pi=1/0;me=ye;do ui>=me.x&&me.x>=ki&&ui!==me.x&&L(be<Fi?ui:ei,be,ki,Fi,be<Fi?ei:ui,be,me.x,me.y)&&(ri=Math.abs(be-me.y)/(ui-me.x),qt(me,Wt)&&(ri<Pi||ri===Pi&&(me.x>ye.x||me.x===ye.x&&Ot(ye,me)))&&(ye=me,Pi=ri)),me=me.next;while(me!==De);return ye}(H,ft);if(!Et)return ft;var At=ge(Et,H),Rt=ht(Et,Et.next);return ht(At,At.next),ft===Et?Rt:ft}function Ot(H,ft){return Y(H.prev,H,ft.prev)<0&&Y(ft.next,H,H.next)<0}function Nt(H,ft,Et,At,Rt){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=32767*(H-Et)*Rt)|H<<8))|H<<4))|H<<2))|H<<1))|(ft=1431655765&((ft=858993459&((ft=252645135&((ft=16711935&((ft=32767*(ft-At)*Rt)|ft<<8))|ft<<4))|ft<<2))|ft<<1))<<1}function E(H){var ft=H,Et=H;do(ft.x<Et.x||ft.x===Et.x&&ft.y<Et.y)&&(Et=ft),ft=ft.next;while(ft!==H);return Et}function L(H,ft,Et,At,Rt,Wt,$t,ye){return(Rt-$t)*(ft-ye)-(H-$t)*(Wt-ye)>=0&&(H-$t)*(At-ye)-(Et-$t)*(ft-ye)>=0&&(Et-$t)*(Wt-ye)-(Rt-$t)*(At-ye)>=0}function O(H,ft){return H.next.i!==ft.i&&H.prev.i!==ft.i&&!function(Et,At){var Rt=Et;do{if(Rt.i!==Et.i&&Rt.next.i!==Et.i&&Rt.i!==At.i&&Rt.next.i!==At.i&&j(Rt,Rt.next,Et,At))return!0;Rt=Rt.next}while(Rt!==Et);return!1}(H,ft)&&(qt(H,ft)&&qt(ft,H)&&function(Et,At){var Rt=Et,Wt=!1,$t=(Et.x+At.x)/2,ye=(Et.y+At.y)/2;do Rt.y>ye!=Rt.next.y>ye&&Rt.next.y!==Rt.y&&$t<(Rt.next.x-Rt.x)*(ye-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(Wt=!Wt),Rt=Rt.next;while(Rt!==Et);return Wt}(H,ft)&&(Y(H.prev,H,ft.prev)||Y(H,ft.prev,ft))||C(H,ft)&&Y(H.prev,H,H.next)>0&&Y(ft.prev,ft,ft.next)>0)}function Y(H,ft,Et){return(ft.y-H.y)*(Et.x-ft.x)-(ft.x-H.x)*(Et.y-ft.y)}function C(H,ft){return H.x===ft.x&&H.y===ft.y}function j(H,ft,Et,At){var Rt=K(Y(H,ft,Et)),Wt=K(Y(H,ft,At)),$t=K(Y(Et,At,H)),ye=K(Y(Et,At,ft));return Rt!==Wt&&$t!==ye||!(Rt!==0||!X(H,Et,ft))||!(Wt!==0||!X(H,At,ft))||!($t!==0||!X(Et,H,At))||!(ye!==0||!X(Et,ft,At))}function X(H,ft,Et){return ft.x<=Math.max(H.x,Et.x)&&ft.x>=Math.min(H.x,Et.x)&&ft.y<=Math.max(H.y,Et.y)&&ft.y>=Math.min(H.y,Et.y)}function K(H){return H>0?1:H<0?-1:0}function qt(H,ft){return Y(H.prev,H,H.next)<0?Y(H,ft,H.next)>=0&&Y(H,H.prev,ft)>=0:Y(H,ft,H.prev)<0||Y(H,H.next,ft)<0}function ge(H,ft){var Et=new yt(H.i,H.x,H.y),At=new yt(ft.i,ft.x,ft.y),Rt=H.next,Wt=ft.prev;return H.next=ft,ft.prev=H,Et.next=Rt,Rt.prev=Et,At.next=Et,Et.prev=At,Wt.next=At,At.prev=Wt,At}function Ct(H,ft,Et,At){var Rt=new yt(H,ft,Et);return At?(Rt.next=At.next,Rt.prev=At,At.next.prev=Rt,At.next=Rt):(Rt.prev=Rt,Rt.next=Rt),Rt}function ot(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function yt(H,ft,Et){this.i=H,this.x=ft,this.y=Et,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Pt(H,ft,Et,At){for(var Rt=0,Wt=ft,$t=Et-At;Wt<Et;Wt+=At)Rt+=(H[$t]-H[Wt])*(H[Wt+1]+H[$t+1]),$t=Wt;return Rt}T.exports=b,T.exports.default=b,b.deviation=function(H,ft,Et,At){var Rt=ft&&ft.length,Wt=Rt?ft[0]*Et:H.length,$t=Math.abs(Pt(H,0,Wt,Et));if(Rt)for(var ye=0,me=ft.length;ye<me;ye++){var ui=ft[ye]*Et,be=ye<me-1?ft[ye+1]*Et:H.length;$t-=Math.abs(Pt(H,ui,be,Et))}var ei=0;for(ye=0;ye<At.length;ye+=3){var Ze=At[ye]*Et,ri=At[ye+1]*Et,De=At[ye+2]*Et;ei+=Math.abs((H[Ze]-H[De])*(H[ri+1]-H[Ze+1])-(H[Ze]-H[ri])*(H[De+1]-H[Ze+1]))}return $t===0&&ei===0?0:Math.abs((ei-$t)/$t)},b.flatten=function(H){for(var ft=H[0][0].length,Et={vertices:[],holes:[],dimensions:ft},At=0,Rt=0;Rt<H.length;Rt++){for(var Wt=0;Wt<H[Rt].length;Wt++)for(var $t=0;$t<ft;$t++)Et.vertices.push(H[Rt][Wt][$t]);Rt>0&&(At+=H[Rt-1].length,Et.holes.push(At))}return Et}},function(T,M){T.exports=`varying vec2 vUv;
|
|
27
|
+
}`;var re=cu(function(){return ln(mt,Fe+"return "+de).apply(void 0,Mt)});if(re.source=de,Gd(re))throw re;return re},S.times=function(c,f){if((c=di(c))<1||c>9007199254740991)return[];var x=4294967295,R=xn(c,4294967295);c-=4294967295;for(var D=oh(R,f=je(f));++x<c;)f(x);return D},S.toFinite=Jo,S.toInteger=di,S.toLength=em,S.toLower=function(c){return wi(c).toLowerCase()},S.toNumber=Nr,S.toSafeInteger=function(c){return c?Wo(di(c),-9007199254740991,9007199254740991):c===0?c:0},S.toString=wi,S.toUpper=function(c){return wi(c).toUpperCase()},S.trim=function(c,f,x){if((c=wi(c))&&(x||f===void 0))return nd(c);if(!c||!(f=fn(f)))return c;var R=jn(c),D=jn(f);return _e(R,rd(R,D),od(R,D)+1).join("")},S.trimEnd=function(c,f,x){if((c=wi(c))&&(x||f===void 0))return c.slice(0,fs(c)+1);if(!c||!(f=fn(f)))return c;var R=jn(c);return _e(R,0,od(R,jn(f))+1).join("")},S.trimStart=function(c,f,x){if((c=wi(c))&&(x||f===void 0))return c.replace(Gi,"");if(!c||!(f=fn(f)))return c;var R=jn(c);return _e(R,rd(R,jn(f))).join("")},S.truncate=function(c,f){var x=30,R="...";if(rn(f)){var D="separator"in f?f.separator:D;x="length"in f?di(f.length):x,R="omission"in f?fn(f.omission):R}var $=(c=wi(c)).length;if(Ks(c)){var ut=jn(c);$=ut.length}if(x>=$)return c;var mt=x-Go(R);if(mt<1)return R;var Mt=ut?_e(ut,0,mt).join(""):c.slice(0,mt);if(D===void 0)return Mt+R;if(ut&&(mt+=Mt.length-mt),zd(D)){if(c.slice(mt).search(D)){var Jt,Zt=Mt;for(D.global||(D=Ul(D.source,wi(to.exec(D))+"g")),D.lastIndex=0;Jt=D.exec(Zt);)var de=Jt.index;Mt=Mt.slice(0,de===void 0?mt:de)}}else if(c.indexOf(fn(D),mt)!=mt){var Oe=Mt.lastIndexOf(D);Oe>-1&&(Mt=Mt.slice(0,Oe))}return Mt+R},S.unescape=function(c){return(c=wi(c))&&be.test(c)?c.replace(me,kl):c},S.uniqueId=function(c){var f=++iv;return wi(c)+f},S.upperCase=om,S.upperFirst=hu,S.each=Hf,S.eachRight=zf,S.first=Dd,Xh(S,(Jh={},To(S,function(c,f){Mi.call(S.prototype,f)||(Jh[f]=c)}),Jh),{chain:!1}),S.VERSION="4.17.21",dr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){S[c].placeholder=S}),dr(["drop","take"],function(c,f){oi.prototype[c]=function(x){x=x===void 0?1:zi(di(x),0);var R=this.__filtered__&&!f?new oi(this):this.clone();return R.__filtered__?R.__takeCount__=xn(x,R.__takeCount__):R.__views__.push({size:xn(x,4294967295),type:c+(R.__dir__<0?"Right":"")}),R},oi.prototype[c+"Right"]=function(x){return this.reverse()[c](x).reverse()}}),dr(["filter","map","takeWhile"],function(c,f){var x=f+1,R=x==1||x==3;oi.prototype[c]=function(D){var $=this.clone();return $.__iteratees__.push({iteratee:je(D,3),type:x}),$.__filtered__=$.__filtered__||R,$}}),dr(["head","last"],function(c,f){var x="take"+(f?"Right":"");oi.prototype[c]=function(){return this[x](1).value()[0]}}),dr(["initial","tail"],function(c,f){var x="drop"+(f?"":"Right");oi.prototype[c]=function(){return this.__filtered__?new oi(this):this[x](1)}}),oi.prototype.compact=function(){return this.filter(lr)},oi.prototype.find=function(c){return this.filter(c).head()},oi.prototype.findLast=function(c){return this.reverse().find(c)},oi.prototype.invokeMap=ci(function(c,f){return typeof c=="function"?new oi(this):this.map(function(x){return Xa(x,c,f)})}),oi.prototype.reject=function(c){return this.filter(ru(je(c)))},oi.prototype.slice=function(c,f){c=di(c);var x=this;return x.__filtered__&&(c>0||f<0)?new oi(x):(c<0?x=x.takeRight(-c):c&&(x=x.drop(c)),f!==void 0&&(x=(f=di(f))<0?x.dropRight(-f):x.take(f-c)),x)},oi.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},oi.prototype.toArray=function(){return this.take(4294967295)},To(oi.prototype,function(c,f){var x=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),D=S[R?"take"+(f=="last"?"Right":""):f],$=R||/^find/.test(f);D&&(S.prototype[f]=function(){var ut=this.__wrapped__,mt=R?[1]:arguments,Mt=ut instanceof oi,Jt=mt[0],Zt=Mt||ti(ut),de=function(He){var Ce=D.apply(S,ko([He],mt));return R&&Oe?Ce[0]:Ce};Zt&&x&&typeof Jt=="function"&&Jt.length!=1&&(Mt=Zt=!1);var Oe=this.__chain__,Fe=!!this.__actions__.length,Ve=$&&!Oe,re=Mt&&!Fe;if(!$&&Zt){ut=re?ut:new oi(this);var pe=c.apply(ut,mt);return pe.__actions__.push({func:Nh,args:[de],thisArg:void 0}),new $i(pe,Oe)}return Ve&&re?c.apply(this,mt):(pe=this.thru(de),Ve?R?pe.value()[0]:pe.value():pe)})}),dr(["pop","push","shift","sort","splice","unshift"],function(c){var f=Gl[c],x=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",R=/^(?:pop|shift)$/.test(c);S.prototype[c]=function(){var D=arguments;if(R&&!this.__chain__){var $=this.value();return f.apply(ti($)?$:[],D)}return this[x](function(ut){return f.apply(ti(ut)?ut:[],D)})}}),To(oi.prototype,function(c,f){var x=S[f];if(x){var R=x.name+"";Mi.call(Gr,R)||(Gr[R]=[]),Gr[R].push({name:f,func:x})}}),Gr[Ka(void 0,2).name]=[{name:"wrapper",func:void 0}],oi.prototype.clone=function(){var c=new oi(this.__wrapped__);return c.__actions__=An(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=An(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=An(this.__views__),c},oi.prototype.reverse=function(){if(this.__filtered__){var c=new oi(this);c.__dir__=-1,c.__filtered__=!0}else(c=this.clone()).__dir__*=-1;return c},oi.prototype.value=function(){var c=this.__wrapped__.value(),f=this.__dir__,x=ti(c),R=f<0,D=x?c.length:0,$=function(li,ke,Je){for(var cn=-1,qn=Je.length;++cn<qn;){var dn=Je[cn],sn=dn.size;switch(dn.type){case"drop":li+=sn;break;case"dropRight":ke-=sn;break;case"take":ke=xn(ke,li+sn);break;case"takeRight":li=zi(li,ke-sn)}}return{start:li,end:ke}}(0,D,this.__views__),ut=$.start,mt=$.end,Mt=mt-ut,Jt=R?mt:ut-1,Zt=this.__iteratees__,de=Zt.length,Oe=0,Fe=xn(Mt,this.__takeCount__);if(!x||!R&&D==Mt&&Fe==Mt)return bd(c,this.__actions__);var Ve=[];t:for(;Mt--&&Oe<Fe;){for(var re=-1,pe=c[Jt+=f];++re<de;){var He=Zt[re],Ce=He.iteratee,Ue=He.type,Ye=Ce(pe);if(Ue==2)pe=Ye;else if(!Ye){if(Ue==1)continue t;break t}}Ve[Oe++]=pe}return Ve},S.prototype.at=Ev,S.prototype.chain=function(){return Gf(this)},S.prototype.commit=function(){return new $i(this.value(),this.__chain__)},S.prototype.next=function(){this.__values__===void 0&&(this.__values__=tm(this.value()));var c=this.__index__>=this.__values__.length;return{done:c,value:c?void 0:this.__values__[this.__index__++]}},S.prototype.plant=function(c){for(var f,x=this;x instanceof Xl;){var R=Df(x);R.__index__=0,R.__values__=void 0,f?D.__wrapped__=R:f=R;var D=R;x=x.__wrapped__}return D.__wrapped__=c,f},S.prototype.reverse=function(){var c=this.__wrapped__;if(c instanceof oi){var f=c;return this.__actions__.length&&(f=new oi(this)),(f=f.reverse()).__actions__.push({func:Nh,args:[Fd],thisArg:void 0}),new $i(f,this.__chain__)}return this.thru(Fd)},S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=function(){return bd(this.__wrapped__,this.__actions__)},S.prototype.first=S.prototype.head,xo&&(S.prototype[xo]=function(){return this}),S}();en._=Qs,(ht=function(){return Qs}.call(M,v,M,q))===void 0||(q.exports=ht)}).call(this)}).call(this,v(3),v(7)(T))},function(T,M,v){var b=Object.prototype.hasOwnProperty,q="~";function ht(){}function V(k,Z,vt){this.fn=k,this.context=Z,this.once=vt||!1}function P(k,Z,vt,Ot,Nt){if(typeof vt!="function")throw new TypeError("The listener must be a function");var E=new V(vt,Ot||k,Nt),L=q?q+Z:Z;return k._events[L]?k._events[L].fn?k._events[L]=[k._events[L],E]:k._events[L].push(E):(k._events[L]=E,k._eventsCount++),k}function W(k,Z){--k._eventsCount==0?k._events=new ht:delete k._events[Z]}function z(){this._events=new ht,this._eventsCount=0}Object.create&&(ht.prototype=Object.create(null),new ht().__proto__||(q=!1)),z.prototype.eventNames=function(){var k,Z,vt=[];if(this._eventsCount===0)return vt;for(Z in k=this._events)b.call(k,Z)&&vt.push(q?Z.slice(1):Z);return Object.getOwnPropertySymbols?vt.concat(Object.getOwnPropertySymbols(k)):vt},z.prototype.listeners=function(k){var Z=q?q+k:k,vt=this._events[Z];if(!vt)return[];if(vt.fn)return[vt.fn];for(var Ot=0,Nt=vt.length,E=new Array(Nt);Ot<Nt;Ot++)E[Ot]=vt[Ot].fn;return E},z.prototype.listenerCount=function(k){var Z=q?q+k:k,vt=this._events[Z];return vt?vt.fn?1:vt.length:0},z.prototype.emit=function(k,Z,vt,Ot,Nt,E){var L=q?q+k:k;if(!this._events[L])return!1;var O,Y,C=this._events[L],j=arguments.length;if(C.fn){switch(C.once&&this.removeListener(k,C.fn,void 0,!0),j){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,Z),!0;case 3:return C.fn.call(C.context,Z,vt),!0;case 4:return C.fn.call(C.context,Z,vt,Ot),!0;case 5:return C.fn.call(C.context,Z,vt,Ot,Nt),!0;case 6:return C.fn.call(C.context,Z,vt,Ot,Nt,E),!0}for(Y=1,O=new Array(j-1);Y<j;Y++)O[Y-1]=arguments[Y];C.fn.apply(C.context,O)}else{var X,K=C.length;for(Y=0;Y<K;Y++)switch(C[Y].once&&this.removeListener(k,C[Y].fn,void 0,!0),j){case 1:C[Y].fn.call(C[Y].context);break;case 2:C[Y].fn.call(C[Y].context,Z);break;case 3:C[Y].fn.call(C[Y].context,Z,vt);break;case 4:C[Y].fn.call(C[Y].context,Z,vt,Ot);break;default:if(!O)for(X=1,O=new Array(j-1);X<j;X++)O[X-1]=arguments[X];C[Y].fn.apply(C[Y].context,O)}}return!0},z.prototype.on=function(k,Z,vt){return P(this,k,Z,vt,!1)},z.prototype.once=function(k,Z,vt){return P(this,k,Z,vt,!0)},z.prototype.removeListener=function(k,Z,vt,Ot){var Nt=q?q+k:k;if(!this._events[Nt])return this;if(!Z)return W(this,Nt),this;var E=this._events[Nt];if(E.fn)E.fn!==Z||Ot&&!E.once||vt&&E.context!==vt||W(this,Nt);else{for(var L=0,O=[],Y=E.length;L<Y;L++)(E[L].fn!==Z||Ot&&!E[L].once||vt&&E[L].context!==vt)&&O.push(E[L]);O.length?this._events[Nt]=O.length===1?O[0]:O:W(this,Nt)}return this},z.prototype.removeAllListeners=function(k){var Z;return k?(Z=q?q+k:k,this._events[Z]&&W(this,Z)):(this._events=new ht,this._eventsCount=0),this},z.prototype.off=z.prototype.removeListener,z.prototype.addListener=z.prototype.on,z.prefixed=q,z.EventEmitter=z,T.exports=z},function(T,M,v){var b;(function(q){function ht(C,j){var X=(65535&C)+(65535&j);return(C>>16)+(j>>16)+(X>>16)<<16|65535&X}function V(C,j,X,K,qt,ge){return ht((Ct=ht(ht(j,C),ht(K,ge)))<<(ot=qt)|Ct>>>32-ot,X);var Ct,ot}function P(C,j,X,K,qt,ge,Ct){return V(j&X|~j&K,C,j,qt,ge,Ct)}function W(C,j,X,K,qt,ge,Ct){return V(j&K|X&~K,C,j,qt,ge,Ct)}function z(C,j,X,K,qt,ge,Ct){return V(j^X^K,C,j,qt,ge,Ct)}function k(C,j,X,K,qt,ge,Ct){return V(X^(j|~K),C,j,qt,ge,Ct)}function Z(C,j){var X,K,qt,ge,Ct;C[j>>5]|=128<<j%32,C[14+(j+64>>>9<<4)]=j;var ot=1732584193,yt=-271733879,Pt=-1732584194,H=271733878;for(X=0;X<C.length;X+=16)K=ot,qt=yt,ge=Pt,Ct=H,ot=P(ot,yt,Pt,H,C[X],7,-680876936),H=P(H,ot,yt,Pt,C[X+1],12,-389564586),Pt=P(Pt,H,ot,yt,C[X+2],17,606105819),yt=P(yt,Pt,H,ot,C[X+3],22,-1044525330),ot=P(ot,yt,Pt,H,C[X+4],7,-176418897),H=P(H,ot,yt,Pt,C[X+5],12,1200080426),Pt=P(Pt,H,ot,yt,C[X+6],17,-1473231341),yt=P(yt,Pt,H,ot,C[X+7],22,-45705983),ot=P(ot,yt,Pt,H,C[X+8],7,1770035416),H=P(H,ot,yt,Pt,C[X+9],12,-1958414417),Pt=P(Pt,H,ot,yt,C[X+10],17,-42063),yt=P(yt,Pt,H,ot,C[X+11],22,-1990404162),ot=P(ot,yt,Pt,H,C[X+12],7,1804603682),H=P(H,ot,yt,Pt,C[X+13],12,-40341101),Pt=P(Pt,H,ot,yt,C[X+14],17,-1502002290),ot=W(ot,yt=P(yt,Pt,H,ot,C[X+15],22,1236535329),Pt,H,C[X+1],5,-165796510),H=W(H,ot,yt,Pt,C[X+6],9,-1069501632),Pt=W(Pt,H,ot,yt,C[X+11],14,643717713),yt=W(yt,Pt,H,ot,C[X],20,-373897302),ot=W(ot,yt,Pt,H,C[X+5],5,-701558691),H=W(H,ot,yt,Pt,C[X+10],9,38016083),Pt=W(Pt,H,ot,yt,C[X+15],14,-660478335),yt=W(yt,Pt,H,ot,C[X+4],20,-405537848),ot=W(ot,yt,Pt,H,C[X+9],5,568446438),H=W(H,ot,yt,Pt,C[X+14],9,-1019803690),Pt=W(Pt,H,ot,yt,C[X+3],14,-187363961),yt=W(yt,Pt,H,ot,C[X+8],20,1163531501),ot=W(ot,yt,Pt,H,C[X+13],5,-1444681467),H=W(H,ot,yt,Pt,C[X+2],9,-51403784),Pt=W(Pt,H,ot,yt,C[X+7],14,1735328473),ot=z(ot,yt=W(yt,Pt,H,ot,C[X+12],20,-1926607734),Pt,H,C[X+5],4,-378558),H=z(H,ot,yt,Pt,C[X+8],11,-2022574463),Pt=z(Pt,H,ot,yt,C[X+11],16,1839030562),yt=z(yt,Pt,H,ot,C[X+14],23,-35309556),ot=z(ot,yt,Pt,H,C[X+1],4,-1530992060),H=z(H,ot,yt,Pt,C[X+4],11,1272893353),Pt=z(Pt,H,ot,yt,C[X+7],16,-155497632),yt=z(yt,Pt,H,ot,C[X+10],23,-1094730640),ot=z(ot,yt,Pt,H,C[X+13],4,681279174),H=z(H,ot,yt,Pt,C[X],11,-358537222),Pt=z(Pt,H,ot,yt,C[X+3],16,-722521979),yt=z(yt,Pt,H,ot,C[X+6],23,76029189),ot=z(ot,yt,Pt,H,C[X+9],4,-640364487),H=z(H,ot,yt,Pt,C[X+12],11,-421815835),Pt=z(Pt,H,ot,yt,C[X+15],16,530742520),ot=k(ot,yt=z(yt,Pt,H,ot,C[X+2],23,-995338651),Pt,H,C[X],6,-198630844),H=k(H,ot,yt,Pt,C[X+7],10,1126891415),Pt=k(Pt,H,ot,yt,C[X+14],15,-1416354905),yt=k(yt,Pt,H,ot,C[X+5],21,-57434055),ot=k(ot,yt,Pt,H,C[X+12],6,1700485571),H=k(H,ot,yt,Pt,C[X+3],10,-1894986606),Pt=k(Pt,H,ot,yt,C[X+10],15,-1051523),yt=k(yt,Pt,H,ot,C[X+1],21,-2054922799),ot=k(ot,yt,Pt,H,C[X+8],6,1873313359),H=k(H,ot,yt,Pt,C[X+15],10,-30611744),Pt=k(Pt,H,ot,yt,C[X+6],15,-1560198380),yt=k(yt,Pt,H,ot,C[X+13],21,1309151649),ot=k(ot,yt,Pt,H,C[X+4],6,-145523070),H=k(H,ot,yt,Pt,C[X+11],10,-1120210379),Pt=k(Pt,H,ot,yt,C[X+2],15,718787259),yt=k(yt,Pt,H,ot,C[X+9],21,-343485551),ot=ht(ot,K),yt=ht(yt,qt),Pt=ht(Pt,ge),H=ht(H,Ct);return[ot,yt,Pt,H]}function vt(C){var j,X="",K=32*C.length;for(j=0;j<K;j+=8)X+=String.fromCharCode(C[j>>5]>>>j%32&255);return X}function Ot(C){var j,X=[];for(X[(C.length>>2)-1]=void 0,j=0;j<X.length;j+=1)X[j]=0;var K=8*C.length;for(j=0;j<K;j+=8)X[j>>5]|=(255&C.charCodeAt(j/8))<<j%32;return X}function Nt(C){var j,X,K="";for(X=0;X<C.length;X+=1)j=C.charCodeAt(X),K+="0123456789abcdef".charAt(j>>>4&15)+"0123456789abcdef".charAt(15&j);return K}function E(C){return unescape(encodeURIComponent(C))}function L(C){return function(j){return vt(Z(Ot(j),8*j.length))}(E(C))}function O(C,j){return function(X,K){var qt,ge,Ct=Ot(X),ot=[],yt=[];for(ot[15]=yt[15]=void 0,Ct.length>16&&(Ct=Z(Ct,8*X.length)),qt=0;qt<16;qt+=1)ot[qt]=909522486^Ct[qt],yt[qt]=1549556828^Ct[qt];return ge=Z(ot.concat(Ot(K)),512+8*K.length),vt(Z(yt.concat(ge),640))}(E(C),E(j))}function Y(C,j,X){return j?X?O(j,C):Nt(O(j,C)):X?L(C):Nt(L(C))}(b=function(){return Y}.call(M,v,M,T))===void 0||(T.exports=b)})()},function(T,M){var v;v=function(){return this}();try{v=v||new Function("return this")()}catch{typeof window=="object"&&(v=window)}T.exports=v},function(T,M,v){(function(b){T.exports=function q(ht,V,P){function W(Z,vt){if(!V[Z]){if(!ht[Z]){if(z)return z(Z,!0);var Ot=new Error("Cannot find module '"+Z+"'");throw Ot.code="MODULE_NOT_FOUND",Ot}var Nt=V[Z]={exports:{}};ht[Z][0].call(Nt.exports,function(E){var L=ht[Z][1][E];return W(L||E)},Nt,Nt.exports,q,ht,V,P)}return V[Z].exports}for(var z=!1,k=0;k<P.length;k++)W(P[k]);return W}({1:[function(q,ht,V){(function(P){var W,z,k=P.MutationObserver||P.WebKitMutationObserver;if(k){var Z=0,vt=new k(L),Ot=P.document.createTextNode("");vt.observe(Ot,{characterData:!0}),W=function(){Ot.data=Z=++Z%2}}else if(P.setImmediate||P.MessageChannel===void 0)W="document"in P&&"onreadystatechange"in P.document.createElement("script")?function(){var O=P.document.createElement("script");O.onreadystatechange=function(){L(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},P.document.documentElement.appendChild(O)}:function(){setTimeout(L,0)};else{var Nt=new P.MessageChannel;Nt.port1.onmessage=L,W=function(){Nt.port2.postMessage(0)}}var E=[];function L(){var O,Y;z=!0;for(var C=E.length;C;){for(Y=E,E=[],O=-1;++O<C;)Y[O]();C=E.length}z=!1}ht.exports=function(O){E.push(O)!==1||z||W()}}).call(this,b!==void 0?b:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(q,ht,V){var P=q(1);function W(){}var z={},k=["REJECTED"],Z=["FULFILLED"],vt=["PENDING"];function Ot(C){if(typeof C!="function")throw new TypeError("resolver must be a function");this.state=vt,this.queue=[],this.outcome=void 0,C!==W&&O(this,C)}function Nt(C,j,X){this.promise=C,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof X=="function"&&(this.onRejected=X,this.callRejected=this.otherCallRejected)}function E(C,j,X){P(function(){var K;try{K=j(X)}catch(qt){return z.reject(C,qt)}K===C?z.reject(C,new TypeError("Cannot resolve promise with itself")):z.resolve(C,K)})}function L(C){var j=C&&C.then;if(C&&(typeof C=="object"||typeof C=="function")&&typeof j=="function")return function(){j.apply(C,arguments)}}function O(C,j){var X=!1;function K(Ct){X||(X=!0,z.reject(C,Ct))}function qt(Ct){X||(X=!0,z.resolve(C,Ct))}var ge=Y(function(){j(qt,K)});ge.status==="error"&&K(ge.value)}function Y(C,j){var X={};try{X.value=C(j),X.status="success"}catch(K){X.status="error",X.value=K}return X}ht.exports=Ot,Ot.prototype.catch=function(C){return this.then(null,C)},Ot.prototype.then=function(C,j){if(typeof C!="function"&&this.state===Z||typeof j!="function"&&this.state===k)return this;var X=new this.constructor(W);return this.state!==vt?E(X,this.state===Z?C:j,this.outcome):this.queue.push(new Nt(X,C,j)),X},Nt.prototype.callFulfilled=function(C){z.resolve(this.promise,C)},Nt.prototype.otherCallFulfilled=function(C){E(this.promise,this.onFulfilled,C)},Nt.prototype.callRejected=function(C){z.reject(this.promise,C)},Nt.prototype.otherCallRejected=function(C){E(this.promise,this.onRejected,C)},z.resolve=function(C,j){var X=Y(L,j);if(X.status==="error")return z.reject(C,X.value);var K=X.value;if(K)O(C,K);else{C.state=Z,C.outcome=j;for(var qt=-1,ge=C.queue.length;++qt<ge;)C.queue[qt].callFulfilled(j)}return C},z.reject=function(C,j){C.state=k,C.outcome=j;for(var X=-1,K=C.queue.length;++X<K;)C.queue[X].callRejected(j);return C},Ot.resolve=function(C){return C instanceof this?C:z.resolve(new this(W),C)},Ot.reject=function(C){var j=new this(W);return z.reject(j,C)},Ot.all=function(C){var j=this;if(Object.prototype.toString.call(C)!=="[object Array]")return this.reject(new TypeError("must be an array"));var X=C.length,K=!1;if(!X)return this.resolve([]);for(var qt=new Array(X),ge=0,Ct=-1,ot=new this(W);++Ct<X;)yt(C[Ct],Ct);return ot;function yt(Pt,H){j.resolve(Pt).then(function(ft){qt[H]=ft,++ge!==X||K||(K=!0,z.resolve(ot,qt))},function(ft){K||(K=!0,z.reject(ot,ft))})}},Ot.race=function(C){var j=this;if(Object.prototype.toString.call(C)!=="[object Array]")return this.reject(new TypeError("must be an array"));var X=C.length,K=!1;if(!X)return this.resolve([]);for(var qt,ge=-1,Ct=new this(W);++ge<X;)qt=C[ge],j.resolve(qt).then(function(ot){K||(K=!0,z.resolve(Ct,ot))},function(ot){K||(K=!0,z.reject(Ct,ot))});return Ct}},{1:1}],3:[function(q,ht,V){(function(P){typeof P.Promise!="function"&&(P.Promise=q(2))}).call(this,b!==void 0?b:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(q,ht,V){var P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},W=function(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}();function z(J,st){J=J||[],st=st||{};try{return new Blob(J,st)}catch(bt){if(bt.name!=="TypeError")throw bt;for(var at=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),Tt=0;Tt<J.length;Tt+=1)at.append(J[Tt]);return at.getBlob(st.type)}}typeof Promise=="undefined"&&q(3);var k=Promise;function Z(J,st){st&&J.then(function(at){st(null,at)},function(at){st(at)})}function vt(J,st,at){typeof st=="function"&&J.then(st),typeof at=="function"&&J.catch(at)}function Ot(J){return typeof J!="string"&&(console.warn(J+" used as a key, but it is not a string."),J=String(J)),J}function Nt(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var E=void 0,L={},O=Object.prototype.toString;function Y(J){return typeof E=="boolean"?k.resolve(E):function(st){return new k(function(at){var Tt=st.transaction("local-forage-detect-blob-support","readwrite"),bt=z([""]);Tt.objectStore("local-forage-detect-blob-support").put(bt,"key"),Tt.onabort=function(wt){wt.preventDefault(),wt.stopPropagation(),at(!1)},Tt.oncomplete=function(){var wt=navigator.userAgent.match(/Chrome\/(\d+)/),zt=navigator.userAgent.match(/Edge\//);at(zt||!wt||parseInt(wt[1],10)>=43)}}).catch(function(){return!1})}(J).then(function(st){return E=st})}function C(J){var st=L[J.name],at={};at.promise=new k(function(Tt,bt){at.resolve=Tt,at.reject=bt}),st.deferredOperations.push(at),st.dbReady?st.dbReady=st.dbReady.then(function(){return at.promise}):st.dbReady=at.promise}function j(J){var st=L[J.name].deferredOperations.pop();if(st)return st.resolve(),st.promise}function X(J,st){var at=L[J.name].deferredOperations.pop();if(at)return at.reject(st),at.promise}function K(J,st){return new k(function(at,Tt){if(L[J.name]=L[J.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},J.db){if(!st)return at(J.db);C(J),J.db.close()}var bt=[J.name];st&&bt.push(J.version);var wt=W.open.apply(W,bt);st&&(wt.onupgradeneeded=function(zt){var ne=wt.result;try{ne.createObjectStore(J.storeName),zt.oldVersion<=1&&ne.createObjectStore("local-forage-detect-blob-support")}catch(se){if(se.name!=="ConstraintError")throw se;console.warn('The database "'+J.name+'" has been upgraded from version '+zt.oldVersion+" to version "+zt.newVersion+', but the storage "'+J.storeName+'" already exists.')}}),wt.onerror=function(zt){zt.preventDefault(),Tt(wt.error)},wt.onsuccess=function(){var zt=wt.result;zt.onversionchange=function(ne){ne.target.close()},at(zt),j(J)}})}function qt(J){return K(J,!1)}function ge(J){return K(J,!0)}function Ct(J,st){if(!J.db)return!0;var at=!J.db.objectStoreNames.contains(J.storeName),Tt=J.version<J.db.version,bt=J.version>J.db.version;if(Tt&&(J.version!==st&&console.warn('The database "'+J.name+`" can't be downgraded from version `+J.db.version+" to version "+J.version+"."),J.version=J.db.version),bt||at){if(at){var wt=J.db.version+1;wt>J.version&&(J.version=wt)}return!0}return!1}function ot(J){return z([function(st){for(var at=st.length,Tt=new ArrayBuffer(at),bt=new Uint8Array(Tt),wt=0;wt<at;wt++)bt[wt]=st.charCodeAt(wt);return Tt}(atob(J.data))],{type:J.type})}function yt(J){return J&&J.__local_forage_encoded_blob}function Pt(J){var st=this,at=st._initReady().then(function(){var Tt=L[st._dbInfo.name];if(Tt&&Tt.dbReady)return Tt.dbReady});return vt(at,J,J),at}function H(J,st,at,Tt){Tt===void 0&&(Tt=1);try{var bt=J.db.transaction(J.storeName,st);at(null,bt)}catch(wt){if(Tt>0&&(!J.db||wt.name==="InvalidStateError"||wt.name==="NotFoundError"))return k.resolve().then(function(){if(!J.db||wt.name==="NotFoundError"&&!J.db.objectStoreNames.contains(J.storeName)&&J.version<=J.db.version)return J.db&&(J.version=J.db.version+1),ge(J)}).then(function(){return function(zt){C(zt);for(var ne=L[zt.name],se=ne.forages,ae=0;ae<se.length;ae++){var xe=se[ae];xe._dbInfo.db&&(xe._dbInfo.db.close(),xe._dbInfo.db=null)}return zt.db=null,qt(zt).then(function(Ie){return zt.db=Ie,Ct(zt)?ge(zt):Ie}).then(function(Ie){zt.db=ne.db=Ie;for(var Ge=0;Ge<se.length;Ge++)se[Ge]._dbInfo.db=Ie}).catch(function(Ie){throw X(zt,Ie),Ie})}(J).then(function(){H(J,st,at,Tt-1)})}).catch(at);at(wt)}}var ft={_driver:"asyncStorage",_initStorage:function(J){var st=this,at={db:null};if(J)for(var Tt in J)at[Tt]=J[Tt];var bt=L[at.name];bt||(bt={forages:[],db:null,dbReady:null,deferredOperations:[]},L[at.name]=bt),bt.forages.push(st),st._initReady||(st._initReady=st.ready,st.ready=Pt);var wt=[];function zt(){return k.resolve()}for(var ne=0;ne<bt.forages.length;ne++){var se=bt.forages[ne];se!==st&&wt.push(se._initReady().catch(zt))}var ae=bt.forages.slice(0);return k.all(wt).then(function(){return at.db=bt.db,qt(at)}).then(function(xe){return at.db=xe,Ct(at,st._defaultConfig.version)?ge(at):xe}).then(function(xe){at.db=bt.db=xe,st._dbInfo=at;for(var Ie=0;Ie<ae.length;Ie++){var Ge=ae[Ie];Ge!==st&&(Ge._dbInfo.db=at.db,Ge._dbInfo.version=at.version)}})},_support:function(){try{if(!W||!W.open)return!1;var J=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),st=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!J||st)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}(),iterate:function(J,st){var at=this,Tt=new k(function(bt,wt){at.ready().then(function(){H(at._dbInfo,"readonly",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName).openCursor(),ae=1;se.onsuccess=function(){var xe=se.result;if(xe){var Ie=xe.value;yt(Ie)&&(Ie=ot(Ie));var Ge=J(Ie,xe.key,ae++);Ge!==void 0?bt(Ge):xe.continue()}else bt()},se.onerror=function(){wt(se.error)}}catch(xe){wt(xe)}})}).catch(wt)});return Z(Tt,st),Tt},getItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){H(at._dbInfo,"readonly",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName).get(J);se.onsuccess=function(){var ae=se.result;ae===void 0&&(ae=null),yt(ae)&&(ae=ot(ae)),bt(ae)},se.onerror=function(){wt(se.error)}}catch(ae){wt(ae)}})}).catch(wt)});return Z(Tt,st),Tt},setItem:function(J,st,at){var Tt=this;J=Ot(J);var bt=new k(function(wt,zt){var ne;Tt.ready().then(function(){return ne=Tt._dbInfo,O.call(st)==="[object Blob]"?Y(ne.db).then(function(se){return se?st:(ae=st,new k(function(xe,Ie){var Ge=new FileReader;Ge.onerror=Ie,Ge.onloadend=function(qe){var pi=btoa(qe.target.result||"");xe({__local_forage_encoded_blob:!0,data:pi,type:ae.type})},Ge.readAsBinaryString(ae)}));var ae}):st}).then(function(se){H(Tt._dbInfo,"readwrite",function(ae,xe){if(ae)return zt(ae);try{var Ie=xe.objectStore(Tt._dbInfo.storeName);se===null&&(se=void 0);var Ge=Ie.put(se,J);xe.oncomplete=function(){se===void 0&&(se=null),wt(se)},xe.onabort=xe.onerror=function(){var qe=Ge.error?Ge.error:Ge.transaction.error;zt(qe)}}catch(qe){zt(qe)}})}).catch(zt)});return Z(bt,at),bt},removeItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){H(at._dbInfo,"readwrite",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName).delete(J);ne.oncomplete=function(){bt()},ne.onerror=function(){wt(se.error)},ne.onabort=function(){var ae=se.error?se.error:se.transaction.error;wt(ae)}}catch(ae){wt(ae)}})}).catch(wt)});return Z(Tt,st),Tt},clear:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){H(st._dbInfo,"readwrite",function(wt,zt){if(wt)return bt(wt);try{var ne=zt.objectStore(st._dbInfo.storeName).clear();zt.oncomplete=function(){Tt()},zt.onabort=zt.onerror=function(){var se=ne.error?ne.error:ne.transaction.error;bt(se)}}catch(se){bt(se)}})}).catch(bt)});return Z(at,J),at},length:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){H(st._dbInfo,"readonly",function(wt,zt){if(wt)return bt(wt);try{var ne=zt.objectStore(st._dbInfo.storeName).count();ne.onsuccess=function(){Tt(ne.result)},ne.onerror=function(){bt(ne.error)}}catch(se){bt(se)}})}).catch(bt)});return Z(at,J),at},key:function(J,st){var at=this,Tt=new k(function(bt,wt){J<0?bt(null):at.ready().then(function(){H(at._dbInfo,"readonly",function(zt,ne){if(zt)return wt(zt);try{var se=ne.objectStore(at._dbInfo.storeName),ae=!1,xe=se.openKeyCursor();xe.onsuccess=function(){var Ie=xe.result;Ie?J===0||ae?bt(Ie.key):(ae=!0,Ie.advance(J)):bt(null)},xe.onerror=function(){wt(xe.error)}}catch(Ie){wt(Ie)}})}).catch(wt)});return Z(Tt,st),Tt},keys:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){H(st._dbInfo,"readonly",function(wt,zt){if(wt)return bt(wt);try{var ne=zt.objectStore(st._dbInfo.storeName).openKeyCursor(),se=[];ne.onsuccess=function(){var ae=ne.result;ae?(se.push(ae.key),ae.continue()):Tt(se)},ne.onerror=function(){bt(ne.error)}}catch(ae){bt(ae)}})}).catch(bt)});return Z(at,J),at},dropInstance:function(J,st){st=Nt.apply(this,arguments);var at=this.config();(J=typeof J!="function"&&J||{}).name||(J.name=J.name||at.name,J.storeName=J.storeName||at.storeName);var Tt,bt=this;if(J.name){var wt=J.name===at.name&&bt._dbInfo.db,zt=wt?k.resolve(bt._dbInfo.db):qt(J).then(function(ne){var se=L[J.name],ae=se.forages;se.db=ne;for(var xe=0;xe<ae.length;xe++)ae[xe]._dbInfo.db=ne;return ne});Tt=J.storeName?zt.then(function(ne){if(ne.objectStoreNames.contains(J.storeName)){var se=ne.version+1;C(J);var ae=L[J.name],xe=ae.forages;ne.close();for(var Ie=0;Ie<xe.length;Ie++){var Ge=xe[Ie];Ge._dbInfo.db=null,Ge._dbInfo.version=se}return new k(function(qe,pi){var fi=W.open(J.name,se);fi.onerror=function(Tr){fi.result.close(),pi(Tr)},fi.onupgradeneeded=function(){fi.result.deleteObjectStore(J.storeName)},fi.onsuccess=function(){var Tr=fi.result;Tr.close(),qe(Tr)}}).then(function(qe){ae.db=qe;for(var pi=0;pi<xe.length;pi++){var fi=xe[pi];fi._dbInfo.db=qe,j(fi._dbInfo)}}).catch(function(qe){throw(X(J,qe)||k.resolve()).catch(function(){}),qe})}}):zt.then(function(ne){C(J);var se=L[J.name],ae=se.forages;ne.close();for(var xe=0;xe<ae.length;xe++)ae[xe]._dbInfo.db=null;return new k(function(Ie,Ge){var qe=W.deleteDatabase(J.name);qe.onerror=function(){var pi=qe.result;pi&&pi.close(),Ge(qe.error)},qe.onblocked=function(){console.warn('dropInstance blocked for database "'+J.name+'" until all open connections are closed')},qe.onsuccess=function(){var pi=qe.result;pi&&pi.close(),Ie(pi)}}).then(function(Ie){se.db=Ie;for(var Ge=0;Ge<ae.length;Ge++)j(ae[Ge]._dbInfo)}).catch(function(Ie){throw(X(J,Ie)||k.resolve()).catch(function(){}),Ie})})}else Tt=k.reject("Invalid arguments");return Z(Tt,st),Tt}},Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At=/^~~local_forage_type~([^~]+)~/,Rt=9,Wt=Rt+4,$t=Object.prototype.toString;function ye(J){var st,at,Tt,bt,wt,zt=.75*J.length,ne=J.length,se=0;J[J.length-1]==="="&&(zt--,J[J.length-2]==="="&&zt--);var ae=new ArrayBuffer(zt),xe=new Uint8Array(ae);for(st=0;st<ne;st+=4)at=Et.indexOf(J[st]),Tt=Et.indexOf(J[st+1]),bt=Et.indexOf(J[st+2]),wt=Et.indexOf(J[st+3]),xe[se++]=at<<2|Tt>>4,xe[se++]=(15&Tt)<<4|bt>>2,xe[se++]=(3&bt)<<6|63&wt;return ae}function me(J){var st,at=new Uint8Array(J),Tt="";for(st=0;st<at.length;st+=3)Tt+=Et[at[st]>>2],Tt+=Et[(3&at[st])<<4|at[st+1]>>4],Tt+=Et[(15&at[st+1])<<2|at[st+2]>>6],Tt+=Et[63&at[st+2]];return at.length%3==2?Tt=Tt.substring(0,Tt.length-1)+"=":at.length%3==1&&(Tt=Tt.substring(0,Tt.length-2)+"=="),Tt}var ui={serialize:function(J,st){var at="";if(J&&(at=$t.call(J)),J&&(at==="[object ArrayBuffer]"||J.buffer&&$t.call(J.buffer)==="[object ArrayBuffer]")){var Tt,bt="__lfsc__:";J instanceof ArrayBuffer?(Tt=J,bt+="arbf"):(Tt=J.buffer,at==="[object Int8Array]"?bt+="si08":at==="[object Uint8Array]"?bt+="ui08":at==="[object Uint8ClampedArray]"?bt+="uic8":at==="[object Int16Array]"?bt+="si16":at==="[object Uint16Array]"?bt+="ur16":at==="[object Int32Array]"?bt+="si32":at==="[object Uint32Array]"?bt+="ui32":at==="[object Float32Array]"?bt+="fl32":at==="[object Float64Array]"?bt+="fl64":st(new Error("Failed to get type for BinaryArray"))),st(bt+me(Tt))}else if(at==="[object Blob]"){var wt=new FileReader;wt.onload=function(){var zt="~~local_forage_type~"+J.type+"~"+me(this.result);st("__lfsc__:blob"+zt)},wt.readAsArrayBuffer(J)}else try{st(JSON.stringify(J))}catch(zt){console.error("Couldn't convert value into a JSON string: ",J),st(null,zt)}},deserialize:function(J){if(J.substring(0,Rt)!=="__lfsc__:")return JSON.parse(J);var st,at=J.substring(Wt),Tt=J.substring(Rt,Wt);if(Tt==="blob"&&At.test(at)){var bt=at.match(At);st=bt[1],at=at.substring(bt[0].length)}var wt=ye(at);switch(Tt){case"arbf":return wt;case"blob":return z([wt],{type:st});case"si08":return new Int8Array(wt);case"ui08":return new Uint8Array(wt);case"uic8":return new Uint8ClampedArray(wt);case"si16":return new Int16Array(wt);case"ur16":return new Uint16Array(wt);case"si32":return new Int32Array(wt);case"ui32":return new Uint32Array(wt);case"fl32":return new Float32Array(wt);case"fl64":return new Float64Array(wt);default:throw new Error("Unkown type: "+Tt)}},stringToBuffer:ye,bufferToString:me};function be(J,st,at,Tt){J.executeSql("CREATE TABLE IF NOT EXISTS "+st.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],at,Tt)}function ei(J,st,at,Tt,bt,wt){J.executeSql(at,Tt,bt,function(zt,ne){ne.code===ne.SYNTAX_ERR?zt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[st.storeName],function(se,ae){ae.rows.length?wt(se,ne):be(se,st,function(){se.executeSql(at,Tt,bt,wt)},wt)},wt):wt(zt,ne)},wt)}function Ze(J,st,at,Tt){var bt=this;J=Ot(J);var wt=new k(function(zt,ne){bt.ready().then(function(){st===void 0&&(st=null);var se=st,ae=bt._dbInfo;ae.serializer.serialize(st,function(xe,Ie){Ie?ne(Ie):ae.db.transaction(function(Ge){ei(Ge,ae,"INSERT OR REPLACE INTO "+ae.storeName+" (key, value) VALUES (?, ?)",[J,xe],function(){zt(se)},function(qe,pi){ne(pi)})},function(Ge){if(Ge.code===Ge.QUOTA_ERR){if(Tt>0)return void zt(Ze.apply(bt,[J,se,at,Tt-1]));ne(Ge)}})})}).catch(ne)});return Z(wt,at),wt}function ri(J){return new k(function(st,at){J.transaction(function(Tt){Tt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(bt,wt){for(var zt=[],ne=0;ne<wt.rows.length;ne++)zt.push(wt.rows.item(ne).name);st({db:J,storeNames:zt})},function(bt,wt){at(wt)})},function(Tt){at(Tt)})})}var De={_driver:"webSQLStorage",_initStorage:function(J){var st=this,at={db:null};if(J)for(var Tt in J)at[Tt]=typeof J[Tt]!="string"?J[Tt].toString():J[Tt];var bt=new k(function(wt,zt){try{at.db=openDatabase(at.name,String(at.version),at.description,at.size)}catch(ne){return zt(ne)}at.db.transaction(function(ne){be(ne,at,function(){st._dbInfo=at,wt()},function(se,ae){zt(ae)})},zt)});return at.serializer=ui,bt},_support:typeof openDatabase=="function",iterate:function(J,st){var at=this,Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"SELECT * FROM "+zt.storeName,[],function(se,ae){for(var xe=ae.rows,Ie=xe.length,Ge=0;Ge<Ie;Ge++){var qe=xe.item(Ge),pi=qe.value;if(pi&&(pi=zt.serializer.deserialize(pi)),(pi=J(pi,qe.key,Ge+1))!==void 0)return void bt(pi)}bt()},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},getItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"SELECT * FROM "+zt.storeName+" WHERE key = ? LIMIT 1",[J],function(se,ae){var xe=ae.rows.length?ae.rows.item(0).value:null;xe&&(xe=zt.serializer.deserialize(xe)),bt(xe)},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},setItem:function(J,st,at){return Ze.apply(this,[J,st,at,1])},removeItem:function(J,st){var at=this;J=Ot(J);var Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"DELETE FROM "+zt.storeName+" WHERE key = ?",[J],function(){bt()},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},clear:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){var wt=st._dbInfo;wt.db.transaction(function(zt){ei(zt,wt,"DELETE FROM "+wt.storeName,[],function(){Tt()},function(ne,se){bt(se)})})}).catch(bt)});return Z(at,J),at},length:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){var wt=st._dbInfo;wt.db.transaction(function(zt){ei(zt,wt,"SELECT COUNT(key) as c FROM "+wt.storeName,[],function(ne,se){var ae=se.rows.item(0).c;Tt(ae)},function(ne,se){bt(se)})})}).catch(bt)});return Z(at,J),at},key:function(J,st){var at=this,Tt=new k(function(bt,wt){at.ready().then(function(){var zt=at._dbInfo;zt.db.transaction(function(ne){ei(ne,zt,"SELECT key FROM "+zt.storeName+" WHERE id = ? LIMIT 1",[J+1],function(se,ae){var xe=ae.rows.length?ae.rows.item(0).key:null;bt(xe)},function(se,ae){wt(ae)})})}).catch(wt)});return Z(Tt,st),Tt},keys:function(J){var st=this,at=new k(function(Tt,bt){st.ready().then(function(){var wt=st._dbInfo;wt.db.transaction(function(zt){ei(zt,wt,"SELECT key FROM "+wt.storeName,[],function(ne,se){for(var ae=[],xe=0;xe<se.rows.length;xe++)ae.push(se.rows.item(xe).key);Tt(ae)},function(ne,se){bt(se)})})}).catch(bt)});return Z(at,J),at},dropInstance:function(J,st){st=Nt.apply(this,arguments);var at=this.config();(J=typeof J!="function"&&J||{}).name||(J.name=J.name||at.name,J.storeName=J.storeName||at.storeName);var Tt,bt=this;return Z(Tt=J.name?new k(function(wt){var zt;zt=J.name===at.name?bt._dbInfo.db:openDatabase(J.name,"","",0),J.storeName?wt({db:zt,storeNames:[J.storeName]}):wt(ri(zt))}).then(function(wt){return new k(function(zt,ne){wt.db.transaction(function(se){function ae(qe){return new k(function(pi,fi){se.executeSql("DROP TABLE IF EXISTS "+qe,[],function(){pi()},function(Tr,Do){fi(Do)})})}for(var xe=[],Ie=0,Ge=wt.storeNames.length;Ie<Ge;Ie++)xe.push(ae(wt.storeNames[Ie]));k.all(xe).then(function(){zt()}).catch(function(qe){ne(qe)})},function(se){ne(se)})})}):k.reject("Invalid arguments"),st),Tt}};function ki(J,st){var at=J.name+"/";return J.storeName!==st.storeName&&(at+=J.storeName+"/"),at}function Fi(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch{return!0}}()||localStorage.length>0}var Pi={_driver:"localStorageWrapper",_initStorage:function(J){var st={};if(J)for(var at in J)st[at]=J[at];return st.keyPrefix=ki(J,this._defaultConfig),Fi()?(this._dbInfo=st,st.serializer=ui,k.resolve()):k.reject()},_support:function(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(J,st){var at=this,Tt=at.ready().then(function(){for(var bt=at._dbInfo,wt=bt.keyPrefix,zt=wt.length,ne=localStorage.length,se=1,ae=0;ae<ne;ae++){var xe=localStorage.key(ae);if(xe.indexOf(wt)===0){var Ie=localStorage.getItem(xe);if(Ie&&(Ie=bt.serializer.deserialize(Ie)),(Ie=J(Ie,xe.substring(zt),se++))!==void 0)return Ie}}});return Z(Tt,st),Tt},getItem:function(J,st){var at=this;J=Ot(J);var Tt=at.ready().then(function(){var bt=at._dbInfo,wt=localStorage.getItem(bt.keyPrefix+J);return wt&&(wt=bt.serializer.deserialize(wt)),wt});return Z(Tt,st),Tt},setItem:function(J,st,at){var Tt=this;J=Ot(J);var bt=Tt.ready().then(function(){st===void 0&&(st=null);var wt=st;return new k(function(zt,ne){var se=Tt._dbInfo;se.serializer.serialize(st,function(ae,xe){if(xe)ne(xe);else try{localStorage.setItem(se.keyPrefix+J,ae),zt(wt)}catch(Ie){Ie.name!=="QuotaExceededError"&&Ie.name!=="NS_ERROR_DOM_QUOTA_REACHED"||ne(Ie),ne(Ie)}})})});return Z(bt,at),bt},removeItem:function(J,st){var at=this;J=Ot(J);var Tt=at.ready().then(function(){var bt=at._dbInfo;localStorage.removeItem(bt.keyPrefix+J)});return Z(Tt,st),Tt},clear:function(J){var st=this,at=st.ready().then(function(){for(var Tt=st._dbInfo.keyPrefix,bt=localStorage.length-1;bt>=0;bt--){var wt=localStorage.key(bt);wt.indexOf(Tt)===0&&localStorage.removeItem(wt)}});return Z(at,J),at},length:function(J){var st=this.keys().then(function(at){return at.length});return Z(st,J),st},key:function(J,st){var at=this,Tt=at.ready().then(function(){var bt,wt=at._dbInfo;try{bt=localStorage.key(J)}catch{bt=null}return bt&&(bt=bt.substring(wt.keyPrefix.length)),bt});return Z(Tt,st),Tt},keys:function(J){var st=this,at=st.ready().then(function(){for(var Tt=st._dbInfo,bt=localStorage.length,wt=[],zt=0;zt<bt;zt++){var ne=localStorage.key(zt);ne.indexOf(Tt.keyPrefix)===0&&wt.push(ne.substring(Tt.keyPrefix.length))}return wt});return Z(at,J),at},dropInstance:function(J,st){if(st=Nt.apply(this,arguments),!(J=typeof J!="function"&&J||{}).name){var at=this.config();J.name=J.name||at.name,J.storeName=J.storeName||at.storeName}var Tt,bt=this;return Z(Tt=J.name?new k(function(wt){J.storeName?wt(ki(J,bt._defaultConfig)):wt(J.name+"/")}).then(function(wt){for(var zt=localStorage.length-1;zt>=0;zt--){var ne=localStorage.key(zt);ne.indexOf(wt)===0&&localStorage.removeItem(ne)}}):k.reject("Invalid arguments"),st),Tt}},Qi=function(J,st){for(var at,Tt,bt=J.length,wt=0;wt<bt;){if((at=J[wt])===(Tt=st)||typeof at=="number"&&typeof Tt=="number"&&isNaN(at)&&isNaN(Tt))return!0;wt++}return!1},Li=Array.isArray||function(J){return Object.prototype.toString.call(J)==="[object Array]"},Gi={},Nn={},tn={INDEXEDDB:ft,WEBSQL:De,LOCALSTORAGE:Pi},Zn=[tn.INDEXEDDB._driver,tn.WEBSQL._driver,tn.LOCALSTORAGE._driver],Kn=["dropInstance"],ka=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Kn),Ws={description:"",driver:Zn.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function qu(J,st){J[st]=function(){var at=arguments;return J.ready().then(function(){return J[st].apply(J,at)})}}function Ua(){for(var J=1;J<arguments.length;J++){var st=arguments[J];if(st)for(var at in st)st.hasOwnProperty(at)&&(Li(st[at])?arguments[0][at]=st[at].slice():arguments[0][at]=st[at])}return arguments[0]}var to=new(function(){function J(st){for(var at in function(wt,zt){if(!(wt instanceof zt))throw new TypeError("Cannot call a class as a function")}(this,J),tn)if(tn.hasOwnProperty(at)){var Tt=tn[at],bt=Tt._driver;this[at]=bt,Gi[bt]||this.defineDriver(Tt)}this._defaultConfig=Ua({},Ws),this._config=Ua({},this._defaultConfig,st),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return J.prototype.config=function(st){if((st===void 0?"undefined":P(st))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var at in st){if(at==="storeName"&&(st[at]=st[at].replace(/\W/g,"_")),at==="version"&&typeof st[at]!="number")return new Error("Database version must be a number.");this._config[at]=st[at]}return!("driver"in st)||!st.driver||this.setDriver(this._config.driver)}return typeof st=="string"?this._config[st]:this._config},J.prototype.defineDriver=function(st,at,Tt){var bt=new k(function(wt,zt){try{var ne=st._driver,se=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!st._driver)return void zt(se);for(var ae=ka.concat("_initStorage"),xe=0,Ie=ae.length;xe<Ie;xe++){var Ge=ae[xe];if((!Qi(Kn,Ge)||st[Ge])&&typeof st[Ge]!="function")return void zt(se)}(function(){for(var pi=function(Xs){return function(){var Nl=new Error("Method "+Xs+" is not implemented by the current driver"),Yi=k.reject(Nl);return Z(Yi,arguments[arguments.length-1]),Yi}},fi=0,Tr=Kn.length;fi<Tr;fi++){var Do=Kn[fi];st[Do]||(st[Do]=pi(Do))}})();var qe=function(pi){Gi[ne]&&console.info("Redefining LocalForage driver: "+ne),Gi[ne]=st,Nn[ne]=pi,wt()};"_support"in st?st._support&&typeof st._support=="function"?st._support().then(qe,zt):qe(!!st._support):qe(!0)}catch(pi){zt(pi)}});return vt(bt,at,Tt),bt},J.prototype.driver=function(){return this._driver||null},J.prototype.getDriver=function(st,at,Tt){var bt=Gi[st]?k.resolve(Gi[st]):k.reject(new Error("Driver not found."));return vt(bt,at,Tt),bt},J.prototype.getSerializer=function(st){var at=k.resolve(ui);return vt(at,st),at},J.prototype.ready=function(st){var at=this,Tt=at._driverSet.then(function(){return at._ready===null&&(at._ready=at._initDriver()),at._ready});return vt(Tt,st,st),Tt},J.prototype.setDriver=function(st,at,Tt){var bt=this;Li(st)||(st=[st]);var wt=this._getSupportedDrivers(st);function zt(){bt._config.driver=bt.driver()}function ne(ae){return bt._extend(ae),zt(),bt._ready=bt._initStorage(bt._config),bt._ready}var se=this._driverSet!==null?this._driverSet.catch(function(){return k.resolve()}):k.resolve();return this._driverSet=se.then(function(){var ae=wt[0];return bt._dbInfo=null,bt._ready=null,bt.getDriver(ae).then(function(xe){bt._driver=xe._driver,zt(),bt._wrapLibraryMethodsWithReady(),bt._initDriver=function(Ie){return function(){var Ge=0;return function qe(){for(;Ge<Ie.length;){var pi=Ie[Ge];return Ge++,bt._dbInfo=null,bt._ready=null,bt.getDriver(pi).then(ne).catch(qe)}zt();var fi=new Error("No available storage method found.");return bt._driverSet=k.reject(fi),bt._driverSet}()}}(wt)})}).catch(function(){zt();var ae=new Error("No available storage method found.");return bt._driverSet=k.reject(ae),bt._driverSet}),vt(this._driverSet,at,Tt),this._driverSet},J.prototype.supports=function(st){return!!Nn[st]},J.prototype._extend=function(st){Ua(this,st)},J.prototype._getSupportedDrivers=function(st){for(var at=[],Tt=0,bt=st.length;Tt<bt;Tt++){var wt=st[Tt];this.supports(wt)&&at.push(wt)}return at},J.prototype._wrapLibraryMethodsWithReady=function(){for(var st=0,at=ka.length;st<at;st++)qu(this,ka[st])},J.prototype.createInstance=function(st){return new J(st)},J}());ht.exports=to},{3:3}]},{},[4])(4)}).call(this,v(3))},function(T,M,v){var b=v(57),q=v(58);function ht(){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}M.parse=C,M.resolve=function(j,X){return C(j,!1,!0).resolve(X)},M.resolveObject=function(j,X){return j?C(j,!1,!0).resolveObject(X):X},M.format=function(j){return q.isString(j)&&(j=C(j)),j instanceof ht?j.format():ht.prototype.format.call(j)},M.Url=ht;var V=/^([a-z0-9.+-]+:)/i,P=/:[0-9]*$/,W=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
28
|
+
`," "]),k=["'"].concat(z),Z=["%","/","?",";","#"].concat(k),vt=["/","?","#"],Ot=/^[+a-z0-9A-Z_-]{0,63}$/,Nt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},L={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Y=v(59);function C(j,X,K){if(j&&q.isObject(j)&&j instanceof ht)return j;var qt=new ht;return qt.parse(j,X,K),qt}ht.prototype.parse=function(j,X,K){if(!q.isString(j))throw new TypeError("Parameter 'url' must be a string, not "+typeof j);var qt=j.indexOf("?"),ge=qt!==-1&&qt<j.indexOf("#")?"?":"#",Ct=j.split(ge);Ct[0]=Ct[0].replace(/\\/g,"/");var ot=j=Ct.join(ge);if(ot=ot.trim(),!K&&j.split("#").length===1){var yt=W.exec(ot);if(yt)return this.path=ot,this.href=ot,this.pathname=yt[1],yt[2]?(this.search=yt[2],this.query=X?Y.parse(this.search.substr(1)):this.search.substr(1)):X&&(this.search="",this.query={}),this}var Pt=V.exec(ot);if(Pt){var H=(Pt=Pt[0]).toLowerCase();this.protocol=H,ot=ot.substr(Pt.length)}if(K||Pt||ot.match(/^\/\/[^@\/]+@[^@\/]+/)){var ft=ot.substr(0,2)==="//";!ft||Pt&&L[Pt]||(ot=ot.substr(2),this.slashes=!0)}if(!L[Pt]&&(ft||Pt&&!O[Pt])){for(var Et,At,Rt=-1,Wt=0;Wt<vt.length;Wt++)($t=ot.indexOf(vt[Wt]))!==-1&&(Rt===-1||$t<Rt)&&(Rt=$t);for((At=Rt===-1?ot.lastIndexOf("@"):ot.lastIndexOf("@",Rt))!==-1&&(Et=ot.slice(0,At),ot=ot.slice(At+1),this.auth=decodeURIComponent(Et)),Rt=-1,Wt=0;Wt<Z.length;Wt++){var $t;($t=ot.indexOf(Z[Wt]))!==-1&&(Rt===-1||$t<Rt)&&(Rt=$t)}Rt===-1&&(Rt=ot.length),this.host=ot.slice(0,Rt),ot=ot.slice(Rt),this.parseHost(),this.hostname=this.hostname||"";var ye=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ye)for(var me=this.hostname.split(/\./),ui=(Wt=0,me.length);Wt<ui;Wt++){var be=me[Wt];if(be&&!be.match(Ot)){for(var ei="",Ze=0,ri=be.length;Ze<ri;Ze++)be.charCodeAt(Ze)>127?ei+="x":ei+=be[Ze];if(!ei.match(Ot)){var De=me.slice(0,Wt),ki=me.slice(Wt+1),Fi=be.match(Nt);Fi&&(De.push(Fi[1]),ki.unshift(Fi[2])),ki.length&&(ot="/"+ki.join(".")+ot),this.hostname=De.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ye||(this.hostname=b.toASCII(this.hostname));var Pi=this.port?":"+this.port:"",Qi=this.hostname||"";this.host=Qi+Pi,this.href+=this.host,ye&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ot[0]!=="/"&&(ot="/"+ot))}if(!E[H])for(Wt=0,ui=k.length;Wt<ui;Wt++){var Li=k[Wt];if(ot.indexOf(Li)!==-1){var Gi=encodeURIComponent(Li);Gi===Li&&(Gi=escape(Li)),ot=ot.split(Li).join(Gi)}}var Nn=ot.indexOf("#");Nn!==-1&&(this.hash=ot.substr(Nn),ot=ot.slice(0,Nn));var tn=ot.indexOf("?");if(tn!==-1?(this.search=ot.substr(tn),this.query=ot.substr(tn+1),X&&(this.query=Y.parse(this.query)),ot=ot.slice(0,tn)):X&&(this.search="",this.query={}),ot&&(this.pathname=ot),O[H]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Pi=this.pathname||"";var Zn=this.search||"";this.path=Pi+Zn}return this.href=this.format(),this},ht.prototype.format=function(){var j=this.auth||"";j&&(j=(j=encodeURIComponent(j)).replace(/%3A/i,":"),j+="@");var X=this.protocol||"",K=this.pathname||"",qt=this.hash||"",ge=!1,Ct="";this.host?ge=j+this.host:this.hostname&&(ge=j+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ge+=":"+this.port)),this.query&&q.isObject(this.query)&&Object.keys(this.query).length&&(Ct=Y.stringify(this.query));var ot=this.search||Ct&&"?"+Ct||"";return X&&X.substr(-1)!==":"&&(X+=":"),this.slashes||(!X||O[X])&&ge!==!1?(ge="//"+(ge||""),K&&K.charAt(0)!=="/"&&(K="/"+K)):ge||(ge=""),qt&&qt.charAt(0)!=="#"&&(qt="#"+qt),ot&&ot.charAt(0)!=="?"&&(ot="?"+ot),X+ge+(K=K.replace(/[?#]/g,function(yt){return encodeURIComponent(yt)}))+(ot=ot.replace("#","%23"))+qt},ht.prototype.resolve=function(j){return this.resolveObject(C(j,!1,!0)).format()},ht.prototype.resolveObject=function(j){if(q.isString(j)){var X=new ht;X.parse(j,!1,!0),j=X}for(var K=new ht,qt=Object.keys(this),ge=0;ge<qt.length;ge++){var Ct=qt[ge];K[Ct]=this[Ct]}if(K.hash=j.hash,j.href==="")return K.href=K.format(),K;if(j.slashes&&!j.protocol){for(var ot=Object.keys(j),yt=0;yt<ot.length;yt++){var Pt=ot[yt];Pt!=="protocol"&&(K[Pt]=j[Pt])}return O[K.protocol]&&K.hostname&&!K.pathname&&(K.path=K.pathname="/"),K.href=K.format(),K}if(j.protocol&&j.protocol!==K.protocol){if(!O[j.protocol]){for(var H=Object.keys(j),ft=0;ft<H.length;ft++){var Et=H[ft];K[Et]=j[Et]}return K.href=K.format(),K}if(K.protocol=j.protocol,j.host||L[j.protocol])K.pathname=j.pathname;else{for(var At=(j.pathname||"").split("/");At.length&&!(j.host=At.shift()););j.host||(j.host=""),j.hostname||(j.hostname=""),At[0]!==""&&At.unshift(""),At.length<2&&At.unshift(""),K.pathname=At.join("/")}if(K.search=j.search,K.query=j.query,K.host=j.host||"",K.auth=j.auth,K.hostname=j.hostname||j.host,K.port=j.port,K.pathname||K.search){var Rt=K.pathname||"",Wt=K.search||"";K.path=Rt+Wt}return K.slashes=K.slashes||j.slashes,K.href=K.format(),K}var $t=K.pathname&&K.pathname.charAt(0)==="/",ye=j.host||j.pathname&&j.pathname.charAt(0)==="/",me=ye||$t||K.host&&j.pathname,ui=me,be=K.pathname&&K.pathname.split("/")||[],ei=(At=j.pathname&&j.pathname.split("/")||[],K.protocol&&!O[K.protocol]);if(ei&&(K.hostname="",K.port=null,K.host&&(be[0]===""?be[0]=K.host:be.unshift(K.host)),K.host="",j.protocol&&(j.hostname=null,j.port=null,j.host&&(At[0]===""?At[0]=j.host:At.unshift(j.host)),j.host=null),me=me&&(At[0]===""||be[0]==="")),ye)K.host=j.host||j.host===""?j.host:K.host,K.hostname=j.hostname||j.hostname===""?j.hostname:K.hostname,K.search=j.search,K.query=j.query,be=At;else if(At.length)be||(be=[]),be.pop(),be=be.concat(At),K.search=j.search,K.query=j.query;else if(!q.isNullOrUndefined(j.search))return ei&&(K.hostname=K.host=be.shift(),(Fi=!!(K.host&&K.host.indexOf("@")>0)&&K.host.split("@"))&&(K.auth=Fi.shift(),K.host=K.hostname=Fi.shift())),K.search=j.search,K.query=j.query,q.isNull(K.pathname)&&q.isNull(K.search)||(K.path=(K.pathname?K.pathname:"")+(K.search?K.search:"")),K.href=K.format(),K;if(!be.length)return K.pathname=null,K.search?K.path="/"+K.search:K.path=null,K.href=K.format(),K;for(var Ze=be.slice(-1)[0],ri=(K.host||j.host||be.length>1)&&(Ze==="."||Ze==="..")||Ze==="",De=0,ki=be.length;ki>=0;ki--)(Ze=be[ki])==="."?be.splice(ki,1):Ze===".."?(be.splice(ki,1),De++):De&&(be.splice(ki,1),De--);if(!me&&!ui)for(;De--;De)be.unshift("..");!me||be[0]===""||be[0]&&be[0].charAt(0)==="/"||be.unshift(""),ri&&be.join("/").substr(-1)!=="/"&&be.push("");var Fi,Pi=be[0]===""||be[0]&&be[0].charAt(0)==="/";return ei&&(K.hostname=K.host=Pi?"":be.length?be.shift():"",(Fi=!!(K.host&&K.host.indexOf("@")>0)&&K.host.split("@"))&&(K.auth=Fi.shift(),K.host=K.hostname=Fi.shift())),(me=me||K.host&&be.length)&&!Pi&&be.unshift(""),be.length?K.pathname=be.join("/"):(K.pathname=null,K.path=null),q.isNull(K.pathname)&&q.isNull(K.search)||(K.path=(K.pathname?K.pathname:"")+(K.search?K.search:"")),K.auth=j.auth||K.auth,K.slashes=K.slashes||j.slashes,K.href=K.format(),K},ht.prototype.parseHost=function(){var j=this.host,X=P.exec(j);X&&((X=X[0])!==":"&&(this.port=X.substr(1)),j=j.substr(0,j.length-X.length)),j&&(this.hostname=j)}},function(T,M,v){var b=v(62);T.exports=function(q,ht){ht=ht||{};var V=new b,P=ht.inPlace||!1,W=q.map(function(k){return P?k:{width:k.width,height:k.height,item:k}});W=W.sort(function(k,Z){return Z.width*Z.height-k.width*k.height}),V.fit(W);var z={width:W.reduce(function(k,Z){return Math.max(k,Z.x+Z.width)},0),height:W.reduce(function(k,Z){return Math.max(k,Z.y+Z.height)},0)};return P||(z.items=W),z}},function(T,M){T.exports=function(v){return v.webpackPolyfill||(v.deprecate=function(){},v.paths=[],v.children||(v.children=[]),Object.defineProperty(v,"loaded",{enumerable:!0,get:function(){return v.l}}),Object.defineProperty(v,"id",{enumerable:!0,get:function(){return v.i}}),v.webpackPolyfill=1),v}},function(T,M,v){var b=Object.prototype.hasOwnProperty,q="~";function ht(){}function V(k,Z,vt){this.fn=k,this.context=Z,this.once=vt||!1}function P(k,Z,vt,Ot,Nt){if(typeof vt!="function")throw new TypeError("The listener must be a function");var E=new V(vt,Ot||k,Nt),L=q?q+Z:Z;return k._events[L]?k._events[L].fn?k._events[L]=[k._events[L],E]:k._events[L].push(E):(k._events[L]=E,k._eventsCount++),k}function W(k,Z){--k._eventsCount==0?k._events=new ht:delete k._events[Z]}function z(){this._events=new ht,this._eventsCount=0}Object.create&&(ht.prototype=Object.create(null),new ht().__proto__||(q=!1)),z.prototype.eventNames=function(){var k,Z,vt=[];if(this._eventsCount===0)return vt;for(Z in k=this._events)b.call(k,Z)&&vt.push(q?Z.slice(1):Z);return Object.getOwnPropertySymbols?vt.concat(Object.getOwnPropertySymbols(k)):vt},z.prototype.listeners=function(k){var Z=q?q+k:k,vt=this._events[Z];if(!vt)return[];if(vt.fn)return[vt.fn];for(var Ot=0,Nt=vt.length,E=new Array(Nt);Ot<Nt;Ot++)E[Ot]=vt[Ot].fn;return E},z.prototype.listenerCount=function(k){var Z=q?q+k:k,vt=this._events[Z];return vt?vt.fn?1:vt.length:0},z.prototype.emit=function(k,Z,vt,Ot,Nt,E){var L=q?q+k:k;if(!this._events[L])return!1;var O,Y,C=this._events[L],j=arguments.length;if(C.fn){switch(C.once&&this.removeListener(k,C.fn,void 0,!0),j){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,Z),!0;case 3:return C.fn.call(C.context,Z,vt),!0;case 4:return C.fn.call(C.context,Z,vt,Ot),!0;case 5:return C.fn.call(C.context,Z,vt,Ot,Nt),!0;case 6:return C.fn.call(C.context,Z,vt,Ot,Nt,E),!0}for(Y=1,O=new Array(j-1);Y<j;Y++)O[Y-1]=arguments[Y];C.fn.apply(C.context,O)}else{var X,K=C.length;for(Y=0;Y<K;Y++)switch(C[Y].once&&this.removeListener(k,C[Y].fn,void 0,!0),j){case 1:C[Y].fn.call(C[Y].context);break;case 2:C[Y].fn.call(C[Y].context,Z);break;case 3:C[Y].fn.call(C[Y].context,Z,vt);break;case 4:C[Y].fn.call(C[Y].context,Z,vt,Ot);break;default:if(!O)for(X=1,O=new Array(j-1);X<j;X++)O[X-1]=arguments[X];C[Y].fn.apply(C[Y].context,O)}}return!0},z.prototype.on=function(k,Z,vt){return P(this,k,Z,vt,!1)},z.prototype.once=function(k,Z,vt){return P(this,k,Z,vt,!0)},z.prototype.removeListener=function(k,Z,vt,Ot){var Nt=q?q+k:k;if(!this._events[Nt])return this;if(!Z)return W(this,Nt),this;var E=this._events[Nt];if(E.fn)E.fn!==Z||Ot&&!E.once||vt&&E.context!==vt||W(this,Nt);else{for(var L=0,O=[],Y=E.length;L<Y;L++)(E[L].fn!==Z||Ot&&!E[L].once||vt&&E[L].context!==vt)&&O.push(E[L]);O.length?this._events[Nt]=O.length===1?O[0]:O:W(this,Nt)}return this},z.prototype.removeAllListeners=function(k){var Z;return k?(Z=q?q+k:k,this._events[Z]&&W(this,Z)):(this._events=new ht,this._eventsCount=0),this},z.prototype.off=z.prototype.removeListener,z.prototype.addListener=z.prototype.on,z.prefixed=q,z.EventEmitter=z,T.exports=z},function(T,M,v){function b(H,ft,Et){Et=Et||2;var At,Rt,Wt,$t,ye,me,ui,be=ft&&ft.length,ei=be?ft[0]*Et:H.length,Ze=q(H,0,ei,Et,!0),ri=[];if(!Ze||Ze.next===Ze.prev)return ri;if(be&&(Ze=function(ki,Fi,Pi,Qi){var Li,Gi,Nn,tn,Zn,Kn=[];for(Li=0,Gi=Fi.length;Li<Gi;Li++)Nn=Fi[Li]*Qi,tn=Li<Gi-1?Fi[Li+1]*Qi:ki.length,(Zn=q(ki,Nn,tn,Qi,!1))===Zn.next&&(Zn.steiner=!0),Kn.push(E(Zn));for(Kn.sort(Z),Li=0;Li<Kn.length;Li++)Pi=ht(Pi=vt(Kn[Li],Pi),Pi.next);return Pi}(H,ft,Ze,Et)),H.length>80*Et){At=Wt=H[0],Rt=$t=H[1];for(var De=Et;De<ei;De+=Et)(ye=H[De])<At&&(At=ye),(me=H[De+1])<Rt&&(Rt=me),ye>Wt&&(Wt=ye),me>$t&&($t=me);ui=(ui=Math.max(Wt-At,$t-Rt))!==0?1/ui:0}return V(Ze,ri,Et,At,Rt,ui),ri}function q(H,ft,Et,At,Rt){var Wt,$t;if(Rt===Pt(H,ft,Et,At)>0)for(Wt=ft;Wt<Et;Wt+=At)$t=Ct(Wt,H[Wt],H[Wt+1],$t);else for(Wt=Et-At;Wt>=ft;Wt-=At)$t=Ct(Wt,H[Wt],H[Wt+1],$t);return $t&&C($t,$t.next)&&(ot($t),$t=$t.next),$t}function ht(H,ft){if(!H)return H;ft||(ft=H);var Et,At=H;do if(Et=!1,At.steiner||!C(At,At.next)&&Y(At.prev,At,At.next)!==0)At=At.next;else{if(ot(At),(At=ft=At.prev)===At.next)break;Et=!0}while(Et||At!==ft);return ft}function V(H,ft,Et,At,Rt,Wt,$t){if(H){!$t&&Wt&&function(be,ei,Ze,ri){var De=be;do De.z===null&&(De.z=Nt(De.x,De.y,ei,Ze,ri)),De.prevZ=De.prev,De.nextZ=De.next,De=De.next;while(De!==be);De.prevZ.nextZ=null,De.prevZ=null,function(ki){var Fi,Pi,Qi,Li,Gi,Nn,tn,Zn,Kn=1;do{for(Pi=ki,ki=null,Gi=null,Nn=0;Pi;){for(Nn++,Qi=Pi,tn=0,Fi=0;Fi<Kn&&(tn++,Qi=Qi.nextZ);Fi++);for(Zn=Kn;tn>0||Zn>0&&Qi;)tn!==0&&(Zn===0||!Qi||Pi.z<=Qi.z)?(Li=Pi,Pi=Pi.nextZ,tn--):(Li=Qi,Qi=Qi.nextZ,Zn--),Gi?Gi.nextZ=Li:ki=Li,Li.prevZ=Gi,Gi=Li;Pi=Qi}Gi.nextZ=null,Kn*=2}while(Nn>1)}(De)}(H,At,Rt,Wt);for(var ye,me,ui=H;H.prev!==H.next;)if(ye=H.prev,me=H.next,Wt?W(H,At,Rt,Wt):P(H))ft.push(ye.i/Et),ft.push(H.i/Et),ft.push(me.i/Et),ot(H),H=me.next,ui=me.next;else if((H=me)===ui){$t?$t===1?V(H=z(ht(H),ft,Et),ft,Et,At,Rt,Wt,2):$t===2&&k(H,ft,Et,At,Rt,Wt):V(ht(H),ft,Et,At,Rt,Wt,1);break}}}function P(H){var ft=H.prev,Et=H,At=H.next;if(Y(ft,Et,At)>=0)return!1;for(var Rt=H.next.next;Rt!==H.prev;){if(L(ft.x,ft.y,Et.x,Et.y,At.x,At.y,Rt.x,Rt.y)&&Y(Rt.prev,Rt,Rt.next)>=0)return!1;Rt=Rt.next}return!0}function W(H,ft,Et,At){var Rt=H.prev,Wt=H,$t=H.next;if(Y(Rt,Wt,$t)>=0)return!1;for(var ye=Rt.x<Wt.x?Rt.x<$t.x?Rt.x:$t.x:Wt.x<$t.x?Wt.x:$t.x,me=Rt.y<Wt.y?Rt.y<$t.y?Rt.y:$t.y:Wt.y<$t.y?Wt.y:$t.y,ui=Rt.x>Wt.x?Rt.x>$t.x?Rt.x:$t.x:Wt.x>$t.x?Wt.x:$t.x,be=Rt.y>Wt.y?Rt.y>$t.y?Rt.y:$t.y:Wt.y>$t.y?Wt.y:$t.y,ei=Nt(ye,me,ft,Et,At),Ze=Nt(ui,be,ft,Et,At),ri=H.prevZ,De=H.nextZ;ri&&ri.z>=ei&&De&&De.z<=Ze;){if(ri!==H.prev&&ri!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,ri.x,ri.y)&&Y(ri.prev,ri,ri.next)>=0||(ri=ri.prevZ,De!==H.prev&&De!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,De.x,De.y)&&Y(De.prev,De,De.next)>=0))return!1;De=De.nextZ}for(;ri&&ri.z>=ei;){if(ri!==H.prev&&ri!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,ri.x,ri.y)&&Y(ri.prev,ri,ri.next)>=0)return!1;ri=ri.prevZ}for(;De&&De.z<=Ze;){if(De!==H.prev&&De!==H.next&&L(Rt.x,Rt.y,Wt.x,Wt.y,$t.x,$t.y,De.x,De.y)&&Y(De.prev,De,De.next)>=0)return!1;De=De.nextZ}return!0}function z(H,ft,Et){var At=H;do{var Rt=At.prev,Wt=At.next.next;!C(Rt,Wt)&&j(Rt,At,At.next,Wt)&&qt(Rt,Wt)&&qt(Wt,Rt)&&(ft.push(Rt.i/Et),ft.push(At.i/Et),ft.push(Wt.i/Et),ot(At),ot(At.next),At=H=Wt),At=At.next}while(At!==H);return ht(At)}function k(H,ft,Et,At,Rt,Wt){var $t=H;do{for(var ye=$t.next.next;ye!==$t.prev;){if($t.i!==ye.i&&O($t,ye)){var me=ge($t,ye);return $t=ht($t,$t.next),me=ht(me,me.next),V($t,ft,Et,At,Rt,Wt),void V(me,ft,Et,At,Rt,Wt)}ye=ye.next}$t=$t.next}while($t!==H)}function Z(H,ft){return H.x-ft.x}function vt(H,ft){var Et=function(Wt,$t){var ye,me=$t,ui=Wt.x,be=Wt.y,ei=-1/0;do{if(be<=me.y&&be>=me.next.y&&me.next.y!==me.y){var Ze=me.x+(be-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Ze<=ui&&Ze>ei){if(ei=Ze,Ze===ui){if(be===me.y)return me;if(be===me.next.y)return me.next}ye=me.x<me.next.x?me:me.next}}me=me.next}while(me!==$t);if(!ye)return null;if(ui===ei)return ye;var ri,De=ye,ki=ye.x,Fi=ye.y,Pi=1/0;me=ye;do ui>=me.x&&me.x>=ki&&ui!==me.x&&L(be<Fi?ui:ei,be,ki,Fi,be<Fi?ei:ui,be,me.x,me.y)&&(ri=Math.abs(be-me.y)/(ui-me.x),qt(me,Wt)&&(ri<Pi||ri===Pi&&(me.x>ye.x||me.x===ye.x&&Ot(ye,me)))&&(ye=me,Pi=ri)),me=me.next;while(me!==De);return ye}(H,ft);if(!Et)return ft;var At=ge(Et,H),Rt=ht(Et,Et.next);return ht(At,At.next),ft===Et?Rt:ft}function Ot(H,ft){return Y(H.prev,H,ft.prev)<0&&Y(ft.next,H,H.next)<0}function Nt(H,ft,Et,At,Rt){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=32767*(H-Et)*Rt)|H<<8))|H<<4))|H<<2))|H<<1))|(ft=1431655765&((ft=858993459&((ft=252645135&((ft=16711935&((ft=32767*(ft-At)*Rt)|ft<<8))|ft<<4))|ft<<2))|ft<<1))<<1}function E(H){var ft=H,Et=H;do(ft.x<Et.x||ft.x===Et.x&&ft.y<Et.y)&&(Et=ft),ft=ft.next;while(ft!==H);return Et}function L(H,ft,Et,At,Rt,Wt,$t,ye){return(Rt-$t)*(ft-ye)-(H-$t)*(Wt-ye)>=0&&(H-$t)*(At-ye)-(Et-$t)*(ft-ye)>=0&&(Et-$t)*(Wt-ye)-(Rt-$t)*(At-ye)>=0}function O(H,ft){return H.next.i!==ft.i&&H.prev.i!==ft.i&&!function(Et,At){var Rt=Et;do{if(Rt.i!==Et.i&&Rt.next.i!==Et.i&&Rt.i!==At.i&&Rt.next.i!==At.i&&j(Rt,Rt.next,Et,At))return!0;Rt=Rt.next}while(Rt!==Et);return!1}(H,ft)&&(qt(H,ft)&&qt(ft,H)&&function(Et,At){var Rt=Et,Wt=!1,$t=(Et.x+At.x)/2,ye=(Et.y+At.y)/2;do Rt.y>ye!=Rt.next.y>ye&&Rt.next.y!==Rt.y&&$t<(Rt.next.x-Rt.x)*(ye-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(Wt=!Wt),Rt=Rt.next;while(Rt!==Et);return Wt}(H,ft)&&(Y(H.prev,H,ft.prev)||Y(H,ft.prev,ft))||C(H,ft)&&Y(H.prev,H,H.next)>0&&Y(ft.prev,ft,ft.next)>0)}function Y(H,ft,Et){return(ft.y-H.y)*(Et.x-ft.x)-(ft.x-H.x)*(Et.y-ft.y)}function C(H,ft){return H.x===ft.x&&H.y===ft.y}function j(H,ft,Et,At){var Rt=K(Y(H,ft,Et)),Wt=K(Y(H,ft,At)),$t=K(Y(Et,At,H)),ye=K(Y(Et,At,ft));return Rt!==Wt&&$t!==ye||!(Rt!==0||!X(H,Et,ft))||!(Wt!==0||!X(H,At,ft))||!($t!==0||!X(Et,H,At))||!(ye!==0||!X(Et,ft,At))}function X(H,ft,Et){return ft.x<=Math.max(H.x,Et.x)&&ft.x>=Math.min(H.x,Et.x)&&ft.y<=Math.max(H.y,Et.y)&&ft.y>=Math.min(H.y,Et.y)}function K(H){return H>0?1:H<0?-1:0}function qt(H,ft){return Y(H.prev,H,H.next)<0?Y(H,ft,H.next)>=0&&Y(H,H.prev,ft)>=0:Y(H,ft,H.prev)<0||Y(H,H.next,ft)<0}function ge(H,ft){var Et=new yt(H.i,H.x,H.y),At=new yt(ft.i,ft.x,ft.y),Rt=H.next,Wt=ft.prev;return H.next=ft,ft.prev=H,Et.next=Rt,Rt.prev=Et,At.next=Et,Et.prev=At,Wt.next=At,At.prev=Wt,At}function Ct(H,ft,Et,At){var Rt=new yt(H,ft,Et);return At?(Rt.next=At.next,Rt.prev=At,At.next.prev=Rt,At.next=Rt):(Rt.prev=Rt,Rt.next=Rt),Rt}function ot(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function yt(H,ft,Et){this.i=H,this.x=ft,this.y=Et,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Pt(H,ft,Et,At){for(var Rt=0,Wt=ft,$t=Et-At;Wt<Et;Wt+=At)Rt+=(H[$t]-H[Wt])*(H[Wt+1]+H[$t+1]),$t=Wt;return Rt}T.exports=b,T.exports.default=b,b.deviation=function(H,ft,Et,At){var Rt=ft&&ft.length,Wt=Rt?ft[0]*Et:H.length,$t=Math.abs(Pt(H,0,Wt,Et));if(Rt)for(var ye=0,me=ft.length;ye<me;ye++){var ui=ft[ye]*Et,be=ye<me-1?ft[ye+1]*Et:H.length;$t-=Math.abs(Pt(H,ui,be,Et))}var ei=0;for(ye=0;ye<At.length;ye+=3){var Ze=At[ye]*Et,ri=At[ye+1]*Et,De=At[ye+2]*Et;ei+=Math.abs((H[Ze]-H[De])*(H[ri+1]-H[Ze+1])-(H[Ze]-H[ri])*(H[De+1]-H[Ze+1]))}return $t===0&&ei===0?0:Math.abs((ei-$t)/$t)},b.flatten=function(H){for(var ft=H[0][0].length,Et={vertices:[],holes:[],dimensions:ft},At=0,Rt=0;Rt<H.length;Rt++){for(var Wt=0;Wt<H[Rt].length;Wt++)for(var $t=0;$t<ft;$t++)Et.vertices.push(H[Rt][Wt][$t]);Rt>0&&(At+=H[Rt-1].length,Et.holes.push(At))}return Et}},function(T,M){T.exports=`varying vec2 vUv;
|
|
29
29
|
void main() {
|
|
30
30
|
vUv = uv;
|
|
31
31
|
gl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);
|
|
@@ -1663,11 +1663,11 @@ void main() {
|
|
|
1663
1663
|
vec4 distColor = texture2D(textureNext, vUv);
|
|
1664
1664
|
gl_FragColor = timePercent < 0.5 ? srcColor : distColor;
|
|
1665
1665
|
}
|
|
1666
|
-
`},function(T,M,v){(function(b){var q=v(44),ht=v(45),
|
|
1666
|
+
`},function(T,M,v){(function(b){var q=v(44),ht=v(45),V=setTimeout,P=b!==void 0?b:null;function W(O){return Boolean(O&&O.length!==void 0)}function z(){}function k(O){if(!(this instanceof k))throw new TypeError("Promises must be constructed via new");if(typeof O!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],L(O,this)}function Z(O,Y){for(;O._state===3;)O=O._value;O._state!==0?(O._handled=!0,k._immediateFn(function(){var C=O._state===1?Y.onFulfilled:Y.onRejected;if(C!==null){var j;try{j=C(O._value)}catch(X){return void Ot(Y.promise,X)}vt(Y.promise,j)}else(O._state===1?vt:Ot)(Y.promise,O._value)})):O._deferreds.push(Y)}function vt(O,Y){try{if(Y===O)throw new TypeError("A promise cannot be resolved with itself.");if(Y&&(typeof Y=="object"||typeof Y=="function")){var C=Y.then;if(Y instanceof k)return O._state=3,O._value=Y,void Nt(O);if(typeof C=="function")return void L((j=C,X=Y,function(){j.apply(X,arguments)}),O)}O._state=1,O._value=Y,Nt(O)}catch(K){Ot(O,K)}var j,X}function Ot(O,Y){O._state=2,O._value=Y,Nt(O)}function Nt(O){O._state===2&&O._deferreds.length===0&&k._immediateFn(function(){O._handled||k._unhandledRejectionFn(O._value)});for(var Y=0,C=O._deferreds.length;Y<C;Y++)Z(O,O._deferreds[Y]);O._deferreds=null}function E(O,Y,C){this.onFulfilled=typeof O=="function"?O:null,this.onRejected=typeof Y=="function"?Y:null,this.promise=C}function L(O,Y){var C=!1;try{O(function(j){C||(C=!0,vt(Y,j))},function(j){C||(C=!0,Ot(Y,j))})}catch(j){if(C)return;C=!0,Ot(Y,j)}}k.prototype.catch=function(O){return this.then(null,O)},k.prototype.then=function(O,Y){var C=new this.constructor(z);return Z(this,new E(O,Y,C)),C},k.prototype.finally=q.a,k.all=function(O){return new k(function(Y,C){if(!W(O))return C(new TypeError("Promise.all accepts an array"));var j=Array.prototype.slice.call(O);if(j.length===0)return Y([]);var X=j.length;function K(ge,Ct){try{if(Ct&&(typeof Ct=="object"||typeof Ct=="function")){var ot=Ct.then;if(typeof ot=="function")return void ot.call(Ct,function(yt){K(ge,yt)},C)}j[ge]=Ct,--X==0&&Y(j)}catch(yt){C(yt)}}for(var qt=0;qt<j.length;qt++)K(qt,j[qt])})},k.allSettled=ht.a,k.resolve=function(O){return O&&typeof O=="object"&&O.constructor===k?O:new k(function(Y){Y(O)})},k.reject=function(O){return new k(function(Y,C){C(O)})},k.race=function(O){return new k(function(Y,C){if(!W(O))return C(new TypeError("Promise.race accepts an array"));for(var j=0,X=O.length;j<X;j++)k.resolve(O[j]).then(Y,C)})},k._immediateFn=typeof P=="function"&&function(O){P(O)}||function(O){V(O,0)},k._unhandledRejectionFn=function(O){typeof console!="undefined"&&console&&console.warn("Possible Unhandled Promise Rejection:",O)},M.a=k}).call(this,v(54).setImmediate)},function(T,M,v){M.a=function(b){var q=this.constructor;return this.then(function(ht){return q.resolve(b()).then(function(){return ht})},function(ht){return q.resolve(b()).then(function(){return q.reject(ht)})})}},function(T,M,v){M.a=function(b){return new this(function(q,ht){if(!b||b.length===void 0)return ht(new TypeError(typeof b+" "+b+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var V=Array.prototype.slice.call(b);if(V.length===0)return q([]);var P=V.length;function W(k,Z){if(Z&&(typeof Z=="object"||typeof Z=="function")){var vt=Z.then;if(typeof vt=="function")return void vt.call(Z,function(Ot){W(k,Ot)},function(Ot){V[k]={status:"rejected",reason:Ot},--P==0&&q(V)})}V[k]={status:"fulfilled",value:Z},--P==0&&q(V)}for(var z=0;z<V.length;z++)W(z,V[z])})}},function(T,M,v){/*
|
|
1667
1667
|
object-assign
|
|
1668
1668
|
(c) Sindre Sorhus
|
|
1669
1669
|
@license MIT
|
|
1670
|
-
*/var b=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable;function
|
|
1670
|
+
*/var b=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable;function V(P){if(P==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(P)}T.exports=function(){try{if(!Object.assign)return!1;var P=new String("abc");if(P[5]="de",Object.getOwnPropertyNames(P)[0]==="5")return!1;for(var W={},z=0;z<10;z++)W["_"+String.fromCharCode(z)]=z;if(Object.getOwnPropertyNames(W).map(function(Z){return W[Z]}).join("")!=="0123456789")return!1;var k={};return"abcdefghijklmnopqrst".split("").forEach(function(Z){k[Z]=Z}),Object.keys(Object.assign({},k)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(P,W){for(var z,k,Z=V(P),vt=1;vt<arguments.length;vt++){for(var Ot in z=Object(arguments[vt]))q.call(z,Ot)&&(Z[Ot]=z[Ot]);if(b){k=b(z);for(var Nt=0;Nt<k.length;Nt++)ht.call(z,k[Nt])&&(Z[k[Nt]]=z[k[Nt]])}}return Z}},function(T,M){T.exports=`precision mediump float;
|
|
1671
1671
|
attribute vec2 aVertexPosition;
|
|
1672
1672
|
uniform mat3 projectionMatrix;
|
|
1673
1673
|
varying vec2 vTextureCoord;
|
|
@@ -1716,7 +1716,7 @@ void main() {
|
|
|
1716
1716
|
* goldfirestudios.com
|
|
1717
1717
|
*
|
|
1718
1718
|
* MIT License
|
|
1719
|
-
*/(function(){var ht=function(){this.init()};ht.prototype={init:function(){var E=this||W;return E._counter=1e3,E._html5AudioPool=[],E.html5PoolSize=10,E._codecs={},E._howls=[],E._muted=!1,E._volume=1,E._canPlayEvent="canplaythrough",E._navigator=typeof window!="undefined"&&window.navigator?window.navigator:null,E.masterGain=null,E.noAudio=!1,E.usingWebAudio=!0,E.autoSuspend=!0,E.ctx=null,E.autoUnlock=!0,E._setup(),E},volume:function(E){var L=this||W;if(E=parseFloat(E),L.ctx||Nt(),E!==void 0&&E>=0&&E<=1){if(L._volume=E,L._muted)return L;L.usingWebAudio&&L.masterGain.gain.setValueAtTime(E,W.ctx.currentTime);for(var O=0;O<L._howls.length;O++)if(!L._howls[O]._webAudio)for(var Y=L._howls[O]._getSoundIds(),C=0;C<Y.length;C++){var j=L._howls[O]._soundById(Y[C]);j&&j._node&&(j._node.volume=j._volume*E)}return L}return L._volume},mute:function(E){var L=this||W;L.ctx||Nt(),L._muted=E,L.usingWebAudio&&L.masterGain.gain.setValueAtTime(E?0:L._volume,W.ctx.currentTime);for(var O=0;O<L._howls.length;O++)if(!L._howls[O]._webAudio)for(var Y=L._howls[O]._getSoundIds(),C=0;C<Y.length;C++){var j=L._howls[O]._soundById(Y[C]);j&&j._node&&(j._node.muted=!!E||j._muted)}return L},stop:function(){for(var E=this||W,L=0;L<E._howls.length;L++)E._howls[L].stop();return E},unload:function(){for(var E=this||W,L=E._howls.length-1;L>=0;L--)E._howls[L].unload();return E.usingWebAudio&&E.ctx&&E.ctx.close!==void 0&&(E.ctx.close(),E.ctx=null,Nt()),E},codecs:function(E){return(this||W)._codecs[E.replace(/^x-/,"")]},_setup:function(){var E=this||W;if(E.state=E.ctx&&E.ctx.state||"suspended",E._autoSuspend(),!E.usingWebAudio)if(typeof Audio!="undefined")try{new Audio().oncanplaythrough===void 0&&(E._canPlayEvent="canplay")}catch{E.noAudio=!0}else E.noAudio=!0;try{new Audio().muted&&(E.noAudio=!0)}catch{}return E.noAudio||E._setupCodecs(),E},_setupCodecs:function(){var E=this||W,L=null;try{L=typeof Audio!="undefined"?new Audio:null}catch{return E}if(!L||typeof L.canPlayType!="function")return E;var O=L.canPlayType("audio/mpeg;").replace(/^no$/,""),Y=E._navigator?E._navigator.userAgent:"",C=Y.match(/OPR\/([0-6].)/g),j=C&&parseInt(C[0].split("/")[1],10)<33,X=Y.indexOf("Safari")!==-1&&Y.indexOf("Chrome")===-1,K=Y.match(/Version\/(.*?) /),qt=X&&K&&parseInt(K[1],10)<15;return E._codecs={mp3:!(j||!O&&!L.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!O,opus:!!L.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!L.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!L.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(L.canPlayType('audio/wav; codecs="1"')||L.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!L.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!L.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(L.canPlayType("audio/x-m4a;")||L.canPlayType("audio/m4a;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(L.canPlayType("audio/x-m4b;")||L.canPlayType("audio/m4b;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(L.canPlayType("audio/x-mp4;")||L.canPlayType("audio/mp4;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(qt||!L.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(qt||!L.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!L.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(L.canPlayType("audio/x-flac;")||L.canPlayType("audio/flac;")).replace(/^no$/,"")},E},_unlockAudio:function(){var E=this||W;if(!E._audioUnlocked&&E.ctx){E._audioUnlocked=!1,E.autoUnlock=!1,E._mobileUnloaded||E.ctx.sampleRate===44100||(E._mobileUnloaded=!0,E.unload()),E._scratchBuffer=E.ctx.createBuffer(1,1,22050);var L=function(O){for(;E._html5AudioPool.length<E.html5PoolSize;)try{var Y=new Audio;Y._unlocked=!0,E._releaseHtml5Audio(Y)}catch{E.noAudio=!0;break}for(var C=0;C<E._howls.length;C++)if(!E._howls[C]._webAudio)for(var j=E._howls[C]._getSoundIds(),X=0;X<j.length;X++){var K=E._howls[C]._soundById(j[X]);K&&K._node&&!K._node._unlocked&&(K._node._unlocked=!0,K._node.load())}E._autoResume();var qt=E.ctx.createBufferSource();qt.buffer=E._scratchBuffer,qt.connect(E.ctx.destination),qt.start===void 0?qt.noteOn(0):qt.start(0),typeof E.ctx.resume=="function"&&E.ctx.resume(),qt.onended=function(){qt.disconnect(0),E._audioUnlocked=!0,document.removeEventListener("touchstart",L,!0),document.removeEventListener("touchend",L,!0),document.removeEventListener("click",L,!0),document.removeEventListener("keydown",L,!0);for(var ge=0;ge<E._howls.length;ge++)E._howls[ge]._emit("unlock")}};return document.addEventListener("touchstart",L,!0),document.addEventListener("touchend",L,!0),document.addEventListener("click",L,!0),document.addEventListener("keydown",L,!0),E}},_obtainHtml5Audio:function(){var E=this||W;if(E._html5AudioPool.length)return E._html5AudioPool.pop();var L=new Audio().play();return L&&typeof Promise!="undefined"&&(L instanceof Promise||typeof L.then=="function")&&L.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(E){var L=this||W;return E._unlocked&&L._html5AudioPool.push(E),L},_autoSuspend:function(){var E=this;if(E.autoSuspend&&E.ctx&&E.ctx.suspend!==void 0&&W.usingWebAudio){for(var L=0;L<E._howls.length;L++)if(E._howls[L]._webAudio){for(var O=0;O<E._howls[L]._sounds.length;O++)if(!E._howls[L]._sounds[O]._paused)return E}return E._suspendTimer&&clearTimeout(E._suspendTimer),E._suspendTimer=setTimeout(function(){if(E.autoSuspend){E._suspendTimer=null,E.state="suspending";var Y=function(){E.state="suspended",E._resumeAfterSuspend&&(delete E._resumeAfterSuspend,E._autoResume())};E.ctx.suspend().then(Y,Y)}},3e4),E}},_autoResume:function(){var E=this;if(E.ctx&&E.ctx.resume!==void 0&&W.usingWebAudio)return E.state==="running"&&E.ctx.state!=="interrupted"&&E._suspendTimer?(clearTimeout(E._suspendTimer),E._suspendTimer=null):E.state==="suspended"||E.state==="running"&&E.ctx.state==="interrupted"?(E.ctx.resume().then(function(){E.state="running";for(var L=0;L<E._howls.length;L++)E._howls[L]._emit("resume")}),E._suspendTimer&&(clearTimeout(E._suspendTimer),E._suspendTimer=null)):E.state==="suspending"&&(E._resumeAfterSuspend=!0),E}};var W=new ht,P=function(E){E.src&&E.src.length!==0?this.init(E):console.error("An array of source files must be passed with any new Howl.")};P.prototype={init:function(E){var L=this;return W.ctx||Nt(),L._autoplay=E.autoplay||!1,L._format=typeof E.format!="string"?E.format:[E.format],L._html5=E.html5||!1,L._muted=E.mute||!1,L._loop=E.loop||!1,L._pool=E.pool||5,L._preload=typeof E.preload!="boolean"&&E.preload!=="metadata"||E.preload,L._rate=E.rate||1,L._sprite=E.sprite||{},L._src=typeof E.src!="string"?E.src:[E.src],L._volume=E.volume!==void 0?E.volume:1,L._xhr={method:E.xhr&&E.xhr.method?E.xhr.method:"GET",headers:E.xhr&&E.xhr.headers?E.xhr.headers:null,withCredentials:!(!E.xhr||!E.xhr.withCredentials)&&E.xhr.withCredentials},L._duration=0,L._state="unloaded",L._sounds=[],L._endTimers={},L._queue=[],L._playLock=!1,L._onend=E.onend?[{fn:E.onend}]:[],L._onfade=E.onfade?[{fn:E.onfade}]:[],L._onload=E.onload?[{fn:E.onload}]:[],L._onloaderror=E.onloaderror?[{fn:E.onloaderror}]:[],L._onplayerror=E.onplayerror?[{fn:E.onplayerror}]:[],L._onpause=E.onpause?[{fn:E.onpause}]:[],L._onplay=E.onplay?[{fn:E.onplay}]:[],L._onstop=E.onstop?[{fn:E.onstop}]:[],L._onmute=E.onmute?[{fn:E.onmute}]:[],L._onvolume=E.onvolume?[{fn:E.onvolume}]:[],L._onrate=E.onrate?[{fn:E.onrate}]:[],L._onseek=E.onseek?[{fn:E.onseek}]:[],L._onunlock=E.onunlock?[{fn:E.onunlock}]:[],L._onresume=[],L._webAudio=W.usingWebAudio&&!L._html5,W.ctx!==void 0&&W.ctx&&W.autoUnlock&&W._unlockAudio(),W._howls.push(L),L._autoplay&&L._queue.push({event:"play",action:function(){L.play()}}),L._preload&&L._preload!=="none"&&L.load(),L},load:function(){var E=null;if(W.noAudio)this._emit("loaderror",null,"No audio support.");else{typeof this._src=="string"&&(this._src=[this._src]);for(var L=0;L<this._src.length;L++){var O,Y;if(this._format&&this._format[L])O=this._format[L];else{if(typeof(Y=this._src[L])!="string"){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(O=/^data:audio\/([^;,]+);/i.exec(Y))||(O=/\.([^.]+)$/.exec(Y.split("?",1)[0])),O&&(O=O[1].toLowerCase())}if(O||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),O&&W.codecs(O)){E=this._src[L];break}}if(E)return this._src=E,this._state="loading",window.location.protocol==="https:"&&E.slice(0,5)==="http:"&&(this._html5=!0,this._webAudio=!1),new V(this),this._webAudio&&k(this),this;this._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(E,L){var O=this,Y=null;if(typeof E=="number")Y=E,E=null;else{if(typeof E=="string"&&O._state==="loaded"&&!O._sprite[E])return null;if(E===void 0&&(E="__default",!O._playLock)){for(var C=0,j=0;j<O._sounds.length;j++)O._sounds[j]._paused&&!O._sounds[j]._ended&&(C++,Y=O._sounds[j]._id);C===1?E=null:Y=null}}var X=Y?O._soundById(Y):O._inactiveSound();if(!X)return null;if(Y&&!E&&(E=X._sprite||"__default"),O._state!=="loaded"){X._sprite=E,X._ended=!1;var K=X._id;return O._queue.push({event:"play",action:function(){O.play(K)}}),K}if(Y&&!X._paused)return L||O._loadQueue("play"),X._id;O._webAudio&&W._autoResume();var qt=Math.max(0,X._seek>0?X._seek:O._sprite[E][0]/1e3),ge=Math.max(0,(O._sprite[E][0]+O._sprite[E][1])/1e3-qt),Ct=1e3*ge/Math.abs(X._rate),ot=O._sprite[E][0]/1e3,yt=(O._sprite[E][0]+O._sprite[E][1])/1e3;X._sprite=E,X._ended=!1;var Pt=function(){X._paused=!1,X._seek=qt,X._start=ot,X._stop=yt,X._loop=!(!X._loop&&!O._sprite[E][2])};if(!(qt>=yt)){var H=X._node;if(O._webAudio){var ft=function(){O._playLock=!1,Pt(),O._refreshBuffer(X);var Wt=X._muted||O._muted?0:X._volume;H.gain.setValueAtTime(Wt,W.ctx.currentTime),X._playStart=W.ctx.currentTime,H.bufferSource.start===void 0?X._loop?H.bufferSource.noteGrainOn(0,qt,86400):H.bufferSource.noteGrainOn(0,qt,ge):X._loop?H.bufferSource.start(0,qt,86400):H.bufferSource.start(0,qt,ge),Ct!==1/0&&(O._endTimers[X._id]=setTimeout(O._ended.bind(O,X),Ct)),L||setTimeout(function(){O._emit("play",X._id),O._loadQueue()},0)};W.state==="running"&&W.ctx.state!=="interrupted"?ft():(O._playLock=!0,O.once("resume",ft),O._clearTimer(X._id))}else{var Et=function(){H.currentTime=qt,H.muted=X._muted||O._muted||W._muted||H.muted,H.volume=X._volume*W.volume(),H.playbackRate=X._rate;try{var Wt=H.play();if(Wt&&typeof Promise!="undefined"&&(Wt instanceof Promise||typeof Wt.then=="function")?(O._playLock=!0,Pt(),Wt.then(function(){O._playLock=!1,H._unlocked=!0,L?O._loadQueue():O._emit("play",X._id)}).catch(function(){O._playLock=!1,O._emit("playerror",X._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),X._ended=!0,X._paused=!0})):L||(O._playLock=!1,Pt(),O._emit("play",X._id)),H.playbackRate=X._rate,H.paused)return void O._emit("playerror",X._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");E!=="__default"||X._loop?O._endTimers[X._id]=setTimeout(O._ended.bind(O,X),Ct):(O._endTimers[X._id]=function(){O._ended(X),H.removeEventListener("ended",O._endTimers[X._id],!1)},H.addEventListener("ended",O._endTimers[X._id],!1))}catch($t){O._emit("playerror",X._id,$t)}};H.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(H.src=O._src,H.load());var At=window&&window.ejecta||!H.readyState&&W._navigator.isCocoonJS;if(H.readyState>=3||At)Et();else{O._playLock=!0,O._state="loading";var Rt=function(){O._state="loaded",Et(),H.removeEventListener(W._canPlayEvent,Rt,!1)};H.addEventListener(W._canPlayEvent,Rt,!1),O._clearTimer(X._id)}}return X._id}O._ended(X)},pause:function(E){var L=this;if(L._state!=="loaded"||L._playLock)return L._queue.push({event:"pause",action:function(){L.pause(E)}}),L;for(var O=L._getSoundIds(E),Y=0;Y<O.length;Y++){L._clearTimer(O[Y]);var C=L._soundById(O[Y]);if(C&&!C._paused&&(C._seek=L.seek(O[Y]),C._rateSeek=0,C._paused=!0,L._stopFade(O[Y]),C._node))if(L._webAudio){if(!C._node.bufferSource)continue;C._node.bufferSource.stop===void 0?C._node.bufferSource.noteOff(0):C._node.bufferSource.stop(0),L._cleanBuffer(C._node)}else isNaN(C._node.duration)&&C._node.duration!==1/0||C._node.pause();arguments[1]||L._emit("pause",C?C._id:null)}return L},stop:function(E,L){var O=this;if(O._state!=="loaded"||O._playLock)return O._queue.push({event:"stop",action:function(){O.stop(E)}}),O;for(var Y=O._getSoundIds(E),C=0;C<Y.length;C++){O._clearTimer(Y[C]);var j=O._soundById(Y[C]);j&&(j._seek=j._start||0,j._rateSeek=0,j._paused=!0,j._ended=!0,O._stopFade(Y[C]),j._node&&(O._webAudio?j._node.bufferSource&&(j._node.bufferSource.stop===void 0?j._node.bufferSource.noteOff(0):j._node.bufferSource.stop(0),O._cleanBuffer(j._node)):isNaN(j._node.duration)&&j._node.duration!==1/0||(j._node.currentTime=j._start||0,j._node.pause(),j._node.duration===1/0&&O._clearSound(j._node))),L||O._emit("stop",j._id))}return O},mute:function(E,L){var O=this;if(O._state!=="loaded"||O._playLock)return O._queue.push({event:"mute",action:function(){O.mute(E,L)}}),O;if(L===void 0){if(typeof E!="boolean")return O._muted;O._muted=E}for(var Y=O._getSoundIds(L),C=0;C<Y.length;C++){var j=O._soundById(Y[C]);j&&(j._muted=E,j._interval&&O._stopFade(j._id),O._webAudio&&j._node?j._node.gain.setValueAtTime(E?0:j._volume,W.ctx.currentTime):j._node&&(j._node.muted=!!W._muted||E),O._emit("mute",j._id))}return O},volume:function(){var E,L,O,Y=this,C=arguments;if(C.length===0)return Y._volume;if(C.length===1||C.length===2&&C[1]===void 0){var j=Y._getSoundIds(),X=j.indexOf(C[0]);X>=0?L=parseInt(C[0],10):E=parseFloat(C[0])}else C.length>=2&&(E=parseFloat(C[0]),L=parseInt(C[1],10));if(!(E!==void 0&&E>=0&&E<=1))return(O=L?Y._soundById(L):Y._sounds[0])?O._volume:0;if(Y._state!=="loaded"||Y._playLock)return Y._queue.push({event:"volume",action:function(){Y.volume.apply(Y,C)}}),Y;L===void 0&&(Y._volume=E),L=Y._getSoundIds(L);for(var K=0;K<L.length;K++)(O=Y._soundById(L[K]))&&(O._volume=E,C[2]||Y._stopFade(L[K]),Y._webAudio&&O._node&&!O._muted?O._node.gain.setValueAtTime(E,W.ctx.currentTime):O._node&&!O._muted&&(O._node.volume=E*W.volume()),Y._emit("volume",O._id));return Y},fade:function(E,L,O,Y){var C=this;if(C._state!=="loaded"||C._playLock)return C._queue.push({event:"fade",action:function(){C.fade(E,L,O,Y)}}),C;E=Math.min(Math.max(0,parseFloat(E)),1),L=Math.min(Math.max(0,parseFloat(L)),1),O=parseFloat(O),C.volume(E,Y);for(var j=C._getSoundIds(Y),X=0;X<j.length;X++){var K=C._soundById(j[X]);if(K){if(Y||C._stopFade(j[X]),C._webAudio&&!K._muted){var qt=W.ctx.currentTime,ge=qt+O/1e3;K._volume=E,K._node.gain.setValueAtTime(E,qt),K._node.gain.linearRampToValueAtTime(L,ge)}C._startFadeInterval(K,E,L,O,j[X],Y===void 0)}}return C},_startFadeInterval:function(E,L,O,Y,C,j){var X=this,K=L,qt=O-L,ge=Math.abs(qt/.01),Ct=Math.max(4,ge>0?Y/ge:Y),ot=Date.now();E._fadeTo=O,E._interval=setInterval(function(){var yt=(Date.now()-ot)/Y;ot=Date.now(),K+=qt*yt,K=Math.round(100*K)/100,K=qt<0?Math.max(O,K):Math.min(O,K),X._webAudio?E._volume=K:X.volume(K,E._id,!0),j&&(X._volume=K),(O<L&&K<=O||O>L&&K>=O)&&(clearInterval(E._interval),E._interval=null,E._fadeTo=null,X.volume(O,E._id),X._emit("fade",E._id))},Ct)},_stopFade:function(E){var L=this._soundById(E);return L&&L._interval&&(this._webAudio&&L._node.gain.cancelScheduledValues(W.ctx.currentTime),clearInterval(L._interval),L._interval=null,this.volume(L._fadeTo,E),L._fadeTo=null,this._emit("fade",E)),this},loop:function(){var E,L,O,Y=this,C=arguments;if(C.length===0)return Y._loop;if(C.length===1){if(typeof C[0]!="boolean")return!!(O=Y._soundById(parseInt(C[0],10)))&&O._loop;E=C[0],Y._loop=E}else C.length===2&&(E=C[0],L=parseInt(C[1],10));for(var j=Y._getSoundIds(L),X=0;X<j.length;X++)(O=Y._soundById(j[X]))&&(O._loop=E,Y._webAudio&&O._node&&O._node.bufferSource&&(O._node.bufferSource.loop=E,E&&(O._node.bufferSource.loopStart=O._start||0,O._node.bufferSource.loopEnd=O._stop,Y.playing(j[X])&&(Y.pause(j[X],!0),Y.play(j[X],!0)))));return Y},rate:function(){var E,L,O,Y=this,C=arguments;if(C.length===0)L=Y._sounds[0]._id;else if(C.length===1){var j=Y._getSoundIds(),X=j.indexOf(C[0]);X>=0?L=parseInt(C[0],10):E=parseFloat(C[0])}else C.length===2&&(E=parseFloat(C[0]),L=parseInt(C[1],10));if(typeof E!="number")return(O=Y._soundById(L))?O._rate:Y._rate;if(Y._state!=="loaded"||Y._playLock)return Y._queue.push({event:"rate",action:function(){Y.rate.apply(Y,C)}}),Y;L===void 0&&(Y._rate=E),L=Y._getSoundIds(L);for(var K=0;K<L.length;K++)if(O=Y._soundById(L[K])){Y.playing(L[K])&&(O._rateSeek=Y.seek(L[K]),O._playStart=Y._webAudio?W.ctx.currentTime:O._playStart),O._rate=E,Y._webAudio&&O._node&&O._node.bufferSource?O._node.bufferSource.playbackRate.setValueAtTime(E,W.ctx.currentTime):O._node&&(O._node.playbackRate=E);var qt=Y.seek(L[K]),ge=(Y._sprite[O._sprite][0]+Y._sprite[O._sprite][1])/1e3-qt,Ct=1e3*ge/Math.abs(O._rate);!Y._endTimers[L[K]]&&O._paused||(Y._clearTimer(L[K]),Y._endTimers[L[K]]=setTimeout(Y._ended.bind(Y,O),Ct)),Y._emit("rate",O._id)}return Y},seek:function(){var E,L,O=this,Y=arguments;if(Y.length===0)O._sounds.length&&(L=O._sounds[0]._id);else if(Y.length===1){var C=O._getSoundIds(),j=C.indexOf(Y[0]);j>=0?L=parseInt(Y[0],10):O._sounds.length&&(L=O._sounds[0]._id,E=parseFloat(Y[0]))}else Y.length===2&&(E=parseFloat(Y[0]),L=parseInt(Y[1],10));if(L===void 0)return 0;if(typeof E=="number"&&(O._state!=="loaded"||O._playLock))return O._queue.push({event:"seek",action:function(){O.seek.apply(O,Y)}}),O;var X=O._soundById(L);if(X){if(!(typeof E=="number"&&E>=0)){if(O._webAudio){var K=O.playing(L)?W.ctx.currentTime-X._playStart:0,qt=X._rateSeek?X._rateSeek-X._seek:0;return X._seek+(qt+K*Math.abs(X._rate))}return X._node.currentTime}var ge=O.playing(L);ge&&O.pause(L,!0),X._seek=E,X._ended=!1,O._clearTimer(L),O._webAudio||!X._node||isNaN(X._node.duration)||(X._node.currentTime=E);var Ct=function(){ge&&O.play(L,!0),O._emit("seek",L)};if(ge&&!O._webAudio){var ot=function(){O._playLock?setTimeout(ot,0):Ct()};setTimeout(ot,0)}else Ct()}return O},playing:function(E){if(typeof E=="number"){var L=this._soundById(E);return!!L&&!L._paused}for(var O=0;O<this._sounds.length;O++)if(!this._sounds[O]._paused)return!0;return!1},duration:function(E){var L=this._duration,O=this._soundById(E);return O&&(L=this._sprite[O._sprite][1]/1e3),L},state:function(){return this._state},unload:function(){for(var E=this,L=E._sounds,O=0;O<L.length;O++)L[O]._paused||E.stop(L[O]._id),E._webAudio||(E._clearSound(L[O]._node),L[O]._node.removeEventListener("error",L[O]._errorFn,!1),L[O]._node.removeEventListener(W._canPlayEvent,L[O]._loadFn,!1),L[O]._node.removeEventListener("ended",L[O]._endFn,!1),W._releaseHtml5Audio(L[O]._node)),delete L[O]._node,E._clearTimer(L[O]._id);var Y=W._howls.indexOf(E);Y>=0&&W._howls.splice(Y,1);var C=!0;for(O=0;O<W._howls.length;O++)if(W._howls[O]._src===E._src||E._src.indexOf(W._howls[O]._src)>=0){C=!1;break}return z&&C&&delete z[E._src],W.noAudio=!1,E._state="unloaded",E._sounds=[],E=null,null},on:function(E,L,O,Y){var C=this["_on"+E];return typeof L=="function"&&C.push(Y?{id:O,fn:L,once:Y}:{id:O,fn:L}),this},off:function(E,L,O){var Y=this["_on"+E],C=0;if(typeof L=="number"&&(O=L,L=null),L||O)for(C=0;C<Y.length;C++){var j=O===Y[C].id;if(L===Y[C].fn&&j||!L&&j){Y.splice(C,1);break}}else if(E)this["_on"+E]=[];else{var X=Object.keys(this);for(C=0;C<X.length;C++)X[C].indexOf("_on")===0&&Array.isArray(this[X[C]])&&(this[X[C]]=[])}return this},once:function(E,L,O){return this.on(E,L,O,1),this},_emit:function(E,L,O){for(var Y=this["_on"+E],C=Y.length-1;C>=0;C--)Y[C].id&&Y[C].id!==L&&E!=="load"||(setTimeout(function(j){j.call(this,L,O)}.bind(this,Y[C].fn),0),Y[C].once&&this.off(E,Y[C].fn,Y[C].id));return this._loadQueue(E),this},_loadQueue:function(E){if(this._queue.length>0){var L=this._queue[0];L.event===E&&(this._queue.shift(),this._loadQueue()),E||L.action()}return this},_ended:function(E){var L=E._sprite;if(!this._webAudio&&E._node&&!E._node.paused&&!E._node.ended&&E._node.currentTime<E._stop)return setTimeout(this._ended.bind(this,E),100),this;var O=!(!E._loop&&!this._sprite[L][2]);if(this._emit("end",E._id),!this._webAudio&&O&&this.stop(E._id,!0).play(E._id),this._webAudio&&O){this._emit("play",E._id),E._seek=E._start||0,E._rateSeek=0,E._playStart=W.ctx.currentTime;var Y=1e3*(E._stop-E._start)/Math.abs(E._rate);this._endTimers[E._id]=setTimeout(this._ended.bind(this,E),Y)}return this._webAudio&&!O&&(E._paused=!0,E._ended=!0,E._seek=E._start||0,E._rateSeek=0,this._clearTimer(E._id),this._cleanBuffer(E._node),W._autoSuspend()),this._webAudio||O||this.stop(E._id,!0),this},_clearTimer:function(E){if(this._endTimers[E]){if(typeof this._endTimers[E]!="function")clearTimeout(this._endTimers[E]);else{var L=this._soundById(E);L&&L._node&&L._node.removeEventListener("ended",this._endTimers[E],!1)}delete this._endTimers[E]}return this},_soundById:function(E){for(var L=0;L<this._sounds.length;L++)if(E===this._sounds[L]._id)return this._sounds[L];return null},_inactiveSound:function(){this._drain();for(var E=0;E<this._sounds.length;E++)if(this._sounds[E]._ended)return this._sounds[E].reset();return new V(this)},_drain:function(){var E=this._pool,L=0,O=0;if(!(this._sounds.length<E)){for(O=0;O<this._sounds.length;O++)this._sounds[O]._ended&&L++;for(O=this._sounds.length-1;O>=0;O--){if(L<=E)return;this._sounds[O]._ended&&(this._webAudio&&this._sounds[O]._node&&this._sounds[O]._node.disconnect(0),this._sounds.splice(O,1),L--)}}},_getSoundIds:function(E){if(E===void 0){for(var L=[],O=0;O<this._sounds.length;O++)L.push(this._sounds[O]._id);return L}return[E]},_refreshBuffer:function(E){return E._node.bufferSource=W.ctx.createBufferSource(),E._node.bufferSource.buffer=z[this._src],E._panner?E._node.bufferSource.connect(E._panner):E._node.bufferSource.connect(E._node),E._node.bufferSource.loop=E._loop,E._loop&&(E._node.bufferSource.loopStart=E._start||0,E._node.bufferSource.loopEnd=E._stop||0),E._node.bufferSource.playbackRate.setValueAtTime(E._rate,W.ctx.currentTime),this},_cleanBuffer:function(E){var L=W._navigator&&W._navigator.vendor.indexOf("Apple")>=0;if(W._scratchBuffer&&E.bufferSource&&(E.bufferSource.onended=null,E.bufferSource.disconnect(0),L))try{E.bufferSource.buffer=W._scratchBuffer}catch{}return E.bufferSource=null,this},_clearSound:function(E){/MSIE |Trident\//.test(W._navigator&&W._navigator.userAgent)||(E.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var V=function(E){this._parent=E,this.init()};V.prototype={init:function(){var E=this._parent;return this._muted=E._muted,this._loop=E._loop,this._volume=E._volume,this._rate=E._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++W._counter,E._sounds.push(this),this.create(),this},create:function(){var E=this._parent,L=W._muted||this._muted||this._parent._muted?0:this._volume;return E._webAudio?(this._node=W.ctx.createGain===void 0?W.ctx.createGainNode():W.ctx.createGain(),this._node.gain.setValueAtTime(L,W.ctx.currentTime),this._node.paused=!0,this._node.connect(W.masterGain)):W.noAudio||(this._node=W._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(W._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=E._src,this._node.preload=E._preload===!0?"auto":E._preload,this._node.volume=L*W.volume(),this._node.load()),this},reset:function(){var E=this._parent;return this._muted=E._muted,this._loop=E._loop,this._volume=E._volume,this._rate=E._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++W._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var E=this._parent;E._duration=Math.ceil(10*this._node.duration)/10,Object.keys(E._sprite).length===0&&(E._sprite={__default:[0,1e3*E._duration]}),E._state!=="loaded"&&(E._state="loaded",E._emit("load"),E._loadQueue()),this._node.removeEventListener(W._canPlayEvent,this._loadFn,!1)},_endListener:function(){var E=this._parent;E._duration===1/0&&(E._duration=Math.ceil(10*this._node.duration)/10,E._sprite.__default[1]===1/0&&(E._sprite.__default[1]=1e3*E._duration),E._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var z={},k=function(E){var L=E._src;if(z[L])return E._duration=z[L].duration,void Ot(E);if(/^data:[^;]+;base64,/.test(L)){for(var O=atob(L.split(",")[1]),Y=new Uint8Array(O.length),C=0;C<O.length;++C)Y[C]=O.charCodeAt(C);vt(Y.buffer,E)}else{var j=new XMLHttpRequest;j.open(E._xhr.method,L,!0),j.withCredentials=E._xhr.withCredentials,j.responseType="arraybuffer",E._xhr.headers&&Object.keys(E._xhr.headers).forEach(function(X){j.setRequestHeader(X,E._xhr.headers[X])}),j.onload=function(){var X=(j.status+"")[0];X==="0"||X==="2"||X==="3"?vt(j.response,E):E._emit("loaderror",null,"Failed loading audio file with status: "+j.status+".")},j.onerror=function(){E._webAudio&&(E._html5=!0,E._webAudio=!1,E._sounds=[],delete z[L],E.load())},Z(j)}},Z=function(E){try{E.send()}catch{E.onerror()}},vt=function(E,L){var O=function(){L._emit("loaderror",null,"Decoding audio data failed.")},Y=function(C){C&&L._sounds.length>0?(z[L._src]=C,Ot(L,C)):O()};typeof Promise!="undefined"&&W.ctx.decodeAudioData.length===1?W.ctx.decodeAudioData(E).then(Y).catch(O):W.ctx.decodeAudioData(E,Y,O)},Ot=function(E,L){L&&!E._duration&&(E._duration=L.duration),Object.keys(E._sprite).length===0&&(E._sprite={__default:[0,1e3*E._duration]}),E._state!=="loaded"&&(E._state="loaded",E._emit("load"),E._loadQueue())},Nt=function(){if(W.usingWebAudio){try{typeof AudioContext!="undefined"?W.ctx=new AudioContext:typeof webkitAudioContext!="undefined"?W.ctx=new webkitAudioContext:W.usingWebAudio=!1}catch{W.usingWebAudio=!1}W.ctx||(W.usingWebAudio=!1);var E=/iP(hone|od|ad)/.test(W._navigator&&W._navigator.platform),L=W._navigator&&W._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),O=L?parseInt(L[1],10):null;if(E&&O&&O<9){var Y=/safari/.test(W._navigator&&W._navigator.userAgent.toLowerCase());W._navigator&&!Y&&(W.usingWebAudio=!1)}W.usingWebAudio&&(W.masterGain=W.ctx.createGain===void 0?W.ctx.createGainNode():W.ctx.createGain(),W.masterGain.gain.setValueAtTime(W._muted?0:W._volume,W.ctx.currentTime),W.masterGain.connect(W.ctx.destination)),W._setup()}};(q=function(){return{Howler:W,Howl:P}}.apply(M,[]))===void 0||(T.exports=q),M.Howler=W,M.Howl=P,b!==void 0?(b.HowlerGlobal=ht,b.Howler=W,b.Howl=P,b.Sound=V):typeof window!="undefined"&&(window.HowlerGlobal=ht,window.Howler=W,window.Howl=P,window.Sound=V)})(),function(){var ht;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(P){if(!this.ctx||!this.ctx.listener)return this;for(var V=this._howls.length-1;V>=0;V--)this._howls[V].stereo(P);return this},HowlerGlobal.prototype.pos=function(P,V,z){return this.ctx&&this.ctx.listener?(V=typeof V!="number"?this._pos[1]:V,z=typeof z!="number"?this._pos[2]:z,typeof P!="number"?this._pos:(this._pos=[P,V,z],this.ctx.listener.positionX!==void 0?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(P,V,z,k,Z,vt){if(!this.ctx||!this.ctx.listener)return this;var Ot=this._orientation;return V=typeof V!="number"?Ot[1]:V,z=typeof z!="number"?Ot[2]:z,k=typeof k!="number"?Ot[3]:k,Z=typeof Z!="number"?Ot[4]:Z,vt=typeof vt!="number"?Ot[5]:vt,typeof P!="number"?Ot:(this._orientation=[P,V,z,k,Z,vt],this.ctx.listener.forwardX!==void 0?(this.ctx.listener.forwardX.setTargetAtTime(P,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(V,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(z,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(k,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(Z,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(vt,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(P,V,z,k,Z,vt),this)},Howl.prototype.init=(ht=Howl.prototype.init,function(P){return this._orientation=P.orientation||[1,0,0],this._stereo=P.stereo||null,this._pos=P.pos||null,this._pannerAttr={coneInnerAngle:P.coneInnerAngle!==void 0?P.coneInnerAngle:360,coneOuterAngle:P.coneOuterAngle!==void 0?P.coneOuterAngle:360,coneOuterGain:P.coneOuterGain!==void 0?P.coneOuterGain:0,distanceModel:P.distanceModel!==void 0?P.distanceModel:"inverse",maxDistance:P.maxDistance!==void 0?P.maxDistance:1e4,panningModel:P.panningModel!==void 0?P.panningModel:"HRTF",refDistance:P.refDistance!==void 0?P.refDistance:1,rolloffFactor:P.rolloffFactor!==void 0?P.rolloffFactor:1},this._onstereo=P.onstereo?[{fn:P.onstereo}]:[],this._onpos=P.onpos?[{fn:P.onpos}]:[],this._onorientation=P.onorientation?[{fn:P.onorientation}]:[],ht.call(this,P)}),Howl.prototype.stereo=function(P,V){var z=this;if(!z._webAudio)return z;if(z._state!=="loaded")return z._queue.push({event:"stereo",action:function(){z.stereo(P,V)}}),z;var k=Howler.ctx.createStereoPanner===void 0?"spatial":"stereo";if(V===void 0){if(typeof P!="number")return z._stereo;z._stereo=P,z._pos=[P,0,0]}for(var Z=z._getSoundIds(V),vt=0;vt<Z.length;vt++){var Ot=z._soundById(Z[vt]);if(Ot){if(typeof P!="number")return Ot._stereo;Ot._stereo=P,Ot._pos=[P,0,0],Ot._node&&(Ot._pannerAttr.panningModel="equalpower",Ot._panner&&Ot._panner.pan||W(Ot,k),k==="spatial"?Ot._panner.positionX!==void 0?(Ot._panner.positionX.setValueAtTime(P,Howler.ctx.currentTime),Ot._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Ot._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Ot._panner.setPosition(P,0,0):Ot._panner.pan.setValueAtTime(P,Howler.ctx.currentTime)),z._emit("stereo",Ot._id)}}return z},Howl.prototype.pos=function(P,V,z,k){var Z=this;if(!Z._webAudio)return Z;if(Z._state!=="loaded")return Z._queue.push({event:"pos",action:function(){Z.pos(P,V,z,k)}}),Z;if(V=typeof V!="number"?0:V,z=typeof z!="number"?-.5:z,k===void 0){if(typeof P!="number")return Z._pos;Z._pos=[P,V,z]}for(var vt=Z._getSoundIds(k),Ot=0;Ot<vt.length;Ot++){var Nt=Z._soundById(vt[Ot]);if(Nt){if(typeof P!="number")return Nt._pos;Nt._pos=[P,V,z],Nt._node&&(Nt._panner&&!Nt._panner.pan||W(Nt,"spatial"),Nt._panner.positionX!==void 0?(Nt._panner.positionX.setValueAtTime(P,Howler.ctx.currentTime),Nt._panner.positionY.setValueAtTime(V,Howler.ctx.currentTime),Nt._panner.positionZ.setValueAtTime(z,Howler.ctx.currentTime)):Nt._panner.setPosition(P,V,z)),Z._emit("pos",Nt._id)}}return Z},Howl.prototype.orientation=function(P,V,z,k){var Z=this;if(!Z._webAudio)return Z;if(Z._state!=="loaded")return Z._queue.push({event:"orientation",action:function(){Z.orientation(P,V,z,k)}}),Z;if(V=typeof V!="number"?Z._orientation[1]:V,z=typeof z!="number"?Z._orientation[2]:z,k===void 0){if(typeof P!="number")return Z._orientation;Z._orientation=[P,V,z]}for(var vt=Z._getSoundIds(k),Ot=0;Ot<vt.length;Ot++){var Nt=Z._soundById(vt[Ot]);if(Nt){if(typeof P!="number")return Nt._orientation;Nt._orientation=[P,V,z],Nt._node&&(Nt._panner||(Nt._pos||(Nt._pos=Z._pos||[0,0,-.5]),W(Nt,"spatial")),Nt._panner.orientationX!==void 0?(Nt._panner.orientationX.setValueAtTime(P,Howler.ctx.currentTime),Nt._panner.orientationY.setValueAtTime(V,Howler.ctx.currentTime),Nt._panner.orientationZ.setValueAtTime(z,Howler.ctx.currentTime)):Nt._panner.setOrientation(P,V,z)),Z._emit("orientation",Nt._id)}}return Z},Howl.prototype.pannerAttr=function(){var P,V,z,k=this,Z=arguments;if(!k._webAudio)return k;if(Z.length===0)return k._pannerAttr;if(Z.length===1){if(typeof Z[0]!="object")return(z=k._soundById(parseInt(Z[0],10)))?z._pannerAttr:k._pannerAttr;P=Z[0],V===void 0&&(P.pannerAttr||(P.pannerAttr={coneInnerAngle:P.coneInnerAngle,coneOuterAngle:P.coneOuterAngle,coneOuterGain:P.coneOuterGain,distanceModel:P.distanceModel,maxDistance:P.maxDistance,refDistance:P.refDistance,rolloffFactor:P.rolloffFactor,panningModel:P.panningModel}),k._pannerAttr={coneInnerAngle:P.pannerAttr.coneInnerAngle!==void 0?P.pannerAttr.coneInnerAngle:k._coneInnerAngle,coneOuterAngle:P.pannerAttr.coneOuterAngle!==void 0?P.pannerAttr.coneOuterAngle:k._coneOuterAngle,coneOuterGain:P.pannerAttr.coneOuterGain!==void 0?P.pannerAttr.coneOuterGain:k._coneOuterGain,distanceModel:P.pannerAttr.distanceModel!==void 0?P.pannerAttr.distanceModel:k._distanceModel,maxDistance:P.pannerAttr.maxDistance!==void 0?P.pannerAttr.maxDistance:k._maxDistance,refDistance:P.pannerAttr.refDistance!==void 0?P.pannerAttr.refDistance:k._refDistance,rolloffFactor:P.pannerAttr.rolloffFactor!==void 0?P.pannerAttr.rolloffFactor:k._rolloffFactor,panningModel:P.pannerAttr.panningModel!==void 0?P.pannerAttr.panningModel:k._panningModel})}else Z.length===2&&(P=Z[0],V=parseInt(Z[1],10));for(var vt=k._getSoundIds(V),Ot=0;Ot<vt.length;Ot++)if(z=k._soundById(vt[Ot])){var Nt=z._pannerAttr;Nt={coneInnerAngle:P.coneInnerAngle!==void 0?P.coneInnerAngle:Nt.coneInnerAngle,coneOuterAngle:P.coneOuterAngle!==void 0?P.coneOuterAngle:Nt.coneOuterAngle,coneOuterGain:P.coneOuterGain!==void 0?P.coneOuterGain:Nt.coneOuterGain,distanceModel:P.distanceModel!==void 0?P.distanceModel:Nt.distanceModel,maxDistance:P.maxDistance!==void 0?P.maxDistance:Nt.maxDistance,refDistance:P.refDistance!==void 0?P.refDistance:Nt.refDistance,rolloffFactor:P.rolloffFactor!==void 0?P.rolloffFactor:Nt.rolloffFactor,panningModel:P.panningModel!==void 0?P.panningModel:Nt.panningModel};var E=z._panner;E?(E.coneInnerAngle=Nt.coneInnerAngle,E.coneOuterAngle=Nt.coneOuterAngle,E.coneOuterGain=Nt.coneOuterGain,E.distanceModel=Nt.distanceModel,E.maxDistance=Nt.maxDistance,E.refDistance=Nt.refDistance,E.rolloffFactor=Nt.rolloffFactor,E.panningModel=Nt.panningModel):(z._pos||(z._pos=k._pos||[0,0,-.5]),W(z,"spatial"))}return k},Sound.prototype.init=function(P){return function(){var V=this._parent;this._orientation=V._orientation,this._stereo=V._stereo,this._pos=V._pos,this._pannerAttr=V._pannerAttr,P.call(this),this._stereo?V.stereo(this._stereo):this._pos&&V.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(P){return function(){var V=this._parent;return this._orientation=V._orientation,this._stereo=V._stereo,this._pos=V._pos,this._pannerAttr=V._pannerAttr,this._stereo?V.stereo(this._stereo):this._pos?V.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,V._refreshBuffer(this)),P.call(this)}}(Sound.prototype.reset);var W=function(P,V){(V=V||"spatial")==="spatial"?(P._panner=Howler.ctx.createPanner(),P._panner.coneInnerAngle=P._pannerAttr.coneInnerAngle,P._panner.coneOuterAngle=P._pannerAttr.coneOuterAngle,P._panner.coneOuterGain=P._pannerAttr.coneOuterGain,P._panner.distanceModel=P._pannerAttr.distanceModel,P._panner.maxDistance=P._pannerAttr.maxDistance,P._panner.refDistance=P._pannerAttr.refDistance,P._panner.rolloffFactor=P._pannerAttr.rolloffFactor,P._panner.panningModel=P._pannerAttr.panningModel,P._panner.positionX!==void 0?(P._panner.positionX.setValueAtTime(P._pos[0],Howler.ctx.currentTime),P._panner.positionY.setValueAtTime(P._pos[1],Howler.ctx.currentTime),P._panner.positionZ.setValueAtTime(P._pos[2],Howler.ctx.currentTime)):P._panner.setPosition(P._pos[0],P._pos[1],P._pos[2]),P._panner.orientationX!==void 0?(P._panner.orientationX.setValueAtTime(P._orientation[0],Howler.ctx.currentTime),P._panner.orientationY.setValueAtTime(P._orientation[1],Howler.ctx.currentTime),P._panner.orientationZ.setValueAtTime(P._orientation[2],Howler.ctx.currentTime)):P._panner.setOrientation(P._orientation[0],P._orientation[1],P._orientation[2])):(P._panner=Howler.ctx.createStereoPanner(),P._panner.pan.setValueAtTime(P._stereo,Howler.ctx.currentTime)),P._panner.connect(P._node),P._paused||P._parent.pause(P._id,!0).play(P._id,!0)}}()}).call(this,v(3))},function(T,M){T.exports=`varying vec2 vTextureCoord;
|
|
1719
|
+
*/(function(){var ht=function(){this.init()};ht.prototype={init:function(){var E=this||V;return E._counter=1e3,E._html5AudioPool=[],E.html5PoolSize=10,E._codecs={},E._howls=[],E._muted=!1,E._volume=1,E._canPlayEvent="canplaythrough",E._navigator=typeof window!="undefined"&&window.navigator?window.navigator:null,E.masterGain=null,E.noAudio=!1,E.usingWebAudio=!0,E.autoSuspend=!0,E.ctx=null,E.autoUnlock=!0,E._setup(),E},volume:function(E){var L=this||V;if(E=parseFloat(E),L.ctx||Nt(),E!==void 0&&E>=0&&E<=1){if(L._volume=E,L._muted)return L;L.usingWebAudio&&L.masterGain.gain.setValueAtTime(E,V.ctx.currentTime);for(var O=0;O<L._howls.length;O++)if(!L._howls[O]._webAudio)for(var Y=L._howls[O]._getSoundIds(),C=0;C<Y.length;C++){var j=L._howls[O]._soundById(Y[C]);j&&j._node&&(j._node.volume=j._volume*E)}return L}return L._volume},mute:function(E){var L=this||V;L.ctx||Nt(),L._muted=E,L.usingWebAudio&&L.masterGain.gain.setValueAtTime(E?0:L._volume,V.ctx.currentTime);for(var O=0;O<L._howls.length;O++)if(!L._howls[O]._webAudio)for(var Y=L._howls[O]._getSoundIds(),C=0;C<Y.length;C++){var j=L._howls[O]._soundById(Y[C]);j&&j._node&&(j._node.muted=!!E||j._muted)}return L},stop:function(){for(var E=this||V,L=0;L<E._howls.length;L++)E._howls[L].stop();return E},unload:function(){for(var E=this||V,L=E._howls.length-1;L>=0;L--)E._howls[L].unload();return E.usingWebAudio&&E.ctx&&E.ctx.close!==void 0&&(E.ctx.close(),E.ctx=null,Nt()),E},codecs:function(E){return(this||V)._codecs[E.replace(/^x-/,"")]},_setup:function(){var E=this||V;if(E.state=E.ctx&&E.ctx.state||"suspended",E._autoSuspend(),!E.usingWebAudio)if(typeof Audio!="undefined")try{new Audio().oncanplaythrough===void 0&&(E._canPlayEvent="canplay")}catch{E.noAudio=!0}else E.noAudio=!0;try{new Audio().muted&&(E.noAudio=!0)}catch{}return E.noAudio||E._setupCodecs(),E},_setupCodecs:function(){var E=this||V,L=null;try{L=typeof Audio!="undefined"?new Audio:null}catch{return E}if(!L||typeof L.canPlayType!="function")return E;var O=L.canPlayType("audio/mpeg;").replace(/^no$/,""),Y=E._navigator?E._navigator.userAgent:"",C=Y.match(/OPR\/([0-6].)/g),j=C&&parseInt(C[0].split("/")[1],10)<33,X=Y.indexOf("Safari")!==-1&&Y.indexOf("Chrome")===-1,K=Y.match(/Version\/(.*?) /),qt=X&&K&&parseInt(K[1],10)<15;return E._codecs={mp3:!(j||!O&&!L.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!O,opus:!!L.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!L.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!L.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(L.canPlayType('audio/wav; codecs="1"')||L.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!L.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!L.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(L.canPlayType("audio/x-m4a;")||L.canPlayType("audio/m4a;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(L.canPlayType("audio/x-m4b;")||L.canPlayType("audio/m4b;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(L.canPlayType("audio/x-mp4;")||L.canPlayType("audio/mp4;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(qt||!L.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(qt||!L.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!L.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(L.canPlayType("audio/x-flac;")||L.canPlayType("audio/flac;")).replace(/^no$/,"")},E},_unlockAudio:function(){var E=this||V;if(!E._audioUnlocked&&E.ctx){E._audioUnlocked=!1,E.autoUnlock=!1,E._mobileUnloaded||E.ctx.sampleRate===44100||(E._mobileUnloaded=!0,E.unload()),E._scratchBuffer=E.ctx.createBuffer(1,1,22050);var L=function(O){for(;E._html5AudioPool.length<E.html5PoolSize;)try{var Y=new Audio;Y._unlocked=!0,E._releaseHtml5Audio(Y)}catch{E.noAudio=!0;break}for(var C=0;C<E._howls.length;C++)if(!E._howls[C]._webAudio)for(var j=E._howls[C]._getSoundIds(),X=0;X<j.length;X++){var K=E._howls[C]._soundById(j[X]);K&&K._node&&!K._node._unlocked&&(K._node._unlocked=!0,K._node.load())}E._autoResume();var qt=E.ctx.createBufferSource();qt.buffer=E._scratchBuffer,qt.connect(E.ctx.destination),qt.start===void 0?qt.noteOn(0):qt.start(0),typeof E.ctx.resume=="function"&&E.ctx.resume(),qt.onended=function(){qt.disconnect(0),E._audioUnlocked=!0,document.removeEventListener("touchstart",L,!0),document.removeEventListener("touchend",L,!0),document.removeEventListener("click",L,!0),document.removeEventListener("keydown",L,!0);for(var ge=0;ge<E._howls.length;ge++)E._howls[ge]._emit("unlock")}};return document.addEventListener("touchstart",L,!0),document.addEventListener("touchend",L,!0),document.addEventListener("click",L,!0),document.addEventListener("keydown",L,!0),E}},_obtainHtml5Audio:function(){var E=this||V;if(E._html5AudioPool.length)return E._html5AudioPool.pop();var L=new Audio().play();return L&&typeof Promise!="undefined"&&(L instanceof Promise||typeof L.then=="function")&&L.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(E){var L=this||V;return E._unlocked&&L._html5AudioPool.push(E),L},_autoSuspend:function(){var E=this;if(E.autoSuspend&&E.ctx&&E.ctx.suspend!==void 0&&V.usingWebAudio){for(var L=0;L<E._howls.length;L++)if(E._howls[L]._webAudio){for(var O=0;O<E._howls[L]._sounds.length;O++)if(!E._howls[L]._sounds[O]._paused)return E}return E._suspendTimer&&clearTimeout(E._suspendTimer),E._suspendTimer=setTimeout(function(){if(E.autoSuspend){E._suspendTimer=null,E.state="suspending";var Y=function(){E.state="suspended",E._resumeAfterSuspend&&(delete E._resumeAfterSuspend,E._autoResume())};E.ctx.suspend().then(Y,Y)}},3e4),E}},_autoResume:function(){var E=this;if(E.ctx&&E.ctx.resume!==void 0&&V.usingWebAudio)return E.state==="running"&&E.ctx.state!=="interrupted"&&E._suspendTimer?(clearTimeout(E._suspendTimer),E._suspendTimer=null):E.state==="suspended"||E.state==="running"&&E.ctx.state==="interrupted"?(E.ctx.resume().then(function(){E.state="running";for(var L=0;L<E._howls.length;L++)E._howls[L]._emit("resume")}),E._suspendTimer&&(clearTimeout(E._suspendTimer),E._suspendTimer=null)):E.state==="suspending"&&(E._resumeAfterSuspend=!0),E}};var V=new ht,P=function(E){E.src&&E.src.length!==0?this.init(E):console.error("An array of source files must be passed with any new Howl.")};P.prototype={init:function(E){var L=this;return V.ctx||Nt(),L._autoplay=E.autoplay||!1,L._format=typeof E.format!="string"?E.format:[E.format],L._html5=E.html5||!1,L._muted=E.mute||!1,L._loop=E.loop||!1,L._pool=E.pool||5,L._preload=typeof E.preload!="boolean"&&E.preload!=="metadata"||E.preload,L._rate=E.rate||1,L._sprite=E.sprite||{},L._src=typeof E.src!="string"?E.src:[E.src],L._volume=E.volume!==void 0?E.volume:1,L._xhr={method:E.xhr&&E.xhr.method?E.xhr.method:"GET",headers:E.xhr&&E.xhr.headers?E.xhr.headers:null,withCredentials:!(!E.xhr||!E.xhr.withCredentials)&&E.xhr.withCredentials},L._duration=0,L._state="unloaded",L._sounds=[],L._endTimers={},L._queue=[],L._playLock=!1,L._onend=E.onend?[{fn:E.onend}]:[],L._onfade=E.onfade?[{fn:E.onfade}]:[],L._onload=E.onload?[{fn:E.onload}]:[],L._onloaderror=E.onloaderror?[{fn:E.onloaderror}]:[],L._onplayerror=E.onplayerror?[{fn:E.onplayerror}]:[],L._onpause=E.onpause?[{fn:E.onpause}]:[],L._onplay=E.onplay?[{fn:E.onplay}]:[],L._onstop=E.onstop?[{fn:E.onstop}]:[],L._onmute=E.onmute?[{fn:E.onmute}]:[],L._onvolume=E.onvolume?[{fn:E.onvolume}]:[],L._onrate=E.onrate?[{fn:E.onrate}]:[],L._onseek=E.onseek?[{fn:E.onseek}]:[],L._onunlock=E.onunlock?[{fn:E.onunlock}]:[],L._onresume=[],L._webAudio=V.usingWebAudio&&!L._html5,V.ctx!==void 0&&V.ctx&&V.autoUnlock&&V._unlockAudio(),V._howls.push(L),L._autoplay&&L._queue.push({event:"play",action:function(){L.play()}}),L._preload&&L._preload!=="none"&&L.load(),L},load:function(){var E=null;if(V.noAudio)this._emit("loaderror",null,"No audio support.");else{typeof this._src=="string"&&(this._src=[this._src]);for(var L=0;L<this._src.length;L++){var O,Y;if(this._format&&this._format[L])O=this._format[L];else{if(typeof(Y=this._src[L])!="string"){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(O=/^data:audio\/([^;,]+);/i.exec(Y))||(O=/\.([^.]+)$/.exec(Y.split("?",1)[0])),O&&(O=O[1].toLowerCase())}if(O||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),O&&V.codecs(O)){E=this._src[L];break}}if(E)return this._src=E,this._state="loading",window.location.protocol==="https:"&&E.slice(0,5)==="http:"&&(this._html5=!0,this._webAudio=!1),new W(this),this._webAudio&&k(this),this;this._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(E,L){var O=this,Y=null;if(typeof E=="number")Y=E,E=null;else{if(typeof E=="string"&&O._state==="loaded"&&!O._sprite[E])return null;if(E===void 0&&(E="__default",!O._playLock)){for(var C=0,j=0;j<O._sounds.length;j++)O._sounds[j]._paused&&!O._sounds[j]._ended&&(C++,Y=O._sounds[j]._id);C===1?E=null:Y=null}}var X=Y?O._soundById(Y):O._inactiveSound();if(!X)return null;if(Y&&!E&&(E=X._sprite||"__default"),O._state!=="loaded"){X._sprite=E,X._ended=!1;var K=X._id;return O._queue.push({event:"play",action:function(){O.play(K)}}),K}if(Y&&!X._paused)return L||O._loadQueue("play"),X._id;O._webAudio&&V._autoResume();var qt=Math.max(0,X._seek>0?X._seek:O._sprite[E][0]/1e3),ge=Math.max(0,(O._sprite[E][0]+O._sprite[E][1])/1e3-qt),Ct=1e3*ge/Math.abs(X._rate),ot=O._sprite[E][0]/1e3,yt=(O._sprite[E][0]+O._sprite[E][1])/1e3;X._sprite=E,X._ended=!1;var Pt=function(){X._paused=!1,X._seek=qt,X._start=ot,X._stop=yt,X._loop=!(!X._loop&&!O._sprite[E][2])};if(!(qt>=yt)){var H=X._node;if(O._webAudio){var ft=function(){O._playLock=!1,Pt(),O._refreshBuffer(X);var Wt=X._muted||O._muted?0:X._volume;H.gain.setValueAtTime(Wt,V.ctx.currentTime),X._playStart=V.ctx.currentTime,H.bufferSource.start===void 0?X._loop?H.bufferSource.noteGrainOn(0,qt,86400):H.bufferSource.noteGrainOn(0,qt,ge):X._loop?H.bufferSource.start(0,qt,86400):H.bufferSource.start(0,qt,ge),Ct!==1/0&&(O._endTimers[X._id]=setTimeout(O._ended.bind(O,X),Ct)),L||setTimeout(function(){O._emit("play",X._id),O._loadQueue()},0)};V.state==="running"&&V.ctx.state!=="interrupted"?ft():(O._playLock=!0,O.once("resume",ft),O._clearTimer(X._id))}else{var Et=function(){H.currentTime=qt,H.muted=X._muted||O._muted||V._muted||H.muted,H.volume=X._volume*V.volume(),H.playbackRate=X._rate;try{var Wt=H.play();if(Wt&&typeof Promise!="undefined"&&(Wt instanceof Promise||typeof Wt.then=="function")?(O._playLock=!0,Pt(),Wt.then(function(){O._playLock=!1,H._unlocked=!0,L?O._loadQueue():O._emit("play",X._id)}).catch(function(){O._playLock=!1,O._emit("playerror",X._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),X._ended=!0,X._paused=!0})):L||(O._playLock=!1,Pt(),O._emit("play",X._id)),H.playbackRate=X._rate,H.paused)return void O._emit("playerror",X._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");E!=="__default"||X._loop?O._endTimers[X._id]=setTimeout(O._ended.bind(O,X),Ct):(O._endTimers[X._id]=function(){O._ended(X),H.removeEventListener("ended",O._endTimers[X._id],!1)},H.addEventListener("ended",O._endTimers[X._id],!1))}catch($t){O._emit("playerror",X._id,$t)}};H.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(H.src=O._src,H.load());var At=window&&window.ejecta||!H.readyState&&V._navigator.isCocoonJS;if(H.readyState>=3||At)Et();else{O._playLock=!0,O._state="loading";var Rt=function(){O._state="loaded",Et(),H.removeEventListener(V._canPlayEvent,Rt,!1)};H.addEventListener(V._canPlayEvent,Rt,!1),O._clearTimer(X._id)}}return X._id}O._ended(X)},pause:function(E){var L=this;if(L._state!=="loaded"||L._playLock)return L._queue.push({event:"pause",action:function(){L.pause(E)}}),L;for(var O=L._getSoundIds(E),Y=0;Y<O.length;Y++){L._clearTimer(O[Y]);var C=L._soundById(O[Y]);if(C&&!C._paused&&(C._seek=L.seek(O[Y]),C._rateSeek=0,C._paused=!0,L._stopFade(O[Y]),C._node))if(L._webAudio){if(!C._node.bufferSource)continue;C._node.bufferSource.stop===void 0?C._node.bufferSource.noteOff(0):C._node.bufferSource.stop(0),L._cleanBuffer(C._node)}else isNaN(C._node.duration)&&C._node.duration!==1/0||C._node.pause();arguments[1]||L._emit("pause",C?C._id:null)}return L},stop:function(E,L){var O=this;if(O._state!=="loaded"||O._playLock)return O._queue.push({event:"stop",action:function(){O.stop(E)}}),O;for(var Y=O._getSoundIds(E),C=0;C<Y.length;C++){O._clearTimer(Y[C]);var j=O._soundById(Y[C]);j&&(j._seek=j._start||0,j._rateSeek=0,j._paused=!0,j._ended=!0,O._stopFade(Y[C]),j._node&&(O._webAudio?j._node.bufferSource&&(j._node.bufferSource.stop===void 0?j._node.bufferSource.noteOff(0):j._node.bufferSource.stop(0),O._cleanBuffer(j._node)):isNaN(j._node.duration)&&j._node.duration!==1/0||(j._node.currentTime=j._start||0,j._node.pause(),j._node.duration===1/0&&O._clearSound(j._node))),L||O._emit("stop",j._id))}return O},mute:function(E,L){var O=this;if(O._state!=="loaded"||O._playLock)return O._queue.push({event:"mute",action:function(){O.mute(E,L)}}),O;if(L===void 0){if(typeof E!="boolean")return O._muted;O._muted=E}for(var Y=O._getSoundIds(L),C=0;C<Y.length;C++){var j=O._soundById(Y[C]);j&&(j._muted=E,j._interval&&O._stopFade(j._id),O._webAudio&&j._node?j._node.gain.setValueAtTime(E?0:j._volume,V.ctx.currentTime):j._node&&(j._node.muted=!!V._muted||E),O._emit("mute",j._id))}return O},volume:function(){var E,L,O,Y=this,C=arguments;if(C.length===0)return Y._volume;if(C.length===1||C.length===2&&C[1]===void 0){var j=Y._getSoundIds(),X=j.indexOf(C[0]);X>=0?L=parseInt(C[0],10):E=parseFloat(C[0])}else C.length>=2&&(E=parseFloat(C[0]),L=parseInt(C[1],10));if(!(E!==void 0&&E>=0&&E<=1))return(O=L?Y._soundById(L):Y._sounds[0])?O._volume:0;if(Y._state!=="loaded"||Y._playLock)return Y._queue.push({event:"volume",action:function(){Y.volume.apply(Y,C)}}),Y;L===void 0&&(Y._volume=E),L=Y._getSoundIds(L);for(var K=0;K<L.length;K++)(O=Y._soundById(L[K]))&&(O._volume=E,C[2]||Y._stopFade(L[K]),Y._webAudio&&O._node&&!O._muted?O._node.gain.setValueAtTime(E,V.ctx.currentTime):O._node&&!O._muted&&(O._node.volume=E*V.volume()),Y._emit("volume",O._id));return Y},fade:function(E,L,O,Y){var C=this;if(C._state!=="loaded"||C._playLock)return C._queue.push({event:"fade",action:function(){C.fade(E,L,O,Y)}}),C;E=Math.min(Math.max(0,parseFloat(E)),1),L=Math.min(Math.max(0,parseFloat(L)),1),O=parseFloat(O),C.volume(E,Y);for(var j=C._getSoundIds(Y),X=0;X<j.length;X++){var K=C._soundById(j[X]);if(K){if(Y||C._stopFade(j[X]),C._webAudio&&!K._muted){var qt=V.ctx.currentTime,ge=qt+O/1e3;K._volume=E,K._node.gain.setValueAtTime(E,qt),K._node.gain.linearRampToValueAtTime(L,ge)}C._startFadeInterval(K,E,L,O,j[X],Y===void 0)}}return C},_startFadeInterval:function(E,L,O,Y,C,j){var X=this,K=L,qt=O-L,ge=Math.abs(qt/.01),Ct=Math.max(4,ge>0?Y/ge:Y),ot=Date.now();E._fadeTo=O,E._interval=setInterval(function(){var yt=(Date.now()-ot)/Y;ot=Date.now(),K+=qt*yt,K=Math.round(100*K)/100,K=qt<0?Math.max(O,K):Math.min(O,K),X._webAudio?E._volume=K:X.volume(K,E._id,!0),j&&(X._volume=K),(O<L&&K<=O||O>L&&K>=O)&&(clearInterval(E._interval),E._interval=null,E._fadeTo=null,X.volume(O,E._id),X._emit("fade",E._id))},Ct)},_stopFade:function(E){var L=this._soundById(E);return L&&L._interval&&(this._webAudio&&L._node.gain.cancelScheduledValues(V.ctx.currentTime),clearInterval(L._interval),L._interval=null,this.volume(L._fadeTo,E),L._fadeTo=null,this._emit("fade",E)),this},loop:function(){var E,L,O,Y=this,C=arguments;if(C.length===0)return Y._loop;if(C.length===1){if(typeof C[0]!="boolean")return!!(O=Y._soundById(parseInt(C[0],10)))&&O._loop;E=C[0],Y._loop=E}else C.length===2&&(E=C[0],L=parseInt(C[1],10));for(var j=Y._getSoundIds(L),X=0;X<j.length;X++)(O=Y._soundById(j[X]))&&(O._loop=E,Y._webAudio&&O._node&&O._node.bufferSource&&(O._node.bufferSource.loop=E,E&&(O._node.bufferSource.loopStart=O._start||0,O._node.bufferSource.loopEnd=O._stop,Y.playing(j[X])&&(Y.pause(j[X],!0),Y.play(j[X],!0)))));return Y},rate:function(){var E,L,O,Y=this,C=arguments;if(C.length===0)L=Y._sounds[0]._id;else if(C.length===1){var j=Y._getSoundIds(),X=j.indexOf(C[0]);X>=0?L=parseInt(C[0],10):E=parseFloat(C[0])}else C.length===2&&(E=parseFloat(C[0]),L=parseInt(C[1],10));if(typeof E!="number")return(O=Y._soundById(L))?O._rate:Y._rate;if(Y._state!=="loaded"||Y._playLock)return Y._queue.push({event:"rate",action:function(){Y.rate.apply(Y,C)}}),Y;L===void 0&&(Y._rate=E),L=Y._getSoundIds(L);for(var K=0;K<L.length;K++)if(O=Y._soundById(L[K])){Y.playing(L[K])&&(O._rateSeek=Y.seek(L[K]),O._playStart=Y._webAudio?V.ctx.currentTime:O._playStart),O._rate=E,Y._webAudio&&O._node&&O._node.bufferSource?O._node.bufferSource.playbackRate.setValueAtTime(E,V.ctx.currentTime):O._node&&(O._node.playbackRate=E);var qt=Y.seek(L[K]),ge=(Y._sprite[O._sprite][0]+Y._sprite[O._sprite][1])/1e3-qt,Ct=1e3*ge/Math.abs(O._rate);!Y._endTimers[L[K]]&&O._paused||(Y._clearTimer(L[K]),Y._endTimers[L[K]]=setTimeout(Y._ended.bind(Y,O),Ct)),Y._emit("rate",O._id)}return Y},seek:function(){var E,L,O=this,Y=arguments;if(Y.length===0)O._sounds.length&&(L=O._sounds[0]._id);else if(Y.length===1){var C=O._getSoundIds(),j=C.indexOf(Y[0]);j>=0?L=parseInt(Y[0],10):O._sounds.length&&(L=O._sounds[0]._id,E=parseFloat(Y[0]))}else Y.length===2&&(E=parseFloat(Y[0]),L=parseInt(Y[1],10));if(L===void 0)return 0;if(typeof E=="number"&&(O._state!=="loaded"||O._playLock))return O._queue.push({event:"seek",action:function(){O.seek.apply(O,Y)}}),O;var X=O._soundById(L);if(X){if(!(typeof E=="number"&&E>=0)){if(O._webAudio){var K=O.playing(L)?V.ctx.currentTime-X._playStart:0,qt=X._rateSeek?X._rateSeek-X._seek:0;return X._seek+(qt+K*Math.abs(X._rate))}return X._node.currentTime}var ge=O.playing(L);ge&&O.pause(L,!0),X._seek=E,X._ended=!1,O._clearTimer(L),O._webAudio||!X._node||isNaN(X._node.duration)||(X._node.currentTime=E);var Ct=function(){ge&&O.play(L,!0),O._emit("seek",L)};if(ge&&!O._webAudio){var ot=function(){O._playLock?setTimeout(ot,0):Ct()};setTimeout(ot,0)}else Ct()}return O},playing:function(E){if(typeof E=="number"){var L=this._soundById(E);return!!L&&!L._paused}for(var O=0;O<this._sounds.length;O++)if(!this._sounds[O]._paused)return!0;return!1},duration:function(E){var L=this._duration,O=this._soundById(E);return O&&(L=this._sprite[O._sprite][1]/1e3),L},state:function(){return this._state},unload:function(){for(var E=this,L=E._sounds,O=0;O<L.length;O++)L[O]._paused||E.stop(L[O]._id),E._webAudio||(E._clearSound(L[O]._node),L[O]._node.removeEventListener("error",L[O]._errorFn,!1),L[O]._node.removeEventListener(V._canPlayEvent,L[O]._loadFn,!1),L[O]._node.removeEventListener("ended",L[O]._endFn,!1),V._releaseHtml5Audio(L[O]._node)),delete L[O]._node,E._clearTimer(L[O]._id);var Y=V._howls.indexOf(E);Y>=0&&V._howls.splice(Y,1);var C=!0;for(O=0;O<V._howls.length;O++)if(V._howls[O]._src===E._src||E._src.indexOf(V._howls[O]._src)>=0){C=!1;break}return z&&C&&delete z[E._src],V.noAudio=!1,E._state="unloaded",E._sounds=[],E=null,null},on:function(E,L,O,Y){var C=this["_on"+E];return typeof L=="function"&&C.push(Y?{id:O,fn:L,once:Y}:{id:O,fn:L}),this},off:function(E,L,O){var Y=this["_on"+E],C=0;if(typeof L=="number"&&(O=L,L=null),L||O)for(C=0;C<Y.length;C++){var j=O===Y[C].id;if(L===Y[C].fn&&j||!L&&j){Y.splice(C,1);break}}else if(E)this["_on"+E]=[];else{var X=Object.keys(this);for(C=0;C<X.length;C++)X[C].indexOf("_on")===0&&Array.isArray(this[X[C]])&&(this[X[C]]=[])}return this},once:function(E,L,O){return this.on(E,L,O,1),this},_emit:function(E,L,O){for(var Y=this["_on"+E],C=Y.length-1;C>=0;C--)Y[C].id&&Y[C].id!==L&&E!=="load"||(setTimeout(function(j){j.call(this,L,O)}.bind(this,Y[C].fn),0),Y[C].once&&this.off(E,Y[C].fn,Y[C].id));return this._loadQueue(E),this},_loadQueue:function(E){if(this._queue.length>0){var L=this._queue[0];L.event===E&&(this._queue.shift(),this._loadQueue()),E||L.action()}return this},_ended:function(E){var L=E._sprite;if(!this._webAudio&&E._node&&!E._node.paused&&!E._node.ended&&E._node.currentTime<E._stop)return setTimeout(this._ended.bind(this,E),100),this;var O=!(!E._loop&&!this._sprite[L][2]);if(this._emit("end",E._id),!this._webAudio&&O&&this.stop(E._id,!0).play(E._id),this._webAudio&&O){this._emit("play",E._id),E._seek=E._start||0,E._rateSeek=0,E._playStart=V.ctx.currentTime;var Y=1e3*(E._stop-E._start)/Math.abs(E._rate);this._endTimers[E._id]=setTimeout(this._ended.bind(this,E),Y)}return this._webAudio&&!O&&(E._paused=!0,E._ended=!0,E._seek=E._start||0,E._rateSeek=0,this._clearTimer(E._id),this._cleanBuffer(E._node),V._autoSuspend()),this._webAudio||O||this.stop(E._id,!0),this},_clearTimer:function(E){if(this._endTimers[E]){if(typeof this._endTimers[E]!="function")clearTimeout(this._endTimers[E]);else{var L=this._soundById(E);L&&L._node&&L._node.removeEventListener("ended",this._endTimers[E],!1)}delete this._endTimers[E]}return this},_soundById:function(E){for(var L=0;L<this._sounds.length;L++)if(E===this._sounds[L]._id)return this._sounds[L];return null},_inactiveSound:function(){this._drain();for(var E=0;E<this._sounds.length;E++)if(this._sounds[E]._ended)return this._sounds[E].reset();return new W(this)},_drain:function(){var E=this._pool,L=0,O=0;if(!(this._sounds.length<E)){for(O=0;O<this._sounds.length;O++)this._sounds[O]._ended&&L++;for(O=this._sounds.length-1;O>=0;O--){if(L<=E)return;this._sounds[O]._ended&&(this._webAudio&&this._sounds[O]._node&&this._sounds[O]._node.disconnect(0),this._sounds.splice(O,1),L--)}}},_getSoundIds:function(E){if(E===void 0){for(var L=[],O=0;O<this._sounds.length;O++)L.push(this._sounds[O]._id);return L}return[E]},_refreshBuffer:function(E){return E._node.bufferSource=V.ctx.createBufferSource(),E._node.bufferSource.buffer=z[this._src],E._panner?E._node.bufferSource.connect(E._panner):E._node.bufferSource.connect(E._node),E._node.bufferSource.loop=E._loop,E._loop&&(E._node.bufferSource.loopStart=E._start||0,E._node.bufferSource.loopEnd=E._stop||0),E._node.bufferSource.playbackRate.setValueAtTime(E._rate,V.ctx.currentTime),this},_cleanBuffer:function(E){var L=V._navigator&&V._navigator.vendor.indexOf("Apple")>=0;if(V._scratchBuffer&&E.bufferSource&&(E.bufferSource.onended=null,E.bufferSource.disconnect(0),L))try{E.bufferSource.buffer=V._scratchBuffer}catch{}return E.bufferSource=null,this},_clearSound:function(E){/MSIE |Trident\//.test(V._navigator&&V._navigator.userAgent)||(E.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var W=function(E){this._parent=E,this.init()};W.prototype={init:function(){var E=this._parent;return this._muted=E._muted,this._loop=E._loop,this._volume=E._volume,this._rate=E._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++V._counter,E._sounds.push(this),this.create(),this},create:function(){var E=this._parent,L=V._muted||this._muted||this._parent._muted?0:this._volume;return E._webAudio?(this._node=V.ctx.createGain===void 0?V.ctx.createGainNode():V.ctx.createGain(),this._node.gain.setValueAtTime(L,V.ctx.currentTime),this._node.paused=!0,this._node.connect(V.masterGain)):V.noAudio||(this._node=V._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(V._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=E._src,this._node.preload=E._preload===!0?"auto":E._preload,this._node.volume=L*V.volume(),this._node.load()),this},reset:function(){var E=this._parent;return this._muted=E._muted,this._loop=E._loop,this._volume=E._volume,this._rate=E._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++V._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var E=this._parent;E._duration=Math.ceil(10*this._node.duration)/10,Object.keys(E._sprite).length===0&&(E._sprite={__default:[0,1e3*E._duration]}),E._state!=="loaded"&&(E._state="loaded",E._emit("load"),E._loadQueue()),this._node.removeEventListener(V._canPlayEvent,this._loadFn,!1)},_endListener:function(){var E=this._parent;E._duration===1/0&&(E._duration=Math.ceil(10*this._node.duration)/10,E._sprite.__default[1]===1/0&&(E._sprite.__default[1]=1e3*E._duration),E._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var z={},k=function(E){var L=E._src;if(z[L])return E._duration=z[L].duration,void Ot(E);if(/^data:[^;]+;base64,/.test(L)){for(var O=atob(L.split(",")[1]),Y=new Uint8Array(O.length),C=0;C<O.length;++C)Y[C]=O.charCodeAt(C);vt(Y.buffer,E)}else{var j=new XMLHttpRequest;j.open(E._xhr.method,L,!0),j.withCredentials=E._xhr.withCredentials,j.responseType="arraybuffer",E._xhr.headers&&Object.keys(E._xhr.headers).forEach(function(X){j.setRequestHeader(X,E._xhr.headers[X])}),j.onload=function(){var X=(j.status+"")[0];X==="0"||X==="2"||X==="3"?vt(j.response,E):E._emit("loaderror",null,"Failed loading audio file with status: "+j.status+".")},j.onerror=function(){E._webAudio&&(E._html5=!0,E._webAudio=!1,E._sounds=[],delete z[L],E.load())},Z(j)}},Z=function(E){try{E.send()}catch{E.onerror()}},vt=function(E,L){var O=function(){L._emit("loaderror",null,"Decoding audio data failed.")},Y=function(C){C&&L._sounds.length>0?(z[L._src]=C,Ot(L,C)):O()};typeof Promise!="undefined"&&V.ctx.decodeAudioData.length===1?V.ctx.decodeAudioData(E).then(Y).catch(O):V.ctx.decodeAudioData(E,Y,O)},Ot=function(E,L){L&&!E._duration&&(E._duration=L.duration),Object.keys(E._sprite).length===0&&(E._sprite={__default:[0,1e3*E._duration]}),E._state!=="loaded"&&(E._state="loaded",E._emit("load"),E._loadQueue())},Nt=function(){if(V.usingWebAudio){try{typeof AudioContext!="undefined"?V.ctx=new AudioContext:typeof webkitAudioContext!="undefined"?V.ctx=new webkitAudioContext:V.usingWebAudio=!1}catch{V.usingWebAudio=!1}V.ctx||(V.usingWebAudio=!1);var E=/iP(hone|od|ad)/.test(V._navigator&&V._navigator.platform),L=V._navigator&&V._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),O=L?parseInt(L[1],10):null;if(E&&O&&O<9){var Y=/safari/.test(V._navigator&&V._navigator.userAgent.toLowerCase());V._navigator&&!Y&&(V.usingWebAudio=!1)}V.usingWebAudio&&(V.masterGain=V.ctx.createGain===void 0?V.ctx.createGainNode():V.ctx.createGain(),V.masterGain.gain.setValueAtTime(V._muted?0:V._volume,V.ctx.currentTime),V.masterGain.connect(V.ctx.destination)),V._setup()}};(q=function(){return{Howler:V,Howl:P}}.apply(M,[]))===void 0||(T.exports=q),M.Howler=V,M.Howl=P,b!==void 0?(b.HowlerGlobal=ht,b.Howler=V,b.Howl=P,b.Sound=W):typeof window!="undefined"&&(window.HowlerGlobal=ht,window.Howler=V,window.Howl=P,window.Sound=W)})(),function(){var ht;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(P){if(!this.ctx||!this.ctx.listener)return this;for(var W=this._howls.length-1;W>=0;W--)this._howls[W].stereo(P);return this},HowlerGlobal.prototype.pos=function(P,W,z){return this.ctx&&this.ctx.listener?(W=typeof W!="number"?this._pos[1]:W,z=typeof z!="number"?this._pos[2]:z,typeof P!="number"?this._pos:(this._pos=[P,W,z],this.ctx.listener.positionX!==void 0?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(P,W,z,k,Z,vt){if(!this.ctx||!this.ctx.listener)return this;var Ot=this._orientation;return W=typeof W!="number"?Ot[1]:W,z=typeof z!="number"?Ot[2]:z,k=typeof k!="number"?Ot[3]:k,Z=typeof Z!="number"?Ot[4]:Z,vt=typeof vt!="number"?Ot[5]:vt,typeof P!="number"?Ot:(this._orientation=[P,W,z,k,Z,vt],this.ctx.listener.forwardX!==void 0?(this.ctx.listener.forwardX.setTargetAtTime(P,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(W,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(z,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(k,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(Z,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(vt,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(P,W,z,k,Z,vt),this)},Howl.prototype.init=(ht=Howl.prototype.init,function(P){return this._orientation=P.orientation||[1,0,0],this._stereo=P.stereo||null,this._pos=P.pos||null,this._pannerAttr={coneInnerAngle:P.coneInnerAngle!==void 0?P.coneInnerAngle:360,coneOuterAngle:P.coneOuterAngle!==void 0?P.coneOuterAngle:360,coneOuterGain:P.coneOuterGain!==void 0?P.coneOuterGain:0,distanceModel:P.distanceModel!==void 0?P.distanceModel:"inverse",maxDistance:P.maxDistance!==void 0?P.maxDistance:1e4,panningModel:P.panningModel!==void 0?P.panningModel:"HRTF",refDistance:P.refDistance!==void 0?P.refDistance:1,rolloffFactor:P.rolloffFactor!==void 0?P.rolloffFactor:1},this._onstereo=P.onstereo?[{fn:P.onstereo}]:[],this._onpos=P.onpos?[{fn:P.onpos}]:[],this._onorientation=P.onorientation?[{fn:P.onorientation}]:[],ht.call(this,P)}),Howl.prototype.stereo=function(P,W){var z=this;if(!z._webAudio)return z;if(z._state!=="loaded")return z._queue.push({event:"stereo",action:function(){z.stereo(P,W)}}),z;var k=Howler.ctx.createStereoPanner===void 0?"spatial":"stereo";if(W===void 0){if(typeof P!="number")return z._stereo;z._stereo=P,z._pos=[P,0,0]}for(var Z=z._getSoundIds(W),vt=0;vt<Z.length;vt++){var Ot=z._soundById(Z[vt]);if(Ot){if(typeof P!="number")return Ot._stereo;Ot._stereo=P,Ot._pos=[P,0,0],Ot._node&&(Ot._pannerAttr.panningModel="equalpower",Ot._panner&&Ot._panner.pan||V(Ot,k),k==="spatial"?Ot._panner.positionX!==void 0?(Ot._panner.positionX.setValueAtTime(P,Howler.ctx.currentTime),Ot._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Ot._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Ot._panner.setPosition(P,0,0):Ot._panner.pan.setValueAtTime(P,Howler.ctx.currentTime)),z._emit("stereo",Ot._id)}}return z},Howl.prototype.pos=function(P,W,z,k){var Z=this;if(!Z._webAudio)return Z;if(Z._state!=="loaded")return Z._queue.push({event:"pos",action:function(){Z.pos(P,W,z,k)}}),Z;if(W=typeof W!="number"?0:W,z=typeof z!="number"?-.5:z,k===void 0){if(typeof P!="number")return Z._pos;Z._pos=[P,W,z]}for(var vt=Z._getSoundIds(k),Ot=0;Ot<vt.length;Ot++){var Nt=Z._soundById(vt[Ot]);if(Nt){if(typeof P!="number")return Nt._pos;Nt._pos=[P,W,z],Nt._node&&(Nt._panner&&!Nt._panner.pan||V(Nt,"spatial"),Nt._panner.positionX!==void 0?(Nt._panner.positionX.setValueAtTime(P,Howler.ctx.currentTime),Nt._panner.positionY.setValueAtTime(W,Howler.ctx.currentTime),Nt._panner.positionZ.setValueAtTime(z,Howler.ctx.currentTime)):Nt._panner.setPosition(P,W,z)),Z._emit("pos",Nt._id)}}return Z},Howl.prototype.orientation=function(P,W,z,k){var Z=this;if(!Z._webAudio)return Z;if(Z._state!=="loaded")return Z._queue.push({event:"orientation",action:function(){Z.orientation(P,W,z,k)}}),Z;if(W=typeof W!="number"?Z._orientation[1]:W,z=typeof z!="number"?Z._orientation[2]:z,k===void 0){if(typeof P!="number")return Z._orientation;Z._orientation=[P,W,z]}for(var vt=Z._getSoundIds(k),Ot=0;Ot<vt.length;Ot++){var Nt=Z._soundById(vt[Ot]);if(Nt){if(typeof P!="number")return Nt._orientation;Nt._orientation=[P,W,z],Nt._node&&(Nt._panner||(Nt._pos||(Nt._pos=Z._pos||[0,0,-.5]),V(Nt,"spatial")),Nt._panner.orientationX!==void 0?(Nt._panner.orientationX.setValueAtTime(P,Howler.ctx.currentTime),Nt._panner.orientationY.setValueAtTime(W,Howler.ctx.currentTime),Nt._panner.orientationZ.setValueAtTime(z,Howler.ctx.currentTime)):Nt._panner.setOrientation(P,W,z)),Z._emit("orientation",Nt._id)}}return Z},Howl.prototype.pannerAttr=function(){var P,W,z,k=this,Z=arguments;if(!k._webAudio)return k;if(Z.length===0)return k._pannerAttr;if(Z.length===1){if(typeof Z[0]!="object")return(z=k._soundById(parseInt(Z[0],10)))?z._pannerAttr:k._pannerAttr;P=Z[0],W===void 0&&(P.pannerAttr||(P.pannerAttr={coneInnerAngle:P.coneInnerAngle,coneOuterAngle:P.coneOuterAngle,coneOuterGain:P.coneOuterGain,distanceModel:P.distanceModel,maxDistance:P.maxDistance,refDistance:P.refDistance,rolloffFactor:P.rolloffFactor,panningModel:P.panningModel}),k._pannerAttr={coneInnerAngle:P.pannerAttr.coneInnerAngle!==void 0?P.pannerAttr.coneInnerAngle:k._coneInnerAngle,coneOuterAngle:P.pannerAttr.coneOuterAngle!==void 0?P.pannerAttr.coneOuterAngle:k._coneOuterAngle,coneOuterGain:P.pannerAttr.coneOuterGain!==void 0?P.pannerAttr.coneOuterGain:k._coneOuterGain,distanceModel:P.pannerAttr.distanceModel!==void 0?P.pannerAttr.distanceModel:k._distanceModel,maxDistance:P.pannerAttr.maxDistance!==void 0?P.pannerAttr.maxDistance:k._maxDistance,refDistance:P.pannerAttr.refDistance!==void 0?P.pannerAttr.refDistance:k._refDistance,rolloffFactor:P.pannerAttr.rolloffFactor!==void 0?P.pannerAttr.rolloffFactor:k._rolloffFactor,panningModel:P.pannerAttr.panningModel!==void 0?P.pannerAttr.panningModel:k._panningModel})}else Z.length===2&&(P=Z[0],W=parseInt(Z[1],10));for(var vt=k._getSoundIds(W),Ot=0;Ot<vt.length;Ot++)if(z=k._soundById(vt[Ot])){var Nt=z._pannerAttr;Nt={coneInnerAngle:P.coneInnerAngle!==void 0?P.coneInnerAngle:Nt.coneInnerAngle,coneOuterAngle:P.coneOuterAngle!==void 0?P.coneOuterAngle:Nt.coneOuterAngle,coneOuterGain:P.coneOuterGain!==void 0?P.coneOuterGain:Nt.coneOuterGain,distanceModel:P.distanceModel!==void 0?P.distanceModel:Nt.distanceModel,maxDistance:P.maxDistance!==void 0?P.maxDistance:Nt.maxDistance,refDistance:P.refDistance!==void 0?P.refDistance:Nt.refDistance,rolloffFactor:P.rolloffFactor!==void 0?P.rolloffFactor:Nt.rolloffFactor,panningModel:P.panningModel!==void 0?P.panningModel:Nt.panningModel};var E=z._panner;E?(E.coneInnerAngle=Nt.coneInnerAngle,E.coneOuterAngle=Nt.coneOuterAngle,E.coneOuterGain=Nt.coneOuterGain,E.distanceModel=Nt.distanceModel,E.maxDistance=Nt.maxDistance,E.refDistance=Nt.refDistance,E.rolloffFactor=Nt.rolloffFactor,E.panningModel=Nt.panningModel):(z._pos||(z._pos=k._pos||[0,0,-.5]),V(z,"spatial"))}return k},Sound.prototype.init=function(P){return function(){var W=this._parent;this._orientation=W._orientation,this._stereo=W._stereo,this._pos=W._pos,this._pannerAttr=W._pannerAttr,P.call(this),this._stereo?W.stereo(this._stereo):this._pos&&W.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(P){return function(){var W=this._parent;return this._orientation=W._orientation,this._stereo=W._stereo,this._pos=W._pos,this._pannerAttr=W._pannerAttr,this._stereo?W.stereo(this._stereo):this._pos?W.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,W._refreshBuffer(this)),P.call(this)}}(Sound.prototype.reset);var V=function(P,W){(W=W||"spatial")==="spatial"?(P._panner=Howler.ctx.createPanner(),P._panner.coneInnerAngle=P._pannerAttr.coneInnerAngle,P._panner.coneOuterAngle=P._pannerAttr.coneOuterAngle,P._panner.coneOuterGain=P._pannerAttr.coneOuterGain,P._panner.distanceModel=P._pannerAttr.distanceModel,P._panner.maxDistance=P._pannerAttr.maxDistance,P._panner.refDistance=P._pannerAttr.refDistance,P._panner.rolloffFactor=P._pannerAttr.rolloffFactor,P._panner.panningModel=P._pannerAttr.panningModel,P._panner.positionX!==void 0?(P._panner.positionX.setValueAtTime(P._pos[0],Howler.ctx.currentTime),P._panner.positionY.setValueAtTime(P._pos[1],Howler.ctx.currentTime),P._panner.positionZ.setValueAtTime(P._pos[2],Howler.ctx.currentTime)):P._panner.setPosition(P._pos[0],P._pos[1],P._pos[2]),P._panner.orientationX!==void 0?(P._panner.orientationX.setValueAtTime(P._orientation[0],Howler.ctx.currentTime),P._panner.orientationY.setValueAtTime(P._orientation[1],Howler.ctx.currentTime),P._panner.orientationZ.setValueAtTime(P._orientation[2],Howler.ctx.currentTime)):P._panner.setOrientation(P._orientation[0],P._orientation[1],P._orientation[2])):(P._panner=Howler.ctx.createStereoPanner(),P._panner.pan.setValueAtTime(P._stereo,Howler.ctx.currentTime)),P._panner.connect(P._node),P._paused||P._parent.pause(P._id,!0).play(P._id,!0)}}()}).call(this,v(3))},function(T,M){T.exports=`varying vec2 vTextureCoord;
|
|
1720
1720
|
varying vec2 vVertexPosition;
|
|
1721
1721
|
varying float vPercent;
|
|
1722
1722
|
varying float vDirection;
|
|
@@ -1824,7 +1824,7 @@ void main() {
|
|
|
1824
1824
|
vec4 color1 = texture2D(uSampler, vTextureCoord);
|
|
1825
1825
|
gl_FragColor = color1 * alpha;
|
|
1826
1826
|
}
|
|
1827
|
-
`},function(T,M,v){var b;(function(q,ht){var W="model",P="name",V="type",z="vendor",k="version",Z="mobile",vt="tablet",Ot="smarttv",Nt=function(Ct){for(var ot={},yt=0;yt<Ct.length;yt++)ot[Ct[yt].toUpperCase()]=Ct[yt];return ot},E=function(Ct,ot){return typeof Ct=="string"&&L(ot).indexOf(L(Ct))!==-1},L=function(Ct){return Ct.toLowerCase()},O=function(Ct,ot){if(typeof Ct=="string")return Ct=Ct.replace(/^\s\s*/,"").replace(/\s\s*$/,""),ot===void 0?Ct:Ct.substring(0,255)},Y=function(Ct,ot){for(var yt,Pt,H,ft,Et,At,Rt=0;Rt<ot.length&&!Et;){var Wt=ot[Rt],$t=ot[Rt+1];for(yt=Pt=0;yt<Wt.length&&!Et;)if(Et=Wt[yt++].exec(Ct))for(H=0;H<$t.length;H++)At=Et[++Pt],typeof(ft=$t[H])=="object"&&ft.length>0?ft.length===2?typeof ft[1]=="function"?this[ft[0]]=ft[1].call(this,At):this[ft[0]]=ft[1]:ft.length===3?typeof ft[1]!="function"||ft[1].exec&&ft[1].test?this[ft[0]]=At?At.replace(ft[1],ft[2]):void 0:this[ft[0]]=At?ft[1].call(this,At,ft[2]):void 0:ft.length===4&&(this[ft[0]]=At?ft[3].call(this,At.replace(ft[1],ft[2])):void 0):this[ft]=At||void 0;Rt+=2}},C=function(Ct,ot){for(var yt in ot)if(typeof ot[yt]=="object"&&ot[yt].length>0){for(var Pt=0;Pt<ot[yt].length;Pt++)if(E(ot[yt][Pt],Ct))return yt==="?"?void 0:yt}else if(E(ot[yt],Ct))return yt==="?"?void 0:yt;return Ct},j={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[k,[P,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[k,[P,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[P,k],[/opios[\/ ]+([\w\.]+)/i],[k,[P,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[k,[P,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[P,k],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[k,[P,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[k,[P,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[k,[P,"WeChat"]],[/konqueror\/([\w\.]+)/i],[k,[P,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[k,[P,"IE"]],[/yabrowser\/([\w\.]+)/i],[k,[P,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[P,/(.+)/,"$1 Secure Browser"],k],[/\bfocus\/([\w\.]+)/i],[k,[P,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[k,[P,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[k,[P,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[k,[P,"Dolphin"]],[/coast\/([\w\.]+)/i],[k,[P,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[k,[P,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[k,[P,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[P,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[P,/(.+)/,"$1 Browser"],k],[/(comodo_dragon)\/([\w\.]+)/i],[[P,/_/g," "],k],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[P,k],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[P],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[P,"Facebook"],k],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[P,k],[/\bgsa\/([\w\.]+) .*safari\//i],[k,[P,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[k,[P,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[P,"Chrome WebView"],k],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[k,[P,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[P,k],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[k,[P,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[k,P],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[P,[k,C,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[P,k],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[P,"Netscape"],k],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[k,[P,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[P,k]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",L]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",L]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",L]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[W,[z,"Samsung"],[V,vt]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[W,[z,"Samsung"],[V,Z]],[/\((ip(?:hone|od)[\w ]*);/i],[W,[z,"Apple"],[V,Z]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[W,[z,"Apple"],[V,vt]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[W,[z,"Huawei"],[V,vt]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[W,[z,"Huawei"],[V,Z]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[W,/_/g," "],[z,"Xiaomi"],[V,Z]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[W,/_/g," "],[z,"Xiaomi"],[V,vt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[W,[z,"OPPO"],[V,Z]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[W,[z,"Vivo"],[V,Z]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[W,[z,"Realme"],[V,Z]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[W,[z,"Motorola"],[V,Z]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[W,[z,"Motorola"],[V,vt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[W,[z,"LG"],[V,vt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[W,[z,"LG"],[V,Z]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[W,[z,"Lenovo"],[V,vt]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[W,/_/g," "],[z,"Nokia"],[V,Z]],[/(pixel c)\b/i],[W,[z,"Google"],[V,vt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[W,[z,"Google"],[V,Z]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[W,[z,"Sony"],[V,Z]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[W,"Xperia Tablet"],[z,"Sony"],[V,vt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[W,[z,"OnePlus"],[V,Z]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[W,[z,"Amazon"],[V,vt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[W,/(.+)/g,"Fire Phone $1"],[z,"Amazon"],[V,Z]],[/(playbook);[-\w\),; ]+(rim)/i],[W,z,[V,vt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[W,[z,"BlackBerry"],[V,Z]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[W,[z,"ASUS"],[V,vt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[W,[z,"ASUS"],[V,Z]],[/(nexus 9)/i],[W,[z,"HTC"],[V,vt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[z,[W,/_/g," "],[V,Z]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[W,[z,"Acer"],[V,vt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[W,[z,"Meizu"],[V,Z]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[W,[z,"Sharp"],[V,Z]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[z,W,[V,Z]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[z,W,[V,vt]],[/(surface duo)/i],[W,[z,"Microsoft"],[V,vt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[W,[z,"Fairphone"],[V,Z]],[/(u304aa)/i],[W,[z,"AT&T"],[V,Z]],[/\bsie-(\w*)/i],[W,[z,"Siemens"],[V,Z]],[/\b(rct\w+) b/i],[W,[z,"RCA"],[V,vt]],[/\b(venue[\d ]{2,7}) b/i],[W,[z,"Dell"],[V,vt]],[/\b(q(?:mv|ta)\w+) b/i],[W,[z,"Verizon"],[V,vt]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[W,[z,"Barnes & Noble"],[V,vt]],[/\b(tm\d{3}\w+) b/i],[W,[z,"NuVision"],[V,vt]],[/\b(k88) b/i],[W,[z,"ZTE"],[V,vt]],[/\b(nx\d{3}j) b/i],[W,[z,"ZTE"],[V,Z]],[/\b(gen\d{3}) b.+49h/i],[W,[z,"Swiss"],[V,Z]],[/\b(zur\d{3}) b/i],[W,[z,"Swiss"],[V,vt]],[/\b((zeki)?tb.*\b) b/i],[W,[z,"Zeki"],[V,vt]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[z,"Dragon Touch"],W,[V,vt]],[/\b(ns-?\w{0,9}) b/i],[W,[z,"Insignia"],[V,vt]],[/\b((nxa|next)-?\w{0,9}) b/i],[W,[z,"NextBook"],[V,vt]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[z,"Voice"],W,[V,Z]],[/\b(lvtel\-)?(v1[12]) b/i],[[z,"LvTel"],W,[V,Z]],[/\b(ph-1) /i],[W,[z,"Essential"],[V,Z]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[W,[z,"Envizen"],[V,vt]],[/\b(trio[-\w\. ]+) b/i],[W,[z,"MachSpeed"],[V,vt]],[/\btu_(1491) b/i],[W,[z,"Rotor"],[V,vt]],[/(shield[\w ]+) b/i],[W,[z,"Nvidia"],[V,vt]],[/(sprint) (\w+)/i],[z,W,[V,Z]],[/(kin\.[onetw]{3})/i],[[W,/\./g," "],[z,"Microsoft"],[V,Z]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[W,[z,"Zebra"],[V,vt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[W,[z,"Zebra"],[V,Z]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[z,W,[V,"console"]],[/droid.+; (shield) bui/i],[W,[z,"Nvidia"],[V,"console"]],[/(playstation [345portablevi]+)/i],[W,[z,"Sony"],[V,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[W,[z,"Microsoft"],[V,"console"]],[/smart-tv.+(samsung)/i],[z,[V,Ot]],[/hbbtv.+maple;(\d+)/i],[[W,/^/,"SmartTV"],[z,"Samsung"],[V,Ot]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[z,"LG"],[V,Ot]],[/(apple) ?tv/i],[z,[W,"Apple TV"],[V,Ot]],[/crkey/i],[[W,"Chromecast"],[z,"Google"],[V,Ot]],[/droid.+aft(\w)( bui|\))/i],[W,[z,"Amazon"],[V,Ot]],[/\(dtv[\);].+(aquos)/i],[W,[z,"Sharp"],[V,Ot]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[z,O],[W,O],[V,Ot]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[V,Ot]],[/((pebble))app/i],[z,W,[V,"wearable"]],[/droid.+; (glass) \d/i],[W,[z,"Google"],[V,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[W,[z,"Zebra"],[V,"wearable"]],[/(quest( 2)?)/i],[W,[z,"Facebook"],[V,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[z,[V,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[W,[V,Z]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[W,[V,vt]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[V,vt]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[V,Z]],[/(android[-\w\. ]{0,9});.+buil/i],[W,[z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[k,[P,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[k,[P,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[P,k],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[k,P]],os:[[/microsoft (windows) (vista|xp)/i],[P,k],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[P,[k,C,j]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[P,"Windows"],[k,C,j]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[k,/_/g,"."],[P,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[P,"Mac OS"],[k,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[k,P],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[P,k],[/\(bb(10);/i],[k,[P,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[k,[P,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[k,[P,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[k,[P,"webOS"]],[/crkey\/([\d\.]+)/i],[k,[P,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[P,"Chromium OS"],k],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[P,k],[/(sunos) ?([\w\.\d]*)/i],[[P,"Solaris"],k],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[P,k]]},K=function(Ct,ot){if(typeof Ct=="object"&&(ot=Ct,Ct=void 0),!(this instanceof K))return new K(Ct,ot).getResult();var yt=Ct||(q!==void 0&&q.navigator&&q.navigator.userAgent?q.navigator.userAgent:""),Pt=ot?function(H,ft){var Et={};for(var At in H)ft[At]&&ft[At].length%2==0?Et[At]=ft[At].concat(H[At]):Et[At]=H[At];return Et}(X,ot):X;return this.getBrowser=function(){var H,ft={};return ft[P]=void 0,ft[k]=void 0,Y.call(ft,yt,Pt.browser),ft.major=typeof(H=ft.version)=="string"?H.replace(/[^\d\.]/g,"").split(".")[0]:void 0,ft},this.getCPU=function(){var H={architecture:void 0};return Y.call(H,yt,Pt.cpu),H},this.getDevice=function(){var H={vendor:void 0,model:void 0,type:void 0};return Y.call(H,yt,Pt.device),H},this.getEngine=function(){var H={name:void 0,version:void 0};return Y.call(H,yt,Pt.engine),H},this.getOS=function(){var H={name:void 0,version:void 0};return Y.call(H,yt,Pt.os),H},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return yt},this.setUA=function(H){return yt=typeof H=="string"&&H.length>255?O(H,255):H,this},this.setUA(yt),this};K.VERSION="1.0.2",K.BROWSER=Nt([P,k,"major"]),K.CPU=Nt(["architecture"]),K.DEVICE=Nt([W,z,V,"console",Z,Ot,vt,"wearable","embedded"]),K.ENGINE=K.OS=Nt([P,k]),M!==void 0?(T!==void 0&&T.exports&&(M=T.exports=K),M.UAParser=K):v(63)?(b=function(){return K}.call(M,v,M,T))===void 0||(T.exports=b):q!==void 0&&(q.UAParser=K);var qt=q!==void 0&&(q.jQuery||q.Zepto);if(qt&&!qt.ua){var ge=new K;qt.ua=ge.getResult(),qt.ua.get=function(){return ge.getUA()},qt.ua.set=function(Ct){ge.setUA(Ct);var ot=ge.getResult();for(var yt in ot)qt.ua[yt]=ot[yt]}}})(typeof window=="object"?window:this)},function(T,M,v){(function(b){var q=b!==void 0&&b||typeof self!="undefined"&&self||window,ht=Function.prototype.apply;function W(P,V){this._id=P,this._clearFn=V}M.setTimeout=function(){return new W(ht.call(setTimeout,q,arguments),clearTimeout)},M.setInterval=function(){return new W(ht.call(setInterval,q,arguments),clearInterval)},M.clearTimeout=M.clearInterval=function(P){P&&P.close()},W.prototype.unref=W.prototype.ref=function(){},W.prototype.close=function(){this._clearFn.call(q,this._id)},M.enroll=function(P,V){clearTimeout(P._idleTimeoutId),P._idleTimeout=V},M.unenroll=function(P){clearTimeout(P._idleTimeoutId),P._idleTimeout=-1},M._unrefActive=M.active=function(P){clearTimeout(P._idleTimeoutId);var V=P._idleTimeout;V>=0&&(P._idleTimeoutId=setTimeout(function(){P._onTimeout&&P._onTimeout()},V))},v(55),M.setImmediate=typeof self!="undefined"&&self.setImmediate||b!==void 0&&b.setImmediate||this&&this.setImmediate,M.clearImmediate=typeof self!="undefined"&&self.clearImmediate||b!==void 0&&b.clearImmediate||this&&this.clearImmediate}).call(this,v(3))},function(T,M,v){(function(b,q){(function(ht,W){if(!ht.setImmediate){var P,V,z,k,Z,vt=1,Ot={},Nt=!1,E=ht.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(ht);L=L&&L.setTimeout?L:ht,{}.toString.call(ht.process)==="[object process]"?P=function(C){q.nextTick(function(){Y(C)})}:function(){if(ht.postMessage&&!ht.importScripts){var C=!0,j=ht.onmessage;return ht.onmessage=function(){C=!1},ht.postMessage("","*"),ht.onmessage=j,C}}()?(k="setImmediate$"+Math.random()+"$",Z=function(C){C.source===ht&&typeof C.data=="string"&&C.data.indexOf(k)===0&&Y(+C.data.slice(k.length))},ht.addEventListener?ht.addEventListener("message",Z,!1):ht.attachEvent("onmessage",Z),P=function(C){ht.postMessage(k+C,"*")}):ht.MessageChannel?((z=new MessageChannel).port1.onmessage=function(C){Y(C.data)},P=function(C){z.port2.postMessage(C)}):E&&"onreadystatechange"in E.createElement("script")?(V=E.documentElement,P=function(C){var j=E.createElement("script");j.onreadystatechange=function(){Y(C),j.onreadystatechange=null,V.removeChild(j),j=null},V.appendChild(j)}):P=function(C){setTimeout(Y,0,C)},L.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var j=new Array(arguments.length-1),X=0;X<j.length;X++)j[X]=arguments[X+1];var K={callback:C,args:j};return Ot[vt]=K,P(vt),vt++},L.clearImmediate=O}function O(C){delete Ot[C]}function Y(C){if(Nt)setTimeout(Y,0,C);else{var j=Ot[C];if(j){Nt=!0;try{(function(X){var K=X.callback,qt=X.args;switch(qt.length){case 0:K();break;case 1:K(qt[0]);break;case 2:K(qt[0],qt[1]);break;case 3:K(qt[0],qt[1],qt[2]);break;default:K.apply(void 0,qt)}})(j)}finally{O(C),Nt=!1}}}}})(typeof self=="undefined"?b===void 0?this:b:self)}).call(this,v(3),v(56))},function(T,M){var v,b,q=T.exports={};function ht(){throw new Error("setTimeout has not been defined")}function W(){throw new Error("clearTimeout has not been defined")}function P(L){if(v===setTimeout)return setTimeout(L,0);if((v===ht||!v)&&setTimeout)return v=setTimeout,setTimeout(L,0);try{return v(L,0)}catch{try{return v.call(null,L,0)}catch{return v.call(this,L,0)}}}(function(){try{v=typeof setTimeout=="function"?setTimeout:ht}catch{v=ht}try{b=typeof clearTimeout=="function"?clearTimeout:W}catch{b=W}})();var V,z=[],k=!1,Z=-1;function vt(){k&&V&&(k=!1,V.length?z=V.concat(z):Z=-1,z.length&&Ot())}function Ot(){if(!k){var L=P(vt);k=!0;for(var O=z.length;O;){for(V=z,z=[];++Z<O;)V&&V[Z].run();Z=-1,O=z.length}V=null,k=!1,function(Y){if(b===clearTimeout)return clearTimeout(Y);if((b===W||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(Y);try{b(Y)}catch{try{return b.call(null,Y)}catch{return b.call(this,Y)}}}(L)}}function Nt(L,O){this.fun=L,this.array=O}function E(){}q.nextTick=function(L){var O=new Array(arguments.length-1);if(arguments.length>1)for(var Y=1;Y<arguments.length;Y++)O[Y-1]=arguments[Y];z.push(new Nt(L,O)),z.length!==1||k||P(Ot)},Nt.prototype.run=function(){this.fun.apply(null,this.array)},q.title="browser",q.browser=!0,q.env={},q.argv=[],q.version="",q.versions={},q.on=E,q.addListener=E,q.once=E,q.off=E,q.removeListener=E,q.removeAllListeners=E,q.emit=E,q.prependListener=E,q.prependOnceListener=E,q.listeners=function(L){return[]},q.binding=function(L){throw new Error("process.binding is not supported")},q.cwd=function(){return"/"},q.chdir=function(L){throw new Error("process.chdir is not supported")},q.umask=function(){return 0}},function(T,M,v){(function(b,q){var ht;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(W){M&&M.nodeType,b&&b.nodeType;var P=typeof q=="object"&&q;P.global!==P&&P.window!==P&&P.self;var V,z=2147483647,k=/^xn--/,Z=/[^\x20-\x7E]/,vt=/[\x2E\u3002\uFF0E\uFF61]/g,Ot={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Nt=Math.floor,E=String.fromCharCode;function L(Ct){throw new RangeError(Ot[Ct])}function O(Ct,ot){for(var yt=Ct.length,Pt=[];yt--;)Pt[yt]=ot(Ct[yt]);return Pt}function Y(Ct,ot){var yt=Ct.split("@"),Pt="";return yt.length>1&&(Pt=yt[0]+"@",Ct=yt[1]),Pt+O((Ct=Ct.replace(vt,".")).split("."),ot).join(".")}function C(Ct){for(var ot,yt,Pt=[],H=0,ft=Ct.length;H<ft;)(ot=Ct.charCodeAt(H++))>=55296&&ot<=56319&&H<ft?(64512&(yt=Ct.charCodeAt(H++)))==56320?Pt.push(((1023&ot)<<10)+(1023&yt)+65536):(Pt.push(ot),H--):Pt.push(ot);return Pt}function j(Ct){return O(Ct,function(ot){var yt="";return ot>65535&&(yt+=E((ot-=65536)>>>10&1023|55296),ot=56320|1023&ot),yt+=E(ot)}).join("")}function X(Ct,ot){return Ct+22+75*(Ct<26)-((ot!=0)<<5)}function K(Ct,ot,yt){var Pt=0;for(Ct=yt?Nt(Ct/700):Ct>>1,Ct+=Nt(Ct/ot);Ct>455;Pt+=36)Ct=Nt(Ct/35);return Nt(Pt+36*Ct/(Ct+38))}function qt(Ct){var ot,yt,Pt,H,ft,Et,At,Rt,Wt,$t,ye,me=[],ui=Ct.length,be=0,ei=128,Ze=72;for((yt=Ct.lastIndexOf("-"))<0&&(yt=0),Pt=0;Pt<yt;++Pt)Ct.charCodeAt(Pt)>=128&&L("not-basic"),me.push(Ct.charCodeAt(Pt));for(H=yt>0?yt+1:0;H<ui;){for(ft=be,Et=1,At=36;H>=ui&&L("invalid-input"),((Rt=(ye=Ct.charCodeAt(H++))-48<10?ye-22:ye-65<26?ye-65:ye-97<26?ye-97:36)>=36||Rt>Nt((z-be)/Et))&&L("overflow"),be+=Rt*Et,!(Rt<(Wt=At<=Ze?1:At>=Ze+26?26:At-Ze));At+=36)Et>Nt(z/($t=36-Wt))&&L("overflow"),Et*=$t;Ze=K(be-ft,ot=me.length+1,ft==0),Nt(be/ot)>z-ei&&L("overflow"),ei+=Nt(be/ot),be%=ot,me.splice(be++,0,ei)}return j(me)}function ge(Ct){var ot,yt,Pt,H,ft,Et,At,Rt,Wt,$t,ye,me,ui,be,ei,Ze=[];for(me=(Ct=C(Ct)).length,ot=128,yt=0,ft=72,Et=0;Et<me;++Et)(ye=Ct[Et])<128&&Ze.push(E(ye));for(Pt=H=Ze.length,H&&Ze.push("-");Pt<me;){for(At=z,Et=0;Et<me;++Et)(ye=Ct[Et])>=ot&&ye<At&&(At=ye);for(At-ot>Nt((z-yt)/(ui=Pt+1))&&L("overflow"),yt+=(At-ot)*ui,ot=At,Et=0;Et<me;++Et)if((ye=Ct[Et])<ot&&++yt>z&&L("overflow"),ye==ot){for(Rt=yt,Wt=36;!(Rt<($t=Wt<=ft?1:Wt>=ft+26?26:Wt-ft));Wt+=36)ei=Rt-$t,be=36-$t,Ze.push(E(X($t+ei%be,0))),Rt=Nt(ei/be);Ze.push(E(X(Rt,0))),ft=K(yt,ui,Pt==H),yt=0,++Pt}++yt,++ot}return Ze.join("")}V={version:"1.4.1",ucs2:{decode:C,encode:j},decode:qt,encode:ge,toASCII:function(Ct){return Y(Ct,function(ot){return Z.test(ot)?"xn--"+ge(ot):ot})},toUnicode:function(Ct){return Y(Ct,function(ot){return k.test(ot)?qt(ot.slice(4).toLowerCase()):ot})}},(ht=function(){return V}.call(M,v,M,b))===void 0||(b.exports=ht)})()}).call(this,v(7)(T),v(3))},function(T,M,v){T.exports={isString:function(b){return typeof b=="string"},isObject:function(b){return typeof b=="object"&&b!==null},isNull:function(b){return b===null},isNullOrUndefined:function(b){return b==null}}},function(T,M,v){M.decode=M.parse=v(60),M.encode=M.stringify=v(61)},function(T,M,v){function b(ht,W){return Object.prototype.hasOwnProperty.call(ht,W)}T.exports=function(ht,W,P,V){W=W||"&",P=P||"=";var z={};if(typeof ht!="string"||ht.length===0)return z;var k=/\+/g;ht=ht.split(W);var Z=1e3;V&&typeof V.maxKeys=="number"&&(Z=V.maxKeys);var vt=ht.length;Z>0&&vt>Z&&(vt=Z);for(var Ot=0;Ot<vt;++Ot){var Nt,E,L,O,Y=ht[Ot].replace(k,"%20"),C=Y.indexOf(P);C>=0?(Nt=Y.substr(0,C),E=Y.substr(C+1)):(Nt=Y,E=""),L=decodeURIComponent(Nt),O=decodeURIComponent(E),b(z,L)?q(z[L])?z[L].push(O):z[L]=[z[L],O]:z[L]=O}return z};var q=Array.isArray||function(ht){return Object.prototype.toString.call(ht)==="[object Array]"}},function(T,M,v){var b=function(P){switch(typeof P){case"string":return P;case"boolean":return P?"true":"false";case"number":return isFinite(P)?P:"";default:return""}};T.exports=function(P,V,z,k){return V=V||"&",z=z||"=",P===null&&(P=void 0),typeof P=="object"?ht(W(P),function(Z){var vt=encodeURIComponent(b(Z))+z;return q(P[Z])?ht(P[Z],function(Ot){return vt+encodeURIComponent(b(Ot))}).join(V):vt+encodeURIComponent(b(P[Z]))}).join(V):k?encodeURIComponent(b(k))+z+encodeURIComponent(b(P)):""};var q=Array.isArray||function(P){return Object.prototype.toString.call(P)==="[object Array]"};function ht(P,V){if(P.map)return P.map(V);for(var z=[],k=0;k<P.length;k++)z.push(V(P[k],k));return z}var W=Object.keys||function(P){var V=[];for(var z in P)Object.prototype.hasOwnProperty.call(P,z)&&V.push(z);return V}},function(T,M){var v=function(){};v.prototype={fit:function(b){var q,ht,W,P,V=b.length,z=V>0?b[0].width:0,k=V>0?b[0].height:0;for(this.root={x:0,y:0,width:z,height:k},q=0;q<V;q++)W=b[q],(ht=this.findNode(this.root,W.width,W.height))?(P=this.splitNode(ht,W.width,W.height),W.x=P.x,W.y=P.y):(P=this.growNode(W.width,W.height),W.x=P.x,W.y=P.y)},findNode:function(b,q,ht){return b.used?this.findNode(b.right,q,ht)||this.findNode(b.down,q,ht):q<=b.width&&ht<=b.height?b:null},splitNode:function(b,q,ht){return b.used=!0,b.down={x:b.x,y:b.y+ht,width:b.width,height:b.height-ht},b.right={x:b.x+q,y:b.y,width:b.width-q,height:ht},b},growNode:function(b,q){var ht=b<=this.root.width,W=q<=this.root.height,P=W&&this.root.height>=this.root.width+b,V=ht&&this.root.width>=this.root.height+q;return P?this.growRight(b,q):V?this.growDown(b,q):W?this.growRight(b,q):ht?this.growDown(b,q):null},growRight:function(b,q){var ht;return this.root={used:!0,x:0,y:0,width:this.root.width+b,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:b,height:this.root.height}},(ht=this.findNode(this.root,b,q))?this.splitNode(ht,b,q):null},growDown:function(b,q){var ht;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+q,down:{x:0,y:this.root.height,width:this.root.width,height:q},right:this.root},(ht=this.findNode(this.root,b,q))?this.splitNode(ht,b,q):null}},T.exports=v},function(T,M){(function(v){T.exports=v}).call(this,{})},function(T,M,v){v.r(M),v.d(M,"ErrorType",function(){return cr}),v.d(M,"preloadResource",function(){return AO}),v.d(M,"delay",function(){return ry}),v.d(M,"waitUntil",function(){return IO}),v.d(M,"SLIDE_EVENTS",function(){return Jr}),v.d(M,"Slide",function(){return Fg});var b={};v.r(b),v.d(b,"ACESFilmicToneMapping",function(){return Tt}),v.d(b,"AddEquation",function(){return Et}),v.d(b,"AddOperation",function(){return Ua}),v.d(b,"AdditiveAnimationBlendMode",function(){return It}),v.d(b,"AdditiveBlending",function(){return yt}),v.d(b,"AlphaFormat",function(){return Bi}),v.d(b,"AlwaysDepth",function(){return Li}),v.d(b,"AlwaysStencilFunc",function(){return zl}),v.d(b,"AmbientLight",function(){return Sm}),v.d(b,"AmbientLightProbe",function(){return Ox}),v.d(b,"AnimationClip",function(){return ip}),v.d(b,"AnimationLoader",function(){return BM}),v.d(b,"AnimationMixer",function(){return jx}),v.d(b,"AnimationObjectGroup",function(){return zx}),v.d(b,"AnimationUtils",function(){return an}),v.d(b,"ArcCurve",function(){return uo}),v.d(b,"ArrayCamera",function(){return Vd}),v.d(b,"ArrowHelper",function(){return mA}),v.d(b,"Audio",function(){return m0}),v.d(b,"AudioAnalyser",function(){return Gx}),v.d(b,"AudioContext",function(){return f0}),v.d(b,"AudioListener",function(){return WM}),v.d(b,"AudioLoader",function(){return Ix}),v.d(b,"AxesHelper",function(){return sb}),v.d(b,"AxisHelper",function(){return XA}),v.d(b,"BackSide",function(){return X}),v.d(b,"BasicDepthPacking",function(){return Gl}),v.d(b,"BasicShadowMap",function(){return L}),v.d(b,"BinaryTextureLoader",function(){return ZA}),v.d(b,"Bone",function(){return qh}),v.d(b,"BooleanKeyframeTrack",function(){return vu}),v.d(b,"BoundingBoxHelper",function(){return qA}),v.d(b,"Box2",function(){return hc}),v.d(b,"Box3",function(){return $i}),v.d(b,"Box3Helper",function(){return pA}),v.d(b,"BoxBufferGeometry",function(){return Ao}),v.d(b,"BoxGeometry",function(){return Ao}),v.d(b,"BoxHelper",function(){return rb}),v.d(b,"BufferAttribute",function(){return mi}),v.d(b,"BufferGeometry",function(){return ze}),v.d(b,"BufferGeometryLoader",function(){return Mx}),v.d(b,"ByteType",function(){return tf}),v.d(b,"Cache",function(){return yu}),v.d(b,"Camera",function(){return da}),v.d(b,"CameraHelper",function(){return dA}),v.d(b,"CanvasRenderer",function(){return QA}),v.d(b,"CanvasTexture",function(){return Ve}),v.d(b,"CatmullRomCurve3",function(){return Kh}),v.d(b,"CineonToneMapping",function(){return at}),v.d(b,"CircleBufferGeometry",function(){return pe}),v.d(b,"CircleGeometry",function(){return pe}),v.d(b,"ClampToEdgeWrapping",function(){return qe}),v.d(b,"Clock",function(){return Fx}),v.d(b,"Color",function(){return Le}),v.d(b,"ColorKeyframeTrack",function(){return e0}),v.d(b,"CompressedTexture",function(){return Fe}),v.d(b,"CompressedTextureLoader",function(){return kM}),v.d(b,"ConeBufferGeometry",function(){return Ce}),v.d(b,"ConeGeometry",function(){return Ce}),v.d(b,"CubeCamera",function(){return pa}),v.d(b,"CubeReflectionMapping",function(){return zt}),v.d(b,"CubeRefractionMapping",function(){return ne}),v.d(b,"CubeTexture",function(){return ao}),v.d(b,"CubeTextureLoader",function(){return mx}),v.d(b,"CubeUVReflectionMapping",function(){return xe}),v.d(b,"CubeUVRefractionMapping",function(){return Ie}),v.d(b,"CubicBezierCurve",function(){return Sa}),v.d(b,"CubicBezierCurve3",function(){return pl}),v.d(b,"CubicInterpolant",function(){return cx}),v.d(b,"CullFaceBack",function(){return Ot}),v.d(b,"CullFaceFront",function(){return Nt}),v.d(b,"CullFaceFrontBack",function(){return E}),v.d(b,"CullFaceNone",function(){return vt}),v.d(b,"Curve",function(){return dn}),v.d(b,"CurvePath",function(){return vx}),v.d(b,"CustomBlending",function(){return ft}),v.d(b,"CustomToneMapping",function(){return bt}),v.d(b,"CylinderBufferGeometry",function(){return He}),v.d(b,"CylinderGeometry",function(){return He}),v.d(b,"Cylindrical",function(){return oA}),v.d(b,"DataTexture",function(){return Ms}),v.d(b,"DataTexture2DArray",function(){return Oh}),v.d(b,"DataTexture3D",function(){return Xr}),v.d(b,"DataTextureLoader",function(){return gx}),v.d(b,"DataUtils",function(){return vA}),v.d(b,"DecrementStencilOp",function(){return uh}),v.d(b,"DecrementWrapStencilOp",function(){return rv}),v.d(b,"DefaultLoadingManager",function(){return fx}),v.d(b,"DepthFormat",function(){return en}),v.d(b,"DepthStencilFormat",function(){return Js}),v.d(b,"DepthTexture",function(){return re}),v.d(b,"DirectionalLight",function(){return wm}),v.d(b,"DirectionalLightHelper",function(){return cA}),v.d(b,"DiscreteInterpolant",function(){return dx}),v.d(b,"DodecahedronBufferGeometry",function(){return Ye}),v.d(b,"DodecahedronGeometry",function(){return Ye}),v.d(b,"DoubleSide",function(){return K}),v.d(b,"DstAlphaFactor",function(){return ri}),v.d(b,"DstColorFactor",function(){return ki}),v.d(b,"DynamicBufferAttribute",function(){return FA}),v.d(b,"DynamicCopyUsage",function(){return fh}),v.d(b,"DynamicDrawUsage",function(){return xo}),v.d(b,"DynamicReadUsage",function(){return sv}),v.d(b,"EdgesGeometry",function(){return qn}),v.d(b,"EdgesHelper",function(){return YA}),v.d(b,"EllipseCurve",function(){return sn}),v.d(b,"EqualDepth",function(){return tn}),v.d(b,"EqualStencilFunc",function(){return ch}),v.d(b,"EquirectangularReflectionMapping",function(){return se}),v.d(b,"EquirectangularRefractionMapping",function(){return ae}),v.d(b,"Euler",function(){return oa}),v.d(b,"EventDispatcher",function(){return Ho}),v.d(b,"ExtrudeBufferGeometry",function(){return Ko}),v.d(b,"ExtrudeGeometry",function(){return Ko}),v.d(b,"FaceColors",function(){return EA}),v.d(b,"FileLoader",function(){return es}),v.d(b,"FlatShading",function(){return qt}),v.d(b,"Float16BufferAttribute",function(){return Mf}),v.d(b,"Float32Attribute",function(){return VA}),v.d(b,"Float32BufferAttribute",function(){return _e}),v.d(b,"Float64Attribute",function(){return WA}),v.d(b,"Float64BufferAttribute",function(){return Sd}),v.d(b,"FloatType",function(){return Fo}),v.d(b,"Fog",function(){return su}),v.d(b,"FogExp2",function(){return Bn}),v.d(b,"Font",function(){return p0}),v.d(b,"FontLoader",function(){return zM}),v.d(b,"FrontSide",function(){return j}),v.d(b,"Frustum",function(){return rl}),v.d(b,"GLBufferAttribute",function(){return Wx}),v.d(b,"GLSL1",function(){return ud}),v.d(b,"GLSL3",function(){return hd}),v.d(b,"GammaEncoding",function(){return ln}),v.d(b,"GreaterDepth",function(){return Kn}),v.d(b,"GreaterEqualDepth",function(){return Zn}),v.d(b,"GreaterEqualStencilFunc",function(){return yf}),v.d(b,"GreaterStencilFunc",function(){return dh}),v.d(b,"GridHelper",function(){return eb}),v.d(b,"Group",function(){return va}),v.d(b,"HalfFloatType",function(){return $s}),v.d(b,"HemisphereLight",function(){return r0}),v.d(b,"HemisphereLightHelper",function(){return uA}),v.d(b,"HemisphereLightProbe",function(){return Lx}),v.d(b,"IcosahedronBufferGeometry",function(){return tc}),v.d(b,"IcosahedronGeometry",function(){return tc}),v.d(b,"ImageBitmapLoader",function(){return Cx}),v.d(b,"ImageLoader",function(){return np}),v.d(b,"ImageUtils",function(){return Gr}),v.d(b,"ImmediateRenderObject",function(){return Jx}),v.d(b,"IncrementStencilOp",function(){return gf}),v.d(b,"IncrementWrapStencilOp",function(){return nv}),v.d(b,"InstancedBufferAttribute",function(){return d0}),v.d(b,"InstancedBufferGeometry",function(){return c0}),v.d(b,"InstancedInterleavedBuffer",function(){return Vx}),v.d(b,"InstancedMesh",function(){return qd}),v.d(b,"Int16Attribute",function(){return GA}),v.d(b,"Int16BufferAttribute",function(){return wd}),v.d(b,"Int32Attribute",function(){return zA}),v.d(b,"Int32BufferAttribute",function(){return Ch}),v.d(b,"Int8Attribute",function(){return BA}),v.d(b,"Int8BufferAttribute",function(){return Jl}),v.d(b,"IntType",function(){return nf}),v.d(b,"InterleavedBuffer",function(){return _a}),v.d(b,"InterleavedBufferAttribute",function(){return Zo}),v.d(b,"Interpolant",function(){return Ea}),v.d(b,"InterpolateDiscrete",function(){return ps}),v.d(b,"InterpolateLinear",function(){return Bl}),v.d(b,"InterpolateSmooth",function(){return Go}),v.d(b,"InvertStencilOp",function(){return ov}),v.d(b,"JSONLoader",function(){return t2}),v.d(b,"KeepStencilOp",function(){return Mi}),v.d(b,"KeyframeTrack",function(){return Qo}),v.d(b,"LOD",function(){return am}),v.d(b,"LatheBufferGeometry",function(){return ec}),v.d(b,"LatheGeometry",function(){return ec}),v.d(b,"Layers",function(){return fd}),v.d(b,"LensFlare",function(){return i2}),v.d(b,"LessDepth",function(){return Gi}),v.d(b,"LessEqualDepth",function(){return Nn}),v.d(b,"LessEqualStencilFunc",function(){return vf}),v.d(b,"LessStencilFunc",function(){return ms}),v.d(b,"Light",function(){return is}),v.d(b,"LightProbe",function(){return op}),v.d(b,"Line",function(){return c}),v.d(b,"Line3",function(){return $x}),v.d(b,"LineBasicMaterial",function(){return kn}),v.d(b,"LineCurve",function(){return fl}),v.d(b,"LineCurve3",function(){return pu}),v.d(b,"LineDashedMaterial",function(){return Qv}),v.d(b,"LineLoop",function(){return D}),v.d(b,"LinePieces",function(){return SA}),v.d(b,"LineSegments",function(){return R}),v.d(b,"LineStrip",function(){return wA}),v.d(b,"LinearEncoding",function(){return Be}),v.d(b,"LinearFilter",function(){return Yi}),v.d(b,"LinearInterpolant",function(){return t0}),v.d(b,"LinearMipMapLinearFilter",function(){return Qp}),v.d(b,"LinearMipMapNearestFilter",function(){return Kp}),v.d(b,"LinearMipmapLinearFilter",function(){return qs}),v.d(b,"LinearMipmapNearestFilter",function(){return cs}),v.d(b,"LinearToneMapping",function(){return J}),v.d(b,"Loader",function(){return _r}),v.d(b,"LoaderUtils",function(){return Tm}),v.d(b,"LoadingManager",function(){return i0}),v.d(b,"LogLuvEncoding",function(){return Ui}),v.d(b,"LoopOnce",function(){return ah}),v.d(b,"LoopPingPong",function(){return Uo}),v.d(b,"LoopRepeat",function(){return sd}),v.d(b,"LuminanceAlphaFormat",function(){return Xc}),v.d(b,"LuminanceFormat",function(){return af}),v.d(b,"MOUSE",function(){return k}),v.d(b,"Material",function(){return Fn}),v.d(b,"MaterialLoader",function(){return Ex}),v.d(b,"Math",function(){return ia}),v.d(b,"MathUtils",function(){return ia}),v.d(b,"Matrix3",function(){return ji}),v.d(b,"Matrix4",function(){return Ee}),v.d(b,"MaxEquation",function(){return $t}),v.d(b,"Mesh",function(){return Ei}),v.d(b,"MeshBasicMaterial",function(){return fn}),v.d(b,"MeshDepthMaterial",function(){return wi}),v.d(b,"MeshDistanceMaterial",function(){return Gh}),v.d(b,"MeshFaceMaterial",function(){return AA}),v.d(b,"MeshLambertMaterial",function(){return bm}),v.d(b,"MeshMatcapMaterial",function(){return Kv}),v.d(b,"MeshNormalMaterial",function(){return Zv}),v.d(b,"MeshPhongMaterial",function(){return xm}),v.d(b,"MeshPhysicalMaterial",function(){return $v}),v.d(b,"MeshStandardMaterial",function(){return ym}),v.d(b,"MeshToonMaterial",function(){return Jv}),v.d(b,"MinEquation",function(){return Wt}),v.d(b,"MirroredRepeatWrapping",function(){return pi}),v.d(b,"MixOperation",function(){return qu}),v.d(b,"MultiMaterial",function(){return RA}),v.d(b,"MultiplyBlending",function(){return H}),v.d(b,"MultiplyOperation",function(){return Ws}),v.d(b,"NearestFilter",function(){return fi}),v.d(b,"NearestMipMapLinearFilter",function(){return Nl}),v.d(b,"NearestMipMapNearestFilter",function(){return Do}),v.d(b,"NearestMipmapLinearFilter",function(){return Xs}),v.d(b,"NearestMipmapNearestFilter",function(){return Tr}),v.d(b,"NeverDepth",function(){return Qi}),v.d(b,"NeverStencilFunc",function(){return hh}),v.d(b,"NoBlending",function(){return Ct}),v.d(b,"NoColors",function(){return TA}),v.d(b,"NoToneMapping",function(){return to}),v.d(b,"NormalAnimationBlendMode",function(){return Qs}),v.d(b,"NormalBlending",function(){return ot}),v.d(b,"NotEqualDepth",function(){return ka}),v.d(b,"NotEqualStencilFunc",function(){return _f}),v.d(b,"NumberKeyframeTrack",function(){return tp}),v.d(b,"Object3D",function(){return hi}),v.d(b,"ObjectLoader",function(){return UM}),v.d(b,"ObjectSpaceNormalMap",function(){return Hl}),v.d(b,"OctahedronBufferGeometry",function(){return fu}),v.d(b,"OctahedronGeometry",function(){return fu}),v.d(b,"OneFactor",function(){return me}),v.d(b,"OneMinusDstAlphaFactor",function(){return De}),v.d(b,"OneMinusDstColorFactor",function(){return Fi}),v.d(b,"OneMinusSrcAlphaFactor",function(){return Ze}),v.d(b,"OneMinusSrcColorFactor",function(){return be}),v.d(b,"OrthographicCamera",function(){return uc}),v.d(b,"PCFShadowMap",function(){return O}),v.d(b,"PCFSoftShadowMap",function(){return Y}),v.d(b,"PMREMGenerator",function(){return yA}),v.d(b,"ParametricBufferGeometry",function(){return Qd}),v.d(b,"ParametricGeometry",function(){return Qd}),v.d(b,"Particle",function(){return PA}),v.d(b,"ParticleBasicMaterial",function(){return OA}),v.d(b,"ParticleSystem",function(){return IA}),v.d(b,"ParticleSystemMaterial",function(){return NA}),v.d(b,"Path",function(){return xu}),v.d(b,"PerspectiveCamera",function(){return mn}),v.d(b,"Plane",function(){return Wr}),v.d(b,"PlaneBufferGeometry",function(){return er}),v.d(b,"PlaneGeometry",function(){return er}),v.d(b,"PlaneHelper",function(){return fA}),v.d(b,"PointCloud",function(){return CA}),v.d(b,"PointCloudMaterial",function(){return LA}),v.d(b,"PointLight",function(){return l0}),v.d(b,"PointLightHelper",function(){return aA}),v.d(b,"Points",function(){return Zt}),v.d(b,"PointsMaterial",function(){return $}),v.d(b,"PolarGridHelper",function(){return hA}),v.d(b,"PolyhedronBufferGeometry",function(){return Ue}),v.d(b,"PolyhedronGeometry",function(){return Ue}),v.d(b,"PositionalAudio",function(){return qM}),v.d(b,"PropertyBinding",function(){return Ci}),v.d(b,"PropertyMixer",function(){return Hx}),v.d(b,"QuadraticBezierCurve",function(){return Ta}),v.d(b,"QuadraticBezierCurve3",function(){return jv}),v.d(b,"Quaternion",function(){return Dn}),v.d(b,"QuaternionKeyframeTrack",function(){return lc}),v.d(b,"QuaternionLinearInterpolant",function(){return px}),v.d(b,"REVISION",function(){return z}),v.d(b,"RGBADepthPacking",function(){return ld}),v.d(b,"RGBAFormat",function(){return Er}),v.d(b,"RGBAIntegerFormat",function(){return $c}),v.d(b,"RGBA_ASTC_10x10_Format",function(){return td}),v.d(b,"RGBA_ASTC_10x5_Format",function(){return Fl}),v.d(b,"RGBA_ASTC_10x6_Format",function(){return Zs}),v.d(b,"RGBA_ASTC_10x8_Format",function(){return cf}),v.d(b,"RGBA_ASTC_12x10_Format",function(){return ed}),v.d(b,"RGBA_ASTC_12x12_Format",function(){return ih}),v.d(b,"RGBA_ASTC_4x4_Format",function(){return Qu}),v.d(b,"RGBA_ASTC_5x4_Format",function(){return Hi}),v.d(b,"RGBA_ASTC_5x5_Format",function(){return ko}),v.d(b,"RGBA_ASTC_6x5_Format",function(){return th}),v.d(b,"RGBA_ASTC_6x6_Format",function(){return uf}),v.d(b,"RGBA_ASTC_8x5_Format",function(){return eh}),v.d(b,"RGBA_ASTC_8x6_Format",function(){return hf}),v.d(b,"RGBA_ASTC_8x8_Format",function(){return Qc}),v.d(b,"RGBA_BPTC_Format",function(){return nh}),v.d(b,"RGBA_ETC2_EAC_Format",function(){return Ha}),v.d(b,"RGBA_PVRTC_2BPPV1_Format",function(){return Zc}),v.d(b,"RGBA_PVRTC_4BPPV1_Format",function(){return dr}),v.d(b,"RGBA_S3TC_DXT1_Format",function(){return Ju}),v.d(b,"RGBA_S3TC_DXT3_Format",function(){return Zu}),v.d(b,"RGBA_S3TC_DXT5_Format",function(){return Ku}),v.d(b,"RGBDEncoding",function(){return fr}),v.d(b,"RGBEEncoding",function(){return Ar}),v.d(b,"RGBEFormat",function(){return lf}),v.d(b,"RGBFormat",function(){return Bo}),v.d(b,"RGBIntegerFormat",function(){return Yc}),v.d(b,"RGBM16Encoding",function(){return ad}),v.d(b,"RGBM7Encoding",function(){return Ul}),v.d(b,"RGB_ETC1_Format",function(){return Kc}),v.d(b,"RGB_ETC2_Format",function(){return yo}),v.d(b,"RGB_PVRTC_2BPPV1_Format",function(){return Jc}),v.d(b,"RGB_PVRTC_4BPPV1_Format",function(){return rr}),v.d(b,"RGB_S3TC_DXT1_Format",function(){return $u}),v.d(b,"RGFormat",function(){return Yu}),v.d(b,"RGIntegerFormat",function(){return Mr}),v.d(b,"RawShaderMaterial",function(){return ac}),v.d(b,"Ray",function(){return Xo}),v.d(b,"Raycaster",function(){return nA}),v.d(b,"RectAreaLight",function(){return u0}),v.d(b,"RedFormat",function(){return Ga}),v.d(b,"RedIntegerFormat",function(){return qc}),v.d(b,"ReinhardToneMapping",function(){return st}),v.d(b,"RepeatWrapping",function(){return Ge}),v.d(b,"ReplaceStencilOp",function(){return iv}),v.d(b,"ReverseSubtractEquation",function(){return Rt}),v.d(b,"RingBufferGeometry",function(){return ic}),v.d(b,"RingGeometry",function(){return ic}),v.d(b,"SRGB8_ALPHA8_ASTC_10x10_Format",function(){return ff}),v.d(b,"SRGB8_ALPHA8_ASTC_10x5_Format",function(){return od}),v.d(b,"SRGB8_ALPHA8_ASTC_10x6_Format",function(){return df}),v.d(b,"SRGB8_ALPHA8_ASTC_10x8_Format",function(){return pf}),v.d(b,"SRGB8_ALPHA8_ASTC_12x10_Format",function(){return mf}),v.d(b,"SRGB8_ALPHA8_ASTC_12x12_Format",function(){return Ks}),v.d(b,"SRGB8_ALPHA8_ASTC_4x4_Format",function(){return id}),v.d(b,"SRGB8_ALPHA8_ASTC_5x4_Format",function(){return rh}),v.d(b,"SRGB8_ALPHA8_ASTC_5x5_Format",function(){return oh}),v.d(b,"SRGB8_ALPHA8_ASTC_6x5_Format",function(){return nd}),v.d(b,"SRGB8_ALPHA8_ASTC_6x6_Format",function(){return pr}),v.d(b,"SRGB8_ALPHA8_ASTC_8x5_Format",function(){return sh}),v.d(b,"SRGB8_ALPHA8_ASTC_8x6_Format",function(){return za}),v.d(b,"SRGB8_ALPHA8_ASTC_8x8_Format",function(){return rd}),v.d(b,"Scene",function(){return al}),v.d(b,"SceneUtils",function(){return e2}),v.d(b,"ShaderChunk",function(){return $e}),v.d(b,"ShaderLib",function(){return Ir}),v.d(b,"ShaderMaterial",function(){return sr}),v.d(b,"ShadowMaterial",function(){return Yv}),v.d(b,"Shape",function(){return gl}),v.d(b,"ShapeBufferGeometry",function(){return mu}),v.d(b,"ShapeGeometry",function(){return mu}),v.d(b,"ShapePath",function(){return Px}),v.d(b,"ShapeUtils",function(){return Ps}),v.d(b,"ShortType",function(){return ef}),v.d(b,"Skeleton",function(){return Yh}),v.d(b,"SkeletonHelper",function(){return Kx}),v.d(b,"SkinnedMesh",function(){return hl}),v.d(b,"SmoothShading",function(){return ge}),v.d(b,"Sphere",function(){return Mn}),v.d(b,"SphereBufferGeometry",function(){return gu}),v.d(b,"SphereGeometry",function(){return gu}),v.d(b,"Spherical",function(){return rA}),v.d(b,"SphericalHarmonics3",function(){return h0}),v.d(b,"SplineCurve",function(){return fm}),v.d(b,"SpotLight",function(){return s0}),v.d(b,"SpotLightHelper",function(){return sA}),v.d(b,"Sprite",function(){return cu}),v.d(b,"SpriteMaterial",function(){return au}),v.d(b,"SrcAlphaFactor",function(){return ei}),v.d(b,"SrcAlphaSaturateFactor",function(){return Pi}),v.d(b,"SrcColorFactor",function(){return ui}),v.d(b,"StaticCopyUsage",function(){return lv}),v.d(b,"StaticDrawUsage",function(){return ta}),v.d(b,"StaticReadUsage",function(){return ph}),v.d(b,"StereoCamera",function(){return jM}),v.d(b,"StreamCopyUsage",function(){return mh}),v.d(b,"StreamDrawUsage",function(){return ea}),v.d(b,"StreamReadUsage",function(){return av}),v.d(b,"StringKeyframeTrack",function(){return _u}),v.d(b,"SubtractEquation",function(){return At}),v.d(b,"SubtractiveBlending",function(){return Pt}),v.d(b,"TOUCH",function(){return Z}),v.d(b,"TangentSpaceNormalMap",function(){return Ur}),v.d(b,"TetrahedronBufferGeometry",function(){return nc}),v.d(b,"TetrahedronGeometry",function(){return nc}),v.d(b,"TextBufferGeometry",function(){return _m}),v.d(b,"TextGeometry",function(){return _m}),v.d(b,"Texture",function(){return pn}),v.d(b,"TextureLoader",function(){return n0}),v.d(b,"TorusBufferGeometry",function(){return rc}),v.d(b,"TorusGeometry",function(){return rc}),v.d(b,"TorusKnotBufferGeometry",function(){return oc}),v.d(b,"TorusKnotGeometry",function(){return oc}),v.d(b,"Triangle",function(){return Vi}),v.d(b,"TriangleFanDrawMode",function(){return Se}),v.d(b,"TriangleStripDrawMode",function(){return ie}),v.d(b,"TrianglesDrawMode",function(){return Qt}),v.d(b,"TubeBufferGeometry",function(){return sc}),v.d(b,"TubeGeometry",function(){return sc}),v.d(b,"UVMapping",function(){return wt}),v.d(b,"Uint16Attribute",function(){return HA}),v.d(b,"Uint16BufferAttribute",function(){return Za}),v.d(b,"Uint32Attribute",function(){return jA}),v.d(b,"Uint32BufferAttribute",function(){return so}),v.d(b,"Uint8Attribute",function(){return kA}),v.d(b,"Uint8BufferAttribute",function(){return bd}),v.d(b,"Uint8ClampedAttribute",function(){return UA}),v.d(b,"Uint8ClampedBufferAttribute",function(){return Rh}),v.d(b,"Uniform",function(){return Mm}),v.d(b,"UniformsLib",function(){return Te}),v.d(b,"UniformsUtils",function(){return Ro}),v.d(b,"UnsignedByteType",function(){return ds}),v.d(b,"UnsignedInt248Type",function(){return Ii}),v.d(b,"UnsignedIntType",function(){return Ys}),v.d(b,"UnsignedShort4444Type",function(){return rf}),v.d(b,"UnsignedShort5551Type",function(){return of}),v.d(b,"UnsignedShort565Type",function(){return sf}),v.d(b,"UnsignedShortType",function(){return Dl}),v.d(b,"VSMShadowMap",function(){return C}),v.d(b,"Vector2",function(){return ce}),v.d(b,"Vector3",function(){return S}),v.d(b,"Vector4",function(){return Oi}),v.d(b,"VectorKeyframeTrack",function(){return ep}),v.d(b,"Vertex",function(){return DA}),v.d(b,"VertexColors",function(){return MA}),v.d(b,"VideoTexture",function(){return Oe}),v.d(b,"WebGL1Renderer",function(){return Cn}),v.d(b,"WebGLCubeRenderTarget",function(){return je}),v.d(b,"WebGLMultipleRenderTargets",function(){return Wl}),v.d(b,"WebGLMultisampleRenderTarget",function(){return na}),v.d(b,"WebGLRenderTarget",function(){return eo}),v.d(b,"WebGLRenderTargetCube",function(){return KA}),v.d(b,"WebGLRenderer",function(){return Ni}),v.d(b,"WebGLUtils",function(){return nm}),v.d(b,"WireframeGeometry",function(){return qv}),v.d(b,"WireframeHelper",function(){return $A}),v.d(b,"WrapAroundEnding",function(){return kl}),v.d(b,"XHRLoader",function(){return JA}),v.d(b,"ZeroCurvatureEnding",function(){return jn}),v.d(b,"ZeroFactor",function(){return ye}),v.d(b,"ZeroSlopeEnding",function(){return fs}),v.d(b,"ZeroStencilOp",function(){return lh}),v.d(b,"sRGBEncoding",function(){return gi});var q={};v.r(q),v.d(q,"isMobile",function(){return ns}),v.d(q,"EventEmitter",function(){return pc.a}),v.d(q,"earcut",function(){return N0.a}),v.d(q,"BaseTextureCache",function(){return Lo}),v.d(q,"CanvasRenderTarget",function(){return X0}),v.d(q,"DATA_URI",function(){return Jb}),v.d(q,"ProgramCache",function(){return W0}),v.d(q,"TextureCache",function(){return Yr}),v.d(q,"clearTextureCache",function(){return NR}),v.d(q,"correctBlendMode",function(){return H0}),v.d(q,"createIndicesForQuads",function(){return qb}),v.d(q,"decomposeDataUri",function(){return DR}),v.d(q,"deprecation",function(){return fc}),v.d(q,"destroyTextureCache",function(){return OR}),v.d(q,"determineCrossOrigin",function(){return Zb}),v.d(q,"getBufferType",function(){return Gm}),v.d(q,"getResolutionOfUrl",function(){return cp}),v.d(q,"hex2rgb",function(){return Cu}),v.d(q,"hex2string",function(){return k0}),v.d(q,"interleaveTypedArrays",function(){return IR}),v.d(q,"isPow2",function(){return j0}),v.d(q,"isWebGLSupported",function(){return Wb}),v.d(q,"log2",function(){return V0}),v.d(q,"nextPow2",function(){return hp}),v.d(q,"premultiplyBlendMode",function(){return G0}),v.d(q,"premultiplyRgba",function(){return Xb}),v.d(q,"premultiplyTint",function(){return Um}),v.d(q,"premultiplyTintToRgba",function(){return z0}),v.d(q,"removeItems",function(){return Pu}),v.d(q,"rgb2hex",function(){return CR}),v.d(q,"sayHello",function(){return Vb}),v.d(q,"sign",function(){return Iu}),v.d(q,"skipHello",function(){return AR}),v.d(q,"string2hex",function(){return U0}),v.d(q,"trimCanvas",function(){return $b}),v.d(q,"uid",function(){return xl}),v.d(q,"url",function(){return Ru});var ht=v(4),W=v(1),P=v.n(W),V=v(0);/**
|
|
1827
|
+
`},function(T,M,v){var b;(function(q,ht){var V="model",P="name",W="type",z="vendor",k="version",Z="mobile",vt="tablet",Ot="smarttv",Nt=function(Ct){for(var ot={},yt=0;yt<Ct.length;yt++)ot[Ct[yt].toUpperCase()]=Ct[yt];return ot},E=function(Ct,ot){return typeof Ct=="string"&&L(ot).indexOf(L(Ct))!==-1},L=function(Ct){return Ct.toLowerCase()},O=function(Ct,ot){if(typeof Ct=="string")return Ct=Ct.replace(/^\s\s*/,"").replace(/\s\s*$/,""),ot===void 0?Ct:Ct.substring(0,255)},Y=function(Ct,ot){for(var yt,Pt,H,ft,Et,At,Rt=0;Rt<ot.length&&!Et;){var Wt=ot[Rt],$t=ot[Rt+1];for(yt=Pt=0;yt<Wt.length&&!Et;)if(Et=Wt[yt++].exec(Ct))for(H=0;H<$t.length;H++)At=Et[++Pt],typeof(ft=$t[H])=="object"&&ft.length>0?ft.length===2?typeof ft[1]=="function"?this[ft[0]]=ft[1].call(this,At):this[ft[0]]=ft[1]:ft.length===3?typeof ft[1]!="function"||ft[1].exec&&ft[1].test?this[ft[0]]=At?At.replace(ft[1],ft[2]):void 0:this[ft[0]]=At?ft[1].call(this,At,ft[2]):void 0:ft.length===4&&(this[ft[0]]=At?ft[3].call(this,At.replace(ft[1],ft[2])):void 0):this[ft]=At||void 0;Rt+=2}},C=function(Ct,ot){for(var yt in ot)if(typeof ot[yt]=="object"&&ot[yt].length>0){for(var Pt=0;Pt<ot[yt].length;Pt++)if(E(ot[yt][Pt],Ct))return yt==="?"?void 0:yt}else if(E(ot[yt],Ct))return yt==="?"?void 0:yt;return Ct},j={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[k,[P,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[k,[P,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[P,k],[/opios[\/ ]+([\w\.]+)/i],[k,[P,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[k,[P,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[P,k],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[k,[P,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[k,[P,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[k,[P,"WeChat"]],[/konqueror\/([\w\.]+)/i],[k,[P,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[k,[P,"IE"]],[/yabrowser\/([\w\.]+)/i],[k,[P,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[P,/(.+)/,"$1 Secure Browser"],k],[/\bfocus\/([\w\.]+)/i],[k,[P,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[k,[P,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[k,[P,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[k,[P,"Dolphin"]],[/coast\/([\w\.]+)/i],[k,[P,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[k,[P,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[k,[P,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[P,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[P,/(.+)/,"$1 Browser"],k],[/(comodo_dragon)\/([\w\.]+)/i],[[P,/_/g," "],k],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[P,k],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[P],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[P,"Facebook"],k],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[P,k],[/\bgsa\/([\w\.]+) .*safari\//i],[k,[P,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[k,[P,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[P,"Chrome WebView"],k],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[k,[P,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[P,k],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[k,[P,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[k,P],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[P,[k,C,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[P,k],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[P,"Netscape"],k],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[k,[P,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[P,k]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",L]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",L]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",L]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[V,[z,"Samsung"],[W,vt]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[V,[z,"Samsung"],[W,Z]],[/\((ip(?:hone|od)[\w ]*);/i],[V,[z,"Apple"],[W,Z]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[V,[z,"Apple"],[W,vt]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[V,[z,"Huawei"],[W,vt]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[V,[z,"Huawei"],[W,Z]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[V,/_/g," "],[z,"Xiaomi"],[W,Z]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[V,/_/g," "],[z,"Xiaomi"],[W,vt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[V,[z,"OPPO"],[W,Z]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[V,[z,"Vivo"],[W,Z]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[V,[z,"Realme"],[W,Z]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[V,[z,"Motorola"],[W,Z]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[V,[z,"Motorola"],[W,vt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[V,[z,"LG"],[W,vt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[V,[z,"LG"],[W,Z]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[V,[z,"Lenovo"],[W,vt]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[V,/_/g," "],[z,"Nokia"],[W,Z]],[/(pixel c)\b/i],[V,[z,"Google"],[W,vt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[V,[z,"Google"],[W,Z]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[V,[z,"Sony"],[W,Z]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[V,"Xperia Tablet"],[z,"Sony"],[W,vt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[V,[z,"OnePlus"],[W,Z]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[V,[z,"Amazon"],[W,vt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[V,/(.+)/g,"Fire Phone $1"],[z,"Amazon"],[W,Z]],[/(playbook);[-\w\),; ]+(rim)/i],[V,z,[W,vt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[V,[z,"BlackBerry"],[W,Z]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[V,[z,"ASUS"],[W,vt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[V,[z,"ASUS"],[W,Z]],[/(nexus 9)/i],[V,[z,"HTC"],[W,vt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[z,[V,/_/g," "],[W,Z]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[V,[z,"Acer"],[W,vt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[V,[z,"Meizu"],[W,Z]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[V,[z,"Sharp"],[W,Z]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[z,V,[W,Z]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[z,V,[W,vt]],[/(surface duo)/i],[V,[z,"Microsoft"],[W,vt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[V,[z,"Fairphone"],[W,Z]],[/(u304aa)/i],[V,[z,"AT&T"],[W,Z]],[/\bsie-(\w*)/i],[V,[z,"Siemens"],[W,Z]],[/\b(rct\w+) b/i],[V,[z,"RCA"],[W,vt]],[/\b(venue[\d ]{2,7}) b/i],[V,[z,"Dell"],[W,vt]],[/\b(q(?:mv|ta)\w+) b/i],[V,[z,"Verizon"],[W,vt]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[V,[z,"Barnes & Noble"],[W,vt]],[/\b(tm\d{3}\w+) b/i],[V,[z,"NuVision"],[W,vt]],[/\b(k88) b/i],[V,[z,"ZTE"],[W,vt]],[/\b(nx\d{3}j) b/i],[V,[z,"ZTE"],[W,Z]],[/\b(gen\d{3}) b.+49h/i],[V,[z,"Swiss"],[W,Z]],[/\b(zur\d{3}) b/i],[V,[z,"Swiss"],[W,vt]],[/\b((zeki)?tb.*\b) b/i],[V,[z,"Zeki"],[W,vt]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[z,"Dragon Touch"],V,[W,vt]],[/\b(ns-?\w{0,9}) b/i],[V,[z,"Insignia"],[W,vt]],[/\b((nxa|next)-?\w{0,9}) b/i],[V,[z,"NextBook"],[W,vt]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[z,"Voice"],V,[W,Z]],[/\b(lvtel\-)?(v1[12]) b/i],[[z,"LvTel"],V,[W,Z]],[/\b(ph-1) /i],[V,[z,"Essential"],[W,Z]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[V,[z,"Envizen"],[W,vt]],[/\b(trio[-\w\. ]+) b/i],[V,[z,"MachSpeed"],[W,vt]],[/\btu_(1491) b/i],[V,[z,"Rotor"],[W,vt]],[/(shield[\w ]+) b/i],[V,[z,"Nvidia"],[W,vt]],[/(sprint) (\w+)/i],[z,V,[W,Z]],[/(kin\.[onetw]{3})/i],[[V,/\./g," "],[z,"Microsoft"],[W,Z]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[V,[z,"Zebra"],[W,vt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[V,[z,"Zebra"],[W,Z]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[z,V,[W,"console"]],[/droid.+; (shield) bui/i],[V,[z,"Nvidia"],[W,"console"]],[/(playstation [345portablevi]+)/i],[V,[z,"Sony"],[W,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[V,[z,"Microsoft"],[W,"console"]],[/smart-tv.+(samsung)/i],[z,[W,Ot]],[/hbbtv.+maple;(\d+)/i],[[V,/^/,"SmartTV"],[z,"Samsung"],[W,Ot]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[z,"LG"],[W,Ot]],[/(apple) ?tv/i],[z,[V,"Apple TV"],[W,Ot]],[/crkey/i],[[V,"Chromecast"],[z,"Google"],[W,Ot]],[/droid.+aft(\w)( bui|\))/i],[V,[z,"Amazon"],[W,Ot]],[/\(dtv[\);].+(aquos)/i],[V,[z,"Sharp"],[W,Ot]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[z,O],[V,O],[W,Ot]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[W,Ot]],[/((pebble))app/i],[z,V,[W,"wearable"]],[/droid.+; (glass) \d/i],[V,[z,"Google"],[W,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[V,[z,"Zebra"],[W,"wearable"]],[/(quest( 2)?)/i],[V,[z,"Facebook"],[W,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[z,[W,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[V,[W,Z]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[V,[W,vt]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[W,vt]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[W,Z]],[/(android[-\w\. ]{0,9});.+buil/i],[V,[z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[k,[P,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[k,[P,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[P,k],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[k,P]],os:[[/microsoft (windows) (vista|xp)/i],[P,k],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[P,[k,C,j]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[P,"Windows"],[k,C,j]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[k,/_/g,"."],[P,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[P,"Mac OS"],[k,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[k,P],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[P,k],[/\(bb(10);/i],[k,[P,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[k,[P,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[k,[P,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[k,[P,"webOS"]],[/crkey\/([\d\.]+)/i],[k,[P,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[P,"Chromium OS"],k],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[P,k],[/(sunos) ?([\w\.\d]*)/i],[[P,"Solaris"],k],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[P,k]]},K=function(Ct,ot){if(typeof Ct=="object"&&(ot=Ct,Ct=void 0),!(this instanceof K))return new K(Ct,ot).getResult();var yt=Ct||(q!==void 0&&q.navigator&&q.navigator.userAgent?q.navigator.userAgent:""),Pt=ot?function(H,ft){var Et={};for(var At in H)ft[At]&&ft[At].length%2==0?Et[At]=ft[At].concat(H[At]):Et[At]=H[At];return Et}(X,ot):X;return this.getBrowser=function(){var H,ft={};return ft[P]=void 0,ft[k]=void 0,Y.call(ft,yt,Pt.browser),ft.major=typeof(H=ft.version)=="string"?H.replace(/[^\d\.]/g,"").split(".")[0]:void 0,ft},this.getCPU=function(){var H={architecture:void 0};return Y.call(H,yt,Pt.cpu),H},this.getDevice=function(){var H={vendor:void 0,model:void 0,type:void 0};return Y.call(H,yt,Pt.device),H},this.getEngine=function(){var H={name:void 0,version:void 0};return Y.call(H,yt,Pt.engine),H},this.getOS=function(){var H={name:void 0,version:void 0};return Y.call(H,yt,Pt.os),H},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return yt},this.setUA=function(H){return yt=typeof H=="string"&&H.length>255?O(H,255):H,this},this.setUA(yt),this};K.VERSION="1.0.2",K.BROWSER=Nt([P,k,"major"]),K.CPU=Nt(["architecture"]),K.DEVICE=Nt([V,z,W,"console",Z,Ot,vt,"wearable","embedded"]),K.ENGINE=K.OS=Nt([P,k]),M!==void 0?(T!==void 0&&T.exports&&(M=T.exports=K),M.UAParser=K):v(63)?(b=function(){return K}.call(M,v,M,T))===void 0||(T.exports=b):q!==void 0&&(q.UAParser=K);var qt=q!==void 0&&(q.jQuery||q.Zepto);if(qt&&!qt.ua){var ge=new K;qt.ua=ge.getResult(),qt.ua.get=function(){return ge.getUA()},qt.ua.set=function(Ct){ge.setUA(Ct);var ot=ge.getResult();for(var yt in ot)qt.ua[yt]=ot[yt]}}})(typeof window=="object"?window:this)},function(T,M,v){(function(b){var q=b!==void 0&&b||typeof self!="undefined"&&self||window,ht=Function.prototype.apply;function V(P,W){this._id=P,this._clearFn=W}M.setTimeout=function(){return new V(ht.call(setTimeout,q,arguments),clearTimeout)},M.setInterval=function(){return new V(ht.call(setInterval,q,arguments),clearInterval)},M.clearTimeout=M.clearInterval=function(P){P&&P.close()},V.prototype.unref=V.prototype.ref=function(){},V.prototype.close=function(){this._clearFn.call(q,this._id)},M.enroll=function(P,W){clearTimeout(P._idleTimeoutId),P._idleTimeout=W},M.unenroll=function(P){clearTimeout(P._idleTimeoutId),P._idleTimeout=-1},M._unrefActive=M.active=function(P){clearTimeout(P._idleTimeoutId);var W=P._idleTimeout;W>=0&&(P._idleTimeoutId=setTimeout(function(){P._onTimeout&&P._onTimeout()},W))},v(55),M.setImmediate=typeof self!="undefined"&&self.setImmediate||b!==void 0&&b.setImmediate||this&&this.setImmediate,M.clearImmediate=typeof self!="undefined"&&self.clearImmediate||b!==void 0&&b.clearImmediate||this&&this.clearImmediate}).call(this,v(3))},function(T,M,v){(function(b,q){(function(ht,V){if(!ht.setImmediate){var P,W,z,k,Z,vt=1,Ot={},Nt=!1,E=ht.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(ht);L=L&&L.setTimeout?L:ht,{}.toString.call(ht.process)==="[object process]"?P=function(C){q.nextTick(function(){Y(C)})}:function(){if(ht.postMessage&&!ht.importScripts){var C=!0,j=ht.onmessage;return ht.onmessage=function(){C=!1},ht.postMessage("","*"),ht.onmessage=j,C}}()?(k="setImmediate$"+Math.random()+"$",Z=function(C){C.source===ht&&typeof C.data=="string"&&C.data.indexOf(k)===0&&Y(+C.data.slice(k.length))},ht.addEventListener?ht.addEventListener("message",Z,!1):ht.attachEvent("onmessage",Z),P=function(C){ht.postMessage(k+C,"*")}):ht.MessageChannel?((z=new MessageChannel).port1.onmessage=function(C){Y(C.data)},P=function(C){z.port2.postMessage(C)}):E&&"onreadystatechange"in E.createElement("script")?(W=E.documentElement,P=function(C){var j=E.createElement("script");j.onreadystatechange=function(){Y(C),j.onreadystatechange=null,W.removeChild(j),j=null},W.appendChild(j)}):P=function(C){setTimeout(Y,0,C)},L.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var j=new Array(arguments.length-1),X=0;X<j.length;X++)j[X]=arguments[X+1];var K={callback:C,args:j};return Ot[vt]=K,P(vt),vt++},L.clearImmediate=O}function O(C){delete Ot[C]}function Y(C){if(Nt)setTimeout(Y,0,C);else{var j=Ot[C];if(j){Nt=!0;try{(function(X){var K=X.callback,qt=X.args;switch(qt.length){case 0:K();break;case 1:K(qt[0]);break;case 2:K(qt[0],qt[1]);break;case 3:K(qt[0],qt[1],qt[2]);break;default:K.apply(void 0,qt)}})(j)}finally{O(C),Nt=!1}}}}})(typeof self=="undefined"?b===void 0?this:b:self)}).call(this,v(3),v(56))},function(T,M){var v,b,q=T.exports={};function ht(){throw new Error("setTimeout has not been defined")}function V(){throw new Error("clearTimeout has not been defined")}function P(L){if(v===setTimeout)return setTimeout(L,0);if((v===ht||!v)&&setTimeout)return v=setTimeout,setTimeout(L,0);try{return v(L,0)}catch{try{return v.call(null,L,0)}catch{return v.call(this,L,0)}}}(function(){try{v=typeof setTimeout=="function"?setTimeout:ht}catch{v=ht}try{b=typeof clearTimeout=="function"?clearTimeout:V}catch{b=V}})();var W,z=[],k=!1,Z=-1;function vt(){k&&W&&(k=!1,W.length?z=W.concat(z):Z=-1,z.length&&Ot())}function Ot(){if(!k){var L=P(vt);k=!0;for(var O=z.length;O;){for(W=z,z=[];++Z<O;)W&&W[Z].run();Z=-1,O=z.length}W=null,k=!1,function(Y){if(b===clearTimeout)return clearTimeout(Y);if((b===V||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(Y);try{b(Y)}catch{try{return b.call(null,Y)}catch{return b.call(this,Y)}}}(L)}}function Nt(L,O){this.fun=L,this.array=O}function E(){}q.nextTick=function(L){var O=new Array(arguments.length-1);if(arguments.length>1)for(var Y=1;Y<arguments.length;Y++)O[Y-1]=arguments[Y];z.push(new Nt(L,O)),z.length!==1||k||P(Ot)},Nt.prototype.run=function(){this.fun.apply(null,this.array)},q.title="browser",q.browser=!0,q.env={},q.argv=[],q.version="",q.versions={},q.on=E,q.addListener=E,q.once=E,q.off=E,q.removeListener=E,q.removeAllListeners=E,q.emit=E,q.prependListener=E,q.prependOnceListener=E,q.listeners=function(L){return[]},q.binding=function(L){throw new Error("process.binding is not supported")},q.cwd=function(){return"/"},q.chdir=function(L){throw new Error("process.chdir is not supported")},q.umask=function(){return 0}},function(T,M,v){(function(b,q){var ht;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(V){M&&M.nodeType,b&&b.nodeType;var P=typeof q=="object"&&q;P.global!==P&&P.window!==P&&P.self;var W,z=2147483647,k=/^xn--/,Z=/[^\x20-\x7E]/,vt=/[\x2E\u3002\uFF0E\uFF61]/g,Ot={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Nt=Math.floor,E=String.fromCharCode;function L(Ct){throw new RangeError(Ot[Ct])}function O(Ct,ot){for(var yt=Ct.length,Pt=[];yt--;)Pt[yt]=ot(Ct[yt]);return Pt}function Y(Ct,ot){var yt=Ct.split("@"),Pt="";return yt.length>1&&(Pt=yt[0]+"@",Ct=yt[1]),Pt+O((Ct=Ct.replace(vt,".")).split("."),ot).join(".")}function C(Ct){for(var ot,yt,Pt=[],H=0,ft=Ct.length;H<ft;)(ot=Ct.charCodeAt(H++))>=55296&&ot<=56319&&H<ft?(64512&(yt=Ct.charCodeAt(H++)))==56320?Pt.push(((1023&ot)<<10)+(1023&yt)+65536):(Pt.push(ot),H--):Pt.push(ot);return Pt}function j(Ct){return O(Ct,function(ot){var yt="";return ot>65535&&(yt+=E((ot-=65536)>>>10&1023|55296),ot=56320|1023&ot),yt+=E(ot)}).join("")}function X(Ct,ot){return Ct+22+75*(Ct<26)-((ot!=0)<<5)}function K(Ct,ot,yt){var Pt=0;for(Ct=yt?Nt(Ct/700):Ct>>1,Ct+=Nt(Ct/ot);Ct>455;Pt+=36)Ct=Nt(Ct/35);return Nt(Pt+36*Ct/(Ct+38))}function qt(Ct){var ot,yt,Pt,H,ft,Et,At,Rt,Wt,$t,ye,me=[],ui=Ct.length,be=0,ei=128,Ze=72;for((yt=Ct.lastIndexOf("-"))<0&&(yt=0),Pt=0;Pt<yt;++Pt)Ct.charCodeAt(Pt)>=128&&L("not-basic"),me.push(Ct.charCodeAt(Pt));for(H=yt>0?yt+1:0;H<ui;){for(ft=be,Et=1,At=36;H>=ui&&L("invalid-input"),((Rt=(ye=Ct.charCodeAt(H++))-48<10?ye-22:ye-65<26?ye-65:ye-97<26?ye-97:36)>=36||Rt>Nt((z-be)/Et))&&L("overflow"),be+=Rt*Et,!(Rt<(Wt=At<=Ze?1:At>=Ze+26?26:At-Ze));At+=36)Et>Nt(z/($t=36-Wt))&&L("overflow"),Et*=$t;Ze=K(be-ft,ot=me.length+1,ft==0),Nt(be/ot)>z-ei&&L("overflow"),ei+=Nt(be/ot),be%=ot,me.splice(be++,0,ei)}return j(me)}function ge(Ct){var ot,yt,Pt,H,ft,Et,At,Rt,Wt,$t,ye,me,ui,be,ei,Ze=[];for(me=(Ct=C(Ct)).length,ot=128,yt=0,ft=72,Et=0;Et<me;++Et)(ye=Ct[Et])<128&&Ze.push(E(ye));for(Pt=H=Ze.length,H&&Ze.push("-");Pt<me;){for(At=z,Et=0;Et<me;++Et)(ye=Ct[Et])>=ot&&ye<At&&(At=ye);for(At-ot>Nt((z-yt)/(ui=Pt+1))&&L("overflow"),yt+=(At-ot)*ui,ot=At,Et=0;Et<me;++Et)if((ye=Ct[Et])<ot&&++yt>z&&L("overflow"),ye==ot){for(Rt=yt,Wt=36;!(Rt<($t=Wt<=ft?1:Wt>=ft+26?26:Wt-ft));Wt+=36)ei=Rt-$t,be=36-$t,Ze.push(E(X($t+ei%be,0))),Rt=Nt(ei/be);Ze.push(E(X(Rt,0))),ft=K(yt,ui,Pt==H),yt=0,++Pt}++yt,++ot}return Ze.join("")}W={version:"1.4.1",ucs2:{decode:C,encode:j},decode:qt,encode:ge,toASCII:function(Ct){return Y(Ct,function(ot){return Z.test(ot)?"xn--"+ge(ot):ot})},toUnicode:function(Ct){return Y(Ct,function(ot){return k.test(ot)?qt(ot.slice(4).toLowerCase()):ot})}},(ht=function(){return W}.call(M,v,M,b))===void 0||(b.exports=ht)})()}).call(this,v(7)(T),v(3))},function(T,M,v){T.exports={isString:function(b){return typeof b=="string"},isObject:function(b){return typeof b=="object"&&b!==null},isNull:function(b){return b===null},isNullOrUndefined:function(b){return b==null}}},function(T,M,v){M.decode=M.parse=v(60),M.encode=M.stringify=v(61)},function(T,M,v){function b(ht,V){return Object.prototype.hasOwnProperty.call(ht,V)}T.exports=function(ht,V,P,W){V=V||"&",P=P||"=";var z={};if(typeof ht!="string"||ht.length===0)return z;var k=/\+/g;ht=ht.split(V);var Z=1e3;W&&typeof W.maxKeys=="number"&&(Z=W.maxKeys);var vt=ht.length;Z>0&&vt>Z&&(vt=Z);for(var Ot=0;Ot<vt;++Ot){var Nt,E,L,O,Y=ht[Ot].replace(k,"%20"),C=Y.indexOf(P);C>=0?(Nt=Y.substr(0,C),E=Y.substr(C+1)):(Nt=Y,E=""),L=decodeURIComponent(Nt),O=decodeURIComponent(E),b(z,L)?q(z[L])?z[L].push(O):z[L]=[z[L],O]:z[L]=O}return z};var q=Array.isArray||function(ht){return Object.prototype.toString.call(ht)==="[object Array]"}},function(T,M,v){var b=function(P){switch(typeof P){case"string":return P;case"boolean":return P?"true":"false";case"number":return isFinite(P)?P:"";default:return""}};T.exports=function(P,W,z,k){return W=W||"&",z=z||"=",P===null&&(P=void 0),typeof P=="object"?ht(V(P),function(Z){var vt=encodeURIComponent(b(Z))+z;return q(P[Z])?ht(P[Z],function(Ot){return vt+encodeURIComponent(b(Ot))}).join(W):vt+encodeURIComponent(b(P[Z]))}).join(W):k?encodeURIComponent(b(k))+z+encodeURIComponent(b(P)):""};var q=Array.isArray||function(P){return Object.prototype.toString.call(P)==="[object Array]"};function ht(P,W){if(P.map)return P.map(W);for(var z=[],k=0;k<P.length;k++)z.push(W(P[k],k));return z}var V=Object.keys||function(P){var W=[];for(var z in P)Object.prototype.hasOwnProperty.call(P,z)&&W.push(z);return W}},function(T,M){var v=function(){};v.prototype={fit:function(b){var q,ht,V,P,W=b.length,z=W>0?b[0].width:0,k=W>0?b[0].height:0;for(this.root={x:0,y:0,width:z,height:k},q=0;q<W;q++)V=b[q],(ht=this.findNode(this.root,V.width,V.height))?(P=this.splitNode(ht,V.width,V.height),V.x=P.x,V.y=P.y):(P=this.growNode(V.width,V.height),V.x=P.x,V.y=P.y)},findNode:function(b,q,ht){return b.used?this.findNode(b.right,q,ht)||this.findNode(b.down,q,ht):q<=b.width&&ht<=b.height?b:null},splitNode:function(b,q,ht){return b.used=!0,b.down={x:b.x,y:b.y+ht,width:b.width,height:b.height-ht},b.right={x:b.x+q,y:b.y,width:b.width-q,height:ht},b},growNode:function(b,q){var ht=b<=this.root.width,V=q<=this.root.height,P=V&&this.root.height>=this.root.width+b,W=ht&&this.root.width>=this.root.height+q;return P?this.growRight(b,q):W?this.growDown(b,q):V?this.growRight(b,q):ht?this.growDown(b,q):null},growRight:function(b,q){var ht;return this.root={used:!0,x:0,y:0,width:this.root.width+b,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:b,height:this.root.height}},(ht=this.findNode(this.root,b,q))?this.splitNode(ht,b,q):null},growDown:function(b,q){var ht;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+q,down:{x:0,y:this.root.height,width:this.root.width,height:q},right:this.root},(ht=this.findNode(this.root,b,q))?this.splitNode(ht,b,q):null}},T.exports=v},function(T,M){(function(v){T.exports=v}).call(this,{})},function(T,M,v){v.r(M),v.d(M,"ErrorType",function(){return cr}),v.d(M,"preloadResource",function(){return AO}),v.d(M,"delay",function(){return ry}),v.d(M,"waitUntil",function(){return IO}),v.d(M,"SLIDE_EVENTS",function(){return Jr}),v.d(M,"Slide",function(){return Fg});var b={};v.r(b),v.d(b,"ACESFilmicToneMapping",function(){return Tt}),v.d(b,"AddEquation",function(){return Et}),v.d(b,"AddOperation",function(){return Ua}),v.d(b,"AdditiveAnimationBlendMode",function(){return It}),v.d(b,"AdditiveBlending",function(){return yt}),v.d(b,"AlphaFormat",function(){return Bi}),v.d(b,"AlwaysDepth",function(){return Li}),v.d(b,"AlwaysStencilFunc",function(){return zl}),v.d(b,"AmbientLight",function(){return Sm}),v.d(b,"AmbientLightProbe",function(){return Ox}),v.d(b,"AnimationClip",function(){return ip}),v.d(b,"AnimationLoader",function(){return BM}),v.d(b,"AnimationMixer",function(){return jx}),v.d(b,"AnimationObjectGroup",function(){return zx}),v.d(b,"AnimationUtils",function(){return an}),v.d(b,"ArcCurve",function(){return uo}),v.d(b,"ArrayCamera",function(){return Vd}),v.d(b,"ArrowHelper",function(){return mA}),v.d(b,"Audio",function(){return m0}),v.d(b,"AudioAnalyser",function(){return Gx}),v.d(b,"AudioContext",function(){return f0}),v.d(b,"AudioListener",function(){return WM}),v.d(b,"AudioLoader",function(){return Ix}),v.d(b,"AxesHelper",function(){return sb}),v.d(b,"AxisHelper",function(){return XA}),v.d(b,"BackSide",function(){return X}),v.d(b,"BasicDepthPacking",function(){return Gl}),v.d(b,"BasicShadowMap",function(){return L}),v.d(b,"BinaryTextureLoader",function(){return ZA}),v.d(b,"Bone",function(){return qh}),v.d(b,"BooleanKeyframeTrack",function(){return vu}),v.d(b,"BoundingBoxHelper",function(){return qA}),v.d(b,"Box2",function(){return hc}),v.d(b,"Box3",function(){return $i}),v.d(b,"Box3Helper",function(){return pA}),v.d(b,"BoxBufferGeometry",function(){return Ao}),v.d(b,"BoxGeometry",function(){return Ao}),v.d(b,"BoxHelper",function(){return rb}),v.d(b,"BufferAttribute",function(){return mi}),v.d(b,"BufferGeometry",function(){return ze}),v.d(b,"BufferGeometryLoader",function(){return Mx}),v.d(b,"ByteType",function(){return tf}),v.d(b,"Cache",function(){return yu}),v.d(b,"Camera",function(){return da}),v.d(b,"CameraHelper",function(){return dA}),v.d(b,"CanvasRenderer",function(){return QA}),v.d(b,"CanvasTexture",function(){return Ve}),v.d(b,"CatmullRomCurve3",function(){return Kh}),v.d(b,"CineonToneMapping",function(){return at}),v.d(b,"CircleBufferGeometry",function(){return pe}),v.d(b,"CircleGeometry",function(){return pe}),v.d(b,"ClampToEdgeWrapping",function(){return qe}),v.d(b,"Clock",function(){return Fx}),v.d(b,"Color",function(){return Le}),v.d(b,"ColorKeyframeTrack",function(){return e0}),v.d(b,"CompressedTexture",function(){return Fe}),v.d(b,"CompressedTextureLoader",function(){return kM}),v.d(b,"ConeBufferGeometry",function(){return Ce}),v.d(b,"ConeGeometry",function(){return Ce}),v.d(b,"CubeCamera",function(){return pa}),v.d(b,"CubeReflectionMapping",function(){return zt}),v.d(b,"CubeRefractionMapping",function(){return ne}),v.d(b,"CubeTexture",function(){return ao}),v.d(b,"CubeTextureLoader",function(){return mx}),v.d(b,"CubeUVReflectionMapping",function(){return xe}),v.d(b,"CubeUVRefractionMapping",function(){return Ie}),v.d(b,"CubicBezierCurve",function(){return Sa}),v.d(b,"CubicBezierCurve3",function(){return pl}),v.d(b,"CubicInterpolant",function(){return cx}),v.d(b,"CullFaceBack",function(){return Ot}),v.d(b,"CullFaceFront",function(){return Nt}),v.d(b,"CullFaceFrontBack",function(){return E}),v.d(b,"CullFaceNone",function(){return vt}),v.d(b,"Curve",function(){return dn}),v.d(b,"CurvePath",function(){return vx}),v.d(b,"CustomBlending",function(){return ft}),v.d(b,"CustomToneMapping",function(){return bt}),v.d(b,"CylinderBufferGeometry",function(){return He}),v.d(b,"CylinderGeometry",function(){return He}),v.d(b,"Cylindrical",function(){return oA}),v.d(b,"DataTexture",function(){return Ms}),v.d(b,"DataTexture2DArray",function(){return Oh}),v.d(b,"DataTexture3D",function(){return Xr}),v.d(b,"DataTextureLoader",function(){return gx}),v.d(b,"DataUtils",function(){return vA}),v.d(b,"DecrementStencilOp",function(){return uh}),v.d(b,"DecrementWrapStencilOp",function(){return rv}),v.d(b,"DefaultLoadingManager",function(){return fx}),v.d(b,"DepthFormat",function(){return en}),v.d(b,"DepthStencilFormat",function(){return Js}),v.d(b,"DepthTexture",function(){return re}),v.d(b,"DirectionalLight",function(){return wm}),v.d(b,"DirectionalLightHelper",function(){return cA}),v.d(b,"DiscreteInterpolant",function(){return dx}),v.d(b,"DodecahedronBufferGeometry",function(){return Ye}),v.d(b,"DodecahedronGeometry",function(){return Ye}),v.d(b,"DoubleSide",function(){return K}),v.d(b,"DstAlphaFactor",function(){return ri}),v.d(b,"DstColorFactor",function(){return ki}),v.d(b,"DynamicBufferAttribute",function(){return FA}),v.d(b,"DynamicCopyUsage",function(){return fh}),v.d(b,"DynamicDrawUsage",function(){return xo}),v.d(b,"DynamicReadUsage",function(){return sv}),v.d(b,"EdgesGeometry",function(){return qn}),v.d(b,"EdgesHelper",function(){return YA}),v.d(b,"EllipseCurve",function(){return sn}),v.d(b,"EqualDepth",function(){return tn}),v.d(b,"EqualStencilFunc",function(){return ch}),v.d(b,"EquirectangularReflectionMapping",function(){return se}),v.d(b,"EquirectangularRefractionMapping",function(){return ae}),v.d(b,"Euler",function(){return oa}),v.d(b,"EventDispatcher",function(){return Ho}),v.d(b,"ExtrudeBufferGeometry",function(){return Ko}),v.d(b,"ExtrudeGeometry",function(){return Ko}),v.d(b,"FaceColors",function(){return EA}),v.d(b,"FileLoader",function(){return es}),v.d(b,"FlatShading",function(){return qt}),v.d(b,"Float16BufferAttribute",function(){return Mf}),v.d(b,"Float32Attribute",function(){return VA}),v.d(b,"Float32BufferAttribute",function(){return _e}),v.d(b,"Float64Attribute",function(){return WA}),v.d(b,"Float64BufferAttribute",function(){return Sd}),v.d(b,"FloatType",function(){return Fo}),v.d(b,"Fog",function(){return su}),v.d(b,"FogExp2",function(){return Bn}),v.d(b,"Font",function(){return p0}),v.d(b,"FontLoader",function(){return zM}),v.d(b,"FrontSide",function(){return j}),v.d(b,"Frustum",function(){return rl}),v.d(b,"GLBufferAttribute",function(){return Wx}),v.d(b,"GLSL1",function(){return ud}),v.d(b,"GLSL3",function(){return hd}),v.d(b,"GammaEncoding",function(){return ln}),v.d(b,"GreaterDepth",function(){return Kn}),v.d(b,"GreaterEqualDepth",function(){return Zn}),v.d(b,"GreaterEqualStencilFunc",function(){return yf}),v.d(b,"GreaterStencilFunc",function(){return dh}),v.d(b,"GridHelper",function(){return eb}),v.d(b,"Group",function(){return va}),v.d(b,"HalfFloatType",function(){return $s}),v.d(b,"HemisphereLight",function(){return r0}),v.d(b,"HemisphereLightHelper",function(){return uA}),v.d(b,"HemisphereLightProbe",function(){return Lx}),v.d(b,"IcosahedronBufferGeometry",function(){return tc}),v.d(b,"IcosahedronGeometry",function(){return tc}),v.d(b,"ImageBitmapLoader",function(){return Cx}),v.d(b,"ImageLoader",function(){return np}),v.d(b,"ImageUtils",function(){return Gr}),v.d(b,"ImmediateRenderObject",function(){return Jx}),v.d(b,"IncrementStencilOp",function(){return gf}),v.d(b,"IncrementWrapStencilOp",function(){return nv}),v.d(b,"InstancedBufferAttribute",function(){return d0}),v.d(b,"InstancedBufferGeometry",function(){return c0}),v.d(b,"InstancedInterleavedBuffer",function(){return Vx}),v.d(b,"InstancedMesh",function(){return qd}),v.d(b,"Int16Attribute",function(){return GA}),v.d(b,"Int16BufferAttribute",function(){return wd}),v.d(b,"Int32Attribute",function(){return zA}),v.d(b,"Int32BufferAttribute",function(){return Ch}),v.d(b,"Int8Attribute",function(){return BA}),v.d(b,"Int8BufferAttribute",function(){return Jl}),v.d(b,"IntType",function(){return nf}),v.d(b,"InterleavedBuffer",function(){return _a}),v.d(b,"InterleavedBufferAttribute",function(){return Zo}),v.d(b,"Interpolant",function(){return Ea}),v.d(b,"InterpolateDiscrete",function(){return ps}),v.d(b,"InterpolateLinear",function(){return Bl}),v.d(b,"InterpolateSmooth",function(){return Go}),v.d(b,"InvertStencilOp",function(){return ov}),v.d(b,"JSONLoader",function(){return t2}),v.d(b,"KeepStencilOp",function(){return Mi}),v.d(b,"KeyframeTrack",function(){return Qo}),v.d(b,"LOD",function(){return am}),v.d(b,"LatheBufferGeometry",function(){return ec}),v.d(b,"LatheGeometry",function(){return ec}),v.d(b,"Layers",function(){return fd}),v.d(b,"LensFlare",function(){return i2}),v.d(b,"LessDepth",function(){return Gi}),v.d(b,"LessEqualDepth",function(){return Nn}),v.d(b,"LessEqualStencilFunc",function(){return vf}),v.d(b,"LessStencilFunc",function(){return ms}),v.d(b,"Light",function(){return is}),v.d(b,"LightProbe",function(){return op}),v.d(b,"Line",function(){return c}),v.d(b,"Line3",function(){return $x}),v.d(b,"LineBasicMaterial",function(){return kn}),v.d(b,"LineCurve",function(){return fl}),v.d(b,"LineCurve3",function(){return pu}),v.d(b,"LineDashedMaterial",function(){return Qv}),v.d(b,"LineLoop",function(){return D}),v.d(b,"LinePieces",function(){return SA}),v.d(b,"LineSegments",function(){return R}),v.d(b,"LineStrip",function(){return wA}),v.d(b,"LinearEncoding",function(){return Be}),v.d(b,"LinearFilter",function(){return Yi}),v.d(b,"LinearInterpolant",function(){return t0}),v.d(b,"LinearMipMapLinearFilter",function(){return Qp}),v.d(b,"LinearMipMapNearestFilter",function(){return Kp}),v.d(b,"LinearMipmapLinearFilter",function(){return qs}),v.d(b,"LinearMipmapNearestFilter",function(){return cs}),v.d(b,"LinearToneMapping",function(){return J}),v.d(b,"Loader",function(){return _r}),v.d(b,"LoaderUtils",function(){return Tm}),v.d(b,"LoadingManager",function(){return i0}),v.d(b,"LogLuvEncoding",function(){return Ui}),v.d(b,"LoopOnce",function(){return ah}),v.d(b,"LoopPingPong",function(){return Uo}),v.d(b,"LoopRepeat",function(){return sd}),v.d(b,"LuminanceAlphaFormat",function(){return Xc}),v.d(b,"LuminanceFormat",function(){return af}),v.d(b,"MOUSE",function(){return k}),v.d(b,"Material",function(){return Fn}),v.d(b,"MaterialLoader",function(){return Ex}),v.d(b,"Math",function(){return ia}),v.d(b,"MathUtils",function(){return ia}),v.d(b,"Matrix3",function(){return ji}),v.d(b,"Matrix4",function(){return Ee}),v.d(b,"MaxEquation",function(){return $t}),v.d(b,"Mesh",function(){return Ei}),v.d(b,"MeshBasicMaterial",function(){return fn}),v.d(b,"MeshDepthMaterial",function(){return wi}),v.d(b,"MeshDistanceMaterial",function(){return Gh}),v.d(b,"MeshFaceMaterial",function(){return AA}),v.d(b,"MeshLambertMaterial",function(){return bm}),v.d(b,"MeshMatcapMaterial",function(){return Kv}),v.d(b,"MeshNormalMaterial",function(){return Zv}),v.d(b,"MeshPhongMaterial",function(){return xm}),v.d(b,"MeshPhysicalMaterial",function(){return $v}),v.d(b,"MeshStandardMaterial",function(){return ym}),v.d(b,"MeshToonMaterial",function(){return Jv}),v.d(b,"MinEquation",function(){return Wt}),v.d(b,"MirroredRepeatWrapping",function(){return pi}),v.d(b,"MixOperation",function(){return qu}),v.d(b,"MultiMaterial",function(){return RA}),v.d(b,"MultiplyBlending",function(){return H}),v.d(b,"MultiplyOperation",function(){return Ws}),v.d(b,"NearestFilter",function(){return fi}),v.d(b,"NearestMipMapLinearFilter",function(){return Nl}),v.d(b,"NearestMipMapNearestFilter",function(){return Do}),v.d(b,"NearestMipmapLinearFilter",function(){return Xs}),v.d(b,"NearestMipmapNearestFilter",function(){return Tr}),v.d(b,"NeverDepth",function(){return Qi}),v.d(b,"NeverStencilFunc",function(){return hh}),v.d(b,"NoBlending",function(){return Ct}),v.d(b,"NoColors",function(){return TA}),v.d(b,"NoToneMapping",function(){return to}),v.d(b,"NormalAnimationBlendMode",function(){return Qs}),v.d(b,"NormalBlending",function(){return ot}),v.d(b,"NotEqualDepth",function(){return ka}),v.d(b,"NotEqualStencilFunc",function(){return _f}),v.d(b,"NumberKeyframeTrack",function(){return tp}),v.d(b,"Object3D",function(){return hi}),v.d(b,"ObjectLoader",function(){return UM}),v.d(b,"ObjectSpaceNormalMap",function(){return Hl}),v.d(b,"OctahedronBufferGeometry",function(){return fu}),v.d(b,"OctahedronGeometry",function(){return fu}),v.d(b,"OneFactor",function(){return me}),v.d(b,"OneMinusDstAlphaFactor",function(){return De}),v.d(b,"OneMinusDstColorFactor",function(){return Fi}),v.d(b,"OneMinusSrcAlphaFactor",function(){return Ze}),v.d(b,"OneMinusSrcColorFactor",function(){return be}),v.d(b,"OrthographicCamera",function(){return uc}),v.d(b,"PCFShadowMap",function(){return O}),v.d(b,"PCFSoftShadowMap",function(){return Y}),v.d(b,"PMREMGenerator",function(){return yA}),v.d(b,"ParametricBufferGeometry",function(){return Qd}),v.d(b,"ParametricGeometry",function(){return Qd}),v.d(b,"Particle",function(){return PA}),v.d(b,"ParticleBasicMaterial",function(){return OA}),v.d(b,"ParticleSystem",function(){return IA}),v.d(b,"ParticleSystemMaterial",function(){return NA}),v.d(b,"Path",function(){return xu}),v.d(b,"PerspectiveCamera",function(){return mn}),v.d(b,"Plane",function(){return Wr}),v.d(b,"PlaneBufferGeometry",function(){return er}),v.d(b,"PlaneGeometry",function(){return er}),v.d(b,"PlaneHelper",function(){return fA}),v.d(b,"PointCloud",function(){return CA}),v.d(b,"PointCloudMaterial",function(){return LA}),v.d(b,"PointLight",function(){return l0}),v.d(b,"PointLightHelper",function(){return aA}),v.d(b,"Points",function(){return Zt}),v.d(b,"PointsMaterial",function(){return $}),v.d(b,"PolarGridHelper",function(){return hA}),v.d(b,"PolyhedronBufferGeometry",function(){return Ue}),v.d(b,"PolyhedronGeometry",function(){return Ue}),v.d(b,"PositionalAudio",function(){return qM}),v.d(b,"PropertyBinding",function(){return Ci}),v.d(b,"PropertyMixer",function(){return Hx}),v.d(b,"QuadraticBezierCurve",function(){return Ta}),v.d(b,"QuadraticBezierCurve3",function(){return jv}),v.d(b,"Quaternion",function(){return Dn}),v.d(b,"QuaternionKeyframeTrack",function(){return lc}),v.d(b,"QuaternionLinearInterpolant",function(){return px}),v.d(b,"REVISION",function(){return z}),v.d(b,"RGBADepthPacking",function(){return ld}),v.d(b,"RGBAFormat",function(){return Er}),v.d(b,"RGBAIntegerFormat",function(){return $c}),v.d(b,"RGBA_ASTC_10x10_Format",function(){return td}),v.d(b,"RGBA_ASTC_10x5_Format",function(){return Fl}),v.d(b,"RGBA_ASTC_10x6_Format",function(){return Zs}),v.d(b,"RGBA_ASTC_10x8_Format",function(){return cf}),v.d(b,"RGBA_ASTC_12x10_Format",function(){return ed}),v.d(b,"RGBA_ASTC_12x12_Format",function(){return ih}),v.d(b,"RGBA_ASTC_4x4_Format",function(){return Qu}),v.d(b,"RGBA_ASTC_5x4_Format",function(){return Hi}),v.d(b,"RGBA_ASTC_5x5_Format",function(){return ko}),v.d(b,"RGBA_ASTC_6x5_Format",function(){return th}),v.d(b,"RGBA_ASTC_6x6_Format",function(){return uf}),v.d(b,"RGBA_ASTC_8x5_Format",function(){return eh}),v.d(b,"RGBA_ASTC_8x6_Format",function(){return hf}),v.d(b,"RGBA_ASTC_8x8_Format",function(){return Qc}),v.d(b,"RGBA_BPTC_Format",function(){return nh}),v.d(b,"RGBA_ETC2_EAC_Format",function(){return Ha}),v.d(b,"RGBA_PVRTC_2BPPV1_Format",function(){return Zc}),v.d(b,"RGBA_PVRTC_4BPPV1_Format",function(){return dr}),v.d(b,"RGBA_S3TC_DXT1_Format",function(){return Ju}),v.d(b,"RGBA_S3TC_DXT3_Format",function(){return Zu}),v.d(b,"RGBA_S3TC_DXT5_Format",function(){return Ku}),v.d(b,"RGBDEncoding",function(){return fr}),v.d(b,"RGBEEncoding",function(){return Ar}),v.d(b,"RGBEFormat",function(){return lf}),v.d(b,"RGBFormat",function(){return Bo}),v.d(b,"RGBIntegerFormat",function(){return Yc}),v.d(b,"RGBM16Encoding",function(){return ad}),v.d(b,"RGBM7Encoding",function(){return Ul}),v.d(b,"RGB_ETC1_Format",function(){return Kc}),v.d(b,"RGB_ETC2_Format",function(){return yo}),v.d(b,"RGB_PVRTC_2BPPV1_Format",function(){return Jc}),v.d(b,"RGB_PVRTC_4BPPV1_Format",function(){return rr}),v.d(b,"RGB_S3TC_DXT1_Format",function(){return $u}),v.d(b,"RGFormat",function(){return Yu}),v.d(b,"RGIntegerFormat",function(){return Mr}),v.d(b,"RawShaderMaterial",function(){return ac}),v.d(b,"Ray",function(){return Xo}),v.d(b,"Raycaster",function(){return nA}),v.d(b,"RectAreaLight",function(){return u0}),v.d(b,"RedFormat",function(){return Ga}),v.d(b,"RedIntegerFormat",function(){return qc}),v.d(b,"ReinhardToneMapping",function(){return st}),v.d(b,"RepeatWrapping",function(){return Ge}),v.d(b,"ReplaceStencilOp",function(){return iv}),v.d(b,"ReverseSubtractEquation",function(){return Rt}),v.d(b,"RingBufferGeometry",function(){return ic}),v.d(b,"RingGeometry",function(){return ic}),v.d(b,"SRGB8_ALPHA8_ASTC_10x10_Format",function(){return ff}),v.d(b,"SRGB8_ALPHA8_ASTC_10x5_Format",function(){return od}),v.d(b,"SRGB8_ALPHA8_ASTC_10x6_Format",function(){return df}),v.d(b,"SRGB8_ALPHA8_ASTC_10x8_Format",function(){return pf}),v.d(b,"SRGB8_ALPHA8_ASTC_12x10_Format",function(){return mf}),v.d(b,"SRGB8_ALPHA8_ASTC_12x12_Format",function(){return Ks}),v.d(b,"SRGB8_ALPHA8_ASTC_4x4_Format",function(){return id}),v.d(b,"SRGB8_ALPHA8_ASTC_5x4_Format",function(){return rh}),v.d(b,"SRGB8_ALPHA8_ASTC_5x5_Format",function(){return oh}),v.d(b,"SRGB8_ALPHA8_ASTC_6x5_Format",function(){return nd}),v.d(b,"SRGB8_ALPHA8_ASTC_6x6_Format",function(){return pr}),v.d(b,"SRGB8_ALPHA8_ASTC_8x5_Format",function(){return sh}),v.d(b,"SRGB8_ALPHA8_ASTC_8x6_Format",function(){return za}),v.d(b,"SRGB8_ALPHA8_ASTC_8x8_Format",function(){return rd}),v.d(b,"Scene",function(){return al}),v.d(b,"SceneUtils",function(){return e2}),v.d(b,"ShaderChunk",function(){return $e}),v.d(b,"ShaderLib",function(){return Ir}),v.d(b,"ShaderMaterial",function(){return sr}),v.d(b,"ShadowMaterial",function(){return Yv}),v.d(b,"Shape",function(){return gl}),v.d(b,"ShapeBufferGeometry",function(){return mu}),v.d(b,"ShapeGeometry",function(){return mu}),v.d(b,"ShapePath",function(){return Px}),v.d(b,"ShapeUtils",function(){return Ps}),v.d(b,"ShortType",function(){return ef}),v.d(b,"Skeleton",function(){return Yh}),v.d(b,"SkeletonHelper",function(){return Kx}),v.d(b,"SkinnedMesh",function(){return hl}),v.d(b,"SmoothShading",function(){return ge}),v.d(b,"Sphere",function(){return Mn}),v.d(b,"SphereBufferGeometry",function(){return gu}),v.d(b,"SphereGeometry",function(){return gu}),v.d(b,"Spherical",function(){return rA}),v.d(b,"SphericalHarmonics3",function(){return h0}),v.d(b,"SplineCurve",function(){return fm}),v.d(b,"SpotLight",function(){return s0}),v.d(b,"SpotLightHelper",function(){return sA}),v.d(b,"Sprite",function(){return cu}),v.d(b,"SpriteMaterial",function(){return au}),v.d(b,"SrcAlphaFactor",function(){return ei}),v.d(b,"SrcAlphaSaturateFactor",function(){return Pi}),v.d(b,"SrcColorFactor",function(){return ui}),v.d(b,"StaticCopyUsage",function(){return lv}),v.d(b,"StaticDrawUsage",function(){return ta}),v.d(b,"StaticReadUsage",function(){return ph}),v.d(b,"StereoCamera",function(){return jM}),v.d(b,"StreamCopyUsage",function(){return mh}),v.d(b,"StreamDrawUsage",function(){return ea}),v.d(b,"StreamReadUsage",function(){return av}),v.d(b,"StringKeyframeTrack",function(){return _u}),v.d(b,"SubtractEquation",function(){return At}),v.d(b,"SubtractiveBlending",function(){return Pt}),v.d(b,"TOUCH",function(){return Z}),v.d(b,"TangentSpaceNormalMap",function(){return Ur}),v.d(b,"TetrahedronBufferGeometry",function(){return nc}),v.d(b,"TetrahedronGeometry",function(){return nc}),v.d(b,"TextBufferGeometry",function(){return _m}),v.d(b,"TextGeometry",function(){return _m}),v.d(b,"Texture",function(){return pn}),v.d(b,"TextureLoader",function(){return n0}),v.d(b,"TorusBufferGeometry",function(){return rc}),v.d(b,"TorusGeometry",function(){return rc}),v.d(b,"TorusKnotBufferGeometry",function(){return oc}),v.d(b,"TorusKnotGeometry",function(){return oc}),v.d(b,"Triangle",function(){return Vi}),v.d(b,"TriangleFanDrawMode",function(){return Se}),v.d(b,"TriangleStripDrawMode",function(){return ie}),v.d(b,"TrianglesDrawMode",function(){return Qt}),v.d(b,"TubeBufferGeometry",function(){return sc}),v.d(b,"TubeGeometry",function(){return sc}),v.d(b,"UVMapping",function(){return wt}),v.d(b,"Uint16Attribute",function(){return HA}),v.d(b,"Uint16BufferAttribute",function(){return Za}),v.d(b,"Uint32Attribute",function(){return jA}),v.d(b,"Uint32BufferAttribute",function(){return so}),v.d(b,"Uint8Attribute",function(){return kA}),v.d(b,"Uint8BufferAttribute",function(){return bd}),v.d(b,"Uint8ClampedAttribute",function(){return UA}),v.d(b,"Uint8ClampedBufferAttribute",function(){return Rh}),v.d(b,"Uniform",function(){return Mm}),v.d(b,"UniformsLib",function(){return Te}),v.d(b,"UniformsUtils",function(){return Ro}),v.d(b,"UnsignedByteType",function(){return ds}),v.d(b,"UnsignedInt248Type",function(){return Ii}),v.d(b,"UnsignedIntType",function(){return Ys}),v.d(b,"UnsignedShort4444Type",function(){return rf}),v.d(b,"UnsignedShort5551Type",function(){return of}),v.d(b,"UnsignedShort565Type",function(){return sf}),v.d(b,"UnsignedShortType",function(){return Dl}),v.d(b,"VSMShadowMap",function(){return C}),v.d(b,"Vector2",function(){return ce}),v.d(b,"Vector3",function(){return S}),v.d(b,"Vector4",function(){return Oi}),v.d(b,"VectorKeyframeTrack",function(){return ep}),v.d(b,"Vertex",function(){return DA}),v.d(b,"VertexColors",function(){return MA}),v.d(b,"VideoTexture",function(){return Oe}),v.d(b,"WebGL1Renderer",function(){return Cn}),v.d(b,"WebGLCubeRenderTarget",function(){return je}),v.d(b,"WebGLMultipleRenderTargets",function(){return Wl}),v.d(b,"WebGLMultisampleRenderTarget",function(){return na}),v.d(b,"WebGLRenderTarget",function(){return eo}),v.d(b,"WebGLRenderTargetCube",function(){return KA}),v.d(b,"WebGLRenderer",function(){return Ni}),v.d(b,"WebGLUtils",function(){return nm}),v.d(b,"WireframeGeometry",function(){return qv}),v.d(b,"WireframeHelper",function(){return $A}),v.d(b,"WrapAroundEnding",function(){return kl}),v.d(b,"XHRLoader",function(){return JA}),v.d(b,"ZeroCurvatureEnding",function(){return jn}),v.d(b,"ZeroFactor",function(){return ye}),v.d(b,"ZeroSlopeEnding",function(){return fs}),v.d(b,"ZeroStencilOp",function(){return lh}),v.d(b,"sRGBEncoding",function(){return gi});var q={};v.r(q),v.d(q,"isMobile",function(){return ns}),v.d(q,"EventEmitter",function(){return pc.a}),v.d(q,"earcut",function(){return N0.a}),v.d(q,"BaseTextureCache",function(){return Lo}),v.d(q,"CanvasRenderTarget",function(){return X0}),v.d(q,"DATA_URI",function(){return Jb}),v.d(q,"ProgramCache",function(){return W0}),v.d(q,"TextureCache",function(){return Yr}),v.d(q,"clearTextureCache",function(){return NR}),v.d(q,"correctBlendMode",function(){return H0}),v.d(q,"createIndicesForQuads",function(){return qb}),v.d(q,"decomposeDataUri",function(){return DR}),v.d(q,"deprecation",function(){return fc}),v.d(q,"destroyTextureCache",function(){return OR}),v.d(q,"determineCrossOrigin",function(){return Zb}),v.d(q,"getBufferType",function(){return Gm}),v.d(q,"getResolutionOfUrl",function(){return cp}),v.d(q,"hex2rgb",function(){return Cu}),v.d(q,"hex2string",function(){return k0}),v.d(q,"interleaveTypedArrays",function(){return IR}),v.d(q,"isPow2",function(){return j0}),v.d(q,"isWebGLSupported",function(){return Wb}),v.d(q,"log2",function(){return V0}),v.d(q,"nextPow2",function(){return hp}),v.d(q,"premultiplyBlendMode",function(){return G0}),v.d(q,"premultiplyRgba",function(){return Xb}),v.d(q,"premultiplyTint",function(){return Um}),v.d(q,"premultiplyTintToRgba",function(){return z0}),v.d(q,"removeItems",function(){return Pu}),v.d(q,"rgb2hex",function(){return CR}),v.d(q,"sayHello",function(){return Vb}),v.d(q,"sign",function(){return Iu}),v.d(q,"skipHello",function(){return AR}),v.d(q,"string2hex",function(){return U0}),v.d(q,"trimCanvas",function(){return $b}),v.d(q,"uid",function(){return xl}),v.d(q,"url",function(){return Ru});var ht=v(4),V=v(1),P=v.n(V),W=v(0);/**
|
|
1828
1828
|
* @license
|
|
1829
1829
|
* Copyright 2010-2021 Three.js Authors
|
|
1830
1830
|
* SPDX-License-Identifier: MIT
|
|
@@ -6164,7 +6164,7 @@ void main()
|
|
|
6164
6164
|
*
|
|
6165
6165
|
* pixi.js is licensed under the MIT License.
|
|
6166
6166
|
* http://www.opensource.org/licenses/mit-license
|
|
6167
|
-
*/wl.registerPlugin("accessibility",HR),wl.registerPlugin("extract",WC),wl.registerPlugin("interaction",XR),wl.registerPlugin("particle",MP),wl.registerPlugin("prepare",JP),wl.registerPlugin("batch",jC),wl.registerPlugin("tilingSprite",KP),Fs.registerPlugin(oI),Fs.registerPlugin(QC),Fs.registerPlugin(cP),Fs.registerPlugin(EP),Fs.registerPlugin(ZP),eg.registerPlugin(zR),eg.registerPlugin(JC);var cr,fg={AlphaFilter:sI,BlurFilter:uI,BlurFilterPass:T_,ColorMatrixFilter:E_,DisplacementFilter:hI,FXAAFilter:cI,NoiseFilter:dI};class vI extends P.a{constructor(){super(),this.prevTime=-1,this.times=0,this.valueTotal=0,this.destroyed=!1,this.value=0,this.calcFps()}calcFps(){requestAnimationFrame(t=>{const e=t-this.prevTime;this.valueTotal+=e,this.times+=1,this.times>20&&(this.value=Math.floor(1e3*this.times/this.valueTotal),this.valueTotal=0,this.times=0,this.destroyed||this.emit("update",this.value)),this.prevTime=t,this.destroyed||this.calcFps()})}destroy(){this.destroyed=!0}}(function(r){r.ResourceError="RESOURCE_ERROR",r.RuntimeError="RUNTIME_ERROR",r.RuntimeWarn="RUNTIME_WARN",r.CanvasCrash="CANVAS_CRASH"})(cr||(cr={}));class Tn extends Error{constructor(t,e){var i,n;super(e),i=this,n=new.target.prototype,Object.setPrototypeOf?Object.setPrototypeOf(i,n):i.__proto__&&(i.__proto__=n),this.errorType=t,this.errorMsg=e}static transform(t){return t instanceof Tn?t:new Tn(cr.RuntimeError,t.message)}}function mg(){return function(r,t,e){const i=e.value;e.value=function(...n){try{return i.apply(this,n)}catch(o){throw new Tn(cr.RuntimeWarn,o.message)}}}}var _I=v(6),PS=v.n(_I);function ho(r,t,e=5){return Math.abs(r-t)<=Math.pow(10,-e)}function El(r){return Math.floor(1e6*r)/1e6}class Ml{constructor(){this.point={x:0,y:0},this.slope=Math.PI/4}static fromPointSlope(t,e){const i=new Ml;return i.point=t,i.slope=e,i}resolveY(t){return Math.tan(this.slope)*(t-this.point.x)+this.point.y}distanceToLinearEquation(t){return ho(this.slope,t.slope)?this.distanceToPoint(t.point):-1}distanceToPoint(t){let e=0;if(Math.tan(this.slope)*(t.x-this.point.x)+this.point.y===t.y)return 0;e=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;const i=Ml.fromPointSlope(t,e),n=this.crossPoint(i);return n?Math.ceil(Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))):0}crossPoint(t){if(ho(t.slope,this.slope))return null;let e=0,i=0;const n=Math.tan(t.slope),o=Math.tan(this.slope),{x:s,y:a}=this.point,{x:l,y:u}=t.point;return ho(this.slope,Math.PI/2)?(e=this.point.x,i=n*(e-l)+u):ho(t.slope,Math.PI/2)?(e=t.point.x,i=o*(e-s)+a):ho(this.slope,Math.PI)||ho(this.slope,0)?(i=this.point.y,e=(i-u)/n+l):ho(t.slope,Math.PI)||ho(t.slope,0)?(i=t.point.y,e=(i-a)/o+s):(e=(n*l-u+a-o*s)/(n-o),i=o*(e-s)+a),{x:e,y:i}}}var yI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function Tp(){return Date.now().toString(32)+Math.random().toString(32).substring(2)}const La="__delay_resolve_result__";function Ac(r,t){return yI(this,void 0,void 0,function*(){const e=yield Promise.race([r(),(i=t,new Promise(n=>{setTimeout(()=>{n(La)},i)}))]);var i;return e===La?La:e})}var R_=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function IS(r,t){return R_(this,void 0,void 0,function*(){const e=yield Ac(()=>fetch(r),t);if(e===La)throw new Tn(cr.ResourceError,`"${r}" loaded timeout"`);if(!e.ok)throw new Tn(cr.ResourceError,`"${r}" loaded failed with status "${e.status}"`);return e})}class xI{constructor(t,e,i,n,o){this.timeout=15e3,this.useCache=!1,this.taskId="",this.delegate=null,this.useCache=e,this.localStorage=t,this.logger=i,this.timeout=n,this.delegate=o||null}attachTaskId(t){this.taskId=t}fetchJson(t){return R_(this,void 0,void 0,function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let i;if(this.delegate){this.logger.info("load resource by delegate. "+t,this.taskId||"");const n=yield Ac(()=>this.delegate.loadJson(t),this.timeout);if(n===La)throw new Tn(cr.ResourceError,`"${t}" loaded timeout"`);i=JSON.parse(n)}else this.logger.info("load resource from server. "+t,this.taskId||""),i=yield(yield IS(""+t,this.timeout)).json();return this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,i).catch(()=>{}),i}})}fetchPng(t){return R_(this,void 0,void 0,function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let i;if(this.delegate){if(this.logger.info("load resource by delegate. "+t,this.taskId||""),i=yield Ac(()=>this.delegate.loadImage(t),this.timeout),i===La)throw new Tn(cr.ResourceError,`"${t}" loaded timeout"`)}else this.logger.info("load resource from server. "+t,this.taskId||""),i=yield(yield IS(t,this.timeout)).blob();return e=yield function(n){return new Promise((o,s)=>{const a=new FileReader;a.onload=()=>{o(a.result)},a.onerror=()=>{s(new Tn(cr.ResourceError,"Failed parse blob data."))},a.readAsDataURL(n)})}(i),this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,e).catch(()=>{}),e}})}destroy(){}}var bI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class wI{constructor(t){this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=e=>{const i=e/(We.TARGET_FPMS||.06);if(!this.isPaused){this.timestamp+=i,this.callbackList=this.callbackList.filter(o=>o&&!o.applied);let{length:n}=this.callbackList;for(let o=0;o<n;o++){const s=this.callbackList[o];if(s&&!s.applied){if(!(s.triggerTime<=this.timestamp))break;s.running=!0,s.fn(),s.applied=!0,n=this.callbackList.length}}}},this.ticker=t,this.ticker.add(this.onTimeUpdate)}setTimeout(t,e){const i=Tp(),n=this.timestamp+Math.max(e||16,16);return this.callbackList.push({fn:t,triggerTime:n,id:i,applied:!1,running:!1}),this.callbackList.sort((o,s)=>o.triggerTime-s.triggerTime),i}clearTimeout(t){const e=this.callbackList.findIndex(i=>i.id===t);e>=0&&!this.callbackList[e].running&&this.callbackList.splice(e,1)}delay(t){return new Promise(e=>{this.setTimeout(e,t)})}waitUntil(t,e){return bI(this,void 0,void 0,function*(){const i=this.timestamp;for(;!t()&&this.timestamp-i<e;)yield this.delay(50)})}pause(){this.isPaused=!0}resume(){this.isPaused=!1}}var SI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function gg(r,t,e){return e?Math.floor(parseFloat(r)*t):Math.ceil(parseFloat(r)*t)}const vg={w:!0,h:!0,x:!1,y:!1};class TI{constructor(t){this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null),this.spriteSheets=[],this.loader=t}getTexture(t){return this.textures[t]||null}getFrameData(t){return this.frames[t]}getGifFrames(t){return this.gifs[t]?this.gifs[t].filter(e=>!!e):[]}loadSpriteSheetItem(t,e,i,n){return SI(this,void 0,void 0,function*(){const o=yield this.loader.fetchJson(`${t}/${e}/jsonOutput/${i}.json`),s=yield this.loader.fetchPng(`${t}/${e}/jsonOutput/${i}.png`),a=document.createElement("img");a.src=s,yield new Promise((y,w)=>{a.onload=()=>y(""),a.onerror=()=>w()});let l=n;const u=a.width||1,h=a.height||1;if(u>2048||h>2048){l*=2048/u;const y=l*h;y>2048&&(l*=h/y)}(function(y,w){y.meta&&y.meta.size&&["w","h"].forEach(A=>{y.meta.size[A]=gg(y.meta.size[A],w,vg[A])}),y.frames&&Object.keys(y.frames).forEach(A=>{y.frames[A].frame&&["x","y","w","h"].forEach(I=>{y.frames[A].frame[I]=gg(y.frames[A].frame[I],w,vg[I])}),y.frames[A].spriteSourceSize&&["x","y","w","h"].forEach(I=>{y.frames[A].spriteSourceSize[I]=gg(y.frames[A].spriteSourceSize[I],w,vg[I])}),y.frames[A].sourceSize&&["w","h"].forEach(I=>{y.frames[A].sourceSize[I]=gg(y.frames[A].sourceSize[I],w,vg[I])})})})(o,l);const d=document.createElement("canvas"),p=Math.ceil(a.width*l),m=Math.ceil(a.height*l);d.width=p,d.height=m,d.getContext("2d").drawImage(a,0,0,p,m);const g=new Ai(d,{resolution:1}),_=new Rw(g,o);yield new Promise(y=>{_.parse(()=>y(""))}),this.spriteSheets.push(_),Object.keys(_.textures).forEach(y=>{const w=y.match(/^(.+)_gif_(\d+)$/);if(w&&w[1]&&w[2]){const A=w[1];this.gifs[A]||(this.gifs[A]=[]);const I=parseInt(w[2],10);this.gifs[A][I]=_.textures[y]}else this.frames[y]=o.frames[y],this.textures[y]=_.textures[y]})})}destroy(){this.spriteSheets.forEach(t=>t.destroy(!0)),this.spriteSheets=[],this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null)}}var EI=v(2),Ep=v.n(EI);function LS(r,t,e){let i,n;const o=Math.round(r)%360;if(o%180==0)i=Math.cos(o*(Math.PI/180))*t,n=0;else if(o%90==0)i=0,n=Math.sin(o*(Math.PI/180))*e;else{const s=function(a){const l=a*Math.PI/180;return Math.tan(l)}(o);i=t*e/Math.sqrt(Math.pow(e,2)+Math.pow(t*s,2)),(o>90&&o<270||o<-90&&o>-270)&&(i=-i),n=s*i}return{x:i,y:n}}function MI(r,t,e,i,n,o){const s=r,a=t;let l,u,h,d,p;if(Math.round(i)===0)l=n,u=o,p=0;else if(Math.round(i)>=360)l=n,u=o,h=n+2*r*Math.abs(Math.cos(-e/180*Math.PI)),d=o+2*t*Math.sin(-e/180*Math.PI),p=1;else{const m=-e,g=-(e+i),{x:_,y}=LS(m,s,a),w=n-_,A=o+y,{x:I,y:F}=LS(g,s,a);l=I+w,u=A-F,p=i>=-360&&i<-180?1:i>=-180&&i<0||i>0&&i<180?0:1}return{radiusX:s,radiusY:a,xAxisRotation:0,largeArcFlag:p,sweepFlag:i>0?1:0,endX:l,endY:u,middleX:h,middleY:d}}class OS{constructor(){this.pool=[]}getObject(t){const e=this.pool.find(i=>!i.isUsed);if(e)return e.isUsed=!0,e.obj;{const i={obj:this.createObject(),isUsed:!0,group:t};return this.pool.push(i),i.obj}}collectObject(t){const e=this.pool.find(i=>i.obj===t);e&&(e.isUsed=!1,this.resetObject(e.obj))}collectObjectByGroup(t){this.pool.filter(e=>e.group===t).forEach(e=>this.collectObject(e.obj))}}const C_=new class extends OS{createObject(){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r}resetObject(r){r.removeAttribute("viewBox"),r.removeAttribute("width"),r.removeAttribute("height"),r.innerHTML=""}},P_=new class extends OS{createObject(){return document.createElement("img")}resetObject(r){r.removeAttribute("src")}};var AI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class RI{constructor(){this.imgElements=[],this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null)}render(t,e,i){return AI(this,void 0,void 0,function*(){const{items:n,width:o,height:s}=t,a=P_.getObject(i),l=new Ai(a,{width:o,height:s,resolution:1}),u=C_.getObject(i);this.imgElements.push(a),this.svgElements.push(u),u.setAttribute("viewBox",`0 0 ${o} ${s}`),u.setAttribute("width",""+o),u.setAttribute("height",""+s);const h={},d={};n.forEach(g=>{const{item:_,x:y,y:w}=g,A=y+2,I=w+2;_.pathsData.forEach(U=>{let B="";U.cmds.forEach(([G,ct])=>{B+=G+" ",B+=ct.map(it=>(Object(V.isNumber)(it)||(it.x=it.x+U.offset.x+A,it.y=it.y+U.offset.y+I),it)).reduce((it,tt)=>(Object(V.isNumber)(tt)?it+=tt+" ":it+=`${tt.x} ${tt.y} `,it),""),B+=" "}),U.pathElement.setAttribute("d",B),u.appendChild(U.pathElement)});const F=_.width-4-2*_.padding,N=_.height-4-2*_.padding;this.textures[_.hash]={texture:new Qe(l,new xi(A+2,I+2,F,N)),pivot:_.pivot},h[_.hash]={x:A+2,y:I+2,w:F,h:N,pivot:_.pivot},d[_.hash]=this.hashToIdMap[_.hash]});const p=(m='<?xml version="1.0" encoding="utf-8"?>'+u.outerHTML,"data:image/svg+xml,"+encodeURIComponent(m).replace(/'/g,"%27").replace(/"/g,"%22"));var m;a.src=p,yield new Promise((g,_)=>{a.onload=()=>g(""),a.onerror=()=>_()})})}getGraphicsData(t){const e=this.idToHashMap[t]||"";return this.textures[e]||null}addGraphics(t,e,i,n,o,s,a,l,u,h,d){var p,m;if(!a&&!u)return t;const g=Ep()(i+((m=(p=a==null?void 0:a.width)===null||p===void 0?void 0:p.toString())!==null&&m!==void 0?m:0)+u+h+d);if(this.hashToIdMap[g]||(this.hashToIdMap[g]=[]),this.hashToIdMap[g].push(t),this.idToHashMap[t]=g,this.graphics.findIndex(_=>_.hash===g)<0){const{graphicsWidth:_,graphicsHeight:y,pathsData:w,pivot:A,padding:I}=function(F,N,U,B,G,ct,it,tt,rt){var et;const pt=[],kt={x:Math.abs(G.x),y:Math.abs(G.y)};let Lt=0,_t=0,xt=0,jt=0,ee=0,le="none";const nt=(et=B==null?void 0:B.width)!==null&&et!==void 0?et:0;return it?(Lt=N,_t=U,ee=0):(le=rt||"#ff0000",ee=nt,xt=.5*nt,jt=.5*nt,Lt=N+nt,_t=U+nt,kt.x+=.5*nt,kt.y+=.5*nt),Lt+=Math.abs(G.x),_t+=Math.abs(G.y),xt+=Math.abs(G.x),jt+=Math.abs(G.y),Lt+=4,_t+=4,xt+=2,jt+=2,Lt=Math.ceil(Lt),_t=Math.ceil(_t),F.forEach(lt=>{const Xt=document.createElementNS("http://www.w3.org/2000/svg","path");lt.fill!=="none"&&it?Xt.setAttribute("fill",tt||"#ff0000"):Xt.setAttribute("fill","none"),lt.hasStroke&&!it&&(Xt.setAttribute("stroke-linecap",(B==null?void 0:B.cap)||"butt"),Xt.setAttribute("stroke-linejoin",(B==null?void 0:B.join)||"miter"),Xt.setAttribute("stroke-width",ee.toString()),Xt.setAttribute("stroke",le),B!=null&&B.dash&&Xt.setAttribute("stroke-dasharray",B.dash));const{scale:Ut}=lt,Bt=lt.path.trim().split(" ");let ue={x:0,y:0};const he={offset:{x:xt,y:jt},cmds:[],pathElement:Xt};for(let Vt=0;Vt<Bt.length;Vt+=2){const Q=Bt[Vt],gt=Bt[Vt+1];if(Q==="M"){let[Dt,Ft]=gt.split(",").map(St=>Number(St));ue={x:Dt,y:Ft},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,he.cmds.push(["M",[{x:Dt,y:Ft}]])}else if(Q==="A"){const[Dt,Ft,St,Yt]=gt.split(",").map(si=>Number(si)),Me=St/Math.PI*180,Re=Yt/Math.PI*180,Ae=MI(Dt,Ft,Me,Re,ue.x,ue.y);Math.round(Re)>=360?(ue={x:Ae.endX,y:Ae.endY},he.cmds.push(["A",[Ae.radiusX/9525*Ut.x,Ae.radiusY/9525*Ut.y,Ae.xAxisRotation,Ae.largeArcFlag,Ae.sweepFlag,{x:Ae.middleX/9525*Ut.x,y:Ae.middleY/9525*Ut.y}]]),he.cmds.push(["A",[Ae.radiusX/9525*Ut.x,Ae.radiusY/9525*Ut.y,Ae.xAxisRotation,Ae.largeArcFlag,Ae.sweepFlag,{x:Ae.endX/9525*Ut.x,y:Ae.endY/9525*Ut.y}]])):(ue={x:Ae.endX,y:Ae.endY},he.cmds.push(["A",[Ae.radiusX/9525*Ut.x,Ae.radiusY/9525*Ut.y,Ae.xAxisRotation,Ae.largeArcFlag,Ae.sweepFlag,{x:Ae.endX/9525*Ut.x,y:Ae.endY/9525*Ut.y}]]))}else if(Q==="L"){let[Dt,Ft]=gt.split(",").map(St=>Number(St));ue={x:Dt,y:Ft},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,he.cmds.push(["L",[{x:Dt,y:Ft}]])}else if(Q==="QB"){let[Dt,Ft,St,Yt]=gt.split(",").map(Me=>Number(Me));ue={x:St,y:Yt},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,St=St/9525*Ut.x,Yt=Yt/9525*Ut.y,he.cmds.push(["Q",[{x:Dt,y:Ft},{x:St,y:Yt}]])}else if(Q==="CB"){let[Dt,Ft,St,Yt,Me,Re]=gt.split(",").map(Ae=>Number(Ae));ue={x:Me,y:Re},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,St=St/9525*Ut.x,Yt=Yt/9525*Ut.y,Me=Me/9525*Ut.x,Re=Re/9525*Ut.y,he.cmds.push(["C",[{x:Dt,y:Ft},{x:St,y:Yt},{x:Me,y:Re}]])}else Q==="C"&&he.cmds.push(["Z",[]])}pt.push(he)}),{graphicsWidth:Lt,graphicsHeight:_t,pivot:kt,padding:2,pathsData:pt}}(e,o,s,a,n,0,u,h,d);this.graphics.push({hash:g,pathsData:w,pivot:A,width:_,height:y,padding:I})}return t}pack(){return this.graphics.forEach(t=>{t.width+=4,t.height+=4}),function t(e){const i=[],n=e.filter(h=>{const d=h.width<2048&&h.height<2048;return d||i.push(h),d}).sort((h,d)=>h.width*h.height-d.width*d.height);let o=n.length+1,s=2050,a=2050;const l=[];let u=null;for(;(s>2048||a>2048)&&n.length>0;)o-=1,u=PS()(n.slice(0,o)),s=u.width,a=u.height;return u&&l.push(u),i.forEach(h=>{const d=PS()([h]);l.push(d)}),o<n.length?l.concat(t(n.slice(o))):l}(this.graphics)}destroy(){Object.keys(this.textures).forEach(t=>{var e;(e=this.textures[t])===null||e===void 0||e.texture.destroy(!0)}),this.textures=Object.create(null),this.imgElements.forEach(t=>P_.collectObject(t)),this.svgElements.forEach(t=>C_.collectObject(t)),this.graphics=[]}}class CI{constructor(){this.runningTimeNodes={}}addRunningTimeNode(t,e,i){const n=`${e}_${t}`;if(this.runningTimeNodes[n])try{this.runningTimeNodes[n].dispose(!0)}catch{}this.runningTimeNodes[n]=i}removeRunningTimeNode(t,e){const i=`${e}_${t}`;delete this.runningTimeNodes[i]}}class PI{constructor(t){this.eventHub=t,this.targets=Object.create(null)}getTargets(){return Object.keys(this.targets).map(t=>this.targets[t])}addTarget(t,e){this.targets[t]=e}getTargetById(t){return this.targets[t]}getTarget(t,e,i={type:"el",index:0,id:""}){var n,o;let s=this.targets[t.id];return t.type!=="shape"?s:(t.type==="shape"&&t.txEl&&(s=(n=s==null?void 0:s.getTextElement(t.txEl.type,t.txEl.range))!==null&&n!==void 0?n:null),t.type==="shape"&&t.bg&&i.index===0&&(e=!1,s=(o=s==null?void 0:s.getBgElement())!==null&&o!==void 0?o:null,this.eventHub.emit("IterateTimeNodeEnd",i.id)),e&&s?s.getIterateEntry(i.type,i.index,i.id):(s||this.eventHub.emit("IterateTimeNodeEnd",i.id),s))}clearTargets(){this.targets=Object.create(null)}}class II{constructor(t){this.target=t}get color(){return this.target.strokeColorFilter.currentColor}set color(t){this.target.strokeColorFilter.color=t}get on(){return this.target.strokeActive?"true":"false"}set on(t){this.target.strokeActive=t==="true"}}class LI{constructor(t){this.applyCommand=(e,i)=>{this.target.applyCommand(e,i)},this.target=t,this.applyCommand=Object(V.debounce)(this.applyCommand,100,{maxWait:500})}}class NS{constructor(t){this.target=t}get color(){return this.target.fillColorFilter.currentColor}set color(t){this.target.fillActive&&(this.target.fillColorFilter.color=t)}get on(){return this.target.fillActive?"true":"false"}set on(t){this.target.fillActive=t==="true"}get designColor(){return this.target.fillColorFilter.designColor}}class OI{constructor(t,e){this.hardHidden=!1,this.target=t,e===!0&&(this.hardHidden=!0)}get opacity(){return this.target.alpha}set opacity(t){this.target.alpha=t}get rotation(){return this.target.rotation/Math.PI*180}set rotation(t){this.target.rotation=t/180*Math.PI}get visibility(){return this.target.visible?"visible":"hidden"}set visibility(t){this.visibility===t||this.hardHidden||(this.target.visible=t==="visible")}}class NI{constructor(t,e){this.actions=[],this.ctx=e,this.object=t,this.object.interactive=!0}reset(t){this.object.interactive=!1,this.object.removeAllListeners(),this.object=t,this.object.interactive=!0}addAction(t,e){this.actions.push([t,e]),e==="click"?(this.object.addListener("click",()=>this.handleAction(t)),this.object.cursor="pointer"):e==="hover"&&this.object.addListener("mouseover",()=>this.handleAction(t))}addProxy(t){this.proxy=t,this.hitArea=this.getOriginHitArea(),this.proxy.interactive=!0,this.actions.forEach(([e,i])=>{var n,o;i==="click"?(n=this.proxy)===null||n===void 0||n.addListener("click",s=>this.handleProxyAction(s,e)):i==="hover"&&((o=this.proxy)===null||o===void 0||o.addListener("mouseover",s=>this.handleProxyAction(s,e)))})}handleProxyAction(t,e){var i;const n=t.data.global,o=this.object.getGlobalPosition(),s=n.x-o.x+this.object.pivot.x,a=n.y-o.y+this.object.pivot.y;((i=this.hitArea)===null||i===void 0?void 0:i.contains(s,a))&&this.object.visible&&this.handleAction(e,!0)}getOriginHitArea(){return this.object.hitArea?this.object.hitArea:new q0(0,0,this.object.width,this.object.height)}handleAction(t,e=!1){this.proxy&&!e||(this.ctx.eventHub.emit(Ne.hyperlinkTrigger,t),this.execAction(t))}execAction(t){var e;if(this.ctx.eventHub.emit(Ne.userInput),t.action==="ppaction://hlinksldjump"){const i=((e=t==null?void 0:t.target)!==null&&e!==void 0?e:"").match(/slide(\d+)\.xml/);i&&i[1]&&this.ctx.eventHub.emit(Ne.requestGotoSlide,Number(i[1]))}else if(t.action==="ppaction://hlinkshowjump?jump=nextslide")this.ctx.eventHub.emit(Ne.requestNextSlide);else if(t.action==="ppaction://hlinkshowjump?jump=previousslide")this.ctx.eventHub.emit(Ne.requestPrevSlide);else if(t.action==="ppaction://hlinkshowjump?jump=firstslide")this.ctx.eventHub.emit(Ne.requestGotoSlide,1);else if(t.action==="ppaction://hlinkshowjump?jump=lastslide")this.ctx.eventHub.emit(Ne.requestGotoSlide,-1);else if(t.action==="ppaction://hlinkshowjump?jump=lastslideviewed"){const i=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(Ne.requestGotoSlide,i)}else t.action==="ppaction://hlinkshowjump?jump=endshow"&&this.ctx.eventHub.emit(Ne.requestGotoSlide,-1)}}class I_{constructor(t,e,i){var n,o,s,a,l,u;this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new xi(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new Yn,this.ctx=e,this.style=new OI(this.container,t.hardHidden),this.designGlobalPosition={x:i.x+((o=(n=t.position)===null||n===void 0?void 0:n.x)!==null&&o!==void 0?o:0),y:i.y+((a=(s=t.position)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)},this.container.interactive=!0,(t.hlinkClick||t.hlinkHover)&&(this.hyperlink=new NI(this.container,this.ctx),t.hlinkHover&&((l=this.hyperlink)===null||l===void 0||l.addAction(t.hlinkHover,"hover")),t.hlinkClick&&((u=this.hyperlink)===null||u===void 0||u.addAction(t.hlinkClick,"click"))),this.ctx.clock.waitUntil(()=>{try{return!!this.container.width}catch{return!1}},3e3).then(()=>{try{this.designWidth=this.designWidth||this.container.width}catch{}}),this.ctx.clock.waitUntil(()=>{try{return!!this.container.height}catch{return!1}},3e3).then(()=>{try{this.designHeight=this.designHeight||this.container.height}catch{}})}updateScale(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}updateTransform(t){var e,i,n,o,s,a,l,u;this.designWidth=t.width,this.designHeight=t.height,this.designX=(i=(e=t.position)===null||e===void 0?void 0:e.x)!==null&&i!==void 0?i:0,this.designY=(o=(n=t.position)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:0;const h=this.designWidth/2,d=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=h,this.container.pivot.y=d;const p=(a=(s=t.position)===null||s===void 0?void 0:s.x)!==null&&a!==void 0?a:0,m=(u=(l=t.position)===null||l===void 0?void 0:l.y)!==null&&u!==void 0?u:0;this.container.x=p+h,this.container.y=m+d,t.scale&&(this.designScale={x:t.scale.x,y:t.scale.y},this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y),t.rotation&&(this.container.rotation=t.rotation);const g=new ks;g.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(g),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=p,this.bound.y=m,this.bound.width=this.designWidth,this.bound.height=this.designHeight}get scale(){return this.scaleOrigin}set scale(t){this.scaleOrigin.x=t.x,this.scaleOrigin.y=t.y,this.updateScale()}get design_ppt_w(){return El(this.designWidth/this.ctx.stageWidth)}get design_ppt_h(){return El((this.designHeight||this.container.height)/this.ctx.stageHeight)}get design_ppt_x(){return El(this.designX/this.ctx.stageWidth)}get design_ppt_y(){return El(this.designY/this.ctx.stageHeight)}get ppt_w(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth}set ppt_w(t){this.designWidth&&(this.scaleExt.x=t*this.ctx.stageWidth/this.designWidth,this.updateScale())}get ppt_h(){const t=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*t/this.ctx.stageHeight}set ppt_h(t){this.designHeight&&(this.scaleExt.y=t*this.ctx.stageHeight/this.designHeight,this.updateScale())}get ppt_x(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth}set ppt_x(t){this.pptX=t;const e=this.presetSubType===544?this.scaleExt.x:1;this.container.position.x=t*this.ctx.stageWidth+this.container.pivot.x*e}get ppt_y(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight}set ppt_y(t){this.pptY=t;const e=this.presetSubType===544?this.scaleExt.y:1;this.container.position.y=t*this.ctx.stageHeight+this.container.pivot.y*e}get r(){return this.container.rotation}set r(t){this.container.rotation=t}set xshear(t){this.container.skew.x=t}get xshear(){return this.container.skew.x}set yshear(t){this.container.skew.y=t}get yshear(){return this.container.skew.y}}class _g{constructor(t){if(this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,t){this._isInit=!0;const e=t.match(/-?[0-9]+/g);e&&(this.h=parseInt(e[0],10),this.s=parseInt(e[1],10)/100,this.l=parseInt(e[2],10)/100)}}isInit(){return this._isInit}by(t,e){e.h=Math.max(Math.min(this.h+t.h,359),0),e.s=Math.max(Math.min(this.s+t.s,1),0),e.l=Math.max(Math.min(this.l+t.l,1),0),e.a=Math.max(Math.min(this.a+t.a,1),0)}fromHexString(t){const[e,i,n,o]=Us(t);let s=0,a=0,l=0;const u=Math.max(e,i,n),h=Math.min(e,i,n),d=u-h;l=(u+h)/2,d===0?s=0:u===e?s=(i-n)/d%6*60:u===i?s=60*((n-e)/d+2):u===n&&(s=60*((e-i)/d+4)),a=d===0?0:d/(1-Math.abs(2*l-1)),this.h=s,this.s=a,this.l=l,this.a=o}interpolationFrom(t,e,i){const n=t.h+(this.h-t.h)*e,o=t.s+(this.s-t.s)*e,s=t.l+(this.l-t.l)*e,a=t.a+(this.a-t.a)*e;i.h=Math.max(Math.min(n,359),0),i.s=Math.max(Math.min(o,1),0),i.l=Math.max(Math.min(s,1),0),i.a=Math.max(Math.min(a,1),0)}toHexString(){let t=[0,0,0,0];const{h:e,s:i,l:n}=this;if(e<360&&e>=0&&i<=1&&i>=0&&n<=1&&n>=0){let o,s,a;const l=(1-Math.abs(2*n-1))*i,u=l*(1-Math.abs(e/60%2-1)),h=n-l/2;[o,s,a]=e>=0&&e<60?[l,u,0]:e>=60&&e<120?[u,l,0]:e>=120&&e<180?[0,l,u]:e>=180&&e<240?[0,u,l]:e>=240&&e<300?[u,0,l]:[l,0,u],t=[o+h,s+h,a+h,this.a]}return FS(t)}}class yg{constructor(t){this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,t&&(this._isInit=!0,this.fromHexString(t))}fromHexString(t){const[e,i,n,o]=Us(t);this.r=e,this.g=i,this.b=n,this.a=o}isInit(){return this._isInit}interpolationFrom(t,e,i){i.r=t.r+(this.r-t.r)*e,i.g=t.g+(this.g-t.g)*e,i.b=t.b+(this.b-t.b)*e,i.a=t.a+(this.a-t.a)*e}by(t,e){e.r=Math.min(Math.max(this.r+t.r,0),255),e.g=Math.min(Math.max(this.g+t.g,0),255),e.b=Math.min(Math.max(this.b+t.b,0),255),e.a=Math.min(Math.max(this.a+t.a,0),1)}toHexString(){return FS([this.r,this.g,this.b,this.a])}}function DS(r){const t=r.substring(1);return[parseInt(t.substring(0,6),16),parseInt(t.substring(6,8),16)/255]}function Us(r){return(r=r.replace(/^#/,"")).substring(6,8).length===0&&(r+="FF"),[parseInt(r.substring(0,2).padStart(8,"0"),16)/255,parseInt(r.substring(2,4).padStart(8,"0"),16)/255,parseInt(r.substring(4,6).padStart(8,"0"),16)/255,parseInt(r.substring(6,8).padStart(8,"0"),16)/255]}function FS(r){return"#"+Math.round(255*r[0]).toString(16).padStart(2,"0")+Math.round(255*r[1]).toString(16).padStart(2,"0")+Math.round(255*r[2]).toString(16).padStart(2,"0")+Math.round(255*r[3]).toString(16).padStart(2,"0")}function Mp(r,t,e){const i=Us(r),n=Us(t),o=Math.round(255*(i[0]+(n[0]-i[0])*e)),s=Math.round(255*(i[1]+(n[1]-i[1])*e)),a=Math.round(255*(i[2]+(n[2]-i[2])*e)),l=Math.round(255*(i[3]+(n[3]-i[3])*e));return"#"+o.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+l.toString(16).padStart(2,"0")}class Ap extends Dr{constructor(){super(void 0,`
|
|
6167
|
+
*/wl.registerPlugin("accessibility",HR),wl.registerPlugin("extract",WC),wl.registerPlugin("interaction",XR),wl.registerPlugin("particle",MP),wl.registerPlugin("prepare",JP),wl.registerPlugin("batch",jC),wl.registerPlugin("tilingSprite",KP),Fs.registerPlugin(oI),Fs.registerPlugin(QC),Fs.registerPlugin(cP),Fs.registerPlugin(EP),Fs.registerPlugin(ZP),eg.registerPlugin(zR),eg.registerPlugin(JC);var cr,fg={AlphaFilter:sI,BlurFilter:uI,BlurFilterPass:T_,ColorMatrixFilter:E_,DisplacementFilter:hI,FXAAFilter:cI,NoiseFilter:dI};class vI extends P.a{constructor(){super(),this.prevTime=-1,this.times=0,this.valueTotal=0,this.destroyed=!1,this.value=0,this.calcFps()}calcFps(){requestAnimationFrame(t=>{const e=t-this.prevTime;this.valueTotal+=e,this.times+=1,this.times>20&&(this.value=Math.floor(1e3*this.times/this.valueTotal),this.valueTotal=0,this.times=0,this.destroyed||this.emit("update",this.value)),this.prevTime=t,this.destroyed||this.calcFps()})}destroy(){this.destroyed=!0}}(function(r){r.ResourceError="RESOURCE_ERROR",r.RuntimeError="RUNTIME_ERROR",r.RuntimeWarn="RUNTIME_WARN",r.CanvasCrash="CANVAS_CRASH"})(cr||(cr={}));class Tn extends Error{constructor(t,e){var i,n;super(e),i=this,n=new.target.prototype,Object.setPrototypeOf?Object.setPrototypeOf(i,n):i.__proto__&&(i.__proto__=n),this.errorType=t,this.errorMsg=e}static transform(t){return t instanceof Tn?t:new Tn(cr.RuntimeError,t.message)}}function mg(){return function(r,t,e){const i=e.value;e.value=function(...n){try{return i.apply(this,n)}catch(o){throw new Tn(cr.RuntimeWarn,o.message)}}}}var _I=v(6),PS=v.n(_I);function ho(r,t,e=5){return Math.abs(r-t)<=Math.pow(10,-e)}function El(r){return Math.floor(1e6*r)/1e6}class Ml{constructor(){this.point={x:0,y:0},this.slope=Math.PI/4}static fromPointSlope(t,e){const i=new Ml;return i.point=t,i.slope=e,i}resolveY(t){return Math.tan(this.slope)*(t-this.point.x)+this.point.y}distanceToLinearEquation(t){return ho(this.slope,t.slope)?this.distanceToPoint(t.point):-1}distanceToPoint(t){let e=0;if(Math.tan(this.slope)*(t.x-this.point.x)+this.point.y===t.y)return 0;e=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;const i=Ml.fromPointSlope(t,e),n=this.crossPoint(i);return n?Math.ceil(Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))):0}crossPoint(t){if(ho(t.slope,this.slope))return null;let e=0,i=0;const n=Math.tan(t.slope),o=Math.tan(this.slope),{x:s,y:a}=this.point,{x:l,y:u}=t.point;return ho(this.slope,Math.PI/2)?(e=this.point.x,i=n*(e-l)+u):ho(t.slope,Math.PI/2)?(e=t.point.x,i=o*(e-s)+a):ho(this.slope,Math.PI)||ho(this.slope,0)?(i=this.point.y,e=(i-u)/n+l):ho(t.slope,Math.PI)||ho(t.slope,0)?(i=t.point.y,e=(i-a)/o+s):(e=(n*l-u+a-o*s)/(n-o),i=o*(e-s)+a),{x:e,y:i}}}var yI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function Tp(){return Date.now().toString(32)+Math.random().toString(32).substring(2)}const La="__delay_resolve_result__";function Ac(r,t){return yI(this,void 0,void 0,function*(){const e=yield Promise.race([r(),(i=t,new Promise(n=>{setTimeout(()=>{n(La)},i)}))]);var i;return e===La?La:e})}var R_=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function IS(r,t){return R_(this,void 0,void 0,function*(){const e=yield Ac(()=>fetch(r),t);if(e===La)throw new Tn(cr.ResourceError,`"${r}" loaded timeout"`);if(!e.ok)throw new Tn(cr.ResourceError,`"${r}" loaded failed with status "${e.status}"`);return e})}class xI{constructor(t,e,i,n,o){this.timeout=15e3,this.useCache=!1,this.taskId="",this.delegate=null,this.useCache=e,this.localStorage=t,this.logger=i,this.timeout=n,this.delegate=o||null}attachTaskId(t){this.taskId=t}fetchJson(t){return R_(this,void 0,void 0,function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let i;if(this.delegate){this.logger.info("load resource by delegate. "+t,this.taskId||"");const n=yield Ac(()=>this.delegate.loadJson(t),this.timeout);if(n===La)throw new Tn(cr.ResourceError,`"${t}" loaded timeout"`);i=JSON.parse(n)}else this.logger.info("load resource from server. "+t,this.taskId||""),i=yield(yield IS(""+t,this.timeout)).json();return this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,i).catch(()=>{}),i}})}fetchPng(t){return R_(this,void 0,void 0,function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let i;if(this.delegate){if(this.logger.info("load resource by delegate. "+t,this.taskId||""),i=yield Ac(()=>this.delegate.loadImage(t),this.timeout),i===La)throw new Tn(cr.ResourceError,`"${t}" loaded timeout"`)}else this.logger.info("load resource from server. "+t,this.taskId||""),i=yield(yield IS(t,this.timeout)).blob();return e=yield function(n){return new Promise((o,s)=>{const a=new FileReader;a.onload=()=>{o(a.result)},a.onerror=()=>{s(new Tn(cr.ResourceError,"Failed parse blob data."))},a.readAsDataURL(n)})}(i),this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,e).catch(()=>{}),e}})}destroy(){}}var bI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class wI{constructor(t){this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=e=>{const i=e/(We.TARGET_FPMS||.06);if(!this.isPaused){this.timestamp+=i,this.callbackList=this.callbackList.filter(o=>o&&!o.applied);let{length:n}=this.callbackList;for(let o=0;o<n;o++){const s=this.callbackList[o];if(s&&!s.applied){if(!(s.triggerTime<=this.timestamp))break;s.running=!0,s.fn(),s.applied=!0,n=this.callbackList.length}}}},this.ticker=t,this.ticker.add(this.onTimeUpdate)}setTimeout(t,e){const i=Tp(),n=this.timestamp+Math.max(e||16,16);return this.callbackList.push({fn:t,triggerTime:n,id:i,applied:!1,running:!1}),this.callbackList.sort((o,s)=>o.triggerTime-s.triggerTime),i}clearTimeout(t){const e=this.callbackList.findIndex(i=>i.id===t);e>=0&&!this.callbackList[e].running&&this.callbackList.splice(e,1)}delay(t){return new Promise(e=>{this.setTimeout(e,t)})}waitUntil(t,e){return bI(this,void 0,void 0,function*(){const i=this.timestamp;for(;!t()&&this.timestamp-i<e;)yield this.delay(50)})}pause(){this.isPaused=!0}resume(){this.isPaused=!1}}var SI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function gg(r,t,e){return e?Math.floor(parseFloat(r)*t):Math.ceil(parseFloat(r)*t)}const vg={w:!0,h:!0,x:!1,y:!1};class TI{constructor(t){this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null),this.spriteSheets=[],this.loader=t}getTexture(t){return this.textures[t]||null}getFrameData(t){return this.frames[t]}getGifFrames(t){return this.gifs[t]?this.gifs[t].filter(e=>!!e):[]}loadSpriteSheetItem(t,e,i,n){return SI(this,void 0,void 0,function*(){const o=yield this.loader.fetchJson(`${t}/${e}/jsonOutput/${i}.json`),s=yield this.loader.fetchPng(`${t}/${e}/jsonOutput/${i}.png`),a=document.createElement("img");a.src=s,yield new Promise((y,w)=>{a.onload=()=>y(""),a.onerror=()=>w()});let l=n;const u=a.width||1,h=a.height||1;if(u>2048||h>2048){l*=2048/u;const y=l*h;y>2048&&(l*=h/y)}(function(y,w){y.meta&&y.meta.size&&["w","h"].forEach(A=>{y.meta.size[A]=gg(y.meta.size[A],w,vg[A])}),y.frames&&Object.keys(y.frames).forEach(A=>{y.frames[A].frame&&["x","y","w","h"].forEach(I=>{y.frames[A].frame[I]=gg(y.frames[A].frame[I],w,vg[I])}),y.frames[A].spriteSourceSize&&["x","y","w","h"].forEach(I=>{y.frames[A].spriteSourceSize[I]=gg(y.frames[A].spriteSourceSize[I],w,vg[I])}),y.frames[A].sourceSize&&["w","h"].forEach(I=>{y.frames[A].sourceSize[I]=gg(y.frames[A].sourceSize[I],w,vg[I])})})})(o,l);const d=document.createElement("canvas"),p=Math.ceil(a.width*l),m=Math.ceil(a.height*l);d.width=p,d.height=m,d.getContext("2d").drawImage(a,0,0,p,m);const g=new Ai(d,{resolution:1}),_=new Rw(g,o);yield new Promise(y=>{_.parse(()=>y(""))}),this.spriteSheets.push(_),Object.keys(_.textures).forEach(y=>{const w=y.match(/^(.+)_gif_(\d+)$/);if(w&&w[1]&&w[2]){const A=w[1];this.gifs[A]||(this.gifs[A]=[]);const I=parseInt(w[2],10);this.gifs[A][I]=_.textures[y]}else this.frames[y]=o.frames[y],this.textures[y]=_.textures[y]})})}destroy(){this.spriteSheets.forEach(t=>t.destroy(!0)),this.spriteSheets=[],this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null)}}var EI=v(2),Ep=v.n(EI);function LS(r,t,e){let i,n;const o=Math.round(r)%360;if(o%180==0)i=Math.cos(o*(Math.PI/180))*t,n=0;else if(o%90==0)i=0,n=Math.sin(o*(Math.PI/180))*e;else{const s=function(a){const l=a*Math.PI/180;return Math.tan(l)}(o);i=t*e/Math.sqrt(Math.pow(e,2)+Math.pow(t*s,2)),(o>90&&o<270||o<-90&&o>-270)&&(i=-i),n=s*i}return{x:i,y:n}}function MI(r,t,e,i,n,o){const s=r,a=t;let l,u,h,d,p;if(Math.round(i)===0)l=n,u=o,p=0;else if(Math.round(i)>=360)l=n,u=o,h=n+2*r*Math.abs(Math.cos(-e/180*Math.PI)),d=o+2*t*Math.sin(-e/180*Math.PI),p=1;else{const m=-e,g=-(e+i),{x:_,y}=LS(m,s,a),w=n-_,A=o+y,{x:I,y:F}=LS(g,s,a);l=I+w,u=A-F,p=i>=-360&&i<-180?1:i>=-180&&i<0||i>0&&i<180?0:1}return{radiusX:s,radiusY:a,xAxisRotation:0,largeArcFlag:p,sweepFlag:i>0?1:0,endX:l,endY:u,middleX:h,middleY:d}}class OS{constructor(){this.pool=[]}getObject(t){const e=this.pool.find(i=>!i.isUsed);if(e)return e.isUsed=!0,e.obj;{const i={obj:this.createObject(),isUsed:!0,group:t};return this.pool.push(i),i.obj}}collectObject(t){const e=this.pool.find(i=>i.obj===t);e&&(e.isUsed=!1,this.resetObject(e.obj))}collectObjectByGroup(t){this.pool.filter(e=>e.group===t).forEach(e=>this.collectObject(e.obj))}}const C_=new class extends OS{createObject(){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r}resetObject(r){r.removeAttribute("viewBox"),r.removeAttribute("width"),r.removeAttribute("height"),r.innerHTML=""}},P_=new class extends OS{createObject(){return document.createElement("img")}resetObject(r){r.removeAttribute("src")}};var AI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class RI{constructor(){this.imgElements=[],this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null)}render(t,e,i){return AI(this,void 0,void 0,function*(){const{items:n,width:o,height:s}=t,a=P_.getObject(i),l=new Ai(a,{width:o,height:s,resolution:1}),u=C_.getObject(i);this.imgElements.push(a),this.svgElements.push(u),u.setAttribute("viewBox",`0 0 ${o} ${s}`),u.setAttribute("width",""+o),u.setAttribute("height",""+s);const h={},d={};n.forEach(g=>{const{item:_,x:y,y:w}=g,A=y+2,I=w+2;_.pathsData.forEach(U=>{let B="";U.cmds.forEach(([G,ct])=>{B+=G+" ",B+=ct.map(it=>(Object(W.isNumber)(it)||(it.x=it.x+U.offset.x+A,it.y=it.y+U.offset.y+I),it)).reduce((it,tt)=>(Object(W.isNumber)(tt)?it+=tt+" ":it+=`${tt.x} ${tt.y} `,it),""),B+=" "}),U.pathElement.setAttribute("d",B),u.appendChild(U.pathElement)});const F=_.width-4-2*_.padding,N=_.height-4-2*_.padding;this.textures[_.hash]={texture:new Qe(l,new xi(A+2,I+2,F,N)),pivot:_.pivot},h[_.hash]={x:A+2,y:I+2,w:F,h:N,pivot:_.pivot},d[_.hash]=this.hashToIdMap[_.hash]});const p=(m='<?xml version="1.0" encoding="utf-8"?>'+u.outerHTML,"data:image/svg+xml,"+encodeURIComponent(m).replace(/'/g,"%27").replace(/"/g,"%22"));var m;a.src=p,yield new Promise((g,_)=>{a.onload=()=>g(""),a.onerror=()=>_()})})}getGraphicsData(t){const e=this.idToHashMap[t]||"";return this.textures[e]||null}addGraphics(t,e,i,n,o,s,a,l,u,h,d){var p,m;if(!a&&!u)return t;const g=Ep()(i+((m=(p=a==null?void 0:a.width)===null||p===void 0?void 0:p.toString())!==null&&m!==void 0?m:0)+u+h+d);if(this.hashToIdMap[g]||(this.hashToIdMap[g]=[]),this.hashToIdMap[g].push(t),this.idToHashMap[t]=g,this.graphics.findIndex(_=>_.hash===g)<0){const{graphicsWidth:_,graphicsHeight:y,pathsData:w,pivot:A,padding:I}=function(F,N,U,B,G,ct,it,tt,rt){var et;const pt=[],kt={x:Math.abs(G.x),y:Math.abs(G.y)};let Lt=0,_t=0,xt=0,jt=0,ee=0,le="none";const nt=(et=B==null?void 0:B.width)!==null&&et!==void 0?et:0;return it?(Lt=N,_t=U,ee=0):(le=rt||"#ff0000",ee=nt,xt=.5*nt,jt=.5*nt,Lt=N+nt,_t=U+nt,kt.x+=.5*nt,kt.y+=.5*nt),Lt+=Math.abs(G.x),_t+=Math.abs(G.y),xt+=Math.abs(G.x),jt+=Math.abs(G.y),Lt+=4,_t+=4,xt+=2,jt+=2,Lt=Math.ceil(Lt),_t=Math.ceil(_t),F.forEach(lt=>{const Xt=document.createElementNS("http://www.w3.org/2000/svg","path");lt.fill!=="none"&&it?Xt.setAttribute("fill",tt||"#ff0000"):Xt.setAttribute("fill","none"),lt.hasStroke&&!it&&(Xt.setAttribute("stroke-linecap",(B==null?void 0:B.cap)||"butt"),Xt.setAttribute("stroke-linejoin",(B==null?void 0:B.join)||"miter"),Xt.setAttribute("stroke-width",ee.toString()),Xt.setAttribute("stroke",le),B!=null&&B.dash&&Xt.setAttribute("stroke-dasharray",B.dash));const{scale:Ut}=lt,Bt=lt.path.trim().split(" ");let ue={x:0,y:0};const he={offset:{x:xt,y:jt},cmds:[],pathElement:Xt};for(let Vt=0;Vt<Bt.length;Vt+=2){const Q=Bt[Vt],gt=Bt[Vt+1];if(Q==="M"){let[Dt,Ft]=gt.split(",").map(St=>Number(St));ue={x:Dt,y:Ft},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,he.cmds.push(["M",[{x:Dt,y:Ft}]])}else if(Q==="A"){const[Dt,Ft,St,Yt]=gt.split(",").map(si=>Number(si)),Me=St/Math.PI*180,Re=Yt/Math.PI*180,Ae=MI(Dt,Ft,Me,Re,ue.x,ue.y);Math.round(Re)>=360?(ue={x:Ae.endX,y:Ae.endY},he.cmds.push(["A",[Ae.radiusX/9525*Ut.x,Ae.radiusY/9525*Ut.y,Ae.xAxisRotation,Ae.largeArcFlag,Ae.sweepFlag,{x:Ae.middleX/9525*Ut.x,y:Ae.middleY/9525*Ut.y}]]),he.cmds.push(["A",[Ae.radiusX/9525*Ut.x,Ae.radiusY/9525*Ut.y,Ae.xAxisRotation,Ae.largeArcFlag,Ae.sweepFlag,{x:Ae.endX/9525*Ut.x,y:Ae.endY/9525*Ut.y}]])):(ue={x:Ae.endX,y:Ae.endY},he.cmds.push(["A",[Ae.radiusX/9525*Ut.x,Ae.radiusY/9525*Ut.y,Ae.xAxisRotation,Ae.largeArcFlag,Ae.sweepFlag,{x:Ae.endX/9525*Ut.x,y:Ae.endY/9525*Ut.y}]]))}else if(Q==="L"){let[Dt,Ft]=gt.split(",").map(St=>Number(St));ue={x:Dt,y:Ft},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,he.cmds.push(["L",[{x:Dt,y:Ft}]])}else if(Q==="QB"){let[Dt,Ft,St,Yt]=gt.split(",").map(Me=>Number(Me));ue={x:St,y:Yt},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,St=St/9525*Ut.x,Yt=Yt/9525*Ut.y,he.cmds.push(["Q",[{x:Dt,y:Ft},{x:St,y:Yt}]])}else if(Q==="CB"){let[Dt,Ft,St,Yt,Me,Re]=gt.split(",").map(Ae=>Number(Ae));ue={x:Me,y:Re},Dt=Dt/9525*Ut.x,Ft=Ft/9525*Ut.y,St=St/9525*Ut.x,Yt=Yt/9525*Ut.y,Me=Me/9525*Ut.x,Re=Re/9525*Ut.y,he.cmds.push(["C",[{x:Dt,y:Ft},{x:St,y:Yt},{x:Me,y:Re}]])}else Q==="C"&&he.cmds.push(["Z",[]])}pt.push(he)}),{graphicsWidth:Lt,graphicsHeight:_t,pivot:kt,padding:2,pathsData:pt}}(e,o,s,a,n,0,u,h,d);this.graphics.push({hash:g,pathsData:w,pivot:A,width:_,height:y,padding:I})}return t}pack(){return this.graphics.forEach(t=>{t.width+=4,t.height+=4}),function t(e){const i=[],n=e.filter(h=>{const d=h.width<2048&&h.height<2048;return d||i.push(h),d}).sort((h,d)=>h.width*h.height-d.width*d.height);let o=n.length+1,s=2050,a=2050;const l=[];let u=null;for(;(s>2048||a>2048)&&n.length>0;)o-=1,u=PS()(n.slice(0,o)),s=u.width,a=u.height;return u&&l.push(u),i.forEach(h=>{const d=PS()([h]);l.push(d)}),o<n.length?l.concat(t(n.slice(o))):l}(this.graphics)}destroy(){Object.keys(this.textures).forEach(t=>{var e;(e=this.textures[t])===null||e===void 0||e.texture.destroy(!0)}),this.textures=Object.create(null),this.imgElements.forEach(t=>P_.collectObject(t)),this.svgElements.forEach(t=>C_.collectObject(t)),this.graphics=[]}}class CI{constructor(){this.runningTimeNodes={}}addRunningTimeNode(t,e,i){const n=`${e}_${t}`;if(this.runningTimeNodes[n])try{this.runningTimeNodes[n].dispose(!0)}catch{}this.runningTimeNodes[n]=i}removeRunningTimeNode(t,e){const i=`${e}_${t}`;delete this.runningTimeNodes[i]}}class PI{constructor(t){this.eventHub=t,this.targets=Object.create(null)}getTargets(){return Object.keys(this.targets).map(t=>this.targets[t])}addTarget(t,e){this.targets[t]=e}getTargetById(t){return this.targets[t]}getTarget(t,e,i={type:"el",index:0,id:""}){var n,o;let s=this.targets[t.id];return t.type!=="shape"?s:(t.type==="shape"&&t.txEl&&(s=(n=s==null?void 0:s.getTextElement(t.txEl.type,t.txEl.range))!==null&&n!==void 0?n:null),t.type==="shape"&&t.bg&&i.index===0&&(e=!1,s=(o=s==null?void 0:s.getBgElement())!==null&&o!==void 0?o:null,this.eventHub.emit("IterateTimeNodeEnd",i.id)),e&&s?s.getIterateEntry(i.type,i.index,i.id):(s||this.eventHub.emit("IterateTimeNodeEnd",i.id),s))}clearTargets(){this.targets=Object.create(null)}}class II{constructor(t){this.target=t}get color(){return this.target.strokeColorFilter.currentColor}set color(t){this.target.strokeColorFilter.color=t}get on(){return this.target.strokeActive?"true":"false"}set on(t){this.target.strokeActive=t==="true"}}class LI{constructor(t){this.applyCommand=(e,i)=>{this.target.applyCommand(e,i)},this.target=t,this.applyCommand=Object(W.debounce)(this.applyCommand,100,{maxWait:500})}}class NS{constructor(t){this.target=t}get color(){return this.target.fillColorFilter.currentColor}set color(t){this.target.fillActive&&(this.target.fillColorFilter.color=t)}get on(){return this.target.fillActive?"true":"false"}set on(t){this.target.fillActive=t==="true"}get designColor(){return this.target.fillColorFilter.designColor}}class OI{constructor(t,e){this.hardHidden=!1,this.target=t,e===!0&&(this.hardHidden=!0)}get opacity(){return this.target.alpha}set opacity(t){this.target.alpha=t}get rotation(){return this.target.rotation/Math.PI*180}set rotation(t){this.target.rotation=t/180*Math.PI}get visibility(){return this.target.visible?"visible":"hidden"}set visibility(t){this.visibility===t||this.hardHidden||(this.target.visible=t==="visible")}}class NI{constructor(t,e){this.actions=[],this.ctx=e,this.object=t,this.object.interactive=!0}reset(t){this.object.interactive=!1,this.object.removeAllListeners(),this.object=t,this.object.interactive=!0}addAction(t,e){this.actions.push([t,e]),e==="click"?(this.object.addListener("click",()=>this.handleAction(t)),this.object.cursor="pointer"):e==="hover"&&this.object.addListener("mouseover",()=>this.handleAction(t))}addProxy(t){this.proxy=t,this.hitArea=this.getOriginHitArea(),this.proxy.interactive=!0,this.actions.forEach(([e,i])=>{var n,o;i==="click"?(n=this.proxy)===null||n===void 0||n.addListener("click",s=>this.handleProxyAction(s,e)):i==="hover"&&((o=this.proxy)===null||o===void 0||o.addListener("mouseover",s=>this.handleProxyAction(s,e)))})}handleProxyAction(t,e){var i;const n=t.data.global,o=this.object.getGlobalPosition(),s=n.x-o.x+this.object.pivot.x,a=n.y-o.y+this.object.pivot.y;((i=this.hitArea)===null||i===void 0?void 0:i.contains(s,a))&&this.object.visible&&this.handleAction(e,!0)}getOriginHitArea(){return this.object.hitArea?this.object.hitArea:new q0(0,0,this.object.width,this.object.height)}handleAction(t,e=!1){this.proxy&&!e||(this.ctx.eventHub.emit(Ne.hyperlinkTrigger,t),this.execAction(t))}execAction(t){var e;if(this.ctx.eventHub.emit(Ne.userInput),t.action==="ppaction://hlinksldjump"){const i=((e=t==null?void 0:t.target)!==null&&e!==void 0?e:"").match(/slide(\d+)\.xml/);i&&i[1]&&this.ctx.eventHub.emit(Ne.requestGotoSlide,Number(i[1]))}else if(t.action==="ppaction://hlinkshowjump?jump=nextslide")this.ctx.eventHub.emit(Ne.requestNextSlide);else if(t.action==="ppaction://hlinkshowjump?jump=previousslide")this.ctx.eventHub.emit(Ne.requestPrevSlide);else if(t.action==="ppaction://hlinkshowjump?jump=firstslide")this.ctx.eventHub.emit(Ne.requestGotoSlide,1);else if(t.action==="ppaction://hlinkshowjump?jump=lastslide")this.ctx.eventHub.emit(Ne.requestGotoSlide,-1);else if(t.action==="ppaction://hlinkshowjump?jump=lastslideviewed"){const i=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(Ne.requestGotoSlide,i)}else t.action==="ppaction://hlinkshowjump?jump=endshow"&&this.ctx.eventHub.emit(Ne.requestGotoSlide,-1)}}class I_{constructor(t,e,i){var n,o,s,a,l,u;this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new xi(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new Yn,this.ctx=e,this.style=new OI(this.container,t.hardHidden),this.designGlobalPosition={x:i.x+((o=(n=t.position)===null||n===void 0?void 0:n.x)!==null&&o!==void 0?o:0),y:i.y+((a=(s=t.position)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)},this.container.interactive=!0,(t.hlinkClick||t.hlinkHover)&&(this.hyperlink=new NI(this.container,this.ctx),t.hlinkHover&&((l=this.hyperlink)===null||l===void 0||l.addAction(t.hlinkHover,"hover")),t.hlinkClick&&((u=this.hyperlink)===null||u===void 0||u.addAction(t.hlinkClick,"click"))),this.ctx.clock.waitUntil(()=>{try{return!!this.container.width}catch{return!1}},3e3).then(()=>{try{this.designWidth=this.designWidth||this.container.width}catch{}}),this.ctx.clock.waitUntil(()=>{try{return!!this.container.height}catch{return!1}},3e3).then(()=>{try{this.designHeight=this.designHeight||this.container.height}catch{}})}updateScale(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}updateTransform(t){var e,i,n,o,s,a,l,u;this.designWidth=t.width,this.designHeight=t.height,this.designX=(i=(e=t.position)===null||e===void 0?void 0:e.x)!==null&&i!==void 0?i:0,this.designY=(o=(n=t.position)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:0;const h=this.designWidth/2,d=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=h,this.container.pivot.y=d;const p=(a=(s=t.position)===null||s===void 0?void 0:s.x)!==null&&a!==void 0?a:0,m=(u=(l=t.position)===null||l===void 0?void 0:l.y)!==null&&u!==void 0?u:0;this.container.x=p+h,this.container.y=m+d,t.scale&&(this.designScale={x:t.scale.x,y:t.scale.y},this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y),t.rotation&&(this.container.rotation=t.rotation);const g=new ks;g.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(g),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=p,this.bound.y=m,this.bound.width=this.designWidth,this.bound.height=this.designHeight}get scale(){return this.scaleOrigin}set scale(t){this.scaleOrigin.x=t.x,this.scaleOrigin.y=t.y,this.updateScale()}get design_ppt_w(){return El(this.designWidth/this.ctx.stageWidth)}get design_ppt_h(){return El((this.designHeight||this.container.height)/this.ctx.stageHeight)}get design_ppt_x(){return El(this.designX/this.ctx.stageWidth)}get design_ppt_y(){return El(this.designY/this.ctx.stageHeight)}get ppt_w(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth}set ppt_w(t){this.designWidth&&(this.scaleExt.x=t*this.ctx.stageWidth/this.designWidth,this.updateScale())}get ppt_h(){const t=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*t/this.ctx.stageHeight}set ppt_h(t){this.designHeight&&(this.scaleExt.y=t*this.ctx.stageHeight/this.designHeight,this.updateScale())}get ppt_x(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth}set ppt_x(t){this.pptX=t;const e=this.presetSubType===544?this.scaleExt.x:1;this.container.position.x=t*this.ctx.stageWidth+this.container.pivot.x*e}get ppt_y(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight}set ppt_y(t){this.pptY=t;const e=this.presetSubType===544?this.scaleExt.y:1;this.container.position.y=t*this.ctx.stageHeight+this.container.pivot.y*e}get r(){return this.container.rotation}set r(t){this.container.rotation=t}set xshear(t){this.container.skew.x=t}get xshear(){return this.container.skew.x}set yshear(t){this.container.skew.y=t}get yshear(){return this.container.skew.y}}class _g{constructor(t){if(this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,t){this._isInit=!0;const e=t.match(/-?[0-9]+/g);e&&(this.h=parseInt(e[0],10),this.s=parseInt(e[1],10)/100,this.l=parseInt(e[2],10)/100)}}isInit(){return this._isInit}by(t,e){e.h=Math.max(Math.min(this.h+t.h,359),0),e.s=Math.max(Math.min(this.s+t.s,1),0),e.l=Math.max(Math.min(this.l+t.l,1),0),e.a=Math.max(Math.min(this.a+t.a,1),0)}fromHexString(t){const[e,i,n,o]=Us(t);let s=0,a=0,l=0;const u=Math.max(e,i,n),h=Math.min(e,i,n),d=u-h;l=(u+h)/2,d===0?s=0:u===e?s=(i-n)/d%6*60:u===i?s=60*((n-e)/d+2):u===n&&(s=60*((e-i)/d+4)),a=d===0?0:d/(1-Math.abs(2*l-1)),this.h=s,this.s=a,this.l=l,this.a=o}interpolationFrom(t,e,i){const n=t.h+(this.h-t.h)*e,o=t.s+(this.s-t.s)*e,s=t.l+(this.l-t.l)*e,a=t.a+(this.a-t.a)*e;i.h=Math.max(Math.min(n,359),0),i.s=Math.max(Math.min(o,1),0),i.l=Math.max(Math.min(s,1),0),i.a=Math.max(Math.min(a,1),0)}toHexString(){let t=[0,0,0,0];const{h:e,s:i,l:n}=this;if(e<360&&e>=0&&i<=1&&i>=0&&n<=1&&n>=0){let o,s,a;const l=(1-Math.abs(2*n-1))*i,u=l*(1-Math.abs(e/60%2-1)),h=n-l/2;[o,s,a]=e>=0&&e<60?[l,u,0]:e>=60&&e<120?[u,l,0]:e>=120&&e<180?[0,l,u]:e>=180&&e<240?[0,u,l]:e>=240&&e<300?[u,0,l]:[l,0,u],t=[o+h,s+h,a+h,this.a]}return FS(t)}}class yg{constructor(t){this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,t&&(this._isInit=!0,this.fromHexString(t))}fromHexString(t){const[e,i,n,o]=Us(t);this.r=e,this.g=i,this.b=n,this.a=o}isInit(){return this._isInit}interpolationFrom(t,e,i){i.r=t.r+(this.r-t.r)*e,i.g=t.g+(this.g-t.g)*e,i.b=t.b+(this.b-t.b)*e,i.a=t.a+(this.a-t.a)*e}by(t,e){e.r=Math.min(Math.max(this.r+t.r,0),255),e.g=Math.min(Math.max(this.g+t.g,0),255),e.b=Math.min(Math.max(this.b+t.b,0),255),e.a=Math.min(Math.max(this.a+t.a,0),1)}toHexString(){return FS([this.r,this.g,this.b,this.a])}}function DS(r){const t=r.substring(1);return[parseInt(t.substring(0,6),16),parseInt(t.substring(6,8),16)/255]}function Us(r){return(r=r.replace(/^#/,"")).substring(6,8).length===0&&(r+="FF"),[parseInt(r.substring(0,2).padStart(8,"0"),16)/255,parseInt(r.substring(2,4).padStart(8,"0"),16)/255,parseInt(r.substring(4,6).padStart(8,"0"),16)/255,parseInt(r.substring(6,8).padStart(8,"0"),16)/255]}function FS(r){return"#"+Math.round(255*r[0]).toString(16).padStart(2,"0")+Math.round(255*r[1]).toString(16).padStart(2,"0")+Math.round(255*r[2]).toString(16).padStart(2,"0")+Math.round(255*r[3]).toString(16).padStart(2,"0")}function Mp(r,t,e){const i=Us(r),n=Us(t),o=Math.round(255*(i[0]+(n[0]-i[0])*e)),s=Math.round(255*(i[1]+(n[1]-i[1])*e)),a=Math.round(255*(i[2]+(n[2]-i[2])*e)),l=Math.round(255*(i[3]+(n[3]-i[3])*e));return"#"+o.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+l.toString(16).padStart(2,"0")}class Ap extends Dr{constructor(){super(void 0,`
|
|
6168
6168
|
varying vec2 vTextureCoord;
|
|
6169
6169
|
|
|
6170
6170
|
uniform vec4 color;
|
|
@@ -6331,7 +6331,7 @@ void main(void){
|
|
|
6331
6331
|
vec4 texColor = texture2D(uSampler, vTextureCoord);
|
|
6332
6332
|
gl_FragColor = transform(texColor, arg1, arg2);
|
|
6333
6333
|
}
|
|
6334
|
-
`),{arg1:e,arg2:i})}}class co{constructor(t,e,i,n,o){this.ctx=t,this.fillStyle=e,this.width=i,this.height=n,this.config=o,this.clonedObjects=[],this._displayObject=null,this.gradientHash=Ep()(`${JSON.stringify(e)}${Math.ceil(i)}${Math.ceil(n)}`)}get displayObject(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject}set displayObject(t){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=t}get hasFill(){return!!this.fillStyle&&this.fillStyle.fillType!=="noFill"}createDisplayObject(){var t;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){const e=new hr;return e.texture=this.ctx.bgTexture,e}if(this.fillStyle.fillType==="solidFill"||this.fillStyle.fillType==="noFill")return null;if(this.fillStyle.fillType==="gradientFill"){const e=new hr;let i=co.gradientPool.get(this.gradientHash);if(!i){const n=zI(this.fillStyle,this.width,this.height),o=$r.create({width:this.width,height:this.height,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(n,{renderTexture:o}),i=o,co.gradientPool.set(this.gradientHash,i),n.destroy({children:!0,texture:!0})}return e.texture=i,e}if(this.fillStyle.fillType==="blipFill"){const{src:e,filters:i}=this.fillStyle,n=this.ctx.spriteTexture.getTexture(e),o=this.ctx.spriteTexture.getFrameData(e);if(n){const s=new hr;if(s.texture=n,i.length>0&&this.config.useFilter&&(s.filters=function(a){const l=[];return a.forEach(u=>{if(u.type==="biLevel")l.push(new XS("biLevel",u.args[0]));else if(u.type==="clrChange"||u.type==="changeBulletColor"){const h=Us(u.args[0]),d=Us(u.args[1]);l.push(new qI(u.type,h,d))}else u.type==="alphaModFix"?l.push(new XS(u.type,u.args[0])):u.type==="lum"&&l.push(new JI(u.type,u.args[0],u.args[1]))}),l}(i)),this.config.fillFloat){const{l:a,t:l,r:u,b:h}=this.config.fillFloat.fillRect,d=this.width*(1-a-u),p=this.height*(1-l-h),m=(t=this.config.shapeRotation)!==null&&t!==void 0?t:0,g=new ks;g.drawRect(0,0,d,p),g.pivot.x=d/2,g.pivot.y=p/2,g.rotation=m;const _=g.getBounds(),y=_.width,w=_.height;s.width=y,s.height=w,s.anchor.x=.5,s.anchor.y=.5,s.rotation=-1*m,s.name="math-texture",m===0?(s.position.x=y/2+a*this.width,s.position.y=w/2+l*this.width):(s.position.x=this.width/2,s.position.y=this.height/2)}else s.width=this.width,s.height=this.height,o.rotate&&(s.position.x=this.width/2,s.position.y=this.height/2,s.anchor.x=.5,s.anchor.y=.5,s.rotation=o.rotate/180*Math.PI);return s}}else if(this.fillStyle.fillType==="gifFill"){const{src:e,delays:i}=this.fillStyle,n=this.ctx.spriteTexture.getGifFrames(e).map((l,u)=>({texture:l,time:i[u]||20})),o=new A_(n,!0);o.width=this.width,o.height=this.height;const s=this.fillStyle.loop;let a=1;return o.onLoop=()=>{a+=1,s>0&&a>s&&o.gotoAndStop(o.totalFrames)},o}return null}isSolidFill(){var t;return((t=this.fillStyle)===null||t===void 0?void 0:t.fillType)==="solidFill"}getSolidFillColor(){var t;return((t=this.fillStyle)===null||t===void 0?void 0:t.fillType)==="solidFill"?this.fillStyle.color:"#000000"}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}destroy(){var t;(t=this._displayObject)===null||t===void 0||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(e=>{e==null||e.destroy()}),this.clonedObjects=[]}}co.gradientPool=new Map;var ZI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class KI extends L_{constructor(t,e,i){var n;super(t,e,i),this.textureContainer=new Yn,this.underline=null,this.cacheSprite=new hr;const{shapeId:o,paragraphIndex:s,lineIndex:a,unitIndex:l,lineHeight:u,width:h,underLine:d,fill:p,height:m,isHorz:g,lineWidth:_}=t,y=((n=p==null?void 0:p.fill)===null||n===void 0?void 0:n.fillType)==="solidFill"?p.fill.color:null;if(d){const w=g?u/16:_/16;this.underline=new FI(e,d.type,w,h,m,y,g,o,s,a,l)}this.textGraphics=this.createTextGraphics(),this.textFill=this.createTextFill(),this.strokeGraphics=this.createStrokeGraphics(),this.strokeFill=this.createStrokeFill()}createStrokeFill(){const{stroke:t,lineWidth:e,lineHeight:i}=this.json;return new co(this.ctx,t==null?void 0:t.fill,e,i,{useFilter:!1,useSlideBackgroundFill:!1})}createStrokeGraphics(){const{stroke:t}=this.json,e=t!=null&&t.key?{fillType:"blipFill",src:t.key,filters:[]}:void 0;return new co(this.ctx,e,(t==null?void 0:t.width)||0,(t==null?void 0:t.height)||0,{useFilter:!1,useSlideBackgroundFill:!1})}createTextFill(){const{isHorz:t,fill:e,lineWidth:i,lineHeight:n,fillLineHeight:o}=this.json;return t?new co(this.ctx,e==null?void 0:e.fill,i,Math.max(o,n),{useFilter:!1,useSlideBackgroundFill:!1}):new co(this.ctx,e==null?void 0:e.fill,o,n,{useFilter:!1,useSlideBackgroundFill:!1})}createTextGraphics(){var t;const{fill:e,content:i}=this.json;let n="#000000";((t=e==null?void 0:e.fill)===null||t===void 0?void 0:t.fillType)==="solidFill"&&(n=e.fill.color);const o=e!=null&&e.key?{fillType:"blipFill",src:e.key,filters:[{type:"changeBulletColor",args:["#000000",n]}]}:void 0;return new co(this.ctx,o,(e==null?void 0:e.width)||0,(e==null?void 0:e.height)||0,{useFilter:i==="\u25FE",useSlideBackgroundFill:!1})}getIterateEntry(){return null}getBgElement(){return null}updateTransform(t){var e,i,n,o;const{isHorz:s}=this.json;t.position={x:s&&(i=(e=t.position)===null||e===void 0?void 0:e.x)!==null&&i!==void 0?i:0,y:s?0:(o=(n=t.position)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:0},t.width=s?this.json.width:this.json.lineWidth,t.height=s?this.json.lineHeight:this.json.height,super.updateTransform(t)}preRender(){var t;(t=this.underline)===null||t===void 0||t.preRender()}render(t){t.addSubMTask(()=>ZI(this,void 0,void 0,function*(){this.doRender()}),"@TextUnitImpl[doRender]")}doRender(){let t=!1;const{lineWidth:e,lineHeight:i,baseLine:n,isHorz:o,underline:s,height:a,width:l,highlightColor:u,x:h,y:d,content:p,fillLineHeight:m,fill:g}=this.json;let _=this.json.needFill!==!1;if(g&&g.fill&&g.fill.fillType!=="solidFill"&&(_=!0),u){const y=new ks,[w,A]=DS(u);y.beginFill(w,A),y.drawRect(0,0,o?l:e,o?i:a),y.endFill(),this.textureContainer.addChild(y)}if(this.textGraphics.displayObject){const y=this.textGraphics.displayObject;if(o&&(y.position.y=d>0?d:0),_){const w=this.textFill.displayObject;if(w)w.mask=y,w.addChild(y),w.position.x=-h,y.position.x+=h,t=!0,this.textureContainer.addChild(w);else if(this.textFill.isSolidFill()){const A=new Ap;A.color=this.textFill.getSolidFillColor(),y.filters=[A],t=!0,this.textureContainer.addChild(y)}}else this.textureContainer.addChild(y)}if(this.strokeGraphics.displayObject){const y=this.strokeGraphics.displayObject;if(_){const w=this.strokeFill.displayObject;if(w)w.mask=y,w.addChild(y),o?w.position.y=d>0?d:0:w.position.x=h,this.textureContainer.addChild(w);else if(this.strokeFill.isSolidFill()){o?y.position.y=d>0?d:0:y.position.x=h;const A=new Ap;A.color=this.strokeFill.getSolidFillColor(),y.filters=[A],t=!0,this.textureContainer.addChild(y)}}else o?y.position.y=d>0?d:0:y.position.x=h,this.textureContainer.addChild(y)}if(this.underline&&(this.underline.render(),this.underline.sprite)){o?(this.underline.sprite.position.y=s?s-i/16:n,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);const y=this.textFill.getClonedDisplayObject();y?(y.mask=this.underline.sprite,y.addChild(this.underline.sprite),this.textureContainer.addChild(y)):this.textureContainer.addChild(this.underline.sprite)}if(t){const y=$r.create({width:o?l:e,height:o?Math.max(m,i):a,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:y}),this.cacheSprite.texture=y,o&&d<0&&(this.cacheSprite.position.y=d),this.container.addChild(this.cacheSprite)}else this.container.addChild(this.textureContainer);this.container.name=p}destroy(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}var qS=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class QI extends L_{constructor(){super(...arguments),this.units=[],this.isHorz=!0}getIterateElements(){return this.units}getIterateEntry(t,e,i){return this.units[e]?this.units[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}preRender(){}createUnits(t,e,i,n){for(let o=0,s=this.json.textUnits.length;o<s;o++)n.addSubMTask(()=>qS(this,void 0,void 0,function*(){const a=this.json.textUnits[o],{height:l,width:u,fillHeight:h,baseline:d,y:p,underline:m}=this.json,g=new KI(Object.assign(Object.assign({},a),{lineHeight:l,lineWidth:u,baseLine:d-p,underline:m,fillLineHeight:h||l,isHorz:this.isHorz,shapeId:t,paragraphIndex:e,lineIndex:i,unitIndex:o}),this.ctx,this.global);g.preRender(),this.units.push(g)}),"@TextLineImpl[createUnits]")}render(t){for(const e of this.units.reverse())e.render(t),t.addSubMTask(()=>qS(this,void 0,void 0,function*(){this.container.addChild(e.container)}),"@TextLineImpl[container.addChild]")}destroy(){this.units.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var YS=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class tL extends L_{constructor(){super(...arguments),this.iterateElements=[],this.lines=[],this.isHorz=!0}getIterateElements(){if(this.iterateElements.length>0)return this.iterateElements;const t=this.lines.reduce((e,i)=>e=e.concat(i.getIterateElements()),[]);return this.iterateElements=t,t}getIterateEntry(t,e,i){const n=this.getIterateElements();return n[e]?n[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}preRender(){}createLines(t,e,i){for(let n=0,o=this.json.lines.length;n<o;n++)i.addSubMTask(()=>YS(this,void 0,void 0,function*(){const s=this.json.lines[n],a=new QI(s,this.ctx,this.global);a.isHorz=this.isHorz,a.container.name="line-"+n,a.createUnits(t,e,n,i),this.lines.push(a)}),"@TextParagraphImpl[createLines]")}render(t){for(const e of this.lines)e.render(t),t.addSubMTask(()=>YS(this,void 0,void 0,function*(){this.container.addChild(e.container)}),"@TextParagraphImpl[container.addChild]")}destroy(){this.lines.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var wg=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class eL{constructor(t,e,i,n){this.iterateElements=[],this.paragraphs=[],this.container=new Yn,this.json=t,this.ctx=e,this.parentGlobalPos=n,this.iterateType=i,this.container.name="textBody",this.global={x:this.parentGlobalPos.x+t.position.x,y:this.parentGlobalPos.y+t.position.y},this.container.position.x=t.position.x,this.container.position.y=t.position.y,this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y;const o=new ks;o.drawRect(0,0,t.width,t.height),this.container.addChild(o)}get width(){return this.json.width}get height(){return this.json.height}get x(){return this.json.position.x}get y(){return this.json.position.y}getTextElement(t,e){return t==="paragraph"?this.paragraphs[e[0]]:null}getIterateEntry(t,e){return this.iterateElements[t]?this.iterateElements[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",e),null)}destroy(){this.paragraphs.forEach(t=>{t.destroy()})}createParagraphs(t,e){for(let i=0,n=this.json.paragraphs.length;i<n;i++)e.addSubMTask(()=>wg(this,void 0,void 0,function*(){var o;const s=this.json.paragraphs[i],a=new tL(s,this.ctx,this.global);a.isHorz=(o=this.json.isHorz)===null||o===void 0||o,a.createLines(t,i,e),e.addSubMTask(()=>wg(this,void 0,void 0,function*(){this.iterateElements=this.iterateElements.concat(a.getIterateElements()),a.container.name="\u6BB5\u843D-"+i,this.paragraphs.push(a)}),"@TextBodyImpl[paragraphs.push]")}),"@TextBodyImpl[createParagraphs]")}render(t){for(const e of this.paragraphs)e.render(t),t.addSubMTask(()=>wg(this,void 0,void 0,function*(){this.container.addChild(e.container)}),"@TextBodyImpl[container.addChild]");t.addSubMTask(()=>wg(this,void 0,void 0,function*(){const{width:e}=this.container;this.container.scale.x<0&&(this.container.x+=-1*e)}),"@TextBodyImpl[reset width]")}}var iL=v(47),nL=v.n(iL),rL=v(48),oL=v.n(rL);const sL={Reflection:class extends Dr{constructor(r){super(nL.a,oL.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uStartAlpha:r.startAlpha,uEndAlpha:r.endAlpha,uBlur:0}),this.json=r}}};class aL{constructor(t){this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=t.id,this.type=t.type,this.heightSize=t.heightSize,this.widthSize=t.widthSize,this.fillStyle=t.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=t.lineWidth||1,this.position=t.position||{x:0,y:0},this.rotate=t.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}setPivot(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"triangle":this.pivot={x:.7*this.width,y:this.height/2};break;case"arrow":case"stealth":default:this.pivot={x:this.width,y:this.height/2}}}generatePaths(){this.hash="arrow-"+Ep()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}getUnitPath(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}setScaleFromLineWidth(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}setScaleFromSize(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=.75;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=.75;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}class $S{constructor(t,e,i,n,o,s,a,l,u,h,d){this.id=t,this.ctx=e,this.paths=i,this.hash=n,this.nept=o,this.width=s,this.height=a,this.lineStyle=l,this.shouldFill=u,this.bgColor=h,this.lnColor=d,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(i),this.isRectangle&&u?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}get displayObject(){return this._displayObject}pointDis(t,e){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)}rectangleDetect(t){if(t.length!==1)return!1;const e=t[0].path.trim().split(" ");if(e.length!==10)return!1;const i=[],n=[];for(let l=0;l<e.length;l+=2){const u=e[l],h=e[l+1],[d,p]=h.split(",").map(m=>Number(m)/100);i.push(u),n.push({x:d,y:p})}if(i.join("")!=="MLLLC")return!1;for(let l=0;l<3;l++){const u=n[l],h=n[l+1];if(u.x!==h.x&&u.y!==h.y)return!1}const o=n.slice(0,4).reduce((l,u)=>l+u.x,0)/4,s=n.slice(0,4).reduce((l,u)=>l+u.y,0)/4;if(Number.isNaN(o)||Number.isNaN(s))return!1;const a={x:o,y:s};return ho(this.pointDis(a,n[0]),this.pointDis(a,n[1]))&&ho(this.pointDis(a,n[0]),this.pointDis(a,n[2]))&&ho(this.pointDis(a,n[0]),this.pointDis(a,n[3]))&&this.pointDis(a,n[0])===this.pointDis(a,n[1])}createDisplayObject(){if(this.isPureRect){const t=new ks;return t.beginFill(0,1),t.drawRect(0,0,this.width,this.height),t}if(this.isColoredPureRect&&this.bgColor){const t=new ks,[e,i]=DS(this.bgColor);return t.beginFill(e,i),t.drawRect(0,0,this.width,this.height),t}{const t=new hr,e=this.ctx.graphicsTexture.getGraphicsData(this.id);return e?(t.texture=e.texture,t.pivot.x=e.pivot.x,t.pivot.y=e.pivot.y,t):null}}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}render(){this._displayObject=this.createDisplayObject()}isNeedMask(t,e){let i=!1;return this._displayObject&&(i=!(this.isRectangle&&Math.abs(t-this._displayObject.width)<2&&Math.abs(e-this._displayObject.height)<2&&this.shouldFill)),i}addArrows(t){var e;(e=this._displayObject)===null||e===void 0||e.addChild(t)}destroy(){var t;(t=this._displayObject)===null||t===void 0||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(e=>{e==null||e.destroy()}),this.clonedObjects=[]}}var B_=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};const Gu={pivot:{x:0,y:0},width:0,height:0};class JS extends I_{constructor(t,e,i,n){var o;super(t,e,i),this.renderContainer=new Yn,this.needCacheAsBitMap=!1,this.backgroundGraphics=null,this.filterAreaJustifies=[],this.strokeGraphics=null,this.arrowList=[],this.fillColorFilter=new Ap,this.strokeColorFilter=new Ap,this.id="",this.fill=new NS(this),this.stroke=new II(this),this.updateFilterArea=()=>{const l=this.renderContainer.getBounds(!1),u=this.filterAreaJustifies.map(m=>m(l)),h=u.map(m=>m.width),d=u.map(m=>m.height),p=new xi(l.x,l.y,Math.max(...h),Math.max(...d));this.renderContainer.filterArea=p,(this.renderContainer.filters||[]).forEach(m=>{m.uniforms.uShapeFilterArea=new Float32Array(4),m.uniforms.uShapeFilterArea[0]=p.x,m.uniforms.uShapeFilterArea[1]=p.y,m.uniforms.uShapeFilterArea[2]=p.width,m.uniforms.uShapeFilterArea[3]=p.height})},this.json=t,this.json.fillStyle&&this.json.fillStyle.fillType==="groupFill"&&n&&(this.json.fillStyle=n),this.id=t.id;const{fillStyle:s,lineStyle:a}=this.json;this.container.name=t.id,this.renderContainer.name=t.id+"-render-container",this.generateArrowList(),this.backgroundFill=this.createBackgroundFill(),this.backgroundGraphics=this.createBackgroundGraphics(),this.strokeFill=this.createStrokeFill(),this.strokeGraphics=this.createStrokeGraphics(),this.ctx.timingTargets.addTarget(this.id,this),(s==null?void 0:s.fillType)==="solidFill"&&(this.fillColorFilter.currentColor=s.color,this.fillColorFilter.designColor=s.color),((o=a==null?void 0:a.fill)===null||o===void 0?void 0:o.fillType)==="solidFill"&&(this.strokeColorFilter.currentColor=a.fill.color,this.strokeColorFilter.designColor=a.fill.color),this.updateTransform(this.json),t.textBody&&(this.text=new eL(t.textBody,this.ctx,t.textBody.iterateType,{x:this.designGlobalPosition.x,y:this.designGlobalPosition.y})),this.container.hitArea=new q0(1,1,this.json.width,this.json.height)}get interactiveContainer(){return this.renderContainer}get strokeActive(){var t,e,i,n,o,s,a;return this.strokeFill.displayObject?((i=(e=(t=this.strokeFill.displayObject)===null||t===void 0?void 0:t.filters)===null||e===void 0?void 0:e.length)!==null&&i!==void 0?i:-1)>0:((a=(s=(o=(n=this.strokeGraphics)===null||n===void 0?void 0:n.displayObject)===null||o===void 0?void 0:o.filters)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:-1)>0}set strokeActive(t){var e,i,n,o,s,a;const{displayObject:l}=this.strokeFill;t?l&&((i=(e=l.filters)===null||e===void 0?void 0:e.indexOf(this.strokeColorFilter))!==null&&i!==void 0?i:-1)<0?l.filters=[this.strokeColorFilter]:((n=this.strokeGraphics)===null||n===void 0?void 0:n.displayObject)&&((s=(o=this.strokeGraphics.displayObject.filters)===null||o===void 0?void 0:o.indexOf(this.strokeColorFilter))!==null&&s!==void 0?s:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):l?l.filters=[]:!((a=this.strokeGraphics)===null||a===void 0)&&a.displayObject&&(this.strokeGraphics.displayObject.filters=[])}get fillActive(){var t,e,i,n,o,s,a;return this.backgroundFill.displayObject?((i=(e=(t=this.backgroundFill.displayObject)===null||t===void 0?void 0:t.filters)===null||e===void 0?void 0:e.length)!==null&&i!==void 0?i:-1)>0:((a=(s=(o=(n=this.backgroundGraphics)===null||n===void 0?void 0:n.displayObject)===null||o===void 0?void 0:o.filters)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:-1)>0}set fillActive(t){var e,i,n,o,s,a;t?this.backgroundFill.displayObject&&((i=(e=this.backgroundFill.displayObject.filters)===null||e===void 0?void 0:e.indexOf(this.fillColorFilter))!==null&&i!==void 0?i:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:((n=this.backgroundGraphics)===null||n===void 0?void 0:n.displayObject)&&((s=(o=this.backgroundGraphics.displayObject.filters)===null||o===void 0?void 0:o.indexOf(this.fillColorFilter))!==null&&s!==void 0?s:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:!((a=this.backgroundGraphics)===null||a===void 0)&&a.displayObject&&(this.backgroundGraphics.displayObject.filters=[])}getTextElement(t,e){var i,n;return(n=(i=this.text)===null||i===void 0?void 0:i.getTextElement(t,e))!==null&&n!==void 0?n:null}getBgElement(){return this}getIterateEntry(t,e,i){return e===0?this:t==="el"?(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null):this.text?this.text.getIterateEntry(e-1,i)||null:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}createStrokeGraphics(){var t,e,i,n;const{id:o,geometry:s,lineStyle:a}=this.json,{width:l,height:u,pivot:h}=(s==null?void 0:s.lineTransform)||Gu,d=l||this.json.width,p=u||this.json.height,m=((t=a==null?void 0:a.fill)===null||t===void 0?void 0:t.fillType)==="solidFill"?a.fill.color:null;return a&&((e=a.fill)===null||e===void 0?void 0:e.fillType)!=="noFill"?new $S(o+"-path-graphics",this.ctx,(i=s==null?void 0:s.paths)!==null&&i!==void 0?i:[],(n=s==null?void 0:s.hash)!==null&&n!==void 0?n:"",h||{x:0,y:0},d,p,a,!1,null,m):null}createStrokeFill(){const[t,e]=this.calculateFillObjectOffset(),{geometry:i,lineStyle:n,width:o,height:s}=this.json,a=(i==null?void 0:i.lineTransform)||Gu,l=Object(V.isNumber)(n==null?void 0:n.width)?n.width:1;return new co(this.ctx,n==null?void 0:n.fill,(a.width||o)+l+t,Math.max((a.height||s)+l,e),{useFilter:!1,useSlideBackgroundFill:!1})}createBackgroundGraphics(){var t;const{geometry:e,lineStyle:i,fillStyle:n,id:o}=this.json,{width:s,height:a,pivot:l}=(e==null?void 0:e.lineTransform)||Gu,u=s||this.json.width,h=a||this.json.height,d=(n==null?void 0:n.fillType)==="solidFill"?n.color:null;return n&&n.fillType!=="noFill"||this.json.isPicture?new $S(o+"-bg-graphics",this.ctx,(t=e==null?void 0:e.paths)!==null&&t!==void 0?t:[],(e==null?void 0:e.hash)||"",l||{x:0,y:0},u,h,i,!0,d,null):null}createBackgroundFill(){var t,e;const{fillStyle:i,width:n,height:o,lineStyle:s,geometry:a}=this.json,l=(a==null?void 0:a.fillTransform)||Gu;return new co(this.ctx,i,(l.width||n)+((t=s==null?void 0:s.width)!==null&&t!==void 0?t:0),(l.height||o)+((e=s==null?void 0:s.width)!==null&&e!==void 0?e:0),{useFilter:!1,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation})}createBackground(){var t,e,i,n,o,s,a,l;const{pivot:u,width:h,height:d}=((t=this.json.geometry)===null||t===void 0?void 0:t.fillTransform)||Gu,{displayObject:p}=this.backgroundFill;p?(this.json.useBgFill&&((i=this.backgroundGraphics)===null||i===void 0?void 0:i.displayObject)?(this.needCacheAsBitMap=!0,p.mask=this.backgroundGraphics.displayObject,p.pivot.x=((n=this.json.position)===null||n===void 0?void 0:n.x)||0,p.pivot.y=((o=this.json.position)===null||o===void 0?void 0:o.y)||0,this.container.addChild(this.backgroundGraphics.displayObject)):((s=this.json.fillStyle)===null||s===void 0?void 0:s.fillType)==="gifFill"?(p.height=d||this.designHeight,p.width=h||this.designWidth,p instanceof A_&&p.play(),!((a=this.backgroundGraphics)===null||a===void 0)&&a.isNeedMask(p.width,p.height)&&(p.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))):!((l=this.backgroundGraphics)===null||l===void 0)&&l.isNeedMask(p.width,p.height)&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,p.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(p.x=u.x,p.y=u.y),this.container.addChild(p)):this.backgroundFill.hasFill&&((e=this.backgroundGraphics)===null||e===void 0?void 0:e.displayObject)&&this.container.addChild(this.backgroundGraphics.displayObject)}createPathFill(){var t,e,i;const{displayObject:n}=this.strokeFill,o=(t=this.strokeGraphics)===null||t===void 0?void 0:t.displayObject,[s,a]=this.calculateFillObjectOffset();n?(((e=this.strokeGraphics)===null||e===void 0?void 0:e.isNeedMask(n.width,n.height))&&o&&(this.needCacheAsBitMap=!0,n.pivot.x=o.pivot.x,n.pivot.y=o.pivot.y,o.pivot.x=0,o.pivot.y=0,n.mask=o,n.addChild(o),n.position.x=-s/2,n.position.y=-a/2,o.position.x=s/2,o.position.y=a/2),this.container.addChild(n)):this.strokeFill.hasFill&&((i=this.strokeGraphics)===null||i===void 0?void 0:i.displayObject)&&this.container.addChild(this.strokeGraphics.displayObject)}createFilledPathMask(){var t,e,i;const n=((e=(t=this.json.geometry)===null||t===void 0?void 0:t.paths)===null||e===void 0?void 0:e.filter(o=>o.fill!=="none"&&o.fill!=="norm"))||[];for(const o of n){const s=this.ctx.graphicsTexture.getGraphicsData(o.id);if(s){const a=new hr(s.texture);a.pivot.x=s.pivot.x,a.pivot.y=s.pivot.y;const l=this.backgroundFill.getClonedDisplayObject(),u=(i=this.backgroundGraphics)===null||i===void 0?void 0:i.getClonedDisplayObject(),h=l||u;h&&(this.backgroundFill.displayObject&&(h.pivot.x=this.backgroundFill.displayObject.pivot.x,h.pivot.y=this.backgroundFill.displayObject.pivot.y),h.mask=a,h.filters=[DI[o.fill]],this.needCacheAsBitMap=!0,this.container.addChild(h),this.container.addChild(a))}}}createArrow(){this.arrowList.length&&this.arrowList.forEach(t=>{var e;const i=this.ctx.graphicsTexture.getGraphicsData(t.graphicsId);if(i){const{texture:n}=i,o=new hr(n);o.pivot.x=t.pivot.x,o.pivot.y=t.pivot.y,o.position.x=t.position.x,o.position.y=t.position.y,o.rotation=t.rotate/180*Math.PI,(e=this.backgroundGraphics)===null||e===void 0||e.addArrows(o)}})}generateArrowList(){var t,e;const{lineArrowList:i,lineStyle:n,id:o}=this.json,s=((t=n==null?void 0:n.fill)===null||t===void 0?void 0:t.fillType)==="solidFill"?n.fill.color:null;(e=i||[])===null||e===void 0||e.forEach((a,l)=>{var u,h;const d=new aL(Object.assign(Object.assign({},a),{fillStyle:n==null?void 0:n.fill,lineWidth:(u=n==null?void 0:n.width)!==null&&u!==void 0?u:0}));d.graphicsId=`${o}-arrow-${l}-graphics`,d.textureId=`${o}-arrow-${l}-fill`,this.ctx.graphicsTexture.addGraphics(d.graphicsId,(h=d.paths)!==null&&h!==void 0?h:[],d.hash,{x:0,y:0},d.width,d.height,void 0,this.ctx.objectPoolGroup,!0,s,null),this.arrowList.push(d)})}calculateFillObjectOffset(){let[t,e]=[0,0];return this.arrowList.length&&(t=this.arrowList.reduce((i,n)=>Math.max(i,n.width),0),e=this.arrowList.reduce((i,n)=>Math.max(i,n.height),0)),[t,e]}preRender(t){var e,i,n;const{lineStyle:o,geometry:s}=this.json,{width:a,height:l}=(s==null?void 0:s.lineTransform)||Gu,u=a||this.json.width,h=l||this.json.height,d=((e=s==null?void 0:s.paths)===null||e===void 0?void 0:e.filter(m=>m.fill!=="none"&&m.fill!=="norm"))||[],p=((i=o==null?void 0:o.fill)===null||i===void 0?void 0:i.fillType)==="solidFill"?o.fill.color:null;t.addSubMTask(()=>B_(this,void 0,void 0,function*(){for(const m of d)this.ctx.graphicsTexture.addGraphics(m.id,[m],m.hash,((s==null?void 0:s.lineTransform)||Gu).pivot,u,h,o,this.ctx.objectPoolGroup,!0,null,p)}),"@ShapeImpl[addGraphics]"),(n=this.text)===null||n===void 0||n.createParagraphs(this.json.id,t)}subClassRender(){}setupEffect(){const{effectList:t}=this.json;if(t&&t.length>0){const e=[];return t.forEach(i=>{i.type==="reflection"&&(this.filterAreaJustifies.push(n=>(n.height*=2,n)),e.push(new sL.Reflection(i)))}),this.ctx.ticker.add(this.updateFilterArea,void 0,-20),this.renderContainer.filters=e,!0}return!1}render(t){t.addSubMTask(()=>B_(this,void 0,void 0,function*(){var e,i;(e=this.strokeGraphics)===null||e===void 0||e.render(),(i=this.backgroundGraphics)===null||i===void 0||i.render(),this.createBackground(),this.subClassRender(),this.createFilledPathMask(),this.createPathFill(),this.createArrow()}),"@ShapeImpl[render]"),this.text&&this.text.render(t),t.addSubMTask(()=>B_(this,void 0,void 0,function*(){var e,i,n,o,s,a,l,u;if(((e=this.json.textBody)===null||e===void 0?void 0:e.iterateType)==="wd"||((i=this.json.textBody)===null||i===void 0?void 0:i.iterateType)==="lt")this.renderContainer.addChild(this.container),this.text&&(this.text.container.scale.y=(o=(n=this.json.scale)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:1,this.text.container.position.x+=((a=(s=this.json.position)===null||s===void 0?void 0:s.x)!==null&&a!==void 0?a:0)+this.text.x,this.text.container.position.y+=((u=(l=this.json.position)===null||l===void 0?void 0:l.y)!==null&&u!==void 0?u:0)+this.text.y,this.text.container.scale.y===-1&&(this.text.container.position.y+=this.text.height),this.renderContainer.addChild(this.text.container));else{if(this.text){if(Object(V.isBoolean)(this.json.textRotateWithShape)&&!this.json.textRotateWithShape){const h=this.json.rotation||0;this.text.container.rotation=-h;const{width:d}=this.text;this.text.container.position.x=d}this.container.addChild(this.text.container)}this.renderContainer.addChild(this.container)}if(this.needCacheAsBitMap,this.json.id==="background"&&this.ctx.hasBackgroundFillShape){const h=$r.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)});this.ctx.renderer.render(this.renderContainer,{renderTexture:h}),this.ctx.bgTexture=h}}),"@ShapeImpl[post.render]")}clearOnSlideChange(){}initOnReuse(){}isStatic(){return!!this.json.cacheAsBitMap&&!this.ctx.animatedIds.has(this.json.id)}destroy(){var t,e,i,n;(t=this.text)===null||t===void 0||t.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),(e=this.backgroundGraphics)===null||e===void 0||e.destroy(),this.strokeFill.destroy(),(i=this.strokeGraphics)===null||i===void 0||i.destroy(),this.renderContainer.destroy(),(n=this.arrowRenderTexture)===null||n===void 0||n.destroy(!0),this.arrowList=[]}}var k_=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function Oa(r,t){for(const e in t)r.style[e]=t[e]}class Pp{constructor(t){var e,i;this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.medianIsEnd=!1,this.pickBookmarkIndex=0,this.playCallBackList=[],this.duration=0,this.start=0,this.end=0,this.changeMediaProgress=n=>{if(this.ctx.isPlayerPaused())return void this.ctx.logger.info("Media controller prevent seek event with paused state",this.ctx.taskId);n.stopPropagation();const o=n.offsetX/this.progress.clientWidth*this.duration;this.medianIsEnd=!1,this.ctx.mode!=="interactive"&&this.jumpToTime(o),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(Ne.mediaSeek,{id:this.targetId,time:o,isPlaying:this.media.isPlaying})},this.jumpToTime=(n=0)=>{const o=Math.floor(n)+this.start;this.media.currentTime!==o&&(this.media.currentTime=o,this.changeBookmarkIndex(o,o>this.media.currentTime))},this.showController=n=>{n.stopPropagation(),this.show()},this.getMediaDuration=()=>{this.duration&&!Number.isNaN(this.duration)||(this.duration=this.media.duration,this.start&&(this.duration-=this.start,this.jumpToTime()),this.end&&(this.duration-=this.end)),this.totalTime.innerText=Pp.formatTime(this.duration)},this.playMedia=()=>k_(this,void 0,void 0,function*(){this.playButton.style.display="none",this.pauseButton.style.display="block",yield this.media.play(),this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach(n=>{n()})}),this.pauseMedia=()=>k_(this,void 0,void 0,function*(){this.playButton.style.display="block",this.pauseButton.style.display="none",yield this.media.pause()}),this.onMouseOut=n=>{n.stopPropagation(),this.mediaController.style.display="none"},this.mediaTimeUpdate=()=>k_(this,void 0,void 0,function*(){const n=this.media.currentTime-this.start;if(this.duration>0&&(n>this.duration||this.media.ended)&&(yield this.pauseMedia(),this.medianIsEnd=!0),this.currentTime.innerText=Pp.formatTime(n),this.currentProgress.style.flex=(n/this.duration).toString(),!this.bookmarkList||this.bookmarkList.length===0)return;const o=this.bookmarkList[this.pickBookmarkIndex];o&&o.time.toFixed(0)===this.media.currentTime.toFixed(0)&&(this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${o.name}`),this.pickBookmarkIndex+=1)}),this.onPauseMedia=()=>{this.playButton.style.display="block",this.pauseButton.style.display="none"},this.onPlayMedia=()=>{this.playButton.style.display="none",this.pauseButton.style.display="block",this.playCallBackList.forEach(n=>{n()})},this.playMediaFromCtrl=()=>{this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent play event with paused state",this.ctx.taskId):(this.ctx.mode!=="interactive"&&this.playMedia(),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(Ne.mediaPlay,{id:this.targetId,time:this.media.currentTime-this.start}))},this.pauseMediaFromCtrl=()=>{this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent pause event with paused state",this.ctx.taskId):(this.ctx.mode!=="interactive"&&this.pauseMedia(),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(Ne.mediaPause,{id:this.targetId,time:this.media.currentTime-this.start}))},this.targetId=t.targetId,this.ctx=t.ctx,this.height=t.height,this.width=t.width,this.target=t.target,this.media=t.media,this.info=t.info,this.shapeId=t.shapeId,this.canvasElement=t.canvasElement,this.getMedianContainer(),this.createMediaController(),this.info.cut&&(this.start=(e=this.info.cut.start)!==null&&e!==void 0?e:0,this.end=(i=this.info.cut.end)!==null&&i!==void 0?i:0),this.info.bookmarkList&&(this.bookmarkList=this.info.bookmarkList.sort((n,o)=>n.time-o.time))}getMedianContainer(){var t;let e=(t=this.canvasElement.parentElement)===null||t===void 0?void 0:t.querySelector(".median-container");e||(e=document.createElement("div"),e.className="median-container",this.canvasElement.parentElement.appendChild(e)),this.container=e}static formatTime(t){let e="00:00";if(t){const i=Math.floor(t/60),n=String(i<0?0:i).padStart(2,"0"),o=Math.floor(t%60);e=`${n}:${String(o<0?0:o).padStart(2,"0")}`}return e}createButton(){const t={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px"};Oa(this.playButton,Object.assign(Object.assign({},t),{display:"block"}));const e=document.createElement("img");Oa(e,{height:"20px"}),e.src="https://convertcdn.netless.link/publicFiles/icon/play.png",this.playButton.appendChild(e),Oa(this.pauseButton,Object.assign(Object.assign({},t),{display:"none"}));const i=document.createElement("img");Oa(i,{height:"20px"}),i.src="https://convertcdn.netless.link/publicFiles/icon/pause.png",this.pauseButton.appendChild(i)}createTimer(){const t=document.createElement("div");Oa(t,{width:"100px"}),this.currentTime.innerText="00:00";const e=document.createElement("span");return e.innerText="/",t.append(this.currentTime,e,this.totalTime),t}createProgress(){Oa(this.progress,{flex:"1",position:"relative",marginRight:"10px"});const t=document.createElement("div");Oa(t,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(t),Oa(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),t.appendChild(this.currentProgress)}changeBookmarkIndex(t,e){if(this.bookmarkList&&this.bookmarkList.length!==0){if(this.pickBookmarkIndex>0){for(let i=0;i<this.pickBookmarkIndex;i++)if(this.bookmarkList[i].time>t){this.pickBookmarkIndex=i;break}}if(e){let i=this.pickBookmarkIndex-1;for(let n=0;n<this.bookmarkList.length;n++)this.bookmarkList[n].time<t&&(i=n);for(let n=this.pickBookmarkIndex;n<=i;n++){const o=this.bookmarkList[n];o&&this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${o.name}`)}this.pickBookmarkIndex=i+1}}}bindEvent(){this.mediaController.addEventListener("mouseover",this.showController,!1),this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.progress.addEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this.pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1)}setControllerPosition(){var t;const{target:e}=this,{stageWidth:i,stageHeight:n}=this.ctx,o=e.getGlobalPosition(),s=Number((t=this.container)===null||t===void 0?void 0:t.getAttribute("data-scale")),a=i*s,l=1/s*(300>a?a/300:1);o.y=o.y+this.height-50,o.x=Math.max(o.x,0),o.x=Math.min(o.x,i-300*l),o.y=Math.max(o.y,0),o.y=Math.min(o.y,n-50),Oa(this.mediaController,{height:"50px",borderRadius:"25px",width:"300px",flexDirection:"row",alignItems:"center",position:"absolute",left:o.x+"px",top:o.y+"px",display:"none",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:`scale(${l})`,transformOrigin:"0 100%"})}createMediaController(){this.setControllerPosition(),this.createButton();const t=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,t,this.progress),this.container.appendChild(this.mediaController),this.bindEvent()}addPlayCallBack(t){this.playCallBackList.push(t)}unbindEvent(){this.mediaController.removeEventListener("mouseover",this.showController,!1),this.mediaController.removeEventListener("mouseout",this.onMouseOut,!1),this.progress.removeEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.removeEventListener("click",this.pauseMediaFromCtrl,!1),this.media.removeAllListeners()}show(){this.setControllerPosition(),this.mediaController.style.display="flex"}hide(){this.mediaController.style.display="none"}destroy(){var t;this.unbindEvent(),this.playCallBackList=[],(t=this.container)===null||t===void 0||t.removeChild(this.mediaController)}}var lL=v(49);class U_ extends P.a{constructor(t,e){super(),this.isGlobalPause=!1,this.lastTime=-1,this.howl=null,this.rctClient=null,this.url=t,this.runningAudio=e,Gn.RtcAudioClazz?(this.rctClient=new Gn.RtcAudioClazz(t),this.rctClient.on("load",()=>this.emit("load")),this.rctClient.on("pause",()=>this.emit("pause")),this.rctClient.on("play",()=>this.emit("play"))):(this.howl=new lL.Howl({src:[t]}),this.howl.on("load",()=>this.emit("load")),this.howl.on("pause",()=>this.emit("pause")),this.howl.on("play",()=>this.emit("play")))}startTimeChangeEmit(){this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate")),this.isEnded||setTimeout(()=>this.startTimeChangeEmit(),300)}play(){var t,e,i;this.runningAudio.has(this.url)&&((t=this.runningAudio.get(this.url))===null||t===void 0||t.stop(),this.runningAudio.delete(this.url)),this.lastTime=-1,(e=this.howl)===null||e===void 0||e.play(),(i=this.rctClient)===null||i===void 0||i.play(),this.startTimeChangeEmit(),this.runningAudio.set(this.url,this)}pause(){var t,e;(t=this.howl)===null||t===void 0||t.pause(),(e=this.rctClient)===null||e===void 0||e.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}globalPause(){this.isPaused||(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}stop(){var t;(t=this.howl)===null||t===void 0||t.stop(),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}destroy(){var t,e,i,n,o,s,a;(t=this.howl)===null||t===void 0||t.pause(),(e=this.howl)===null||e===void 0||e.unload(),(i=this.rctClient)===null||i===void 0||i.pause(),(n=this.rctClient)===null||n===void 0||n.destroy(),(o=this.rctClient)===null||o===void 0||o.removeAllListeners("load"),(s=this.rctClient)===null||s===void 0||s.removeAllListeners("play"),(a=this.rctClient)===null||a===void 0||a.removeAllListeners("pause"),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}get currentTime(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek():-1}set currentTime(t){this.rctClient?this.rctClient.currentTime=t:this.howl&&this.howl.seek(t)}get duration(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration():0}get isEnded(){return Math.abs(this.currentTime-this.duration)<.001}get isPaused(){return this.rctClient?this.rctClient.isPaused:!!this.howl&&this.howl.playing()}volume(t){this.rctClient?this.rctClient.volume(t):this.howl&&this.howl.volume(t)}}var uL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class hL extends P.a{constructor(t){var e,i;super(),this.type="video",this.sprite=new hr,this.isPlaying=!1,this.isGlobalPause=!1,this.updateVolume=d=>{Gn.RtcAudioClazz?this.rtcAudio.volume(d):this.videoResource.source&&(this.videoResource.source.volume=d)},this.id=t.id,this.start=(e=t.video.cut)===null||e===void 0?void 0:e.start,this.end=(i=t.video.cut)===null||i===void 0?void 0:i.end,this.container=t.container,this.ctx=t.ctx,this.ctx.medias[this.id]=this;let n=t.video.src;this.ctx.loaderDelegate&&(n=this.ctx.loaderDelegate.redirectMedia(n),this.ctx.logger.info(`redirect media url from ${t.video.src} to ${n} by delegate.`,t.ctx.taskId)),this.videoResource=new R1(n,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0});let o=t.video.src.replace(/4$/,"3");this.ctx.loaderDelegate&&(o=this.ctx.loaderDelegate.redirectMedia(o),this.ctx.logger.info(`redirect media url from ${t.video.src.replace(/4$/,"3")} to ${o} by delegate.`,t.ctx.taskId)),this.rtcAudio=new U_(o,t.ctx.runningAudio);const{video:s,width:a,height:l,target:u}=t;this.controller=new Pp({targetId:t.id,shapeId:t.shapeId,ctx:t.ctx,width:a,height:l,target:u,media:this,info:s,canvasElement:t.canvasElement}),this.controller.addPlayCallBack(()=>{this.sprite.width=a,this.sprite.height=l,this.ctx.clock.setTimeout(()=>{this.sprite.visible=!0},50)});const h=new Ai(null,{height:l,width:a});h.resource=this.videoResource,this.videoResource.bind(h),this.sprite=new hr,this.sprite.visible=!1,this.sprite.texture=new Qe(h),this.sprite.interactive=!0,this.container.addChild(this.sprite),this.sprite.on("mouseover",d=>{d.stopPropagation(),this.controller.show()}),this.sprite.on("mouseout",d=>{d.stopPropagation(),this.controller.hide()}),["durationchange","timeupdate","pause","play"].forEach(d=>{this.videoResource.source.addEventListener(d,()=>{d!=="timeupdate"||this.isPlaying||this.pause(),this.emit(d)})}),this.ctx.activeMedia.add(this),this.ctx.volumeAdjuster.on("update",this.updateVolume)}get currentTime(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.currentTime)!==null&&e!==void 0?e:0}set currentTime(t){Gn.RtcAudioClazz&&(this.rtcAudio.currentTime=t),this.videoResource.source&&(this.videoResource.source.currentTime=t)}get paused(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.paused)===null||e===void 0||e}get ended(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.ended)===null||e===void 0||e}get duration(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.duration)!==null&&e!==void 0?e:0}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){var t;return uL(this,void 0,void 0,function*(){this.isPlaying=!0,this.updateVolume(this.ctx.volumeAdjuster.volume),yield this.load(),yield this.ctx.clock.waitUntil(()=>{const i=this.videoResource.source;return!!(i&&i.videoWidth>0)},3e3);const e=this.videoResource.source;e&&e.videoWidth<=0||(Gn.RtcAudioClazz?(this.videoResource.source.volume=0,this.rtcAudio.once("play",()=>{var i;(i=this.videoResource.source)===null||i===void 0||i.play()}),this.rtcAudio.play()):yield(t=this.videoResource.source)===null||t===void 0?void 0:t.play())})}load(){return this.videoResource.load()}pause(){var t;this.isPlaying=!1,Gn.RtcAudioClazz?(this.rtcAudio.once("pause",()=>{var e;(e=this.videoResource.source)===null||e===void 0||e.pause()}),this.rtcAudio.pause()):(t=this.videoResource.source)===null||t===void 0||t.pause()}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){var t;this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),(t=this.videoResource)===null||t===void 0||t.destroy(),this.rtcAudio.destroy(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}}var cL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class dL extends P.a{constructor(t){super(),this.type="audio",this.isPlaying=!1,this.isGlobalPause=!1,this.updateVolume=s=>{this.audioPlayer.volume(s)},this.id=t.id;let e=t.audio.src;t.ctx.loaderDelegate&&(e=t.ctx.loaderDelegate.redirectMedia(e),t.ctx.logger.info(`redirect media url from ${t.audio.src} to ${e} by delegate.`,t.ctx.taskId)),this.audioPlayer=new U_(e,t.ctx.runningAudio),t.audio.cut&&(this.start=t.audio.cut.start,this.end=t.audio.cut.end),this.ctx=t.ctx,this.ctx.medias[this.id]=this;const{width:i,height:n,target:o}=t;this.controller=new Pp({targetId:t.id,shapeId:t.shapeId,ctx:t.ctx,height:n,width:i,target:o,media:this,info:t.audio,canvasElement:t.canvasElement}),this.audioPlayer.on("load",()=>this.emit("durationchange")),this.audioPlayer.on("timeupdate",()=>this.emit("timeupdate")),this.audioPlayer.on("pause",()=>this.emit("pause")),this.audioPlayer.on("play",()=>this.emit("play")),this.ctx.activeMedia.add(this),this.ctx.volumeAdjuster.on("update",this.updateVolume)}get currentTime(){return this.audioPlayer.currentTime}set currentTime(t){this.audioPlayer.currentTime=t}get paused(){return this.audioPlayer.isPaused}get isPaused(){return this.audioPlayer.isPaused}get ended(){return this.audioPlayer.isEnded}get duration(){return this.audioPlayer.duration}load(){return Promise.resolve()}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){return cL(this,void 0,void 0,function*(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent play event with paused state",this.ctx.taskId):(this.updateVolume(this.ctx.volumeAdjuster.volume),this.isPlaying=!0,this.audioPlayer.play())})}pause(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent pause event with paused state",this.ctx.taskId):(this.isPlaying=!1,this.audioPlayer.pause())}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent seek event with paused state",this.ctx.taskId):this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.audioPlayer.pause(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}}class pL extends JS{constructor(t,e,i,n){super(Object.assign(Object.assign({},t),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),e,i,n),this.isInteractiveOutside=!1,this.cmd=new LI(this),this.media=t==null?void 0:t.media,this.picFill=new co(this.ctx,t.picFill,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1})}applyCommand(t,e){var i,n,o,s,a;if(e==="call")if(/playFrom\(([0-9.]+)\)/.test(t)){const l=t.match(/playFrom\(([0-9.]+)\)/),u=Number(l[1]||"0");(i=this.mediaPlayer)===null||i===void 0||i.play().then(()=>{var h;(h=this.mediaPlayer)===null||h===void 0||h.seek(u)})}else t==="custom-pause"?(n=this.mediaPlayer)===null||n===void 0||n.pause():t==="togglePause"?(o=this.mediaPlayer)===null||o===void 0||o.togglePause():t==="stop"&&((s=this.mediaPlayer)===null||s===void 0||s.pause(),(a=this.mediaPlayer)===null||a===void 0||a.seek(0))}renderPic(){var t,e,i,n,o;const{displayObject:s}=this.picFill;if(s){const a=(t=this.backgroundGraphics)===null||t===void 0?void 0:t.getClonedDisplayObject();((e=this.backgroundGraphics)===null||e===void 0?void 0:e.isNeedMask(s.width,s.height))&&a&&(s.mask=a,this.container.addChild(a)),s.width=this.designWidth,s.height=this.designHeight,s instanceof A_&&this.ctx.slideScopeEventHub.once("slide-render",l=>{this.ctx.slideIndex===l&&s.play()}),this.container.addChild(s),((i=this.media)===null||i===void 0?void 0:i.type)==="video"&&this.media.src?(this.mediaPlayer=new hL({id:this.json.id+"-video",shapeId:this.json.id,ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:s,container:this.container,canvasElement:this.ctx.view}),(n=this.mediaPlayer)===null||n===void 0||n.sprite):((o=this.media)===null||o===void 0?void 0:o.type)==="audio"&&this.media.src&&(this.mediaPlayer=new dL({id:this.json.id+"-audio",shapeId:this.json.id,ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:s,canvasElement:this.ctx.view})),this.mediaPlayer&&(this.isInteractiveOutside=this.container.interactive,this.container.interactive=!0,this.container.on("mouseover",()=>{this.mediaPlayer.showController()}),this.container.on("mouseout",()=>{this.mediaPlayer.hideController()},!1))}}preRender(t){super.preRender(t)}subClassRender(){this.renderPic()}clearOnSlideChange(){super.clearOnSlideChange(),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}initOnReuse(){super.initOnReuse(),this.mediaPlayer&&(this.container.interactive=!0)}isStatic(){const t=this.json;return(!t.media||t.media.type!=="video")&&super.isStatic()}destroy(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy()}}var Ip=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class G_ extends I_{constructor(t,e,i,n,o){super(t,e,i),this.children=[],this.cacheSprite=new hr,this.cacheContainer=new Yn,this.json=t,this.json.fillStyle&&this.json.fillStyle.fillType==="groupFill"&&n&&(this.json.fillStyle=n),this.container.name=t.id,this.cacheContainer.name=t.id+"-cache-container",this.ctx.timingTargets.addTarget(t.id,this),this.updateTransform(this.json),this.fillObject=new co(this.ctx,t.fillStyle,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1}),this.createChildren(o)}createChildren(t){var e,i,n,o;const s={x:(i=(e=this.json.position)===null||e===void 0?void 0:e.x)!==null&&i!==void 0?i:0,y:(o=(n=this.json.position)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:0};for(let a=0,l=this.json.children.length;a<l;a++)t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){const u=this.json.children[a];let h=null;(u==null?void 0:u.type)==="Shape"?h=new JS(u,this.ctx,s,this.json.fillStyle):(u==null?void 0:u.type)==="Picture"?h=new pL(u,this.ctx,s,this.json.fillStyle):(u==null?void 0:u.type)==="Container"&&(h=new G_(u,this.ctx,s,this.json.fillStyle,t)),h&&this.children.push(h)}),"@ContainerImpl[child.init]")}get interactiveContainer(){return this.container}get renderContainer(){return this.container}preRender(t){for(const e of this.children)t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){e.preRender(t)}),"@ContainerImpl[child.preRender]")}getBgElement(){return null}getIterateEntry(t,e,i){return e===0?this:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}getTextElement(){return null}render(t){let e=new Yn;for(const i of this.children)i.render(t),t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){var n;i.isStatic()&&!this.json.cacheAsTexture&&i.json.width<4096&&i.json.height<4096?e.addChild(i.renderContainer):(e.children.length>0&&(e.cacheAsBitmap=!0,this.cacheContainer.addChild(e),e=new Yn),this.cacheContainer.addChild(i.renderContainer)),(i.json.hlinkHover||i.json.hlinkClick)&&((n=i.hyperlink)===null||n===void 0||n.addProxy(this.container))}),"@ContainerImpl[child.render]");t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){e.children.length>0&&(e.cacheAsBitmap=!0,this.cacheContainer.addChild(e))}),"@ContainerImpl[child.render]"),t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){this.container.addChild(this.cacheContainer),this.json.cacheAsTexture&&(function(i,n,o,s,a){const l=i.getBounds(),u=Math.min(l.x,n.x,l.x+l.width,n.x+n.width),h=Math.max(l.x,n.x,l.x+l.width,n.x+n.width),d=Math.min(l.y,n.y,l.y+l.height,n.y+n.height),p=h-u,m=Math.max(l.y,n.y,l.y+l.height,n.y+n.height)-d;let g=El(n.x-l.x),_=El(n.y-l.y);a||(g=Math.max(0,g),_=Math.max(0,_));const y=$r.create({width:p,height:m,resolution:s.renderer.resolution});i.position.x=g,i.position.y=_,s.renderer.render(i,{renderTexture:y}),o.texture=y,o.position.x=-g,o.position.y=-_}(this.cacheContainer,new xi(this.designX,this.designY,this.designWidth,this.designHeight),this.cacheSprite,this.ctx,!1),this.container.addChild(this.cacheSprite),this.cacheContainer.position.x=0,this.cacheContainer.position.y=0,this.cacheContainer.visible=!1)}),"@ContainerImpl[child.append]")}clearOnSlideChange(){this.children.forEach(t=>t.clearOnSlideChange())}initOnReuse(){this.children.forEach(t=>t.initOnReuse())}isStatic(){return!!this.json.cacheAsTexture&&!this.ctx.animatedIds.has(this.json.id)}destroy(){this.cacheSprite&&this.cacheSprite.destroy({texture:!0}),this.children.forEach(t=>t.destroy()),this.container.destroy({children:!0,texture:!0,baseTexture:!0}),this.cacheContainer.destroy({children:!0,texture:!0,baseTexture:!0})}}class Lp extends P.a{constructor(t,e,i,n){super(),this.cond={},this.timeoutIds=[],this.condHandle=(o,s={})=>{if(o)if(o.delay&&o.delay>0){const a=this.ctx.clock.setTimeout(()=>{o.event&&(this.cond[o.event]=!0,this.detectTrigger(s))},o.delay);this.timeoutIds.push(a)}else this.cond[o.event]=!0,this.detectTrigger(s);else this.detectTrigger(s)},this.id=t,this.ctx=n,this.eventHubs=i,e.forEach(o=>{this.addCond(o)})}setTriggerParams(t){this.triggerParams=t}addCond(t){const e=i=>{this.condHandle(t,i)};t.event&&(/^shape/.test(t.event)||/^time/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.global.addListener(t.event,e)):/^runtime/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):/^self/.test(t.event)?t.delay&&t.delay>0&&(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):this.cond[t.event]=!1)}isTrigger(){return Object.keys(this.cond).every(t=>!!this.cond[t])}isTriggerWithoutParent(){return Object.keys(this.cond).filter(t=>t!=="self").every(t=>!!this.cond[t])}detectTrigger(t){if(Object.keys(this.cond).every(e=>!!this.cond[e])){Object.keys(this.cond).forEach(i=>{this.cond[i]=!1});const e=this.triggerParams;this.triggerParams=void 0,this.emit("active",e,t)}}reset(){Object.keys(this.cond).forEach(t=>{this.cond[t]=!1}),this.timeoutIds.forEach(t=>this.ctx.clock.clearTimeout(t))}}class fL extends P.a{constructor(t){super(),this.isTimeNodeEndSync=!1,this.interactiveListeners=[],this.runtimeNodeEventHub=new P.a,this._currentSeqIndex=0,this._currentSeqState="idle",this.isForward=!0,this.autoPlay=!1,this.handlePrev=(p=!1)=>{var m,g,_,y,w,A;this.hasPrev()||!this.isMainSeq?this.currentSeqState==="idle"?(this.decrSeqIndex(),(m=this.commonTimeNode.children[this.currentSeqIndex])===null||m===void 0||m.commonTimeNode.seekToStart(),(g=this.commonTimeNode.children[this.currentSeqIndex])===null||g===void 0||g.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.currentSeqState==="running"?((_=this.commonTimeNode.children[this.currentSeqIndex])===null||_===void 0||_.commonTimeNode.seekToStart(),(y=this.commonTimeNode.children[this.currentSeqIndex])===null||y===void 0||y.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.currentSeqState==="end"&&(this.currentSeqIndex>=this.commonTimeNode.children.length&&(this.currentSeqIndex=this.commonTimeNode.children.length-1),(w=this.commonTimeNode.children[this.currentSeqIndex])===null||w===void 0||w.commonTimeNode.seekToStart(),(A=this.commonTimeNode.children[this.currentSeqIndex])===null||A===void 0||A.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.globalEventHub.emit("c:prev slide",p)},this.handleNext=(p=!1)=>{var m,g,_,y;this.isTimeNodeEndSync&&(this.isTimeNodeEndSync=!1,this.currentSeqState="idle",this.currentSeqIndex=0),this.hasNext()||!this.isMainSeq?this.currentSeqState==="idle"?(m=this.commonTimeNode.children[this.currentSeqIndex])===null||m===void 0||m.commonTimeNode.startTimeNodeForce():this.currentSeqState==="running"?((g=this.commonTimeNode.children[this.currentSeqIndex])===null||g===void 0||g.commonTimeNode.seekToEnd(!1,!0),this.currentSeqState="end",this.incrSeqIndex(),(_=this.commonTimeNode.children[this.currentSeqIndex])===null||_===void 0||_.commonTimeNode.startTimeNodeForce()):this.currentSeqState==="end"&&(this.incrSeqIndex(),(y=this.commonTimeNode.children[this.currentSeqIndex])===null||y===void 0||y.commonTimeNode.startTimeNodeForce()):this.globalEventHub.emit("c:next slide",p)};const{json:e,iterateType:i,isIterate:n,isSub:o,parent:s,ctx:a,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.isMainSeq=e.ctn.nodeType==="mainSeq",this.isInteractiveSeq=e.ctn.nodeType==="interactiveSeq",this.id=e.ctn.id,this.isIterate=n,this.json=e,this.ctx=a,this.globalEventHub=l,this.commonTimeNode=new Ic({json:e.ctn,isSub:o,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:a,parent:s,isIterate:!1,iterateType:i,iterateIndex:u,iterateId:h,isInInteractiveSeq:d||this.isInteractiveSeq}),this.bindShapeEvent(),this.nextConds=new Lp("mainSeq",e.nextCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.prevConds=new Lp("mainSeq",e.preCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.commonTimeNode.on("timeNodeRestart",()=>{this.currentSeqIndex=0,this.currentSeqState="idle"}),this.commonTimeNode.on("childTimeNodeStart",p=>{const m=this.commonTimeNode.children.findIndex(g=>g.commonTimeNode.uuid===p.id);m>=0&&(this.currentSeqIndex=m),this.currentSeqState="running",this.isMainSeq&&this.ctx.eventHub.emit(Ne.mainSeqStepStart,m)}),this.commonTimeNode.on("childTimeNodeEnd",p=>{const m=this.commonTimeNode.children.findIndex(g=>g.commonTimeNode.uuid===p.id);m>=0&&(this.currentSeqIndex=m),this.currentSeqState="end",this.autoPlay&&this.ctx.clock.setTimeout(()=>{this.handleNext()}),this.isMainSeq&&this.ctx.eventHub.emit(Ne.mainSeqStepEnd,m)}),this.commonTimeNode.on("timeNodeEndSync",()=>{this.isTimeNodeEndSync=!0,this.commonTimeNode.resetForRepeat()}),this.commonTimeNode.on("timeNodeDestroy",()=>{this.interactiveListeners.forEach(([p,m])=>{p&&m&&p.interactiveContainer.removeListener("pointerdown",m)}),this.interactiveListeners=[]}),this.nextConds.on("active",(p,m)=>{this.handleNext(m)}),this.prevConds.on("active",(p,m)=>{this.handlePrev(m)})}get currentSeqIndex(){return this._currentSeqIndex}set currentSeqIndex(t){this._currentSeqIndex=t,this.isMainSeq?this.ctx.eventHub.emit(Ne.mainSeqStepChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(Ne.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:t,state:this._currentSeqState}})}get currentSeqState(){return this._currentSeqState}set currentSeqState(t){this._currentSeqState=t,this.isMainSeq?this.ctx.eventHub.emit(Ne.mainSeqStateChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(Ne.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:this._currentSeqIndex,state:t}})}get stepLength(){return this.commonTimeNode.children.length}get currentStep(){return this.currentSeqIndex}get currentState(){return this.currentSeqState}startAutoPlay(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}incrSeqIndex(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}decrSeqIndex(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}hasPrev(){return!(this.currentSeqIndex<=0&&this.currentSeqState==="idle")}hasNext(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&this.currentSeqState==="end")}bindShapeEvent(){this.json.ctn.nodeType==="interactiveSeq"&&this.json.nextCondLst.forEach(t=>{if(/^shape/.test(t.event)){const e=t.event.split(" ")[1];if(e){const i=this.ctx.timingTargets.getTargetById(e);if(i){i.interactiveContainer.interactive=!0,i.interactiveContainer.cursor="pointer";const n=()=>{this.ctx.eventHub.emit(Ne.userInput);const o=`shape ${e} onClick`,{mode:s}=this.ctx;s!=="interactive"&&s!=="sync"||this.ctx.eventHub.emit(Ne.interactiveSeqAction,{action:o,seqId:this.json.ctn.id}),s!=="sync"&&s!=="local"||this.globalEventHub.emit(o)};i.interactiveContainer.on("pointerdown",n),this.interactiveListeners.push([i,n])}}}})}setCurrentStep(t,e){this.isInteractiveSeq&&this.commonTimeNode.applyCount===0&&(this.commonTimeNode.applyCount=1);let i=t;this.commonTimeNode.seekToStart();const{length:n}=this.commonTimeNode.children;if(i===-1&&(i=n-1),i>=0&&i<n)for(let o=0;o<=i;o++){const s=this.commonTimeNode.children[o];o!==i?s.commonTimeNode.seekToEnd(!1,!0):e==="start"?s.commonTimeNode.seekToStart():e==="end"&&s.commonTimeNode.seekToEnd(!1,!0)}this.currentSeqIndex=i,this.currentSeqState=e==="start"?"idle":"end"}}function Gs(r,t,e){const i=t.split(".");i.reduce((n,o,s)=>{if(n)return s!==i.length-1?n[o]:void(n[o]=e);console.warn(`${r} not support ${t}`)},r)}function Sg(r,t){return t?t.split(".").reduce((e,i)=>{if(e)return e[i];console.warn(`${r} not support ${t}`)},r):null}class Al{constructor(t){this.timingTarget=null,this.runtimeNodeEventHub=new P.a,this.basicOnTimeNodeEnd=()=>{if(this.isConflict){const{target:p}=this.json.cBhvr,m=this.getTargetId(p);this.ctx.conflictTimeNodeManager.removeRunningTimeNode(m,this.modifyAttrKey)}},this.basicOnTimeLineStart=()=>{if(this.isConflict){const{target:p}=this.json.cBhvr;if(this.activeWhenConflict==="next"){const m=this.getTargetId(p);this.ctx.conflictTimeNodeManager.addRunningTimeNode(m,this.modifyAttrKey,this.commonTimeNode)}else this.activeWhenConflict==="prev"&&this.commonTimeNode.dispose()}};const{isIterate:e,isSub:i,json:n,ctx:o,parent:s,eventHub:a,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.json=n,this.id=n.cBhvr.ctn.id,this.ctx=o,this.globalEventHub=a,this.commonTimeNode=new Ic({json:n.cBhvr.ctn,isSub:i,eventHubs:{global:a,runtime:this.runtimeNodeEventHub},ctx:o,parent:s,isIterate:e,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}),this.timingTarget=this.ctx.timingTargets.getTarget(n.cBhvr.target,e,{type:l,index:u,id:h}),this.commonTimeNode.on("seekToStart",()=>this.onSeekToStart()),this.commonTimeNode.on("seekToEnd",()=>this.onSeekToEnd()),this.commonTimeNode.on("timelineStart",this.basicOnTimeLineStart),this.commonTimeNode.on("timeNodeEnd",this.basicOnTimeNodeEnd)}getTargetId(t){let e=t.id;return t.type==="shape"&&t.txEl&&(e=`${e}-txEl-${t.txEl.range[0]}`),this.commonTimeNode.isIterate&&(e=`${e}-iterate-${this.commonTimeNode.iterateIndex}`),e}}class mL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.updateStartValue=()=>{this.timingTarget&&(this.startVal=Sg(this.timingTarget,this.json.cBhvr.attrList[0]))},this.onSeekToStart=()=>{const e=this.json.cBhvr.attrList[0];this.startVal!==null&&this.timingTarget&&Gs(this.timingTarget,e,this.startVal)},this.onSeekToEnd=()=>{const e=this.json.cBhvr.attrList[0],i=this.json.cBhvr.to||this.json.to;i&&this.timingTarget&&Gs(this.timingTarget,e,i)},this.commonTimeNode.on("timeNodeStart",this.updateStartValue),this.commonTimeNode.on("timeNodeCreate",this.updateStartValue),this.commonTimeNode.on("timeUpdate",({duration:e,delta:i})=>{if(i/e>=1){const n=this.json.cBhvr.attrList[0];this.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");const o=this.json.cBhvr.to||this.json.to;o&&this.timingTarget&&Gs(this.timingTarget,n,o)}})}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}}var Tg=function(r,t,e,i){var n,o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(n=r[a])&&(s=(o<3?n(s):o>3?n(t,e,s):n(t,e))||s);return o>3&&s&&Object.defineProperty(t,e,s),s};class Eg{constructor(t,e){this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:i=>i/Math.PI*180,exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:i=>i/180*Math.PI,rand:Math.random,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=e,this.val=t.val.value,this.time=t.time,t.fmla&&(this.fmla=this.parseFmla(t.fmla))}parseFmla(t){let e=t.replace(/#ppt_h/g,`(${this.timingTarget.design_ppt_h})`);return e=e.replace(/#ppt_w/g,`(${this.timingTarget.design_ppt_w})`),e=e.replace(/#ppt_x/g,`(${this.timingTarget.design_ppt_x})`),e=e.replace(/#ppt_y/g,`(${this.timingTarget.design_ppt_y})`),e=e.replace(/ppt_w/g,"vars.ppt_w"),e=e.replace(/ppt_h/g,"vars.ppt_h"),e=e.replace(/ppt_x/g,"vars.ppt_x"),e=e.replace(/ppt_y/g,"vars.ppt_y"),e=e.replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach(i=>{const n=new RegExp(`([^a-z])${i}([^a-z])`,"g");e=e.replace(n,(o,s,a)=>`${s}math.${i}${a}`)}),new Function("vars","math","$","return "+e)}}class ZS extends Eg{constructor(t,e,i){super(t,e),this.value=t.val.value,i&&(this.fmla=this.parseFmla(i))}resolveValue(){return this.value}interpolationFrom(t,e,i){const n=t.resolveValue(i),o=n+(this.resolveValue()-n)*e;return t.fmla?t.fmla(i,this.math,o):o}}Tg([mg()],ZS.prototype,"interpolationFrom",null);class KS extends Eg{constructor(t,e){var i;super(t,e),this.value=(i=t.val)===null||i===void 0?void 0:i.value}interpolationFrom(t,e,i){let n=t.resolveValue(i);return e>this.time&&(n=this.resolveValue()),n}resolveValue(){return this.value||""}}Tg([mg()],KS.prototype,"interpolationFrom",null);class Pc extends Eg{constructor(t,e){super(t,e),this.fn=this.parseFmla(this.val)}resolveValue(t){return this.fn(t,this.math,1)}interpolationFrom(t,e,i){const n=t.resolveValue(i),o=n+(this.resolveValue(i)-n)*e;return t.fmla?t.fmla(i,this.math,o):o}}Tg([mg()],Pc.prototype,"interpolationFrom",null);class QS extends Eg{constructor(t,e){super(t,e),this.value=t.val.value}interpolationFrom(t,e){return Mp(t.resolveValue(),this.value,e)}resolveValue(){return this.value}}Tg([mg()],QS.prototype,"interpolationFrom",null);class gL extends Al{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0},this.keyFrames=[],this.isColorAnim=!1,this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal=Sg(this.timingTarget,this.json.cBhvr.attrList[0]))},this.updateVars=()=>{var e,i,n,o;!((e=this.timingTarget)===null||e===void 0)&&e.ppt_h&&(this.vars.ppt_h=this.timingTarget.ppt_h),!((i=this.timingTarget)===null||i===void 0)&&i.ppt_w&&(this.vars.ppt_w=this.timingTarget.ppt_w),!((n=this.timingTarget)===null||n===void 0)&&n.ppt_x&&(this.vars.ppt_x=this.timingTarget.ppt_x),!((o=this.timingTarget)===null||o===void 0)&&o.ppt_y&&(this.vars.ppt_y=this.timingTarget.ppt_y),this.isColorAnim},this.onTimeUpdate=({duration:e,delta:i})=>{const n=i/e,o=this.keyFrames.findIndex(p=>n<=p[0]),{attrList:s}=this.json.cBhvr;if(o<0){const p=this.keyFrames[this.keyFrames.length-1];return void(this.timingTarget&&s&&s[0]&&Gs(this.timingTarget,s[0],p[1].resolveValue(this.vars)))}const a=o-1,l=this.keyFrames[o],u=this.keyFrames[a]||l,h=l[0]-u[0]==0?1:(n-u[0])/(l[0]-u[0]),d=l[1].interpolationFrom(u[1],h,this.vars);this.timingTarget&&s&&s[0]&&Gs(this.timingTarget,s[0],d)},this.onSeekToStart=()=>{this.startVal!==null&&this.timingTarget&&Gs(this.timingTarget,this.json.cBhvr.attrList[0],this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.initKeyFrames(),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timelineStart",this.updateVars),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}initKeyFrames(){var t;const{valueType:e}=this.json;if(this.json.tavLst.length<=0){if(this.json.to){if(this.json.from||this.startVal){const n={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if(e==="num"&&this.timingTarget){const o=new Pc(n,this.timingTarget);this.keyFrames.push([n.time,o])}}const i={time:1,val:{type:"string",value:this.json.to},fmla:""};if(e==="num"&&this.timingTarget){const n=new Pc(i,this.timingTarget);this.keyFrames.push([i.time,n])}}else if(this.json.by){const i={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if(e==="num"&&this.timingTarget){const o=new Pc(i,this.timingTarget);this.keyFrames.push([i.time,o])}const n={time:1,val:{type:"string",value:(((t=i.val)===null||t===void 0?void 0:t.value)||"")+"+"+this.json.by},fmla:""};if(e==="num"&&this.timingTarget){const o=new Pc(n,this.timingTarget);this.keyFrames.push([n.time,o])}}}if(this.json.tavLst.length>0){for(const i of this.json.tavLst)if(i.val&&this.timingTarget){let n=null;i.val.type==="string"?e==="num"?n=new Pc(i,this.timingTarget):e==="str"&&(n=new KS(i,this.timingTarget)):i.val.type==="number"?n=new ZS(i,this.timingTarget):i.val.type==="color"?(this.isColorAnim=!0,n=new QS(i,this.timingTarget)):i.val.type==="boolean"&&console.warn("not implements"),n&&this.keyFrames.push([i.time,n])}}}}var vL=v(50),_L=v.n(vL),yL=v(51),xL=v.n(yL);class bL extends Dr{constructor(){super(xL.a,_L.a,{percent:0,direction:1,transition:0})}set transition(t){this.uniforms.transition=t}set percent(t){this.uniforms.percent=t}set direction(t){this.uniforms.direction=t}}var wL=v(52),SL=v.n(wL);class TL extends Dr{constructor(){super(void 0,SL.a,{percent:0,transition:1})}set transition(t){this.uniforms.transition=Math.pow(t,t)}set percent(t){this.uniforms.percent=t}}class EL extends Al{constructor(t){var e;super(t),this.filterType="",this.isConflict=!0,this.activeWhenConflict="prev",this.onTimeUpdate=({duration:o,delta:s})=>{const a=s/o;this.filter&&(this.filter.percent=this.commonTimeNode.applyTimeFilter(a)),a>=1&&this.timingTarget&&this.ctx.clock.setTimeout(()=>{this.timingTarget&&(this.timingTarget.container.filters=[])})},this.onSeekToStart=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.onSeekToEnd=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.commonTimeNode.on("timelineStart",()=>{this.filter&&this.timingTarget&&(this.timingTarget.container.filters=[this.filter])}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate);let i=0;t.json.transition==="out"?i=-1:t.json.transition==="in"&&(i=1);const n=(e=t.json.filter)===null||e===void 0?void 0:e.match(/^([a-zA-Z]+)(\((.+)\))?/);if(n){const o=n[1],s=n[3];if(o==="wipe"){const a=new bL;s==="up"?a.direction=1:s==="down"?a.direction=2:s==="left"?a.direction=3:s==="right"&&(a.direction=4),this.filter=a,this.filterType=`${o}-${s}`}else if(o==="fade"){const a=new TL;this.filter=a,this.filterType=""+o}this.filter&&(this.filter.transition=i)}}get modifyAttrKey(){return this.filterType}}class ML extends Al{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startPos=null,this.onTimeNodeStart=()=>{var e,i;this.startPos={x:((e=this.timingTarget)===null||e===void 0?void 0:e.ppt_x)||0,y:((i=this.timingTarget)===null||i===void 0?void 0:i.ppt_y)||0}},this.onTimeUpdate=({duration:e,delta:i})=>{var n;const o=i/e,s=(n=this.path)===null||n===void 0?void 0:n.getPoint(o);this.timingTarget&&s&&(this.timingTarget.ppt_x=s.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=s.y+ +this.timingTarget.design_ppt_y)},this.onSeekToStart=()=>{this.timingTarget&&this.startPos&&(this.timingTarget.ppt_x=this.startPos.x,this.timingTarget.ppt_y=this.startPos.y)},this.onSeekToEnd=()=>{var e,i,n;const o=(i=(e=this.commonTimeNode.json)===null||e===void 0?void 0:e.spd)!==null&&i!==void 0?i:1,s=(n=this.path)===null||n===void 0?void 0:n.getPoint(o>0?1:0);this.timingTarget&&s&&(this.timingTarget.ppt_x=s.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=s.y+this.timingTarget.design_ppt_y)},this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.createPath()}get modifyAttrKey(){return"motion"}createPath(){var t;const e=new xu,i=(t=this.json.path)===null||t===void 0?void 0:t.match(/[MLCmlc][^MLCmlc]+/g);if(i)for(const n of i){const[o,...s]=n.trim().replace(/\s+/g," ").split(" ");if(o==="M"){const[a,l]=s.map(u=>Number(u));e.moveTo(a,l)}else if(o==="L"){const[a,l]=s.map(u=>Number(u));e.lineTo(a,l)}else if(o==="C"){const[a,l,u,h,d,p]=s.map(m=>Number(m));e.bezierCurveTo(a,l,u,h,d,p)}else if(o==="Z")e.closePath();else if(o==="E")console.warn("not implements");else if(o==="c"){const[a,l,u,h,d,p]=s.map(g=>Number(g)),m=e.currentPoint;e.bezierCurveTo(a+m.x,l+m.y,u+m.x,h+m.y,d+m.x,p+m.y)}else if(o==="l"){const a=e.currentPoint,[l,u]=s.map(h=>Number(h));e.lineTo(l+a.x,u+a.y)}else if(o==="m"){const a=e.currentPoint,[l,u]=s.map(h=>Number(h));e.moveTo(l+a.x,u+a.y)}}this.path=e}}class AL extends Al{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.onTimelineStart=e=>{e.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:e,delta:i})=>{var n,o,s,a,l;const u=i/e,h={x:1,y:1};if(this.to){const d=(n=this.from)!==null&&n!==void 0?n:{x:(s=(o=this.startVal)===null||o===void 0?void 0:o.x)!==null&&s!==void 0?s:1,y:(l=(a=this.startVal)===null||a===void 0?void 0:a.y)!==null&&l!==void 0?l:1};h.x=d.x+(this.to.x-d.x)*u,h.y=d.y+(this.to.y-d.y)*u}else if(this.by){const d={x:this.by.x,y:this.by.y};h.x=1+(d.x-1)*u,h.y=1+(d.y-1)*u}this.timingTarget&&(this.timingTarget.scale=h)},this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})},this.onSeekToStart=()=>{this.timingTarget&&this.startVal&&(this.timingTarget.scale=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=t.json.from,this.to=t.json.to,this.by=t.json.by,this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart)}get modifyAttrKey(){return"scale"}updateCurrentValue(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}}class RL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isTimelineStart=!1,this.startColorString=null,this.currentColorString="#FFFFFFFF",this.onTimelineStart=e=>{if(this.isTimelineStart)return;this.isTimelineStart=!0,e.isReverse||this.updateCurrentValue(),this.from.isInit()||this.from.fromHexString(this.currentColorString),this.to.isInit()||this.from.by(this.by,this.to);const[i]=this.json.cBhvr.attrList[0].split(".");Gs(this.timingTarget,i+".on","true")},this.onTimeNodeEnd=()=>{if(this.json.cBhvr.ctn.fill==="remove"){const[e]=this.json.cBhvr.attrList[0].split(".");Gs(this.timingTarget,e+".on","false")}this.isTimelineStart=!1},this.onSeekToStart=()=>{var e;if(this.timingTarget&&(this.onTimeUpdate({duration:1,delta:0}),((e=this.timingTarget.fill)===null||e===void 0?void 0:e.designColor.toUpperCase())===this.from.toHexString().toUpperCase())){const[i]=this.json.cBhvr.attrList[0].split(".");Gs(this.timingTarget,i+".on","false")}},this.onTimeNodeStart=()=>{if(this.timingTarget){const e=Sg(this.timingTarget,this.json.cBhvr.attrList[0]);e&&(this.startColorString=e)}},this.onTimeUpdate=({delta:e,duration:i})=>{const n=e/i;this.to.interpolationFrom(this.from,n,this.target),this.timingTarget&&Gs(this.timingTarget,this.json.cBhvr.attrList[0],this.target.toHexString())},this.onSeekToEnd=()=>{this.isTimelineStart||this.onTimelineStart({isReverse:!1,activeCount:0,id:""}),this.onTimeUpdate({duration:1,delta:1})},this.json.clrSpc==="rgb"?(this.from=new yg(this.json.from),this.to=new yg(this.json.to),this.by=new yg(this.json.by),this.target=new yg):(this.from=new _g(this.json.from),this.to=new _g(this.json.to),this.by=new _g(this.json.by),this.target=new _g),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeEnd",this.onTimeNodeEnd),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}updateCurrentValue(){if(this.timingTarget){const t=Sg(this.timingTarget,this.json.cBhvr.attrList[0]);t&&(this.currentColorString=t)}}}class CL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.lastVal=null,this.onTimelineStart=e=>{this.lastVal=null,e.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:e,delta:i})=>{const n=i/e;let o=0,s=0;if(this.from!==void 0&&this.to!==void 0){o=this.from,s=this.to;const a=o+(s-o)*n;this.timingTarget&&(this.timingTarget.r=a)}else if(this.by!==void 0){this.lastVal||(this.lastVal=0);const a=this.by*n-this.lastVal;this.lastVal=this.by*n,this.timingTarget&&(this.timingTarget.r+=a)}},this.onTimeNodeStart=()=>{var e;Object(V.isNumber)((e=this.timingTarget)===null||e===void 0?void 0:e.r)&&(this.startVal=this.timingTarget.r)},this.onSeekToStart=()=>{this.timingTarget&&this.startVal!==null&&(this.timingTarget.r=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=this.json.from,this.to=this.json.to,this.by=this.json.by,this.by?this.isConflict=!1:this.isConflict=!0,this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return"rotate"}updateCurrentValue(){var t;this.currentVal=(t=this.timingTarget)===null||t===void 0?void 0:t.r}}class PL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isApplied=!1,this.onTimeUpdate=()=>{var e,i;const{cmd:n,cmdType:o}=this.json;!this.isApplied&&n&&o&&(this.isApplied=!0,(i=(e=this.timingTarget)===null||e===void 0?void 0:e.cmd)===null||i===void 0||i.applyCommand(n,o))},this.onSeekToStart=()=>{var e,i;(i=(e=this.timingTarget)===null||e===void 0?void 0:e.cmd)===null||i===void 0||i.applyCommand("custom-pause","call")},this.onSeekToEnd=()=>{},this.commonTimeNode.on("timeNodeStart",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeNodeEnd",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("seekToStart",this.onSeekToStart),this.commonTimeNode.on("seekToEnd",this.onSeekToEnd)}get modifyAttrKey(){var t,e,i,n;return((e=(t=this.json)===null||t===void 0?void 0:t.cmd)!==null&&e!==void 0?e:"")+((n=(i=this.json)===null||i===void 0?void 0:i.cmdType)!==null&&n!==void 0?n:"")}}class IL{constructor(t){this.runtimeNodeEventHub=new P.a,this.onVolumeUpdate=m=>{this.audio.volume(m)},this.stopAudio=()=>{this.audio.stop()},this.destroy=()=>{this.stopAudio(),this.audio.destroy(),this.ctx.activeMedia.delete(this.audio),this.ctx.volumeAdjuster.off("update",this.onVolumeUpdate)};const{json:e,isIterate:i,isSub:n,eventHub:o,ctx:s,parent:a,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.json=e,this.id=e.cMediaNode.ctn.id,this.commonTimeNode=new Ic({json:e.cMediaNode.ctn,isSub:n,eventHubs:{global:o,runtime:this.runtimeNodeEventHub},ctx:s,parent:a,isIterate:i,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d});let p=e.cMediaNode.tgtEl;s.loaderDelegate&&(p=s.loaderDelegate.redirectMedia(p),s.logger.info(`redirect media url from ${e.cMediaNode.tgtEl} to ${p} by delegate.`,s.taskId)),this.audio=new U_(p,s.runningAudio),s.activeMedia.add(this.audio),this.commonTimeNode.on("timelineStart",()=>{this.audio.volume(s.volumeAdjuster.volume),this.audio.play()}),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy),this.ctx=s,this.ctx.volumeAdjuster.on("update",this.onVolumeUpdate)}}var LL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class Ic extends P.a{constructor(t){var e,i;super(),this.uuid=Date.now().toString(32)+Math.random().toString(32).substring(2),this.isSub=!1,this.isShadow=!1,this.startCount=0,this.applyCount=0,this.isReverse=!1,this.isConflictDispose=!1,this.isIterateEnd=!1,this.parentTimeNode=null,this.isActive=!1,this.isDestroy=!1,this.shouldSeekOnStart=!1,this.repeatTimeoutId="",this.iterateShadows=[],this.isEndEventsEmitted=!1,this.tmFilter=[],this.timeDelta=0,this.isIterate=!1,this.iterateType="el",this.iterateIndex=0,this.children=[],this.subList=[],this.duration=0,this.isNegativeSpeed=!1,this.handleEndCond=()=>{this.isActive&&(this.isActive=!1,this.isInfiniteRepeat()?this.repeatTimeNodeEnd():this.seekToEnd(!1,!0))},this.handleActive=(y=!0)=>{if(this.isActive=!0,this.isConflictDispose=!1,this.applyCount+=1,this.json.iterate||this.emit("timeNodeStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startCount>0&&this.json.restart){if(this.json.restart==="never")return;this.json.restart!=="whenNotActive"&&this.json.restart!=="always"||(this.seekToStart(),this.emit("timeNodeRestart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startTimeLine(y))}else this.startTimeLine(y)},this.updateTimeLine=y=>{const w=y/(We.TARGET_FPMS||.06);this.timeDelta+=w,this.duration-this.timeDelta<=w&&(this.timeDelta=this.duration),this.timeDelta<this.duration?this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?this.duration-this.timeDelta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}):(this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?0:this.duration,duration:this.duration,isReverse:this.isReverse}),this.onTimeLineEnd())},this.handleEnd=(y=!1)=>{(this.isTimeNodeEnd()||y)&&(this.isActive=!1,this.isSub&&this.destroy(),this.emitEndEvents())};const{isSub:n,isIterate:o,ctx:s,eventHubs:a,parent:l,json:u,iterateType:h,iterateId:d,iterateIndex:p,isInInteractiveSeq:m}=t;this.isSub=n,this.isInInteractiveSeq=m,this.isIterate=o,this.parentTimeNode=l,this.json=u,this.ctx=s,this.iterateIndex=p,this.eventHubs=a,this.iterateType=h,this.iterateId=d,this.tmFilter=(i=(e=u.tmFilter)===null||e===void 0?void 0:e.split(";").map(y=>y.split(",").map(w=>parseFloat(w.trim()))))!==null&&i!==void 0?i:[];const g=Number(this.json.dur),_=this.json.spd||1;this.isNegativeSpeed=_<0,Number.isNaN(g)||(this.duration=g/Math.abs(_)),this.uuid+="--"+this.json.id,this.setPreStyle(),u.childTnLst&&this.createChildren(u.childTnLst),this.startConds=new Lp(this.json.id||"",u.stCondLst,a,this.ctx),this.endConds=new Lp(this.json.id||"",u.endCondLst,a,this.ctx),u.endSync&&(this.endSync=new Lp(this.json.id||"",[u.endSync],a,this.ctx),this.endSync.on("active",()=>{var y;this.json.nodeType==="interactiveSeq"&&(this.isActive=!1,this.shouldSeekOnStart=!0,this.emit("timeNodeEndSync"),(y=this.endSync)===null||y===void 0||y.reset())})),this.startConds.on("active",y=>{this.isActive||(this.shouldSeekOnStart&&(this.shouldSeekOnStart=!1,this.seekToStart()),this.handleActive(y))}),this.endConds.on("active",()=>{this.handleEndCond(),this.children.forEach(y=>y.commonTimeNode.handleEndCond())}),this.parentTimeNode&&this.parentTimeNode.on("timeNodeStart",()=>{this.applyCount=0}),this.isSub&&this.json.masterRel==="nextClick"&&this.startConds.addCond({event:"shape slide onNext"}),this.json.iterate&&this.isIterate===!1&&this.createIterateShadow()}createIterateShadow(){const t=Tp();let e=!0,i=0;const n=o=>{o===t&&(e=!1,this.ctx.eventHub.removeListener("IterateTimeNodeEnd",n))};for(this.ctx.eventHub.on("IterateTimeNodeEnd",n);e;){const o=JSON.parse(JSON.stringify(this.json)),s=new Ic({json:o,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:o.iterate.type,iterateIndex:i,iterateId:t,isInInteractiveSeq:this.isInInteractiveSeq});this.iterateShadows[i]=s,i+=1}}isInfiniteRepeat(){return this.json.repeatCount>999999998}getReverse(){return this.isReverse}setReverse(t){this.isReverse=t}createTimeNode(t,e){let i=null;const n={json:t,isSub:e,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq};return t.type==="seq"?i=new fL(n):t.type==="par"?i=new tT(n):t.type==="set"?i=new mL(n):t.type==="anim"?i=new gL(n):t.type==="animEffect"?i=new EL(n):t.type==="animMotion"?i=new ML(n):t.type==="animScale"?i=new AL(n):t.type==="animClr"?i=new RL(n):t.type==="animRot"?i=new CL(n):t.type==="cmd"?i=new PL(n):t.type==="audio"&&(i=new IL(n)),i}createSubList(t){this.subList&&this.subList.forEach(e=>e.commonTimeNode.destroy()),this.subList=[],t.forEach(e=>{const i=this.createTimeNode(e,!0);i&&this.subList.push(i)})}bindCommonTimeNodeEvent(t){t.commonTimeNode.on("timeNodeStart",e=>{this.emit("childTimeNodeStart",e)}),t.commonTimeNode.on("timeNodeEnd",e=>{this.emit("childTimeNodeEnd",e),this.children.every(i=>i.commonTimeNode.isTimeNodeEndWhenDetectEndSync())&&(this.json.iterate||this.allChildrenEndHandle())})}createChildren(t){function e(i){return(n=i,function(o){var s;return!!(!((s=o)===null||s===void 0)&&s.cBhvr)}(n)?n.cBhvr.ctn:function(o){var s,a;return!!(!((a=(s=o)===null||s===void 0?void 0:s.cMediaNode)===null||a===void 0)&&a.ctn)}(n)?n.cMediaNode.ctn:n.ctn).presetOrder;var n}t&&t[0]&&e(t[0])?[...t].sort((i,n)=>{var o,s;return((o=e(i))!==null&&o!==void 0?o:0)-((s=e(n))!==null&&s!==void 0?s:0)}).forEach(i=>{const n=t.findIndex(s=>s===i),o=this.createTimeNode(i,!1);o&&(this.bindCommonTimeNodeEvent(o),this.children[n]=o)}):t.forEach(i=>{const n=this.createTimeNode(i,!1);n&&(this.bindCommonTimeNodeEvent(n),this.children.push(n))})}playReverse(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach(t=>t.commonTimeNode.playReverse())}allChildrenEndHandle(){if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout(()=>{this.seekToStart(!1),this.resetForRepeat(),this.startTimeNodeRepeat()}):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}resetForRepeat(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach(t=>t.commonTimeNode.resetForRepeat())}startSubList(){this.subList.forEach(t=>t.commonTimeNode.startTimeNode())}startReverseTimeLine(){this.isEndEventsEmitted=!1,this.timeDelta=0;const t=1e3/this.ctx.ticker.maxFPS;this.duration<=t&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(Ne.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>t&&(this.ctx.eventHub.emit(Ne.animateStart),this.ctx.ticker.add(this.updateTimeLine))}startTimeLine(t=!0){if(t&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit(`time ${this.json.id} begin`),this.eventHubs.global.emit(`time ${this.json.id} onBegin`),this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)),this.json.iterate)return void this.startIterate();this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});const e=1e3/this.ctx.ticker.maxFPS;this.duration<=e&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce(()=>{this.onTimeLineEnd()})):this.duration>e&&(this.ctx.eventHub.emit(Ne.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}startIterate(){return LL(this,void 0,void 0,function*(){if(this.json.iterate){this.isIterateEnd=!1;for(const t of this.iterateShadows){if(this.isIterateEnd)break;t.children.forEach(e=>{e.commonTimeNode.startTimeNode()}),t.applyCount+=1,yield this.ctx.clock.delay(this.json.iterate.interval)}this.onTimeLineEnd()}})}applyTimeFilter(t){if(!this.tmFilter.every(e=>Object(V.isNumber)(e[0])&&Object(V.isNumber)(e[1])))return t;for(let e=0;e<this.tmFilter.length;e++){const i=this.tmFilter[e];if(t<i[0]){const n=this.tmFilter[e-1];return(t-n[0])/(i[0]-n[0])*(i[1]-n[1])+n[1]}}return this.tmFilter.length>0?this.tmFilter[this.tmFilter.length-1][1]:t}isNatureTimeEnd(){return this.duration>=0&&this.timeDelta>=this.duration}findTargets(){const t=[],e=i=>{i.forEach(n=>{var o,s,a;n.cBhvr&&n.cBhvr.target&&t.findIndex(l=>l.id===n.cBhvr.target.id)<0&&t.push(n.cBhvr.target),((s=(o=n==null?void 0:n.cBhvr)===null||o===void 0?void 0:o.ctn)===null||s===void 0?void 0:s.childTnLst)&&n.cBhvr.ctn.childTnLst.length>0&&e(n.cBhvr.ctn.childTnLst),((a=n==null?void 0:n.ctn)===null||a===void 0?void 0:a.childTnLst)&&n.ctn.childTnLst.length>0&&e(n.ctn.childTnLst)})};return e(this.json.childTnLst||[]),t}setPreStyle(){this.json.presetClass&&this.findTargets().forEach(t=>{if(this.json.iterate){let e=0,i=!0;for(;i;){const n=this.ctx.timingTargets.getTarget(t,!0,{type:this.json.iterate.type,index:e,id:""});n&&(this.setPreStyleForTarget(n),e+=1),i=!!n}}else{const e=this.ctx.timingTargets.getTarget(t,!1);e&&this.setPreStyleForTarget(e)}})}setPreStyleForTarget(t){var e,i;if(t&&this.json.presetSubtype&&(t.presetSubType=this.json.presetSubtype),t&&!t.hasPreset)if(this.json.presetClass==="entr"){const n=(i=(e=this.json)===null||e===void 0?void 0:e.childTnLst)===null||i===void 0?void 0:i.filter(o=>o.type==="set"&&o.to==="visible");n!=null&&n.length&&(t.hasPreset=!0,t.style.visibility="hidden")}else(this.json.presetClass==="exit"||this.json.presetClass==="path")&&(t.hasPreset=!0,t.style.visibility="visible")}startTimeNodeRepeat(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}startTimeNodeForce(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}startTimeNode(t=!0){if(this.isDestroy)return;this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(t);const e=this.json.stCondLst.filter(n=>/^self/.test(n.event||""))[0];e&&this.startConds.condHandle(e);const i=this.json.endCondLst.filter(n=>/^self/.test(n.event||""))[0];i&&this.endConds.condHandle(i),this.startConds.condHandle()}onTimeLineEnd(){this.dispose(),(this.children.length===0||this.json.iterate)&&this.allChildrenEndHandle()}clearSubList(){this.subList.forEach(t=>t.commonTimeNode.destroy())}seekToStart(t=!0){if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(e=>e.seekToStart(t));if(t)for(let e=this.subList.length-1;e>=0;e--){const i=this.subList[e];i==null||i.commonTimeNode.seekToStart()}for(let e=this.children.length-1;e>=0;e--){const i=this.children[e];i==null||i.commonTimeNode.seekToStart()}for(let e=this.children.length-1;e>=0;e--){const i=this.children[e];i==null||i.commonTimeNode.seekToStart()}}repeatTimeNodeEnd(){this.dispose(),this.children.forEach(t=>{t.commonTimeNode.isActive=!1,t.commonTimeNode.dispose()})}dispose(t=!1){this.isConflictDispose=t,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(Ne.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch{}this.startConds.reset(),this.endConds.reset()}seekToEnd(t,e=!1){if(this.isInfiniteRepeat())return;!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();const i=this.json.autoRev||t;if(i?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(n=>n.seekToEnd(i,e));this.children.length===0&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach(n=>n.commonTimeNode.seekToEnd(i,e)),e&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach(n=>n.commonTimeNode.seekToEnd(!1)),this.clearSubList())}isTimeNodeEndWhenDetectEndSync(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;let t=!0;return this.children.length>0&&(t=t&&this.children.every(e=>e.commonTimeNode.isTimeNodeEndWhenDetectEndSync())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||t}isTimeNodeEnd(){let t=!0;return this.children.length>0&&(t=t&&this.children.every(e=>e.commonTimeNode.isTimeNodeEnd())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||t}emitEndEvents(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit(`time ${this.json.id} end`),this.eventHubs.global.emit(`time ${this.json.id} onEnd`),this.eventHubs.runtime.emit(`runtime ${this.json.id} end`),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}collectStartValue(){this.emit("timeNodeCreate"),this.children.forEach(t=>t.commonTimeNode.collectStartValue())}destroy(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach(t=>t.commonTimeNode.destroy()),this.clearSubList()}}class tT extends P.a{constructor(t){super(),this.isRunning=!1,this.runtimeNodeEventHub=new P.a;const{json:e,iterateType:i,isIterate:n,isSub:o,parent:s,ctx:a,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.id=e.ctn.id,this.json=e,this.ctx=a,this.isIterate=n,this.globalEventHub=l,this.commonTimeNode=new Ic({json:e.ctn,isSub:o,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:a,parent:s,isIterate:!1,iterateType:i,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}),this.commonTimeNode.on("timeNodeStart",()=>{this.commonTimeNode.children.forEach(p=>{p.commonTimeNode.setReverse(this.commonTimeNode.getReverse()),p.commonTimeNode.startTimeNode()}),this.isRunning||(this.isRunning=!0,this.globalEventHub.emit(`runtime ${this.id} begin`),this.emit("begin"))}),this.commonTimeNode.on("timeNodeRepeat",()=>{this.commonTimeNode.children.forEach(p=>{p.commonTimeNode.startTimeNode(!1)})}),this.commonTimeNode.on("timeNodeEnd",()=>{this.commonTimeNode.isTimeNodeEnd()&&this.isRunning&&(this.isRunning=!1,this.globalEventHub.emit(`runtime ${this.id} end`),this.emit("end"))})}}var OL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class NL{constructor(t,e,i){this.json=t,this.ctx=i,this.globalEventHub=e;const n=t.timeNodeList.find(o=>o.type==="par"&&o.ctn.nodeType==="tmRoot");n&&(this.tmRoot=new tT({json:n,isSub:!1,isIterate:!1,eventHub:e,ctx:i,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1}),this.mainSeq=this.tmRoot.commonTimeNode.children.find(o=>{var s,a,l;return((s=o.json)===null||s===void 0?void 0:s.type)==="seq"&&((l=(a=o.json)===null||a===void 0?void 0:a.ctn)===null||l===void 0?void 0:l.nodeType)==="mainSeq"}))}findSeq(t){var e;return(e=this.tmRoot)===null||e===void 0?void 0:e.commonTimeNode.children.find(i=>{var n,o,s;return((n=i.json)===null||n===void 0?void 0:n.type)==="seq"&&((s=(o=i.json)===null||o===void 0?void 0:o.ctn)===null||s===void 0?void 0:s.id)===t})}start(){var t,e;return OL(this,void 0,void 0,function*(){this.json.autoPlayMainSeq?(yield this.ctx.clock.delay(16),(t=this.mainSeq)===null||t===void 0||t.commonTimeNode.startTimeNode()):(e=this.mainSeq)===null||e===void 0||e.commonTimeNode.startTimeNode()})}setMainSeqApplied(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}collectMainSeqStartValue(){var t;(t=this.mainSeq)===null||t===void 0||t.commonTimeNode.collectStartValue()}setMainSeqStep(t,e){var i;t===-1&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),(i=this.mainSeq)===null||i===void 0||i.setCurrentStep(t,e)}destroy(){var t;this.globalEventHub.removeAllListeners(),(t=this.tmRoot)===null||t===void 0||t.commonTimeNode.destroy()}hasMainSeq(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}currentMainSeqState(){return this.mainSeq?this.mainSeq.currentState:null}currentMainSeqStep(){return this.mainSeq?this.mainSeq.currentStep:0}currentMainSeqLength(){return this.mainSeq?this.mainSeq.stepLength:0}mainSeqHasNextStep(){return!!this.mainSeq&&this.mainSeq.hasNext()}mainSeqHasPrevStep(){return!!this.mainSeq&&this.mainSeq.hasPrev()}seekInteractiveSeqToEnd(t){const e=this.findSeq(t);e&&e.commonTimeNode.seekToEnd(!1,!0)}setInteractiveSeqState(t,e,i){const n=this.findSeq(t);n&&n.setCurrentStep(e,i)}resetAllInteractiveSeq(){var t;(((t=this.tmRoot)===null||t===void 0?void 0:t.commonTimeNode.children.filter(e=>{var i,n,o;return((i=e.json)===null||i===void 0?void 0:i.type)==="seq"&&((o=(n=e.json)===null||n===void 0?void 0:n.ctn)===null||o===void 0?void 0:o.nodeType)==="interactiveSeq"}))||[]).forEach(e=>{e.setCurrentStep(0,"start")})}applyInteractiveAction(t){this.globalEventHub.emit(t)}}var eT=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class DL extends G_{constructor(t,e,i,n){super({id:"stage",width:t.width,height:t.height,type:"Container",children:t.children},e,i,void 0,n),this.isRendered=!1,this.isTimingStartValueCollected=!1,this.json=t,e.hasBackgroundFillShape=this.detectUseBackgroundFill(this.json),this.container.visible=!1,this.ctx=e;const o=new ks;o.beginFill(16777215),o.drawRect(0,0,t.width,t.height),o.endFill(),this.container.addChild(o)}detectUseBackgroundFill(t){return!!t&&(t.type==="Picture"||t.type==="Shape"?t.useBgFill:!(!t.children||!Object(V.isArray)(t.children))&&t.children.some(e=>this.detectUseBackgroundFill(e)))}initOnReuse(){super.initOnReuse(),this.ctx.timingEventHub.on("c:prev slide",t=>{this.ctx.eventHub.emit(Ne.requestPrevSlide,t)}),this.ctx.timingEventHub.on("c:next slide",t=>{this.ctx.eventHub.emit(Ne.requestNextSlide,t)})}get interactiveContainer(){return this.container}render(t){this.isRendered||(this.collectAnimatedIds().forEach(e=>this.ctx.animatedIds.add(e)),this.isRendered=!0,super.render(t),t.addSubMTask(()=>eT(this,void 0,void 0,function*(){this.ctx.eventHub.emit("StageRenderEnd")}),"@StageImpl[emit.StageRenderEnd]"))}isListTimeNode(t){return["excel","seq","par"].indexOf(t.type)>=0}isAnimatedTimeNode(t){return!!t.cBhvr}collectAnimatedIdsForTimeNode(t,e){var i;this.isListTimeNode(t)?(i=t.ctn.childTnLst)===null||i===void 0||i.forEach(n=>{this.collectAnimatedIdsForTimeNode(n,e)}):this.isAnimatedTimeNode(t)&&e.push(t.cBhvr.target.id)}collectAnimatedIds(){const t=[];return this.json.timing&&this.json.timing.timeNodeList.forEach(e=>{this.collectAnimatedIdsForTimeNode(e,t)}),t}createTiming(){this.json.timing&&!this.timing&&(this.timing=new NL(this.json.timing,this.ctx.timingEventHub,this.ctx))}startTiming(){var t;return((t=this.timing)===null||t===void 0?void 0:t.start())||Promise.resolve()}setMainSeqApplied(){var t;(t=this.timing)===null||t===void 0||t.setMainSeqApplied()}setMainSeqStep(t,e){var i;(i=this.timing)===null||i===void 0||i.setMainSeqStep(t,e)}collectMainSeqStartValue(){var t;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,(t=this.timing)===null||t===void 0||t.collectMainSeqStartValue())}hasTiming(){return!!this.timing}clearOnSlideChange(){this.ctx.eventHub.removeAllListeners(),this.ctx.timingEventHub.removeAllListeners(),super.clearOnSlideChange()}clearOnTransactionEnd(){var t,e;this.ctx.timingTargets.getTargets().forEach(i=>{i.hasPreset=!1}),(t=this.timing)===null||t===void 0||t.resetAllInteractiveSeq(),(e=this.timing)===null||e===void 0||e.destroy(),this.timing=void 0}destroy(){var t,e;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),(t=this.ctx.bgTexture)===null||t===void 0||t.destroy(!0),this.ctx.spriteTexture.destroy(),this.ctx.timingEventHub.removeAllListeners(),(e=this.timing)===null||e===void 0||e.destroy(),this.timing=void 0,super.destroy()}mainSeqStep(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.currentMainSeqStep())!==null&&e!==void 0?e:0}mainSeqLength(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.currentMainSeqLength())!==null&&e!==void 0?e:0}mainSeqHasNextStep(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.mainSeqHasNextStep())!==null&&e!==void 0&&e}mainSeqHasPrevStep(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.mainSeqHasPrevStep())!==null&&e!==void 0&&e}mainSeqState(){return this.timing?this.timing.currentMainSeqState():null}nextStep(t=!1){var e;this.hasTiming()&&((e=this.timing)===null||e===void 0?void 0:e.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onNext",t)):this.ctx.eventHub.emit(Ne.requestNextSlide,t)}prevStep(t=!1){var e;this.hasTiming()&&((e=this.timing)===null||e===void 0?void 0:e.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onPrev",t)):this.ctx.eventHub.emit(Ne.requestPrevSlide,t)}applyInteractiveAction(t){var e;(e=this.timing)===null||e===void 0||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;(e=this.timing)===null||e===void 0||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,i){var n;(n=this.timing)===null||n===void 0||n.setInteractiveSeqState(t,e,i)}setMediaState(t,e){return eT(this,void 0,void 0,function*(){const i=this.ctx.medias[t];i&&(e?yield i.play():yield i.pause())})}setMediaCurrentTime(t,e){const i=this.ctx.medias[t];i&&i.seek(e)}}class FL{constructor(t){this.ticker=t,this.tasks=[],this.couldRunning=!1,this.applyNext=()=>{const e=this.tasks[0];e&&e.applyNext()},t.add(this.applyNext)}addTask(t){this.tasks.push(t),t.once("task-finish",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)}),t.once("task-error",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)})}start(){this.couldRunning=!0}stop(){this.couldRunning=!1}}var BL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};const kL=r=>new Promise(t=>setTimeout(t,r));class UL extends P.a{constructor(t,e,i){super(),this.slideIndex=t,this.taskId=e,this.logger=i,this.uuid=Tp(),this.isCancel=!1,this.tasks=[]}addMTask(t,e){this.tasks.push({fn:t,state:"wait",sub:[],name:e})}addSubMTask(t,e){let i=this.tasks.findIndex(n=>n.state==="running");i<0&&(i=0),this.tasks[i].sub.push({fn:t,state:"wait",sub:[],name:e})}cancel(){this.tasks=[],this.isCancel=!0}applyNext(){if(this.tasks.some(e=>e.state==="running")||this.tasks.some(e=>e.state==="error"))return;if(this.tasks.every(e=>e.state==="finish"))return void(this.isCancel||this.emit("task-finish"));const t=this.tasks.find(e=>e.state==="wait");t&&(t.state="running",t.fn.apply(null).then(()=>{if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(i=>i===t);this.tasks.splice(e+1,0,...t.sub)}}).catch(e=>{t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",Tn.transform(e),this.slideIndex)}))}applyAll(){return BL(this,void 0,void 0,function*(){for(;!this.tasks.every(t=>t.state==="finish");)if(this.tasks.some(t=>t.state==="running"))yield kL(16);else{if(this.tasks.some(t=>t.state==="error"))return;{const t=this.tasks.find(e=>e.state==="wait");if(t){t.state="running";try{if((yield Ac(()=>t.fn.apply(null),6e4))===La)throw new Tn(cr.RuntimeError,`subtask ${t.name} apply timeout`);if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(i=>i===t);this.tasks.splice(e+1,0,...t.sub)}}catch(e){let i;i=e!=null&&e.errorType?e:new Tn(cr.RuntimeError,`subtask ${t.name} error. ${e}`),t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",Tn.transform(i),this.slideIndex);break}}}}!this.isCancel&&this.tasks.every(t=>t.state==="finish")&&this.emit("task-finish")})}}var GL=v(53);const H_=new(v.n(GL)).a,HL=H_.getDevice(),zL=H_.getBrowser(),Mg=H_.getOS(),Ag={isDesktop(){let r=!0;return HL.type==="mobile"&&(r=!1),/Samsung/.test(zL.name||"")&&(r=!1),window.__nativeTags&&window.__nativeTags.platform&&(r=!1),r},isIOS(){let r=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(r=!0),Mg.name&&/iOS/.test(Mg.name)&&(r=!0),r},isAndroid(){let r=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(r=!0),Mg.name&&/android/i.test(Mg.name)&&(r=!0),r},isLowGpuMemory(){var r,t;const e=(t=(r=window.__nativeTags)===null||r===void 0?void 0:r.platform)!==null&&t!==void 0?t:"";if(e){const i=e.split(" ");if(i[1]){if(/^iPad/.test(i[1])){const n=i[1].match(/^iPad(\d+)/);return!(n&&n[1]&&parseInt(n[1],10)>=6)}if(/^iPhone/.test(i[1])){const n=i[1].match(/^iPhone(\d+)/);return!(n&&n[1]&&parseInt(n[1],10)>=9)}return!1}return!1}return!0}};var Lc=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class jL{constructor(t,e,i,n,o,s,a,l,u,h,d,p,m,g){this.loader=t,this.mode=e,this.renderer=i,this.ticker=n,this.view=o,this.clock=s,this.objPoolGroup=a,this.errorChannel=l,this.localstorage=u,this.logger=h,this.loaderDelegate=d,this.isPlayerPaused=p,this.maxResolution=m,this.volumeAdjuster=g,this.currentStageIndex=0,this.cacheCount=Ag.isDesktop()?2:1,this.stageStates=Object.create(null),this.stageJsons=Object.create(null),this.stageCtxs=Object.create(null),this.stageImpls=Object.create(null),this.taskId="",this.url="",this.runningAudio=new Map,this.activeMedia=new Set,this.microTaskManager=new FL(n)}setResourceData(t,e){this.taskId=t,this.url=e}createCtx(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=new TI(this.loader),n=new P.a,o={taskId:this.taskId,mode:this.mode,renderer:this.renderer,graphicsTexture:new RI,stageWidth:0,stageHeight:0,ticker:this.ticker,timingTargets:new PI(n),eventHub:n,view:this.view,medias:Object.create(null),lastViewedIndex:0,conflictTimeNodeManager:new CI,clock:this.clock,spriteTexture:i,slideIndex:t,objectPoolGroup:this.objPoolGroup,hasBackgroundFillShape:!1,slideScopeEventHub:new P.a,logger:this.logger,loaderDelegate:this.loaderDelegate,runningAudio:this.runningAudio,activeMedia:this.activeMedia,isPlayerPaused:this.isPlayerPaused,timingEventHub:new P.a,maxResolution:this.maxResolution,animatedIds:new Set,volumeAdjuster:this.volumeAdjuster};this.stageCtxs[t]=o}),"@StagePool[createCtx]")}loadStageJson(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t}.json`);this.stageJsons[t]=i,this.stageCtxs[t].stageWidth=i.width,this.stageCtxs[t].stageHeight=i.height}),"@StagePool[loadStageJson]")}loadSpriteSheets(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const i=this.stageJsons[t],{spriteTexture:n,stageWidth:o,stageHeight:s}=this.stageCtxs[t],{coloredSheets:a,sheets:l}=i,u=a||l;return u&&u.forEach(h=>{e.addSubMTask(()=>{let d=1;if(o>this.maxResolution.x||s>this.maxResolution.y){d=this.maxResolution.x/o;const p=d*s;p>this.maxResolution.y&&(d*=this.maxResolution.y/p)}return n.loadSpriteSheetItem(this.url,this.taskId,h,d)},"@StagePool[spriteTexture.loadSpriteSheetItem]")}),Promise.resolve()},"@StagePool[loadSpriteSheets]")}createStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const i=this.stageJsons[t],n=this.stageCtxs[t],o=new DL(i,n,{x:0,y:0},e);return this.stageImpls[t]=o,Promise.resolve()},"@StagePool[createStage]")}preRenderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>(this.stageImpls[t].preRender(e),Promise.resolve()),"@StagePool[preRenderStage]")}createGraphicsTexture(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=this.stageCtxs[t];i.graphicsTexture.pack().forEach((n,o)=>{e.addSubMTask(()=>i.graphicsTexture.render(n,o,this.objPoolGroup),"@StagePool[graphicsTexture.render]")})}),"@StagePool[createGraphicsTexture]")}renderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=this.stageImpls[t],n=this.stageCtxs[t];yield i.render(e),e.addSubMTask(()=>Lc(this,void 0,void 0,function*(){var o;const s=`snapshot-${t.toString()}-start`;if(!(yield(o=this.localstorage)===null||o===void 0?void 0:o.getItem(s))&&Gn.platform.isLowGpuMemory()){i.createTiming(),i.container.visible=!0,i.collectMainSeqStartValue(),i.setMainSeqStep(0,"start");const a=$r.create({width:i.json.width,height:i.json.height,resolution:1});n.renderer.render(i.container,{renderTexture:a});const l=n.renderer.plugins.extract.base64(a,"image/jpeg");this.localstorage.setItem(s,l,!0).catch(()=>{}),i.container.visible=!1,a.destroy(),i.timing&&(i.timing.destroy(),i.timing=void 0)}}),"@StagePool[snapshot]")}),"@StagePool[renderStage]")}destroyStageByIndex(t){this.stageStates[t].state==="load"&&this.stageStates[t].task.cancel(),delete this.stageStates[t],this.stageImpls[t].destroy(),delete this.stageImpls[t],delete this.stageCtxs[t]}destroyStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);Math.abs(this.currentStageIndex-e)>this.cacheCount&&this.destroyStageByIndex(e)})}destroyAllStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);this.destroyStageByIndex(e)})}preload(t,e=!1){if(this.stageImpls[t]||this.stageStates[t])return Promise.resolve();const i=new UL(t,this.taskId,this.logger);return i.on("task-error",(n,o)=>{delete this.stageStates[o],delete this.stageImpls[o],delete this.stageCtxs[o],this.errorChannel.emit("error",n,o)}),this.stageStates[t]={state:"load",task:i},this.createCtx(t),this.loadStageJson(t),this.loadSpriteSheets(t),this.createStage(t),this.preRenderStage(t),this.createGraphicsTexture(t),this.renderStage(t),this.microTaskManager.addTask(i),e?i.applyAll():new Promise(n=>{i.once("task-finish",()=>{this.stageStates[t].state="finish",Object.keys(this.stageStates).length>2*this.cacheCount+1&&this.destroyStage(),n()})})}getStageJson(t){return this.stageJsons[t]||null}getStage(t){return Lc(this,void 0,void 0,function*(){this.currentStageIndex=t;const e=this.stageStates[t];return(e==null?void 0:e.state)==="finish"&&this.stageImpls[t]?this.stageImpls[t]:(e==null?void 0:e.state)==="load"?(yield e.task.applyAll(),this.stageImpls[t]):(yield this.preload(t,!0),this.stageImpls[t])})}destroy(){this.runningAudio.clear()}}var iT=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class No{constructor(t){var e;this.logger=t,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,(e=No.localCache)===null||e===void 0||e.ready(()=>{this.isIndexDBReady=!0}).catch(()=>{t.warn("local storage not ready",this.taskId)})}get couldUseIndexDBCache(){return this.isIndexDBReady&&this.taskId.length>0}attachTaskId(t){this.taskId=t}getItem(t){return iT(this,void 0,void 0,function*(){let e=null;return this.couldUseIndexDBCache&&No.localCache&&(e=yield Ac(()=>No.localCache.getItem(`${this.taskId}/${t}`),500)),e=e===La?null:e,e||this.memoryCache.get(t)||null})}setItem(t,e,i=!1){return iT(this,void 0,void 0,function*(){if(!this.couldUseIndexDBCache)return i&&this.memoryCache.set(t,e),Promise.resolve();No.localCache&&(yield Ac(()=>No.localCache.setItem(`${this.taskId}/${t}`,e).catch(()=>{i&&this.memoryCache.set(t,e)}),500))===La&&i&&this.memoryCache.set(t,e)})}dispose(){var t;this.memoryCache=new Map,this.couldUseIndexDBCache&&((t=No.localCache)===null||t===void 0||t.keys().then(e=>{e.filter(i=>i.indexOf(this.taskId)>=0).forEach(i=>{var n;(n=No.localCache)===null||n===void 0||n.removeItem(i).catch(()=>{})})}))}}No.localCache=null;try{No.localCache=ht.createInstance({name:"slide_local_cache",driver:ht.INDEXEDDB,version:1})}catch{}class VL extends P.a{constructor(){super(...arguments),this._volume=.5}get volume(){return this._volume}set volume(t){t<0&&(t=0),t>1&&(t=1),this._volume=t,this.emit("update",this._volume)}}var Oc=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};q.skipHello();const nT={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip"},Ne={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",userInput:"userInput"};class Gn extends P.a{constructor(t,e={}){super(),this.errorChannel=new P.a,this.transactionPlayer=null,this.transactionSprite=new hr,this.isForward=!0,this.drawCall=0,this.scale=1,this.prevSlideBase64=null,this._isPaused=!1,this.maxResolution=new wn(0,0),this.fps=new vI,this.designWidth=0,this.designHeight=0,this.currentIndex=0,this.slideCount=0,this.runtime={drawCall:0,fps:0},this.isPlayerPaused=()=>this._isPaused,this.onWebGLLost=()=>{this.errorChannel.emit("error",new Tn(cr.CanvasCrash,"webgl context lost."))},this.logger=t.logger,this.mode=t.mode,this.volumeAdjuster=t.volumeAdjuster,this.localStorage=new No(this.logger);let i=Math.max(window.devicePixelRatio,2);Ag.isDesktop()||(i=1),this.config={minFPS:Object(V.isUndefined)(e.minFPS)?30:e.minFPS,maxFPS:Object(V.isUndefined)(e.maxFPS)?40:e.maxFPS,resolution:Object(V.isUndefined)(e.resolution)?i:e.resolution,autoFPS:!Object(V.isUndefined)(e.autoFPS)&&e.autoFPS,autoResolution:!Object(V.isUndefined)(e.autoResolution)&&e.autoResolution,transactionBgColor:Object(V.isUndefined)(e.transactionBgColor)?0:e.transactionBgColor,maxResolutionLevel:this.getMaxResolution(e.maxResolutionLevel)},this.updateMaxResolutionLevel(this.config.maxResolutionLevel),this.loader=new xI(this.localStorage,t.useLocalCache,this.logger,t.resourceTimeout,t.loadDelegate),this.app=new eg({antialias:!0,autoDensity:!1,backgroundColor:16777215}),this.updateConfig(this.config),this.app.view.style.zIndex="1",this.app.stage.sortableChildren=!0;const n=this.app.renderer,{drawElements:o}=n.gl;n.gl.drawElements=(...s)=>{o.call(n.gl,...s),this.drawCall+=1},this.fps.on("update",s=>{if(s<this.config.minFPS){if(this.config.autoResolution){const a=.7*this.scale,l=this.app.renderer.resolution,u=Math.max(a,l-.1);u>=a&&this.updateResolution(u)}if(this.config.autoFPS){const{minFPS:l,maxFPS:u}=this.app.ticker,h=Math.max(14,l-2),d=Math.max(14,u-2);h>=14&&d>=14&&(this.app.ticker.minFPS=h,this.app.ticker.maxFPS=d)}}else if(s>this.config.maxFPS){if(this.config.autoResolution){const a=this.scale*this.config.resolution,l=this.app.renderer.resolution,u=Math.min(a,l+.1);u<=this.config.resolution&&this.updateResolution(u)}if(this.config.autoFPS){const a=this.config.minFPS,l=this.config.maxFPS,{minFPS:u,maxFPS:h}=this.app.ticker,d=Math.min(a,u+2),p=Math.min(l,h+2);d<=a&&p<=l&&(this.app.ticker.minFPS=d,this.app.ticker.maxFPS=p)}}}),this.app.ticker.add(()=>{this.runtime.drawCall=this.drawCall,this.runtime.fps=Math.floor(this.app.ticker.minFPS),this.drawCall=0},null,os.LOW),this.clock=new wI(this.app.ticker),this.objPoolGroup=Tp(),this.stagePool=new jL(this.loader,this.mode,this.app.renderer,this.app.ticker,this.app.view,this.clock,this.objPoolGroup,this.errorChannel,this.localStorage,this.logger,t.loadDelegate,this.isPlayerPaused,this.maxResolution,this.volumeAdjuster),this.app.view.addEventListener("webglcontextlost",this.onWebGLLost);try{this.transactionPlayer=new xR}catch(s){/Error creating WebGL context/.test(s.message)?this.errorChannel.emit("error",new Tn(cr.CanvasCrash,"webgl context lost.")):this.errorChannel.emit("error",new Tn(cr.RuntimeWarn,s.message))}}get view(){return this.app.renderer?this.app.view:null}get nextSlideIndex(){var t;return!((t=this.currentStage)===null||t===void 0)&&t.json.nextIndex?this.currentStage.json.nextIndex:this.currentIndex+1}get prevSlideIndex(){var t;return!((t=this.currentStage)===null||t===void 0)&&t.json.prevIndex?this.currentStage.json.prevIndex:this.currentIndex-1}getMaxResolution(t){return!Object(V.isUndefined)(t)&&Number.isInteger(t)?(t<1&&(t=1),t>4&&(t=4),t):Gn.platform.isAndroid()||Gn.platform.isIOS()?2:4}updateMaxResolutionLevel(t){t<1&&(t=1),t>4&&(t=4);const e=[999999,960,1280,1920,3200][t],i=[999999,540,720,1080,1800][t];this.maxResolution.set(e,i)}updateConfig(t){Object(V.isUndefined)(t.minFPS)||(this.config.minFPS=t.minFPS,this.app.ticker.minFPS=t.minFPS),Object(V.isUndefined)(t.maxFPS)||(this.config.maxFPS=t.maxFPS,this.app.ticker.maxFPS=t.maxFPS),Object(V.isUndefined)(t.resolution)||(this.config.resolution=t.resolution,this.updateResolution(this.scale*this.config.resolution)),Object(V.isUndefined)(t.autoFPS)||(this.config.autoFPS=t.autoFPS),Object(V.isUndefined)(t.autoResolution)||(this.config.autoResolution=t.autoResolution),Object(V.isUndefined)(t.transactionBgColor)||(this.config.transactionBgColor=t.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId),Object(V.isUndefined)(t.maxResolutionLevel)||(this.config.maxResolutionLevel=t.maxResolutionLevel,this.updateMaxResolutionLevel(this.config.maxResolutionLevel))}preload(t){return Oc(this,void 0,void 0,function*(){t<1||t>this.slideCount||(this.logger.info(`preload slide ${t} begin`,this.taskId),yield this.stagePool.preload(t),this.logger.info(`preload slide ${t} end`,this.taskId))})}setResourceData(t,e){this.logger.info("ppt player init config: "+JSON.stringify(this.config),t),this.logger.info("set resource to "+e,t),this.taskId=t,this.url=e,this.stagePool.setResourceData(t,e),this.localStorage.attachTaskId(t),this.loader.attachTaskId(t)}setInteractive(t){this.app.stage.interactive=t,this.app.stage.interactiveChildren=t}translateEvent(t,e){e.forEach(i=>{t.on(i,(...n)=>{this.emit(i,...n)})})}renderSlide(t,e=!1){var i;return Oc(this,void 0,void 0,function*(){if(this._isPaused)return void this.logger.info("ppt play prevent render slide with paused state",this.taskId);this.logger.info("render slide "+t,this.taskId),this.emit(Ne.renderStart,t);const n=yield this.stagePool.getStage(t);if(!n)return;this.translateEvent(n.ctx.eventHub,[Ne.mainSeqStepChange,Ne.mainSeqStateChange,Ne.hyperlinkTrigger,Ne.interactiveSeqAction,Ne.mainSeqStepStart,Ne.mainSeqStepEnd,Ne.animateStart,Ne.animateEnd,Ne.mediaPlay,Ne.mediaPause,Ne.mediaSeek,Ne.requestGotoSlide,Ne.requestNextSlide,Ne.requestPrevSlide,Ne.interactiveSeqStateChange,Ne.userInput]),this.currentIndex=Number(t);const{width:o,height:s,slideCount:a}=n.json;this.slideCount=a,this.designWidth=o,this.designHeight=s,n.json.transition&&n.json.transition.type&&!this.prevSlideBase64&&this.currentStage&&(this.prevSlideBase64=this.getBase64(this.currentStage)),(i=this.currentStage)===null||i===void 0||i.clearOnSlideChange();const l=this.currentStage;this.currentStage=n,n.initOnReuse(),n.createTiming(),n.container.visible=!0,n.collectMainSeqStartValue(),this.isForward?n.setMainSeqStep(0,"start"):n.setMainSeqStep(-1,"end");let u=null;if(n.json.transition&&n.json.transition.type){const d=t.toString()+(this.isForward||e?"-start":"-end");u=(yield this.localStorage.getItem("snapshot-"+d))||this.getBase64(this.currentStage)}n.container.visible=!1,this.app.stage.addChild(n.container);let{transition:h}=n.json;!this.isForward&&(l==null?void 0:l.json.transition)&&(h=l.json.transition),this.prevSlideBase64&&u&&h&&h.type&&l&&n&&(yield this.playTransaction(this.prevSlideBase64,u,h,l,n),this.prevSlideBase64=null),this.isForward?yield n.startTiming():n.setMainSeqApplied(),this.updateResolution(this.config.resolution*this.scale),n.container.visible=!0,l&&(l.setMainSeqStep(0,"start"),l.clearOnTransactionEnd(),this.app.stage.removeChild(l.container)),n.ctx.slideScopeEventHub.emit("slide-render",n.ctx.slideIndex),this.emit(Ne.renderEnd,t),this.emit(Ne.slideChange,t),this.preload(t+1).catch(d=>{this.errorChannel.emit("error",Tn.transform(d),t+1)}),this.preload(t-1).catch(d=>{this.errorChannel.emit("error",Tn.transform(d),t-1)})})}renderToBase64(t,e,i){return Oc(this,void 0,void 0,function*(){const n=yield this.stagePool.getStage(t);if(n){const{width:o,height:s}=n.json;this.designWidth=o,this.designHeight=s;const a=$r.create({width:this.designWidth,height:this.designHeight,resolution:e});n.container.visible=!0,this.app.renderer.render(n.container,{renderTexture:a});const l=this.app.renderer.plugins.extract.base64(a,i);return this.stagePool.destroyStageByIndex(t),l}return"__null__"})}getBase64(t){if(!t.container.transform)return null;const e=$r.create({width:this.designWidth,height:this.designHeight,resolution:1});this.app.renderer.render(t.container,{renderTexture:e});const i=this.app.renderer.plugins.extract.base64(e,"image/jpeg");return e.destroy(!0),i}playTransaction(t,e,i,n,o){return Oc(this,void 0,void 0,function*(){const s=this.app.view.parentElement;if(t&&e&&s&&nT[i.type]&&this.transactionPlayer){this.transactionSprite.zIndex=999,this.transactionSprite.visible=!1,this.app.stage.addChild(this.transactionSprite);const a=this.transactionPlayer.renderer.domElement,l=Qe.from(a),u=()=>l.update();return this.app.ticker.add(u),this.transactionSprite.texture=l,setTimeout(()=>{this.transactionSprite.visible=!0},100),new Promise(h=>{var d,p,m,g;(d=this.transactionPlayer)===null||d===void 0||d.play({reverse:!this.isForward,prevTextureUrl:t,nextTextureUrl:e,textureWidth:this.designWidth,textureHeight:this.designHeight,presetType:nT[i.type],stageWidth:this.designWidth,stageHeight:this.designHeight,duration:(m=(p=this.currentStage)===null||p===void 0?void 0:p.json.transition)===null||m===void 0?void 0:m.dur,delay:0,clearColor:this.config.transactionBgColor,maxFPS:Math.ceil((g=this.config.maxFPS)!==null&&g!==void 0?g:60),onTransactionEnd:()=>{var _,y;h(),n.container.visible=!1,o.container.visible=!0,(_=this.app.stage)===null||_===void 0||_.removeChild(this.transactionSprite),(y=this.app.ticker)===null||y===void 0||y.remove(u)}})})}return Promise.resolve()})}scaleView(t,e,i){if(this.view&&(this.view.style.width=Math.floor(this.designWidth*t)+"px",this.view.style.height=Math.floor(this.designHeight*t)+"px"),e){this.scale=t;const n=this.scale*this.config.resolution;this.updateResolution(n,i)}}updateResolution(t,e){this.app.ticker.addOnce(()=>{let i=Ag.isDesktop()?t:1;for(;i*this.designWidth>this.maxResolution.x||i*this.designHeight>this.maxResolution.y;)i-=.1;this.app.renderer.resolution=i,this.app.renderer.plugins.interaction.resolution=this.app.renderer.resolution,this.app.renderer.resize(this.designWidth,this.designHeight),Object(V.isFunction)(e)&&e()})}nextStep(t=!1){var e;if(this._isPaused)this.logger.info("ppt play prevent next step with paused state",this.taskId);else{this.logger.info("ppt play trigger next step",this.taskId);try{(e=this.currentStage)===null||e===void 0||e.nextStep(t)}catch(i){this.errorChannel.emit("error",Tn.transform(i),this.currentIndex)}}}prevStep(t=!1){var e;if(this._isPaused)this.logger.info("ppt play prevent prev step with paused state",this.taskId);else{this.logger.info("ppt play trigger prev step",this.taskId);try{(e=this.currentStage)===null||e===void 0||e.prevStep(t)}catch(i){this.errorChannel.emit("error",Tn.transform(i),this.currentIndex)}}}mainSeqLength(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqLength())!==null&&e!==void 0?e:0}mainSeqStep(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqStep())!==null&&e!==void 0?e:0}setMainSeqStep(t,e){var i;(i=this.currentStage)===null||i===void 0||i.setMainSeqStep(t,e)}mainSeqState(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqState())!==null&&e!==void 0?e:null}mainSeqHasNextStep(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqHasNextStep())!==null&&e!==void 0&&e}mainSeqHasPrevStep(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqHasPrevStep())!==null&&e!==void 0&&e}nextTick(t){this.app.ticker.addOnce(()=>{t()},os.LOW)}applyInteractiveAction(t){var e;(e=this.currentStage)===null||e===void 0||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;(e=this.currentStage)===null||e===void 0||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,i){var n;(n=this.currentStage)===null||n===void 0||n.setInteractiveSeqState(t,e,i)}setMediaState(t,e){var i;return Oc(this,void 0,void 0,function*(){yield(i=this.currentStage)===null||i===void 0?void 0:i.setMediaState(t,e)})}setMediaCurrentTime(t,e){var i;(i=this.currentStage)===null||i===void 0||i.setMediaCurrentTime(t,e)}pause(){var t;this.app.ticker.stop(),(t=this.currentStage)===null||t===void 0||t.ctx.activeMedia.forEach(e=>{e.globalPause()}),this._isPaused=!0}resume(){var t;this._isPaused=!1,this.app.ticker.start(),(t=this.currentStage)===null||t===void 0||t.ctx.activeMedia.forEach(e=>{e.globalResume()})}getSnapshot(){return this.currentStage&&this.getBase64(this.currentStage)||""}createSnapshotForNextSlide(t){return Oc(this,void 0,void 0,function*(){const e=this.nextSlideIndex,i=this.stagePool.getStageJson(e);if(i&&i.transition&&i.transition.type&&this.currentStage&&this.transactionPlayer){const n=t?`snapshot-${this.currentStage.json.index}-start`:`snapshot-${this.currentStage.json.index}-end`;if(this.currentStage.timing&&(t?this.currentStage.timing.mainSeqHasPrevStep():this.currentStage.timing.mainSeqHasNextStep()))this.prevSlideBase64=this.getBase64(this.currentStage);else{const o=yield this.localStorage.getItem(n);o?this.prevSlideBase64=o:(this.prevSlideBase64=this.getBase64(this.currentStage),this.localStorage.setItem(n,this.prevSlideBase64,!0).catch(()=>{}))}}})}clearLocalCache(){this.localStorage.dispose()}static clearLocalCache(){var t;(t=No.localCache)===null||t===void 0||t.clear().catch(()=>{})}destroy(){var t;try{this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost);try{this.app.renderer.filter.texturePool.clear(!0)}catch{}C_.collectObjectByGroup(this.objPoolGroup),P_.collectObjectByGroup(this.objPoolGroup),(t=this.transactionPlayer)===null||t===void 0||t.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy();try{this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext()}catch{}this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0})}catch{}}}Gn.platform=Ag,Gn.RtcAudioClazz=null;var z_=new Map;function WL(r){var t=z_.get(r.hookPoint)||[];t.push(r),z_.set(r.hookPoint,t)}var Op,Hu=[],rT="ResizeObserver loop completed with undelivered notifications.";(function(r){r.BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Op||(Op={}));var j_,zu=function(r){return Object.freeze(r)},XL=function(r,t){this.inlineSize=r,this.blockSize=t,zu(this)},oT=function(){function r(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,zu(this)}return r.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},r.fromRect=function(t){return new r(t.x,t.y,t.width,t.height)},r}(),V_=function(r){return r instanceof SVGElement&&"getBBox"in r},sT=function(r){if(V_(r)){var t=r.getBBox(),e=t.width,i=t.height;return!e&&!i}var n=r,o=n.offsetWidth,s=n.offsetHeight;return!(o||s||r.getClientRects().length)},aT=function(r){var t,e;if(r instanceof Element)return!0;var i=(e=(t=r)===null||t===void 0?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(i&&r instanceof i.Element)},Np=typeof window!="undefined"?window:{},Rg=new WeakMap,lT=/auto|scroll/,qL=/^tb|vertical/,YL=/msie|trident/i.test(Np.navigator&&Np.navigator.userAgent),Hs=function(r){return parseFloat(r||"0")},Nc=function(r,t,e){return r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=!1),new XL((e?t:r)||0,(e?r:t)||0)},uT=zu({devicePixelContentBoxSize:Nc(),borderBoxSize:Nc(),contentBoxSize:Nc(),contentRect:new oT(0,0,0,0)}),hT=function(r,t){if(t===void 0&&(t=!1),Rg.has(r)&&!t)return Rg.get(r);if(sT(r))return Rg.set(r,uT),uT;var e=getComputedStyle(r),i=V_(r)&&r.ownerSVGElement&&r.getBBox(),n=!YL&&e.boxSizing==="border-box",o=qL.test(e.writingMode||""),s=!i&&lT.test(e.overflowY||""),a=!i&&lT.test(e.overflowX||""),l=i?0:Hs(e.paddingTop),u=i?0:Hs(e.paddingRight),h=i?0:Hs(e.paddingBottom),d=i?0:Hs(e.paddingLeft),p=i?0:Hs(e.borderTopWidth),m=i?0:Hs(e.borderRightWidth),g=i?0:Hs(e.borderBottomWidth),_=d+u,y=l+h,w=(i?0:Hs(e.borderLeftWidth))+m,A=p+g,I=a?r.offsetHeight-A-r.clientHeight:0,F=s?r.offsetWidth-w-r.clientWidth:0,N=n?_+w:0,U=n?y+A:0,B=i?i.width:Hs(e.width)-N-F,G=i?i.height:Hs(e.height)-U-I,ct=B+_+F+w,it=G+y+I+A,tt=zu({devicePixelContentBoxSize:Nc(Math.round(B*devicePixelRatio),Math.round(G*devicePixelRatio),o),borderBoxSize:Nc(ct,it,o),contentBoxSize:Nc(B,G,o),contentRect:new oT(d,l,B,G)});return Rg.set(r,tt),tt},cT=function(r,t,e){var i=hT(r,e),n=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case Op.DEVICE_PIXEL_CONTENT_BOX:return s;case Op.BORDER_BOX:return n;default:return o}},$L=function(r){var t=hT(r);this.target=r,this.contentRect=t.contentRect,this.borderBoxSize=zu([t.borderBoxSize]),this.contentBoxSize=zu([t.contentBoxSize]),this.devicePixelContentBoxSize=zu([t.devicePixelContentBoxSize])},dT=function(r){if(sT(r))return 1/0;for(var t=0,e=r.parentNode;e;)t+=1,e=e.parentNode;return t},JL=function(){var r=1/0,t=[];Hu.forEach(function(n){if(n.activeTargets.length!==0){var o=[];n.activeTargets.forEach(function(s){var a=new $L(s.target),l=dT(s.target);o.push(a),s.lastReportedSize=cT(s.target,s.observedBox),l<r&&(r=l)}),t.push(function(){n.callback.call(n.observer,o,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var e=0,i=t;e<i.length;e++)(0,i[e])();return r},pT=function(r){Hu.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(e){e.isActive()&&(dT(e.target)>r?t.activeTargets.push(e):t.skippedTargets.push(e))})})},ZL=function(){var r,t=0;for(pT(t);Hu.some(function(e){return e.activeTargets.length>0});)t=JL(),pT(t);return Hu.some(function(e){return e.skippedTargets.length>0})&&(typeof ErrorEvent=="function"?r=new ErrorEvent("error",{message:rT}):((r=document.createEvent("Event")).initEvent("error",!1,!1),r.message=rT),window.dispatchEvent(r)),t>0},fT=[],KL=function(r){if(!j_){var t=0,e=document.createTextNode("");new MutationObserver(function(){return fT.splice(0).forEach(function(i){return i()})}).observe(e,{characterData:!0}),j_=function(){e.textContent=""+(t?t--:t++)}}fT.push(r),j_()},W_=0,QL={attributes:!0,characterData:!0,childList:!0,subtree:!0},mT=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],gT=function(r){return r===void 0&&(r=0),Date.now()+r},X_=!1,q_=new(function(){function r(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return r.prototype.run=function(t){var e=this;if(t===void 0&&(t=250),!X_){X_=!0;var i,n=gT(t);i=function(){var o=!1;try{o=ZL()}finally{if(X_=!1,t=n-gT(),!W_)return;o?e.run(1e3):t>0?e.run(t):e.start()}},KL(function(){requestAnimationFrame(i)})}},r.prototype.schedule=function(){this.stop(),this.run()},r.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,QL)};document.body?e():Np.addEventListener("DOMContentLoaded",e)},r.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),mT.forEach(function(e){return Np.addEventListener(e,t.listener,!0)}))},r.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),mT.forEach(function(e){return Np.removeEventListener(e,t.listener,!0)}),this.stopped=!0)},r}()),vT=function(r){!W_&&r>0&&q_.start(),!(W_+=r)&&q_.stop()},tO=function(){function r(t,e){this.target=t,this.observedBox=e||Op.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return r.prototype.isActive=function(){var t,e=cT(this.target,this.observedBox,!0);return t=this.target,V_(t)||function(i){switch(i.tagName){case"INPUT":if(i.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||getComputedStyle(t).display!=="inline"||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},r}(),eO=function(r,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=t},Cg=new WeakMap,_T=function(r,t){for(var e=0;e<r.length;e+=1)if(r[e].target===t)return e;return-1},Pg=function(){function r(){}return r.connect=function(t,e){var i=new eO(t,e);Cg.set(t,i)},r.observe=function(t,e,i){var n=Cg.get(t),o=n.observationTargets.length===0;_T(n.observationTargets,e)<0&&(o&&Hu.push(n),n.observationTargets.push(new tO(e,i&&i.box)),vT(1),q_.schedule())},r.unobserve=function(t,e){var i=Cg.get(t),n=_T(i.observationTargets,e),o=i.observationTargets.length===1;n>=0&&(o&&Hu.splice(Hu.indexOf(i),1),i.observationTargets.splice(n,1),vT(-1))},r.disconnect=function(t){var e=this,i=Cg.get(t);i.observationTargets.slice().forEach(function(n){return e.unobserve(t,n.target)}),i.activeTargets.splice(0,i.activeTargets.length)},r}(),iO=function(){function r(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Pg.connect(this,t)}return r.prototype.observe=function(t,e){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aT(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Pg.observe(this,t,e)},r.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aT(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Pg.unobserve(this,t)},r.prototype.disconnect=function(){Pg.disconnect(this)},r.toString=function(){return"function ResizeObserver () { [polyfill code] }"},r}(),nO=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})},rO=function(r,t){var e,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(n=2&h[0]?i.return:h[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,h[1])).done)return n;switch(i=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,i=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){s=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){s.label=h[1];break}if(h[0]===6&&s.label<n[1]){s.label=n[1],n=h;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(h);break}n[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(d){h=[6,d],i=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,u])}}},oO=function(){function r(t,e,i,n,o){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=i,this.index=t,this.slideIndex=e,this.eventHub=n,this.id=o}return r.prototype.apply=function(){return nO(this,void 0,void 0,function(){var t;return rO(this,function(e){switch(e.label){case 0:this.eventHub.emit("task-start",this),e.label=1;case 1:return e.trys.push([1,3,,4]),this.state="start",[4,this.fn()];case 2:return e.sent(),this.state="end",this.eventHub.emit("task-end",this),[3,4];case 3:return t=e.sent(),this.eventHub.emit("task-error",{task:this,error:t}),[3,4];case 4:return[2]}})})},r}(),sO=function(){function r(){var t=this;this.eventHub=new P.a,this.tasks=[],this.index=0,this.eventHub.on("task-end",function(e){var i,n=t.tasks.findIndex(function(s){return s.index===e.index}),o=n+1;o>=0&&((i=t.tasks[o])===null||i===void 0||i.apply()),n>=0&&(t.tasks.splice(n,1),t.replaceIdleTask()),t.eventHub.emit("task-end-"+e.id)}),this.eventHub.on("task-error",function(e){var i=e.task,n=t.tasks.findIndex(function(o){return o.index===i.index});n>=0&&(t.tasks.splice(n,1),t.replaceIdleTask())})}return r.prototype.replaceIdleTask=function(){for(var t,e=this,i=new Set,n=0,o=this.tasks.length;n<o;n++)this.tasks[n].state==="idle"&&((t=this.tasks[n+1])===null||t===void 0?void 0:t.state)==="idle"&&i.add(n);Array.from(i).forEach(function(s){e.tasks.splice(s,1)})},r.prototype.addTask=function(t,e,i){var n=new oO(this.index++,e,t,this.eventHub,i);this.tasks.push(n),this.tasks.sort(function(o,s){return o.index-s.index}),this.replaceIdleTask(),this.tasks.length===1&&n.apply()},r.prototype.hasStartTask=function(){return this.tasks.some(function(t){return t.state==="start"})},r.prototype.destroy=function(){this.eventHub.removeAllListeners()},r}();function Dc(r,t){var e=r.__state.conversionName.toString(),i=Math.round(r.r),n=Math.round(r.g),o=Math.round(r.b),s=r.a,a=Math.round(r.h),l=r.s.toFixed(1),u=r.v.toFixed(1);if(t||e==="THREE_CHAR_HEX"||e==="SIX_CHAR_HEX"){for(var h=r.hex.toString(16);h.length<6;)h="0"+h;return"#"+h}return e==="CSS_RGB"?"rgb("+i+","+n+","+o+")":e==="CSS_RGBA"?"rgba("+i+","+n+","+o+","+s+")":e==="HEX"?"0x"+r.hex.toString(16):e==="RGB_ARRAY"?"["+i+","+n+","+o+"]":e==="RGBA_ARRAY"?"["+i+","+n+","+o+","+s+"]":e==="RGB_OBJ"?"{r:"+i+",g:"+n+",b:"+o+"}":e==="RGBA_OBJ"?"{r:"+i+",g:"+n+",b:"+o+",a:"+s+"}":e==="HSV_OBJ"?"{h:"+a+",s:"+l+",v:"+u+"}":e==="HSVA_OBJ"?"{h:"+a+",s:"+l+",v:"+u+",a:"+s+"}":"unknown format"}var yT=Array.prototype.forEach,Dp=Array.prototype.slice,oe={BREAK:{},extend:function(r){return this.each(Dp.call(arguments,1),function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(e){this.isUndefined(t[e])||(r[e]=t[e])}.bind(this))},this),r},defaults:function(r){return this.each(Dp.call(arguments,1),function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(e){this.isUndefined(r[e])&&(r[e]=t[e])}.bind(this))},this),r},compose:function(){var r=Dp.call(arguments);return function(){for(var t=Dp.call(arguments),e=r.length-1;e>=0;e--)t=[r[e].apply(this,t)];return t[0]}},each:function(r,t,e){if(r){if(yT&&r.forEach&&r.forEach===yT)r.forEach(t,e);else if(r.length===r.length+0){var i,n=void 0;for(n=0,i=r.length;n<i;n++)if(n in r&&t.call(e,r[n],n)===this.BREAK)return}else for(var o in r)if(t.call(e,r[o],o)===this.BREAK)return}},defer:function(r){setTimeout(r,0)},debounce:function(r,t,e){var i=void 0;return function(){var n=this,o=arguments;function s(){i=null,e||r.apply(n,o)}var a=e||!i;clearTimeout(i),i=setTimeout(s,t),a&&r.apply(n,o)}},toArray:function(r){return r.toArray?r.toArray():Dp.call(r)},isUndefined:function(r){return r===void 0},isNull:function(r){return r===null},isNaN:function(r){function t(e){return r.apply(this,arguments)}return t.toString=function(){return r.toString()},t}(function(r){return isNaN(r)}),isArray:Array.isArray||function(r){return r.constructor===Array},isObject:function(r){return r===Object(r)},isNumber:function(r){return r===r+0},isString:function(r){return r===r+""},isBoolean:function(r){return r===!1||r===!0},isFunction:function(r){return r instanceof Function}},aO=[{litmus:oe.isString,conversions:{THREE_CHAR_HEX:{read:function(r){var t=r.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return t!==null&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:Dc},SIX_CHAR_HEX:{read:function(r){var t=r.match(/^#([A-F0-9]{6})$/i);return t!==null&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:Dc},CSS_RGB:{read:function(r){var t=r.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return t!==null&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:Dc},CSS_RGBA:{read:function(r){var t=r.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return t!==null&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:Dc}}},{litmus:oe.isNumber,conversions:{HEX:{read:function(r){return{space:"HEX",hex:r,conversionName:"HEX"}},write:function(r){return r.hex}}}},{litmus:oe.isArray,conversions:{RGB_ARRAY:{read:function(r){return r.length===3&&{space:"RGB",r:r[0],g:r[1],b:r[2]}},write:function(r){return[r.r,r.g,r.b]}},RGBA_ARRAY:{read:function(r){return r.length===4&&{space:"RGB",r:r[0],g:r[1],b:r[2],a:r[3]}},write:function(r){return[r.r,r.g,r.b,r.a]}}}},{litmus:oe.isObject,conversions:{RGBA_OBJ:{read:function(r){return!!(oe.isNumber(r.r)&&oe.isNumber(r.g)&&oe.isNumber(r.b)&&oe.isNumber(r.a))&&{space:"RGB",r:r.r,g:r.g,b:r.b,a:r.a}},write:function(r){return{r:r.r,g:r.g,b:r.b,a:r.a}}},RGB_OBJ:{read:function(r){return!!(oe.isNumber(r.r)&&oe.isNumber(r.g)&&oe.isNumber(r.b))&&{space:"RGB",r:r.r,g:r.g,b:r.b}},write:function(r){return{r:r.r,g:r.g,b:r.b}}},HSVA_OBJ:{read:function(r){return!!(oe.isNumber(r.h)&&oe.isNumber(r.s)&&oe.isNumber(r.v)&&oe.isNumber(r.a))&&{space:"HSV",h:r.h,s:r.s,v:r.v,a:r.a}},write:function(r){return{h:r.h,s:r.s,v:r.v,a:r.a}}},HSV_OBJ:{read:function(r){return!!(oe.isNumber(r.h)&&oe.isNumber(r.s)&&oe.isNumber(r.v))&&{space:"HSV",h:r.h,s:r.s,v:r.v}},write:function(r){return{h:r.h,s:r.s,v:r.v}}}}}],Fp=void 0,Ig=void 0,Y_=function(){Ig=!1;var r=arguments.length>1?oe.toArray(arguments):arguments[0];return oe.each(aO,function(t){if(t.litmus(r))return oe.each(t.conversions,function(e,i){if(Fp=e.read(r),Ig===!1&&Fp!==!1)return Ig=Fp,Fp.conversionName=i,Fp.conversion=e,oe.BREAK}),oe.BREAK}),Ig},xT=void 0,Lg={hsv_to_rgb:function(r,t,e){var i=Math.floor(r/60)%6,n=r/60-Math.floor(r/60),o=e*(1-t),s=e*(1-n*t),a=e*(1-(1-n)*t),l=[[e,a,o],[s,e,o],[o,e,a],[o,s,e],[a,o,e],[e,o,s]][i];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(r,t,e){var i=Math.min(r,t,e),n=Math.max(r,t,e),o=n-i,s=void 0;return n===0?{h:NaN,s:0,v:0}:(s=r===n?(t-e)/o:t===n?2+(e-r)/o:4+(r-t)/o,(s/=6)<0&&(s+=1),{h:360*s,s:o/n,v:n/255})},rgb_to_hex:function(r,t,e){var i=this.hex_with_component(0,2,r);return i=this.hex_with_component(i,1,t),i=this.hex_with_component(i,0,e)},component_from_hex:function(r,t){return r>>8*t&255},hex_with_component:function(r,t,e){return e<<(xT=8*t)|r&~(255<<xT)}},lO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as=function(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")},ls=function(){function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&r(t.prototype,e),i&&r(t,i),t}}(),Rl=function r(t,e,i){t===null&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,e);if(n===void 0){var o=Object.getPrototypeOf(t);return o===null?void 0:r(o,e,i)}if("value"in n)return n.value;var s=n.get;return s!==void 0?s.call(i):void 0},Cl=function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)},Pl=function(r,t){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||typeof t!="object"&&typeof t!="function"?r:t},nr=function(){function r(){if(as(this,r),this.__state=Y_.apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return ls(r,[{key:"toString",value:function(){return Dc(this)}},{key:"toHexString",value:function(){return Dc(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),r}();function $_(r,t,e){Object.defineProperty(r,t,{get:function(){return this.__state.space==="RGB"||nr.recalculateRGB(this,t,e),this.__state[t]},set:function(i){this.__state.space!=="RGB"&&(nr.recalculateRGB(this,t,e),this.__state.space="RGB"),this.__state[t]=i}})}function J_(r,t){Object.defineProperty(r,t,{get:function(){return this.__state.space==="HSV"||nr.recalculateHSV(this),this.__state[t]},set:function(e){this.__state.space!=="HSV"&&(nr.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}nr.recalculateRGB=function(r,t,e){if(r.__state.space==="HEX")r.__state[t]=Lg.component_from_hex(r.__state.hex,e);else{if(r.__state.space!=="HSV")throw new Error("Corrupted color state");oe.extend(r.__state,Lg.hsv_to_rgb(r.__state.h,r.__state.s,r.__state.v))}},nr.recalculateHSV=function(r){var t=Lg.rgb_to_hsv(r.r,r.g,r.b);oe.extend(r.__state,{s:t.s,v:t.v}),oe.isNaN(t.h)?oe.isUndefined(r.__state.h)&&(r.__state.h=0):r.__state.h=t.h},nr.COMPONENTS=["r","g","b","h","s","v","hex","a"],$_(nr.prototype,"r",2),$_(nr.prototype,"g",1),$_(nr.prototype,"b",0),J_(nr.prototype,"h"),J_(nr.prototype,"s"),J_(nr.prototype,"v"),Object.defineProperty(nr.prototype,"a",{get:function(){return this.__state.a},set:function(r){this.__state.a=r}}),Object.defineProperty(nr.prototype,"hex",{get:function(){return this.__state.space!=="HEX"&&(this.__state.hex=Lg.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(r){this.__state.space="HEX",this.__state.hex=r}});var ju=function(){function r(t,e){as(this,r),this.initialValue=t[e],this.domElement=document.createElement("div"),this.object=t,this.property=e,this.__onChange=void 0,this.__onFinishChange=void 0}return ls(r,[{key:"onChange",value:function(t){return this.__onChange=t,this}},{key:"onFinishChange",value:function(t){return this.__onFinishChange=t,this}},{key:"setValue",value:function(t){return this.object[this.property]=t,this.__onChange&&this.__onChange.call(this,t),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),r}(),bT={};oe.each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},function(r,t){oe.each(r,function(e){bT[e]=t})});var uO=/(\d+(\.\d+)?)px/;function zs(r){if(r==="0"||oe.isUndefined(r))return 0;var t=r.match(uO);return oe.isNull(t)?0:parseFloat(t[1])}var Gt={makeSelectable:function(r,t){r!==void 0&&r.style!==void 0&&(r.onselectstart=t?function(){return!1}:function(){},r.style.MozUserSelect=t?"auto":"none",r.style.KhtmlUserSelect=t?"auto":"none",r.unselectable=t?"on":"off")},makeFullscreen:function(r,t,e){var i=e,n=t;oe.isUndefined(n)&&(n=!0),oe.isUndefined(i)&&(i=!0),r.style.position="absolute",n&&(r.style.left=0,r.style.right=0),i&&(r.style.top=0,r.style.bottom=0)},fakeEvent:function(r,t,e,i){var n=e||{},o=bT[t];if(!o)throw new Error("Event type "+t+" not supported.");var s=document.createEvent(o);switch(o){case"MouseEvents":var a=n.x||n.clientX||0,l=n.y||n.clientY||0;s.initMouseEvent(t,n.bubbles||!1,n.cancelable||!0,window,n.clickCount||1,0,0,a,l,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var u=s.initKeyboardEvent||s.initKeyEvent;oe.defaults(n,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),u(t,n.bubbles||!1,n.cancelable,window,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.keyCode,n.charCode);break;default:s.initEvent(t,n.bubbles||!1,n.cancelable||!0)}oe.defaults(s,i),r.dispatchEvent(s)},bind:function(r,t,e,i){var n=i||!1;return r.addEventListener?r.addEventListener(t,e,n):r.attachEvent&&r.attachEvent("on"+t,e),Gt},unbind:function(r,t,e,i){var n=i||!1;return r.removeEventListener?r.removeEventListener(t,e,n):r.detachEvent&&r.detachEvent("on"+t,e),Gt},addClass:function(r,t){if(r.className===void 0)r.className=t;else if(r.className!==t){var e=r.className.split(/ +/);e.indexOf(t)===-1&&(e.push(t),r.className=e.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return Gt},removeClass:function(r,t){if(t)if(r.className===t)r.removeAttribute("class");else{var e=r.className.split(/ +/),i=e.indexOf(t);i!==-1&&(e.splice(i,1),r.className=e.join(" "))}else r.className=void 0;return Gt},hasClass:function(r,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(r.className)||!1},getWidth:function(r){var t=getComputedStyle(r);return zs(t["border-left-width"])+zs(t["border-right-width"])+zs(t["padding-left"])+zs(t["padding-right"])+zs(t.width)},getHeight:function(r){var t=getComputedStyle(r);return zs(t["border-top-width"])+zs(t["border-bottom-width"])+zs(t["padding-top"])+zs(t["padding-bottom"])+zs(t.height)},getOffset:function(r){var t=r,e={left:0,top:0};if(t.offsetParent)do e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;while(t);return e},isActive:function(r){return r===document.activeElement&&(r.type||r.href)}},wT=function(r){function t(e,i){as(this,t);var n=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),o=n;return n.__prev=n.getValue(),n.__checkbox=document.createElement("input"),n.__checkbox.setAttribute("type","checkbox"),Gt.bind(n.__checkbox,"change",function(){o.setValue(!o.__prev)},!1),n.domElement.appendChild(n.__checkbox),n.updateDisplay(),n}return Cl(t,r),ls(t,[{key:"setValue",value:function(e){var i=Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),i}},{key:"updateDisplay",value:function(){return this.getValue()===!0?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(ju),hO=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=n,a=o;if(o.__select=document.createElement("select"),oe.isArray(s)){var l={};oe.each(s,function(u){l[u]=u}),s=l}return oe.each(s,function(u,h){var d=document.createElement("option");d.innerHTML=h,d.setAttribute("value",u),a.__select.appendChild(d)}),o.updateDisplay(),Gt.bind(o.__select,"change",function(){var u=this.options[this.selectedIndex].value;a.setValue(u)}),o.domElement.appendChild(o.__select),o}return Cl(t,r),ls(t,[{key:"setValue",value:function(e){var i=Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),i}},{key:"updateDisplay",value:function(){return Gt.isActive(this.__select)?this:(this.__select.value=this.getValue(),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this))}}]),t}(ju),cO=function(r){function t(e,i){as(this,t);var n=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),o=n;function s(){o.setValue(o.__input.value)}return n.__input=document.createElement("input"),n.__input.setAttribute("type","text"),Gt.bind(n.__input,"keyup",s),Gt.bind(n.__input,"change",s),Gt.bind(n.__input,"blur",function(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}),Gt.bind(n.__input,"keydown",function(a){a.keyCode===13&&this.blur()}),n.updateDisplay(),n.domElement.appendChild(n.__input),n}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){return Gt.isActive(this.__input)||(this.__input.value=this.getValue()),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(ju);function ST(r){var t=r.toString();return t.indexOf(".")>-1?t.length-t.indexOf(".")-1:0}var TT=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=n||{};return o.__min=s.min,o.__max=s.max,o.__step=s.step,oe.isUndefined(o.__step)?o.initialValue===0?o.__impliedStep=1:o.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(o.initialValue))/Math.LN10))/10:o.__impliedStep=o.__step,o.__precision=ST(o.__impliedStep),o}return Cl(t,r),ls(t,[{key:"setValue",value:function(e){var i=e;return this.__min!==void 0&&i<this.__min?i=this.__min:this.__max!==void 0&&i>this.__max&&(i=this.__max),this.__step!==void 0&&i%this.__step!=0&&(i=Math.round(i/this.__step)*this.__step),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,i)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=ST(e),this}}]),t}(ju),Og=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,n));o.__truncationSuspended=!1;var s=o,a=void 0;function l(){s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}function u(d){var p=a-d.clientY;s.setValue(s.getValue()+p*s.__impliedStep),a=d.clientY}function h(){Gt.unbind(window,"mousemove",u),Gt.unbind(window,"mouseup",h),l()}return o.__input=document.createElement("input"),o.__input.setAttribute("type","text"),Gt.bind(o.__input,"change",function(){var d=parseFloat(s.__input.value);oe.isNaN(d)||s.setValue(d)}),Gt.bind(o.__input,"blur",function(){l()}),Gt.bind(o.__input,"mousedown",function(d){Gt.bind(window,"mousemove",u),Gt.bind(window,"mouseup",h),a=d.clientY}),Gt.bind(o.__input,"keydown",function(d){d.keyCode===13&&(s.__truncationSuspended=!0,this.blur(),s.__truncationSuspended=!1,l())}),o.updateDisplay(),o.domElement.appendChild(o.__input),o}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){var e,i,n;return this.__input.value=this.__truncationSuspended?this.getValue():(e=this.getValue(),i=this.__precision,n=Math.pow(10,i),Math.round(e*n)/n),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(TT);function ET(r,t,e,i,n){return i+(r-t)/(e-t)*(n-i)}var Z_=function(r){function t(e,i,n,o,s){as(this,t);var a=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,{min:n,max:o,step:s})),l=a;function u(m){m.preventDefault();var g=l.__background.getBoundingClientRect();return l.setValue(ET(m.clientX,g.left,g.right,l.__min,l.__max)),!1}function h(){Gt.unbind(window,"mousemove",u),Gt.unbind(window,"mouseup",h),l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}function d(m){var g=m.touches[0].clientX,_=l.__background.getBoundingClientRect();l.setValue(ET(g,_.left,_.right,l.__min,l.__max))}function p(){Gt.unbind(window,"touchmove",d),Gt.unbind(window,"touchend",p),l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}return a.__background=document.createElement("div"),a.__foreground=document.createElement("div"),Gt.bind(a.__background,"mousedown",function(m){document.activeElement.blur(),Gt.bind(window,"mousemove",u),Gt.bind(window,"mouseup",h),u(m)}),Gt.bind(a.__background,"touchstart",function(m){m.touches.length===1&&(Gt.bind(window,"touchmove",d),Gt.bind(window,"touchend",p),d(m))}),Gt.addClass(a.__background,"slider"),Gt.addClass(a.__foreground,"slider-fg"),a.updateDisplay(),a.__background.appendChild(a.__foreground),a.domElement.appendChild(a.__background),a}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(TT),MT=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=o;return o.__button=document.createElement("div"),o.__button.innerHTML=n===void 0?"Fire":n,Gt.bind(o.__button,"click",function(a){return a.preventDefault(),s.fire(),!1}),Gt.addClass(o.__button,"button"),o.domElement.appendChild(o.__button),o}return Cl(t,r),ls(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(ju),K_=function(r){function t(e,i){as(this,t);var n=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));n.__color=new nr(n.getValue()),n.__temp=new nr(0);var o=n;n.domElement=document.createElement("div"),Gt.makeSelectable(n.domElement,!1),n.__selector=document.createElement("div"),n.__selector.className="selector",n.__saturation_field=document.createElement("div"),n.__saturation_field.className="saturation-field",n.__field_knob=document.createElement("div"),n.__field_knob.className="field-knob",n.__field_knob_border="2px solid ",n.__hue_knob=document.createElement("div"),n.__hue_knob.className="hue-knob",n.__hue_field=document.createElement("div"),n.__hue_field.className="hue-field",n.__input=document.createElement("input"),n.__input.type="text",n.__input_textShadow="0 1px 1px ",Gt.bind(n.__input,"keydown",function(y){y.keyCode===13&&p.call(this)}),Gt.bind(n.__input,"blur",p),Gt.bind(n.__selector,"mousedown",function(){Gt.addClass(this,"drag").bind(window,"mouseup",function(){Gt.removeClass(o.__selector,"drag")})}),Gt.bind(n.__selector,"touchstart",function(){Gt.addClass(this,"drag").bind(window,"touchend",function(){Gt.removeClass(o.__selector,"drag")})});var s,a=document.createElement("div");function l(y){g(y),Gt.bind(window,"mousemove",g),Gt.bind(window,"touchmove",g),Gt.bind(window,"mouseup",h),Gt.bind(window,"touchend",h)}function u(y){_(y),Gt.bind(window,"mousemove",_),Gt.bind(window,"touchmove",_),Gt.bind(window,"mouseup",d),Gt.bind(window,"touchend",d)}function h(){Gt.unbind(window,"mousemove",g),Gt.unbind(window,"touchmove",g),Gt.unbind(window,"mouseup",h),Gt.unbind(window,"touchend",h),m()}function d(){Gt.unbind(window,"mousemove",_),Gt.unbind(window,"touchmove",_),Gt.unbind(window,"mouseup",d),Gt.unbind(window,"touchend",d),m()}function p(){var y=Y_(this.value);y!==!1?(o.__color.__state=y,o.setValue(o.__color.toOriginal())):this.value=o.__color.toString()}function m(){o.__onFinishChange&&o.__onFinishChange.call(o,o.__color.toOriginal())}function g(y){y.type.indexOf("touch")===-1&&y.preventDefault();var w=o.__saturation_field.getBoundingClientRect(),A=y.touches&&y.touches[0]||y,I=A.clientX,F=A.clientY,N=(I-w.left)/(w.right-w.left),U=1-(F-w.top)/(w.bottom-w.top);return U>1?U=1:U<0&&(U=0),N>1?N=1:N<0&&(N=0),o.__color.v=U,o.__color.s=N,o.setValue(o.__color.toOriginal()),!1}function _(y){y.type.indexOf("touch")===-1&&y.preventDefault();var w=o.__hue_field.getBoundingClientRect(),A=1-((y.touches&&y.touches[0]||y).clientY-w.top)/(w.bottom-w.top);return A>1?A=1:A<0&&(A=0),o.__color.h=360*A,o.setValue(o.__color.toOriginal()),!1}return oe.extend(n.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),oe.extend(n.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:n.__field_knob_border+(n.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),oe.extend(n.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),oe.extend(n.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),oe.extend(a.style,{width:"100%",height:"100%",background:"none"}),AT(a,"top","rgba(0,0,0,0)","#000"),oe.extend(n.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(s=n.__hue_field).style.background="",s.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",s.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",s.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",s.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",s.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",oe.extend(n.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:n.__input_textShadow+"rgba(0,0,0,0.7)"}),Gt.bind(n.__saturation_field,"mousedown",l),Gt.bind(n.__saturation_field,"touchstart",l),Gt.bind(n.__field_knob,"mousedown",l),Gt.bind(n.__field_knob,"touchstart",l),Gt.bind(n.__hue_field,"mousedown",u),Gt.bind(n.__hue_field,"touchstart",u),n.__saturation_field.appendChild(a),n.__selector.appendChild(n.__field_knob),n.__selector.appendChild(n.__saturation_field),n.__selector.appendChild(n.__hue_field),n.__hue_field.appendChild(n.__hue_knob),n.domElement.appendChild(n.__input),n.domElement.appendChild(n.__selector),n.updateDisplay(),n}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){var e=Y_(this.getValue());if(e!==!1){var i=!1;oe.each(nr.COMPONENTS,function(s){if(!oe.isUndefined(e[s])&&!oe.isUndefined(this.__color.__state[s])&&e[s]!==this.__color.__state[s])return i=!0,{}},this),i&&oe.extend(this.__color.__state,e)}oe.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;oe.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,AT(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),oe.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})}}]),t}(ju),dO=["-moz-","-o-","-webkit-","-ms-",""];function AT(r,t,e,i){r.style.background="",oe.each(dO,function(n){r.style.cssText+="background: "+n+"linear-gradient("+t+", "+e+" 0%, "+i+" 100%); "})}var pO=function(r,t){var e=t||document,i=document.createElement("style");i.type="text/css",i.innerHTML=r;var n=e.getElementsByTagName("head")[0];try{n.appendChild(i)}catch{}},fO=`<div id="dg-save" class="dg dialogue">
|
|
6334
|
+
`),{arg1:e,arg2:i})}}class co{constructor(t,e,i,n,o){this.ctx=t,this.fillStyle=e,this.width=i,this.height=n,this.config=o,this.clonedObjects=[],this._displayObject=null,this.gradientHash=Ep()(`${JSON.stringify(e)}${Math.ceil(i)}${Math.ceil(n)}`)}get displayObject(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject}set displayObject(t){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=t}get hasFill(){return!!this.fillStyle&&this.fillStyle.fillType!=="noFill"}createDisplayObject(){var t;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){const e=new hr;return e.texture=this.ctx.bgTexture,e}if(this.fillStyle.fillType==="solidFill"||this.fillStyle.fillType==="noFill")return null;if(this.fillStyle.fillType==="gradientFill"){const e=new hr;let i=co.gradientPool.get(this.gradientHash);if(!i){const n=zI(this.fillStyle,this.width,this.height),o=$r.create({width:this.width,height:this.height,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(n,{renderTexture:o}),i=o,co.gradientPool.set(this.gradientHash,i),n.destroy({children:!0,texture:!0})}return e.texture=i,e}if(this.fillStyle.fillType==="blipFill"){const{src:e,filters:i}=this.fillStyle,n=this.ctx.spriteTexture.getTexture(e),o=this.ctx.spriteTexture.getFrameData(e);if(n){const s=new hr;if(s.texture=n,i.length>0&&this.config.useFilter&&(s.filters=function(a){const l=[];return a.forEach(u=>{if(u.type==="biLevel")l.push(new XS("biLevel",u.args[0]));else if(u.type==="clrChange"||u.type==="changeBulletColor"){const h=Us(u.args[0]),d=Us(u.args[1]);l.push(new qI(u.type,h,d))}else u.type==="alphaModFix"?l.push(new XS(u.type,u.args[0])):u.type==="lum"&&l.push(new JI(u.type,u.args[0],u.args[1]))}),l}(i)),this.config.fillFloat){const{l:a,t:l,r:u,b:h}=this.config.fillFloat.fillRect,d=this.width*(1-a-u),p=this.height*(1-l-h),m=(t=this.config.shapeRotation)!==null&&t!==void 0?t:0,g=new ks;g.drawRect(0,0,d,p),g.pivot.x=d/2,g.pivot.y=p/2,g.rotation=m;const _=g.getBounds(),y=_.width,w=_.height;s.width=y,s.height=w,s.anchor.x=.5,s.anchor.y=.5,s.rotation=-1*m,s.name="math-texture",m===0?(s.position.x=y/2+a*this.width,s.position.y=w/2+l*this.width):(s.position.x=this.width/2,s.position.y=this.height/2)}else s.width=this.width,s.height=this.height,o.rotate&&(s.position.x=this.width/2,s.position.y=this.height/2,s.anchor.x=.5,s.anchor.y=.5,s.rotation=o.rotate/180*Math.PI);return s}}else if(this.fillStyle.fillType==="gifFill"){const{src:e,delays:i}=this.fillStyle,n=this.ctx.spriteTexture.getGifFrames(e).map((l,u)=>({texture:l,time:i[u]||20})),o=new A_(n,!0);o.width=this.width,o.height=this.height;const s=this.fillStyle.loop;let a=1;return o.onLoop=()=>{a+=1,s>0&&a>s&&o.gotoAndStop(o.totalFrames)},o}return null}isSolidFill(){var t;return((t=this.fillStyle)===null||t===void 0?void 0:t.fillType)==="solidFill"}getSolidFillColor(){var t;return((t=this.fillStyle)===null||t===void 0?void 0:t.fillType)==="solidFill"?this.fillStyle.color:"#000000"}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}destroy(){var t;(t=this._displayObject)===null||t===void 0||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(e=>{e==null||e.destroy()}),this.clonedObjects=[]}}co.gradientPool=new Map;var ZI=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class KI extends L_{constructor(t,e,i){var n;super(t,e,i),this.textureContainer=new Yn,this.underline=null,this.cacheSprite=new hr;const{shapeId:o,paragraphIndex:s,lineIndex:a,unitIndex:l,lineHeight:u,width:h,underLine:d,fill:p,height:m,isHorz:g,lineWidth:_}=t,y=((n=p==null?void 0:p.fill)===null||n===void 0?void 0:n.fillType)==="solidFill"?p.fill.color:null;if(d){const w=g?u/16:_/16;this.underline=new FI(e,d.type,w,h,m,y,g,o,s,a,l)}this.textGraphics=this.createTextGraphics(),this.textFill=this.createTextFill(),this.strokeGraphics=this.createStrokeGraphics(),this.strokeFill=this.createStrokeFill()}createStrokeFill(){const{stroke:t,lineWidth:e,lineHeight:i}=this.json;return new co(this.ctx,t==null?void 0:t.fill,e,i,{useFilter:!1,useSlideBackgroundFill:!1})}createStrokeGraphics(){const{stroke:t}=this.json,e=t!=null&&t.key?{fillType:"blipFill",src:t.key,filters:[]}:void 0;return new co(this.ctx,e,(t==null?void 0:t.width)||0,(t==null?void 0:t.height)||0,{useFilter:!1,useSlideBackgroundFill:!1})}createTextFill(){const{isHorz:t,fill:e,lineWidth:i,lineHeight:n,fillLineHeight:o}=this.json;return t?new co(this.ctx,e==null?void 0:e.fill,i,Math.max(o,n),{useFilter:!1,useSlideBackgroundFill:!1}):new co(this.ctx,e==null?void 0:e.fill,o,n,{useFilter:!1,useSlideBackgroundFill:!1})}createTextGraphics(){var t;const{fill:e,content:i}=this.json;let n="#000000";((t=e==null?void 0:e.fill)===null||t===void 0?void 0:t.fillType)==="solidFill"&&(n=e.fill.color);const o=e!=null&&e.key?{fillType:"blipFill",src:e.key,filters:[{type:"changeBulletColor",args:["#000000",n]}]}:void 0;return new co(this.ctx,o,(e==null?void 0:e.width)||0,(e==null?void 0:e.height)||0,{useFilter:i==="\u25FE",useSlideBackgroundFill:!1})}getIterateEntry(){return null}getBgElement(){return null}updateTransform(t){var e,i,n,o;const{isHorz:s}=this.json;t.position={x:s&&(i=(e=t.position)===null||e===void 0?void 0:e.x)!==null&&i!==void 0?i:0,y:s?0:(o=(n=t.position)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:0},t.width=s?this.json.width:this.json.lineWidth,t.height=s?this.json.lineHeight:this.json.height,super.updateTransform(t)}preRender(){var t;(t=this.underline)===null||t===void 0||t.preRender()}render(t){t.addSubMTask(()=>ZI(this,void 0,void 0,function*(){this.doRender()}),"@TextUnitImpl[doRender]")}doRender(){let t=!1;const{lineWidth:e,lineHeight:i,baseLine:n,isHorz:o,underline:s,height:a,width:l,highlightColor:u,x:h,y:d,content:p,fillLineHeight:m,fill:g}=this.json;let _=this.json.needFill!==!1;if(g&&g.fill&&g.fill.fillType!=="solidFill"&&(_=!0),u){const y=new ks,[w,A]=DS(u);y.beginFill(w,A),y.drawRect(0,0,o?l:e,o?i:a),y.endFill(),this.textureContainer.addChild(y)}if(this.textGraphics.displayObject){const y=this.textGraphics.displayObject;if(o&&(y.position.y=d>0?d:0),_){const w=this.textFill.displayObject;if(w)w.mask=y,w.addChild(y),w.position.x=-h,y.position.x+=h,t=!0,this.textureContainer.addChild(w);else if(this.textFill.isSolidFill()){const A=new Ap;A.color=this.textFill.getSolidFillColor(),y.filters=[A],t=!0,this.textureContainer.addChild(y)}}else this.textureContainer.addChild(y)}if(this.strokeGraphics.displayObject){const y=this.strokeGraphics.displayObject;if(_){const w=this.strokeFill.displayObject;if(w)w.mask=y,w.addChild(y),o?w.position.y=d>0?d:0:w.position.x=h,this.textureContainer.addChild(w);else if(this.strokeFill.isSolidFill()){o?y.position.y=d>0?d:0:y.position.x=h;const A=new Ap;A.color=this.strokeFill.getSolidFillColor(),y.filters=[A],t=!0,this.textureContainer.addChild(y)}}else o?y.position.y=d>0?d:0:y.position.x=h,this.textureContainer.addChild(y)}if(this.underline&&(this.underline.render(),this.underline.sprite)){o?(this.underline.sprite.position.y=s?s-i/16:n,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);const y=this.textFill.getClonedDisplayObject();y?(y.mask=this.underline.sprite,y.addChild(this.underline.sprite),this.textureContainer.addChild(y)):this.textureContainer.addChild(this.underline.sprite)}if(t){const y=$r.create({width:o?l:e,height:o?Math.max(m,i):a,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:y}),this.cacheSprite.texture=y,o&&d<0&&(this.cacheSprite.position.y=d),this.container.addChild(this.cacheSprite)}else this.container.addChild(this.textureContainer);this.container.name=p}destroy(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}var qS=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class QI extends L_{constructor(){super(...arguments),this.units=[],this.isHorz=!0}getIterateElements(){return this.units}getIterateEntry(t,e,i){return this.units[e]?this.units[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}preRender(){}createUnits(t,e,i,n){for(let o=0,s=this.json.textUnits.length;o<s;o++)n.addSubMTask(()=>qS(this,void 0,void 0,function*(){const a=this.json.textUnits[o],{height:l,width:u,fillHeight:h,baseline:d,y:p,underline:m}=this.json,g=new KI(Object.assign(Object.assign({},a),{lineHeight:l,lineWidth:u,baseLine:d-p,underline:m,fillLineHeight:h||l,isHorz:this.isHorz,shapeId:t,paragraphIndex:e,lineIndex:i,unitIndex:o}),this.ctx,this.global);g.preRender(),this.units.push(g)}),"@TextLineImpl[createUnits]")}render(t){for(const e of this.units.reverse())e.render(t),t.addSubMTask(()=>qS(this,void 0,void 0,function*(){this.container.addChild(e.container)}),"@TextLineImpl[container.addChild]")}destroy(){this.units.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var YS=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class tL extends L_{constructor(){super(...arguments),this.iterateElements=[],this.lines=[],this.isHorz=!0}getIterateElements(){if(this.iterateElements.length>0)return this.iterateElements;const t=this.lines.reduce((e,i)=>e=e.concat(i.getIterateElements()),[]);return this.iterateElements=t,t}getIterateEntry(t,e,i){const n=this.getIterateElements();return n[e]?n[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}preRender(){}createLines(t,e,i){for(let n=0,o=this.json.lines.length;n<o;n++)i.addSubMTask(()=>YS(this,void 0,void 0,function*(){const s=this.json.lines[n],a=new QI(s,this.ctx,this.global);a.isHorz=this.isHorz,a.container.name="line-"+n,a.createUnits(t,e,n,i),this.lines.push(a)}),"@TextParagraphImpl[createLines]")}render(t){for(const e of this.lines)e.render(t),t.addSubMTask(()=>YS(this,void 0,void 0,function*(){this.container.addChild(e.container)}),"@TextParagraphImpl[container.addChild]")}destroy(){this.lines.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var wg=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class eL{constructor(t,e,i,n){this.iterateElements=[],this.paragraphs=[],this.container=new Yn,this.json=t,this.ctx=e,this.parentGlobalPos=n,this.iterateType=i,this.container.name="textBody",this.global={x:this.parentGlobalPos.x+t.position.x,y:this.parentGlobalPos.y+t.position.y},this.container.position.x=t.position.x,this.container.position.y=t.position.y,this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y;const o=new ks;o.drawRect(0,0,t.width,t.height),this.container.addChild(o)}get width(){return this.json.width}get height(){return this.json.height}get x(){return this.json.position.x}get y(){return this.json.position.y}getTextElement(t,e){return t==="paragraph"?this.paragraphs[e[0]]:null}getIterateEntry(t,e){return this.iterateElements[t]?this.iterateElements[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",e),null)}destroy(){this.paragraphs.forEach(t=>{t.destroy()})}createParagraphs(t,e){for(let i=0,n=this.json.paragraphs.length;i<n;i++)e.addSubMTask(()=>wg(this,void 0,void 0,function*(){var o;const s=this.json.paragraphs[i],a=new tL(s,this.ctx,this.global);a.isHorz=(o=this.json.isHorz)===null||o===void 0||o,a.createLines(t,i,e),e.addSubMTask(()=>wg(this,void 0,void 0,function*(){this.iterateElements=this.iterateElements.concat(a.getIterateElements()),a.container.name="\u6BB5\u843D-"+i,this.paragraphs.push(a)}),"@TextBodyImpl[paragraphs.push]")}),"@TextBodyImpl[createParagraphs]")}render(t){for(const e of this.paragraphs)e.render(t),t.addSubMTask(()=>wg(this,void 0,void 0,function*(){this.container.addChild(e.container)}),"@TextBodyImpl[container.addChild]");t.addSubMTask(()=>wg(this,void 0,void 0,function*(){const{width:e}=this.container;this.container.scale.x<0&&(this.container.x+=-1*e)}),"@TextBodyImpl[reset width]")}}var iL=v(47),nL=v.n(iL),rL=v(48),oL=v.n(rL);const sL={Reflection:class extends Dr{constructor(r){super(nL.a,oL.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uStartAlpha:r.startAlpha,uEndAlpha:r.endAlpha,uBlur:0}),this.json=r}}};class aL{constructor(t){this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=t.id,this.type=t.type,this.heightSize=t.heightSize,this.widthSize=t.widthSize,this.fillStyle=t.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=t.lineWidth||1,this.position=t.position||{x:0,y:0},this.rotate=t.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}setPivot(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"triangle":this.pivot={x:.7*this.width,y:this.height/2};break;case"arrow":case"stealth":default:this.pivot={x:this.width,y:this.height/2}}}generatePaths(){this.hash="arrow-"+Ep()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}getUnitPath(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}setScaleFromLineWidth(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}setScaleFromSize(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=.75;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=.75;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}class $S{constructor(t,e,i,n,o,s,a,l,u,h,d){this.id=t,this.ctx=e,this.paths=i,this.hash=n,this.nept=o,this.width=s,this.height=a,this.lineStyle=l,this.shouldFill=u,this.bgColor=h,this.lnColor=d,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(i),this.isRectangle&&u?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}get displayObject(){return this._displayObject}pointDis(t,e){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)}rectangleDetect(t){if(t.length!==1)return!1;const e=t[0].path.trim().split(" ");if(e.length!==10)return!1;const i=[],n=[];for(let l=0;l<e.length;l+=2){const u=e[l],h=e[l+1],[d,p]=h.split(",").map(m=>Number(m)/100);i.push(u),n.push({x:d,y:p})}if(i.join("")!=="MLLLC")return!1;for(let l=0;l<3;l++){const u=n[l],h=n[l+1];if(u.x!==h.x&&u.y!==h.y)return!1}const o=n.slice(0,4).reduce((l,u)=>l+u.x,0)/4,s=n.slice(0,4).reduce((l,u)=>l+u.y,0)/4;if(Number.isNaN(o)||Number.isNaN(s))return!1;const a={x:o,y:s};return ho(this.pointDis(a,n[0]),this.pointDis(a,n[1]))&&ho(this.pointDis(a,n[0]),this.pointDis(a,n[2]))&&ho(this.pointDis(a,n[0]),this.pointDis(a,n[3]))&&this.pointDis(a,n[0])===this.pointDis(a,n[1])}createDisplayObject(){if(this.isPureRect){const t=new ks;return t.beginFill(0,1),t.drawRect(0,0,this.width,this.height),t}if(this.isColoredPureRect&&this.bgColor){const t=new ks,[e,i]=DS(this.bgColor);return t.beginFill(e,i),t.drawRect(0,0,this.width,this.height),t}{const t=new hr,e=this.ctx.graphicsTexture.getGraphicsData(this.id);return e?(t.texture=e.texture,t.pivot.x=e.pivot.x,t.pivot.y=e.pivot.y,t):null}}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}render(){this._displayObject=this.createDisplayObject()}isNeedMask(t,e){let i=!1;return this._displayObject&&(i=!(this.isRectangle&&Math.abs(t-this._displayObject.width)<2&&Math.abs(e-this._displayObject.height)<2&&this.shouldFill)),i}addArrows(t){var e;(e=this._displayObject)===null||e===void 0||e.addChild(t)}destroy(){var t;(t=this._displayObject)===null||t===void 0||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(e=>{e==null||e.destroy()}),this.clonedObjects=[]}}var B_=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};const Gu={pivot:{x:0,y:0},width:0,height:0};class JS extends I_{constructor(t,e,i,n){var o;super(t,e,i),this.renderContainer=new Yn,this.needCacheAsBitMap=!1,this.backgroundGraphics=null,this.filterAreaJustifies=[],this.strokeGraphics=null,this.arrowList=[],this.fillColorFilter=new Ap,this.strokeColorFilter=new Ap,this.id="",this.fill=new NS(this),this.stroke=new II(this),this.updateFilterArea=()=>{const l=this.renderContainer.getBounds(!1),u=this.filterAreaJustifies.map(m=>m(l)),h=u.map(m=>m.width),d=u.map(m=>m.height),p=new xi(l.x,l.y,Math.max(...h),Math.max(...d));this.renderContainer.filterArea=p,(this.renderContainer.filters||[]).forEach(m=>{m.uniforms.uShapeFilterArea=new Float32Array(4),m.uniforms.uShapeFilterArea[0]=p.x,m.uniforms.uShapeFilterArea[1]=p.y,m.uniforms.uShapeFilterArea[2]=p.width,m.uniforms.uShapeFilterArea[3]=p.height})},this.json=t,this.json.fillStyle&&this.json.fillStyle.fillType==="groupFill"&&n&&(this.json.fillStyle=n),this.id=t.id;const{fillStyle:s,lineStyle:a}=this.json;this.container.name=t.id,this.renderContainer.name=t.id+"-render-container",this.generateArrowList(),this.backgroundFill=this.createBackgroundFill(),this.backgroundGraphics=this.createBackgroundGraphics(),this.strokeFill=this.createStrokeFill(),this.strokeGraphics=this.createStrokeGraphics(),this.ctx.timingTargets.addTarget(this.id,this),(s==null?void 0:s.fillType)==="solidFill"&&(this.fillColorFilter.currentColor=s.color,this.fillColorFilter.designColor=s.color),((o=a==null?void 0:a.fill)===null||o===void 0?void 0:o.fillType)==="solidFill"&&(this.strokeColorFilter.currentColor=a.fill.color,this.strokeColorFilter.designColor=a.fill.color),this.updateTransform(this.json),t.textBody&&(this.text=new eL(t.textBody,this.ctx,t.textBody.iterateType,{x:this.designGlobalPosition.x,y:this.designGlobalPosition.y})),this.container.hitArea=new q0(1,1,this.json.width,this.json.height)}get interactiveContainer(){return this.renderContainer}get strokeActive(){var t,e,i,n,o,s,a;return this.strokeFill.displayObject?((i=(e=(t=this.strokeFill.displayObject)===null||t===void 0?void 0:t.filters)===null||e===void 0?void 0:e.length)!==null&&i!==void 0?i:-1)>0:((a=(s=(o=(n=this.strokeGraphics)===null||n===void 0?void 0:n.displayObject)===null||o===void 0?void 0:o.filters)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:-1)>0}set strokeActive(t){var e,i,n,o,s,a;const{displayObject:l}=this.strokeFill;t?l&&((i=(e=l.filters)===null||e===void 0?void 0:e.indexOf(this.strokeColorFilter))!==null&&i!==void 0?i:-1)<0?l.filters=[this.strokeColorFilter]:((n=this.strokeGraphics)===null||n===void 0?void 0:n.displayObject)&&((s=(o=this.strokeGraphics.displayObject.filters)===null||o===void 0?void 0:o.indexOf(this.strokeColorFilter))!==null&&s!==void 0?s:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):l?l.filters=[]:!((a=this.strokeGraphics)===null||a===void 0)&&a.displayObject&&(this.strokeGraphics.displayObject.filters=[])}get fillActive(){var t,e,i,n,o,s,a;return this.backgroundFill.displayObject?((i=(e=(t=this.backgroundFill.displayObject)===null||t===void 0?void 0:t.filters)===null||e===void 0?void 0:e.length)!==null&&i!==void 0?i:-1)>0:((a=(s=(o=(n=this.backgroundGraphics)===null||n===void 0?void 0:n.displayObject)===null||o===void 0?void 0:o.filters)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:-1)>0}set fillActive(t){var e,i,n,o,s,a;t?this.backgroundFill.displayObject&&((i=(e=this.backgroundFill.displayObject.filters)===null||e===void 0?void 0:e.indexOf(this.fillColorFilter))!==null&&i!==void 0?i:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:((n=this.backgroundGraphics)===null||n===void 0?void 0:n.displayObject)&&((s=(o=this.backgroundGraphics.displayObject.filters)===null||o===void 0?void 0:o.indexOf(this.fillColorFilter))!==null&&s!==void 0?s:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:!((a=this.backgroundGraphics)===null||a===void 0)&&a.displayObject&&(this.backgroundGraphics.displayObject.filters=[])}getTextElement(t,e){var i,n;return(n=(i=this.text)===null||i===void 0?void 0:i.getTextElement(t,e))!==null&&n!==void 0?n:null}getBgElement(){return this}getIterateEntry(t,e,i){return e===0?this:t==="el"?(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null):this.text?this.text.getIterateEntry(e-1,i)||null:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}createStrokeGraphics(){var t,e,i,n;const{id:o,geometry:s,lineStyle:a}=this.json,{width:l,height:u,pivot:h}=(s==null?void 0:s.lineTransform)||Gu,d=l||this.json.width,p=u||this.json.height,m=((t=a==null?void 0:a.fill)===null||t===void 0?void 0:t.fillType)==="solidFill"?a.fill.color:null;return a&&((e=a.fill)===null||e===void 0?void 0:e.fillType)!=="noFill"?new $S(o+"-path-graphics",this.ctx,(i=s==null?void 0:s.paths)!==null&&i!==void 0?i:[],(n=s==null?void 0:s.hash)!==null&&n!==void 0?n:"",h||{x:0,y:0},d,p,a,!1,null,m):null}createStrokeFill(){const[t,e]=this.calculateFillObjectOffset(),{geometry:i,lineStyle:n,width:o,height:s}=this.json,a=(i==null?void 0:i.lineTransform)||Gu,l=Object(W.isNumber)(n==null?void 0:n.width)?n.width:1;return new co(this.ctx,n==null?void 0:n.fill,(a.width||o)+l+t,Math.max((a.height||s)+l,e),{useFilter:!1,useSlideBackgroundFill:!1})}createBackgroundGraphics(){var t;const{geometry:e,lineStyle:i,fillStyle:n,id:o}=this.json,{width:s,height:a,pivot:l}=(e==null?void 0:e.lineTransform)||Gu,u=s||this.json.width,h=a||this.json.height,d=(n==null?void 0:n.fillType)==="solidFill"?n.color:null;return n&&n.fillType!=="noFill"||this.json.isPicture?new $S(o+"-bg-graphics",this.ctx,(t=e==null?void 0:e.paths)!==null&&t!==void 0?t:[],(e==null?void 0:e.hash)||"",l||{x:0,y:0},u,h,i,!0,d,null):null}createBackgroundFill(){var t,e;const{fillStyle:i,width:n,height:o,lineStyle:s,geometry:a}=this.json,l=(a==null?void 0:a.fillTransform)||Gu;return new co(this.ctx,i,(l.width||n)+((t=s==null?void 0:s.width)!==null&&t!==void 0?t:0),(l.height||o)+((e=s==null?void 0:s.width)!==null&&e!==void 0?e:0),{useFilter:!1,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation})}createBackground(){var t,e,i,n,o,s,a,l;const{pivot:u,width:h,height:d}=((t=this.json.geometry)===null||t===void 0?void 0:t.fillTransform)||Gu,{displayObject:p}=this.backgroundFill;p?(this.json.useBgFill&&((i=this.backgroundGraphics)===null||i===void 0?void 0:i.displayObject)?(this.needCacheAsBitMap=!0,p.mask=this.backgroundGraphics.displayObject,p.pivot.x=((n=this.json.position)===null||n===void 0?void 0:n.x)||0,p.pivot.y=((o=this.json.position)===null||o===void 0?void 0:o.y)||0,this.container.addChild(this.backgroundGraphics.displayObject)):((s=this.json.fillStyle)===null||s===void 0?void 0:s.fillType)==="gifFill"?(p.height=d||this.designHeight,p.width=h||this.designWidth,p instanceof A_&&p.play(),!((a=this.backgroundGraphics)===null||a===void 0)&&a.isNeedMask(p.width,p.height)&&(p.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))):!((l=this.backgroundGraphics)===null||l===void 0)&&l.isNeedMask(p.width,p.height)&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,p.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(p.x=u.x,p.y=u.y),this.container.addChild(p)):this.backgroundFill.hasFill&&((e=this.backgroundGraphics)===null||e===void 0?void 0:e.displayObject)&&this.container.addChild(this.backgroundGraphics.displayObject)}createPathFill(){var t,e,i;const{displayObject:n}=this.strokeFill,o=(t=this.strokeGraphics)===null||t===void 0?void 0:t.displayObject,[s,a]=this.calculateFillObjectOffset();n?(((e=this.strokeGraphics)===null||e===void 0?void 0:e.isNeedMask(n.width,n.height))&&o&&(this.needCacheAsBitMap=!0,n.pivot.x=o.pivot.x,n.pivot.y=o.pivot.y,o.pivot.x=0,o.pivot.y=0,n.mask=o,n.addChild(o),n.position.x=-s/2,n.position.y=-a/2,o.position.x=s/2,o.position.y=a/2),this.container.addChild(n)):this.strokeFill.hasFill&&((i=this.strokeGraphics)===null||i===void 0?void 0:i.displayObject)&&this.container.addChild(this.strokeGraphics.displayObject)}createFilledPathMask(){var t,e,i;const n=((e=(t=this.json.geometry)===null||t===void 0?void 0:t.paths)===null||e===void 0?void 0:e.filter(o=>o.fill!=="none"&&o.fill!=="norm"))||[];for(const o of n){const s=this.ctx.graphicsTexture.getGraphicsData(o.id);if(s){const a=new hr(s.texture);a.pivot.x=s.pivot.x,a.pivot.y=s.pivot.y;const l=this.backgroundFill.getClonedDisplayObject(),u=(i=this.backgroundGraphics)===null||i===void 0?void 0:i.getClonedDisplayObject(),h=l||u;h&&(this.backgroundFill.displayObject&&(h.pivot.x=this.backgroundFill.displayObject.pivot.x,h.pivot.y=this.backgroundFill.displayObject.pivot.y),h.mask=a,h.filters=[DI[o.fill]],this.needCacheAsBitMap=!0,this.container.addChild(h),this.container.addChild(a))}}}createArrow(){this.arrowList.length&&this.arrowList.forEach(t=>{var e;const i=this.ctx.graphicsTexture.getGraphicsData(t.graphicsId);if(i){const{texture:n}=i,o=new hr(n);o.pivot.x=t.pivot.x,o.pivot.y=t.pivot.y,o.position.x=t.position.x,o.position.y=t.position.y,o.rotation=t.rotate/180*Math.PI,(e=this.backgroundGraphics)===null||e===void 0||e.addArrows(o)}})}generateArrowList(){var t,e;const{lineArrowList:i,lineStyle:n,id:o}=this.json,s=((t=n==null?void 0:n.fill)===null||t===void 0?void 0:t.fillType)==="solidFill"?n.fill.color:null;(e=i||[])===null||e===void 0||e.forEach((a,l)=>{var u,h;const d=new aL(Object.assign(Object.assign({},a),{fillStyle:n==null?void 0:n.fill,lineWidth:(u=n==null?void 0:n.width)!==null&&u!==void 0?u:0}));d.graphicsId=`${o}-arrow-${l}-graphics`,d.textureId=`${o}-arrow-${l}-fill`,this.ctx.graphicsTexture.addGraphics(d.graphicsId,(h=d.paths)!==null&&h!==void 0?h:[],d.hash,{x:0,y:0},d.width,d.height,void 0,this.ctx.objectPoolGroup,!0,s,null),this.arrowList.push(d)})}calculateFillObjectOffset(){let[t,e]=[0,0];return this.arrowList.length&&(t=this.arrowList.reduce((i,n)=>Math.max(i,n.width),0),e=this.arrowList.reduce((i,n)=>Math.max(i,n.height),0)),[t,e]}preRender(t){var e,i,n;const{lineStyle:o,geometry:s}=this.json,{width:a,height:l}=(s==null?void 0:s.lineTransform)||Gu,u=a||this.json.width,h=l||this.json.height,d=((e=s==null?void 0:s.paths)===null||e===void 0?void 0:e.filter(m=>m.fill!=="none"&&m.fill!=="norm"))||[],p=((i=o==null?void 0:o.fill)===null||i===void 0?void 0:i.fillType)==="solidFill"?o.fill.color:null;t.addSubMTask(()=>B_(this,void 0,void 0,function*(){for(const m of d)this.ctx.graphicsTexture.addGraphics(m.id,[m],m.hash,((s==null?void 0:s.lineTransform)||Gu).pivot,u,h,o,this.ctx.objectPoolGroup,!0,null,p)}),"@ShapeImpl[addGraphics]"),(n=this.text)===null||n===void 0||n.createParagraphs(this.json.id,t)}subClassRender(){}setupEffect(){const{effectList:t}=this.json;if(t&&t.length>0){const e=[];return t.forEach(i=>{i.type==="reflection"&&(this.filterAreaJustifies.push(n=>(n.height*=2,n)),e.push(new sL.Reflection(i)))}),this.ctx.ticker.add(this.updateFilterArea,void 0,-20),this.renderContainer.filters=e,!0}return!1}render(t){t.addSubMTask(()=>B_(this,void 0,void 0,function*(){var e,i;(e=this.strokeGraphics)===null||e===void 0||e.render(),(i=this.backgroundGraphics)===null||i===void 0||i.render(),this.createBackground(),this.subClassRender(),this.createFilledPathMask(),this.createPathFill(),this.createArrow()}),"@ShapeImpl[render]"),this.text&&this.text.render(t),t.addSubMTask(()=>B_(this,void 0,void 0,function*(){var e,i,n,o,s,a,l,u;if(((e=this.json.textBody)===null||e===void 0?void 0:e.iterateType)==="wd"||((i=this.json.textBody)===null||i===void 0?void 0:i.iterateType)==="lt")this.renderContainer.addChild(this.container),this.text&&(this.text.container.scale.y=(o=(n=this.json.scale)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:1,this.text.container.position.x+=((a=(s=this.json.position)===null||s===void 0?void 0:s.x)!==null&&a!==void 0?a:0)+this.text.x,this.text.container.position.y+=((u=(l=this.json.position)===null||l===void 0?void 0:l.y)!==null&&u!==void 0?u:0)+this.text.y,this.text.container.scale.y===-1&&(this.text.container.position.y+=this.text.height),this.renderContainer.addChild(this.text.container));else{if(this.text){if(Object(W.isBoolean)(this.json.textRotateWithShape)&&!this.json.textRotateWithShape){const h=this.json.rotation||0;this.text.container.rotation=-h;const{width:d}=this.text;this.text.container.position.x=d}this.container.addChild(this.text.container)}this.renderContainer.addChild(this.container)}if(this.needCacheAsBitMap,this.json.id==="background"&&this.ctx.hasBackgroundFillShape){const h=$r.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)});this.ctx.renderer.render(this.renderContainer,{renderTexture:h}),this.ctx.bgTexture=h}}),"@ShapeImpl[post.render]")}clearOnSlideChange(){}initOnReuse(){}isStatic(){return!!this.json.cacheAsBitMap&&!this.ctx.animatedIds.has(this.json.id)}destroy(){var t,e,i,n;(t=this.text)===null||t===void 0||t.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),(e=this.backgroundGraphics)===null||e===void 0||e.destroy(),this.strokeFill.destroy(),(i=this.strokeGraphics)===null||i===void 0||i.destroy(),this.renderContainer.destroy(),(n=this.arrowRenderTexture)===null||n===void 0||n.destroy(!0),this.arrowList=[]}}var k_=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};function Oa(r,t){for(const e in t)r.style[e]=t[e]}class Pp{constructor(t){var e,i;this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.medianIsEnd=!1,this.pickBookmarkIndex=0,this.playCallBackList=[],this.duration=0,this.start=0,this.end=0,this.changeMediaProgress=n=>{if(this.ctx.isPlayerPaused())return void this.ctx.logger.info("Media controller prevent seek event with paused state",this.ctx.taskId);n.stopPropagation();const o=n.offsetX/this.progress.clientWidth*this.duration;this.medianIsEnd=!1,this.ctx.mode!=="interactive"&&this.jumpToTime(o),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(Ne.mediaSeek,{id:this.targetId,time:o,isPlaying:this.media.isPlaying})},this.jumpToTime=(n=0)=>{const o=Math.floor(n)+this.start;this.media.currentTime!==o&&(this.media.currentTime=o,this.changeBookmarkIndex(o,o>this.media.currentTime))},this.showController=n=>{n.stopPropagation(),this.show()},this.getMediaDuration=()=>{this.duration&&!Number.isNaN(this.duration)||(this.duration=this.media.duration,this.start&&(this.duration-=this.start,this.jumpToTime()),this.end&&(this.duration-=this.end)),this.totalTime.innerText=Pp.formatTime(this.duration)},this.playMedia=()=>k_(this,void 0,void 0,function*(){this.playButton.style.display="none",this.pauseButton.style.display="block",yield this.media.play(),this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach(n=>{n()})}),this.pauseMedia=()=>k_(this,void 0,void 0,function*(){this.playButton.style.display="block",this.pauseButton.style.display="none",yield this.media.pause()}),this.onMouseOut=n=>{n.stopPropagation(),this.mediaController.style.display="none"},this.mediaTimeUpdate=()=>k_(this,void 0,void 0,function*(){const n=this.media.currentTime-this.start;if(this.duration>0&&(n>this.duration||this.media.ended)&&(yield this.pauseMedia(),this.medianIsEnd=!0),this.currentTime.innerText=Pp.formatTime(n),this.currentProgress.style.flex=(n/this.duration).toString(),!this.bookmarkList||this.bookmarkList.length===0)return;const o=this.bookmarkList[this.pickBookmarkIndex];o&&o.time.toFixed(0)===this.media.currentTime.toFixed(0)&&(this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${o.name}`),this.pickBookmarkIndex+=1)}),this.onPauseMedia=()=>{this.playButton.style.display="block",this.pauseButton.style.display="none"},this.onPlayMedia=()=>{this.playButton.style.display="none",this.pauseButton.style.display="block",this.playCallBackList.forEach(n=>{n()})},this.playMediaFromCtrl=()=>{this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent play event with paused state",this.ctx.taskId):(this.ctx.mode!=="interactive"&&this.playMedia(),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(Ne.mediaPlay,{id:this.targetId,time:this.media.currentTime-this.start}))},this.pauseMediaFromCtrl=()=>{this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent pause event with paused state",this.ctx.taskId):(this.ctx.mode!=="interactive"&&this.pauseMedia(),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(Ne.mediaPause,{id:this.targetId,time:this.media.currentTime-this.start}))},this.targetId=t.targetId,this.ctx=t.ctx,this.height=t.height,this.width=t.width,this.target=t.target,this.media=t.media,this.info=t.info,this.shapeId=t.shapeId,this.canvasElement=t.canvasElement,this.getMedianContainer(),this.createMediaController(),this.info.cut&&(this.start=(e=this.info.cut.start)!==null&&e!==void 0?e:0,this.end=(i=this.info.cut.end)!==null&&i!==void 0?i:0),this.info.bookmarkList&&(this.bookmarkList=this.info.bookmarkList.sort((n,o)=>n.time-o.time))}getMedianContainer(){var t;let e=(t=this.canvasElement.parentElement)===null||t===void 0?void 0:t.querySelector(".median-container");e||(e=document.createElement("div"),e.className="median-container",this.canvasElement.parentElement.appendChild(e)),this.container=e}static formatTime(t){let e="00:00";if(t){const i=Math.floor(t/60),n=String(i<0?0:i).padStart(2,"0"),o=Math.floor(t%60);e=`${n}:${String(o<0?0:o).padStart(2,"0")}`}return e}createButton(){const t={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px"};Oa(this.playButton,Object.assign(Object.assign({},t),{display:"block"}));const e=document.createElement("img");Oa(e,{height:"20px"}),e.src="https://convertcdn.netless.link/publicFiles/icon/play.png",this.playButton.appendChild(e),Oa(this.pauseButton,Object.assign(Object.assign({},t),{display:"none"}));const i=document.createElement("img");Oa(i,{height:"20px"}),i.src="https://convertcdn.netless.link/publicFiles/icon/pause.png",this.pauseButton.appendChild(i)}createTimer(){const t=document.createElement("div");Oa(t,{width:"100px"}),this.currentTime.innerText="00:00";const e=document.createElement("span");return e.innerText="/",t.append(this.currentTime,e,this.totalTime),t}createProgress(){Oa(this.progress,{flex:"1",position:"relative",marginRight:"10px"});const t=document.createElement("div");Oa(t,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(t),Oa(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),t.appendChild(this.currentProgress)}changeBookmarkIndex(t,e){if(this.bookmarkList&&this.bookmarkList.length!==0){if(this.pickBookmarkIndex>0){for(let i=0;i<this.pickBookmarkIndex;i++)if(this.bookmarkList[i].time>t){this.pickBookmarkIndex=i;break}}if(e){let i=this.pickBookmarkIndex-1;for(let n=0;n<this.bookmarkList.length;n++)this.bookmarkList[n].time<t&&(i=n);for(let n=this.pickBookmarkIndex;n<=i;n++){const o=this.bookmarkList[n];o&&this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${o.name}`)}this.pickBookmarkIndex=i+1}}}bindEvent(){this.mediaController.addEventListener("mouseover",this.showController,!1),this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.progress.addEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this.pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1)}setControllerPosition(){var t;const{target:e}=this,{stageWidth:i,stageHeight:n}=this.ctx,o=e.getGlobalPosition(),s=Number((t=this.container)===null||t===void 0?void 0:t.getAttribute("data-scale")),a=i*s,l=1/s*(300>a?a/300:1);o.y=o.y+this.height-50,o.x=Math.max(o.x,0),o.x=Math.min(o.x,i-300*l),o.y=Math.max(o.y,0),o.y=Math.min(o.y,n-50),Oa(this.mediaController,{height:"50px",borderRadius:"25px",width:"300px",flexDirection:"row",alignItems:"center",position:"absolute",left:o.x+"px",top:o.y+"px",display:"none",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:`scale(${l})`,transformOrigin:"0 100%"})}createMediaController(){this.setControllerPosition(),this.createButton();const t=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,t,this.progress),this.container.appendChild(this.mediaController),this.bindEvent()}addPlayCallBack(t){this.playCallBackList.push(t)}unbindEvent(){this.mediaController.removeEventListener("mouseover",this.showController,!1),this.mediaController.removeEventListener("mouseout",this.onMouseOut,!1),this.progress.removeEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.removeEventListener("click",this.pauseMediaFromCtrl,!1),this.media.removeAllListeners()}show(){this.setControllerPosition(),this.mediaController.style.display="flex"}hide(){this.mediaController.style.display="none"}destroy(){var t;this.unbindEvent(),this.playCallBackList=[],(t=this.container)===null||t===void 0||t.removeChild(this.mediaController)}}var lL=v(49);class U_ extends P.a{constructor(t,e){super(),this.isGlobalPause=!1,this.lastTime=-1,this.howl=null,this.rctClient=null,this.url=t,this.runningAudio=e,Gn.RtcAudioClazz?(this.rctClient=new Gn.RtcAudioClazz(t),this.rctClient.on("load",()=>this.emit("load")),this.rctClient.on("pause",()=>this.emit("pause")),this.rctClient.on("play",()=>this.emit("play"))):(this.howl=new lL.Howl({src:[t]}),this.howl.on("load",()=>this.emit("load")),this.howl.on("pause",()=>this.emit("pause")),this.howl.on("play",()=>this.emit("play")))}startTimeChangeEmit(){this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate")),this.isEnded||setTimeout(()=>this.startTimeChangeEmit(),300)}play(){var t,e,i;this.runningAudio.has(this.url)&&((t=this.runningAudio.get(this.url))===null||t===void 0||t.stop(),this.runningAudio.delete(this.url)),this.lastTime=-1,(e=this.howl)===null||e===void 0||e.play(),(i=this.rctClient)===null||i===void 0||i.play(),this.startTimeChangeEmit(),this.runningAudio.set(this.url,this)}pause(){var t,e;(t=this.howl)===null||t===void 0||t.pause(),(e=this.rctClient)===null||e===void 0||e.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}globalPause(){this.isPaused||(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}stop(){var t;(t=this.howl)===null||t===void 0||t.stop(),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}destroy(){var t,e,i,n,o,s,a;(t=this.howl)===null||t===void 0||t.pause(),(e=this.howl)===null||e===void 0||e.unload(),(i=this.rctClient)===null||i===void 0||i.pause(),(n=this.rctClient)===null||n===void 0||n.destroy(),(o=this.rctClient)===null||o===void 0||o.removeAllListeners("load"),(s=this.rctClient)===null||s===void 0||s.removeAllListeners("play"),(a=this.rctClient)===null||a===void 0||a.removeAllListeners("pause"),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}get currentTime(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek():-1}set currentTime(t){this.rctClient?this.rctClient.currentTime=t:this.howl&&this.howl.seek(t)}get duration(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration():0}get isEnded(){return Math.abs(this.currentTime-this.duration)<.001}get isPaused(){return this.rctClient?this.rctClient.isPaused:!!this.howl&&this.howl.playing()}volume(t){this.rctClient?this.rctClient.volume(t):this.howl&&this.howl.volume(t)}}var uL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class hL extends P.a{constructor(t){var e,i;super(),this.type="video",this.sprite=new hr,this.isPlaying=!1,this.isGlobalPause=!1,this.updateVolume=d=>{Gn.RtcAudioClazz?this.rtcAudio.volume(d):this.videoResource.source&&(this.videoResource.source.volume=d)},this.id=t.id,this.start=(e=t.video.cut)===null||e===void 0?void 0:e.start,this.end=(i=t.video.cut)===null||i===void 0?void 0:i.end,this.container=t.container,this.ctx=t.ctx,this.ctx.medias[this.id]=this;let n=t.video.src;this.ctx.loaderDelegate&&(n=this.ctx.loaderDelegate.redirectMedia(n),this.ctx.logger.info(`redirect media url from ${t.video.src} to ${n} by delegate.`,t.ctx.taskId)),this.videoResource=new R1(n,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0});let o=t.video.src.replace(/4$/,"3");this.ctx.loaderDelegate&&(o=this.ctx.loaderDelegate.redirectMedia(o),this.ctx.logger.info(`redirect media url from ${t.video.src.replace(/4$/,"3")} to ${o} by delegate.`,t.ctx.taskId)),this.rtcAudio=new U_(o,t.ctx.runningAudio);const{video:s,width:a,height:l,target:u}=t;this.controller=new Pp({targetId:t.id,shapeId:t.shapeId,ctx:t.ctx,width:a,height:l,target:u,media:this,info:s,canvasElement:t.canvasElement}),this.controller.addPlayCallBack(()=>{this.sprite.width=a,this.sprite.height=l,this.ctx.clock.setTimeout(()=>{this.sprite.visible=!0},50)});const h=new Ai(null,{height:l,width:a});h.resource=this.videoResource,this.videoResource.bind(h),this.sprite=new hr,this.sprite.visible=!1,this.sprite.texture=new Qe(h),this.sprite.interactive=!0,this.container.addChild(this.sprite),this.sprite.on("mouseover",d=>{d.stopPropagation(),this.controller.show()}),this.sprite.on("mouseout",d=>{d.stopPropagation(),this.controller.hide()}),["durationchange","timeupdate","pause","play"].forEach(d=>{this.videoResource.source.addEventListener(d,()=>{d!=="timeupdate"||this.isPlaying||this.pause(),this.emit(d)})}),this.ctx.activeMedia.add(this),this.ctx.volumeAdjuster.on("update",this.updateVolume)}get currentTime(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.currentTime)!==null&&e!==void 0?e:0}set currentTime(t){Gn.RtcAudioClazz&&(this.rtcAudio.currentTime=t),this.videoResource.source&&(this.videoResource.source.currentTime=t)}get paused(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.paused)===null||e===void 0||e}get ended(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.ended)===null||e===void 0||e}get duration(){var t,e;return(e=(t=this.videoResource.source)===null||t===void 0?void 0:t.duration)!==null&&e!==void 0?e:0}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){var t;return uL(this,void 0,void 0,function*(){this.isPlaying=!0,this.updateVolume(this.ctx.volumeAdjuster.volume),yield this.load(),yield this.ctx.clock.waitUntil(()=>{const i=this.videoResource.source;return!!(i&&i.videoWidth>0)},3e3);const e=this.videoResource.source;e&&e.videoWidth<=0||(Gn.RtcAudioClazz?(this.videoResource.source.volume=0,this.rtcAudio.once("play",()=>{var i;(i=this.videoResource.source)===null||i===void 0||i.play()}),this.rtcAudio.play()):yield(t=this.videoResource.source)===null||t===void 0?void 0:t.play())})}load(){return this.videoResource.load()}pause(){var t;this.isPlaying=!1,Gn.RtcAudioClazz?(this.rtcAudio.once("pause",()=>{var e;(e=this.videoResource.source)===null||e===void 0||e.pause()}),this.rtcAudio.pause()):(t=this.videoResource.source)===null||t===void 0||t.pause()}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){var t;this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),(t=this.videoResource)===null||t===void 0||t.destroy(),this.rtcAudio.destroy(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}}var cL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class dL extends P.a{constructor(t){super(),this.type="audio",this.isPlaying=!1,this.isGlobalPause=!1,this.updateVolume=s=>{this.audioPlayer.volume(s)},this.id=t.id;let e=t.audio.src;t.ctx.loaderDelegate&&(e=t.ctx.loaderDelegate.redirectMedia(e),t.ctx.logger.info(`redirect media url from ${t.audio.src} to ${e} by delegate.`,t.ctx.taskId)),this.audioPlayer=new U_(e,t.ctx.runningAudio),t.audio.cut&&(this.start=t.audio.cut.start,this.end=t.audio.cut.end),this.ctx=t.ctx,this.ctx.medias[this.id]=this;const{width:i,height:n,target:o}=t;this.controller=new Pp({targetId:t.id,shapeId:t.shapeId,ctx:t.ctx,height:n,width:i,target:o,media:this,info:t.audio,canvasElement:t.canvasElement}),this.audioPlayer.on("load",()=>this.emit("durationchange")),this.audioPlayer.on("timeupdate",()=>this.emit("timeupdate")),this.audioPlayer.on("pause",()=>this.emit("pause")),this.audioPlayer.on("play",()=>this.emit("play")),this.ctx.activeMedia.add(this),this.ctx.volumeAdjuster.on("update",this.updateVolume)}get currentTime(){return this.audioPlayer.currentTime}set currentTime(t){this.audioPlayer.currentTime=t}get paused(){return this.audioPlayer.isPaused}get isPaused(){return this.audioPlayer.isPaused}get ended(){return this.audioPlayer.isEnded}get duration(){return this.audioPlayer.duration}load(){return Promise.resolve()}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){return cL(this,void 0,void 0,function*(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent play event with paused state",this.ctx.taskId):(this.updateVolume(this.ctx.volumeAdjuster.volume),this.isPlaying=!0,this.audioPlayer.play())})}pause(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent pause event with paused state",this.ctx.taskId):(this.isPlaying=!1,this.audioPlayer.pause())}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent seek event with paused state",this.ctx.taskId):this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.audioPlayer.pause(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}}class pL extends JS{constructor(t,e,i,n){super(Object.assign(Object.assign({},t),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),e,i,n),this.isInteractiveOutside=!1,this.cmd=new LI(this),this.media=t==null?void 0:t.media,this.picFill=new co(this.ctx,t.picFill,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1})}applyCommand(t,e){var i,n,o,s,a;if(e==="call")if(/playFrom\(([0-9.]+)\)/.test(t)){const l=t.match(/playFrom\(([0-9.]+)\)/),u=Number(l[1]||"0");(i=this.mediaPlayer)===null||i===void 0||i.play().then(()=>{var h;(h=this.mediaPlayer)===null||h===void 0||h.seek(u)})}else t==="custom-pause"?(n=this.mediaPlayer)===null||n===void 0||n.pause():t==="togglePause"?(o=this.mediaPlayer)===null||o===void 0||o.togglePause():t==="stop"&&((s=this.mediaPlayer)===null||s===void 0||s.pause(),(a=this.mediaPlayer)===null||a===void 0||a.seek(0))}renderPic(){var t,e,i,n,o;const{displayObject:s}=this.picFill;if(s){const a=(t=this.backgroundGraphics)===null||t===void 0?void 0:t.getClonedDisplayObject();((e=this.backgroundGraphics)===null||e===void 0?void 0:e.isNeedMask(s.width,s.height))&&a&&(s.mask=a,this.container.addChild(a)),s.width=this.designWidth,s.height=this.designHeight,s instanceof A_&&this.ctx.slideScopeEventHub.once("slide-render",l=>{this.ctx.slideIndex===l&&s.play()}),this.container.addChild(s),((i=this.media)===null||i===void 0?void 0:i.type)==="video"&&this.media.src?(this.mediaPlayer=new hL({id:this.json.id+"-video",shapeId:this.json.id,ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:s,container:this.container,canvasElement:this.ctx.view}),(n=this.mediaPlayer)===null||n===void 0||n.sprite):((o=this.media)===null||o===void 0?void 0:o.type)==="audio"&&this.media.src&&(this.mediaPlayer=new dL({id:this.json.id+"-audio",shapeId:this.json.id,ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:s,canvasElement:this.ctx.view})),this.mediaPlayer&&(this.isInteractiveOutside=this.container.interactive,this.container.interactive=!0,this.container.on("mouseover",()=>{this.mediaPlayer.showController()}),this.container.on("mouseout",()=>{this.mediaPlayer.hideController()},!1))}}preRender(t){super.preRender(t)}subClassRender(){this.renderPic()}clearOnSlideChange(){super.clearOnSlideChange(),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}initOnReuse(){super.initOnReuse(),this.mediaPlayer&&(this.container.interactive=!0)}isStatic(){const t=this.json;return(!t.media||t.media.type!=="video")&&super.isStatic()}destroy(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy()}}var Ip=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class G_ extends I_{constructor(t,e,i,n,o){super(t,e,i),this.children=[],this.cacheSprite=new hr,this.cacheContainer=new Yn,this.json=t,this.json.fillStyle&&this.json.fillStyle.fillType==="groupFill"&&n&&(this.json.fillStyle=n),this.container.name=t.id,this.cacheContainer.name=t.id+"-cache-container",this.ctx.timingTargets.addTarget(t.id,this),this.updateTransform(this.json),this.fillObject=new co(this.ctx,t.fillStyle,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1}),this.createChildren(o)}createChildren(t){var e,i,n,o;const s={x:(i=(e=this.json.position)===null||e===void 0?void 0:e.x)!==null&&i!==void 0?i:0,y:(o=(n=this.json.position)===null||n===void 0?void 0:n.y)!==null&&o!==void 0?o:0};for(let a=0,l=this.json.children.length;a<l;a++)t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){const u=this.json.children[a];let h=null;(u==null?void 0:u.type)==="Shape"?h=new JS(u,this.ctx,s,this.json.fillStyle):(u==null?void 0:u.type)==="Picture"?h=new pL(u,this.ctx,s,this.json.fillStyle):(u==null?void 0:u.type)==="Container"&&(h=new G_(u,this.ctx,s,this.json.fillStyle,t)),h&&this.children.push(h)}),"@ContainerImpl[child.init]")}get interactiveContainer(){return this.container}get renderContainer(){return this.container}preRender(t){for(const e of this.children)t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){e.preRender(t)}),"@ContainerImpl[child.preRender]")}getBgElement(){return null}getIterateEntry(t,e,i){return e===0?this:(this.ctx.eventHub.emit("IterateTimeNodeEnd",i),null)}getTextElement(){return null}render(t){let e=new Yn;for(const i of this.children)i.render(t),t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){var n;i.isStatic()&&!this.json.cacheAsTexture&&i.json.width<4096&&i.json.height<4096?e.addChild(i.renderContainer):(e.children.length>0&&(e.cacheAsBitmap=!0,this.cacheContainer.addChild(e),e=new Yn),this.cacheContainer.addChild(i.renderContainer)),(i.json.hlinkHover||i.json.hlinkClick)&&((n=i.hyperlink)===null||n===void 0||n.addProxy(this.container))}),"@ContainerImpl[child.render]");t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){e.children.length>0&&(e.cacheAsBitmap=!0,this.cacheContainer.addChild(e))}),"@ContainerImpl[child.render]"),t.addSubMTask(()=>Ip(this,void 0,void 0,function*(){this.container.addChild(this.cacheContainer),this.json.cacheAsTexture&&(function(i,n,o,s,a){const l=i.getBounds(),u=Math.min(l.x,n.x,l.x+l.width,n.x+n.width),h=Math.max(l.x,n.x,l.x+l.width,n.x+n.width),d=Math.min(l.y,n.y,l.y+l.height,n.y+n.height),p=h-u,m=Math.max(l.y,n.y,l.y+l.height,n.y+n.height)-d;let g=El(n.x-l.x),_=El(n.y-l.y);a||(g=Math.max(0,g),_=Math.max(0,_));const y=$r.create({width:p,height:m,resolution:s.renderer.resolution});i.position.x=g,i.position.y=_,s.renderer.render(i,{renderTexture:y}),o.texture=y,o.position.x=-g,o.position.y=-_}(this.cacheContainer,new xi(this.designX,this.designY,this.designWidth,this.designHeight),this.cacheSprite,this.ctx,!1),this.container.addChild(this.cacheSprite),this.cacheContainer.position.x=0,this.cacheContainer.position.y=0,this.cacheContainer.visible=!1)}),"@ContainerImpl[child.append]")}clearOnSlideChange(){this.children.forEach(t=>t.clearOnSlideChange())}initOnReuse(){this.children.forEach(t=>t.initOnReuse())}isStatic(){return!!this.json.cacheAsTexture&&!this.ctx.animatedIds.has(this.json.id)}destroy(){this.cacheSprite&&this.cacheSprite.destroy({texture:!0}),this.children.forEach(t=>t.destroy()),this.container.destroy({children:!0,texture:!0,baseTexture:!0}),this.cacheContainer.destroy({children:!0,texture:!0,baseTexture:!0})}}class Lp extends P.a{constructor(t,e,i,n){super(),this.cond={},this.timeoutIds=[],this.condHandle=(o,s={})=>{if(o)if(o.delay&&o.delay>0){const a=this.ctx.clock.setTimeout(()=>{o.event&&(this.cond[o.event]=!0,this.detectTrigger(s))},o.delay);this.timeoutIds.push(a)}else this.cond[o.event]=!0,this.detectTrigger(s);else this.detectTrigger(s)},this.id=t,this.ctx=n,this.eventHubs=i,e.forEach(o=>{this.addCond(o)})}setTriggerParams(t){this.triggerParams=t}addCond(t){const e=i=>{this.condHandle(t,i)};t.event&&(/^shape/.test(t.event)||/^time/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.global.addListener(t.event,e)):/^runtime/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):/^self/.test(t.event)?t.delay&&t.delay>0&&(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):this.cond[t.event]=!1)}isTrigger(){return Object.keys(this.cond).every(t=>!!this.cond[t])}isTriggerWithoutParent(){return Object.keys(this.cond).filter(t=>t!=="self").every(t=>!!this.cond[t])}detectTrigger(t){if(Object.keys(this.cond).every(e=>!!this.cond[e])){Object.keys(this.cond).forEach(i=>{this.cond[i]=!1});const e=this.triggerParams;this.triggerParams=void 0,this.emit("active",e,t)}}reset(){Object.keys(this.cond).forEach(t=>{this.cond[t]=!1}),this.timeoutIds.forEach(t=>this.ctx.clock.clearTimeout(t))}}class fL extends P.a{constructor(t){super(),this.isTimeNodeEndSync=!1,this.interactiveListeners=[],this.runtimeNodeEventHub=new P.a,this._currentSeqIndex=0,this._currentSeqState="idle",this.isForward=!0,this.autoPlay=!1,this.handlePrev=(p=!1)=>{var m,g,_,y,w,A;this.hasPrev()||!this.isMainSeq?this.currentSeqState==="idle"?(this.decrSeqIndex(),(m=this.commonTimeNode.children[this.currentSeqIndex])===null||m===void 0||m.commonTimeNode.seekToStart(),(g=this.commonTimeNode.children[this.currentSeqIndex])===null||g===void 0||g.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.currentSeqState==="running"?((_=this.commonTimeNode.children[this.currentSeqIndex])===null||_===void 0||_.commonTimeNode.seekToStart(),(y=this.commonTimeNode.children[this.currentSeqIndex])===null||y===void 0||y.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.currentSeqState==="end"&&(this.currentSeqIndex>=this.commonTimeNode.children.length&&(this.currentSeqIndex=this.commonTimeNode.children.length-1),(w=this.commonTimeNode.children[this.currentSeqIndex])===null||w===void 0||w.commonTimeNode.seekToStart(),(A=this.commonTimeNode.children[this.currentSeqIndex])===null||A===void 0||A.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.globalEventHub.emit("c:prev slide",p)},this.handleNext=(p=!1)=>{var m,g,_,y;this.isTimeNodeEndSync&&(this.isTimeNodeEndSync=!1,this.currentSeqState="idle",this.currentSeqIndex=0),this.hasNext()||!this.isMainSeq?this.currentSeqState==="idle"?(m=this.commonTimeNode.children[this.currentSeqIndex])===null||m===void 0||m.commonTimeNode.startTimeNodeForce():this.currentSeqState==="running"?((g=this.commonTimeNode.children[this.currentSeqIndex])===null||g===void 0||g.commonTimeNode.seekToEnd(!1,!0),this.currentSeqState="end",this.incrSeqIndex(),(_=this.commonTimeNode.children[this.currentSeqIndex])===null||_===void 0||_.commonTimeNode.startTimeNodeForce()):this.currentSeqState==="end"&&(this.incrSeqIndex(),(y=this.commonTimeNode.children[this.currentSeqIndex])===null||y===void 0||y.commonTimeNode.startTimeNodeForce()):this.globalEventHub.emit("c:next slide",p)};const{json:e,iterateType:i,isIterate:n,isSub:o,parent:s,ctx:a,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.isMainSeq=e.ctn.nodeType==="mainSeq",this.isInteractiveSeq=e.ctn.nodeType==="interactiveSeq",this.id=e.ctn.id,this.isIterate=n,this.json=e,this.ctx=a,this.globalEventHub=l,this.commonTimeNode=new Ic({json:e.ctn,isSub:o,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:a,parent:s,isIterate:!1,iterateType:i,iterateIndex:u,iterateId:h,isInInteractiveSeq:d||this.isInteractiveSeq}),this.bindShapeEvent(),this.nextConds=new Lp("mainSeq",e.nextCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.prevConds=new Lp("mainSeq",e.preCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.commonTimeNode.on("timeNodeRestart",()=>{this.currentSeqIndex=0,this.currentSeqState="idle"}),this.commonTimeNode.on("childTimeNodeStart",p=>{const m=this.commonTimeNode.children.findIndex(g=>g.commonTimeNode.uuid===p.id);m>=0&&(this.currentSeqIndex=m),this.currentSeqState="running",this.isMainSeq&&this.ctx.eventHub.emit(Ne.mainSeqStepStart,m)}),this.commonTimeNode.on("childTimeNodeEnd",p=>{const m=this.commonTimeNode.children.findIndex(g=>g.commonTimeNode.uuid===p.id);m>=0&&(this.currentSeqIndex=m),this.currentSeqState="end",this.autoPlay&&this.ctx.clock.setTimeout(()=>{this.handleNext()}),this.isMainSeq&&this.ctx.eventHub.emit(Ne.mainSeqStepEnd,m)}),this.commonTimeNode.on("timeNodeEndSync",()=>{this.isTimeNodeEndSync=!0,this.commonTimeNode.resetForRepeat()}),this.commonTimeNode.on("timeNodeDestroy",()=>{this.interactiveListeners.forEach(([p,m])=>{p&&m&&p.interactiveContainer.removeListener("pointerdown",m)}),this.interactiveListeners=[]}),this.nextConds.on("active",(p,m)=>{this.handleNext(m)}),this.prevConds.on("active",(p,m)=>{this.handlePrev(m)})}get currentSeqIndex(){return this._currentSeqIndex}set currentSeqIndex(t){this._currentSeqIndex=t,this.isMainSeq?this.ctx.eventHub.emit(Ne.mainSeqStepChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(Ne.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:t,state:this._currentSeqState}})}get currentSeqState(){return this._currentSeqState}set currentSeqState(t){this._currentSeqState=t,this.isMainSeq?this.ctx.eventHub.emit(Ne.mainSeqStateChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(Ne.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:this._currentSeqIndex,state:t}})}get stepLength(){return this.commonTimeNode.children.length}get currentStep(){return this.currentSeqIndex}get currentState(){return this.currentSeqState}startAutoPlay(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}incrSeqIndex(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}decrSeqIndex(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}hasPrev(){return!(this.currentSeqIndex<=0&&this.currentSeqState==="idle")}hasNext(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&this.currentSeqState==="end")}bindShapeEvent(){this.json.ctn.nodeType==="interactiveSeq"&&this.json.nextCondLst.forEach(t=>{if(/^shape/.test(t.event)){const e=t.event.split(" ")[1];if(e){const i=this.ctx.timingTargets.getTargetById(e);if(i){i.interactiveContainer.interactive=!0,i.interactiveContainer.cursor="pointer";const n=()=>{this.ctx.eventHub.emit(Ne.userInput);const o=`shape ${e} onClick`,{mode:s}=this.ctx;s!=="interactive"&&s!=="sync"||this.ctx.eventHub.emit(Ne.interactiveSeqAction,{action:o,seqId:this.json.ctn.id}),s!=="sync"&&s!=="local"||this.globalEventHub.emit(o)};i.interactiveContainer.on("pointerdown",n),this.interactiveListeners.push([i,n])}}}})}setCurrentStep(t,e){this.isInteractiveSeq&&this.commonTimeNode.applyCount===0&&(this.commonTimeNode.applyCount=1);let i=t;this.commonTimeNode.seekToStart();const{length:n}=this.commonTimeNode.children;if(i===-1&&(i=n-1),i>=0&&i<n)for(let o=0;o<=i;o++){const s=this.commonTimeNode.children[o];o!==i?s.commonTimeNode.seekToEnd(!1,!0):e==="start"?s.commonTimeNode.seekToStart():e==="end"&&s.commonTimeNode.seekToEnd(!1,!0)}this.currentSeqIndex=i,this.currentSeqState=e==="start"?"idle":"end"}}function Gs(r,t,e){const i=t.split(".");i.reduce((n,o,s)=>{if(n)return s!==i.length-1?n[o]:void(n[o]=e);console.warn(`${r} not support ${t}`)},r)}function Sg(r,t){return t?t.split(".").reduce((e,i)=>{if(e)return e[i];console.warn(`${r} not support ${t}`)},r):null}class Al{constructor(t){this.timingTarget=null,this.runtimeNodeEventHub=new P.a,this.basicOnTimeNodeEnd=()=>{if(this.isConflict){const{target:p}=this.json.cBhvr,m=this.getTargetId(p);this.ctx.conflictTimeNodeManager.removeRunningTimeNode(m,this.modifyAttrKey)}},this.basicOnTimeLineStart=()=>{if(this.isConflict){const{target:p}=this.json.cBhvr;if(this.activeWhenConflict==="next"){const m=this.getTargetId(p);this.ctx.conflictTimeNodeManager.addRunningTimeNode(m,this.modifyAttrKey,this.commonTimeNode)}else this.activeWhenConflict==="prev"&&this.commonTimeNode.dispose()}};const{isIterate:e,isSub:i,json:n,ctx:o,parent:s,eventHub:a,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.json=n,this.id=n.cBhvr.ctn.id,this.ctx=o,this.globalEventHub=a,this.commonTimeNode=new Ic({json:n.cBhvr.ctn,isSub:i,eventHubs:{global:a,runtime:this.runtimeNodeEventHub},ctx:o,parent:s,isIterate:e,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}),this.timingTarget=this.ctx.timingTargets.getTarget(n.cBhvr.target,e,{type:l,index:u,id:h}),this.commonTimeNode.on("seekToStart",()=>this.onSeekToStart()),this.commonTimeNode.on("seekToEnd",()=>this.onSeekToEnd()),this.commonTimeNode.on("timelineStart",this.basicOnTimeLineStart),this.commonTimeNode.on("timeNodeEnd",this.basicOnTimeNodeEnd)}getTargetId(t){let e=t.id;return t.type==="shape"&&t.txEl&&(e=`${e}-txEl-${t.txEl.range[0]}`),this.commonTimeNode.isIterate&&(e=`${e}-iterate-${this.commonTimeNode.iterateIndex}`),e}}class mL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.updateStartValue=()=>{this.timingTarget&&(this.startVal=Sg(this.timingTarget,this.json.cBhvr.attrList[0]))},this.onSeekToStart=()=>{const e=this.json.cBhvr.attrList[0];this.startVal!==null&&this.timingTarget&&Gs(this.timingTarget,e,this.startVal)},this.onSeekToEnd=()=>{const e=this.json.cBhvr.attrList[0],i=this.json.cBhvr.to||this.json.to;i&&this.timingTarget&&Gs(this.timingTarget,e,i)},this.commonTimeNode.on("timeNodeStart",this.updateStartValue),this.commonTimeNode.on("timeNodeCreate",this.updateStartValue),this.commonTimeNode.on("timeUpdate",({duration:e,delta:i})=>{if(i/e>=1){const n=this.json.cBhvr.attrList[0];this.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");const o=this.json.cBhvr.to||this.json.to;o&&this.timingTarget&&Gs(this.timingTarget,n,o)}})}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}}var Tg=function(r,t,e,i){var n,o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(n=r[a])&&(s=(o<3?n(s):o>3?n(t,e,s):n(t,e))||s);return o>3&&s&&Object.defineProperty(t,e,s),s};class Eg{constructor(t,e){this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:i=>i/Math.PI*180,exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:i=>i/180*Math.PI,rand:Math.random,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=e,this.val=t.val.value,this.time=t.time,t.fmla&&(this.fmla=this.parseFmla(t.fmla))}parseFmla(t){let e=t.replace(/#ppt_h/g,`(${this.timingTarget.design_ppt_h})`);return e=e.replace(/#ppt_w/g,`(${this.timingTarget.design_ppt_w})`),e=e.replace(/#ppt_x/g,`(${this.timingTarget.design_ppt_x})`),e=e.replace(/#ppt_y/g,`(${this.timingTarget.design_ppt_y})`),e=e.replace(/ppt_w/g,"vars.ppt_w"),e=e.replace(/ppt_h/g,"vars.ppt_h"),e=e.replace(/ppt_x/g,"vars.ppt_x"),e=e.replace(/ppt_y/g,"vars.ppt_y"),e=e.replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach(i=>{const n=new RegExp(`([^a-z])${i}([^a-z])`,"g");e=e.replace(n,(o,s,a)=>`${s}math.${i}${a}`)}),new Function("vars","math","$","return "+e)}}class ZS extends Eg{constructor(t,e,i){super(t,e),this.value=t.val.value,i&&(this.fmla=this.parseFmla(i))}resolveValue(){return this.value}interpolationFrom(t,e,i){const n=t.resolveValue(i),o=n+(this.resolveValue()-n)*e;return t.fmla?t.fmla(i,this.math,o):o}}Tg([mg()],ZS.prototype,"interpolationFrom",null);class KS extends Eg{constructor(t,e){var i;super(t,e),this.value=(i=t.val)===null||i===void 0?void 0:i.value}interpolationFrom(t,e,i){let n=t.resolveValue(i);return e>this.time&&(n=this.resolveValue()),n}resolveValue(){return this.value||""}}Tg([mg()],KS.prototype,"interpolationFrom",null);class Pc extends Eg{constructor(t,e){super(t,e),this.fn=this.parseFmla(this.val)}resolveValue(t){return this.fn(t,this.math,1)}interpolationFrom(t,e,i){const n=t.resolveValue(i),o=n+(this.resolveValue(i)-n)*e;return t.fmla?t.fmla(i,this.math,o):o}}Tg([mg()],Pc.prototype,"interpolationFrom",null);class QS extends Eg{constructor(t,e){super(t,e),this.value=t.val.value}interpolationFrom(t,e){return Mp(t.resolveValue(),this.value,e)}resolveValue(){return this.value}}Tg([mg()],QS.prototype,"interpolationFrom",null);class gL extends Al{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0},this.keyFrames=[],this.isColorAnim=!1,this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal=Sg(this.timingTarget,this.json.cBhvr.attrList[0]))},this.updateVars=()=>{var e,i,n,o;!((e=this.timingTarget)===null||e===void 0)&&e.ppt_h&&(this.vars.ppt_h=this.timingTarget.ppt_h),!((i=this.timingTarget)===null||i===void 0)&&i.ppt_w&&(this.vars.ppt_w=this.timingTarget.ppt_w),!((n=this.timingTarget)===null||n===void 0)&&n.ppt_x&&(this.vars.ppt_x=this.timingTarget.ppt_x),!((o=this.timingTarget)===null||o===void 0)&&o.ppt_y&&(this.vars.ppt_y=this.timingTarget.ppt_y),this.isColorAnim},this.onTimeUpdate=({duration:e,delta:i})=>{const n=i/e,o=this.keyFrames.findIndex(p=>n<=p[0]),{attrList:s}=this.json.cBhvr;if(o<0){const p=this.keyFrames[this.keyFrames.length-1];return void(this.timingTarget&&s&&s[0]&&Gs(this.timingTarget,s[0],p[1].resolveValue(this.vars)))}const a=o-1,l=this.keyFrames[o],u=this.keyFrames[a]||l,h=l[0]-u[0]==0?1:(n-u[0])/(l[0]-u[0]),d=l[1].interpolationFrom(u[1],h,this.vars);this.timingTarget&&s&&s[0]&&Gs(this.timingTarget,s[0],d)},this.onSeekToStart=()=>{this.startVal!==null&&this.timingTarget&&Gs(this.timingTarget,this.json.cBhvr.attrList[0],this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.initKeyFrames(),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timelineStart",this.updateVars),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}initKeyFrames(){var t;const{valueType:e}=this.json;if(this.json.tavLst.length<=0){if(this.json.to){if(this.json.from||this.startVal){const n={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if(e==="num"&&this.timingTarget){const o=new Pc(n,this.timingTarget);this.keyFrames.push([n.time,o])}}const i={time:1,val:{type:"string",value:this.json.to},fmla:""};if(e==="num"&&this.timingTarget){const n=new Pc(i,this.timingTarget);this.keyFrames.push([i.time,n])}}else if(this.json.by){const i={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if(e==="num"&&this.timingTarget){const o=new Pc(i,this.timingTarget);this.keyFrames.push([i.time,o])}const n={time:1,val:{type:"string",value:(((t=i.val)===null||t===void 0?void 0:t.value)||"")+"+"+this.json.by},fmla:""};if(e==="num"&&this.timingTarget){const o=new Pc(n,this.timingTarget);this.keyFrames.push([n.time,o])}}}if(this.json.tavLst.length>0){for(const i of this.json.tavLst)if(i.val&&this.timingTarget){let n=null;i.val.type==="string"?e==="num"?n=new Pc(i,this.timingTarget):e==="str"&&(n=new KS(i,this.timingTarget)):i.val.type==="number"?n=new ZS(i,this.timingTarget):i.val.type==="color"?(this.isColorAnim=!0,n=new QS(i,this.timingTarget)):i.val.type==="boolean"&&console.warn("not implements"),n&&this.keyFrames.push([i.time,n])}}}}var vL=v(50),_L=v.n(vL),yL=v(51),xL=v.n(yL);class bL extends Dr{constructor(){super(xL.a,_L.a,{percent:0,direction:1,transition:0})}set transition(t){this.uniforms.transition=t}set percent(t){this.uniforms.percent=t}set direction(t){this.uniforms.direction=t}}var wL=v(52),SL=v.n(wL);class TL extends Dr{constructor(){super(void 0,SL.a,{percent:0,transition:1})}set transition(t){this.uniforms.transition=Math.pow(t,t)}set percent(t){this.uniforms.percent=t}}class EL extends Al{constructor(t){var e;super(t),this.filterType="",this.isConflict=!0,this.activeWhenConflict="prev",this.onTimeUpdate=({duration:o,delta:s})=>{const a=s/o;this.filter&&(this.filter.percent=this.commonTimeNode.applyTimeFilter(a)),a>=1&&this.timingTarget&&this.ctx.clock.setTimeout(()=>{this.timingTarget&&(this.timingTarget.container.filters=[])})},this.onSeekToStart=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.onSeekToEnd=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.commonTimeNode.on("timelineStart",()=>{this.filter&&this.timingTarget&&(this.timingTarget.container.filters=[this.filter])}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate);let i=0;t.json.transition==="out"?i=-1:t.json.transition==="in"&&(i=1);const n=(e=t.json.filter)===null||e===void 0?void 0:e.match(/^([a-zA-Z]+)(\((.+)\))?/);if(n){const o=n[1],s=n[3];if(o==="wipe"){const a=new bL;s==="up"?a.direction=1:s==="down"?a.direction=2:s==="left"?a.direction=3:s==="right"&&(a.direction=4),this.filter=a,this.filterType=`${o}-${s}`}else if(o==="fade"){const a=new TL;this.filter=a,this.filterType=""+o}this.filter&&(this.filter.transition=i)}}get modifyAttrKey(){return this.filterType}}class ML extends Al{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startPos=null,this.onTimeNodeStart=()=>{var e,i;this.startPos={x:((e=this.timingTarget)===null||e===void 0?void 0:e.ppt_x)||0,y:((i=this.timingTarget)===null||i===void 0?void 0:i.ppt_y)||0}},this.onTimeUpdate=({duration:e,delta:i})=>{var n;const o=i/e,s=(n=this.path)===null||n===void 0?void 0:n.getPoint(o);this.timingTarget&&s&&(this.timingTarget.ppt_x=s.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=s.y+ +this.timingTarget.design_ppt_y)},this.onSeekToStart=()=>{this.timingTarget&&this.startPos&&(this.timingTarget.ppt_x=this.startPos.x,this.timingTarget.ppt_y=this.startPos.y)},this.onSeekToEnd=()=>{var e,i,n;const o=(i=(e=this.commonTimeNode.json)===null||e===void 0?void 0:e.spd)!==null&&i!==void 0?i:1,s=(n=this.path)===null||n===void 0?void 0:n.getPoint(o>0?1:0);this.timingTarget&&s&&(this.timingTarget.ppt_x=s.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=s.y+this.timingTarget.design_ppt_y)},this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.createPath()}get modifyAttrKey(){return"motion"}createPath(){var t;const e=new xu,i=(t=this.json.path)===null||t===void 0?void 0:t.match(/[MLCmlc][^MLCmlc]+/g);if(i)for(const n of i){const[o,...s]=n.trim().replace(/\s+/g," ").split(" ");if(o==="M"){const[a,l]=s.map(u=>Number(u));e.moveTo(a,l)}else if(o==="L"){const[a,l]=s.map(u=>Number(u));e.lineTo(a,l)}else if(o==="C"){const[a,l,u,h,d,p]=s.map(m=>Number(m));e.bezierCurveTo(a,l,u,h,d,p)}else if(o==="Z")e.closePath();else if(o==="E")console.warn("not implements");else if(o==="c"){const[a,l,u,h,d,p]=s.map(g=>Number(g)),m=e.currentPoint;e.bezierCurveTo(a+m.x,l+m.y,u+m.x,h+m.y,d+m.x,p+m.y)}else if(o==="l"){const a=e.currentPoint,[l,u]=s.map(h=>Number(h));e.lineTo(l+a.x,u+a.y)}else if(o==="m"){const a=e.currentPoint,[l,u]=s.map(h=>Number(h));e.moveTo(l+a.x,u+a.y)}}this.path=e}}class AL extends Al{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.onTimelineStart=e=>{e.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:e,delta:i})=>{var n,o,s,a,l;const u=i/e,h={x:1,y:1};if(this.to){const d=(n=this.from)!==null&&n!==void 0?n:{x:(s=(o=this.startVal)===null||o===void 0?void 0:o.x)!==null&&s!==void 0?s:1,y:(l=(a=this.startVal)===null||a===void 0?void 0:a.y)!==null&&l!==void 0?l:1};h.x=d.x+(this.to.x-d.x)*u,h.y=d.y+(this.to.y-d.y)*u}else if(this.by){const d={x:this.by.x,y:this.by.y};h.x=1+(d.x-1)*u,h.y=1+(d.y-1)*u}this.timingTarget&&(this.timingTarget.scale=h)},this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})},this.onSeekToStart=()=>{this.timingTarget&&this.startVal&&(this.timingTarget.scale=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=t.json.from,this.to=t.json.to,this.by=t.json.by,this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart)}get modifyAttrKey(){return"scale"}updateCurrentValue(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}}class RL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isTimelineStart=!1,this.startColorString=null,this.currentColorString="#FFFFFFFF",this.onTimelineStart=e=>{if(this.isTimelineStart)return;this.isTimelineStart=!0,e.isReverse||this.updateCurrentValue(),this.from.isInit()||this.from.fromHexString(this.currentColorString),this.to.isInit()||this.from.by(this.by,this.to);const[i]=this.json.cBhvr.attrList[0].split(".");Gs(this.timingTarget,i+".on","true")},this.onTimeNodeEnd=()=>{if(this.json.cBhvr.ctn.fill==="remove"){const[e]=this.json.cBhvr.attrList[0].split(".");Gs(this.timingTarget,e+".on","false")}this.isTimelineStart=!1},this.onSeekToStart=()=>{var e;if(this.timingTarget&&(this.onTimeUpdate({duration:1,delta:0}),((e=this.timingTarget.fill)===null||e===void 0?void 0:e.designColor.toUpperCase())===this.from.toHexString().toUpperCase())){const[i]=this.json.cBhvr.attrList[0].split(".");Gs(this.timingTarget,i+".on","false")}},this.onTimeNodeStart=()=>{if(this.timingTarget){const e=Sg(this.timingTarget,this.json.cBhvr.attrList[0]);e&&(this.startColorString=e)}},this.onTimeUpdate=({delta:e,duration:i})=>{const n=e/i;this.to.interpolationFrom(this.from,n,this.target),this.timingTarget&&Gs(this.timingTarget,this.json.cBhvr.attrList[0],this.target.toHexString())},this.onSeekToEnd=()=>{this.isTimelineStart||this.onTimelineStart({isReverse:!1,activeCount:0,id:""}),this.onTimeUpdate({duration:1,delta:1})},this.json.clrSpc==="rgb"?(this.from=new yg(this.json.from),this.to=new yg(this.json.to),this.by=new yg(this.json.by),this.target=new yg):(this.from=new _g(this.json.from),this.to=new _g(this.json.to),this.by=new _g(this.json.by),this.target=new _g),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeEnd",this.onTimeNodeEnd),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}updateCurrentValue(){if(this.timingTarget){const t=Sg(this.timingTarget,this.json.cBhvr.attrList[0]);t&&(this.currentColorString=t)}}}class CL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.lastVal=null,this.onTimelineStart=e=>{this.lastVal=null,e.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:e,delta:i})=>{const n=i/e;let o=0,s=0;if(this.from!==void 0&&this.to!==void 0){o=this.from,s=this.to;const a=o+(s-o)*n;this.timingTarget&&(this.timingTarget.r=a)}else if(this.by!==void 0){this.lastVal||(this.lastVal=0);const a=this.by*n-this.lastVal;this.lastVal=this.by*n,this.timingTarget&&(this.timingTarget.r+=a)}},this.onTimeNodeStart=()=>{var e;Object(W.isNumber)((e=this.timingTarget)===null||e===void 0?void 0:e.r)&&(this.startVal=this.timingTarget.r)},this.onSeekToStart=()=>{this.timingTarget&&this.startVal!==null&&(this.timingTarget.r=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=this.json.from,this.to=this.json.to,this.by=this.json.by,this.by?this.isConflict=!1:this.isConflict=!0,this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return"rotate"}updateCurrentValue(){var t;this.currentVal=(t=this.timingTarget)===null||t===void 0?void 0:t.r}}class PL extends Al{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isApplied=!1,this.onTimeUpdate=()=>{var e,i;const{cmd:n,cmdType:o}=this.json;!this.isApplied&&n&&o&&(this.isApplied=!0,(i=(e=this.timingTarget)===null||e===void 0?void 0:e.cmd)===null||i===void 0||i.applyCommand(n,o))},this.onSeekToStart=()=>{var e,i;(i=(e=this.timingTarget)===null||e===void 0?void 0:e.cmd)===null||i===void 0||i.applyCommand("custom-pause","call")},this.onSeekToEnd=()=>{},this.commonTimeNode.on("timeNodeStart",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeNodeEnd",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("seekToStart",this.onSeekToStart),this.commonTimeNode.on("seekToEnd",this.onSeekToEnd)}get modifyAttrKey(){var t,e,i,n;return((e=(t=this.json)===null||t===void 0?void 0:t.cmd)!==null&&e!==void 0?e:"")+((n=(i=this.json)===null||i===void 0?void 0:i.cmdType)!==null&&n!==void 0?n:"")}}class IL{constructor(t){this.runtimeNodeEventHub=new P.a,this.onVolumeUpdate=m=>{this.audio.volume(m)},this.stopAudio=()=>{this.audio.stop()},this.destroy=()=>{this.stopAudio(),this.audio.destroy(),this.ctx.activeMedia.delete(this.audio),this.ctx.volumeAdjuster.off("update",this.onVolumeUpdate)};const{json:e,isIterate:i,isSub:n,eventHub:o,ctx:s,parent:a,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.json=e,this.id=e.cMediaNode.ctn.id,this.commonTimeNode=new Ic({json:e.cMediaNode.ctn,isSub:n,eventHubs:{global:o,runtime:this.runtimeNodeEventHub},ctx:s,parent:a,isIterate:i,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d});let p=e.cMediaNode.tgtEl;s.loaderDelegate&&(p=s.loaderDelegate.redirectMedia(p),s.logger.info(`redirect media url from ${e.cMediaNode.tgtEl} to ${p} by delegate.`,s.taskId)),this.audio=new U_(p,s.runningAudio),s.activeMedia.add(this.audio),this.commonTimeNode.on("timelineStart",()=>{this.audio.volume(s.volumeAdjuster.volume),this.audio.play()}),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy),this.ctx=s,this.ctx.volumeAdjuster.on("update",this.onVolumeUpdate)}}var LL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class Ic extends P.a{constructor(t){var e,i;super(),this.uuid=Date.now().toString(32)+Math.random().toString(32).substring(2),this.isSub=!1,this.isShadow=!1,this.startCount=0,this.applyCount=0,this.isReverse=!1,this.isConflictDispose=!1,this.isIterateEnd=!1,this.parentTimeNode=null,this.isActive=!1,this.isDestroy=!1,this.shouldSeekOnStart=!1,this.repeatTimeoutId="",this.iterateShadows=[],this.isEndEventsEmitted=!1,this.tmFilter=[],this.timeDelta=0,this.isIterate=!1,this.iterateType="el",this.iterateIndex=0,this.children=[],this.subList=[],this.duration=0,this.isNegativeSpeed=!1,this.handleEndCond=()=>{this.isActive&&(this.isActive=!1,this.isInfiniteRepeat()?this.repeatTimeNodeEnd():this.seekToEnd(!1,!0))},this.handleActive=(y=!0)=>{if(this.isActive=!0,this.isConflictDispose=!1,this.applyCount+=1,this.json.iterate||this.emit("timeNodeStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startCount>0&&this.json.restart){if(this.json.restart==="never")return;this.json.restart!=="whenNotActive"&&this.json.restart!=="always"||(this.seekToStart(),this.emit("timeNodeRestart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startTimeLine(y))}else this.startTimeLine(y)},this.updateTimeLine=y=>{const w=y/(We.TARGET_FPMS||.06);this.timeDelta+=w,this.duration-this.timeDelta<=w&&(this.timeDelta=this.duration),this.timeDelta<this.duration?this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?this.duration-this.timeDelta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}):(this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?0:this.duration,duration:this.duration,isReverse:this.isReverse}),this.onTimeLineEnd())},this.handleEnd=(y=!1)=>{(this.isTimeNodeEnd()||y)&&(this.isActive=!1,this.isSub&&this.destroy(),this.emitEndEvents())};const{isSub:n,isIterate:o,ctx:s,eventHubs:a,parent:l,json:u,iterateType:h,iterateId:d,iterateIndex:p,isInInteractiveSeq:m}=t;this.isSub=n,this.isInInteractiveSeq=m,this.isIterate=o,this.parentTimeNode=l,this.json=u,this.ctx=s,this.iterateIndex=p,this.eventHubs=a,this.iterateType=h,this.iterateId=d,this.tmFilter=(i=(e=u.tmFilter)===null||e===void 0?void 0:e.split(";").map(y=>y.split(",").map(w=>parseFloat(w.trim()))))!==null&&i!==void 0?i:[];const g=Number(this.json.dur),_=this.json.spd||1;this.isNegativeSpeed=_<0,Number.isNaN(g)||(this.duration=g/Math.abs(_)),this.uuid+="--"+this.json.id,this.setPreStyle(),u.childTnLst&&this.createChildren(u.childTnLst),this.startConds=new Lp(this.json.id||"",u.stCondLst,a,this.ctx),this.endConds=new Lp(this.json.id||"",u.endCondLst,a,this.ctx),u.endSync&&(this.endSync=new Lp(this.json.id||"",[u.endSync],a,this.ctx),this.endSync.on("active",()=>{var y;this.json.nodeType==="interactiveSeq"&&(this.isActive=!1,this.shouldSeekOnStart=!0,this.emit("timeNodeEndSync"),(y=this.endSync)===null||y===void 0||y.reset())})),this.startConds.on("active",y=>{this.isActive||(this.shouldSeekOnStart&&(this.shouldSeekOnStart=!1,this.seekToStart()),this.handleActive(y))}),this.endConds.on("active",()=>{this.handleEndCond(),this.children.forEach(y=>y.commonTimeNode.handleEndCond())}),this.parentTimeNode&&this.parentTimeNode.on("timeNodeStart",()=>{this.applyCount=0}),this.isSub&&this.json.masterRel==="nextClick"&&this.startConds.addCond({event:"shape slide onNext"}),this.json.iterate&&this.isIterate===!1&&this.createIterateShadow()}createIterateShadow(){const t=Tp();let e=!0,i=0;const n=o=>{o===t&&(e=!1,this.ctx.eventHub.removeListener("IterateTimeNodeEnd",n))};for(this.ctx.eventHub.on("IterateTimeNodeEnd",n);e;){const o=JSON.parse(JSON.stringify(this.json)),s=new Ic({json:o,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:o.iterate.type,iterateIndex:i,iterateId:t,isInInteractiveSeq:this.isInInteractiveSeq});this.iterateShadows[i]=s,i+=1}}isInfiniteRepeat(){return this.json.repeatCount>999999998}getReverse(){return this.isReverse}setReverse(t){this.isReverse=t}createTimeNode(t,e){let i=null;const n={json:t,isSub:e,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq};return t.type==="seq"?i=new fL(n):t.type==="par"?i=new tT(n):t.type==="set"?i=new mL(n):t.type==="anim"?i=new gL(n):t.type==="animEffect"?i=new EL(n):t.type==="animMotion"?i=new ML(n):t.type==="animScale"?i=new AL(n):t.type==="animClr"?i=new RL(n):t.type==="animRot"?i=new CL(n):t.type==="cmd"?i=new PL(n):t.type==="audio"&&(i=new IL(n)),i}createSubList(t){this.subList&&this.subList.forEach(e=>e.commonTimeNode.destroy()),this.subList=[],t.forEach(e=>{const i=this.createTimeNode(e,!0);i&&this.subList.push(i)})}bindCommonTimeNodeEvent(t){t.commonTimeNode.on("timeNodeStart",e=>{this.emit("childTimeNodeStart",e)}),t.commonTimeNode.on("timeNodeEnd",e=>{this.emit("childTimeNodeEnd",e),this.children.every(i=>i.commonTimeNode.isTimeNodeEndWhenDetectEndSync())&&(this.json.iterate||this.allChildrenEndHandle())})}createChildren(t){function e(i){return(n=i,function(o){var s;return!!(!((s=o)===null||s===void 0)&&s.cBhvr)}(n)?n.cBhvr.ctn:function(o){var s,a;return!!(!((a=(s=o)===null||s===void 0?void 0:s.cMediaNode)===null||a===void 0)&&a.ctn)}(n)?n.cMediaNode.ctn:n.ctn).presetOrder;var n}t&&t[0]&&e(t[0])?[...t].sort((i,n)=>{var o,s;return((o=e(i))!==null&&o!==void 0?o:0)-((s=e(n))!==null&&s!==void 0?s:0)}).forEach(i=>{const n=t.findIndex(s=>s===i),o=this.createTimeNode(i,!1);o&&(this.bindCommonTimeNodeEvent(o),this.children[n]=o)}):t.forEach(i=>{const n=this.createTimeNode(i,!1);n&&(this.bindCommonTimeNodeEvent(n),this.children.push(n))})}playReverse(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach(t=>t.commonTimeNode.playReverse())}allChildrenEndHandle(){if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout(()=>{this.seekToStart(!1),this.resetForRepeat(),this.startTimeNodeRepeat()}):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}resetForRepeat(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach(t=>t.commonTimeNode.resetForRepeat())}startSubList(){this.subList.forEach(t=>t.commonTimeNode.startTimeNode())}startReverseTimeLine(){this.isEndEventsEmitted=!1,this.timeDelta=0;const t=1e3/this.ctx.ticker.maxFPS;this.duration<=t&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(Ne.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>t&&(this.ctx.eventHub.emit(Ne.animateStart),this.ctx.ticker.add(this.updateTimeLine))}startTimeLine(t=!0){if(t&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit(`time ${this.json.id} begin`),this.eventHubs.global.emit(`time ${this.json.id} onBegin`),this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)),this.json.iterate)return void this.startIterate();this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});const e=1e3/this.ctx.ticker.maxFPS;this.duration<=e&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce(()=>{this.onTimeLineEnd()})):this.duration>e&&(this.ctx.eventHub.emit(Ne.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}startIterate(){return LL(this,void 0,void 0,function*(){if(this.json.iterate){this.isIterateEnd=!1;for(const t of this.iterateShadows){if(this.isIterateEnd)break;t.children.forEach(e=>{e.commonTimeNode.startTimeNode()}),t.applyCount+=1,yield this.ctx.clock.delay(this.json.iterate.interval)}this.onTimeLineEnd()}})}applyTimeFilter(t){if(!this.tmFilter.every(e=>Object(W.isNumber)(e[0])&&Object(W.isNumber)(e[1])))return t;for(let e=0;e<this.tmFilter.length;e++){const i=this.tmFilter[e];if(t<i[0]){const n=this.tmFilter[e-1];return(t-n[0])/(i[0]-n[0])*(i[1]-n[1])+n[1]}}return this.tmFilter.length>0?this.tmFilter[this.tmFilter.length-1][1]:t}isNatureTimeEnd(){return this.duration>=0&&this.timeDelta>=this.duration}findTargets(){const t=[],e=i=>{i.forEach(n=>{var o,s,a;n.cBhvr&&n.cBhvr.target&&t.findIndex(l=>l.id===n.cBhvr.target.id)<0&&t.push(n.cBhvr.target),((s=(o=n==null?void 0:n.cBhvr)===null||o===void 0?void 0:o.ctn)===null||s===void 0?void 0:s.childTnLst)&&n.cBhvr.ctn.childTnLst.length>0&&e(n.cBhvr.ctn.childTnLst),((a=n==null?void 0:n.ctn)===null||a===void 0?void 0:a.childTnLst)&&n.ctn.childTnLst.length>0&&e(n.ctn.childTnLst)})};return e(this.json.childTnLst||[]),t}setPreStyle(){this.json.presetClass&&this.findTargets().forEach(t=>{if(this.json.iterate){let e=0,i=!0;for(;i;){const n=this.ctx.timingTargets.getTarget(t,!0,{type:this.json.iterate.type,index:e,id:""});n&&(this.setPreStyleForTarget(n),e+=1),i=!!n}}else{const e=this.ctx.timingTargets.getTarget(t,!1);e&&this.setPreStyleForTarget(e)}})}setPreStyleForTarget(t){var e,i;if(t&&this.json.presetSubtype&&(t.presetSubType=this.json.presetSubtype),t&&!t.hasPreset)if(this.json.presetClass==="entr"){const n=(i=(e=this.json)===null||e===void 0?void 0:e.childTnLst)===null||i===void 0?void 0:i.filter(o=>o.type==="set"&&o.to==="visible");n!=null&&n.length&&(t.hasPreset=!0,t.style.visibility="hidden")}else(this.json.presetClass==="exit"||this.json.presetClass==="path")&&(t.hasPreset=!0,t.style.visibility="visible")}startTimeNodeRepeat(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}startTimeNodeForce(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}startTimeNode(t=!0){if(this.isDestroy)return;this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(t);const e=this.json.stCondLst.filter(n=>/^self/.test(n.event||""))[0];e&&this.startConds.condHandle(e);const i=this.json.endCondLst.filter(n=>/^self/.test(n.event||""))[0];i&&this.endConds.condHandle(i),this.startConds.condHandle()}onTimeLineEnd(){this.dispose(),(this.children.length===0||this.json.iterate)&&this.allChildrenEndHandle()}clearSubList(){this.subList.forEach(t=>t.commonTimeNode.destroy())}seekToStart(t=!0){if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(e=>e.seekToStart(t));if(t)for(let e=this.subList.length-1;e>=0;e--){const i=this.subList[e];i==null||i.commonTimeNode.seekToStart()}for(let e=this.children.length-1;e>=0;e--){const i=this.children[e];i==null||i.commonTimeNode.seekToStart()}for(let e=this.children.length-1;e>=0;e--){const i=this.children[e];i==null||i.commonTimeNode.seekToStart()}}repeatTimeNodeEnd(){this.dispose(),this.children.forEach(t=>{t.commonTimeNode.isActive=!1,t.commonTimeNode.dispose()})}dispose(t=!1){this.isConflictDispose=t,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(Ne.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch{}this.startConds.reset(),this.endConds.reset()}seekToEnd(t,e=!1){if(this.isInfiniteRepeat())return;!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();const i=this.json.autoRev||t;if(i?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(n=>n.seekToEnd(i,e));this.children.length===0&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach(n=>n.commonTimeNode.seekToEnd(i,e)),e&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach(n=>n.commonTimeNode.seekToEnd(!1)),this.clearSubList())}isTimeNodeEndWhenDetectEndSync(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;let t=!0;return this.children.length>0&&(t=t&&this.children.every(e=>e.commonTimeNode.isTimeNodeEndWhenDetectEndSync())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||t}isTimeNodeEnd(){let t=!0;return this.children.length>0&&(t=t&&this.children.every(e=>e.commonTimeNode.isTimeNodeEnd())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||t}emitEndEvents(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit(`time ${this.json.id} end`),this.eventHubs.global.emit(`time ${this.json.id} onEnd`),this.eventHubs.runtime.emit(`runtime ${this.json.id} end`),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}collectStartValue(){this.emit("timeNodeCreate"),this.children.forEach(t=>t.commonTimeNode.collectStartValue())}destroy(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach(t=>t.commonTimeNode.destroy()),this.clearSubList()}}class tT extends P.a{constructor(t){super(),this.isRunning=!1,this.runtimeNodeEventHub=new P.a;const{json:e,iterateType:i,isIterate:n,isSub:o,parent:s,ctx:a,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}=t;this.id=e.ctn.id,this.json=e,this.ctx=a,this.isIterate=n,this.globalEventHub=l,this.commonTimeNode=new Ic({json:e.ctn,isSub:o,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:a,parent:s,isIterate:!1,iterateType:i,iterateIndex:u,iterateId:h,isInInteractiveSeq:d}),this.commonTimeNode.on("timeNodeStart",()=>{this.commonTimeNode.children.forEach(p=>{p.commonTimeNode.setReverse(this.commonTimeNode.getReverse()),p.commonTimeNode.startTimeNode()}),this.isRunning||(this.isRunning=!0,this.globalEventHub.emit(`runtime ${this.id} begin`),this.emit("begin"))}),this.commonTimeNode.on("timeNodeRepeat",()=>{this.commonTimeNode.children.forEach(p=>{p.commonTimeNode.startTimeNode(!1)})}),this.commonTimeNode.on("timeNodeEnd",()=>{this.commonTimeNode.isTimeNodeEnd()&&this.isRunning&&(this.isRunning=!1,this.globalEventHub.emit(`runtime ${this.id} end`),this.emit("end"))})}}var OL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class NL{constructor(t,e,i){this.json=t,this.ctx=i,this.globalEventHub=e;const n=t.timeNodeList.find(o=>o.type==="par"&&o.ctn.nodeType==="tmRoot");n&&(this.tmRoot=new tT({json:n,isSub:!1,isIterate:!1,eventHub:e,ctx:i,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1}),this.mainSeq=this.tmRoot.commonTimeNode.children.find(o=>{var s,a,l;return((s=o.json)===null||s===void 0?void 0:s.type)==="seq"&&((l=(a=o.json)===null||a===void 0?void 0:a.ctn)===null||l===void 0?void 0:l.nodeType)==="mainSeq"}))}findSeq(t){var e;return(e=this.tmRoot)===null||e===void 0?void 0:e.commonTimeNode.children.find(i=>{var n,o,s;return((n=i.json)===null||n===void 0?void 0:n.type)==="seq"&&((s=(o=i.json)===null||o===void 0?void 0:o.ctn)===null||s===void 0?void 0:s.id)===t})}start(){var t,e;return OL(this,void 0,void 0,function*(){this.json.autoPlayMainSeq?(yield this.ctx.clock.delay(16),(t=this.mainSeq)===null||t===void 0||t.commonTimeNode.startTimeNode()):(e=this.mainSeq)===null||e===void 0||e.commonTimeNode.startTimeNode()})}setMainSeqApplied(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}collectMainSeqStartValue(){var t;(t=this.mainSeq)===null||t===void 0||t.commonTimeNode.collectStartValue()}setMainSeqStep(t,e){var i;t===-1&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),(i=this.mainSeq)===null||i===void 0||i.setCurrentStep(t,e)}destroy(){var t;this.globalEventHub.removeAllListeners(),(t=this.tmRoot)===null||t===void 0||t.commonTimeNode.destroy()}hasMainSeq(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}currentMainSeqState(){return this.mainSeq?this.mainSeq.currentState:null}currentMainSeqStep(){return this.mainSeq?this.mainSeq.currentStep:0}currentMainSeqLength(){return this.mainSeq?this.mainSeq.stepLength:0}mainSeqHasNextStep(){return!!this.mainSeq&&this.mainSeq.hasNext()}mainSeqHasPrevStep(){return!!this.mainSeq&&this.mainSeq.hasPrev()}seekInteractiveSeqToEnd(t){const e=this.findSeq(t);e&&e.commonTimeNode.seekToEnd(!1,!0)}setInteractiveSeqState(t,e,i){const n=this.findSeq(t);n&&n.setCurrentStep(e,i)}resetAllInteractiveSeq(){var t;(((t=this.tmRoot)===null||t===void 0?void 0:t.commonTimeNode.children.filter(e=>{var i,n,o;return((i=e.json)===null||i===void 0?void 0:i.type)==="seq"&&((o=(n=e.json)===null||n===void 0?void 0:n.ctn)===null||o===void 0?void 0:o.nodeType)==="interactiveSeq"}))||[]).forEach(e=>{e.setCurrentStep(0,"start")})}applyInteractiveAction(t){this.globalEventHub.emit(t)}}var eT=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class DL extends G_{constructor(t,e,i,n){super({id:"stage",width:t.width,height:t.height,type:"Container",children:t.children},e,i,void 0,n),this.isRendered=!1,this.isTimingStartValueCollected=!1,this.json=t,e.hasBackgroundFillShape=this.detectUseBackgroundFill(this.json),this.container.visible=!1,this.ctx=e;const o=new ks;o.beginFill(16777215),o.drawRect(0,0,t.width,t.height),o.endFill(),this.container.addChild(o)}detectUseBackgroundFill(t){return!!t&&(t.type==="Picture"||t.type==="Shape"?t.useBgFill:!(!t.children||!Object(W.isArray)(t.children))&&t.children.some(e=>this.detectUseBackgroundFill(e)))}initOnReuse(){super.initOnReuse(),this.ctx.timingEventHub.on("c:prev slide",t=>{this.ctx.eventHub.emit(Ne.requestPrevSlide,t)}),this.ctx.timingEventHub.on("c:next slide",t=>{this.ctx.eventHub.emit(Ne.requestNextSlide,t)})}get interactiveContainer(){return this.container}render(t){this.isRendered||(this.collectAnimatedIds().forEach(e=>this.ctx.animatedIds.add(e)),this.isRendered=!0,super.render(t),t.addSubMTask(()=>eT(this,void 0,void 0,function*(){this.ctx.eventHub.emit("StageRenderEnd")}),"@StageImpl[emit.StageRenderEnd]"))}isListTimeNode(t){return["excel","seq","par"].indexOf(t.type)>=0}isAnimatedTimeNode(t){return!!t.cBhvr}collectAnimatedIdsForTimeNode(t,e){var i;this.isListTimeNode(t)?(i=t.ctn.childTnLst)===null||i===void 0||i.forEach(n=>{this.collectAnimatedIdsForTimeNode(n,e)}):this.isAnimatedTimeNode(t)&&e.push(t.cBhvr.target.id)}collectAnimatedIds(){const t=[];return this.json.timing&&this.json.timing.timeNodeList.forEach(e=>{this.collectAnimatedIdsForTimeNode(e,t)}),t}createTiming(){this.json.timing&&!this.timing&&(this.timing=new NL(this.json.timing,this.ctx.timingEventHub,this.ctx))}startTiming(){var t;return((t=this.timing)===null||t===void 0?void 0:t.start())||Promise.resolve()}setMainSeqApplied(){var t;(t=this.timing)===null||t===void 0||t.setMainSeqApplied()}setMainSeqStep(t,e){var i;(i=this.timing)===null||i===void 0||i.setMainSeqStep(t,e)}collectMainSeqStartValue(){var t;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,(t=this.timing)===null||t===void 0||t.collectMainSeqStartValue())}hasTiming(){return!!this.timing}clearOnSlideChange(){this.ctx.eventHub.removeAllListeners(),this.ctx.timingEventHub.removeAllListeners(),super.clearOnSlideChange()}clearOnTransactionEnd(){var t,e;this.ctx.timingTargets.getTargets().forEach(i=>{i.hasPreset=!1}),(t=this.timing)===null||t===void 0||t.resetAllInteractiveSeq(),(e=this.timing)===null||e===void 0||e.destroy(),this.timing=void 0}destroy(){var t,e;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),(t=this.ctx.bgTexture)===null||t===void 0||t.destroy(!0),this.ctx.spriteTexture.destroy(),this.ctx.timingEventHub.removeAllListeners(),(e=this.timing)===null||e===void 0||e.destroy(),this.timing=void 0,super.destroy()}mainSeqStep(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.currentMainSeqStep())!==null&&e!==void 0?e:0}mainSeqLength(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.currentMainSeqLength())!==null&&e!==void 0?e:0}mainSeqHasNextStep(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.mainSeqHasNextStep())!==null&&e!==void 0&&e}mainSeqHasPrevStep(){var t,e;return(e=(t=this.timing)===null||t===void 0?void 0:t.mainSeqHasPrevStep())!==null&&e!==void 0&&e}mainSeqState(){return this.timing?this.timing.currentMainSeqState():null}nextStep(t=!1){var e;this.hasTiming()&&((e=this.timing)===null||e===void 0?void 0:e.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onNext",t)):this.ctx.eventHub.emit(Ne.requestNextSlide,t)}prevStep(t=!1){var e;this.hasTiming()&&((e=this.timing)===null||e===void 0?void 0:e.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onPrev",t)):this.ctx.eventHub.emit(Ne.requestPrevSlide,t)}applyInteractiveAction(t){var e;(e=this.timing)===null||e===void 0||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;(e=this.timing)===null||e===void 0||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,i){var n;(n=this.timing)===null||n===void 0||n.setInteractiveSeqState(t,e,i)}setMediaState(t,e){return eT(this,void 0,void 0,function*(){const i=this.ctx.medias[t];i&&(e?yield i.play():yield i.pause())})}setMediaCurrentTime(t,e){const i=this.ctx.medias[t];i&&i.seek(e)}}class FL{constructor(t){this.ticker=t,this.tasks=[],this.couldRunning=!1,this.applyNext=()=>{const e=this.tasks[0];e&&e.applyNext()},t.add(this.applyNext)}addTask(t){this.tasks.push(t),t.once("task-finish",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)}),t.once("task-error",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)})}start(){this.couldRunning=!0}stop(){this.couldRunning=!1}}var BL=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};const kL=r=>new Promise(t=>setTimeout(t,r));class UL extends P.a{constructor(t,e,i){super(),this.slideIndex=t,this.taskId=e,this.logger=i,this.uuid=Tp(),this.isCancel=!1,this.tasks=[]}addMTask(t,e){this.tasks.push({fn:t,state:"wait",sub:[],name:e})}addSubMTask(t,e){let i=this.tasks.findIndex(n=>n.state==="running");i<0&&(i=0),this.tasks[i].sub.push({fn:t,state:"wait",sub:[],name:e})}cancel(){this.tasks=[],this.isCancel=!0}applyNext(){if(this.tasks.some(e=>e.state==="running")||this.tasks.some(e=>e.state==="error"))return;if(this.tasks.every(e=>e.state==="finish"))return void(this.isCancel||this.emit("task-finish"));const t=this.tasks.find(e=>e.state==="wait");t&&(t.state="running",t.fn.apply(null).then(()=>{if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(i=>i===t);this.tasks.splice(e+1,0,...t.sub)}}).catch(e=>{t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",Tn.transform(e),this.slideIndex)}))}applyAll(){return BL(this,void 0,void 0,function*(){for(;!this.tasks.every(t=>t.state==="finish");)if(this.tasks.some(t=>t.state==="running"))yield kL(16);else{if(this.tasks.some(t=>t.state==="error"))return;{const t=this.tasks.find(e=>e.state==="wait");if(t){t.state="running";try{if((yield Ac(()=>t.fn.apply(null),6e4))===La)throw new Tn(cr.RuntimeError,`subtask ${t.name} apply timeout`);if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(i=>i===t);this.tasks.splice(e+1,0,...t.sub)}}catch(e){let i;i=e!=null&&e.errorType?e:new Tn(cr.RuntimeError,`subtask ${t.name} error. ${e}`),t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",Tn.transform(i),this.slideIndex);break}}}}!this.isCancel&&this.tasks.every(t=>t.state==="finish")&&this.emit("task-finish")})}}var GL=v(53);const H_=new(v.n(GL)).a,HL=H_.getDevice(),zL=H_.getBrowser(),Mg=H_.getOS(),Ag={isDesktop(){let r=!0;return HL.type==="mobile"&&(r=!1),/Samsung/.test(zL.name||"")&&(r=!1),window.__nativeTags&&window.__nativeTags.platform&&(r=!1),r},isIOS(){let r=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(r=!0),Mg.name&&/iOS/.test(Mg.name)&&(r=!0),r},isAndroid(){let r=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(r=!0),Mg.name&&/android/i.test(Mg.name)&&(r=!0),r},isLowGpuMemory(){var r,t;const e=(t=(r=window.__nativeTags)===null||r===void 0?void 0:r.platform)!==null&&t!==void 0?t:"";if(e){const i=e.split(" ");if(i[1]){if(/^iPad/.test(i[1])){const n=i[1].match(/^iPad(\d+)/);return!(n&&n[1]&&parseInt(n[1],10)>=6)}if(/^iPhone/.test(i[1])){const n=i[1].match(/^iPhone(\d+)/);return!(n&&n[1]&&parseInt(n[1],10)>=9)}return!1}return!1}return!0}};var Lc=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class jL{constructor(t,e,i,n,o,s,a,l,u,h,d,p,m,g){this.loader=t,this.mode=e,this.renderer=i,this.ticker=n,this.view=o,this.clock=s,this.objPoolGroup=a,this.errorChannel=l,this.localstorage=u,this.logger=h,this.loaderDelegate=d,this.isPlayerPaused=p,this.maxResolution=m,this.volumeAdjuster=g,this.currentStageIndex=0,this.cacheCount=Ag.isDesktop()?2:1,this.stageStates=Object.create(null),this.stageJsons=Object.create(null),this.stageCtxs=Object.create(null),this.stageImpls=Object.create(null),this.taskId="",this.url="",this.runningAudio=new Map,this.activeMedia=new Set,this.microTaskManager=new FL(n)}setResourceData(t,e){this.taskId=t,this.url=e}createCtx(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=new TI(this.loader),n=new P.a,o={taskId:this.taskId,mode:this.mode,renderer:this.renderer,graphicsTexture:new RI,stageWidth:0,stageHeight:0,ticker:this.ticker,timingTargets:new PI(n),eventHub:n,view:this.view,medias:Object.create(null),lastViewedIndex:0,conflictTimeNodeManager:new CI,clock:this.clock,spriteTexture:i,slideIndex:t,objectPoolGroup:this.objPoolGroup,hasBackgroundFillShape:!1,slideScopeEventHub:new P.a,logger:this.logger,loaderDelegate:this.loaderDelegate,runningAudio:this.runningAudio,activeMedia:this.activeMedia,isPlayerPaused:this.isPlayerPaused,timingEventHub:new P.a,maxResolution:this.maxResolution,animatedIds:new Set,volumeAdjuster:this.volumeAdjuster};this.stageCtxs[t]=o}),"@StagePool[createCtx]")}loadStageJson(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t}.json`);this.stageJsons[t]=i,this.stageCtxs[t].stageWidth=i.width,this.stageCtxs[t].stageHeight=i.height}),"@StagePool[loadStageJson]")}loadSpriteSheets(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const i=this.stageJsons[t],{spriteTexture:n,stageWidth:o,stageHeight:s}=this.stageCtxs[t],{coloredSheets:a,sheets:l}=i,u=a||l;return u&&u.forEach(h=>{e.addSubMTask(()=>{let d=1;if(o>this.maxResolution.x||s>this.maxResolution.y){d=this.maxResolution.x/o;const p=d*s;p>this.maxResolution.y&&(d*=this.maxResolution.y/p)}return n.loadSpriteSheetItem(this.url,this.taskId,h,d)},"@StagePool[spriteTexture.loadSpriteSheetItem]")}),Promise.resolve()},"@StagePool[loadSpriteSheets]")}createStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const i=this.stageJsons[t],n=this.stageCtxs[t],o=new DL(i,n,{x:0,y:0},e);return this.stageImpls[t]=o,Promise.resolve()},"@StagePool[createStage]")}preRenderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>(this.stageImpls[t].preRender(e),Promise.resolve()),"@StagePool[preRenderStage]")}createGraphicsTexture(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=this.stageCtxs[t];i.graphicsTexture.pack().forEach((n,o)=>{e.addSubMTask(()=>i.graphicsTexture.render(n,o,this.objPoolGroup),"@StagePool[graphicsTexture.render]")})}),"@StagePool[createGraphicsTexture]")}renderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>Lc(this,void 0,void 0,function*(){const i=this.stageImpls[t],n=this.stageCtxs[t];yield i.render(e),e.addSubMTask(()=>Lc(this,void 0,void 0,function*(){var o;const s=`snapshot-${t.toString()}-start`;if(!(yield(o=this.localstorage)===null||o===void 0?void 0:o.getItem(s))&&Gn.platform.isLowGpuMemory()){i.createTiming(),i.container.visible=!0,i.collectMainSeqStartValue(),i.setMainSeqStep(0,"start");const a=$r.create({width:i.json.width,height:i.json.height,resolution:1});n.renderer.render(i.container,{renderTexture:a});const l=n.renderer.plugins.extract.base64(a,"image/jpeg");this.localstorage.setItem(s,l,!0).catch(()=>{}),i.container.visible=!1,a.destroy(),i.timing&&(i.timing.destroy(),i.timing=void 0)}}),"@StagePool[snapshot]")}),"@StagePool[renderStage]")}destroyStageByIndex(t){this.stageStates[t].state==="load"&&this.stageStates[t].task.cancel(),delete this.stageStates[t],this.stageImpls[t].destroy(),delete this.stageImpls[t],delete this.stageCtxs[t]}destroyStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);Math.abs(this.currentStageIndex-e)>this.cacheCount&&this.destroyStageByIndex(e)})}destroyAllStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);this.destroyStageByIndex(e)})}preload(t,e=!1){if(this.stageImpls[t]||this.stageStates[t])return Promise.resolve();const i=new UL(t,this.taskId,this.logger);return i.on("task-error",(n,o)=>{delete this.stageStates[o],delete this.stageImpls[o],delete this.stageCtxs[o],this.errorChannel.emit("error",n,o)}),this.stageStates[t]={state:"load",task:i},this.createCtx(t),this.loadStageJson(t),this.loadSpriteSheets(t),this.createStage(t),this.preRenderStage(t),this.createGraphicsTexture(t),this.renderStage(t),this.microTaskManager.addTask(i),e?i.applyAll():new Promise(n=>{i.once("task-finish",()=>{this.stageStates[t].state="finish",Object.keys(this.stageStates).length>2*this.cacheCount+1&&this.destroyStage(),n()})})}getStageJson(t){return this.stageJsons[t]||null}getStage(t){return Lc(this,void 0,void 0,function*(){this.currentStageIndex=t;const e=this.stageStates[t];return(e==null?void 0:e.state)==="finish"&&this.stageImpls[t]?this.stageImpls[t]:(e==null?void 0:e.state)==="load"?(yield e.task.applyAll(),this.stageImpls[t]):(yield this.preload(t,!0),this.stageImpls[t])})}destroy(){this.runningAudio.clear()}}var iT=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};class No{constructor(t){var e;this.logger=t,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,(e=No.localCache)===null||e===void 0||e.ready(()=>{this.isIndexDBReady=!0}).catch(()=>{t.warn("local storage not ready",this.taskId)})}get couldUseIndexDBCache(){return this.isIndexDBReady&&this.taskId.length>0}attachTaskId(t){this.taskId=t}getItem(t){return iT(this,void 0,void 0,function*(){let e=null;return this.couldUseIndexDBCache&&No.localCache&&(e=yield Ac(()=>No.localCache.getItem(`${this.taskId}/${t}`),500)),e=e===La?null:e,e||this.memoryCache.get(t)||null})}setItem(t,e,i=!1){return iT(this,void 0,void 0,function*(){if(!this.couldUseIndexDBCache)return i&&this.memoryCache.set(t,e),Promise.resolve();No.localCache&&(yield Ac(()=>No.localCache.setItem(`${this.taskId}/${t}`,e).catch(()=>{i&&this.memoryCache.set(t,e)}),500))===La&&i&&this.memoryCache.set(t,e)})}dispose(){var t;this.memoryCache=new Map,this.couldUseIndexDBCache&&((t=No.localCache)===null||t===void 0||t.keys().then(e=>{e.filter(i=>i.indexOf(this.taskId)>=0).forEach(i=>{var n;(n=No.localCache)===null||n===void 0||n.removeItem(i).catch(()=>{})})}))}}No.localCache=null;try{No.localCache=ht.createInstance({name:"slide_local_cache",driver:ht.INDEXEDDB,version:1})}catch{}class VL extends P.a{constructor(){super(...arguments),this._volume=.5}get volume(){return this._volume}set volume(t){t<0&&(t=0),t>1&&(t=1),this._volume=t,this.emit("update",this._volume)}}var Oc=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})};q.skipHello();const nT={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip"},Ne={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",userInput:"userInput"};class Gn extends P.a{constructor(t,e={}){super(),this.errorChannel=new P.a,this.transactionPlayer=null,this.transactionSprite=new hr,this.isForward=!0,this.drawCall=0,this.scale=1,this.prevSlideBase64=null,this._isPaused=!1,this.maxResolution=new wn(0,0),this.fps=new vI,this.designWidth=0,this.designHeight=0,this.currentIndex=0,this.slideCount=0,this.runtime={drawCall:0,fps:0},this.isPlayerPaused=()=>this._isPaused,this.onWebGLLost=()=>{this.errorChannel.emit("error",new Tn(cr.CanvasCrash,"webgl context lost."))},this.logger=t.logger,this.mode=t.mode,this.volumeAdjuster=t.volumeAdjuster,this.localStorage=new No(this.logger);let i=Math.max(window.devicePixelRatio,2);Ag.isDesktop()||(i=1),this.config={minFPS:Object(W.isUndefined)(e.minFPS)?30:e.minFPS,maxFPS:Object(W.isUndefined)(e.maxFPS)?40:e.maxFPS,resolution:Object(W.isUndefined)(e.resolution)?i:e.resolution,autoFPS:!Object(W.isUndefined)(e.autoFPS)&&e.autoFPS,autoResolution:!Object(W.isUndefined)(e.autoResolution)&&e.autoResolution,transactionBgColor:Object(W.isUndefined)(e.transactionBgColor)?0:e.transactionBgColor,maxResolutionLevel:this.getMaxResolution(e.maxResolutionLevel)},this.updateMaxResolutionLevel(this.config.maxResolutionLevel),this.loader=new xI(this.localStorage,t.useLocalCache,this.logger,t.resourceTimeout,t.loadDelegate),this.app=new eg({antialias:!0,autoDensity:!1,backgroundColor:16777215}),this.updateConfig(this.config),this.app.view.style.zIndex="1",this.app.stage.sortableChildren=!0;const n=this.app.renderer,{drawElements:o}=n.gl;n.gl.drawElements=(...s)=>{o.call(n.gl,...s),this.drawCall+=1},this.fps.on("update",s=>{if(s<this.config.minFPS){if(this.config.autoResolution){const a=.7*this.scale,l=this.app.renderer.resolution,u=Math.max(a,l-.1);u>=a&&this.updateResolution(u)}if(this.config.autoFPS){const{minFPS:l,maxFPS:u}=this.app.ticker,h=Math.max(14,l-2),d=Math.max(14,u-2);h>=14&&d>=14&&(this.app.ticker.minFPS=h,this.app.ticker.maxFPS=d)}}else if(s>this.config.maxFPS){if(this.config.autoResolution){const a=this.scale*this.config.resolution,l=this.app.renderer.resolution,u=Math.min(a,l+.1);u<=this.config.resolution&&this.updateResolution(u)}if(this.config.autoFPS){const a=this.config.minFPS,l=this.config.maxFPS,{minFPS:u,maxFPS:h}=this.app.ticker,d=Math.min(a,u+2),p=Math.min(l,h+2);d<=a&&p<=l&&(this.app.ticker.minFPS=d,this.app.ticker.maxFPS=p)}}}),this.app.ticker.add(()=>{this.runtime.drawCall=this.drawCall,this.runtime.fps=Math.floor(this.app.ticker.minFPS),this.drawCall=0},null,os.LOW),this.clock=new wI(this.app.ticker),this.objPoolGroup=Tp(),this.stagePool=new jL(this.loader,this.mode,this.app.renderer,this.app.ticker,this.app.view,this.clock,this.objPoolGroup,this.errorChannel,this.localStorage,this.logger,t.loadDelegate,this.isPlayerPaused,this.maxResolution,this.volumeAdjuster),this.app.view.addEventListener("webglcontextlost",this.onWebGLLost);try{this.transactionPlayer=new xR}catch(s){/Error creating WebGL context/.test(s.message)?this.errorChannel.emit("error",new Tn(cr.CanvasCrash,"webgl context lost.")):this.errorChannel.emit("error",new Tn(cr.RuntimeWarn,s.message))}}get view(){return this.app.renderer?this.app.view:null}get nextSlideIndex(){var t;return!((t=this.currentStage)===null||t===void 0)&&t.json.nextIndex?this.currentStage.json.nextIndex:this.currentIndex+1}get prevSlideIndex(){var t;return!((t=this.currentStage)===null||t===void 0)&&t.json.prevIndex?this.currentStage.json.prevIndex:this.currentIndex-1}getMaxResolution(t){return!Object(W.isUndefined)(t)&&Number.isInteger(t)?(t<1&&(t=1),t>4&&(t=4),t):Gn.platform.isAndroid()||Gn.platform.isIOS()?2:4}updateMaxResolutionLevel(t){t<1&&(t=1),t>4&&(t=4);const e=[999999,960,1280,1920,3200][t],i=[999999,540,720,1080,1800][t];this.maxResolution.set(e,i)}updateConfig(t){Object(W.isUndefined)(t.minFPS)||(this.config.minFPS=t.minFPS,this.app.ticker.minFPS=t.minFPS),Object(W.isUndefined)(t.maxFPS)||(this.config.maxFPS=t.maxFPS,this.app.ticker.maxFPS=t.maxFPS),Object(W.isUndefined)(t.resolution)||(this.config.resolution=t.resolution,this.updateResolution(this.scale*this.config.resolution)),Object(W.isUndefined)(t.autoFPS)||(this.config.autoFPS=t.autoFPS),Object(W.isUndefined)(t.autoResolution)||(this.config.autoResolution=t.autoResolution),Object(W.isUndefined)(t.transactionBgColor)||(this.config.transactionBgColor=t.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId),Object(W.isUndefined)(t.maxResolutionLevel)||(this.config.maxResolutionLevel=t.maxResolutionLevel,this.updateMaxResolutionLevel(this.config.maxResolutionLevel))}preload(t){return Oc(this,void 0,void 0,function*(){t<1||t>this.slideCount||(this.logger.info(`preload slide ${t} begin`,this.taskId),yield this.stagePool.preload(t),this.logger.info(`preload slide ${t} end`,this.taskId))})}setResourceData(t,e){this.logger.info("ppt player init config: "+JSON.stringify(this.config),t),this.logger.info("set resource to "+e,t),this.taskId=t,this.url=e,this.stagePool.setResourceData(t,e),this.localStorage.attachTaskId(t),this.loader.attachTaskId(t)}setInteractive(t){this.app.stage.interactive=t,this.app.stage.interactiveChildren=t}translateEvent(t,e){e.forEach(i=>{t.on(i,(...n)=>{this.emit(i,...n)})})}renderSlide(t,e=!1){var i;return Oc(this,void 0,void 0,function*(){if(this._isPaused)return void this.logger.info("ppt play prevent render slide with paused state",this.taskId);this.logger.info("render slide "+t,this.taskId),this.emit(Ne.renderStart,t);const n=yield this.stagePool.getStage(t);if(!n)return;this.translateEvent(n.ctx.eventHub,[Ne.mainSeqStepChange,Ne.mainSeqStateChange,Ne.hyperlinkTrigger,Ne.interactiveSeqAction,Ne.mainSeqStepStart,Ne.mainSeqStepEnd,Ne.animateStart,Ne.animateEnd,Ne.mediaPlay,Ne.mediaPause,Ne.mediaSeek,Ne.requestGotoSlide,Ne.requestNextSlide,Ne.requestPrevSlide,Ne.interactiveSeqStateChange,Ne.userInput]),this.currentIndex=Number(t);const{width:o,height:s,slideCount:a}=n.json;this.slideCount=a,this.designWidth=o,this.designHeight=s,n.json.transition&&n.json.transition.type&&!this.prevSlideBase64&&this.currentStage&&(this.prevSlideBase64=this.getBase64(this.currentStage)),(i=this.currentStage)===null||i===void 0||i.clearOnSlideChange();const l=this.currentStage;this.currentStage=n,n.initOnReuse(),n.createTiming(),n.container.visible=!0,n.collectMainSeqStartValue(),this.isForward?n.setMainSeqStep(0,"start"):n.setMainSeqStep(-1,"end");let u=null;if(n.json.transition&&n.json.transition.type){const d=t.toString()+(this.isForward||e?"-start":"-end");u=(yield this.localStorage.getItem("snapshot-"+d))||this.getBase64(this.currentStage)}n.container.visible=!1,this.app.stage.addChild(n.container);let{transition:h}=n.json;!this.isForward&&(l==null?void 0:l.json.transition)&&(h=l.json.transition),this.prevSlideBase64&&u&&h&&h.type&&l&&n&&(yield this.playTransaction(this.prevSlideBase64,u,h,l,n),this.prevSlideBase64=null),this.isForward?yield n.startTiming():n.setMainSeqApplied(),this.updateResolution(this.config.resolution*this.scale),n.container.visible=!0,l&&(l.setMainSeqStep(0,"start"),l.clearOnTransactionEnd(),this.app.stage.removeChild(l.container)),n.ctx.slideScopeEventHub.emit("slide-render",n.ctx.slideIndex),this.emit(Ne.renderEnd,t),this.emit(Ne.slideChange,t),this.preload(t+1).catch(d=>{this.errorChannel.emit("error",Tn.transform(d),t+1)}),this.preload(t-1).catch(d=>{this.errorChannel.emit("error",Tn.transform(d),t-1)})})}renderToBase64(t,e,i){return Oc(this,void 0,void 0,function*(){const n=yield this.stagePool.getStage(t);if(n){const{width:o,height:s}=n.json;this.designWidth=o,this.designHeight=s;const a=$r.create({width:this.designWidth,height:this.designHeight,resolution:e});n.container.visible=!0,this.app.renderer.render(n.container,{renderTexture:a});const l=this.app.renderer.plugins.extract.base64(a,i);return this.stagePool.destroyStageByIndex(t),l}return"__null__"})}getBase64(t){if(!t.container.transform)return null;const e=$r.create({width:this.designWidth,height:this.designHeight,resolution:1});this.app.renderer.render(t.container,{renderTexture:e});const i=this.app.renderer.plugins.extract.base64(e,"image/jpeg");return e.destroy(!0),i}playTransaction(t,e,i,n,o){return Oc(this,void 0,void 0,function*(){const s=this.app.view.parentElement;if(t&&e&&s&&nT[i.type]&&this.transactionPlayer){this.transactionSprite.zIndex=999,this.transactionSprite.visible=!1,this.app.stage.addChild(this.transactionSprite);const a=this.transactionPlayer.renderer.domElement,l=Qe.from(a),u=()=>l.update();return this.app.ticker.add(u),this.transactionSprite.texture=l,setTimeout(()=>{this.transactionSprite.visible=!0},100),new Promise(h=>{var d,p,m,g;(d=this.transactionPlayer)===null||d===void 0||d.play({reverse:!this.isForward,prevTextureUrl:t,nextTextureUrl:e,textureWidth:this.designWidth,textureHeight:this.designHeight,presetType:nT[i.type],stageWidth:this.designWidth,stageHeight:this.designHeight,duration:(m=(p=this.currentStage)===null||p===void 0?void 0:p.json.transition)===null||m===void 0?void 0:m.dur,delay:0,clearColor:this.config.transactionBgColor,maxFPS:Math.ceil((g=this.config.maxFPS)!==null&&g!==void 0?g:60),onTransactionEnd:()=>{var _,y;h(),n.container.visible=!1,o.container.visible=!0,(_=this.app.stage)===null||_===void 0||_.removeChild(this.transactionSprite),(y=this.app.ticker)===null||y===void 0||y.remove(u)}})})}return Promise.resolve()})}scaleView(t,e,i){if(this.view&&(this.view.style.width=Math.floor(this.designWidth*t)+"px",this.view.style.height=Math.floor(this.designHeight*t)+"px"),e){this.scale=t;const n=this.scale*this.config.resolution;this.updateResolution(n,i)}}updateResolution(t,e){this.app.ticker.addOnce(()=>{let i=Ag.isDesktop()?t:1;for(;i*this.designWidth>this.maxResolution.x||i*this.designHeight>this.maxResolution.y;)i-=.1;this.app.renderer.resolution=i,this.app.renderer.plugins.interaction.resolution=this.app.renderer.resolution,this.app.renderer.resize(this.designWidth,this.designHeight),Object(W.isFunction)(e)&&e()})}nextStep(t=!1){var e;if(this._isPaused)this.logger.info("ppt play prevent next step with paused state",this.taskId);else{this.logger.info("ppt play trigger next step",this.taskId);try{(e=this.currentStage)===null||e===void 0||e.nextStep(t)}catch(i){this.errorChannel.emit("error",Tn.transform(i),this.currentIndex)}}}prevStep(t=!1){var e;if(this._isPaused)this.logger.info("ppt play prevent prev step with paused state",this.taskId);else{this.logger.info("ppt play trigger prev step",this.taskId);try{(e=this.currentStage)===null||e===void 0||e.prevStep(t)}catch(i){this.errorChannel.emit("error",Tn.transform(i),this.currentIndex)}}}mainSeqLength(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqLength())!==null&&e!==void 0?e:0}mainSeqStep(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqStep())!==null&&e!==void 0?e:0}setMainSeqStep(t,e){var i;(i=this.currentStage)===null||i===void 0||i.setMainSeqStep(t,e)}mainSeqState(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqState())!==null&&e!==void 0?e:null}mainSeqHasNextStep(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqHasNextStep())!==null&&e!==void 0&&e}mainSeqHasPrevStep(){var t,e;return(e=(t=this.currentStage)===null||t===void 0?void 0:t.mainSeqHasPrevStep())!==null&&e!==void 0&&e}nextTick(t){this.app.ticker.addOnce(()=>{t()},os.LOW)}applyInteractiveAction(t){var e;(e=this.currentStage)===null||e===void 0||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;(e=this.currentStage)===null||e===void 0||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,i){var n;(n=this.currentStage)===null||n===void 0||n.setInteractiveSeqState(t,e,i)}setMediaState(t,e){var i;return Oc(this,void 0,void 0,function*(){yield(i=this.currentStage)===null||i===void 0?void 0:i.setMediaState(t,e)})}setMediaCurrentTime(t,e){var i;(i=this.currentStage)===null||i===void 0||i.setMediaCurrentTime(t,e)}pause(){var t;this.app.ticker.stop(),(t=this.currentStage)===null||t===void 0||t.ctx.activeMedia.forEach(e=>{e.globalPause()}),this._isPaused=!0}resume(){var t;this._isPaused=!1,this.app.ticker.start(),(t=this.currentStage)===null||t===void 0||t.ctx.activeMedia.forEach(e=>{e.globalResume()})}getSnapshot(){return this.currentStage&&this.getBase64(this.currentStage)||""}createSnapshotForNextSlide(t){return Oc(this,void 0,void 0,function*(){const e=this.nextSlideIndex,i=this.stagePool.getStageJson(e);if(i&&i.transition&&i.transition.type&&this.currentStage&&this.transactionPlayer){const n=t?`snapshot-${this.currentStage.json.index}-start`:`snapshot-${this.currentStage.json.index}-end`;if(this.currentStage.timing&&(t?this.currentStage.timing.mainSeqHasPrevStep():this.currentStage.timing.mainSeqHasNextStep()))this.prevSlideBase64=this.getBase64(this.currentStage);else{const o=yield this.localStorage.getItem(n);o?this.prevSlideBase64=o:(this.prevSlideBase64=this.getBase64(this.currentStage),this.localStorage.setItem(n,this.prevSlideBase64,!0).catch(()=>{}))}}})}clearLocalCache(){this.localStorage.dispose()}static clearLocalCache(){var t;(t=No.localCache)===null||t===void 0||t.clear().catch(()=>{})}destroy(){var t;try{this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost);try{this.app.renderer.filter.texturePool.clear(!0)}catch{}C_.collectObjectByGroup(this.objPoolGroup),P_.collectObjectByGroup(this.objPoolGroup),(t=this.transactionPlayer)===null||t===void 0||t.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy();try{this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext()}catch{}this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0})}catch{}}}Gn.platform=Ag,Gn.RtcAudioClazz=null;var z_=new Map;function WL(r){var t=z_.get(r.hookPoint)||[];t.push(r),z_.set(r.hookPoint,t)}var Op,Hu=[],rT="ResizeObserver loop completed with undelivered notifications.";(function(r){r.BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Op||(Op={}));var j_,zu=function(r){return Object.freeze(r)},XL=function(r,t){this.inlineSize=r,this.blockSize=t,zu(this)},oT=function(){function r(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,zu(this)}return r.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},r.fromRect=function(t){return new r(t.x,t.y,t.width,t.height)},r}(),V_=function(r){return r instanceof SVGElement&&"getBBox"in r},sT=function(r){if(V_(r)){var t=r.getBBox(),e=t.width,i=t.height;return!e&&!i}var n=r,o=n.offsetWidth,s=n.offsetHeight;return!(o||s||r.getClientRects().length)},aT=function(r){var t,e;if(r instanceof Element)return!0;var i=(e=(t=r)===null||t===void 0?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(i&&r instanceof i.Element)},Np=typeof window!="undefined"?window:{},Rg=new WeakMap,lT=/auto|scroll/,qL=/^tb|vertical/,YL=/msie|trident/i.test(Np.navigator&&Np.navigator.userAgent),Hs=function(r){return parseFloat(r||"0")},Nc=function(r,t,e){return r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=!1),new XL((e?t:r)||0,(e?r:t)||0)},uT=zu({devicePixelContentBoxSize:Nc(),borderBoxSize:Nc(),contentBoxSize:Nc(),contentRect:new oT(0,0,0,0)}),hT=function(r,t){if(t===void 0&&(t=!1),Rg.has(r)&&!t)return Rg.get(r);if(sT(r))return Rg.set(r,uT),uT;var e=getComputedStyle(r),i=V_(r)&&r.ownerSVGElement&&r.getBBox(),n=!YL&&e.boxSizing==="border-box",o=qL.test(e.writingMode||""),s=!i&&lT.test(e.overflowY||""),a=!i&&lT.test(e.overflowX||""),l=i?0:Hs(e.paddingTop),u=i?0:Hs(e.paddingRight),h=i?0:Hs(e.paddingBottom),d=i?0:Hs(e.paddingLeft),p=i?0:Hs(e.borderTopWidth),m=i?0:Hs(e.borderRightWidth),g=i?0:Hs(e.borderBottomWidth),_=d+u,y=l+h,w=(i?0:Hs(e.borderLeftWidth))+m,A=p+g,I=a?r.offsetHeight-A-r.clientHeight:0,F=s?r.offsetWidth-w-r.clientWidth:0,N=n?_+w:0,U=n?y+A:0,B=i?i.width:Hs(e.width)-N-F,G=i?i.height:Hs(e.height)-U-I,ct=B+_+F+w,it=G+y+I+A,tt=zu({devicePixelContentBoxSize:Nc(Math.round(B*devicePixelRatio),Math.round(G*devicePixelRatio),o),borderBoxSize:Nc(ct,it,o),contentBoxSize:Nc(B,G,o),contentRect:new oT(d,l,B,G)});return Rg.set(r,tt),tt},cT=function(r,t,e){var i=hT(r,e),n=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case Op.DEVICE_PIXEL_CONTENT_BOX:return s;case Op.BORDER_BOX:return n;default:return o}},$L=function(r){var t=hT(r);this.target=r,this.contentRect=t.contentRect,this.borderBoxSize=zu([t.borderBoxSize]),this.contentBoxSize=zu([t.contentBoxSize]),this.devicePixelContentBoxSize=zu([t.devicePixelContentBoxSize])},dT=function(r){if(sT(r))return 1/0;for(var t=0,e=r.parentNode;e;)t+=1,e=e.parentNode;return t},JL=function(){var r=1/0,t=[];Hu.forEach(function(n){if(n.activeTargets.length!==0){var o=[];n.activeTargets.forEach(function(s){var a=new $L(s.target),l=dT(s.target);o.push(a),s.lastReportedSize=cT(s.target,s.observedBox),l<r&&(r=l)}),t.push(function(){n.callback.call(n.observer,o,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var e=0,i=t;e<i.length;e++)(0,i[e])();return r},pT=function(r){Hu.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(e){e.isActive()&&(dT(e.target)>r?t.activeTargets.push(e):t.skippedTargets.push(e))})})},ZL=function(){var r,t=0;for(pT(t);Hu.some(function(e){return e.activeTargets.length>0});)t=JL(),pT(t);return Hu.some(function(e){return e.skippedTargets.length>0})&&(typeof ErrorEvent=="function"?r=new ErrorEvent("error",{message:rT}):((r=document.createEvent("Event")).initEvent("error",!1,!1),r.message=rT),window.dispatchEvent(r)),t>0},fT=[],KL=function(r){if(!j_){var t=0,e=document.createTextNode("");new MutationObserver(function(){return fT.splice(0).forEach(function(i){return i()})}).observe(e,{characterData:!0}),j_=function(){e.textContent=""+(t?t--:t++)}}fT.push(r),j_()},W_=0,QL={attributes:!0,characterData:!0,childList:!0,subtree:!0},mT=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],gT=function(r){return r===void 0&&(r=0),Date.now()+r},X_=!1,q_=new(function(){function r(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return r.prototype.run=function(t){var e=this;if(t===void 0&&(t=250),!X_){X_=!0;var i,n=gT(t);i=function(){var o=!1;try{o=ZL()}finally{if(X_=!1,t=n-gT(),!W_)return;o?e.run(1e3):t>0?e.run(t):e.start()}},KL(function(){requestAnimationFrame(i)})}},r.prototype.schedule=function(){this.stop(),this.run()},r.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,QL)};document.body?e():Np.addEventListener("DOMContentLoaded",e)},r.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),mT.forEach(function(e){return Np.addEventListener(e,t.listener,!0)}))},r.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),mT.forEach(function(e){return Np.removeEventListener(e,t.listener,!0)}),this.stopped=!0)},r}()),vT=function(r){!W_&&r>0&&q_.start(),!(W_+=r)&&q_.stop()},tO=function(){function r(t,e){this.target=t,this.observedBox=e||Op.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return r.prototype.isActive=function(){var t,e=cT(this.target,this.observedBox,!0);return t=this.target,V_(t)||function(i){switch(i.tagName){case"INPUT":if(i.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||getComputedStyle(t).display!=="inline"||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},r}(),eO=function(r,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=t},Cg=new WeakMap,_T=function(r,t){for(var e=0;e<r.length;e+=1)if(r[e].target===t)return e;return-1},Pg=function(){function r(){}return r.connect=function(t,e){var i=new eO(t,e);Cg.set(t,i)},r.observe=function(t,e,i){var n=Cg.get(t),o=n.observationTargets.length===0;_T(n.observationTargets,e)<0&&(o&&Hu.push(n),n.observationTargets.push(new tO(e,i&&i.box)),vT(1),q_.schedule())},r.unobserve=function(t,e){var i=Cg.get(t),n=_T(i.observationTargets,e),o=i.observationTargets.length===1;n>=0&&(o&&Hu.splice(Hu.indexOf(i),1),i.observationTargets.splice(n,1),vT(-1))},r.disconnect=function(t){var e=this,i=Cg.get(t);i.observationTargets.slice().forEach(function(n){return e.unobserve(t,n.target)}),i.activeTargets.splice(0,i.activeTargets.length)},r}(),iO=function(){function r(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Pg.connect(this,t)}return r.prototype.observe=function(t,e){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aT(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Pg.observe(this,t,e)},r.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aT(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Pg.unobserve(this,t)},r.prototype.disconnect=function(){Pg.disconnect(this)},r.toString=function(){return"function ResizeObserver () { [polyfill code] }"},r}(),nO=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})},rO=function(r,t){var e,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(n=2&h[0]?i.return:h[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,h[1])).done)return n;switch(i=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,i=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){s=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){s.label=h[1];break}if(h[0]===6&&s.label<n[1]){s.label=n[1],n=h;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(h);break}n[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(d){h=[6,d],i=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,u])}}},oO=function(){function r(t,e,i,n,o){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=i,this.index=t,this.slideIndex=e,this.eventHub=n,this.id=o}return r.prototype.apply=function(){return nO(this,void 0,void 0,function(){var t;return rO(this,function(e){switch(e.label){case 0:this.eventHub.emit("task-start",this),e.label=1;case 1:return e.trys.push([1,3,,4]),this.state="start",[4,this.fn()];case 2:return e.sent(),this.state="end",this.eventHub.emit("task-end",this),[3,4];case 3:return t=e.sent(),this.eventHub.emit("task-error",{task:this,error:t}),[3,4];case 4:return[2]}})})},r}(),sO=function(){function r(){var t=this;this.eventHub=new P.a,this.tasks=[],this.index=0,this.eventHub.on("task-end",function(e){var i,n=t.tasks.findIndex(function(s){return s.index===e.index}),o=n+1;o>=0&&((i=t.tasks[o])===null||i===void 0||i.apply()),n>=0&&(t.tasks.splice(n,1),t.replaceIdleTask()),t.eventHub.emit("task-end-"+e.id)}),this.eventHub.on("task-error",function(e){var i=e.task,n=t.tasks.findIndex(function(o){return o.index===i.index});n>=0&&(t.tasks.splice(n,1),t.replaceIdleTask())})}return r.prototype.replaceIdleTask=function(){for(var t,e=this,i=new Set,n=0,o=this.tasks.length;n<o;n++)this.tasks[n].state==="idle"&&((t=this.tasks[n+1])===null||t===void 0?void 0:t.state)==="idle"&&i.add(n);Array.from(i).forEach(function(s){e.tasks.splice(s,1)})},r.prototype.addTask=function(t,e,i){var n=new oO(this.index++,e,t,this.eventHub,i);this.tasks.push(n),this.tasks.sort(function(o,s){return o.index-s.index}),this.replaceIdleTask(),this.tasks.length===1&&n.apply()},r.prototype.hasStartTask=function(){return this.tasks.some(function(t){return t.state==="start"})},r.prototype.destroy=function(){this.eventHub.removeAllListeners()},r}();function Dc(r,t){var e=r.__state.conversionName.toString(),i=Math.round(r.r),n=Math.round(r.g),o=Math.round(r.b),s=r.a,a=Math.round(r.h),l=r.s.toFixed(1),u=r.v.toFixed(1);if(t||e==="THREE_CHAR_HEX"||e==="SIX_CHAR_HEX"){for(var h=r.hex.toString(16);h.length<6;)h="0"+h;return"#"+h}return e==="CSS_RGB"?"rgb("+i+","+n+","+o+")":e==="CSS_RGBA"?"rgba("+i+","+n+","+o+","+s+")":e==="HEX"?"0x"+r.hex.toString(16):e==="RGB_ARRAY"?"["+i+","+n+","+o+"]":e==="RGBA_ARRAY"?"["+i+","+n+","+o+","+s+"]":e==="RGB_OBJ"?"{r:"+i+",g:"+n+",b:"+o+"}":e==="RGBA_OBJ"?"{r:"+i+",g:"+n+",b:"+o+",a:"+s+"}":e==="HSV_OBJ"?"{h:"+a+",s:"+l+",v:"+u+"}":e==="HSVA_OBJ"?"{h:"+a+",s:"+l+",v:"+u+",a:"+s+"}":"unknown format"}var yT=Array.prototype.forEach,Dp=Array.prototype.slice,oe={BREAK:{},extend:function(r){return this.each(Dp.call(arguments,1),function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(e){this.isUndefined(t[e])||(r[e]=t[e])}.bind(this))},this),r},defaults:function(r){return this.each(Dp.call(arguments,1),function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(e){this.isUndefined(r[e])&&(r[e]=t[e])}.bind(this))},this),r},compose:function(){var r=Dp.call(arguments);return function(){for(var t=Dp.call(arguments),e=r.length-1;e>=0;e--)t=[r[e].apply(this,t)];return t[0]}},each:function(r,t,e){if(r){if(yT&&r.forEach&&r.forEach===yT)r.forEach(t,e);else if(r.length===r.length+0){var i,n=void 0;for(n=0,i=r.length;n<i;n++)if(n in r&&t.call(e,r[n],n)===this.BREAK)return}else for(var o in r)if(t.call(e,r[o],o)===this.BREAK)return}},defer:function(r){setTimeout(r,0)},debounce:function(r,t,e){var i=void 0;return function(){var n=this,o=arguments;function s(){i=null,e||r.apply(n,o)}var a=e||!i;clearTimeout(i),i=setTimeout(s,t),a&&r.apply(n,o)}},toArray:function(r){return r.toArray?r.toArray():Dp.call(r)},isUndefined:function(r){return r===void 0},isNull:function(r){return r===null},isNaN:function(r){function t(e){return r.apply(this,arguments)}return t.toString=function(){return r.toString()},t}(function(r){return isNaN(r)}),isArray:Array.isArray||function(r){return r.constructor===Array},isObject:function(r){return r===Object(r)},isNumber:function(r){return r===r+0},isString:function(r){return r===r+""},isBoolean:function(r){return r===!1||r===!0},isFunction:function(r){return r instanceof Function}},aO=[{litmus:oe.isString,conversions:{THREE_CHAR_HEX:{read:function(r){var t=r.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return t!==null&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:Dc},SIX_CHAR_HEX:{read:function(r){var t=r.match(/^#([A-F0-9]{6})$/i);return t!==null&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:Dc},CSS_RGB:{read:function(r){var t=r.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return t!==null&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:Dc},CSS_RGBA:{read:function(r){var t=r.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return t!==null&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:Dc}}},{litmus:oe.isNumber,conversions:{HEX:{read:function(r){return{space:"HEX",hex:r,conversionName:"HEX"}},write:function(r){return r.hex}}}},{litmus:oe.isArray,conversions:{RGB_ARRAY:{read:function(r){return r.length===3&&{space:"RGB",r:r[0],g:r[1],b:r[2]}},write:function(r){return[r.r,r.g,r.b]}},RGBA_ARRAY:{read:function(r){return r.length===4&&{space:"RGB",r:r[0],g:r[1],b:r[2],a:r[3]}},write:function(r){return[r.r,r.g,r.b,r.a]}}}},{litmus:oe.isObject,conversions:{RGBA_OBJ:{read:function(r){return!!(oe.isNumber(r.r)&&oe.isNumber(r.g)&&oe.isNumber(r.b)&&oe.isNumber(r.a))&&{space:"RGB",r:r.r,g:r.g,b:r.b,a:r.a}},write:function(r){return{r:r.r,g:r.g,b:r.b,a:r.a}}},RGB_OBJ:{read:function(r){return!!(oe.isNumber(r.r)&&oe.isNumber(r.g)&&oe.isNumber(r.b))&&{space:"RGB",r:r.r,g:r.g,b:r.b}},write:function(r){return{r:r.r,g:r.g,b:r.b}}},HSVA_OBJ:{read:function(r){return!!(oe.isNumber(r.h)&&oe.isNumber(r.s)&&oe.isNumber(r.v)&&oe.isNumber(r.a))&&{space:"HSV",h:r.h,s:r.s,v:r.v,a:r.a}},write:function(r){return{h:r.h,s:r.s,v:r.v,a:r.a}}},HSV_OBJ:{read:function(r){return!!(oe.isNumber(r.h)&&oe.isNumber(r.s)&&oe.isNumber(r.v))&&{space:"HSV",h:r.h,s:r.s,v:r.v}},write:function(r){return{h:r.h,s:r.s,v:r.v}}}}}],Fp=void 0,Ig=void 0,Y_=function(){Ig=!1;var r=arguments.length>1?oe.toArray(arguments):arguments[0];return oe.each(aO,function(t){if(t.litmus(r))return oe.each(t.conversions,function(e,i){if(Fp=e.read(r),Ig===!1&&Fp!==!1)return Ig=Fp,Fp.conversionName=i,Fp.conversion=e,oe.BREAK}),oe.BREAK}),Ig},xT=void 0,Lg={hsv_to_rgb:function(r,t,e){var i=Math.floor(r/60)%6,n=r/60-Math.floor(r/60),o=e*(1-t),s=e*(1-n*t),a=e*(1-(1-n)*t),l=[[e,a,o],[s,e,o],[o,e,a],[o,s,e],[a,o,e],[e,o,s]][i];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(r,t,e){var i=Math.min(r,t,e),n=Math.max(r,t,e),o=n-i,s=void 0;return n===0?{h:NaN,s:0,v:0}:(s=r===n?(t-e)/o:t===n?2+(e-r)/o:4+(r-t)/o,(s/=6)<0&&(s+=1),{h:360*s,s:o/n,v:n/255})},rgb_to_hex:function(r,t,e){var i=this.hex_with_component(0,2,r);return i=this.hex_with_component(i,1,t),i=this.hex_with_component(i,0,e)},component_from_hex:function(r,t){return r>>8*t&255},hex_with_component:function(r,t,e){return e<<(xT=8*t)|r&~(255<<xT)}},lO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as=function(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")},ls=function(){function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&r(t.prototype,e),i&&r(t,i),t}}(),Rl=function r(t,e,i){t===null&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,e);if(n===void 0){var o=Object.getPrototypeOf(t);return o===null?void 0:r(o,e,i)}if("value"in n)return n.value;var s=n.get;return s!==void 0?s.call(i):void 0},Cl=function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)},Pl=function(r,t){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||typeof t!="object"&&typeof t!="function"?r:t},nr=function(){function r(){if(as(this,r),this.__state=Y_.apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return ls(r,[{key:"toString",value:function(){return Dc(this)}},{key:"toHexString",value:function(){return Dc(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),r}();function $_(r,t,e){Object.defineProperty(r,t,{get:function(){return this.__state.space==="RGB"||nr.recalculateRGB(this,t,e),this.__state[t]},set:function(i){this.__state.space!=="RGB"&&(nr.recalculateRGB(this,t,e),this.__state.space="RGB"),this.__state[t]=i}})}function J_(r,t){Object.defineProperty(r,t,{get:function(){return this.__state.space==="HSV"||nr.recalculateHSV(this),this.__state[t]},set:function(e){this.__state.space!=="HSV"&&(nr.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}nr.recalculateRGB=function(r,t,e){if(r.__state.space==="HEX")r.__state[t]=Lg.component_from_hex(r.__state.hex,e);else{if(r.__state.space!=="HSV")throw new Error("Corrupted color state");oe.extend(r.__state,Lg.hsv_to_rgb(r.__state.h,r.__state.s,r.__state.v))}},nr.recalculateHSV=function(r){var t=Lg.rgb_to_hsv(r.r,r.g,r.b);oe.extend(r.__state,{s:t.s,v:t.v}),oe.isNaN(t.h)?oe.isUndefined(r.__state.h)&&(r.__state.h=0):r.__state.h=t.h},nr.COMPONENTS=["r","g","b","h","s","v","hex","a"],$_(nr.prototype,"r",2),$_(nr.prototype,"g",1),$_(nr.prototype,"b",0),J_(nr.prototype,"h"),J_(nr.prototype,"s"),J_(nr.prototype,"v"),Object.defineProperty(nr.prototype,"a",{get:function(){return this.__state.a},set:function(r){this.__state.a=r}}),Object.defineProperty(nr.prototype,"hex",{get:function(){return this.__state.space!=="HEX"&&(this.__state.hex=Lg.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(r){this.__state.space="HEX",this.__state.hex=r}});var ju=function(){function r(t,e){as(this,r),this.initialValue=t[e],this.domElement=document.createElement("div"),this.object=t,this.property=e,this.__onChange=void 0,this.__onFinishChange=void 0}return ls(r,[{key:"onChange",value:function(t){return this.__onChange=t,this}},{key:"onFinishChange",value:function(t){return this.__onFinishChange=t,this}},{key:"setValue",value:function(t){return this.object[this.property]=t,this.__onChange&&this.__onChange.call(this,t),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),r}(),bT={};oe.each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},function(r,t){oe.each(r,function(e){bT[e]=t})});var uO=/(\d+(\.\d+)?)px/;function zs(r){if(r==="0"||oe.isUndefined(r))return 0;var t=r.match(uO);return oe.isNull(t)?0:parseFloat(t[1])}var Gt={makeSelectable:function(r,t){r!==void 0&&r.style!==void 0&&(r.onselectstart=t?function(){return!1}:function(){},r.style.MozUserSelect=t?"auto":"none",r.style.KhtmlUserSelect=t?"auto":"none",r.unselectable=t?"on":"off")},makeFullscreen:function(r,t,e){var i=e,n=t;oe.isUndefined(n)&&(n=!0),oe.isUndefined(i)&&(i=!0),r.style.position="absolute",n&&(r.style.left=0,r.style.right=0),i&&(r.style.top=0,r.style.bottom=0)},fakeEvent:function(r,t,e,i){var n=e||{},o=bT[t];if(!o)throw new Error("Event type "+t+" not supported.");var s=document.createEvent(o);switch(o){case"MouseEvents":var a=n.x||n.clientX||0,l=n.y||n.clientY||0;s.initMouseEvent(t,n.bubbles||!1,n.cancelable||!0,window,n.clickCount||1,0,0,a,l,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var u=s.initKeyboardEvent||s.initKeyEvent;oe.defaults(n,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),u(t,n.bubbles||!1,n.cancelable,window,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.keyCode,n.charCode);break;default:s.initEvent(t,n.bubbles||!1,n.cancelable||!0)}oe.defaults(s,i),r.dispatchEvent(s)},bind:function(r,t,e,i){var n=i||!1;return r.addEventListener?r.addEventListener(t,e,n):r.attachEvent&&r.attachEvent("on"+t,e),Gt},unbind:function(r,t,e,i){var n=i||!1;return r.removeEventListener?r.removeEventListener(t,e,n):r.detachEvent&&r.detachEvent("on"+t,e),Gt},addClass:function(r,t){if(r.className===void 0)r.className=t;else if(r.className!==t){var e=r.className.split(/ +/);e.indexOf(t)===-1&&(e.push(t),r.className=e.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return Gt},removeClass:function(r,t){if(t)if(r.className===t)r.removeAttribute("class");else{var e=r.className.split(/ +/),i=e.indexOf(t);i!==-1&&(e.splice(i,1),r.className=e.join(" "))}else r.className=void 0;return Gt},hasClass:function(r,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(r.className)||!1},getWidth:function(r){var t=getComputedStyle(r);return zs(t["border-left-width"])+zs(t["border-right-width"])+zs(t["padding-left"])+zs(t["padding-right"])+zs(t.width)},getHeight:function(r){var t=getComputedStyle(r);return zs(t["border-top-width"])+zs(t["border-bottom-width"])+zs(t["padding-top"])+zs(t["padding-bottom"])+zs(t.height)},getOffset:function(r){var t=r,e={left:0,top:0};if(t.offsetParent)do e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;while(t);return e},isActive:function(r){return r===document.activeElement&&(r.type||r.href)}},wT=function(r){function t(e,i){as(this,t);var n=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),o=n;return n.__prev=n.getValue(),n.__checkbox=document.createElement("input"),n.__checkbox.setAttribute("type","checkbox"),Gt.bind(n.__checkbox,"change",function(){o.setValue(!o.__prev)},!1),n.domElement.appendChild(n.__checkbox),n.updateDisplay(),n}return Cl(t,r),ls(t,[{key:"setValue",value:function(e){var i=Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),i}},{key:"updateDisplay",value:function(){return this.getValue()===!0?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(ju),hO=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=n,a=o;if(o.__select=document.createElement("select"),oe.isArray(s)){var l={};oe.each(s,function(u){l[u]=u}),s=l}return oe.each(s,function(u,h){var d=document.createElement("option");d.innerHTML=h,d.setAttribute("value",u),a.__select.appendChild(d)}),o.updateDisplay(),Gt.bind(o.__select,"change",function(){var u=this.options[this.selectedIndex].value;a.setValue(u)}),o.domElement.appendChild(o.__select),o}return Cl(t,r),ls(t,[{key:"setValue",value:function(e){var i=Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),i}},{key:"updateDisplay",value:function(){return Gt.isActive(this.__select)?this:(this.__select.value=this.getValue(),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this))}}]),t}(ju),cO=function(r){function t(e,i){as(this,t);var n=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),o=n;function s(){o.setValue(o.__input.value)}return n.__input=document.createElement("input"),n.__input.setAttribute("type","text"),Gt.bind(n.__input,"keyup",s),Gt.bind(n.__input,"change",s),Gt.bind(n.__input,"blur",function(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}),Gt.bind(n.__input,"keydown",function(a){a.keyCode===13&&this.blur()}),n.updateDisplay(),n.domElement.appendChild(n.__input),n}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){return Gt.isActive(this.__input)||(this.__input.value=this.getValue()),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(ju);function ST(r){var t=r.toString();return t.indexOf(".")>-1?t.length-t.indexOf(".")-1:0}var TT=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=n||{};return o.__min=s.min,o.__max=s.max,o.__step=s.step,oe.isUndefined(o.__step)?o.initialValue===0?o.__impliedStep=1:o.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(o.initialValue))/Math.LN10))/10:o.__impliedStep=o.__step,o.__precision=ST(o.__impliedStep),o}return Cl(t,r),ls(t,[{key:"setValue",value:function(e){var i=e;return this.__min!==void 0&&i<this.__min?i=this.__min:this.__max!==void 0&&i>this.__max&&(i=this.__max),this.__step!==void 0&&i%this.__step!=0&&(i=Math.round(i/this.__step)*this.__step),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,i)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=ST(e),this}}]),t}(ju),Og=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,n));o.__truncationSuspended=!1;var s=o,a=void 0;function l(){s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}function u(d){var p=a-d.clientY;s.setValue(s.getValue()+p*s.__impliedStep),a=d.clientY}function h(){Gt.unbind(window,"mousemove",u),Gt.unbind(window,"mouseup",h),l()}return o.__input=document.createElement("input"),o.__input.setAttribute("type","text"),Gt.bind(o.__input,"change",function(){var d=parseFloat(s.__input.value);oe.isNaN(d)||s.setValue(d)}),Gt.bind(o.__input,"blur",function(){l()}),Gt.bind(o.__input,"mousedown",function(d){Gt.bind(window,"mousemove",u),Gt.bind(window,"mouseup",h),a=d.clientY}),Gt.bind(o.__input,"keydown",function(d){d.keyCode===13&&(s.__truncationSuspended=!0,this.blur(),s.__truncationSuspended=!1,l())}),o.updateDisplay(),o.domElement.appendChild(o.__input),o}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){var e,i,n;return this.__input.value=this.__truncationSuspended?this.getValue():(e=this.getValue(),i=this.__precision,n=Math.pow(10,i),Math.round(e*n)/n),Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(TT);function ET(r,t,e,i,n){return i+(r-t)/(e-t)*(n-i)}var Z_=function(r){function t(e,i,n,o,s){as(this,t);var a=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,{min:n,max:o,step:s})),l=a;function u(m){m.preventDefault();var g=l.__background.getBoundingClientRect();return l.setValue(ET(m.clientX,g.left,g.right,l.__min,l.__max)),!1}function h(){Gt.unbind(window,"mousemove",u),Gt.unbind(window,"mouseup",h),l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}function d(m){var g=m.touches[0].clientX,_=l.__background.getBoundingClientRect();l.setValue(ET(g,_.left,_.right,l.__min,l.__max))}function p(){Gt.unbind(window,"touchmove",d),Gt.unbind(window,"touchend",p),l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}return a.__background=document.createElement("div"),a.__foreground=document.createElement("div"),Gt.bind(a.__background,"mousedown",function(m){document.activeElement.blur(),Gt.bind(window,"mousemove",u),Gt.bind(window,"mouseup",h),u(m)}),Gt.bind(a.__background,"touchstart",function(m){m.touches.length===1&&(Gt.bind(window,"touchmove",d),Gt.bind(window,"touchend",p),d(m))}),Gt.addClass(a.__background,"slider"),Gt.addClass(a.__foreground,"slider-fg"),a.updateDisplay(),a.__background.appendChild(a.__foreground),a.domElement.appendChild(a.__background),a}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",Rl(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(TT),MT=function(r){function t(e,i,n){as(this,t);var o=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=o;return o.__button=document.createElement("div"),o.__button.innerHTML=n===void 0?"Fire":n,Gt.bind(o.__button,"click",function(a){return a.preventDefault(),s.fire(),!1}),Gt.addClass(o.__button,"button"),o.domElement.appendChild(o.__button),o}return Cl(t,r),ls(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(ju),K_=function(r){function t(e,i){as(this,t);var n=Pl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));n.__color=new nr(n.getValue()),n.__temp=new nr(0);var o=n;n.domElement=document.createElement("div"),Gt.makeSelectable(n.domElement,!1),n.__selector=document.createElement("div"),n.__selector.className="selector",n.__saturation_field=document.createElement("div"),n.__saturation_field.className="saturation-field",n.__field_knob=document.createElement("div"),n.__field_knob.className="field-knob",n.__field_knob_border="2px solid ",n.__hue_knob=document.createElement("div"),n.__hue_knob.className="hue-knob",n.__hue_field=document.createElement("div"),n.__hue_field.className="hue-field",n.__input=document.createElement("input"),n.__input.type="text",n.__input_textShadow="0 1px 1px ",Gt.bind(n.__input,"keydown",function(y){y.keyCode===13&&p.call(this)}),Gt.bind(n.__input,"blur",p),Gt.bind(n.__selector,"mousedown",function(){Gt.addClass(this,"drag").bind(window,"mouseup",function(){Gt.removeClass(o.__selector,"drag")})}),Gt.bind(n.__selector,"touchstart",function(){Gt.addClass(this,"drag").bind(window,"touchend",function(){Gt.removeClass(o.__selector,"drag")})});var s,a=document.createElement("div");function l(y){g(y),Gt.bind(window,"mousemove",g),Gt.bind(window,"touchmove",g),Gt.bind(window,"mouseup",h),Gt.bind(window,"touchend",h)}function u(y){_(y),Gt.bind(window,"mousemove",_),Gt.bind(window,"touchmove",_),Gt.bind(window,"mouseup",d),Gt.bind(window,"touchend",d)}function h(){Gt.unbind(window,"mousemove",g),Gt.unbind(window,"touchmove",g),Gt.unbind(window,"mouseup",h),Gt.unbind(window,"touchend",h),m()}function d(){Gt.unbind(window,"mousemove",_),Gt.unbind(window,"touchmove",_),Gt.unbind(window,"mouseup",d),Gt.unbind(window,"touchend",d),m()}function p(){var y=Y_(this.value);y!==!1?(o.__color.__state=y,o.setValue(o.__color.toOriginal())):this.value=o.__color.toString()}function m(){o.__onFinishChange&&o.__onFinishChange.call(o,o.__color.toOriginal())}function g(y){y.type.indexOf("touch")===-1&&y.preventDefault();var w=o.__saturation_field.getBoundingClientRect(),A=y.touches&&y.touches[0]||y,I=A.clientX,F=A.clientY,N=(I-w.left)/(w.right-w.left),U=1-(F-w.top)/(w.bottom-w.top);return U>1?U=1:U<0&&(U=0),N>1?N=1:N<0&&(N=0),o.__color.v=U,o.__color.s=N,o.setValue(o.__color.toOriginal()),!1}function _(y){y.type.indexOf("touch")===-1&&y.preventDefault();var w=o.__hue_field.getBoundingClientRect(),A=1-((y.touches&&y.touches[0]||y).clientY-w.top)/(w.bottom-w.top);return A>1?A=1:A<0&&(A=0),o.__color.h=360*A,o.setValue(o.__color.toOriginal()),!1}return oe.extend(n.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),oe.extend(n.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:n.__field_knob_border+(n.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),oe.extend(n.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),oe.extend(n.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),oe.extend(a.style,{width:"100%",height:"100%",background:"none"}),AT(a,"top","rgba(0,0,0,0)","#000"),oe.extend(n.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(s=n.__hue_field).style.background="",s.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",s.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",s.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",s.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",s.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",oe.extend(n.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:n.__input_textShadow+"rgba(0,0,0,0.7)"}),Gt.bind(n.__saturation_field,"mousedown",l),Gt.bind(n.__saturation_field,"touchstart",l),Gt.bind(n.__field_knob,"mousedown",l),Gt.bind(n.__field_knob,"touchstart",l),Gt.bind(n.__hue_field,"mousedown",u),Gt.bind(n.__hue_field,"touchstart",u),n.__saturation_field.appendChild(a),n.__selector.appendChild(n.__field_knob),n.__selector.appendChild(n.__saturation_field),n.__selector.appendChild(n.__hue_field),n.__hue_field.appendChild(n.__hue_knob),n.domElement.appendChild(n.__input),n.domElement.appendChild(n.__selector),n.updateDisplay(),n}return Cl(t,r),ls(t,[{key:"updateDisplay",value:function(){var e=Y_(this.getValue());if(e!==!1){var i=!1;oe.each(nr.COMPONENTS,function(s){if(!oe.isUndefined(e[s])&&!oe.isUndefined(this.__color.__state[s])&&e[s]!==this.__color.__state[s])return i=!0,{}},this),i&&oe.extend(this.__color.__state,e)}oe.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;oe.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,AT(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),oe.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})}}]),t}(ju),dO=["-moz-","-o-","-webkit-","-ms-",""];function AT(r,t,e,i){r.style.background="",oe.each(dO,function(n){r.style.cssText+="background: "+n+"linear-gradient("+t+", "+e+" 0%, "+i+" 100%); "})}var pO=function(r,t){var e=t||document,i=document.createElement("style");i.type="text/css",i.innerHTML=r;var n=e.getElementsByTagName("head")[0];try{n.appendChild(i)}catch{}},fO=`<div id="dg-save" class="dg dialogue">
|
|
6335
6335
|
|
|
6336
6336
|
Here's the new load parameter for your <code>GUI</code>'s constructor:
|
|
6337
6337
|
|
|
@@ -6352,12 +6352,12 @@ void main(void){
|
|
|
6352
6352
|
</div>
|
|
6353
6353
|
|
|
6354
6354
|
</div>`,mO=function(r,t){var e=r[t];return oe.isArray(arguments[2])||oe.isObject(arguments[2])?new hO(r,t,arguments[2]):oe.isNumber(e)?oe.isNumber(arguments[2])&&oe.isNumber(arguments[3])?oe.isNumber(arguments[4])?new Z_(r,t,arguments[2],arguments[3],arguments[4]):new Z_(r,t,arguments[2],arguments[3]):oe.isNumber(arguments[4])?new Og(r,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new Og(r,t,{min:arguments[2],max:arguments[3]}):oe.isString(e)?new cO(r,t):oe.isFunction(e)?new MT(r,t,""):oe.isBoolean(e)?new wT(r,t):null},gO=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(r){setTimeout(r,1e3/60)},vO=function(){function r(){as(this,r),this.backgroundElement=document.createElement("div"),oe.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),Gt.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),oe.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;Gt.bind(this.backgroundElement,"click",function(){t.hide()})}return ls(r,[{key:"show",value:function(){var t=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),oe.defer(function(){t.backgroundElement.style.opacity=1,t.domElement.style.opacity=1,t.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var t=this,e=function i(){t.domElement.style.display="none",t.backgroundElement.style.display="none",Gt.unbind(t.domElement,"webkitTransitionEnd",i),Gt.unbind(t.domElement,"transitionend",i),Gt.unbind(t.domElement,"oTransitionEnd",i)};Gt.bind(this.domElement,"webkitTransitionEnd",e),Gt.bind(this.domElement,"transitionend",e),Gt.bind(this.domElement,"oTransitionEnd",e),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-Gt.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-Gt.getHeight(this.domElement)/2+"px"}}]),r}();pO(function(r){if(r&&typeof window!="undefined"){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=r,document.head.appendChild(t),r}}(`.dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}
|
|
6355
|
-
`));var Bp=function(){try{return!!window.localStorage}catch{return!1}}(),Ng=void 0,RT=!0,Fc=void 0,Q_=!1,CT=[],Zi=function r(t){var e=this,i=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),Gt.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],i=oe.defaults(i,{closeOnTop:!1,autoPlace:!0,width:r.DEFAULT_WIDTH}),i=oe.defaults(i,{resizable:i.autoPlace,hideable:i.autoPlace}),oe.isUndefined(i.load)?i.load={preset:"Default"}:i.preset&&(i.load.preset=i.preset),oe.isUndefined(i.parent)&&i.hideable&&CT.push(this),i.resizable=oe.isUndefined(i.parent)&&i.resizable,i.autoPlace&&oe.isUndefined(i.scrollable)&&(i.scrollable=!0);var n,o=Bp&&localStorage.getItem(Bc(this,"isLocal"))==="true",s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return i.parent}},scrollable:{get:function(){return i.scrollable}},autoPlace:{get:function(){return i.autoPlace}},closeOnTop:{get:function(){return i.closeOnTop}},preset:{get:function(){return e.parent?e.getRoot().preset:i.load.preset},set:function(h){e.parent?e.getRoot().preset=h:i.load.preset=h,function(d){for(var p=0;p<d.__preset_select.length;p++)d.__preset_select[p].value===d.preset&&(d.__preset_select.selectedIndex=p)}(this),e.revert()}},width:{get:function(){return i.width},set:function(h){i.width=h,ny(e,h)}},name:{get:function(){return i.name},set:function(h){i.name=h,a&&(a.innerHTML=i.name)}},closed:{get:function(){return i.closed},set:function(h){i.closed=h,i.closed?Gt.addClass(e.__ul,r.CLASS_CLOSED):Gt.removeClass(e.__ul,r.CLASS_CLOSED),this.onResize(),e.__closeButton&&(e.__closeButton.innerHTML=h?r.TEXT_OPEN:r.TEXT_CLOSED)}},load:{get:function(){return i.load}},useLocalStorage:{get:function(){return o},set:function(h){Bp&&(o=h,h?Gt.bind(window,"unload",s):Gt.unbind(window,"unload",s),localStorage.setItem(Bc(e,"isLocal"),h))}}}),oe.isUndefined(i.parent)){if(this.closed=i.closed||!1,Gt.addClass(this.domElement,r.CLASS_MAIN),Gt.makeSelectable(this.domElement,!1),Bp&&o){e.useLocalStorage=!0;var l=localStorage.getItem(Bc(this,"gui"));l&&(i.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=r.TEXT_CLOSED,Gt.addClass(this.__closeButton,r.CLASS_CLOSE_BUTTON),i.closeOnTop?(Gt.addClass(this.__closeButton,r.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(Gt.addClass(this.__closeButton,r.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),Gt.bind(this.__closeButton,"click",function(){e.closed=!e.closed})}else{i.closed===void 0&&(i.closed=!0);var u=document.createTextNode(i.name);Gt.addClass(u,"controller-name"),a=ty(e,u),Gt.addClass(this.__ul,r.CLASS_CLOSED),Gt.addClass(a,"title"),Gt.bind(a,"click",function(h){return h.preventDefault(),e.closed=!e.closed,!1}),i.closed||(this.closed=!1)}i.autoPlace&&(oe.isUndefined(i.parent)&&(RT&&(Fc=document.createElement("div"),Gt.addClass(Fc,"dg"),Gt.addClass(Fc,r.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(Fc),RT=!1),Fc.appendChild(this.domElement),Gt.addClass(this.domElement,r.CLASS_AUTO_PLACE)),this.parent||ny(e,i.width)),this.__resizeHandler=function(){e.onResizeDebounced()},Gt.bind(window,"resize",this.__resizeHandler),Gt.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),Gt.bind(this.__ul,"transitionend",this.__resizeHandler),Gt.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),i.resizable&&yO(this),s=function(){Bp&&localStorage.getItem(Bc(e,"isLocal"))==="true"&&localStorage.setItem(Bc(e,"gui"),JSON.stringify(e.getSaveObject()))},this.saveToLocalStorageIfPossible=s,i.parent||((n=e.getRoot()).width+=1,oe.defer(function(){n.width-=1}))};function ty(r,t,e){var i=document.createElement("li");return t&&i.appendChild(t),e?r.__ul.insertBefore(i,e):r.__ul.appendChild(i),r.onResize(),i}function PT(r){Gt.unbind(window,"resize",r.__resizeHandler),r.saveToLocalStorageIfPossible&&Gt.unbind(window,"unload",r.saveToLocalStorageIfPossible)}function ey(r,t){var e=r.__preset_select[r.__preset_select.selectedIndex];e.innerHTML=t?e.value+"*":e.value}function IT(r,t){var e=r.getRoot(),i=e.__rememberedObjects.indexOf(t.object);if(i!==-1){var n=e.__rememberedObjectIndecesToControllers[i];if(n===void 0&&(n={},e.__rememberedObjectIndecesToControllers[i]=n),n[t.property]=t,e.load&&e.load.remembered){var o=e.load.remembered,s=void 0;if(o[r.preset])s=o[r.preset];else{if(!o.Default)return;s=o.Default}if(s[i]&&s[i][t.property]!==void 0){var a=s[i][t.property];t.initialValue=a,t.setValue(a)}}}}function kp(r,t,e,i){if(t[e]===void 0)throw new Error('Object "'+t+'" has no property "'+e+'"');var n=void 0;if(i.color)n=new K_(t,e);else{var o=[t,e].concat(i.factoryArgs);n=mO.apply(r,o)}i.before instanceof ju&&(i.before=i.before.__li),IT(r,n),Gt.addClass(n.domElement,"c");var s=document.createElement("span");Gt.addClass(s,"property-name"),s.innerHTML=n.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(n.domElement);var l=ty(r,a,i.before);return Gt.addClass(l,Zi.CLASS_CONTROLLER_ROW),n instanceof K_?Gt.addClass(l,"color"):Gt.addClass(l,lO(n.getValue())),function(u,h,d){if(d.__li=h,d.__gui=u,oe.extend(d,{options:function(g){if(arguments.length>1){var _=d.__li.nextElementSibling;return d.remove(),kp(u,d.object,d.property,{before:_,factoryArgs:[oe.toArray(arguments)]})}if(oe.isArray(g)||oe.isObject(g)){var y=d.__li.nextElementSibling;return d.remove(),kp(u,d.object,d.property,{before:y,factoryArgs:[g]})}},name:function(g){return d.__li.firstElementChild.firstElementChild.innerHTML=g,d},listen:function(){return d.__gui.listen(d),d},remove:function(){return d.__gui.remove(d),d}}),d instanceof Z_){var p=new Og(d.object,d.property,{min:d.__min,max:d.__max,step:d.__step});oe.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(g){var _=d[g],y=p[g];d[g]=p[g]=function(){var w=Array.prototype.slice.call(arguments);return y.apply(p,w),_.apply(d,w)}}),Gt.addClass(h,"has-slider"),d.domElement.insertBefore(p.domElement,d.domElement.firstElementChild)}else if(d instanceof Og){var m=function(g){if(oe.isNumber(d.__min)&&oe.isNumber(d.__max)){var _=d.__li.firstElementChild.firstElementChild.innerHTML,y=d.__gui.__listening.indexOf(d)>-1;d.remove();var w=kp(u,d.object,d.property,{before:d.__li.nextElementSibling,factoryArgs:[d.__min,d.__max,d.__step]});return w.name(_),y&&w.listen(),w}return g};d.min=oe.compose(m,d.min),d.max=oe.compose(m,d.max)}else d instanceof wT?(Gt.bind(h,"click",function(){Gt.fakeEvent(d.__checkbox,"click")}),Gt.bind(d.__checkbox,"click",function(g){g.stopPropagation()})):d instanceof MT?(Gt.bind(h,"click",function(){Gt.fakeEvent(d.__button,"click")}),Gt.bind(h,"mouseover",function(){Gt.addClass(d.__button,"hover")}),Gt.bind(h,"mouseout",function(){Gt.removeClass(d.__button,"hover")})):d instanceof K_&&(Gt.addClass(h,"color"),d.updateDisplay=oe.compose(function(g){return h.style.borderLeftColor=d.__color.toString(),g},d.updateDisplay),d.updateDisplay());d.setValue=oe.compose(function(g){return u.getRoot().__preset_select&&d.isModified()&&ey(u.getRoot(),!0),g},d.setValue)}(r,l,n),r.__controllers.push(n),n}function Bc(r,t){return document.location.href+"."+t}function iy(r,t,e){var i=document.createElement("option");i.innerHTML=t,i.value=t,r.__preset_select.appendChild(i),e&&(r.__preset_select.selectedIndex=r.__preset_select.length-1)}function LT(r,t){t.style.display=r.useLocalStorage?"block":"none"}function _O(r){var t=r.__save_row=document.createElement("li");Gt.addClass(r.domElement,"has-save"),r.__ul.insertBefore(t,r.__ul.firstChild),Gt.addClass(t,"save-row");var e=document.createElement("span");e.innerHTML=" ",Gt.addClass(e,"button gears");var i=document.createElement("span");i.innerHTML="Save",Gt.addClass(i,"button"),Gt.addClass(i,"save");var n=document.createElement("span");n.innerHTML="New",Gt.addClass(n,"button"),Gt.addClass(n,"save-as");var o=document.createElement("span");o.innerHTML="Revert",Gt.addClass(o,"button"),Gt.addClass(o,"revert");var s=r.__preset_select=document.createElement("select");if(r.load&&r.load.remembered?oe.each(r.load.remembered,function(h,d){iy(r,d,d===r.preset)}):iy(r,"Default",!1),Gt.bind(s,"change",function(){for(var h=0;h<r.__preset_select.length;h++)r.__preset_select[h].innerHTML=r.__preset_select[h].value;r.preset=this.value}),t.appendChild(s),t.appendChild(e),t.appendChild(i),t.appendChild(n),t.appendChild(o),Bp){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block",localStorage.getItem(Bc(0,"isLocal"))==="true"&&l.setAttribute("checked","checked"),LT(r,a),Gt.bind(l,"change",function(){r.useLocalStorage=!r.useLocalStorage,LT(r,a)})}var u=document.getElementById("dg-new-constructor");Gt.bind(u,"keydown",function(h){!h.metaKey||h.which!==67&&h.keyCode!==67||Ng.hide()}),Gt.bind(e,"click",function(){u.innerHTML=JSON.stringify(r.getSaveObject(),void 0,2),Ng.show(),u.focus(),u.select()}),Gt.bind(i,"click",function(){r.save()}),Gt.bind(n,"click",function(){var h=prompt("Enter a new preset name.");h&&r.saveAs(h)}),Gt.bind(o,"click",function(){r.revert()})}function yO(r){var t=void 0;function e(o){return o.preventDefault(),r.width+=t-o.clientX,r.onResize(),t=o.clientX,!1}function i(){Gt.removeClass(r.__closeButton,Zi.CLASS_DRAG),Gt.unbind(window,"mousemove",e),Gt.unbind(window,"mouseup",i)}function n(o){return o.preventDefault(),t=o.clientX,Gt.addClass(r.__closeButton,Zi.CLASS_DRAG),Gt.bind(window,"mousemove",e),Gt.bind(window,"mouseup",i),!1}r.__resize_handle=document.createElement("div"),oe.extend(r.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),Gt.bind(r.__resize_handle,"mousedown",n),Gt.bind(r.__closeButton,"mousedown",n),r.domElement.insertBefore(r.__resize_handle,r.domElement.firstElementChild)}function ny(r,t){r.domElement.style.width=t+"px",r.__save_row&&r.autoPlace&&(r.__save_row.style.width=t+"px"),r.__closeButton&&(r.__closeButton.style.width=t+"px")}function Dg(r,t){var e={};return oe.each(r.__rememberedObjects,function(i,n){var o={},s=r.__rememberedObjectIndecesToControllers[n];oe.each(s,function(a,l){o[l]=t?a.initialValue:a.getValue()}),e[n]=o}),e}Zi.toggleHide=function(){Q_=!Q_,oe.each(CT,function(r){r.domElement.style.display=Q_?"none":""})},Zi.CLASS_AUTO_PLACE="a",Zi.CLASS_AUTO_PLACE_CONTAINER="ac",Zi.CLASS_MAIN="main",Zi.CLASS_CONTROLLER_ROW="cr",Zi.CLASS_TOO_TALL="taller-than-window",Zi.CLASS_CLOSED="closed",Zi.CLASS_CLOSE_BUTTON="close-button",Zi.CLASS_CLOSE_TOP="close-top",Zi.CLASS_CLOSE_BOTTOM="close-bottom",Zi.CLASS_DRAG="drag",Zi.DEFAULT_WIDTH=245,Zi.TEXT_CLOSED="Close Controls",Zi.TEXT_OPEN="Open Controls",Zi._keydownHandler=function(r){document.activeElement.type==="text"||r.which!==72&&r.keyCode!==72||Zi.toggleHide()},Gt.bind(window,"keydown",Zi._keydownHandler,!1),oe.extend(Zi.prototype,{add:function(r,t){return kp(this,r,t,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(r,t){return kp(this,r,t,{color:!0})},remove:function(r){this.__ul.removeChild(r.__li),this.__controllers.splice(this.__controllers.indexOf(r),1);var t=this;oe.defer(function(){t.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&Fc.removeChild(this.domElement);var r=this;oe.each(this.__folders,function(t){r.removeFolder(t)}),Gt.unbind(window,"keydown",Zi._keydownHandler,!1),PT(this)},addFolder:function(r){if(this.__folders[r]!==void 0)throw new Error('You already have a folder in this GUI by the name "'+r+'"');var t={name:r,parent:this};t.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[r]&&(t.closed=this.load.folders[r].closed,t.load=this.load.folders[r]);var e=new Zi(t);this.__folders[r]=e;var i=ty(this,e.domElement);return Gt.addClass(i,"folder"),e},removeFolder:function(r){this.__ul.removeChild(r.domElement.parentElement),delete this.__folders[r.name],this.load&&this.load.folders&&this.load.folders[r.name]&&delete this.load.folders[r.name],PT(r);var t=this;oe.each(r.__folders,function(e){r.removeFolder(e)}),oe.defer(function(){t.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var r=this.getRoot();if(r.scrollable){var t=Gt.getOffset(r.__ul).top,e=0;oe.each(r.__ul.childNodes,function(i){r.autoPlace&&i===r.__save_row||(e+=Gt.getHeight(i))}),window.innerHeight-t-20<e?(Gt.addClass(r.domElement,Zi.CLASS_TOO_TALL),r.__ul.style.height=window.innerHeight-t-20+"px"):(Gt.removeClass(r.domElement,Zi.CLASS_TOO_TALL),r.__ul.style.height="auto")}r.__resize_handle&&oe.defer(function(){r.__resize_handle.style.height=r.__ul.offsetHeight+"px"}),r.__closeButton&&(r.__closeButton.style.width=r.width+"px")},onResizeDebounced:oe.debounce(function(){this.onResize()},50),remember:function(){if(oe.isUndefined(Ng)&&((Ng=new vO).domElement.innerHTML=fO),this.parent)throw new Error("You can only call remember on a top level GUI.");var r=this;oe.each(Array.prototype.slice.call(arguments),function(t){r.__rememberedObjects.length===0&&_O(r),r.__rememberedObjects.indexOf(t)===-1&&r.__rememberedObjects.push(t)}),this.autoPlace&&ny(this,this.width)},getRoot:function(){for(var r=this;r.parent;)r=r.parent;return r},getSaveObject:function(){var r=this.load;return r.closed=this.closed,this.__rememberedObjects.length>0&&(r.preset=this.preset,r.remembered||(r.remembered={}),r.remembered[this.preset]=Dg(this)),r.folders={},oe.each(this.__folders,function(t,e){r.folders[e]=t.getSaveObject()}),r},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=Dg(this),ey(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(r){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=Dg(this,!0)),this.load.remembered[r]=Dg(this),this.preset=r,iy(this,r,!0),this.saveToLocalStorageIfPossible()},revert:function(r){oe.each(this.__controllers,function(t){this.getRoot().load.remembered?IT(r||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),oe.each(this.__folders,function(t){t.revert(t)}),r||ey(this.getRoot(),!1)},listen:function(r){var t=this.__listening.length===0;this.__listening.push(r),t&&function e(i){i.length!==0&&gO.call(window,function(){e(i)}),oe.each(i,function(n){n.updateDisplay()})}(this.__listening)},updateDisplay:function(){oe.each(this.__controllers,function(r){r.updateDisplay()}),oe.each(this.__folders,function(r){r.updateDisplay()})}});var xO=Zi,bO=function(){function r(t){this.runTime={fps:0,resolution:""},this.target=t.target,this.data=t.params,this.player=t.player,this.gui=this.createControllerGUI(),this.createStats(),this.addEventListener()}return r.prototype.createStats=function(){var t=this;this.stateId=setInterval(function(){t.player.view&&(t.controller.runTimeFps.setValue(t.player.fps.value),t.controller.drawCall.setValue(t.player.runtime.drawCall),t.controller.runTimeResolution.setValue(t.player.view.width+"*"+t.player.view.height))},500)},r.prototype.createControllerGUI=function(){var t,e,i,n,o,s=new xO({autoPlace:!0,closed:!0});s.domElement.style.opacity=".6",s.domElement.style.transformOrigin="100% 0",s.domElement.style.transform="scale(1)",this.target.appendChild(s.domElement),s.domElement.style.position="absolute",s.domElement.style.right="0",s.domElement.style.top="0",s.domElement.style.zIndex="2";var a=s.add({FPS:0},"FPS",0),l=s.add({drawCall:0},"drawCall",0),u=s.add({\u5206\u8FA8\u7387:""},"\u5206\u8FA8\u7387",""),h=s.add({\u989D\u5916\u8BA1\u7B97:0},"\u989D\u5916\u8BA1\u7B97",0,200),d=s.addFolder("renderOptions");return this.controller={runTimeResolution:u,runTimeFps:a,drawCall:l,moreCalculation:h,minFPS:d.add({\u6700\u4F4Efps:(t=this.data.minFPS)!==null&&t!==void 0?t:40},"\u6700\u4F4Efps",0,60),maxFPS:d.add({\u6700\u9AD8fps:(e=this.data.maxFPS)!==null&&e!==void 0?e:50},"\u6700\u9AD8fps",0,60),resolution:d.add({\u76EE\u6807\u5206\u8FA8\u500D\u7387:(i=this.data.resolution)!==null&&i!==void 0?i:window.devicePixelRatio},"\u76EE\u6807\u5206\u8FA8\u500D\u7387",.5,6),autoResolution:d.add({\u81EA\u52A8\u5206\u8FA8\u7387:(n=this.data.autoResolution)!==null&&n!==void 0&&n},"\u81EA\u52A8\u5206\u8FA8\u7387",!0),autoFps:d.add({\u81EA\u52A8fps:(o=this.data.autoFPS)===null||o===void 0||o},"\u81EA\u52A8fps",!0),transactionBgColor:d.addColor({\u5207\u9875\u80CC\u666F\u8272:this.data.transactionBgColor},"\u5207\u9875\u80CC\u666F\u8272")},this.controller.runTimeFps.disabled=!0,this.controller.runTimeResolution.disabled=!0,s},r.prototype.addEventListener=function(){var t,e=this;this.controller.autoFps.onChange(function(i){e.data.autoFPS=i,e.player.updateConfig(e.data)}),this.controller.maxFPS.onChange(function(i){e.data.maxFPS=i,e.player.updateConfig(e.data)}),this.controller.minFPS.onChange(function(i){e.data.minFPS=i,e.player.updateConfig(e.data)}),this.controller.autoResolution.onChange(function(i){e.data.autoResolution=i,e.player.updateConfig(e.data)}),this.controller.resolution.onChange(function(i){e.data.resolution=i,e.player.updateConfig(e.data)}),this.controller.transactionBgColor.onChange(function(i){e.data.transactionBgColor=i,e.player.updateConfig(e.data)}),this.controller.moreCalculation.onChange(function(i){t&&e.player.app.ticker.remove(t),i>0&&(t=function(){for(var n="";n.length<8e3*i;)n+=Math.random().toString(32).substr(2);Ep()(n)},e.player.app.ticker.add(t))})},r.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.target.removeChild(this.gui.domElement),this.gui.destroy()}catch{}},r}(),wO=function(){function r(t){var e=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){e.isScheduling=!0;var i=e.tasks.shift();i&&!e.isDestroy&&e.fn(i).then(function(){e.tasks.length>0?window.requestAnimationFrame(e.schedule):e.isScheduling=!1})},this.fn=t}return r.prototype.destroy=function(){this.isDestroy=!0},r.prototype.addTask=function(t){this.tasks.push(t),this.isScheduling||this.schedule()},r}(),SO=function(){function r(t){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=t}return r.prototype.addLock=function(t,e){var i=this;this.available&&(this.locks[t]=e,this.autoUnlock[t]=window.setTimeout(function(){delete i.locks[t]},3e3))},r.prototype.unlock=function(t,e){this.available&&e&&this.locks[t]&&this.locks[t]===e&&(window.clearTimeout(this.autoUnlock[t]),delete this.locks[t])},r.prototype.isLocked=function(t){return!!this.available&&!!this.locks[t]},r}(),TO=function(){function r(){var t=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){t.isScheduling=!0;var e=t.tasks.shift();e&&!t.isDestroy&&(e.status="running",e.fn.apply(null).then(function(){t.tasks.length>0?window.requestAnimationFrame(t.schedule):t.isScheduling=!1}).catch(function(){t.tasks.length>0?window.requestAnimationFrame(t.schedule):t.isScheduling=!1}))}}return r.prototype.getRunningTask=function(){return this.tasks[0]&&this.tasks[0].status==="running"?this.tasks[0]:null},r.prototype.addTask=function(t,e){var i={type:t,status:"wait",fn:e},n=this.getRunningTask();n&&t===n.type||(this.tasks=this.tasks.filter(function(o){return o.type!==t}),this.tasks.push(i),this.isScheduling||this.schedule())},r.prototype.destroy=function(){this.isDestroy=!0},r}(),EO=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})},MO=function(r,t){var e,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(n=2&h[0]?i.return:h[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,h[1])).done)return n;switch(i=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,i=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){s=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){s.label=h[1];break}if(h[0]===6&&s.label<n[1]){s.label=n[1],n=h;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(h);break}n[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(d){h=[6,d],i=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,u])}}};function AO(r,t,e){return EO(this,void 0,void 0,function(){var i,n,o,s;return MO(this,function(a){switch(a.label){case 0:return i=document.createElement("div"),(n=new Fg({anchor:i,renderOptions:{minFPS:1,maxFPS:1,resolution:1},mode:"local",interactive:!1})).setResource(r,t),[4,n.getSlideCountAsync()];case 1:if(o=a.sent(),e)return[3,6];s=1,a.label=2;case 2:return s<=o?[4,n.player.stagePool.preload(s,!0)]:[3,5];case 3:a.sent(),a.label=4;case 4:return s++,[3,2];case 5:return[3,6];case 6:return n.destroy(),[2]}})})}var RO=function(){var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])})(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),Up=function(){return(Up=Object.assign||function(r){for(var t,e=1,i=arguments.length;e<i;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}).apply(this,arguments)},CO=function(r,t,e,i){var n,o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(n=r[a])&&(s=(o<3?n(s):o>3?n(t,e,s):n(t,e))||s);return o>3&&s&&Object.defineProperty(t,e,s),s},po=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})},fo=function(r,t){var e,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(n=2&h[0]?i.return:h[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,h[1])).done)return n;switch(i=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,i=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){s=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){s.label=h[1];break}if(h[0]===6&&s.label<n[1]){s.label=n[1],n=h;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(h);break}n[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(d){h=[6,d],i=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,u])}}},PO=window.ResizeObserver||iO,ry=function(r){return new Promise(function(t){return setTimeout(t,r)})};function IO(r,t){return po(this,void 0,void 0,function(){var e;return fo(this,function(i){switch(i.label){case 0:e=Date.now(),i.label=1;case 1:return!r()&&Date.now()-e<t?[4,ry(50)]:[3,3];case 2:return i.sent(),[3,1];case 3:return[2]}})})}var Jr={syncDispatch:"syncDispatch",syncReceive:"syncReceive",syncEventLag:"syncEventLag",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd",stateChange:"stateChange"},OT={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,mediaState:Object.create(null),interactiveSeqState:Object.create(null)},oy="";try{oy="0.6.3"}catch{oy="development"}var Il=null;try{Il=ht.createInstance({name:"__slide_local_log__",driver:ht.INDEXEDDB,version:1})}catch{}var Fg=function(r){function t(i){var n=r.call(this)||this;return n.iosResetCache=[],n.needClearCacheImage=!1,n.version=oy,n.__slideState=Object(V.cloneDeep)(OT),n.userInputTime=0,n.isSyncingSlideState=!1,n.frozenTaskManager=new TO,n.randomId=Math.random().toString(32).substr(2),n.resize=!1,n.isAnimating=!1,n.renderingTaskManager=new sO,n.isLoading=!1,n.interactive=!0,n.renderingIndex=0,n.frameWidth=1,n.frameHeight=1,n.frame=document.createElement("div"),n.medianController=document.createElement("div"),n.frameResizeObserver=new PO(function(){return n.frameResizeHandler()}),n.timestamp=function(){return Date.now()},n.mode="local",n.enableGlobalClick=!1,n.lastEmitedState=null,n.playerController=null,n.isInitResized=!1,n.cacheImage=document.createElement("img"),n.isTouchStart=!1,n.touchStartId=void 0,n.taskId="",n.volumeAdjuster=new VL,n.designWidth=0,n.designHeight=0,n._slideCount=0,n._dispatchIncrId=0,n._receiveIncrId=0,n.userInputHandle=function(){n.userInputTime=Date.now()},n.handleViewClick=function(){setTimeout(function(){var o=Date.now();Math.abs(o-n.userInputTime)>500&&n.enableGlobalClick&&n.nextStep()})},n.handleViewTouchStart=function(){window.clearTimeout(n.touchStartId),n.isTouchStart=!0,n.touchStartId=setTimeout(function(){n.isTouchStart=!1},350)},n.handleViewTouchEnd=function(){n.isTouchStart&&(n.isTouchStart=!1,n.handleViewClick())},n.handleSlideRef=function(){console.log(n),window.__slide=n},n.receiveSyncHandler=function(o){return po(n,void 0,void 0,function(){var s,a,l,u,h=this;return fo(this,function(d){switch(d.label){case 0:return Object(V.isNumber)(o.incrId)&&(o.incrId&&o.incrId-this._receiveIncrId!=1&&this.emit(Jr.syncEventLag),this._receiveIncrId=o.incrId||0),this.logger.info("sync receive "+JSON.stringify(o),this.taskId),o.type!=="nextStep"?[3,1]:(this.mainSeqStep!==o.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(o.next,"start"),this.player.nextTick(function(){h.doNextStep(!0)})):this.doNextStep(!0),[3,6]);case 1:return o.type!=="prevStep"?[3,2]:(this.mainSeqStep===0&&this.mainSeqState==="idle"||this.mainSeqStep===o.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(o.next+1,"start"),(s=this.player)===null||s===void 0||s.nextTick(function(){h.doPrevStep(!0)})),[3,6]);case 2:return o.type!=="interactiveAnim"?[3,3]:(this.player?this.player.applyInteractiveAction(o.action):this.__slideState.interactiveSeqState[o.seqId].step+=1,[3,6]);case 3:return o.type!=="renderSlide"?[3,5]:[4,this.doRenderSlide(o.index,o.isForward)];case 4:return d.sent(),[3,6];case 5:o.type==="mediaPlay"?((a=this.player)===null||a===void 0||a.setMediaState(o.id,!0),this.__slideState.mediaState[o.id]=o.state):o.type==="mediaPause"?((l=this.player)===null||l===void 0||l.setMediaState(o.id,!1),this.__slideState.mediaState[o.id]=o.state):o.type==="mediaSeek"&&((u=this.player)===null||u===void 0||u.setMediaCurrentTime(o.id,o.time),this.__slideState.mediaState[o.id]=o.state),d.label=6;case 6:return[2]}})})},n.handlePrevSlide=function(o){return o===void 0&&(o=!1),po(n,void 0,void 0,function(){var s,a;return fo(this,function(l){switch(l.label){case 0:return this.player?[4,(a=this.player)===null||a===void 0?void 0:a.createSnapshotForNextSlide(!0)]:[2];case 1:return l.sent(),(s=this.player.prevSlideIndex)>=1&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(s):o?this.doRenderSlide(s,!1):this.renderSlide(s,!1)),[2]}})})},n.handleNextSlide=function(o){return o===void 0&&(o=!1),po(n,void 0,void 0,function(){var s,a;return fo(this,function(l){switch(l.label){case 0:return this.player?[4,(a=this.player)===null||a===void 0?void 0:a.createSnapshotForNextSlide(!1)]:[2];case 1:return l.sent(),(s=this.player.nextSlideIndex)<=this.slideCount&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(s):o?this.doRenderSlide(s,!0):this.renderSlide(s,!0)),[2]}})})},n.handleGotoSlide=function(o){if(o<=n.slideCount&&o>=1){var s=n.slideState.currentSlideIndex<=o;n.renderSlide(o,s)}else o===-1&&n.renderSlide(n.slideCount,!0)},n.config=n.initSlideConfig(i),n.logger={info:function(o,s){var a,l;!((a=n.config.logger)===null||a===void 0)&&a.info&&(t._tempLog+="INFO - "+new Date().toISOString()+" - {"+n.randomId+"}["+s+"] "+o+`
|
|
6355
|
+
`));var Bp=function(){try{return!!window.localStorage}catch{return!1}}(),Ng=void 0,RT=!0,Fc=void 0,Q_=!1,CT=[],Zi=function r(t){var e=this,i=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),Gt.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],i=oe.defaults(i,{closeOnTop:!1,autoPlace:!0,width:r.DEFAULT_WIDTH}),i=oe.defaults(i,{resizable:i.autoPlace,hideable:i.autoPlace}),oe.isUndefined(i.load)?i.load={preset:"Default"}:i.preset&&(i.load.preset=i.preset),oe.isUndefined(i.parent)&&i.hideable&&CT.push(this),i.resizable=oe.isUndefined(i.parent)&&i.resizable,i.autoPlace&&oe.isUndefined(i.scrollable)&&(i.scrollable=!0);var n,o=Bp&&localStorage.getItem(Bc(this,"isLocal"))==="true",s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return i.parent}},scrollable:{get:function(){return i.scrollable}},autoPlace:{get:function(){return i.autoPlace}},closeOnTop:{get:function(){return i.closeOnTop}},preset:{get:function(){return e.parent?e.getRoot().preset:i.load.preset},set:function(h){e.parent?e.getRoot().preset=h:i.load.preset=h,function(d){for(var p=0;p<d.__preset_select.length;p++)d.__preset_select[p].value===d.preset&&(d.__preset_select.selectedIndex=p)}(this),e.revert()}},width:{get:function(){return i.width},set:function(h){i.width=h,ny(e,h)}},name:{get:function(){return i.name},set:function(h){i.name=h,a&&(a.innerHTML=i.name)}},closed:{get:function(){return i.closed},set:function(h){i.closed=h,i.closed?Gt.addClass(e.__ul,r.CLASS_CLOSED):Gt.removeClass(e.__ul,r.CLASS_CLOSED),this.onResize(),e.__closeButton&&(e.__closeButton.innerHTML=h?r.TEXT_OPEN:r.TEXT_CLOSED)}},load:{get:function(){return i.load}},useLocalStorage:{get:function(){return o},set:function(h){Bp&&(o=h,h?Gt.bind(window,"unload",s):Gt.unbind(window,"unload",s),localStorage.setItem(Bc(e,"isLocal"),h))}}}),oe.isUndefined(i.parent)){if(this.closed=i.closed||!1,Gt.addClass(this.domElement,r.CLASS_MAIN),Gt.makeSelectable(this.domElement,!1),Bp&&o){e.useLocalStorage=!0;var l=localStorage.getItem(Bc(this,"gui"));l&&(i.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=r.TEXT_CLOSED,Gt.addClass(this.__closeButton,r.CLASS_CLOSE_BUTTON),i.closeOnTop?(Gt.addClass(this.__closeButton,r.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(Gt.addClass(this.__closeButton,r.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),Gt.bind(this.__closeButton,"click",function(){e.closed=!e.closed})}else{i.closed===void 0&&(i.closed=!0);var u=document.createTextNode(i.name);Gt.addClass(u,"controller-name"),a=ty(e,u),Gt.addClass(this.__ul,r.CLASS_CLOSED),Gt.addClass(a,"title"),Gt.bind(a,"click",function(h){return h.preventDefault(),e.closed=!e.closed,!1}),i.closed||(this.closed=!1)}i.autoPlace&&(oe.isUndefined(i.parent)&&(RT&&(Fc=document.createElement("div"),Gt.addClass(Fc,"dg"),Gt.addClass(Fc,r.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(Fc),RT=!1),Fc.appendChild(this.domElement),Gt.addClass(this.domElement,r.CLASS_AUTO_PLACE)),this.parent||ny(e,i.width)),this.__resizeHandler=function(){e.onResizeDebounced()},Gt.bind(window,"resize",this.__resizeHandler),Gt.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),Gt.bind(this.__ul,"transitionend",this.__resizeHandler),Gt.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),i.resizable&&yO(this),s=function(){Bp&&localStorage.getItem(Bc(e,"isLocal"))==="true"&&localStorage.setItem(Bc(e,"gui"),JSON.stringify(e.getSaveObject()))},this.saveToLocalStorageIfPossible=s,i.parent||((n=e.getRoot()).width+=1,oe.defer(function(){n.width-=1}))};function ty(r,t,e){var i=document.createElement("li");return t&&i.appendChild(t),e?r.__ul.insertBefore(i,e):r.__ul.appendChild(i),r.onResize(),i}function PT(r){Gt.unbind(window,"resize",r.__resizeHandler),r.saveToLocalStorageIfPossible&&Gt.unbind(window,"unload",r.saveToLocalStorageIfPossible)}function ey(r,t){var e=r.__preset_select[r.__preset_select.selectedIndex];e.innerHTML=t?e.value+"*":e.value}function IT(r,t){var e=r.getRoot(),i=e.__rememberedObjects.indexOf(t.object);if(i!==-1){var n=e.__rememberedObjectIndecesToControllers[i];if(n===void 0&&(n={},e.__rememberedObjectIndecesToControllers[i]=n),n[t.property]=t,e.load&&e.load.remembered){var o=e.load.remembered,s=void 0;if(o[r.preset])s=o[r.preset];else{if(!o.Default)return;s=o.Default}if(s[i]&&s[i][t.property]!==void 0){var a=s[i][t.property];t.initialValue=a,t.setValue(a)}}}}function kp(r,t,e,i){if(t[e]===void 0)throw new Error('Object "'+t+'" has no property "'+e+'"');var n=void 0;if(i.color)n=new K_(t,e);else{var o=[t,e].concat(i.factoryArgs);n=mO.apply(r,o)}i.before instanceof ju&&(i.before=i.before.__li),IT(r,n),Gt.addClass(n.domElement,"c");var s=document.createElement("span");Gt.addClass(s,"property-name"),s.innerHTML=n.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(n.domElement);var l=ty(r,a,i.before);return Gt.addClass(l,Zi.CLASS_CONTROLLER_ROW),n instanceof K_?Gt.addClass(l,"color"):Gt.addClass(l,lO(n.getValue())),function(u,h,d){if(d.__li=h,d.__gui=u,oe.extend(d,{options:function(g){if(arguments.length>1){var _=d.__li.nextElementSibling;return d.remove(),kp(u,d.object,d.property,{before:_,factoryArgs:[oe.toArray(arguments)]})}if(oe.isArray(g)||oe.isObject(g)){var y=d.__li.nextElementSibling;return d.remove(),kp(u,d.object,d.property,{before:y,factoryArgs:[g]})}},name:function(g){return d.__li.firstElementChild.firstElementChild.innerHTML=g,d},listen:function(){return d.__gui.listen(d),d},remove:function(){return d.__gui.remove(d),d}}),d instanceof Z_){var p=new Og(d.object,d.property,{min:d.__min,max:d.__max,step:d.__step});oe.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(g){var _=d[g],y=p[g];d[g]=p[g]=function(){var w=Array.prototype.slice.call(arguments);return y.apply(p,w),_.apply(d,w)}}),Gt.addClass(h,"has-slider"),d.domElement.insertBefore(p.domElement,d.domElement.firstElementChild)}else if(d instanceof Og){var m=function(g){if(oe.isNumber(d.__min)&&oe.isNumber(d.__max)){var _=d.__li.firstElementChild.firstElementChild.innerHTML,y=d.__gui.__listening.indexOf(d)>-1;d.remove();var w=kp(u,d.object,d.property,{before:d.__li.nextElementSibling,factoryArgs:[d.__min,d.__max,d.__step]});return w.name(_),y&&w.listen(),w}return g};d.min=oe.compose(m,d.min),d.max=oe.compose(m,d.max)}else d instanceof wT?(Gt.bind(h,"click",function(){Gt.fakeEvent(d.__checkbox,"click")}),Gt.bind(d.__checkbox,"click",function(g){g.stopPropagation()})):d instanceof MT?(Gt.bind(h,"click",function(){Gt.fakeEvent(d.__button,"click")}),Gt.bind(h,"mouseover",function(){Gt.addClass(d.__button,"hover")}),Gt.bind(h,"mouseout",function(){Gt.removeClass(d.__button,"hover")})):d instanceof K_&&(Gt.addClass(h,"color"),d.updateDisplay=oe.compose(function(g){return h.style.borderLeftColor=d.__color.toString(),g},d.updateDisplay),d.updateDisplay());d.setValue=oe.compose(function(g){return u.getRoot().__preset_select&&d.isModified()&&ey(u.getRoot(),!0),g},d.setValue)}(r,l,n),r.__controllers.push(n),n}function Bc(r,t){return document.location.href+"."+t}function iy(r,t,e){var i=document.createElement("option");i.innerHTML=t,i.value=t,r.__preset_select.appendChild(i),e&&(r.__preset_select.selectedIndex=r.__preset_select.length-1)}function LT(r,t){t.style.display=r.useLocalStorage?"block":"none"}function _O(r){var t=r.__save_row=document.createElement("li");Gt.addClass(r.domElement,"has-save"),r.__ul.insertBefore(t,r.__ul.firstChild),Gt.addClass(t,"save-row");var e=document.createElement("span");e.innerHTML=" ",Gt.addClass(e,"button gears");var i=document.createElement("span");i.innerHTML="Save",Gt.addClass(i,"button"),Gt.addClass(i,"save");var n=document.createElement("span");n.innerHTML="New",Gt.addClass(n,"button"),Gt.addClass(n,"save-as");var o=document.createElement("span");o.innerHTML="Revert",Gt.addClass(o,"button"),Gt.addClass(o,"revert");var s=r.__preset_select=document.createElement("select");if(r.load&&r.load.remembered?oe.each(r.load.remembered,function(h,d){iy(r,d,d===r.preset)}):iy(r,"Default",!1),Gt.bind(s,"change",function(){for(var h=0;h<r.__preset_select.length;h++)r.__preset_select[h].innerHTML=r.__preset_select[h].value;r.preset=this.value}),t.appendChild(s),t.appendChild(e),t.appendChild(i),t.appendChild(n),t.appendChild(o),Bp){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block",localStorage.getItem(Bc(0,"isLocal"))==="true"&&l.setAttribute("checked","checked"),LT(r,a),Gt.bind(l,"change",function(){r.useLocalStorage=!r.useLocalStorage,LT(r,a)})}var u=document.getElementById("dg-new-constructor");Gt.bind(u,"keydown",function(h){!h.metaKey||h.which!==67&&h.keyCode!==67||Ng.hide()}),Gt.bind(e,"click",function(){u.innerHTML=JSON.stringify(r.getSaveObject(),void 0,2),Ng.show(),u.focus(),u.select()}),Gt.bind(i,"click",function(){r.save()}),Gt.bind(n,"click",function(){var h=prompt("Enter a new preset name.");h&&r.saveAs(h)}),Gt.bind(o,"click",function(){r.revert()})}function yO(r){var t=void 0;function e(o){return o.preventDefault(),r.width+=t-o.clientX,r.onResize(),t=o.clientX,!1}function i(){Gt.removeClass(r.__closeButton,Zi.CLASS_DRAG),Gt.unbind(window,"mousemove",e),Gt.unbind(window,"mouseup",i)}function n(o){return o.preventDefault(),t=o.clientX,Gt.addClass(r.__closeButton,Zi.CLASS_DRAG),Gt.bind(window,"mousemove",e),Gt.bind(window,"mouseup",i),!1}r.__resize_handle=document.createElement("div"),oe.extend(r.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),Gt.bind(r.__resize_handle,"mousedown",n),Gt.bind(r.__closeButton,"mousedown",n),r.domElement.insertBefore(r.__resize_handle,r.domElement.firstElementChild)}function ny(r,t){r.domElement.style.width=t+"px",r.__save_row&&r.autoPlace&&(r.__save_row.style.width=t+"px"),r.__closeButton&&(r.__closeButton.style.width=t+"px")}function Dg(r,t){var e={};return oe.each(r.__rememberedObjects,function(i,n){var o={},s=r.__rememberedObjectIndecesToControllers[n];oe.each(s,function(a,l){o[l]=t?a.initialValue:a.getValue()}),e[n]=o}),e}Zi.toggleHide=function(){Q_=!Q_,oe.each(CT,function(r){r.domElement.style.display=Q_?"none":""})},Zi.CLASS_AUTO_PLACE="a",Zi.CLASS_AUTO_PLACE_CONTAINER="ac",Zi.CLASS_MAIN="main",Zi.CLASS_CONTROLLER_ROW="cr",Zi.CLASS_TOO_TALL="taller-than-window",Zi.CLASS_CLOSED="closed",Zi.CLASS_CLOSE_BUTTON="close-button",Zi.CLASS_CLOSE_TOP="close-top",Zi.CLASS_CLOSE_BOTTOM="close-bottom",Zi.CLASS_DRAG="drag",Zi.DEFAULT_WIDTH=245,Zi.TEXT_CLOSED="Close Controls",Zi.TEXT_OPEN="Open Controls",Zi._keydownHandler=function(r){document.activeElement.type==="text"||r.which!==72&&r.keyCode!==72||Zi.toggleHide()},Gt.bind(window,"keydown",Zi._keydownHandler,!1),oe.extend(Zi.prototype,{add:function(r,t){return kp(this,r,t,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(r,t){return kp(this,r,t,{color:!0})},remove:function(r){this.__ul.removeChild(r.__li),this.__controllers.splice(this.__controllers.indexOf(r),1);var t=this;oe.defer(function(){t.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&Fc.removeChild(this.domElement);var r=this;oe.each(this.__folders,function(t){r.removeFolder(t)}),Gt.unbind(window,"keydown",Zi._keydownHandler,!1),PT(this)},addFolder:function(r){if(this.__folders[r]!==void 0)throw new Error('You already have a folder in this GUI by the name "'+r+'"');var t={name:r,parent:this};t.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[r]&&(t.closed=this.load.folders[r].closed,t.load=this.load.folders[r]);var e=new Zi(t);this.__folders[r]=e;var i=ty(this,e.domElement);return Gt.addClass(i,"folder"),e},removeFolder:function(r){this.__ul.removeChild(r.domElement.parentElement),delete this.__folders[r.name],this.load&&this.load.folders&&this.load.folders[r.name]&&delete this.load.folders[r.name],PT(r);var t=this;oe.each(r.__folders,function(e){r.removeFolder(e)}),oe.defer(function(){t.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var r=this.getRoot();if(r.scrollable){var t=Gt.getOffset(r.__ul).top,e=0;oe.each(r.__ul.childNodes,function(i){r.autoPlace&&i===r.__save_row||(e+=Gt.getHeight(i))}),window.innerHeight-t-20<e?(Gt.addClass(r.domElement,Zi.CLASS_TOO_TALL),r.__ul.style.height=window.innerHeight-t-20+"px"):(Gt.removeClass(r.domElement,Zi.CLASS_TOO_TALL),r.__ul.style.height="auto")}r.__resize_handle&&oe.defer(function(){r.__resize_handle.style.height=r.__ul.offsetHeight+"px"}),r.__closeButton&&(r.__closeButton.style.width=r.width+"px")},onResizeDebounced:oe.debounce(function(){this.onResize()},50),remember:function(){if(oe.isUndefined(Ng)&&((Ng=new vO).domElement.innerHTML=fO),this.parent)throw new Error("You can only call remember on a top level GUI.");var r=this;oe.each(Array.prototype.slice.call(arguments),function(t){r.__rememberedObjects.length===0&&_O(r),r.__rememberedObjects.indexOf(t)===-1&&r.__rememberedObjects.push(t)}),this.autoPlace&&ny(this,this.width)},getRoot:function(){for(var r=this;r.parent;)r=r.parent;return r},getSaveObject:function(){var r=this.load;return r.closed=this.closed,this.__rememberedObjects.length>0&&(r.preset=this.preset,r.remembered||(r.remembered={}),r.remembered[this.preset]=Dg(this)),r.folders={},oe.each(this.__folders,function(t,e){r.folders[e]=t.getSaveObject()}),r},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=Dg(this),ey(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(r){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=Dg(this,!0)),this.load.remembered[r]=Dg(this),this.preset=r,iy(this,r,!0),this.saveToLocalStorageIfPossible()},revert:function(r){oe.each(this.__controllers,function(t){this.getRoot().load.remembered?IT(r||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),oe.each(this.__folders,function(t){t.revert(t)}),r||ey(this.getRoot(),!1)},listen:function(r){var t=this.__listening.length===0;this.__listening.push(r),t&&function e(i){i.length!==0&&gO.call(window,function(){e(i)}),oe.each(i,function(n){n.updateDisplay()})}(this.__listening)},updateDisplay:function(){oe.each(this.__controllers,function(r){r.updateDisplay()}),oe.each(this.__folders,function(r){r.updateDisplay()})}});var xO=Zi,bO=function(){function r(t){this.runTime={fps:0,resolution:""},this.target=t.target,this.data=t.params,this.player=t.player,this.gui=this.createControllerGUI(),this.createStats(),this.addEventListener()}return r.prototype.createStats=function(){var t=this;this.stateId=setInterval(function(){t.player.view&&(t.controller.runTimeFps.setValue(t.player.fps.value),t.controller.drawCall.setValue(t.player.runtime.drawCall),t.controller.runTimeResolution.setValue(t.player.view.width+"*"+t.player.view.height))},500)},r.prototype.createControllerGUI=function(){var t,e,i,n,o,s=new xO({autoPlace:!0,closed:!0});s.domElement.style.opacity=".6",s.domElement.style.transformOrigin="100% 0",s.domElement.style.transform="scale(1)",this.target.appendChild(s.domElement),s.domElement.style.position="absolute",s.domElement.style.right="0",s.domElement.style.top="0",s.domElement.style.zIndex="2";var a=s.add({FPS:0},"FPS",0),l=s.add({drawCall:0},"drawCall",0),u=s.add({\u5206\u8FA8\u7387:""},"\u5206\u8FA8\u7387",""),h=s.add({\u989D\u5916\u8BA1\u7B97:0},"\u989D\u5916\u8BA1\u7B97",0,200),d=s.addFolder("renderOptions");return this.controller={runTimeResolution:u,runTimeFps:a,drawCall:l,moreCalculation:h,minFPS:d.add({\u6700\u4F4Efps:(t=this.data.minFPS)!==null&&t!==void 0?t:40},"\u6700\u4F4Efps",0,60),maxFPS:d.add({\u6700\u9AD8fps:(e=this.data.maxFPS)!==null&&e!==void 0?e:50},"\u6700\u9AD8fps",0,60),resolution:d.add({\u76EE\u6807\u5206\u8FA8\u500D\u7387:(i=this.data.resolution)!==null&&i!==void 0?i:window.devicePixelRatio},"\u76EE\u6807\u5206\u8FA8\u500D\u7387",.5,6),autoResolution:d.add({\u81EA\u52A8\u5206\u8FA8\u7387:(n=this.data.autoResolution)!==null&&n!==void 0&&n},"\u81EA\u52A8\u5206\u8FA8\u7387",!0),autoFps:d.add({\u81EA\u52A8fps:(o=this.data.autoFPS)===null||o===void 0||o},"\u81EA\u52A8fps",!0),transactionBgColor:d.addColor({\u5207\u9875\u80CC\u666F\u8272:this.data.transactionBgColor},"\u5207\u9875\u80CC\u666F\u8272")},this.controller.runTimeFps.disabled=!0,this.controller.runTimeResolution.disabled=!0,s},r.prototype.addEventListener=function(){var t,e=this;this.controller.autoFps.onChange(function(i){e.data.autoFPS=i,e.player.updateConfig(e.data)}),this.controller.maxFPS.onChange(function(i){e.data.maxFPS=i,e.player.updateConfig(e.data)}),this.controller.minFPS.onChange(function(i){e.data.minFPS=i,e.player.updateConfig(e.data)}),this.controller.autoResolution.onChange(function(i){e.data.autoResolution=i,e.player.updateConfig(e.data)}),this.controller.resolution.onChange(function(i){e.data.resolution=i,e.player.updateConfig(e.data)}),this.controller.transactionBgColor.onChange(function(i){e.data.transactionBgColor=i,e.player.updateConfig(e.data)}),this.controller.moreCalculation.onChange(function(i){t&&e.player.app.ticker.remove(t),i>0&&(t=function(){for(var n="";n.length<8e3*i;)n+=Math.random().toString(32).substr(2);Ep()(n)},e.player.app.ticker.add(t))})},r.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.target.removeChild(this.gui.domElement),this.gui.destroy()}catch{}},r}(),wO=function(){function r(t){var e=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){e.isScheduling=!0;var i=e.tasks.shift();i&&!e.isDestroy&&e.fn(i).then(function(){e.tasks.length>0?window.requestAnimationFrame(e.schedule):e.isScheduling=!1})},this.fn=t}return r.prototype.destroy=function(){this.isDestroy=!0},r.prototype.addTask=function(t){this.tasks.push(t),this.isScheduling||this.schedule()},r}(),SO=function(){function r(t){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=t}return r.prototype.addLock=function(t,e){var i=this;this.available&&(this.locks[t]=e,this.autoUnlock[t]=window.setTimeout(function(){delete i.locks[t]},3e3))},r.prototype.unlock=function(t,e){this.available&&e&&this.locks[t]&&this.locks[t]===e&&(window.clearTimeout(this.autoUnlock[t]),delete this.locks[t])},r.prototype.isLocked=function(t){return!!this.available&&!!this.locks[t]},r}(),TO=function(){function r(){var t=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){t.isScheduling=!0;var e=t.tasks.shift();e&&!t.isDestroy&&(e.status="running",e.fn.apply(null).then(function(){t.tasks.length>0?window.requestAnimationFrame(t.schedule):t.isScheduling=!1}).catch(function(){t.tasks.length>0?window.requestAnimationFrame(t.schedule):t.isScheduling=!1}))}}return r.prototype.getRunningTask=function(){return this.tasks[0]&&this.tasks[0].status==="running"?this.tasks[0]:null},r.prototype.addTask=function(t,e){var i={type:t,status:"wait",fn:e},n=this.getRunningTask();n&&t===n.type||(this.tasks=this.tasks.filter(function(o){return o.type!==t}),this.tasks.push(i),this.isScheduling||this.schedule())},r.prototype.destroy=function(){this.isDestroy=!0},r}(),EO=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})},MO=function(r,t){var e,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(n=2&h[0]?i.return:h[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,h[1])).done)return n;switch(i=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,i=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){s=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){s.label=h[1];break}if(h[0]===6&&s.label<n[1]){s.label=n[1],n=h;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(h);break}n[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(d){h=[6,d],i=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,u])}}};function AO(r,t,e){return EO(this,void 0,void 0,function(){var i,n,o,s;return MO(this,function(a){switch(a.label){case 0:return i=document.createElement("div"),(n=new Fg({anchor:i,renderOptions:{minFPS:1,maxFPS:1,resolution:1},mode:"local",interactive:!1})).setResource(r,t),[4,n.getSlideCountAsync()];case 1:if(o=a.sent(),e)return[3,6];s=1,a.label=2;case 2:return s<=o?[4,n.player.stagePool.preload(s,!0)]:[3,5];case 3:a.sent(),a.label=4;case 4:return s++,[3,2];case 5:return[3,6];case 6:return n.destroy(),[2]}})})}var RO=function(){var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])})(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),Up=function(){return(Up=Object.assign||function(r){for(var t,e=1,i=arguments.length;e<i;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}).apply(this,arguments)},CO=function(r,t,e,i){var n,o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(n=r[a])&&(s=(o<3?n(s):o>3?n(t,e,s):n(t,e))||s);return o>3&&s&&Object.defineProperty(t,e,s),s},po=function(r,t,e,i){return new(e||(e=Promise))(function(n,o){function s(u){try{l(i.next(u))}catch(h){o(h)}}function a(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){var h;u.done?n(u.value):(h=u.value,h instanceof e?h:new e(function(d){d(h)})).then(s,a)}l((i=i.apply(r,t||[])).next())})},fo=function(r,t){var e,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(n=2&h[0]?i.return:h[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,h[1])).done)return n;switch(i=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return s.label++,{value:h[1],done:!1};case 5:s.label++,i=h[1],h=[0];continue;case 7:h=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){s=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){s.label=h[1];break}if(h[0]===6&&s.label<n[1]){s.label=n[1],n=h;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(h);break}n[2]&&s.ops.pop(),s.trys.pop();continue}h=t.call(r,s)}catch(d){h=[6,d],i=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,u])}}},PO=window.ResizeObserver||iO,ry=function(r){return new Promise(function(t){return setTimeout(t,r)})};function IO(r,t){return po(this,void 0,void 0,function(){var e;return fo(this,function(i){switch(i.label){case 0:e=Date.now(),i.label=1;case 1:return!r()&&Date.now()-e<t?[4,ry(50)]:[3,3];case 2:return i.sent(),[3,1];case 3:return[2]}})})}var Jr={syncDispatch:"syncDispatch",syncReceive:"syncReceive",syncEventLag:"syncEventLag",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd",stateChange:"stateChange"},OT={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,mediaState:Object.create(null),interactiveSeqState:Object.create(null)},oy="";try{oy="0.6.3"}catch{oy="development"}var Il=null;try{Il=ht.createInstance({name:"__slide_local_log__",driver:ht.INDEXEDDB,version:1})}catch{}var Fg=function(r){function t(i){var n=r.call(this)||this;return n.iosResetCache=[],n.needClearCacheImage=!1,n.version=oy,n.__slideState=Object(W.cloneDeep)(OT),n.userInputTime=0,n.isSyncingSlideState=!1,n.frozenTaskManager=new TO,n.randomId=Math.random().toString(32).substr(2),n.resize=!1,n.isAnimating=!1,n.renderingTaskManager=new sO,n.isLoading=!1,n.interactive=!0,n.renderingIndex=0,n.frameWidth=1,n.frameHeight=1,n.frame=document.createElement("div"),n.medianController=document.createElement("div"),n.frameResizeObserver=new PO(function(){return n.frameResizeHandler()}),n.timestamp=function(){return Date.now()},n.mode="local",n.enableGlobalClick=!1,n.lastEmitedState=null,n.playerController=null,n.isInitResized=!1,n.cacheImage=document.createElement("img"),n.isTouchStart=!1,n.touchStartId=void 0,n.taskId="",n.volumeAdjuster=new VL,n.designWidth=0,n.designHeight=0,n._slideCount=0,n._dispatchIncrId=0,n._receiveIncrId=0,n.userInputHandle=function(){n.userInputTime=Date.now()},n.handleViewClick=function(){setTimeout(function(){var o=Date.now();Math.abs(o-n.userInputTime)>500&&n.enableGlobalClick&&n.nextStep()})},n.handleViewTouchStart=function(){window.clearTimeout(n.touchStartId),n.isTouchStart=!0,n.touchStartId=setTimeout(function(){n.isTouchStart=!1},350)},n.handleViewTouchEnd=function(){n.isTouchStart&&(n.isTouchStart=!1,n.handleViewClick())},n.handleSlideRef=function(){console.log(n),window.__slide=n},n.receiveSyncHandler=function(o){return po(n,void 0,void 0,function(){var s,a,l,u,h=this;return fo(this,function(d){switch(d.label){case 0:return Object(W.isNumber)(o.incrId)&&(o.incrId&&o.incrId-this._receiveIncrId!=1&&this.emit(Jr.syncEventLag),this._receiveIncrId=o.incrId||0),this.logger.info("sync receive "+JSON.stringify(o),this.taskId),o.type!=="nextStep"?[3,1]:(this.mainSeqStep!==o.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(o.next,"start"),this.player.nextTick(function(){h.doNextStep(!0)})):this.doNextStep(!0),[3,6]);case 1:return o.type!=="prevStep"?[3,2]:(this.mainSeqStep===0&&this.mainSeqState==="idle"||this.mainSeqStep===o.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(o.next+1,"start"),(s=this.player)===null||s===void 0||s.nextTick(function(){h.doPrevStep(!0)})),[3,6]);case 2:return o.type!=="interactiveAnim"?[3,3]:(this.player?this.player.applyInteractiveAction(o.action):this.__slideState.interactiveSeqState[o.seqId].step+=1,[3,6]);case 3:return o.type!=="renderSlide"?[3,5]:[4,this.doRenderSlide(o.index,o.isForward)];case 4:return d.sent(),[3,6];case 5:o.type==="mediaPlay"?((a=this.player)===null||a===void 0||a.setMediaState(o.id,!0),this.__slideState.mediaState[o.id]=o.state):o.type==="mediaPause"?((l=this.player)===null||l===void 0||l.setMediaState(o.id,!1),this.__slideState.mediaState[o.id]=o.state):o.type==="mediaSeek"&&((u=this.player)===null||u===void 0||u.setMediaCurrentTime(o.id,o.time),this.__slideState.mediaState[o.id]=o.state),d.label=6;case 6:return[2]}})})},n.handlePrevSlide=function(o){return o===void 0&&(o=!1),po(n,void 0,void 0,function(){var s,a;return fo(this,function(l){switch(l.label){case 0:return this.player?[4,(a=this.player)===null||a===void 0?void 0:a.createSnapshotForNextSlide(!0)]:[2];case 1:return l.sent(),(s=this.player.prevSlideIndex)>=1&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(s):o?this.doRenderSlide(s,!1):this.renderSlide(s,!1)),[2]}})})},n.handleNextSlide=function(o){return o===void 0&&(o=!1),po(n,void 0,void 0,function(){var s,a;return fo(this,function(l){switch(l.label){case 0:return this.player?[4,(a=this.player)===null||a===void 0?void 0:a.createSnapshotForNextSlide(!1)]:[2];case 1:return l.sent(),(s=this.player.nextSlideIndex)<=this.slideCount&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(s):o?this.doRenderSlide(s,!0):this.renderSlide(s,!0)),[2]}})})},n.handleGotoSlide=function(o){if(o<=n.slideCount&&o>=1){var s=n.slideState.currentSlideIndex<=o;n.renderSlide(o,s)}else o===-1&&n.renderSlide(n.slideCount,!0)},n.config=n.initSlideConfig(i),n.logger={info:function(o,s){var a,l;!((a=n.config.logger)===null||a===void 0)&&a.info&&(t._tempLog+="INFO - "+new Date().toISOString()+" - {"+n.randomId+"}["+s+"] "+o+`
|
|
6356
6356
|
|
|
6357
6357
|
`,(l=n.config.logger)===null||l===void 0||l.info("["+s+"] "+o))},warn:function(o,s){var a,l;!((a=n.config.logger)===null||a===void 0)&&a.warn&&(t._tempLog+="WARN - "+new Date().toISOString()+" - {"+n.randomId+"}["+s+"] "+o+`
|
|
6358
6358
|
|
|
6359
6359
|
`,(l=n.config.logger)===null||l===void 0||l.warn("["+s+"] "+o))},error:function(o,s){var a,l;!((a=n.config.logger)===null||a===void 0)&&a.error&&(t._tempLog+="ERROR - "+new Date().toISOString()+" - {"+n.randomId+"}["+s+"] "+o+`
|
|
6360
6360
|
|
|
6361
|
-
`,(l=n.config.logger)===null||l===void 0||l.error("["+s+"] "+o))}},n.anchor=n.config.anchor,n.syncQueue=new wO(n.receiveSyncHandler),n.lock=new SO(n.mode==="interactive"),n.cacheImage.style.position="absolute",n.cacheImage.style.zIndex="100",n.setMedianControllerAttribute(),n.frame.appendChild(n.medianController),n.frameResizeObserver.observe(n.frame),n.on(Jr.syncReceive,function(o){n.lock.unlock(o.type,o.uuid),n.syncQueue.addTask(o)}),n.renderingTaskManager.eventHub.on("task-error",function(o){var s=o.error,a=o.task,l=Tn.transform(s);l.errorType===cr.RuntimeWarn?n.logger.warn(l.message,n.taskId):n.logger.error(l.message,n.taskId),n.isLoading=!1,n.emit(Jr.renderError,{error:l,index:a.slideIndex})}),window.addEventListener("__slide_ref__",n.handleSlideRef),n.resizeView=Object(V.debounce)(n.resizeView.bind(n),50),n.player=n.initPlayer(n.config),n.config.controller&&n.createController(),n.player.view&&n.frame.appendChild(n.player.view),n.handleViewClick=Object(V.debounce)(n.handleViewClick,300),n.player.errorChannel.on("error",function(o,s){var a=Tn.transform(o);a.errorType===cr.RuntimeWarn?n.logger.warn(a.message,n.taskId):n.logger.error(a.message,n.taskId),n.isLoading=!1,s===n.renderingIndex&&n.emit(Jr.renderError,{error:o,index:s})}),n}var e;return RO(t,r),t.flushLog=function(){return po(this,void 0,void 0,function(){return fo(this,function(i){switch(i.label){case 0:return t._tempLog.length>0?[4,Il==null?void 0:Il.setItem("run_time_log_"+t._tempLogIndex,t._tempLog)]:[3,2];case 1:i.sent(),t._tempLog="",t._tempLogIndex+=1,i.label=2;case 2:return[2]}})})},Object.defineProperty(t.prototype,"dispatchIncrId",{get:function(){return this._dispatchIncrId++},enumerable:!1,configurable:!0}),t.prototype.initSlideConfig=function(i){return i.timestamp&&(this.timestamp=i.timestamp),i.rtcAudio&&(Gn.RtcAudioClazz=i.rtcAudio),this.mode=i.mode,this.anchor=i.anchor,this.anchor.appendChild(this.frame),this.enableGlobalClick=!Object(V.isUndefined)(i.enableGlobalClick)&&i.enableGlobalClick,this.resize=i.resize||!1,this.interactive=i.interactive,this.frame.style.cssText=i.fixedFrameSize?"width:"+i.fixedFrameSize.width+"px;height:"+i.fixedFrameSize.height+"px;":"width:100%;height:100%",this.frame.style.cssText+="display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;",i.fixedFrameSize&&(this.frameWidth=i.fixedFrameSize.width,this.frameHeight=i.fixedFrameSize.height),i},t.prototype.initPlayer=function(i){var n,o,s,a=this,l=new Gn({mode:this.mode,useLocalCache:!!Object(V.isUndefined)(this.config.useLocalCache)||this.config.useLocalCache,logger:this.logger,resourceTimeout:Object(V.isUndefined)(this.config.resourceTimeout)?15e3:this.config.resourceTimeout,loadDelegate:this.config.loaderDelegate,volumeAdjuster:this.volumeAdjuster});return l.setInteractive(this.interactive),l.updateConfig(i.renderOptions||{}),l.on(Ne.renderStart,function(u){a.isLoading=!0,a.emit(Jr.renderStart,u)}),l.on(Ne.renderEnd,function(u){a.isLoading=!1,a.player&&(a.designHeight=a.player.designHeight,a.designWidth=a.player.designWidth,a.cacheImage.style.width=a.player.designWidth+"px",a.cacheImage.style.height=a.player.designHeight+"px",a._slideCount=a.player.slideCount),a.emit(Jr.renderEnd,u)}),l.on(Ne.slideChange,function(u){a.__slideState.currentSlideIndex=u,a.emitStateChange(),a.emit(Jr.slideChange,u)}),l.on(Ne.mainSeqStateChange,function(u){a.__slideState.mainSeqState=u,a.emitStateChange()}),l.on(Ne.mainSeqStepChange,function(u){a.__slideState.mainSeqStep=u,a.emitStateChange()}),l.on(Ne.interactiveSeqStateChange,function(u){var h=u.id,d=u.state;a.__slideState.interactiveSeqState[h]=d,a.emitStateChange()}),l.on(Ne.animateStart,function(){a.isAnimating!==!0&&(a.isAnimating=!0,a.emit(Jr.animateStart))}),l.on(Ne.animateEnd,function(){a.isAnimating!==!1&&(a.isAnimating=!1,a.emit(Jr.animateEnd))}),l.on(Ne.interactiveSeqAction,function(u){var h=u.action,d=u.seqId;a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"interactiveAnim",action:h,seqId:d}),a.emitStateChange()}),l.on(Ne.mainSeqStepStart,function(u){a.emit(Jr.mainSeqStepStart,u)}),l.on(Ne.mainSeqStepEnd,function(u){a.emit(Jr.mainSeqStepEnd,u)}),l.on(Ne.mediaPlay,function(u){var h={type:"play",time:a.timestamp()-1e3*u.time};a.__slideState.mediaState[u.id]=h,a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"mediaPlay",id:u.id,state:h}),a.emitStateChange()}),l.on(Ne.mediaPause,function(u){var h={type:"pause",time:u.time};a.__slideState.mediaState[u.id]=h,a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"mediaPause",id:u.id,state:h}),a.emitStateChange()}),l.on(Ne.mediaSeek,function(u){var h={type:"pause",time:0};u.isPlaying?(h.type="play",a.__slideState.mediaState[u.id]?h.time=a.__slideState.mediaState[u.id].time-1e3*u.time:h.time=a.timestamp()-1e3*u.time,a.__slideState.mediaState[u.id]=h):(h.type="pause",h.time=u.time,a.__slideState.mediaState[u.id]=h),a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"mediaSeek",id:u.id,time:u.time,state:h}),a.emitStateChange()}),l.on(Ne.requestPrevSlide,function(u){a.handlePrevSlide(u)}),l.on(Ne.requestNextSlide,function(u){a.handleNextSlide(u)}),l.on(Ne.requestGotoSlide,function(u){a.config.navigatorDelegate?a.config.navigatorDelegate.gotoPage(u):a.handleGotoSlide(u)}),(n=l.view)===null||n===void 0||n.addEventListener("touchend",this.handleViewTouchEnd),(o=l.view)===null||o===void 0||o.addEventListener("touchstart",this.handleViewTouchStart),(s=l.view)===null||s===void 0||s.addEventListener("click",this.handleViewClick),l.on(Ne.userInput,this.userInputHandle),l},t.prototype.createController=function(){this.player&&(this.playerController=new bO({player:this.player,params:this.player.config||{},target:this.frame}))},t.prototype.setMedianControllerAttribute=function(){this.medianController.className="median-container",this.medianController.style.position="absolute",this.medianController.style.left="0",this.medianController.style.top="0",this.medianController.style.zIndex="2"},t.prototype.frameResizeHandler=function(){if(!this.config.fixedFrameSize){var i=this.frame.getBoundingClientRect(),n=i.width,o=i.height;this.frameWidth=n,this.frameHeight=o,this.resizeView()}},t.prototype.updateFixedFrameSize=function(i,n,o){this.config.fixedFrameSize&&(this.frameWidth=i,this.frameHeight=n,this.frame.style.width=i+"px",this.frame.style.height=n+"px",this.resizeView(o))},t.prototype.resizeView=function(i){var n,o,s=this,a=this.width,l=this.height;if(a>0&&l>0){var u=this.frameWidth/a,h=u*l;h>this.frameHeight&&(u*=this.frameHeight/h),(n=this.player)===null||n===void 0||n.scaleView(u,this.resize,i),this.cacheImage.style.transform="scale("+u+")",this.medianController.style.transform="scale("+u+")",this.medianController.style.top=(this.frameHeight-l*u)/2+"px",this.medianController.setAttribute("data-scale",u.toString()),this.isInitResized||(this.isInitResized=!0,(o=this.player)===null||o===void 0||o.clock.setTimeout(function(){s.frame.style.visibility="visible"},32))}},t.prototype.setSlideState=function(i){var n,o,s;return po(this,void 0,void 0,function(){var a,l=this;return fo(this,function(u){switch(u.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(i),this.taskId),i.taskId&&i.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=i.taskId,(n=this.player)===null||n===void 0||n.setResourceData(i.taskId,this.__slideState.url)),i.url&&i.url!==this.__slideState.url&&(this.__slideState.url=i.url,(o=this.player)===null||o===void 0||o.setResourceData(this.__slideState.taskId,i.url)),Number.isInteger(i.currentSlideIndex)&&i.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=i.currentSlideIndex,[4,this.doRenderSlide(i.currentSlideIndex)]):[3,2];case 1:u.sent(),u.label=2;case 2:return[4,(s=this.player)===null||s===void 0?void 0:s.clock.waitUntil(function(){var h,d;return((h=l.player)===null||h===void 0?void 0:h.currentIndex)===i.currentSlideIndex&&((d=l.player)===null||d===void 0?void 0:d.currentStage)},3e3)];case 3:return u.sent(),a=!1,Number.isInteger(i.mainSeqStep)&&i.mainSeqStep!==this.__slideState.mainSeqStep&&(a=!0,this.__slideState.mainSeqStep=i.mainSeqStep),i.mainSeqState&&i.mainSeqState!==this.__slideState.mainSeqState&&(a=!0,this.__slideState.mainSeqState=i.mainSeqState),a&&this.setMainSeqStep(this.__slideState.mainSeqStep,this.__slideState.mainSeqState==="idle"?"start":"end"),i.mediaState&&(this.initMedia(i),this.__slideState.mediaState=i.mediaState),i.interactiveSeqState&&(this.initInteractiveSeq(i),this.__slideState.interactiveSeqState=i.interactiveSeqState),this.isSyncingSlideState=!1,[2]}})})},t.prototype.initInteractiveSeq=function(i){var n;for(var o in i.interactiveSeqState){var s=i.interactiveSeqState[o];(n=this.player)===null||n===void 0||n.setInteractiveSeqState(o,s.step,s.state==="end"?"end":"start")}},t.prototype.initMedia=function(i){var n,o,s=this,a=function(h){var d=i.mediaState[h],p=l.__slideState.mediaState[h];if(p&&d.type===p.type&&d.time===p.time)return"continue";d.type==="play"?(n=l.player)===null||n===void 0||n.setMediaState(h,!0).then(function(){var m,g=s.timestamp();(m=s.player)===null||m===void 0||m.setMediaCurrentTime(h,(g-d.time)/1e3)}):(o=l.player)===null||o===void 0||o.setMediaState(h,!1).then(function(){var m;(m=s.player)===null||m===void 0||m.setMediaCurrentTime(h,d.time)})},l=this;for(var u in i.mediaState)a(u)},Object.defineProperty(t.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),t.prototype.getSizeAsync=function(){return po(this,void 0,void 0,function(){var i;return fo(this,function(n){switch(n.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,n.sent().json()];case 3:return[2,[(i=n.sent()).width,i.height]];case 4:return n.sent(),[2,[0,0]];case 5:return[2]}})})},t.prototype.getSlideCountAsync=function(){return po(this,void 0,void 0,function(){return fo(this,function(i){switch(i.label){case 0:if(this._slideCount>0)return[2,this._slideCount];i.label=1;case 1:return i.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,i.sent().json()];case 3:return[2,i.sent().slideCount];case 4:return i.sent(),[2,0];case 5:return[2]}})})},Object.defineProperty(t.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqLength",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqStep",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqState",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderOptions",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"drawCall",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderFps",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runtimeFps",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),t.prototype.updateRenderOption=function(i){this.player&&(this.player.updateConfig(i),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},t.prototype.setResource=function(i,n){var o;this.taskId=i,(o=this.player)===null||o===void 0||o.setResourceData(i,n),this.__slideState.taskId=i,this.__slideState.url=n,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:i,url:n})},t.prototype._renderSlide=function(i){var n;return po(this,void 0,void 0,function(){var o=this;return fo(this,function(s){switch(s.label){case 0:return this.renderingIndex=i,this.player&&i===this.player.currentIndex?[2]:((Gn.platform.isIOS()||Gn.platform.isAndroid())&&this.iosResetCache.indexOf(i)<0&&this.iosResetCache.push(i),[4,(n=this.player)===null||n===void 0?void 0:n.renderSlide(i)]);case 1:return s.sent(),this.__slideState.currentSlideIndex=i,this.resizeView(),this.__slideState.interactiveSeqState={},this.emitStateChange(),setTimeout(function(){var a,l;if(((l=(a=o.player)===null||a===void 0?void 0:a.view)===null||l===void 0?void 0:l.style.visibility)==="hidden"&&(o.player.view.style.visibility="visible"),o.frame.style.visibility==="hidden"&&(o.frame.style.visibility="visible"),o.needClearCacheImage)try{o.frame.removeChild(o.cacheImage)}catch{}},100),[2]}})})},t.prototype.renderSlide=function(i,n){if(n===void 0&&(n=!0),this.player){var o=Number(i);(o!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(o>this.slideCount&&this.slideCount>0||this.poseRenderSlide(o,n))}},t.prototype.needCreateNewPlayer=function(){var i=Gn.platform.isLowGpuMemory()?15:30;return(Gn.platform.isIOS()||Gn.platform.isAndroid())&&this.iosResetCache.length>i},t.prototype.poseRenderSlide=function(i,n){this.mode==="interactive"?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:i,isForward:n}):this.mode==="sync"?(this.doRenderSlide(i,n),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:i,isForward:n})):this.doRenderSlide(i,n)},t.prototype.doRenderSlide=function(i,n){var o,s,a,l=this;if(n===void 0&&(n=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var u=this.player.getSnapshot();this.cacheImage.src=u,this.frame.appendChild(this.cacheImage),this.player.destroy(),(o=this.playerController)===null||o===void 0||o.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,!((s=this.config)===null||s===void 0)&&s.controller&&this.createController(),this.needClearCacheImage=!0,!((a=this==null?void 0:this.player)===null||a===void 0)&&a.view&&(this.player.view.style.visibility="hidden",this.frame.appendChild(this.player.view))}var h=Math.random().toString(32).substr(2);return this.player.isForward=n,this.renderingTaskManager.addTask(function(){return l._renderSlide(i)},i,h),new Promise(function(d){l.renderingTaskManager.eventHub.once("task-end-"+h,d)})},t.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasNextStep()?this.mode==="interactive"?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):this.mode==="sync"?(this.doNextStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep():this.handleNextSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},t.prototype.doNextStep=function(i){if(i===void 0&&(i=!1),this.player){this.player.nextStep(i);var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,this.emitStateChange()}},t.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasPrevStep()?this.mode==="interactive"?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):this.mode==="sync"?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},t.prototype.doPrevStep=function(i){if(i===void 0&&(i=!1),this.player){this.player.prevStep(i);var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,this.emitStateChange()}},t.prototype.isSlideStateReady=function(i){return i.taskId.length>0&&i.url.length>0&&i.currentSlideIndex>0},t.prototype.emitStateChange=function(){if(this.mode!=="local"&&!this.isSyncingSlideState){var i=this.slideState;!Object(V.isEqual)(this.lastEmitedState,i)&&this.isSlideStateReady(i)&&(this.lastEmitedState=i,this.emit(Jr.stateChange,i),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},t.prototype.emitSyncDispatch=function(i){if(!this.lock.isLocked(i.type)){var n=Math.random().toString(32).substr(2);this.lock.addLock(i.type,n);var o=Up(Up({},i),{uuid:n});this.config.mode==="sync"&&(o.incrId=this.dispatchIncrId),this.emit(Jr.syncDispatch,o),this.logger.info("sync dispatch "+JSON.stringify(o),this.taskId)}},t.prototype.setMainSeqStep=function(i,n){var o;(o=this.player)===null||o===void 0||o.setMainSeqStep(i,n)},t.prototype.setInteractive=function(i){var n;this.interactive=i,(n=this.player)===null||n===void 0||n.setInteractive(i)},t.prototype.pause=function(){var i;(i=this.player)===null||i===void 0||i.pause()},t.prototype.resume=function(){var i;(i=this.player)===null||i===void 0||i.resume()},t.prototype._doFrozen=function(){var i;return po(this,void 0,void 0,function(){var n,o,s,a=this;return fo(this,function(l){switch(l.label){case 0:return this.view&&this.player?[4,this.player.clock.waitUntil(function(){return!a.isLoading},6e4)]:[3,2];case 1:for(o in l.sent(),n=this.player.getSnapshot()||"",this.cacheImage.src=n,this.frame.appendChild(this.cacheImage),this.player.destroy(),(i=this.playerController)===null||i===void 0||i.destroy(),this.player=void 0,this.__slideState.mediaState)s=this.__slideState.mediaState[o],this.__slideState.mediaState[o]=Up(Up({},s),{frozenTime:this.timestamp()});l.label=2;case 2:return[2]}})})},t.prototype.frozen=function(){var i=this;this.frozenTaskManager.addTask("frozen",function(){return i._doFrozen()})},t.prototype._doRelease=function(){var i,n;return po(this,void 0,void 0,function(){var o,s,a,l;return fo(this,function(u){switch(u.label){case 0:if(this.player)return[2];for(s in this.player=this.initPlayer(this.config),!((i=this.config)===null||i===void 0)&&i.controller&&this.createController(),this.player.view&&(this.frame.appendChild(this.player.view),this.player.view.style.visibility="hidden"),o=this.__slideState,this.__slideState=Object(V.cloneDeep)(OT),o.mediaState)(a=o.mediaState[s]).type==="play"&&(l=Math.max((n=a.frozenTime)!==null&&n!==void 0?n:0,a.time),a.time=this.timestamp()-(l-a.time),a.frozenTime=void 0);return[4,this.setSlideState(o)];case 1:return u.sent(),[4,this.player.clock.delay(333)];case 2:u.sent(),this.player.view&&(this.player.view.style.visibility="visible");try{this.frame.removeChild(this.cacheImage)}catch{}return[2]}})})},t.prototype.release=function(){var i=this;this.frozenTaskManager.addTask("release",function(){return i._doRelease()})},t.prototype._doDestroy=function(){var i,n,o,s;this.logger.info("do destroy slide",""),this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),(i=this.player)===null||i===void 0||i.removeAllListeners(),(n=this.player)===null||n===void 0||n.destroy(),(o=this.player)===null||o===void 0||o.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),this.removeAllListeners();try{!((s=this.player)===null||s===void 0)&&s.view&&this.anchor.removeChild(this.player.view),this.anchor.removeChild(this.frame)}catch{}},t.prototype.waitLoadEnd=function(){return po(this,void 0,void 0,function(){var i;return fo(this,function(n){switch(n.label){case 0:i=0,n.label=1;case 1:return this.isLoading&&i<10?[4,ry(100)]:[3,3];case 2:return n.sent(),i+=1,[3,1];case 3:return[2]}})})},t.prototype.preload=function(i){return this.player?this.player.preload(i):Promise.resolve()},t.prototype.destroy=function(){var i=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then(function(){i._doDestroy()}):this._doDestroy()},t.prototype.clearSlideCache=function(){var i;(i=this.player)===null||i===void 0||i.clearLocalCache()},t.prototype.hasNextStep=function(){if(!this.player)return!1;var i=this.player.currentIndex===this.slideCount,n=this.mainSeqLength===0||this.mainSeqStep>=this.mainSeqLength-1,o=this.mainSeqState==="end"||this.mainSeqState==="running"||this.mainSeqState==null;return!(i&&n&&o)},t.prototype.hasPrevStep=function(){if(!this.player)return!1;var i=this.player.currentIndex===1,n=this.mainSeqLength===0||this.mainSeqStep===0,o=this.mainSeqState==="idle"||this.mainSeqState===null;return!(i&&n&&o)},t.prototype.updateGlobalVolume=function(i){this.volumeAdjuster.volume=i},t.prototype.getGlobalVolume=function(){return this.volumeAdjuster.volume},t.clearLocalCache=function(){Gn.clearLocalCache()},t.disposeLocalCache=function(){},t._tempLog="",t._tempLogIndex=1,t.usePlugin=WL,t.handleLogDownload=function(){return po(void 0,void 0,void 0,function(){var i,n,o,s,a,l,u;return fo(this,function(h){switch(h.label){case 0:return i="",Il?[4,Il.keys()]:[3,5];case 1:n=(h.sent()||[]).sort(function(d,p){return parseInt(d.replace("run_time_log_",""))-parseInt(p.replace("run_time_log_",""))}),o=0,s=n,h.label=2;case 2:return o<s.length?(a=s[o],l=i,[4,Il.getItem(a)]):[3,5];case 3:i=l+(h.sent()||""),h.label=4;case 4:return o++,[3,2];case 5:return(u=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(i)),u.setAttribute("download","slide_log"),u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),window.__slideLogText=i,[2]}})})},CO([(e="Slide.initConfig",function(i,n,o){var s=o.value;o.value=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];for(var u=z_.get(e)||[],h=a,d=0,p=u;d<p.length;d++){var m=p[d];try{h=m.before(h)}catch{}if(!Array.isArray(h)||h.length!==a.length)throw new Error("plugin before hook return invalid args")}for(var g=s.bind(this).apply(void 0,h),_=0,y=u.reverse();_<y.length;_++){m=y[_];try{g=m.after(g)}catch{}if(!g)throw new Error("plugin after hook return undefined result")}return g}})],t.prototype,"initSlideConfig",null),t}(P.a);Il==null||Il.clear(),window.addEventListener("__slide_log__",Fg.handleLogDownload),window.setInterval(function(){Fg.flushLog().catch(function(){})},9e3)}]);const vo="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",qT=87,YT=20,uy=[],$T=()=>{for(let T=0;T<YT;T++)uy[T]=vo.charAt(Math.random()*qT);return uy.join("")};function hy(T){try{return T()}catch(M){console.error(M)}}class kc{constructor(){this.push=this.addDisposer,this.disposers=new Map}addDisposer(M,v=this.genUID()){return this.flush(v),this.disposers.set(v,Array.isArray(M)?JT(M):M),v}add(M,v=this.genUID()){const b=M();return b?this.addDisposer(b,v):v}addEventListener(M,v,b,q,ht=this.genUID()){return M.addEventListener(v,b,q),this.addDisposer(()=>M.removeEventListener(v,b,q),ht),ht}setTimeout(M,v,b=this.genUID()){const q=window.setTimeout(()=>{this.remove(b),M()},v);return this.addDisposer(()=>window.clearTimeout(q),b)}setInterval(M,v,b=this.genUID()){const q=window.setInterval(M,v);return this.addDisposer(()=>window.clearInterval(q),b)}remove(M){const v=this.disposers.get(M);return this.disposers.delete(M),v}flush(M){const v=this.remove(M);v&&v()}flushAll(){this.disposers.forEach(hy),this.disposers.clear()}genUID(){let M;do M=$T();while(this.disposers.has(M));return M}}function JT(T){return()=>T.forEach(hy)}function cy(T,M,v){return Math.min(Math.max(T,M),v)}function ZT(T){return typeof T=="object"&&T!==null}var dy={exports:{}},KT={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},py={exports:{}},QT=function(M){return!M||typeof M=="string"?!1:M instanceof Array||Array.isArray(M)||M.length>=0&&(M.splice instanceof Function||Object.getOwnPropertyDescriptor(M,M.length-1)&&M.constructor.name!=="String")},tE=QT,eE=Array.prototype.concat,iE=Array.prototype.slice,fy=py.exports=function(M){for(var v=[],b=0,q=M.length;b<q;b++){var ht=M[b];tE(ht)?v=eE.call(v,iE.call(ht)):v.push(ht)}return v};fy.wrap=function(T){return function(){return T(fy(arguments))}};var Uc=KT,Gc=py.exports,my=Object.hasOwnProperty,gy=Object.create(null);for(var kg in Uc)my.call(Uc,kg)&&(gy[Uc[kg]]=kg);var Qr=dy.exports={to:{},get:{}};Qr.get=function(T){var M=T.substring(0,3).toLowerCase(),v,b;switch(M){case"hsl":v=Qr.get.hsl(T),b="hsl";break;case"hwb":v=Qr.get.hwb(T),b="hwb";break;default:v=Qr.get.rgb(T),b="rgb";break}return v?{model:b,value:v}:null},Qr.get.rgb=function(T){if(!T)return null;var M=/^#([a-f0-9]{3,4})$/i,v=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,b=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,q=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ht=/^(\w+)$/,W=[0,0,0,1],P,V,z;if(P=T.match(v)){for(z=P[2],P=P[1],V=0;V<3;V++){var k=V*2;W[V]=parseInt(P.slice(k,k+2),16)}z&&(W[3]=parseInt(z,16)/255)}else if(P=T.match(M)){for(P=P[1],z=P[3],V=0;V<3;V++)W[V]=parseInt(P[V]+P[V],16);z&&(W[3]=parseInt(z+z,16)/255)}else if(P=T.match(b)){for(V=0;V<3;V++)W[V]=parseInt(P[V+1],0);P[4]&&(P[5]?W[3]=parseFloat(P[4])*.01:W[3]=parseFloat(P[4]))}else if(P=T.match(q)){for(V=0;V<3;V++)W[V]=Math.round(parseFloat(P[V+1])*2.55);P[4]&&(P[5]?W[3]=parseFloat(P[4])*.01:W[3]=parseFloat(P[4]))}else return(P=T.match(ht))?P[1]==="transparent"?[0,0,0,0]:my.call(Uc,P[1])?(W=Uc[P[1]],W[3]=1,W):null:null;for(V=0;V<3;V++)W[V]=Na(W[V],0,255);return W[3]=Na(W[3],0,1),W},Qr.get.hsl=function(T){if(!T)return null;var M=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,v=T.match(M);if(v){var b=parseFloat(v[4]),q=(parseFloat(v[1])%360+360)%360,ht=Na(parseFloat(v[2]),0,100),W=Na(parseFloat(v[3]),0,100),P=Na(isNaN(b)?1:b,0,1);return[q,ht,W,P]}return null},Qr.get.hwb=function(T){if(!T)return null;var M=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,v=T.match(M);if(v){var b=parseFloat(v[4]),q=(parseFloat(v[1])%360+360)%360,ht=Na(parseFloat(v[2]),0,100),W=Na(parseFloat(v[3]),0,100),P=Na(isNaN(b)?1:b,0,1);return[q,ht,W,P]}return null},Qr.to.hex=function(){var T=Gc(arguments);return"#"+Vp(T[0])+Vp(T[1])+Vp(T[2])+(T[3]<1?Vp(Math.round(T[3]*255)):"")},Qr.to.rgb=function(){var T=Gc(arguments);return T.length<4||T[3]===1?"rgb("+Math.round(T[0])+", "+Math.round(T[1])+", "+Math.round(T[2])+")":"rgba("+Math.round(T[0])+", "+Math.round(T[1])+", "+Math.round(T[2])+", "+T[3]+")"},Qr.to.rgb.percent=function(){var T=Gc(arguments),M=Math.round(T[0]/255*100),v=Math.round(T[1]/255*100),b=Math.round(T[2]/255*100);return T.length<4||T[3]===1?"rgb("+M+"%, "+v+"%, "+b+"%)":"rgba("+M+"%, "+v+"%, "+b+"%, "+T[3]+")"},Qr.to.hsl=function(){var T=Gc(arguments);return T.length<4||T[3]===1?"hsl("+T[0]+", "+T[1]+"%, "+T[2]+"%)":"hsla("+T[0]+", "+T[1]+"%, "+T[2]+"%, "+T[3]+")"},Qr.to.hwb=function(){var T=Gc(arguments),M="";return T.length>=4&&T[3]!==1&&(M=", "+T[3]),"hwb("+T[0]+", "+T[1]+"%, "+T[2]+"%"+M+")"},Qr.to.keyword=function(T){return gy[T.slice(0,3)]};function Na(T,M,v){return Math.min(Math.max(M,T),v)}function Vp(T){var M=Math.round(T).toString(16).toUpperCase();return M.length<2?"0"+M:M}var nE=dy.exports;class rE{constructor(M){this.enable=M,this.apps={},this.level="debug",this.roomLogger=null,this._onMessage=v=>{let b;v instanceof CustomEvent?b=v.detail:ZT(v.data)&&(b=v.data),b&&(typeof b.slide=="boolean"?this.enable=b.slide:b.slide==="__instance"?console.log(this):b.slide==="__debug"&&Object.values(this.apps).forEach(q=>{var ht,W;(W=(ht=q.controller)==null?void 0:ht.slide)==null||W.createController()}))},this.initialize()}setAppContext(M,v){var b;((b=this.apps)[M]||(b[M]={})).context=v,this.log(`[Slide] new ${M}`)}setAppController(M,v){var b;((b=this.apps)[M]||(b[M]={})).controller=v}deleteApp(M){delete this.apps[M],this.log(`[Slide] delete ${M}`)}initialize(){window.addEventListener("message",this._onMessage)}dispose(){window.removeEventListener("message",this._onMessage)}log(...M){this.roomLogger?this.roomLogger.info(...M):this.enable&&console.log(...M)}verbose(...M){this.roomLogger?this.roomLogger.debug(...M):this.enable&&this.level==="verbose"&&console.log(...M)}warn(...M){this.roomLogger?this.roomLogger.warn(...M):console.warn(...M)}}const _o=new rE(!1),zn=_o.log.bind(_o),Ug=_o.verbose.bind(_o),oE=T=>{_o.roomLogger=T.logger};function vy(T){try{const M=window.getComputedStyle(T).backgroundColor;if(M!=="rgba(0, 0, 0, 0)"&&M!=="transparent")return M;if(T.parentElement)return vy(T.parentElement)}catch{}return"#ffffff"}function sE(T){const M=nE.get(T);if(M&&M.model==="rgb"){const v=M.value,q=(((Math.round(v[0])&255)<<16)+((Math.round(v[1])&255)<<8)+(Math.round(v[2])&255)).toString(16);return"#"+"000000".substring(q.length)+q}else return T}let Wp="";function _y(T){return Wp||(Wp=sE(vy(T)),zn("[Slide] guess bg color",Wp)),Wp}function yy(T){const{width:M,height:v,slideCount:b,slideState:q}=T,{taskId:ht,url:W}=q,P=[];for(let V=1;V<=b;++V)P.push({width:M,height:v,thumbnail:`${W}/${ht}/preview/${V}.png`,src:"ppt"});return P}function xy(T,M,v,b){var P;const q=v.slideState.currentSlideIndex;if(!(q>0)||!M.getIsWritable())return;const ht=[b,q].join("/");if(T.scenePathType(ht)!=="page"){T.removeScenes(b);const V=v.slideCount,z=[];for(let k=1;k<=V;++k)z.push({name:`${k}`});T.putScenes(b,z)}let W;M.getBox().focus?W=T.state.sceneState.scenePath:W=((P=M.getView())==null?void 0:P.focusScenePath)||"",W!==ht&&M.setScenePath(ht)}const Gg="https://convertcdn.netless.link/dynamicConvert",aE=40,Hg={taskId:"",url:"",state:null};class lE{constructor({context:M,anchor:v,onPageChanged:b,onTransitionStart:q,onTransitionEnd:ht,onError:W}){this.sideEffect=new kc,this.ready=!1,this.readyPromise=new Promise(P=>{this.resolveReady=()=>{this.ready?zn("[Slide] render end"):setTimeout(()=>{this.ready=!0,P()},1e3)}}),this.onSyncDispatch=P=>{if(this.context.getIsWritable()&&this.room){const V={type:yi.SLIDE_EVENTS.syncDispatch,payload:P};Ug("[Slide] dispatch",JSON.stringify(P)),this.context.dispatchMagixEvent(yi.SLIDE_EVENTS.syncDispatch,V)}},this.magixEventListener=P=>{const{type:V,payload:z}=P.payload;V===yi.SLIDE_EVENTS.syncDispatch&&(this.syncStateOnce(),Ug("[Slide] receive",JSON.stringify(z)),this.slide.emit(yi.SLIDE_EVENTS.syncReceive,z))},this.onStateChange=P=>{this.context.getIsWritable()&&(Ug("[Slide] state change",JSON.stringify(P,null,2)),this.context.storage.setState({state:P}))},this.pollCount=0,this.pollReadyState=()=>{this.ready?this._toFreeze===1?this.freeze():this._toFreeze===-1&&this.unfreeze():this.pollCount<aE?(this.pollCount++,setTimeout(this.pollReadyState,500)):(this.pollCount=0,zn("[Slide] renderSlide 1 (retry after timeout)"),this.slide.renderSlide(1))},this._pageCount=0,this.destroyed=!1,this.timestamp=()=>this.room&&this.room.calibrationTimestamp?this.room.calibrationTimestamp:this.player?this.player.beginTimestamp+this.player.progressTime:Date.now(),this.isFrozen=!1,this._toFreeze=0,this.freeze=()=>{this.isFrozen=!0,this.ready?(zn("[Slide] freeze",this.context.appId),this.slide.frozen()):this._toFreeze=1},this.unfreeze=async()=>{!this.visible||(this.isFrozen=!1,this.ready?(zn("[Slide] unfreeze",this.context.appId),this.slide.release()):this._toFreeze=-1)},this.onVisibilityChange=async()=>{(this.visible=document.visibilityState==="visible")?(zn("[Slide] unfreeze because tab becomes visible",{savedIsFrozen:this.savedIsFrozen}),this.savedIsFrozen||this.unfreeze()):(this.savedIsFrozen=this.isFrozen,zn("[Slide] freeze because tab becomes invisible"),this.freeze())},this.onPageChanged=b,this.onTransitionStart=q,this.onTransitionEnd=ht,this.onError=W,this.context=M,this.room=M.getRoom(),this.player=this.room?void 0:M.getDisplayer(),oE(this.room||this.player),this.slide=this.createSlide(v),this.syncStateOnceFlag=!this.context.isAddApp,this.visible=document.visibilityState==="visible",this.savedIsFrozen=!1,this.initialize()}jumpToPage(M){this.ready&&(M=cy(M,1,this.pageCount),this.slide.renderSlide(M))}initialize(){this.registerEventListeners(),this.kickStart()}kickStart(){const{context:M,slide:v}=this;M.getIsWritable()&&M.storage.ensureState(Hg);const{taskId:b,url:q,state:ht}=M.storage.state;v.setResource(b,q||Gg),ht?(zn("[Slide] init with state",JSON.stringify(ht)),this.syncStateOnceFlag=!1,v.setSlideState(ht)):M.isAddApp&&(zn("[Slide] init by renderSlide",1),v.renderSlide(1)),this.pollReadyState()}registerEventListeners(){const{context:M,slide:v}=this,b=this.sideEffect.addDisposer(M.storage.addStateChangedListener(()=>{M.storage.state.state&&(this.syncStateOnce(),this.sideEffect.flush(b))}));this.sideEffect.add(()=>M.addMagixEventListener(yi.SLIDE_EVENTS.syncDispatch,this.magixEventListener,{fireSelfEventAfterCommit:!0})),v.on(yi.SLIDE_EVENTS.slideChange,this.onPageChanged),v.on(yi.SLIDE_EVENTS.renderStart,this.onTransitionStart),v.on(yi.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),v.on(yi.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),v.on(yi.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),v.on(yi.SLIDE_EVENTS.renderError,this.onError),v.on(yi.SLIDE_EVENTS.stateChange,this.onStateChange),v.on(yi.SLIDE_EVENTS.syncDispatch,this.onSyncDispatch),v.on(yi.SLIDE_EVENTS.renderEnd,this.resolveReady),this.sideEffect.add(()=>(document.addEventListener("visibilitychange",this.onVisibilityChange),()=>document.removeEventListener("visibilitychange",this.onVisibilityChange)))}syncStateOnce(){if(this.syncStateOnceFlag){this.context.getIsWritable()&&this.context.storage.ensureState(Hg);const{state:M}=this.context.storage.state;M&&(zn("[Slide] sync with state (once)",JSON.stringify(M)),this.slide.setSlideState(M),this.syncStateOnceFlag=!1)}}get pageCount(){return this._pageCount>0?this._pageCount:(this._pageCount=this.slide.slideCount,this._pageCount)}get page(){return this.slide.slideState.currentSlideIndex}createSlide(M){var q,ht;const v=this.context.getAppOptions()||{};return new yi.Slide({anchor:M,interactive:!0,mode:"interactive",resize:!0,controller:_o.enable,enableGlobalClick:!0,renderOptions:{minFPS:v.minFPS||25,maxFPS:v.maxFPS||30,autoFPS:(q=v.autoFPS)!=null?q:!0,autoResolution:(ht=v.autoResolution)!=null?ht:!0,resolution:v.resolution,transactionBgColor:v.bgColor||_y(M),maxResolutionLevel:v.maxResolutionLevel},fixedFrameSize:v.fixedFrameSize,loaderDelegate:v.loaderDelegate,navigatorDelegate:v.navigatorDelegate,resourceTimeout:v.resourceTimeout,rtcAudio:v.rtcAudio,useLocalCache:v.useLocalCache,logger:v.logger,timestamp:this.timestamp})}destroy(){this.sideEffect.flushAll(),this.destroyed||(zn("[Slide] destroy slide (once)"),this.slide.destroy(),this.destroyed=!0)}}function uE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-sidebar`),v.setAttribute("viewBox","0 0 64 64");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),v.appendChild(b),v}function hE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-arrow-left`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),v.appendChild(b),v}function cE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-arrow-right`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),v.appendChild(b),v}function dE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-play`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),v.appendChild(b),v}function pE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-pause`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),v.appendChild(b),v}const Da=typeof window!="undefined",by=Da&&!("onscroll"in window)||typeof navigator!="undefined"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),wy=Da&&"IntersectionObserver"in window,Sy=Da&&"classList"in document.createElement("p"),Ty=Da&&window.devicePixelRatio>1,fE={elements_selector:".lazy",container:by||Da?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},Ey=T=>Object.assign({},fE,T),My=function(T,M){let v;const b="LazyLoad::Initialized",q=new T(M);try{v=new CustomEvent(b,{detail:{instance:q}})}catch{v=document.createEvent("CustomEvent"),v.initCustomEvent(b,!1,!1,{instance:q})}window.dispatchEvent(v)},mE=(T,M)=>{if(!!M)if(!M.length)My(T,M);else for(let v=0,b;b=M[v];v+=1)My(T,b)},Vs="src",zg="srcset",jg="sizes",Ay="poster",Hc="llOriginalAttrs",Ry="data",Vg="loading",Cy="loaded",Py="applied",gE="entered",Wg="error",Iy="native",Ly="data-",Oy="ll-status",kr=(T,M)=>T.getAttribute(Ly+M),vE=(T,M,v)=>{var b=Ly+M;if(v===null){T.removeAttribute(b);return}T.setAttribute(b,v)},zc=T=>kr(T,Oy),Ll=(T,M)=>vE(T,Oy,M),Xp=T=>Ll(T,null),Xg=T=>zc(T)===null,_E=T=>zc(T)===Vg,yE=T=>zc(T)===Wg,qg=T=>zc(T)===Iy,xE=[Vg,Cy,Py,Wg],bE=T=>xE.indexOf(zc(T))>=0,Fa=(T,M,v,b)=>{if(!!T){if(b!==void 0){T(M,v,b);return}if(v!==void 0){T(M,v);return}T(M)}},Wu=(T,M)=>{if(Sy){T.classList.add(M);return}T.className+=(T.className?" ":"")+M},hs=(T,M)=>{if(Sy){T.classList.remove(M);return}T.className=T.className.replace(new RegExp("(^|\\s+)"+M+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},wE=T=>{T.llTempImage=document.createElement("IMG")},SE=T=>{delete T.llTempImage},Ny=T=>T.llTempImage,qp=(T,M)=>{if(!M)return;const v=M._observer;!v||v.unobserve(T)},TE=T=>{T.disconnect()},EE=(T,M,v)=>{M.unobserve_entered&&qp(T,v)},Yg=(T,M)=>{!T||(T.loadingCount+=M)},ME=T=>{!T||(T.toLoadCount-=1)},Dy=(T,M)=>{!T||(T.toLoadCount=M)},AE=T=>T.loadingCount>0,RE=T=>T.toLoadCount>0,Fy=T=>{let M=[];for(let v=0,b;b=T.children[v];v+=1)b.tagName==="SOURCE"&&M.push(b);return M},$g=(T,M)=>{const v=T.parentNode;if(!v||v.tagName!=="PICTURE")return;Fy(v).forEach(M)},By=(T,M)=>{Fy(T).forEach(M)},Yp=[Vs],ky=[Vs,Ay],jc=[Vs,zg,jg],Uy=[Ry],$p=T=>!!T[Hc],Gy=T=>T[Hc],Hy=T=>delete T[Hc],Xu=(T,M)=>{if($p(T))return;const v={};M.forEach(b=>{v[b]=T.getAttribute(b)}),T[Hc]=v},CE=T=>{$p(T)||(T[Hc]={backgroundImage:T.style.backgroundImage})},PE=(T,M,v)=>{if(!v){T.removeAttribute(M);return}T.setAttribute(M,v)},Ol=(T,M)=>{if(!$p(T))return;const v=Gy(T);M.forEach(b=>{PE(T,b,v[b])})},IE=T=>{if(!$p(T))return;const M=Gy(T);T.style.backgroundImage=M.backgroundImage},zy=(T,M,v)=>{Wu(T,M.class_applied),Ll(T,Py),v&&(M.unobserve_completed&&qp(T,M),Fa(M.callback_applied,T,v))},jy=(T,M,v)=>{Wu(T,M.class_loading),Ll(T,Vg),v&&(Yg(v,1),Fa(M.callback_loading,T,v))},Ba=(T,M,v)=>{!v||T.setAttribute(M,v)},Vy=(T,M)=>{Ba(T,jg,kr(T,M.data_sizes)),Ba(T,zg,kr(T,M.data_srcset)),Ba(T,Vs,kr(T,M.data_src))},LE=(T,M)=>{$g(T,v=>{Xu(v,jc),Vy(v,M)}),Xu(T,jc),Vy(T,M)},OE=(T,M)=>{Xu(T,Yp),Ba(T,Vs,kr(T,M.data_src))},NE=(T,M)=>{By(T,v=>{Xu(v,Yp),Ba(v,Vs,kr(v,M.data_src))}),Xu(T,ky),Ba(T,Ay,kr(T,M.data_poster)),Ba(T,Vs,kr(T,M.data_src)),T.load()},DE=(T,M)=>{Xu(T,Uy),Ba(T,Ry,kr(T,M.data_src))},FE=(T,M,v)=>{const b=kr(T,M.data_bg),q=kr(T,M.data_bg_hidpi),ht=Ty&&q?q:b;!ht||(T.style.backgroundImage=`url("${ht}")`,Ny(T).setAttribute(Vs,ht),jy(T,M,v))},BE=(T,M,v)=>{const b=kr(T,M.data_bg_multi),q=kr(T,M.data_bg_multi_hidpi),ht=Ty&&q?q:b;!ht||(T.style.backgroundImage=ht,zy(T,M,v))},kE=(T,M,v)=>{const b=kr(T,M.data_bg_set);if(!b)return;const q=b.split("|");let ht=q.map(W=>`image-set(${W})`);T.style.backgroundImage=ht.join(),T.style.backgroundImage===""&&(ht=q.map(W=>`-webkit-image-set(${W})`),T.style.backgroundImage=ht.join()),zy(T,M,v)},Wy={IMG:LE,IFRAME:OE,VIDEO:NE,OBJECT:DE},UE=(T,M)=>{const v=Wy[T.tagName];!v||v(T,M)},GE=(T,M,v)=>{const b=Wy[T.tagName];!b||(b(T,M),jy(T,M,v))},HE=["IMG","IFRAME","VIDEO","OBJECT"],zE=T=>HE.indexOf(T.tagName)>-1,Xy=(T,M)=>{M&&!AE(M)&&!RE(M)&&Fa(T.callback_finish,M)},qy=(T,M,v)=>{T.addEventListener(M,v),T.llEvLisnrs[M]=v},jE=(T,M,v)=>{T.removeEventListener(M,v)},Jg=T=>!!T.llEvLisnrs,VE=(T,M,v)=>{Jg(T)||(T.llEvLisnrs={});const b=T.tagName==="VIDEO"?"loadeddata":"load";qy(T,b,M),qy(T,"error",v)},Zg=T=>{if(!Jg(T))return;const M=T.llEvLisnrs;for(let v in M){const b=M[v];jE(T,v,b)}delete T.llEvLisnrs},Yy=(T,M,v)=>{SE(T),Yg(v,-1),ME(v),hs(T,M.class_loading),M.unobserve_completed&&qp(T,v)},WE=(T,M,v,b)=>{const q=qg(M);Yy(M,v,b),Wu(M,v.class_loaded),Ll(M,Cy),Fa(v.callback_loaded,M,b),q||Xy(v,b)},XE=(T,M,v,b)=>{const q=qg(M);Yy(M,v,b),Wu(M,v.class_error),Ll(M,Wg),Fa(v.callback_error,M,b),v.restore_on_error&&Ol(M,jc),q||Xy(v,b)},Kg=(T,M,v)=>{const b=Ny(T)||T;if(Jg(b))return;VE(b,W=>{WE(W,T,M,v),Zg(b)},W=>{XE(W,T,M,v),Zg(b)})},qE=(T,M,v)=>{wE(T),Kg(T,M,v),CE(T),FE(T,M,v),BE(T,M,v),kE(T,M,v)},YE=(T,M,v)=>{Kg(T,M,v),GE(T,M,v)},Qg=(T,M,v)=>{zE(T)?YE(T,M,v):qE(T,M,v)},$E=(T,M,v)=>{T.setAttribute("loading","lazy"),Kg(T,M,v),UE(T,M),Ll(T,Iy)},$y=T=>{T.removeAttribute(Vs),T.removeAttribute(zg),T.removeAttribute(jg)},JE=T=>{$g(T,M=>{$y(M)}),$y(T)},Jy=T=>{$g(T,M=>{Ol(M,jc)}),Ol(T,jc)},ZE={IMG:Jy,IFRAME:T=>{Ol(T,Yp)},VIDEO:T=>{By(T,M=>{Ol(M,Yp)}),Ol(T,ky),T.load()},OBJECT:T=>{Ol(T,Uy)}},KE=T=>{const M=ZE[T.tagName];if(!M){IE(T);return}M(T)},QE=(T,M)=>{Xg(T)||qg(T)||(hs(T,M.class_entered),hs(T,M.class_exited),hs(T,M.class_applied),hs(T,M.class_loading),hs(T,M.class_loaded),hs(T,M.class_error))},tM=(T,M)=>{KE(T),QE(T,M),Xp(T),Hy(T)},eM=(T,M,v,b)=>{!v.cancel_on_exit||!_E(T)||T.tagName==="IMG"&&(Zg(T),JE(T),Jy(T),hs(T,v.class_loading),Yg(b,-1),Xp(T),Fa(v.callback_cancel,T,M,b))},iM=(T,M,v,b)=>{const q=bE(T);Ll(T,gE),Wu(T,v.class_entered),hs(T,v.class_exited),EE(T,v,b),Fa(v.callback_enter,T,M,b),!q&&Qg(T,v,b)},nM=(T,M,v,b)=>{Xg(T)||(Wu(T,v.class_exited),eM(T,M,v,b),Fa(v.callback_exit,T,M,b))},rM=["IMG","IFRAME","VIDEO"],Zy=T=>T.use_native&&"loading"in HTMLImageElement.prototype,oM=(T,M,v)=>{T.forEach(b=>{rM.indexOf(b.tagName)!==-1&&$E(b,M,v)}),Dy(v,0)},sM=T=>T.isIntersecting||T.intersectionRatio>0,aM=T=>({root:T.container===document?null:T.container,rootMargin:T.thresholds||T.threshold+"px"}),lM=(T,M,v)=>{T.forEach(b=>sM(b)?iM(b.target,b,M,v):nM(b.target,b,M,v))},uM=(T,M)=>{M.forEach(v=>{T.observe(v)})},hM=(T,M)=>{TE(T),uM(T,M)},cM=(T,M)=>{!wy||Zy(T)||(M._observer=new IntersectionObserver(v=>{lM(v,T,M)},aM(T)))},Ky=T=>Array.prototype.slice.call(T),Jp=T=>T.container.querySelectorAll(T.elements_selector),dM=T=>Ky(T).filter(Xg),pM=T=>yE(T),fM=T=>Ky(T).filter(pM),Qy=(T,M)=>dM(T||Jp(M)),mM=(T,M)=>{fM(Jp(T)).forEach(b=>{hs(b,T.class_error),Xp(b)}),M.update()},gM=(T,M)=>{!Da||(M._onlineHandler=()=>{mM(T,M)},window.addEventListener("online",M._onlineHandler))},vM=T=>{!Da||window.removeEventListener("online",T._onlineHandler)},Vc=function(T,M){const v=Ey(T);this._settings=v,this.loadingCount=0,cM(v,this),gM(v,this),this.update(M)};Vc.prototype={update:function(T){const M=this._settings,v=Qy(T,M);if(Dy(this,v.length),by||!wy){this.loadAll(v);return}if(Zy(M)){oM(v,M,this);return}hM(this._observer,v)},destroy:function(){this._observer&&this._observer.disconnect(),vM(this),Jp(this._settings).forEach(T=>{Hy(T)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(T){const M=this._settings;Qy(T,M).forEach(b=>{qp(b,this),Qg(b,M,this)})},restoreAll:function(){const T=this._settings;Jp(T).forEach(M=>{tM(M,T)})}},Vc.load=(T,M)=>{const v=Ey(M);Qg(T,v)},Vc.resetStatus=T=>{Xp(T)},Da&&mE(Vc,window.lazyLoadOptions);class tx{constructor({readonly:M,onNewPageIndex:v,onPlay:b}){this._pages=[],this.pageIndex=0,this.setPaused=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new kc,this.readonly=M,this.onNewPageIndex=v,this.onPlay=b,this.render()}set pages(M){this._pages=M,this.refreshPreview(),this.refreshTotalPage(),this.refreshBtnSidebar()}get pages(){return this._pages}unmount(){this.$content.remove(),this.$footer.remove()}setReadonly(M){this.readonly=M,this.$content.classList.toggle(this.wrapClassName("readonly"),M),this.$footer.classList.toggle(this.wrapClassName("readonly"),M),this.$pageNumberInput.disabled=M}destroy(){this.sideEffect.flushAll(),this.unmount()}setPageIndex(M){Number.isNaN(M)||(this.pageIndex=M,this.$pageNumberInput.value=String(M+1))}refreshTotalPage(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}setSmallBox(M){this.isSmallBox!==M&&(this.isSmallBox=M,this.$footer.classList.toggle(this.wrapClassName("float-footer"),M))}render(){return this.renderContent(),this.renderFooter(),this.$content}renderContent(){if(!this.$content){const M=document.createElement("div");M.className=this.wrapClassName("content"),this.$content=M,this.readonly&&M.classList.add(this.wrapClassName("readonly")),M.appendChild(this.renderPreviewMask()),M.appendChild(this.renderPreview())}return this.$content}renderPreview(){if(!this.$preview){const M=document.createElement("div");M.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=M,this.sideEffect.add(()=>(this.previewLazyLoad=new Vc({container:this.$preview,elements_selector:`.${this.wrapClassName("preview-page>img")}`}),()=>{var v;return(v=this.previewLazyLoad)==null?void 0:v.destroy()})),this.refreshPreview(),this.sideEffect.addEventListener(M,"click",v=>{var q;if(this.readonly)return;const b=(q=v.target.dataset)==null?void 0:q.pageIndex;b&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),this.onNewPageIndex(Number(b)),this.togglePreview(!1))})}return this.$preview}refreshPreview(){var q;const{$preview:M}=this,v=this.wrapClassName("preview-page"),b=this.wrapClassName("preview-page-name");for(;M.firstChild;)M.firstChild.remove();this.pages.forEach((ht,W)=>{var vt;const P=(vt=ht.thumbnail)!=null?vt:ht.src.startsWith("ppt")?void 0:ht.src;if(!P)return;const V=String(W),z=document.createElement("a");z.className=v+" "+this.wrapClassName(`preview-page-${W}`),z.setAttribute("href","#"),z.dataset.pageIndex=V;const k=document.createElement("span");k.className=b,k.textContent=String(W+1),k.dataset.pageIndex=V;const Z=document.createElement("img");Z.width=ht.width,Z.height=ht.height,Z.dataset.src=P,Z.dataset.pageIndex=V,z.appendChild(Z),z.appendChild(k),M.appendChild(z)}),(q=this.previewLazyLoad)==null||q.update()}renderPreviewMask(){return this.$previewMask||(this.$previewMask=document.createElement("div"),this.$previewMask.className=this.wrapClassName("preview-mask"),this.sideEffect.addEventListener(this.$previewMask,"click",M=>{this.readonly||M.target===this.$previewMask&&this.togglePreview(!1)})),this.$previewMask}refreshBtnSidebar(){this.$btnSidebar.style.display=this.pages.length>0?"":"none"}renderFooter(){if(!this.$footer){const M=document.createElement("div");M.className=this.wrapClassName("footer"),this.$footer=M,this.readonly&&M.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&M.classList.add(this.wrapClassName("float-footer"));const v=this.renderFooterBtn("btn-sidebar",uE(this.namespace));this.sideEffect.addEventListener(v,"click",()=>{this.readonly||this.togglePreview()}),this.$btnSidebar=v,this.$btnSidebar.style.display="none",this.$footer.appendChild(v);const b=document.createElement("div");b.className=this.wrapClassName("page-jumps");const q=this.renderFooterBtn("btn-page-back",hE(this.namespace));if(this.sideEffect.addEventListener(q,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex-1)}),b.appendChild(q),this.onPlay){const z=this.renderFooterBtn("btn-page-play",dE(this.namespace),pE(this.namespace));this.$btnPlay=z,this.sideEffect.addEventListener(z,"click",()=>{this.readonly||(this.setPlaying(),this.onPlay&&this.onPlay())}),b.appendChild(z)}const ht=this.renderFooterBtn("btn-page-next",cE(this.namespace));this.sideEffect.addEventListener(ht,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex+1)}),b.appendChild(ht);const W=document.createElement("div");W.className=this.wrapClassName("page-number");const P=document.createElement("input");P.className=this.wrapClassName("page-number-input"),P.value=String(this.pageIndex+1),this.readonly&&(P.disabled=!0),this.$pageNumberInput=P,this.sideEffect.addEventListener(P,"focus",()=>{P.select()}),this.sideEffect.addEventListener(P,"change",()=>{this.readonly||P.value&&this.onNewPageIndex(Number(P.value)-1)});const V=document.createElement("span");this.$totalPage=V,W.appendChild(P),W.appendChild(V),this.$footer.appendChild(b),this.$footer.appendChild(W)}return this.$footer}renderFooterBtn(M,v,b){const q=document.createElement("button");return q.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(M),q.appendChild(v),b&&q.appendChild(b),q}togglePreview(M){if(this.isShowPreview=M!=null?M:!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){const v=this.$preview.querySelector("."+this.wrapClassName(`preview-page-${this.pageIndex}`));v&&this.$preview.scrollTo({top:v.offsetTop-16})}}wrapClassName(M){return`${this.namespace}-${M}`}}const _M=new Set(["clicker"]);class yM{constructor({box:M,view:v,mountSlideController:b,mountWhiteboard:q}){this.slideController=null,this.isViewMounted=!1,this.onError=({error:ht})=>{this.viewer.setPaused(),_o.warn("[Slide] render error",ht)},this.refreshPages=()=>{this.slideController&&(this.viewer.pages=yy(this.slideController.slide),this.viewer.setPageIndex(this.getPageIndex(this.slideController.page)),this.scaleDocsToFit())},this.scaleDocsToFit=()=>{if(this.slideController){const{width:ht,height:W}=this.slideController.slide;ht&&W&&(this.whiteboardView.moveCameraToContain({originX:-ht/2,originY:-W/2,width:ht,height:W,animationMode:"immediately"}),this.whiteboardView.setCameraBound({damping:1,maxContentMode:()=>this.whiteboardView.camera.scale,minContentMode:()=>this.whiteboardView.camera.scale,centerX:0,centerY:0,width:ht,height:W}),this.isViewMounted||(this.isViewMounted=!0,console.log("[Slide] mount whiteboard view"),this.mountWhiteboard(this.$whiteboardView)))}},this.onPlay=()=>{this.slideController&&this.slideController.slide.nextStep()},this.onNewPageIndex=ht=>{this.slideController&&this.slideController.jumpToPage(ht+1)},this.sideEffect=new kc,this.namespace="netless-app-slide",this.box=M,this.whiteboardView=v,this.mountSlideController=b,this.mountWhiteboard=q,this.viewer=new tx({readonly:M.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.sideEffect.add(()=>{const ht=W=>{this.setReadonly(W)};return M.events.on("readonly",ht),()=>M.events.off("readonly",ht)}),this.render()}render(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.sideEffect.addEventListener(window,"keydown",M=>{if(this.box.focus&&this.slideController)switch(M.key){case"ArrowUp":case"ArrowLeft":{this.slideController.slide.prevStep();break}case"ArrowRight":case"ArrowDown":{this.slideController.slide.nextStep();break}}})}renderSlideContainer(){if(!this.$slide){const M=document.createElement("div");M.className=this.wrapClassName("slide"),M.dataset.appKind="Slide",this.$slide=M}return this.$slide}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view")),this.$whiteboardView}mount(){return this.box.mountContent(this.viewer.$content),this.box.mountFooter(this.viewer.$footer),this.slideController=this.mountSlideController({anchor:this.$slide,onTransitionStart:this.viewer.setPlaying,onTransitionEnd:this.viewer.setPaused,onReady:this.refreshPages,onError:this.onError}),this.scaleDocsToFit(),this.sideEffect.add(()=>(this.whiteboardView.callbacks.on("onSizeUpdated",this.scaleDocsToFit),()=>this.whiteboardView.callbacks.off("onSizeUpdated",this.scaleDocsToFit))),this}getPageIndex(M){return(M>0?M:1)-1}unmount(){return this.slideController&&(this.slideController.destroy(),this.slideController=null),this.viewer.unmount(),this}setReadonly(M){this.viewer.setReadonly(M)}destroy(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}toggleClickThrough(M){this.$whiteboardView.style.pointerEvents=!M||_M.has(M)?"none":"auto"}wrapClassName(M){return`${this.namespace}-${M}`}}let tv=!1;const ex=2,Wc=T=>"["+T+"]",Zp={map:new Map,queue:[],validateQueue(){for(zn("[Slide] freezer: validate",Wc(this.queue));this.queue.length>ex;){const T=this.queue.pop(),M=this.map.get(T);M&&(zn("[Slide] freezer: validate-freeze",T,Wc(this.queue)),M.freeze())}},set(T,M){zn("[Slide] freezer: add",T,Wc(this.queue)),this.map.set(T,M),this.queue.includes(T)||this.queue.unshift(T),this.validateQueue()},delete(T){this.map.delete(T),this.queue=this.queue.filter(M=>M!==T),zn("[Slide] freezer: delete",T,Wc(this.queue))},focus(T){const M=this.map.get(T),v=this.queue.indexOf(T);v>-1&&this.queue.splice(v,1),this.queue.unshift(T),this.validateQueue(),zn("[Slide] freezer: focus",T,Wc(this.queue)),M&&M.unfreeze()}},xM=T=>{tv=!0,T.on("focus",({appId:M})=>{Zp.focus(M)})};var ix=(()=>`.netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}
|
|
6362
|
-
`)();function bM({container:T,taskId:M,url:v=Gg,debug:b=!1}){if(!M)throw new Error("[Slide] taskId is required");T.style.cssText+="display:flex;flex-direction:column";const q=new nx({target:T});return q.debug=!!b,q.mount(M,v),q}class nx{constructor(M){this.slide=null,this.debug=!1,this.sideEffect=new kc,this.ready=!1,this.readyPromise=new Promise(v=>{this.resolveReady=()=>{this.ready=!0,v()}}),this.hotkeyListener=v=>{if(this.slide)switch(v.key){case"ArrowUp":case"ArrowLeft":{this.slide.prevStep();break}case"ArrowRight":case"ArrowDown":{this.slide.nextStep();break}}},this.onPageChanged=v=>{this.viewer.setPageIndex(v-1)},this.onTransitionStart=()=>{this.viewer.setPlaying()},this.onTransitionEnd=()=>{this.viewer.setPaused()},this.onError=({error:v})=>{this.viewer.setPaused(),console.warn("[Slide] render error",v)},this.destroyed=!1,this.refreshPages=()=>{this.slide&&(this.viewer.pages=yy(this.slide),this.viewer.setPageIndex(this.getPageIndex(this.slide.slideState.currentSlideIndex)))},this.onPlay=()=>{this.slide&&this.slide.nextStep()},this.onNewPageIndex=v=>{this.slide&&this.slide.slideCount>0&&this.slide.renderSlide(cy(v+1,1,this.slide.slideCount))},this.namespace="netless-app-slide",this.target=M.target,this.bgColor=_y(this.target),this.viewer=new tx({readonly:!1,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.render()}render(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.registerHotKeys(window)}registerHotKeys(M){this.sideEffect.addEventListener(M,"keydown",this.hotkeyListener,void 0,"hotkey")}mount(M,v){this.target.appendChild(this.renderStyle()),this.target.appendChild(this.viewer.$content),this.target.appendChild(this.viewer.$footer),this.slide=new yi.Slide({anchor:this.$slide,interactive:!0,mode:"local",resize:!0,controller:this.debug,enableGlobalClick:!0,renderOptions:{minFPS:25,maxFPS:30,autoFPS:!0,autoResolution:!0,transactionBgColor:this.bgColor}}),this.registerEventListeners(),this.slide.setResource(M,v),this.slide.renderSlide(1)}renderStyle(){const M=document.createElement("style");return M.appendChild(document.createTextNode(ix)),M}registerEventListeners(){if(!this.slide)return;const{slide:M}=this;M.on(yi.SLIDE_EVENTS.slideChange,this.onPageChanged),M.on(yi.SLIDE_EVENTS.renderStart,this.onTransitionStart),M.on(yi.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),M.on(yi.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),M.on(yi.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),M.on(yi.SLIDE_EVENTS.renderError,this.onError),M.on(yi.SLIDE_EVENTS.renderEnd,this.resolveReady),this.readyPromise.then(this.refreshPages)}destroy(){this.sideEffect.flushAll(),this.slide&&!this.destroyed&&(this.slide.destroy(),this.destroyed=!0),this.viewer.destroy()}getPageIndex(M){return(M>0?M:1)-1}renderSlideContainer(){if(!this.$slide){const M=document.createElement("div");M.className=this.wrapClassName("slide"),M.dataset.appKind="Slide",this.$slide=M}return this.$slide}wrapClassName(M){return`${this.namespace}-${M}`}}const wM=yi.Slide.usePlugin.bind(yi.Slide),ev="0.2.
|
|
6361
|
+
`,(l=n.config.logger)===null||l===void 0||l.error("["+s+"] "+o))}},n.anchor=n.config.anchor,n.syncQueue=new wO(n.receiveSyncHandler),n.lock=new SO(n.mode==="interactive"),n.cacheImage.style.position="absolute",n.cacheImage.style.zIndex="100",n.setMedianControllerAttribute(),n.frame.appendChild(n.medianController),n.frameResizeObserver.observe(n.frame),n.on(Jr.syncReceive,function(o){n.lock.unlock(o.type,o.uuid),n.syncQueue.addTask(o)}),n.renderingTaskManager.eventHub.on("task-error",function(o){var s=o.error,a=o.task,l=Tn.transform(s);l.errorType===cr.RuntimeWarn?n.logger.warn(l.message,n.taskId):n.logger.error(l.message,n.taskId),n.isLoading=!1,n.emit(Jr.renderError,{error:l,index:a.slideIndex})}),window.addEventListener("__slide_ref__",n.handleSlideRef),n.resizeView=Object(W.debounce)(n.resizeView.bind(n),50),n.player=n.initPlayer(n.config),n.config.controller&&n.createController(),n.player.view&&n.frame.appendChild(n.player.view),n.handleViewClick=Object(W.debounce)(n.handleViewClick,300),n.player.errorChannel.on("error",function(o,s){var a=Tn.transform(o);a.errorType===cr.RuntimeWarn?n.logger.warn(a.message,n.taskId):n.logger.error(a.message,n.taskId),n.isLoading=!1,s===n.renderingIndex&&n.emit(Jr.renderError,{error:o,index:s})}),n}var e;return RO(t,r),t.flushLog=function(){return po(this,void 0,void 0,function(){return fo(this,function(i){switch(i.label){case 0:return t._tempLog.length>0?[4,Il==null?void 0:Il.setItem("run_time_log_"+t._tempLogIndex,t._tempLog)]:[3,2];case 1:i.sent(),t._tempLog="",t._tempLogIndex+=1,i.label=2;case 2:return[2]}})})},Object.defineProperty(t.prototype,"dispatchIncrId",{get:function(){return this._dispatchIncrId++},enumerable:!1,configurable:!0}),t.prototype.initSlideConfig=function(i){return i.timestamp&&(this.timestamp=i.timestamp),i.rtcAudio&&(Gn.RtcAudioClazz=i.rtcAudio),this.mode=i.mode,this.anchor=i.anchor,this.anchor.appendChild(this.frame),this.enableGlobalClick=!Object(W.isUndefined)(i.enableGlobalClick)&&i.enableGlobalClick,this.resize=i.resize||!1,this.interactive=i.interactive,this.frame.style.cssText=i.fixedFrameSize?"width:"+i.fixedFrameSize.width+"px;height:"+i.fixedFrameSize.height+"px;":"width:100%;height:100%",this.frame.style.cssText+="display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;",i.fixedFrameSize&&(this.frameWidth=i.fixedFrameSize.width,this.frameHeight=i.fixedFrameSize.height),i},t.prototype.initPlayer=function(i){var n,o,s,a=this,l=new Gn({mode:this.mode,useLocalCache:!!Object(W.isUndefined)(this.config.useLocalCache)||this.config.useLocalCache,logger:this.logger,resourceTimeout:Object(W.isUndefined)(this.config.resourceTimeout)?15e3:this.config.resourceTimeout,loadDelegate:this.config.loaderDelegate,volumeAdjuster:this.volumeAdjuster});return l.setInteractive(this.interactive),l.updateConfig(i.renderOptions||{}),l.on(Ne.renderStart,function(u){a.isLoading=!0,a.emit(Jr.renderStart,u)}),l.on(Ne.renderEnd,function(u){a.isLoading=!1,a.player&&(a.designHeight=a.player.designHeight,a.designWidth=a.player.designWidth,a.cacheImage.style.width=a.player.designWidth+"px",a.cacheImage.style.height=a.player.designHeight+"px",a._slideCount=a.player.slideCount),a.emit(Jr.renderEnd,u)}),l.on(Ne.slideChange,function(u){a.__slideState.currentSlideIndex=u,a.emitStateChange(),a.emit(Jr.slideChange,u)}),l.on(Ne.mainSeqStateChange,function(u){a.__slideState.mainSeqState=u,a.emitStateChange()}),l.on(Ne.mainSeqStepChange,function(u){a.__slideState.mainSeqStep=u,a.emitStateChange()}),l.on(Ne.interactiveSeqStateChange,function(u){var h=u.id,d=u.state;a.__slideState.interactiveSeqState[h]=d,a.emitStateChange()}),l.on(Ne.animateStart,function(){a.isAnimating!==!0&&(a.isAnimating=!0,a.emit(Jr.animateStart))}),l.on(Ne.animateEnd,function(){a.isAnimating!==!1&&(a.isAnimating=!1,a.emit(Jr.animateEnd))}),l.on(Ne.interactiveSeqAction,function(u){var h=u.action,d=u.seqId;a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"interactiveAnim",action:h,seqId:d}),a.emitStateChange()}),l.on(Ne.mainSeqStepStart,function(u){a.emit(Jr.mainSeqStepStart,u)}),l.on(Ne.mainSeqStepEnd,function(u){a.emit(Jr.mainSeqStepEnd,u)}),l.on(Ne.mediaPlay,function(u){var h={type:"play",time:a.timestamp()-1e3*u.time};a.__slideState.mediaState[u.id]=h,a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"mediaPlay",id:u.id,state:h}),a.emitStateChange()}),l.on(Ne.mediaPause,function(u){var h={type:"pause",time:u.time};a.__slideState.mediaState[u.id]=h,a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"mediaPause",id:u.id,state:h}),a.emitStateChange()}),l.on(Ne.mediaSeek,function(u){var h={type:"pause",time:0};u.isPlaying?(h.type="play",a.__slideState.mediaState[u.id]?h.time=a.__slideState.mediaState[u.id].time-1e3*u.time:h.time=a.timestamp()-1e3*u.time,a.__slideState.mediaState[u.id]=h):(h.type="pause",h.time=u.time,a.__slideState.mediaState[u.id]=h),a.emitSyncDispatch({slideIndex:a.__slideState.currentSlideIndex,type:"mediaSeek",id:u.id,time:u.time,state:h}),a.emitStateChange()}),l.on(Ne.requestPrevSlide,function(u){a.handlePrevSlide(u)}),l.on(Ne.requestNextSlide,function(u){a.handleNextSlide(u)}),l.on(Ne.requestGotoSlide,function(u){a.config.navigatorDelegate?a.config.navigatorDelegate.gotoPage(u):a.handleGotoSlide(u)}),(n=l.view)===null||n===void 0||n.addEventListener("touchend",this.handleViewTouchEnd),(o=l.view)===null||o===void 0||o.addEventListener("touchstart",this.handleViewTouchStart),(s=l.view)===null||s===void 0||s.addEventListener("click",this.handleViewClick),l.on(Ne.userInput,this.userInputHandle),l},t.prototype.createController=function(){this.player&&(this.playerController=new bO({player:this.player,params:this.player.config||{},target:this.frame}))},t.prototype.setMedianControllerAttribute=function(){this.medianController.className="median-container",this.medianController.style.position="absolute",this.medianController.style.left="0",this.medianController.style.top="0",this.medianController.style.zIndex="2"},t.prototype.frameResizeHandler=function(){if(!this.config.fixedFrameSize){var i=this.frame.getBoundingClientRect(),n=i.width,o=i.height;this.frameWidth=n,this.frameHeight=o,this.resizeView()}},t.prototype.updateFixedFrameSize=function(i,n,o){this.config.fixedFrameSize&&(this.frameWidth=i,this.frameHeight=n,this.frame.style.width=i+"px",this.frame.style.height=n+"px",this.resizeView(o))},t.prototype.resizeView=function(i){var n,o,s=this,a=this.width,l=this.height;if(a>0&&l>0){var u=this.frameWidth/a,h=u*l;h>this.frameHeight&&(u*=this.frameHeight/h),(n=this.player)===null||n===void 0||n.scaleView(u,this.resize,i),this.cacheImage.style.transform="scale("+u+")",this.medianController.style.transform="scale("+u+")",this.medianController.style.top=(this.frameHeight-l*u)/2+"px",this.medianController.setAttribute("data-scale",u.toString()),this.isInitResized||(this.isInitResized=!0,(o=this.player)===null||o===void 0||o.clock.setTimeout(function(){s.frame.style.visibility="visible"},32))}},t.prototype.setSlideState=function(i){var n,o,s;return po(this,void 0,void 0,function(){var a,l=this;return fo(this,function(u){switch(u.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(i),this.taskId),i.taskId&&i.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=i.taskId,(n=this.player)===null||n===void 0||n.setResourceData(i.taskId,this.__slideState.url)),i.url&&i.url!==this.__slideState.url&&(this.__slideState.url=i.url,(o=this.player)===null||o===void 0||o.setResourceData(this.__slideState.taskId,i.url)),Number.isInteger(i.currentSlideIndex)&&i.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=i.currentSlideIndex,[4,this.doRenderSlide(i.currentSlideIndex)]):[3,2];case 1:u.sent(),u.label=2;case 2:return[4,(s=this.player)===null||s===void 0?void 0:s.clock.waitUntil(function(){var h,d;return((h=l.player)===null||h===void 0?void 0:h.currentIndex)===i.currentSlideIndex&&((d=l.player)===null||d===void 0?void 0:d.currentStage)},3e3)];case 3:return u.sent(),a=!1,Number.isInteger(i.mainSeqStep)&&i.mainSeqStep!==this.__slideState.mainSeqStep&&(a=!0,this.__slideState.mainSeqStep=i.mainSeqStep),i.mainSeqState&&i.mainSeqState!==this.__slideState.mainSeqState&&(a=!0,this.__slideState.mainSeqState=i.mainSeqState),a&&this.setMainSeqStep(this.__slideState.mainSeqStep,this.__slideState.mainSeqState==="idle"?"start":"end"),i.mediaState&&(this.initMedia(i),this.__slideState.mediaState=i.mediaState),i.interactiveSeqState&&(this.initInteractiveSeq(i),this.__slideState.interactiveSeqState=i.interactiveSeqState),this.isSyncingSlideState=!1,[2]}})})},t.prototype.initInteractiveSeq=function(i){var n;for(var o in i.interactiveSeqState){var s=i.interactiveSeqState[o];(n=this.player)===null||n===void 0||n.setInteractiveSeqState(o,s.step,s.state==="end"?"end":"start")}},t.prototype.initMedia=function(i){var n,o,s=this,a=function(h){var d=i.mediaState[h],p=l.__slideState.mediaState[h];if(p&&d.type===p.type&&d.time===p.time)return"continue";d.type==="play"?(n=l.player)===null||n===void 0||n.setMediaState(h,!0).then(function(){var m,g=s.timestamp();(m=s.player)===null||m===void 0||m.setMediaCurrentTime(h,(g-d.time)/1e3)}):(o=l.player)===null||o===void 0||o.setMediaState(h,!1).then(function(){var m;(m=s.player)===null||m===void 0||m.setMediaCurrentTime(h,d.time)})},l=this;for(var u in i.mediaState)a(u)},Object.defineProperty(t.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),t.prototype.getSizeAsync=function(){return po(this,void 0,void 0,function(){var i;return fo(this,function(n){switch(n.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,n.sent().json()];case 3:return[2,[(i=n.sent()).width,i.height]];case 4:return n.sent(),[2,[0,0]];case 5:return[2]}})})},t.prototype.getSlideCountAsync=function(){return po(this,void 0,void 0,function(){return fo(this,function(i){switch(i.label){case 0:if(this._slideCount>0)return[2,this._slideCount];i.label=1;case 1:return i.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,i.sent().json()];case 3:return[2,i.sent().slideCount];case 4:return i.sent(),[2,0];case 5:return[2]}})})},Object.defineProperty(t.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqLength",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqStep",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqState",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderOptions",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"drawCall",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderFps",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runtimeFps",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){var i;return((i=this.player)===null||i===void 0?void 0:i.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),t.prototype.updateRenderOption=function(i){this.player&&(this.player.updateConfig(i),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},t.prototype.setResource=function(i,n){var o;this.taskId=i,(o=this.player)===null||o===void 0||o.setResourceData(i,n),this.__slideState.taskId=i,this.__slideState.url=n,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:i,url:n})},t.prototype._renderSlide=function(i){var n;return po(this,void 0,void 0,function(){var o=this;return fo(this,function(s){switch(s.label){case 0:return this.renderingIndex=i,this.player&&i===this.player.currentIndex?[2]:((Gn.platform.isIOS()||Gn.platform.isAndroid())&&this.iosResetCache.indexOf(i)<0&&this.iosResetCache.push(i),[4,(n=this.player)===null||n===void 0?void 0:n.renderSlide(i)]);case 1:return s.sent(),this.__slideState.currentSlideIndex=i,this.resizeView(),this.__slideState.interactiveSeqState={},this.emitStateChange(),setTimeout(function(){var a,l;if(((l=(a=o.player)===null||a===void 0?void 0:a.view)===null||l===void 0?void 0:l.style.visibility)==="hidden"&&(o.player.view.style.visibility="visible"),o.frame.style.visibility==="hidden"&&(o.frame.style.visibility="visible"),o.needClearCacheImage)try{o.frame.removeChild(o.cacheImage)}catch{}},100),[2]}})})},t.prototype.renderSlide=function(i,n){if(n===void 0&&(n=!0),this.player){var o=Number(i);(o!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(o>this.slideCount&&this.slideCount>0||this.poseRenderSlide(o,n))}},t.prototype.needCreateNewPlayer=function(){var i=Gn.platform.isLowGpuMemory()?15:30;return(Gn.platform.isIOS()||Gn.platform.isAndroid())&&this.iosResetCache.length>i},t.prototype.poseRenderSlide=function(i,n){this.mode==="interactive"?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:i,isForward:n}):this.mode==="sync"?(this.doRenderSlide(i,n),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:i,isForward:n})):this.doRenderSlide(i,n)},t.prototype.doRenderSlide=function(i,n){var o,s,a,l=this;if(n===void 0&&(n=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var u=this.player.getSnapshot();this.cacheImage.src=u,this.frame.appendChild(this.cacheImage),this.player.destroy(),(o=this.playerController)===null||o===void 0||o.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,!((s=this.config)===null||s===void 0)&&s.controller&&this.createController(),this.needClearCacheImage=!0,!((a=this==null?void 0:this.player)===null||a===void 0)&&a.view&&(this.player.view.style.visibility="hidden",this.frame.appendChild(this.player.view))}var h=Math.random().toString(32).substr(2);return this.player.isForward=n,this.renderingTaskManager.addTask(function(){return l._renderSlide(i)},i,h),new Promise(function(d){l.renderingTaskManager.eventHub.once("task-end-"+h,d)})},t.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasNextStep()?this.mode==="interactive"?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):this.mode==="sync"?(this.doNextStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep():this.handleNextSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},t.prototype.doNextStep=function(i){if(i===void 0&&(i=!1),this.player){this.player.nextStep(i);var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,this.emitStateChange()}},t.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasPrevStep()?this.mode==="interactive"?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):this.mode==="sync"?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},t.prototype.doPrevStep=function(i){if(i===void 0&&(i=!1),this.player){this.player.prevStep(i);var n=this.player.mainSeqStep();this.__slideState.mainSeqStep=n,this.emitStateChange()}},t.prototype.isSlideStateReady=function(i){return i.taskId.length>0&&i.url.length>0&&i.currentSlideIndex>0},t.prototype.emitStateChange=function(){if(this.mode!=="local"&&!this.isSyncingSlideState){var i=this.slideState;!Object(W.isEqual)(this.lastEmitedState,i)&&this.isSlideStateReady(i)&&(this.lastEmitedState=i,this.emit(Jr.stateChange,i),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},t.prototype.emitSyncDispatch=function(i){if(!this.lock.isLocked(i.type)){var n=Math.random().toString(32).substr(2);this.lock.addLock(i.type,n);var o=Up(Up({},i),{uuid:n});this.config.mode==="sync"&&(o.incrId=this.dispatchIncrId),this.emit(Jr.syncDispatch,o),this.logger.info("sync dispatch "+JSON.stringify(o),this.taskId)}},t.prototype.setMainSeqStep=function(i,n){var o;(o=this.player)===null||o===void 0||o.setMainSeqStep(i,n)},t.prototype.setInteractive=function(i){var n;this.interactive=i,(n=this.player)===null||n===void 0||n.setInteractive(i)},t.prototype.pause=function(){var i;(i=this.player)===null||i===void 0||i.pause()},t.prototype.resume=function(){var i;(i=this.player)===null||i===void 0||i.resume()},t.prototype._doFrozen=function(){var i;return po(this,void 0,void 0,function(){var n,o,s,a=this;return fo(this,function(l){switch(l.label){case 0:return this.view&&this.player?[4,this.player.clock.waitUntil(function(){return!a.isLoading},6e4)]:[3,2];case 1:for(o in l.sent(),n=this.player.getSnapshot()||"",this.cacheImage.src=n,this.frame.appendChild(this.cacheImage),this.player.destroy(),(i=this.playerController)===null||i===void 0||i.destroy(),this.player=void 0,this.__slideState.mediaState)s=this.__slideState.mediaState[o],this.__slideState.mediaState[o]=Up(Up({},s),{frozenTime:this.timestamp()});l.label=2;case 2:return[2]}})})},t.prototype.frozen=function(){var i=this;this.frozenTaskManager.addTask("frozen",function(){return i._doFrozen()})},t.prototype._doRelease=function(){var i,n;return po(this,void 0,void 0,function(){var o,s,a,l;return fo(this,function(u){switch(u.label){case 0:if(this.player)return[2];for(s in this.player=this.initPlayer(this.config),!((i=this.config)===null||i===void 0)&&i.controller&&this.createController(),this.player.view&&(this.frame.appendChild(this.player.view),this.player.view.style.visibility="hidden"),o=this.__slideState,this.__slideState=Object(W.cloneDeep)(OT),o.mediaState)(a=o.mediaState[s]).type==="play"&&(l=Math.max((n=a.frozenTime)!==null&&n!==void 0?n:0,a.time),a.time=this.timestamp()-(l-a.time),a.frozenTime=void 0);return[4,this.setSlideState(o)];case 1:return u.sent(),[4,this.player.clock.delay(333)];case 2:u.sent(),this.player.view&&(this.player.view.style.visibility="visible");try{this.frame.removeChild(this.cacheImage)}catch{}return[2]}})})},t.prototype.release=function(){var i=this;this.frozenTaskManager.addTask("release",function(){return i._doRelease()})},t.prototype._doDestroy=function(){var i,n,o,s;this.logger.info("do destroy slide",""),this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),(i=this.player)===null||i===void 0||i.removeAllListeners(),(n=this.player)===null||n===void 0||n.destroy(),(o=this.player)===null||o===void 0||o.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),this.removeAllListeners();try{!((s=this.player)===null||s===void 0)&&s.view&&this.anchor.removeChild(this.player.view),this.anchor.removeChild(this.frame)}catch{}},t.prototype.waitLoadEnd=function(){return po(this,void 0,void 0,function(){var i;return fo(this,function(n){switch(n.label){case 0:i=0,n.label=1;case 1:return this.isLoading&&i<10?[4,ry(100)]:[3,3];case 2:return n.sent(),i+=1,[3,1];case 3:return[2]}})})},t.prototype.preload=function(i){return this.player?this.player.preload(i):Promise.resolve()},t.prototype.destroy=function(){var i=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then(function(){i._doDestroy()}):this._doDestroy()},t.prototype.clearSlideCache=function(){var i;(i=this.player)===null||i===void 0||i.clearLocalCache()},t.prototype.hasNextStep=function(){if(!this.player)return!1;var i=this.player.currentIndex===this.slideCount,n=this.mainSeqLength===0||this.mainSeqStep>=this.mainSeqLength-1,o=this.mainSeqState==="end"||this.mainSeqState==="running"||this.mainSeqState==null;return!(i&&n&&o)},t.prototype.hasPrevStep=function(){if(!this.player)return!1;var i=this.player.currentIndex===1,n=this.mainSeqLength===0||this.mainSeqStep===0,o=this.mainSeqState==="idle"||this.mainSeqState===null;return!(i&&n&&o)},t.prototype.updateGlobalVolume=function(i){this.volumeAdjuster.volume=i},t.prototype.getGlobalVolume=function(){return this.volumeAdjuster.volume},t.clearLocalCache=function(){Gn.clearLocalCache()},t.disposeLocalCache=function(){},t._tempLog="",t._tempLogIndex=1,t.usePlugin=WL,t.handleLogDownload=function(){return po(void 0,void 0,void 0,function(){var i,n,o,s,a,l,u;return fo(this,function(h){switch(h.label){case 0:return i="",Il?[4,Il.keys()]:[3,5];case 1:n=(h.sent()||[]).sort(function(d,p){return parseInt(d.replace("run_time_log_",""))-parseInt(p.replace("run_time_log_",""))}),o=0,s=n,h.label=2;case 2:return o<s.length?(a=s[o],l=i,[4,Il.getItem(a)]):[3,5];case 3:i=l+(h.sent()||""),h.label=4;case 4:return o++,[3,2];case 5:return(u=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(i)),u.setAttribute("download","slide_log"),u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),window.__slideLogText=i,[2]}})})},CO([(e="Slide.initConfig",function(i,n,o){var s=o.value;o.value=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];for(var u=z_.get(e)||[],h=a,d=0,p=u;d<p.length;d++){var m=p[d];try{h=m.before(h)}catch{}if(!Array.isArray(h)||h.length!==a.length)throw new Error("plugin before hook return invalid args")}for(var g=s.bind(this).apply(void 0,h),_=0,y=u.reverse();_<y.length;_++){m=y[_];try{g=m.after(g)}catch{}if(!g)throw new Error("plugin after hook return undefined result")}return g}})],t.prototype,"initSlideConfig",null),t}(P.a);Il==null||Il.clear(),window.addEventListener("__slide_log__",Fg.handleLogDownload),window.setInterval(function(){Fg.flushLog().catch(function(){})},9e3)}]);const vo="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",qT=87,YT=20,uy=[],$T=()=>{for(let T=0;T<YT;T++)uy[T]=vo.charAt(Math.random()*qT);return uy.join("")};function hy(T){try{return T()}catch(M){console.error(M)}}class kc{constructor(){this.push=this.addDisposer,this.disposers=new Map}addDisposer(M,v=this.genUID()){return this.flush(v),this.disposers.set(v,Array.isArray(M)?JT(M):M),v}add(M,v=this.genUID()){const b=M();return b?this.addDisposer(b,v):v}addEventListener(M,v,b,q,ht=this.genUID()){return M.addEventListener(v,b,q),this.addDisposer(()=>M.removeEventListener(v,b,q),ht),ht}setTimeout(M,v,b=this.genUID()){const q=window.setTimeout(()=>{this.remove(b),M()},v);return this.addDisposer(()=>window.clearTimeout(q),b)}setInterval(M,v,b=this.genUID()){const q=window.setInterval(M,v);return this.addDisposer(()=>window.clearInterval(q),b)}remove(M){const v=this.disposers.get(M);return this.disposers.delete(M),v}flush(M){const v=this.remove(M);v&&v()}flushAll(){this.disposers.forEach(hy),this.disposers.clear()}genUID(){let M;do M=$T();while(this.disposers.has(M));return M}}function JT(T){return()=>T.forEach(hy)}function cy(T,M,v){return Math.min(Math.max(T,M),v)}function ZT(T){return typeof T=="object"&&T!==null}var dy={exports:{}},KT={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},py={exports:{}},QT=function(M){return!M||typeof M=="string"?!1:M instanceof Array||Array.isArray(M)||M.length>=0&&(M.splice instanceof Function||Object.getOwnPropertyDescriptor(M,M.length-1)&&M.constructor.name!=="String")},tE=QT,eE=Array.prototype.concat,iE=Array.prototype.slice,fy=py.exports=function(M){for(var v=[],b=0,q=M.length;b<q;b++){var ht=M[b];tE(ht)?v=eE.call(v,iE.call(ht)):v.push(ht)}return v};fy.wrap=function(T){return function(){return T(fy(arguments))}};var Uc=KT,Gc=py.exports,my=Object.hasOwnProperty,gy=Object.create(null);for(var kg in Uc)my.call(Uc,kg)&&(gy[Uc[kg]]=kg);var Qr=dy.exports={to:{},get:{}};Qr.get=function(T){var M=T.substring(0,3).toLowerCase(),v,b;switch(M){case"hsl":v=Qr.get.hsl(T),b="hsl";break;case"hwb":v=Qr.get.hwb(T),b="hwb";break;default:v=Qr.get.rgb(T),b="rgb";break}return v?{model:b,value:v}:null},Qr.get.rgb=function(T){if(!T)return null;var M=/^#([a-f0-9]{3,4})$/i,v=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,b=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,q=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ht=/^(\w+)$/,V=[0,0,0,1],P,W,z;if(P=T.match(v)){for(z=P[2],P=P[1],W=0;W<3;W++){var k=W*2;V[W]=parseInt(P.slice(k,k+2),16)}z&&(V[3]=parseInt(z,16)/255)}else if(P=T.match(M)){for(P=P[1],z=P[3],W=0;W<3;W++)V[W]=parseInt(P[W]+P[W],16);z&&(V[3]=parseInt(z+z,16)/255)}else if(P=T.match(b)){for(W=0;W<3;W++)V[W]=parseInt(P[W+1],0);P[4]&&(P[5]?V[3]=parseFloat(P[4])*.01:V[3]=parseFloat(P[4]))}else if(P=T.match(q)){for(W=0;W<3;W++)V[W]=Math.round(parseFloat(P[W+1])*2.55);P[4]&&(P[5]?V[3]=parseFloat(P[4])*.01:V[3]=parseFloat(P[4]))}else return(P=T.match(ht))?P[1]==="transparent"?[0,0,0,0]:my.call(Uc,P[1])?(V=Uc[P[1]],V[3]=1,V):null:null;for(W=0;W<3;W++)V[W]=Na(V[W],0,255);return V[3]=Na(V[3],0,1),V},Qr.get.hsl=function(T){if(!T)return null;var M=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,v=T.match(M);if(v){var b=parseFloat(v[4]),q=(parseFloat(v[1])%360+360)%360,ht=Na(parseFloat(v[2]),0,100),V=Na(parseFloat(v[3]),0,100),P=Na(isNaN(b)?1:b,0,1);return[q,ht,V,P]}return null},Qr.get.hwb=function(T){if(!T)return null;var M=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,v=T.match(M);if(v){var b=parseFloat(v[4]),q=(parseFloat(v[1])%360+360)%360,ht=Na(parseFloat(v[2]),0,100),V=Na(parseFloat(v[3]),0,100),P=Na(isNaN(b)?1:b,0,1);return[q,ht,V,P]}return null},Qr.to.hex=function(){var T=Gc(arguments);return"#"+Vp(T[0])+Vp(T[1])+Vp(T[2])+(T[3]<1?Vp(Math.round(T[3]*255)):"")},Qr.to.rgb=function(){var T=Gc(arguments);return T.length<4||T[3]===1?"rgb("+Math.round(T[0])+", "+Math.round(T[1])+", "+Math.round(T[2])+")":"rgba("+Math.round(T[0])+", "+Math.round(T[1])+", "+Math.round(T[2])+", "+T[3]+")"},Qr.to.rgb.percent=function(){var T=Gc(arguments),M=Math.round(T[0]/255*100),v=Math.round(T[1]/255*100),b=Math.round(T[2]/255*100);return T.length<4||T[3]===1?"rgb("+M+"%, "+v+"%, "+b+"%)":"rgba("+M+"%, "+v+"%, "+b+"%, "+T[3]+")"},Qr.to.hsl=function(){var T=Gc(arguments);return T.length<4||T[3]===1?"hsl("+T[0]+", "+T[1]+"%, "+T[2]+"%)":"hsla("+T[0]+", "+T[1]+"%, "+T[2]+"%, "+T[3]+")"},Qr.to.hwb=function(){var T=Gc(arguments),M="";return T.length>=4&&T[3]!==1&&(M=", "+T[3]),"hwb("+T[0]+", "+T[1]+"%, "+T[2]+"%"+M+")"},Qr.to.keyword=function(T){return gy[T.slice(0,3)]};function Na(T,M,v){return Math.min(Math.max(M,T),v)}function Vp(T){var M=Math.round(T).toString(16).toUpperCase();return M.length<2?"0"+M:M}var nE=dy.exports;class rE{constructor(M){this.enable=M,this.apps={},this.level="debug",this.roomLogger=null,this._onMessage=v=>{let b;v instanceof CustomEvent?b=v.detail:ZT(v.data)&&(b=v.data),b&&(typeof b.slide=="boolean"?this.enable=b.slide:b.slide==="__instance"?console.log(this):b.slide==="__debug"&&Object.values(this.apps).forEach(q=>{var ht,V;(V=(ht=q.controller)==null?void 0:ht.slide)==null||V.createController()}))},this.initialize()}setAppContext(M,v){var b;((b=this.apps)[M]||(b[M]={})).context=v,this.log(`[Slide] new ${M}`)}setAppController(M,v){var b;((b=this.apps)[M]||(b[M]={})).controller=v}deleteApp(M){delete this.apps[M],this.log(`[Slide] delete ${M}`)}initialize(){window.addEventListener("message",this._onMessage)}dispose(){window.removeEventListener("message",this._onMessage)}log(...M){this.roomLogger?this.roomLogger.info(...M):this.enable&&console.log(...M)}verbose(...M){this.roomLogger?this.roomLogger.debug(...M):this.enable&&this.level==="verbose"&&console.log(...M)}warn(...M){this.roomLogger?this.roomLogger.warn(...M):console.warn(...M)}}const _o=new rE(!1),zn=_o.log.bind(_o),Ug=_o.verbose.bind(_o),oE=T=>{_o.roomLogger=T.logger};function vy(T){try{const M=window.getComputedStyle(T).backgroundColor;if(M!=="rgba(0, 0, 0, 0)"&&M!=="transparent")return M;if(T.parentElement)return vy(T.parentElement)}catch{}return"#ffffff"}function sE(T){const M=nE.get(T);if(M&&M.model==="rgb"){const v=M.value,q=(((Math.round(v[0])&255)<<16)+((Math.round(v[1])&255)<<8)+(Math.round(v[2])&255)).toString(16);return"#"+"000000".substring(q.length)+q}else return T}let Wp="";function _y(T){return Wp||(Wp=sE(vy(T)),zn("[Slide] guess bg color",Wp)),Wp}function yy(T){const{width:M,height:v,slideCount:b,slideState:q}=T,{taskId:ht,url:V}=q,P=[];for(let W=1;W<=b;++W)P.push({width:M,height:v,thumbnail:`${V}/${ht}/preview/${W}.png`,src:"ppt"});return P}function xy(T,M,v,b){var P;const q=v.slideState.currentSlideIndex;if(!(q>0)||!M.getIsWritable())return;const ht=[b,q].join("/");if(T.scenePathType(ht)!=="page"){T.removeScenes(b);const W=v.slideCount,z=[];for(let k=1;k<=W;++k)z.push({name:`${k}`});T.putScenes(b,z)}let V;M.getBox().focus?V=T.state.sceneState.scenePath:V=((P=M.getView())==null?void 0:P.focusScenePath)||"",V!==ht&&M.setScenePath(ht)}const Gg="https://convertcdn.netless.link/dynamicConvert",aE=40,Hg={taskId:"",url:"",state:null};class lE{constructor({context:M,anchor:v,onPageChanged:b,onTransitionStart:q,onTransitionEnd:ht,onError:V}){this.sideEffect=new kc,this.ready=!1,this.readyPromise=new Promise(P=>{this.resolveReady=()=>{this.ready?zn("[Slide] render end"):setTimeout(()=>{this.ready=!0,P()},1e3)}}),this.onSyncDispatch=P=>{if(this.context.getIsWritable()&&this.room){const W={type:yi.SLIDE_EVENTS.syncDispatch,payload:P};Ug("[Slide] dispatch",JSON.stringify(P)),this.context.dispatchMagixEvent(yi.SLIDE_EVENTS.syncDispatch,W)}},this.magixEventListener=P=>{const{type:W,payload:z}=P.payload;W===yi.SLIDE_EVENTS.syncDispatch&&(this.syncStateOnce(),Ug("[Slide] receive",JSON.stringify(z)),this.slide.emit(yi.SLIDE_EVENTS.syncReceive,z))},this.onStateChange=P=>{this.context.getIsWritable()&&(Ug("[Slide] state change",JSON.stringify(P,null,2)),this.context.storage.setState({state:P}))},this.pollCount=0,this.pollReadyState=()=>{this.ready?this._toFreeze===1?this.freeze():this._toFreeze===-1&&this.unfreeze():this.pollCount<aE?(this.pollCount++,setTimeout(this.pollReadyState,500)):(this.pollCount=0,zn("[Slide] renderSlide 1 (retry after timeout)"),this.slide.renderSlide(1))},this._pageCount=0,this.destroyed=!1,this.timestamp=()=>this.room&&this.room.calibrationTimestamp?this.room.calibrationTimestamp:this.player?this.player.beginTimestamp+this.player.progressTime:Date.now(),this.isFrozen=!1,this._toFreeze=0,this.freeze=()=>{this.isFrozen=!0,this.ready?(zn("[Slide] freeze",this.context.appId),this.slide.frozen()):this._toFreeze=1},this.unfreeze=async()=>{!this.visible||(this.isFrozen=!1,this.ready?(zn("[Slide] unfreeze",this.context.appId),this.slide.release()):this._toFreeze=-1)},this.onVisibilityChange=async()=>{(this.visible=document.visibilityState==="visible")?(zn("[Slide] unfreeze because tab becomes visible",{savedIsFrozen:this.savedIsFrozen}),this.savedIsFrozen||this.unfreeze()):(this.savedIsFrozen=this.isFrozen,zn("[Slide] freeze because tab becomes invisible"),this.freeze())},this.onPageChanged=b,this.onTransitionStart=q,this.onTransitionEnd=ht,this.onError=V,this.context=M,this.room=M.getRoom(),this.player=this.room?void 0:M.getDisplayer(),oE(this.room||this.player),this.slide=this.createSlide(v),this.syncStateOnceFlag=!this.context.isAddApp,this.visible=document.visibilityState==="visible",this.savedIsFrozen=!1,this.initialize()}jumpToPage(M){this.ready&&(M=cy(M,1,this.pageCount),this.slide.renderSlide(M))}initialize(){this.registerEventListeners(),this.kickStart()}kickStart(){const{context:M,slide:v}=this;M.getIsWritable()&&M.storage.ensureState(Hg);const{taskId:b,url:q,state:ht}=M.storage.state;v.setResource(b,q||Gg),ht?(zn("[Slide] init with state",JSON.stringify(ht)),this.syncStateOnceFlag=!1,v.setSlideState(ht)):M.isAddApp&&(zn("[Slide] init by renderSlide",1),v.renderSlide(1)),this.pollReadyState()}registerEventListeners(){const{context:M,slide:v}=this,b=this.sideEffect.addDisposer(M.storage.addStateChangedListener(()=>{M.storage.state.state&&(this.syncStateOnce(),this.sideEffect.flush(b))}));this.sideEffect.add(()=>M.addMagixEventListener(yi.SLIDE_EVENTS.syncDispatch,this.magixEventListener,{fireSelfEventAfterCommit:!0})),v.on(yi.SLIDE_EVENTS.slideChange,this.onPageChanged),v.on(yi.SLIDE_EVENTS.renderStart,this.onTransitionStart),v.on(yi.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),v.on(yi.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),v.on(yi.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),v.on(yi.SLIDE_EVENTS.renderError,this.onError),v.on(yi.SLIDE_EVENTS.stateChange,this.onStateChange),v.on(yi.SLIDE_EVENTS.syncDispatch,this.onSyncDispatch),v.on(yi.SLIDE_EVENTS.renderEnd,this.resolveReady),this.sideEffect.add(()=>(document.addEventListener("visibilitychange",this.onVisibilityChange),()=>document.removeEventListener("visibilitychange",this.onVisibilityChange)))}syncStateOnce(){if(this.syncStateOnceFlag){this.context.getIsWritable()&&this.context.storage.ensureState(Hg);const{state:M}=this.context.storage.state;M&&(zn("[Slide] sync with state (once)",JSON.stringify(M)),this.slide.setSlideState(M),this.syncStateOnceFlag=!1)}}get pageCount(){return this._pageCount>0?this._pageCount:(this._pageCount=this.slide.slideCount,this._pageCount)}get page(){return this.slide.slideState.currentSlideIndex}createSlide(M){var q,ht;const v=this.context.getAppOptions()||{};return new yi.Slide({anchor:M,interactive:!0,mode:"interactive",resize:!0,controller:_o.enable,enableGlobalClick:!0,renderOptions:{minFPS:v.minFPS||25,maxFPS:v.maxFPS||30,autoFPS:(q=v.autoFPS)!=null?q:!0,autoResolution:(ht=v.autoResolution)!=null?ht:!0,resolution:v.resolution,transactionBgColor:v.bgColor||_y(M),maxResolutionLevel:v.maxResolutionLevel},fixedFrameSize:v.fixedFrameSize,loaderDelegate:v.loaderDelegate,navigatorDelegate:v.navigatorDelegate,resourceTimeout:v.resourceTimeout,rtcAudio:v.rtcAudio,useLocalCache:v.useLocalCache,logger:v.logger,timestamp:this.timestamp})}destroy(){this.sideEffect.flushAll(),this.destroyed||(zn("[Slide] destroy slide (once)"),this.slide.destroy(),this.destroyed=!0)}}function uE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-sidebar`),v.setAttribute("viewBox","0 0 64 64");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),v.appendChild(b),v}function hE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-arrow-left`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),v.appendChild(b),v}function cE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-arrow-right`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),v.appendChild(b),v}function dE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-play`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),v.appendChild(b),v}function pE(T){const M="http://www.w3.org/2000/svg",v=document.createElementNS(M,"svg");v.setAttribute("class",`${T}-footer-icon-pause`),v.setAttribute("viewBox","0 0 500 500");const b=document.createElementNS(M,"path");return b.setAttribute("fill","currentColor"),b.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),v.appendChild(b),v}const Da=typeof window!="undefined",by=Da&&!("onscroll"in window)||typeof navigator!="undefined"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),wy=Da&&"IntersectionObserver"in window,Sy=Da&&"classList"in document.createElement("p"),Ty=Da&&window.devicePixelRatio>1,fE={elements_selector:".lazy",container:by||Da?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},Ey=T=>Object.assign({},fE,T),My=function(T,M){let v;const b="LazyLoad::Initialized",q=new T(M);try{v=new CustomEvent(b,{detail:{instance:q}})}catch{v=document.createEvent("CustomEvent"),v.initCustomEvent(b,!1,!1,{instance:q})}window.dispatchEvent(v)},mE=(T,M)=>{if(!!M)if(!M.length)My(T,M);else for(let v=0,b;b=M[v];v+=1)My(T,b)},Vs="src",zg="srcset",jg="sizes",Ay="poster",Hc="llOriginalAttrs",Ry="data",Vg="loading",Cy="loaded",Py="applied",gE="entered",Wg="error",Iy="native",Ly="data-",Oy="ll-status",kr=(T,M)=>T.getAttribute(Ly+M),vE=(T,M,v)=>{var b=Ly+M;if(v===null){T.removeAttribute(b);return}T.setAttribute(b,v)},zc=T=>kr(T,Oy),Ll=(T,M)=>vE(T,Oy,M),Xp=T=>Ll(T,null),Xg=T=>zc(T)===null,_E=T=>zc(T)===Vg,yE=T=>zc(T)===Wg,qg=T=>zc(T)===Iy,xE=[Vg,Cy,Py,Wg],bE=T=>xE.indexOf(zc(T))>=0,Fa=(T,M,v,b)=>{if(!!T){if(b!==void 0){T(M,v,b);return}if(v!==void 0){T(M,v);return}T(M)}},Wu=(T,M)=>{if(Sy){T.classList.add(M);return}T.className+=(T.className?" ":"")+M},hs=(T,M)=>{if(Sy){T.classList.remove(M);return}T.className=T.className.replace(new RegExp("(^|\\s+)"+M+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},wE=T=>{T.llTempImage=document.createElement("IMG")},SE=T=>{delete T.llTempImage},Ny=T=>T.llTempImage,qp=(T,M)=>{if(!M)return;const v=M._observer;!v||v.unobserve(T)},TE=T=>{T.disconnect()},EE=(T,M,v)=>{M.unobserve_entered&&qp(T,v)},Yg=(T,M)=>{!T||(T.loadingCount+=M)},ME=T=>{!T||(T.toLoadCount-=1)},Dy=(T,M)=>{!T||(T.toLoadCount=M)},AE=T=>T.loadingCount>0,RE=T=>T.toLoadCount>0,Fy=T=>{let M=[];for(let v=0,b;b=T.children[v];v+=1)b.tagName==="SOURCE"&&M.push(b);return M},$g=(T,M)=>{const v=T.parentNode;if(!v||v.tagName!=="PICTURE")return;Fy(v).forEach(M)},By=(T,M)=>{Fy(T).forEach(M)},Yp=[Vs],ky=[Vs,Ay],jc=[Vs,zg,jg],Uy=[Ry],$p=T=>!!T[Hc],Gy=T=>T[Hc],Hy=T=>delete T[Hc],Xu=(T,M)=>{if($p(T))return;const v={};M.forEach(b=>{v[b]=T.getAttribute(b)}),T[Hc]=v},CE=T=>{$p(T)||(T[Hc]={backgroundImage:T.style.backgroundImage})},PE=(T,M,v)=>{if(!v){T.removeAttribute(M);return}T.setAttribute(M,v)},Ol=(T,M)=>{if(!$p(T))return;const v=Gy(T);M.forEach(b=>{PE(T,b,v[b])})},IE=T=>{if(!$p(T))return;const M=Gy(T);T.style.backgroundImage=M.backgroundImage},zy=(T,M,v)=>{Wu(T,M.class_applied),Ll(T,Py),v&&(M.unobserve_completed&&qp(T,M),Fa(M.callback_applied,T,v))},jy=(T,M,v)=>{Wu(T,M.class_loading),Ll(T,Vg),v&&(Yg(v,1),Fa(M.callback_loading,T,v))},Ba=(T,M,v)=>{!v||T.setAttribute(M,v)},Vy=(T,M)=>{Ba(T,jg,kr(T,M.data_sizes)),Ba(T,zg,kr(T,M.data_srcset)),Ba(T,Vs,kr(T,M.data_src))},LE=(T,M)=>{$g(T,v=>{Xu(v,jc),Vy(v,M)}),Xu(T,jc),Vy(T,M)},OE=(T,M)=>{Xu(T,Yp),Ba(T,Vs,kr(T,M.data_src))},NE=(T,M)=>{By(T,v=>{Xu(v,Yp),Ba(v,Vs,kr(v,M.data_src))}),Xu(T,ky),Ba(T,Ay,kr(T,M.data_poster)),Ba(T,Vs,kr(T,M.data_src)),T.load()},DE=(T,M)=>{Xu(T,Uy),Ba(T,Ry,kr(T,M.data_src))},FE=(T,M,v)=>{const b=kr(T,M.data_bg),q=kr(T,M.data_bg_hidpi),ht=Ty&&q?q:b;!ht||(T.style.backgroundImage=`url("${ht}")`,Ny(T).setAttribute(Vs,ht),jy(T,M,v))},BE=(T,M,v)=>{const b=kr(T,M.data_bg_multi),q=kr(T,M.data_bg_multi_hidpi),ht=Ty&&q?q:b;!ht||(T.style.backgroundImage=ht,zy(T,M,v))},kE=(T,M,v)=>{const b=kr(T,M.data_bg_set);if(!b)return;const q=b.split("|");let ht=q.map(V=>`image-set(${V})`);T.style.backgroundImage=ht.join(),T.style.backgroundImage===""&&(ht=q.map(V=>`-webkit-image-set(${V})`),T.style.backgroundImage=ht.join()),zy(T,M,v)},Wy={IMG:LE,IFRAME:OE,VIDEO:NE,OBJECT:DE},UE=(T,M)=>{const v=Wy[T.tagName];!v||v(T,M)},GE=(T,M,v)=>{const b=Wy[T.tagName];!b||(b(T,M),jy(T,M,v))},HE=["IMG","IFRAME","VIDEO","OBJECT"],zE=T=>HE.indexOf(T.tagName)>-1,Xy=(T,M)=>{M&&!AE(M)&&!RE(M)&&Fa(T.callback_finish,M)},qy=(T,M,v)=>{T.addEventListener(M,v),T.llEvLisnrs[M]=v},jE=(T,M,v)=>{T.removeEventListener(M,v)},Jg=T=>!!T.llEvLisnrs,VE=(T,M,v)=>{Jg(T)||(T.llEvLisnrs={});const b=T.tagName==="VIDEO"?"loadeddata":"load";qy(T,b,M),qy(T,"error",v)},Zg=T=>{if(!Jg(T))return;const M=T.llEvLisnrs;for(let v in M){const b=M[v];jE(T,v,b)}delete T.llEvLisnrs},Yy=(T,M,v)=>{SE(T),Yg(v,-1),ME(v),hs(T,M.class_loading),M.unobserve_completed&&qp(T,v)},WE=(T,M,v,b)=>{const q=qg(M);Yy(M,v,b),Wu(M,v.class_loaded),Ll(M,Cy),Fa(v.callback_loaded,M,b),q||Xy(v,b)},XE=(T,M,v,b)=>{const q=qg(M);Yy(M,v,b),Wu(M,v.class_error),Ll(M,Wg),Fa(v.callback_error,M,b),v.restore_on_error&&Ol(M,jc),q||Xy(v,b)},Kg=(T,M,v)=>{const b=Ny(T)||T;if(Jg(b))return;VE(b,V=>{WE(V,T,M,v),Zg(b)},V=>{XE(V,T,M,v),Zg(b)})},qE=(T,M,v)=>{wE(T),Kg(T,M,v),CE(T),FE(T,M,v),BE(T,M,v),kE(T,M,v)},YE=(T,M,v)=>{Kg(T,M,v),GE(T,M,v)},Qg=(T,M,v)=>{zE(T)?YE(T,M,v):qE(T,M,v)},$E=(T,M,v)=>{T.setAttribute("loading","lazy"),Kg(T,M,v),UE(T,M),Ll(T,Iy)},$y=T=>{T.removeAttribute(Vs),T.removeAttribute(zg),T.removeAttribute(jg)},JE=T=>{$g(T,M=>{$y(M)}),$y(T)},Jy=T=>{$g(T,M=>{Ol(M,jc)}),Ol(T,jc)},ZE={IMG:Jy,IFRAME:T=>{Ol(T,Yp)},VIDEO:T=>{By(T,M=>{Ol(M,Yp)}),Ol(T,ky),T.load()},OBJECT:T=>{Ol(T,Uy)}},KE=T=>{const M=ZE[T.tagName];if(!M){IE(T);return}M(T)},QE=(T,M)=>{Xg(T)||qg(T)||(hs(T,M.class_entered),hs(T,M.class_exited),hs(T,M.class_applied),hs(T,M.class_loading),hs(T,M.class_loaded),hs(T,M.class_error))},tM=(T,M)=>{KE(T),QE(T,M),Xp(T),Hy(T)},eM=(T,M,v,b)=>{!v.cancel_on_exit||!_E(T)||T.tagName==="IMG"&&(Zg(T),JE(T),Jy(T),hs(T,v.class_loading),Yg(b,-1),Xp(T),Fa(v.callback_cancel,T,M,b))},iM=(T,M,v,b)=>{const q=bE(T);Ll(T,gE),Wu(T,v.class_entered),hs(T,v.class_exited),EE(T,v,b),Fa(v.callback_enter,T,M,b),!q&&Qg(T,v,b)},nM=(T,M,v,b)=>{Xg(T)||(Wu(T,v.class_exited),eM(T,M,v,b),Fa(v.callback_exit,T,M,b))},rM=["IMG","IFRAME","VIDEO"],Zy=T=>T.use_native&&"loading"in HTMLImageElement.prototype,oM=(T,M,v)=>{T.forEach(b=>{rM.indexOf(b.tagName)!==-1&&$E(b,M,v)}),Dy(v,0)},sM=T=>T.isIntersecting||T.intersectionRatio>0,aM=T=>({root:T.container===document?null:T.container,rootMargin:T.thresholds||T.threshold+"px"}),lM=(T,M,v)=>{T.forEach(b=>sM(b)?iM(b.target,b,M,v):nM(b.target,b,M,v))},uM=(T,M)=>{M.forEach(v=>{T.observe(v)})},hM=(T,M)=>{TE(T),uM(T,M)},cM=(T,M)=>{!wy||Zy(T)||(M._observer=new IntersectionObserver(v=>{lM(v,T,M)},aM(T)))},Ky=T=>Array.prototype.slice.call(T),Jp=T=>T.container.querySelectorAll(T.elements_selector),dM=T=>Ky(T).filter(Xg),pM=T=>yE(T),fM=T=>Ky(T).filter(pM),Qy=(T,M)=>dM(T||Jp(M)),mM=(T,M)=>{fM(Jp(T)).forEach(b=>{hs(b,T.class_error),Xp(b)}),M.update()},gM=(T,M)=>{!Da||(M._onlineHandler=()=>{mM(T,M)},window.addEventListener("online",M._onlineHandler))},vM=T=>{!Da||window.removeEventListener("online",T._onlineHandler)},Vc=function(T,M){const v=Ey(T);this._settings=v,this.loadingCount=0,cM(v,this),gM(v,this),this.update(M)};Vc.prototype={update:function(T){const M=this._settings,v=Qy(T,M);if(Dy(this,v.length),by||!wy){this.loadAll(v);return}if(Zy(M)){oM(v,M,this);return}hM(this._observer,v)},destroy:function(){this._observer&&this._observer.disconnect(),vM(this),Jp(this._settings).forEach(T=>{Hy(T)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(T){const M=this._settings;Qy(T,M).forEach(b=>{qp(b,this),Qg(b,M,this)})},restoreAll:function(){const T=this._settings;Jp(T).forEach(M=>{tM(M,T)})}},Vc.load=(T,M)=>{const v=Ey(M);Qg(T,v)},Vc.resetStatus=T=>{Xp(T)},Da&&mE(Vc,window.lazyLoadOptions);class tx{constructor({readonly:M,onNewPageIndex:v,onPlay:b}){this._pages=[],this.pageIndex=0,this.setPaused=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new kc,this.readonly=M,this.onNewPageIndex=v,this.onPlay=b,this.render()}set pages(M){this._pages=M,this.refreshPreview(),this.refreshTotalPage(),this.refreshBtnSidebar()}get pages(){return this._pages}unmount(){this.$content.remove(),this.$footer.remove()}setReadonly(M){this.readonly=M,this.$content.classList.toggle(this.wrapClassName("readonly"),M),this.$footer.classList.toggle(this.wrapClassName("readonly"),M),this.$pageNumberInput.disabled=M}destroy(){this.sideEffect.flushAll(),this.unmount()}setPageIndex(M){Number.isNaN(M)||(this.pageIndex=M,this.$pageNumberInput.value=String(M+1))}refreshTotalPage(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}setSmallBox(M){this.isSmallBox!==M&&(this.isSmallBox=M,this.$footer.classList.toggle(this.wrapClassName("float-footer"),M))}render(){return this.renderContent(),this.renderFooter(),this.$content}renderContent(){if(!this.$content){const M=document.createElement("div");M.className=this.wrapClassName("content"),this.$content=M,this.readonly&&M.classList.add(this.wrapClassName("readonly")),M.appendChild(this.renderPreviewMask()),M.appendChild(this.renderPreview())}return this.$content}renderPreview(){if(!this.$preview){const M=document.createElement("div");M.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=M,this.sideEffect.add(()=>(this.previewLazyLoad=new Vc({container:this.$preview,elements_selector:`.${this.wrapClassName("preview-page>img")}`}),()=>{var v;return(v=this.previewLazyLoad)==null?void 0:v.destroy()})),this.refreshPreview(),this.sideEffect.addEventListener(M,"click",v=>{var q;if(this.readonly)return;const b=(q=v.target.dataset)==null?void 0:q.pageIndex;b&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),this.onNewPageIndex(Number(b)),this.togglePreview(!1))})}return this.$preview}refreshPreview(){var q;const{$preview:M}=this,v=this.wrapClassName("preview-page"),b=this.wrapClassName("preview-page-name");for(;M.firstChild;)M.firstChild.remove();this.pages.forEach((ht,V)=>{var vt;const P=(vt=ht.thumbnail)!=null?vt:ht.src.startsWith("ppt")?void 0:ht.src;if(!P)return;const W=String(V),z=document.createElement("a");z.className=v+" "+this.wrapClassName(`preview-page-${V}`),z.setAttribute("href","#"),z.dataset.pageIndex=W;const k=document.createElement("span");k.className=b,k.textContent=String(V+1),k.dataset.pageIndex=W;const Z=document.createElement("img");Z.width=ht.width,Z.height=ht.height,Z.dataset.src=P,Z.dataset.pageIndex=W,z.appendChild(Z),z.appendChild(k),M.appendChild(z)}),(q=this.previewLazyLoad)==null||q.update()}renderPreviewMask(){return this.$previewMask||(this.$previewMask=document.createElement("div"),this.$previewMask.className=this.wrapClassName("preview-mask"),this.sideEffect.addEventListener(this.$previewMask,"click",M=>{this.readonly||M.target===this.$previewMask&&this.togglePreview(!1)})),this.$previewMask}refreshBtnSidebar(){this.$btnSidebar.style.display=this.pages.length>0?"":"none"}renderFooter(){if(!this.$footer){const M=document.createElement("div");M.className=this.wrapClassName("footer"),this.$footer=M,this.readonly&&M.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&M.classList.add(this.wrapClassName("float-footer"));const v=this.renderFooterBtn("btn-sidebar",uE(this.namespace));this.sideEffect.addEventListener(v,"click",()=>{this.readonly||this.togglePreview()}),this.$btnSidebar=v,this.$btnSidebar.style.display="none",this.$footer.appendChild(v);const b=document.createElement("div");b.className=this.wrapClassName("page-jumps");const q=this.renderFooterBtn("btn-page-back",hE(this.namespace));if(this.sideEffect.addEventListener(q,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex-1)}),b.appendChild(q),this.onPlay){const z=this.renderFooterBtn("btn-page-play",dE(this.namespace),pE(this.namespace));this.$btnPlay=z,this.sideEffect.addEventListener(z,"click",()=>{this.readonly||(this.setPlaying(),this.onPlay&&this.onPlay())}),b.appendChild(z)}const ht=this.renderFooterBtn("btn-page-next",cE(this.namespace));this.sideEffect.addEventListener(ht,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex+1)}),b.appendChild(ht);const V=document.createElement("div");V.className=this.wrapClassName("page-number");const P=document.createElement("input");P.className=this.wrapClassName("page-number-input"),P.value=String(this.pageIndex+1),this.readonly&&(P.disabled=!0),this.$pageNumberInput=P,this.sideEffect.addEventListener(P,"focus",()=>{P.select()}),this.sideEffect.addEventListener(P,"change",()=>{this.readonly||P.value&&this.onNewPageIndex(Number(P.value)-1)});const W=document.createElement("span");this.$totalPage=W,V.appendChild(P),V.appendChild(W),this.$footer.appendChild(b),this.$footer.appendChild(V)}return this.$footer}renderFooterBtn(M,v,b){const q=document.createElement("button");return q.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(M),q.appendChild(v),b&&q.appendChild(b),q}togglePreview(M){if(this.isShowPreview=M!=null?M:!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){const v=this.$preview.querySelector("."+this.wrapClassName(`preview-page-${this.pageIndex}`));v&&this.$preview.scrollTo({top:v.offsetTop-16})}}wrapClassName(M){return`${this.namespace}-${M}`}}const _M=new Set(["clicker"]);class yM{constructor({box:M,view:v,mountSlideController:b,mountWhiteboard:q}){this.slideController=null,this.isViewMounted=!1,this.onError=({error:ht})=>{var V;this.viewer.setPaused(),this.$overlay.textContent=`Error on slide[page=${(V=this.slideController)==null?void 0:V.page}]: ${ht.message}`,this.$overlay.style.opacity="1",_o.warn("[Slide] render error",ht)},this.onRenderEnd=()=>{this.$overlay.style.opacity=""},this.refreshPages=()=>{this.slideController&&(this.viewer.pages=yy(this.slideController.slide),this.viewer.setPageIndex(this.getPageIndex(this.slideController.page)),this.scaleDocsToFit())},this.scaleDocsToFit=()=>{if(this.slideController){const{width:ht,height:V}=this.slideController.slide;ht&&V&&(this.whiteboardView.moveCameraToContain({originX:-ht/2,originY:-V/2,width:ht,height:V,animationMode:"immediately"}),this.whiteboardView.setCameraBound({damping:1,maxContentMode:()=>this.whiteboardView.camera.scale,minContentMode:()=>this.whiteboardView.camera.scale,centerX:0,centerY:0,width:ht,height:V}),this.isViewMounted||(this.isViewMounted=!0,console.log("[Slide] mount whiteboard view"),this.mountWhiteboard(this.$whiteboardView)))}},this.onPlay=()=>{this.slideController&&this.slideController.slide.nextStep()},this.onNewPageIndex=ht=>{this.slideController&&this.slideController.jumpToPage(ht+1)},this.sideEffect=new kc,this.namespace="netless-app-slide",this.box=M,this.whiteboardView=v,this.mountSlideController=b,this.mountWhiteboard=q,this.viewer=new tx({readonly:M.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.sideEffect.add(()=>{const ht=V=>{this.setReadonly(V)};return M.events.on("readonly",ht),()=>M.events.off("readonly",ht)}),this.render()}render(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.viewer.$content.appendChild(this.renderOverlay()),this.sideEffect.addEventListener(window,"keydown",M=>{if(this.box.focus&&this.slideController)switch(M.key){case"ArrowUp":case"ArrowLeft":{this.slideController.slide.prevStep();break}case"ArrowRight":case"ArrowDown":{this.slideController.slide.nextStep();break}}})}renderOverlay(){if(!this.$overlay){const M=document.createElement("div");M.className=this.wrapClassName("overlay"),this.$overlay=M}return this.$overlay}renderSlideContainer(){if(!this.$slide){const M=document.createElement("div");M.className=this.wrapClassName("slide"),M.dataset.appKind="Slide",this.$slide=M}return this.$slide}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view")),this.$whiteboardView}mount(){return this.box.mountContent(this.viewer.$content),this.box.mountFooter(this.viewer.$footer),this.slideController=this.mountSlideController({anchor:this.$slide,onRenderEnd:this.onRenderEnd,onTransitionStart:this.viewer.setPlaying,onTransitionEnd:this.viewer.setPaused,onReady:this.refreshPages,onError:this.onError}),this.scaleDocsToFit(),this.sideEffect.add(()=>(this.whiteboardView.callbacks.on("onSizeUpdated",this.scaleDocsToFit),()=>this.whiteboardView.callbacks.off("onSizeUpdated",this.scaleDocsToFit))),this}getPageIndex(M){return(M>0?M:1)-1}unmount(){return this.slideController&&(this.slideController.destroy(),this.slideController=null),this.viewer.unmount(),this}setReadonly(M){this.viewer.setReadonly(M)}destroy(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}toggleClickThrough(M){this.$whiteboardView.style.pointerEvents=!M||_M.has(M)?"none":"auto"}wrapClassName(M){return`${this.namespace}-${M}`}}let tv=!1;const ex=2,Wc=T=>"["+T+"]",Zp={map:new Map,queue:[],validateQueue(){for(zn("[Slide] freezer: validate",Wc(this.queue));this.queue.length>ex;){const T=this.queue.pop(),M=this.map.get(T);M&&(zn("[Slide] freezer: validate-freeze",T,Wc(this.queue)),M.freeze())}},set(T,M){zn("[Slide] freezer: add",T,Wc(this.queue)),this.map.set(T,M),this.queue.includes(T)||this.queue.unshift(T),this.validateQueue()},delete(T){this.map.delete(T),this.queue=this.queue.filter(M=>M!==T),zn("[Slide] freezer: delete",T,Wc(this.queue))},focus(T){const M=this.map.get(T),v=this.queue.indexOf(T);v>-1&&this.queue.splice(v,1),this.queue.unshift(T),this.validateQueue(),zn("[Slide] freezer: focus",T,Wc(this.queue)),M&&M.unfreeze()}},xM=T=>{tv=!0,T.on("focus",({appId:M})=>{Zp.focus(M)})};var ix=(()=>`.netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-overlay{display:flex;align-items:center;justify-content:center;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;background:rgba(255,0,0,.25);transition:opacity .3s;opacity:0;pointer-events:none}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}
|
|
6362
|
+
`)();function bM({container:T,taskId:M,url:v=Gg,debug:b=!1}){if(!M)throw new Error("[Slide] taskId is required");T.style.cssText+="display:flex;flex-direction:column";const q=new nx({target:T});return q.debug=!!b,q.mount(M,v),q}class nx{constructor(M){this.slide=null,this.debug=!1,this.sideEffect=new kc,this.ready=!1,this.readyPromise=new Promise(v=>{this.resolveReady=()=>{this.ready=!0,v()}}),this.hotkeyListener=v=>{if(this.slide)switch(v.key){case"ArrowUp":case"ArrowLeft":{this.slide.prevStep();break}case"ArrowRight":case"ArrowDown":{this.slide.nextStep();break}}},this.onPageChanged=v=>{this.viewer.setPageIndex(v-1)},this.onTransitionStart=()=>{this.viewer.setPlaying()},this.onTransitionEnd=()=>{this.viewer.setPaused()},this.onError=({error:v})=>{this.viewer.setPaused(),console.warn("[Slide] render error",v)},this.destroyed=!1,this.refreshPages=()=>{this.slide&&(this.viewer.pages=yy(this.slide),this.viewer.setPageIndex(this.getPageIndex(this.slide.slideState.currentSlideIndex)))},this.onPlay=()=>{this.slide&&this.slide.nextStep()},this.onNewPageIndex=v=>{this.slide&&this.slide.slideCount>0&&this.slide.renderSlide(cy(v+1,1,this.slide.slideCount))},this.namespace="netless-app-slide",this.target=M.target,this.bgColor=_y(this.target),this.viewer=new tx({readonly:!1,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.render()}render(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.registerHotKeys(window)}registerHotKeys(M){this.sideEffect.addEventListener(M,"keydown",this.hotkeyListener,void 0,"hotkey")}mount(M,v){this.target.appendChild(this.renderStyle()),this.target.appendChild(this.viewer.$content),this.target.appendChild(this.viewer.$footer),this.slide=new yi.Slide({anchor:this.$slide,interactive:!0,mode:"local",resize:!0,controller:this.debug,enableGlobalClick:!0,renderOptions:{minFPS:25,maxFPS:30,autoFPS:!0,autoResolution:!0,transactionBgColor:this.bgColor}}),this.registerEventListeners(),this.slide.setResource(M,v),this.slide.renderSlide(1)}renderStyle(){const M=document.createElement("style");return M.appendChild(document.createTextNode(ix)),M}registerEventListeners(){if(!this.slide)return;const{slide:M}=this;M.on(yi.SLIDE_EVENTS.slideChange,this.onPageChanged),M.on(yi.SLIDE_EVENTS.renderStart,this.onTransitionStart),M.on(yi.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),M.on(yi.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),M.on(yi.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),M.on(yi.SLIDE_EVENTS.renderError,this.onError),M.on(yi.SLIDE_EVENTS.renderEnd,this.resolveReady),this.readyPromise.then(this.refreshPages)}destroy(){this.sideEffect.flushAll(),this.slide&&!this.destroyed&&(this.slide.destroy(),this.destroyed=!0),this.viewer.destroy()}getPageIndex(M){return(M>0?M:1)-1}renderSlideContainer(){if(!this.$slide){const M=document.createElement("div");M.className=this.wrapClassName("slide"),M.dataset.appKind="Slide",this.$slide=M}return this.$slide}wrapClassName(M){return`${this.namespace}-${M}`}}const wM=yi.Slide.usePlugin.bind(yi.Slide),ev="0.2.9",SM={kind:"Slide",setup(T){if(console.log("[Slide] setup @ "+ev),T.getIsWritable()&&T.storage.ensureState(Hg),!T.storage.state.taskId)throw new Error("[Slide] no taskId");const M=T.getView();if(!M)throw new Error("[Slide] no view, please set scenePath on addApp()");M.disableCameraTransform=!0;const v=T.getBox();v.mountStyles(ix);try{v.$content.dataset.appSlideVersion=ev}catch{}const b=T.getInitScenePath();let q=null;const ht=z=>{const k=T.getRoom();if(q&&q.slideController){let Z=!1;k&&T.getIsWritable()&&(xy(k,T,q.slideController.slide,b),Z=!0),zn("[Slide] page to",z,Z?"(synced)":""),q.viewer.setPageIndex(z-1)}},V=z=>{const k=new lE(XT(ly({context:T},z),{onPageChanged:ht}));return tv&&Zp.set(T.appId,k),_o.setAppController(T.appId,k),k.readyPromise.then(z.onReady).then(()=>{const Z=T.getRoom();let vt=!1;Z&&T.getIsWritable()&&(xy(Z,T,k.slide,b),vt=!0);const Ot=k.slide.slideState.currentSlideIndex;zn("[Slide] page to",Ot,vt?"(synced)":"","(on ready)"),k.slide.on("renderEnd",z.onRenderEnd)}),k};q=new yM({box:v,view:M,mountSlideController:V,mountWhiteboard:T.mountView.bind(T)});const P=T.getRoom(),W=new kc;return W.add(()=>{var z;return _o.setAppContext(T.appId,T),_o.enable=((z=T.getAppOptions())==null?void 0:z.debug)||!1,_o.level="debug",()=>_o.deleteApp(T.appId)}),P&&(q.toggleClickThrough(P.state.memberState.currentApplianceName),W.add(()=>{const z=k=>{k.memberState&&q&&q.toggleClickThrough(k.memberState.currentApplianceName)};return P.callbacks.on("onRoomStateChanged",z),()=>P.callbacks.off("onRoomStateChanged",z)})),T.emitter.on("destroy",()=>{zn("[Slide] destroy",T.appId),tv&&Zp.delete(T.appId),W.flushAll(),q&&(q.destroy(),q=null)}),q.mount(),{slide:()=>{var z;return(z=q==null?void 0:q.slideController)==null?void 0:z.slide},nextStep:()=>{var z;return q&&q.slideController?((z=q==null?void 0:q.slideController)==null||z.slide.nextStep(),!0):!1},prevStep:()=>{var z;return q&&q.slideController?((z=q==null?void 0:q.slideController)==null||z.slide.prevStep(),!0):!1},position:()=>{const z=q==null?void 0:q.slideController;if(z)return[z.page,z.pageCount]},nextPage:()=>{const z=q==null?void 0:q.slideController;if(z){const{page:k,pageCount:Z}=z;if(Z>0&&k<Z)return z.jumpToPage(k+1),!0}return!1},prevPage:()=>{const z=q==null?void 0:q.slideController;if(z){const{page:k,pageCount:Z}=z;if(Z>0&&k>1)return z.jumpToPage(k-1),!0}return!1},jumpToPage:z=>{const k=q==null?void 0:q.slideController;if(k){const{page:Z,pageCount:vt}=k;if(vt>0&&Z>0&&Z<=vt)return k.jumpToPage(z),!0}return!1}}}};return yn.DefaultUrl=Gg,yn.FreezerLength=ex,yn.Slide=yi.Slide,yn.SlidePreviewer=nx,yn.addHooks=xM,yn.apps=Zp,yn.default=SM,yn.previewSlide=bM,yn.usePlugin=wM,yn.version=ev,Object.defineProperties(yn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),yn}({});
|
|
6363
6363
|
//# sourceMappingURL=main.iife.js.map
|