@codeages/agent-web-sdk 1.2.5 → 1.2.7

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.
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
6
6
  <title>Agent UI</title>
7
- <script type="module" crossorigin src="./index-Bf0JbQUf.js"></script>
8
- <link rel="stylesheet" crossorigin href="./index-DZcQ51hf.css">
7
+ <script type="module" crossorigin src="./index-B8BWFNq0.js"></script>
8
+ <link rel="stylesheet" crossorigin href="./index-BhbG7OqK.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="app"></div>
package/package.json CHANGED
@@ -1,20 +1,25 @@
1
1
  {
2
2
  "name": "@codeages/agent-web-sdk",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
8
  "module": "./dist/agent-sdk.js",
9
9
  "types": "./dist/agent-sdk.d.ts",
10
+ "unpkg": "./dist/agent-sdk.1.2.7.iife.js",
11
+ "jsdelivr": "./dist/agent-sdk.1.2.7.iife.js",
10
12
  "exports": {
11
13
  ".": {
14
+ "types": "./dist/agent-sdk.d.ts",
12
15
  "import": "./dist/agent-sdk.js"
13
- }
16
+ },
17
+ "./iife": "./dist/agent-sdk.1.2.7.iife.js",
18
+ "./ui/*": "./dist/ui/*"
14
19
  },
15
20
  "scripts": {
16
21
  "dev": "vite",
17
- "build": "vue-tsc -b && vite build",
22
+ "build": "node scripts/sync-version-entries.mjs && vue-tsc -b && vite build --mode esm && vite build --mode iife",
18
23
  "preview": "vite preview"
19
24
  },
20
25
  "devDependencies": {
@@ -1,20 +0,0 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".agent-sdk-floating-button{position:fixed;z-index:2000;width:50px;height:50px;border-radius:50%;touch-action:none;-webkit-user-select:none;user-select:none;opacity:60%;box-shadow:0 2.7px 18px #32b2ff1a,0 1.8px 9px #32b2ff66}.agent-sdk-floating-button:hover{cursor:pointer}.agent-sdk-floating-button img{width:100%;height:100%}.agent-sdk-floating-button img:hover{cursor:pointer}.agent-sdk-unread-count{display:none;position:absolute;z-index:2000;right:0;top:0;background-color:#ff4d4f;padding:0 6px;border-radius:999px;font-size:12px;line-height:16px;color:#fff;font-weight:500}.agent-sdk-unread-count:hover{cursor:pointer}.agent-sdk-floating-iframe{display:none;position:fixed;border:none}.agent-sdk-floating-reminder{position:fixed;z-index:2000;width:fit-content;height:fit-content;bottom:20px;right:90px;border-radius:20px 20px 0;border:1px solid #CEB2FF;background:linear-gradient(137deg,#fbf7ff 3.4%,#f7f9ff 35.69%,#f7fcff 97.01%);box-shadow:0 4px 12px #32b2ff0d,0 4px 10px #32b2ff0d,0 4px 12px #00588e0d;padding:16px 20px;display:none;flex-direction:column}.agent-sdk-floating-reminder .title-container{width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.agent-sdk-floating-reminder .title-container .title,.agent-sdk-floating-reminder .content{display:none}.agent-sdk-floating-reminder .title-container .title{font-size:16px;font-style:normal;font-weight:500;line-height:24px;background:linear-gradient(116deg,#9832ff 16.39%,#323cff 45.17%,#32adff 83.33%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.agent-sdk-floating-reminder .title-container svg{cursor:pointer}.agent-sdk-floating-reminder .content{color:#37393d;font-size:14px;font-style:normal;font-weight:400;line-height:24px}.agent-sdk-floating-reminder button{display:none;border:none;width:fit-content;padding:4px 15px;border-radius:999px;background:linear-gradient(137deg,#9832ff 3.4%,#323cff 35.69%,#32c8ff 97.01%);color:#fff;font-size:14px;font-style:normal;font-weight:500;line-height:22px;cursor:pointer}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- var AgentSDK=function(){"use strict";function Ee(u){return Ee=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},Ee(u)}function gn(u,r){if(!(u instanceof r))throw new TypeError("Cannot call a class as a function")}function Rr(u){var r=function(o,a){if(Ee(o)!="object"||!o)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var y=d.call(o,a);if(Ee(y)!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(u,"string");return Ee(r)=="symbol"?r:String(r)}function Dr(u,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,Rr(a.key),a)}}function vn(u,r,o){return r&&Dr(u.prototype,r),Object.defineProperty(u,"prototype",{writable:!1}),u}var Br=function(){function u(){gn(this,u),this._listeners={}}return vn(u,[{key:"on",value:function(r,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;this._listeners[r]||(this._listeners[r]=[]),o._priority=parseInt(a)||0,this._listeners[r].indexOf(o)===-1&&(this._listeners[r].push(o),this._listeners[r].length>1&&this._listeners[r].sort(this.listenerSorter))}},{key:"listenerSorter",value:function(r,o){return r._priority-o._priority}},{key:"off",value:function(r,o){if(this._listeners[r]!==void 0)if(o!==void 0){var a=this._listeners[r].indexOf(o);-1<a&&this._listeners[r].splice(a,1)}else delete this._listeners[r]}},{key:"trigger",value:function(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof r=="string"&&(r={type:r,data:Ee(o)==="object"&&o!==null?o:{}}),this._listeners[r.type]!==void 0)for(var a=this._listeners[r.type].length-1;a>=0;a--)this._listeners[r.type][a](r)}},{key:"destroy",value:function(){this._listeners={}}}]),u}();function Mt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Mt=function(){return r};var u,r={},o=Object.prototype,a=o.hasOwnProperty,d=Object.defineProperty||function(w,E,I){w[E]=I.value},y=typeof Symbol=="function"?Symbol:{},k=y.iterator||"@@iterator",C=y.asyncIterator||"@@asyncIterator",F=y.toStringTag||"@@toStringTag";function G(w,E,I){return Object.defineProperty(w,E,{value:I,enumerable:!0,configurable:!0,writable:!0}),w[E]}try{G({},"")}catch{G=function(E,I,Y){return E[I]=Y}}function N(w,E,I,Y){var D=E&&E.prototype instanceof be?E:be,Q=Object.create(D.prototype),ee=new $(Y||[]);return d(Q,"_invoke",{value:V(w,I,ee)}),Q}function J(w,E,I){try{return{type:"normal",arg:w.call(E,I)}}catch(Y){return{type:"throw",arg:Y}}}r.wrap=N;var q="suspendedStart",ne="suspendedYield",re="executing",he="completed",oe={};function be(){}function pe(){}function ge(){}var S={};G(S,k,function(){return this});var T=Object.getPrototypeOf,M=T&&T(T(ce([])));M&&M!==o&&a.call(M,k)&&(S=M);var v=ge.prototype=be.prototype=Object.create(S);function _(w){["next","throw","return"].forEach(function(E){G(w,E,function(I){return this._invoke(E,I)})})}function H(w,E){function I(D,Q,ee,ae){var ue=J(w[D],w,Q);if(ue.type!=="throw"){var Te=ue.arg,Oe=Te.value;return Oe&&Ee(Oe)=="object"&&a.call(Oe,"__await")?E.resolve(Oe.__await).then(function(Se){I("next",Se,ee,ae)},function(Se){I("throw",Se,ee,ae)}):E.resolve(Oe).then(function(Se){Te.value=Se,ee(Te)},function(Se){return I("throw",Se,ee,ae)})}ae(ue.arg)}var Y;d(this,"_invoke",{value:function(D,Q){function ee(){return new E(function(ae,ue){I(D,Q,ae,ue)})}return Y=Y?Y.then(ee,ee):ee()}})}function V(w,E,I){var Y=q;return function(D,Q){if(Y===re)throw new Error("Generator is already running");if(Y===he){if(D==="throw")throw Q;return{value:u,done:!0}}for(I.method=D,I.arg=Q;;){var ee=I.delegate;if(ee){var ae=se(ee,I);if(ae){if(ae===oe)continue;return ae}}if(I.method==="next")I.sent=I._sent=I.arg;else if(I.method==="throw"){if(Y===q)throw Y=he,I.arg;I.dispatchException(I.arg)}else I.method==="return"&&I.abrupt("return",I.arg);Y=re;var ue=J(w,E,I);if(ue.type==="normal"){if(Y=I.done?he:ne,ue.arg===oe)continue;return{value:ue.arg,done:I.done}}ue.type==="throw"&&(Y=he,I.method="throw",I.arg=ue.arg)}}}function se(w,E){var I=E.method,Y=w.iterator[I];if(Y===u)return E.delegate=null,I==="throw"&&w.iterator.return&&(E.method="return",E.arg=u,se(w,E),E.method==="throw")||I!=="return"&&(E.method="throw",E.arg=new TypeError("The iterator does not provide a '"+I+"' method")),oe;var D=J(Y,w.iterator,E.arg);if(D.type==="throw")return E.method="throw",E.arg=D.arg,E.delegate=null,oe;var Q=D.arg;return Q?Q.done?(E[w.resultName]=Q.value,E.next=w.nextLoc,E.method!=="return"&&(E.method="next",E.arg=u),E.delegate=null,oe):Q:(E.method="throw",E.arg=new TypeError("iterator result is not an object"),E.delegate=null,oe)}function ie(w){var E={tryLoc:w[0]};1 in w&&(E.catchLoc=w[1]),2 in w&&(E.finallyLoc=w[2],E.afterLoc=w[3]),this.tryEntries.push(E)}function ve(w){var E=w.completion||{};E.type="normal",delete E.arg,w.completion=E}function $(w){this.tryEntries=[{tryLoc:"root"}],w.forEach(ie,this),this.reset(!0)}function ce(w){if(w||w===""){var E=w[k];if(E)return E.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var I=-1,Y=function D(){for(;++I<w.length;)if(a.call(w,I))return D.value=w[I],D.done=!1,D;return D.value=u,D.done=!0,D};return Y.next=Y}}throw new TypeError(Ee(w)+" is not iterable")}return pe.prototype=ge,d(v,"constructor",{value:ge,configurable:!0}),d(ge,"constructor",{value:pe,configurable:!0}),pe.displayName=G(ge,F,"GeneratorFunction"),r.isGeneratorFunction=function(w){var E=typeof w=="function"&&w.constructor;return!!E&&(E===pe||(E.displayName||E.name)==="GeneratorFunction")},r.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,ge):(w.__proto__=ge,G(w,F,"GeneratorFunction")),w.prototype=Object.create(v),w},r.awrap=function(w){return{__await:w}},_(H.prototype),G(H.prototype,C,function(){return this}),r.AsyncIterator=H,r.async=function(w,E,I,Y,D){D===void 0&&(D=Promise);var Q=new H(N(w,E,I,Y),D);return r.isGeneratorFunction(E)?Q:Q.next().then(function(ee){return ee.done?ee.value:Q.next()})},_(v),G(v,F,"Generator"),G(v,k,function(){return this}),G(v,"toString",function(){return"[object Generator]"}),r.keys=function(w){var E=Object(w),I=[];for(var Y in E)I.push(Y);return I.reverse(),function D(){for(;I.length;){var Q=I.pop();if(Q in E)return D.value=Q,D.done=!1,D}return D.done=!0,D}},r.values=ce,$.prototype={constructor:$,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(ve),!w)for(var E in this)E.charAt(0)==="t"&&a.call(this,E)&&!isNaN(+E.slice(1))&&(this[E]=u)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var E=this;function I(ue,Te){return Q.type="throw",Q.arg=w,E.next=ue,Te&&(E.method="next",E.arg=u),!!Te}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var D=this.tryEntries[Y],Q=D.completion;if(D.tryLoc==="root")return I("end");if(D.tryLoc<=this.prev){var ee=a.call(D,"catchLoc"),ae=a.call(D,"finallyLoc");if(ee&&ae){if(this.prev<D.catchLoc)return I(D.catchLoc,!0);if(this.prev<D.finallyLoc)return I(D.finallyLoc)}else if(ee){if(this.prev<D.catchLoc)return I(D.catchLoc,!0)}else{if(!ae)throw new Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return I(D.finallyLoc)}}}},abrupt:function(w,E){for(var I=this.tryEntries.length-1;I>=0;--I){var Y=this.tryEntries[I];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var D=Y;break}}D&&(w==="break"||w==="continue")&&D.tryLoc<=E&&E<=D.finallyLoc&&(D=null);var Q=D?D.completion:{};return Q.type=w,Q.arg=E,D?(this.method="next",this.next=D.finallyLoc,oe):this.complete(Q)},complete:function(w,E){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&E&&(this.next=E),oe},finish:function(w){for(var E=this.tryEntries.length-1;E>=0;--E){var I=this.tryEntries[E];if(I.finallyLoc===w)return this.complete(I.completion,I.afterLoc),ve(I),oe}},catch:function(w){for(var E=this.tryEntries.length-1;E>=0;--E){var I=this.tryEntries[E];if(I.tryLoc===w){var Y=I.completion;if(Y.type==="throw"){var D=Y.arg;ve(I)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(w,E,I){return this.delegate={iterator:ce(w),resultName:E,nextLoc:I},this.method==="next"&&(this.arg=u),oe}},r}function mn(u,r,o,a,d,y,k){try{var C=u[y](k),F=C.value}catch(G){return void o(G)}C.done?r(F):Promise.resolve(F).then(a,d)}function yn(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function Ye(u){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ye(u)}function It(){return It=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,r,o){var a=function(y,k){for(;!Object.prototype.hasOwnProperty.call(y,k)&&(y=Ye(y))!==null;);return y}(u,r);if(a){var d=Object.getOwnPropertyDescriptor(a,r);return d.get?d.get.call(arguments.length<3?u:o):d.value}},It.apply(this,arguments)}function Pt(u,r){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,a){return o.__proto__=a,o},Pt(u,r)}function Lr(u){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,a=Ye(u);if(r){var d=Ye(this).constructor;o=Reflect.construct(a,arguments,d)}else o=a.apply(this,arguments);return function(y,k){if(k&&(Ee(k)==="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yn(y)}(this,o)}}var _r=function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&Pt(a,d)})(o,Br);var r=Lr(o);function o(){var a,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100*Math.random()|0;return gn(this,o),(a=r.call(this)).id="BELLHOP:".concat(d),a.connected=!1,a.isChild=!0,a.connecting=!1,a.debug=!1,a.origin="*",a._sendLater=[],a.iframe=null,a.receive=a.receive.bind(yn(a)),a}return vn(o,[{key:"receive",value:function(a){if(this.target===a.source)if(this.logDebugMessage(!0,a),a.data==="connected")this.onConnectionReceived(a.data);else{var d=a.data;if(typeof d=="string")try{d=JSON.parse(d)}catch(y){console.warn("Bellhop error: ",y)}this.connected&&Ee(d)==="object"&&d.type&&this.trigger(d)}}},{key:"onConnectionReceived",value:function(a){if(this.connecting=!1,this.connected=!0,!this.isChild){if(!this.target)return;this.target.postMessage(a,this.origin)}for(var d=0;d<this._sendLater.length;d++){var y=this._sendLater[d],k=y.type,C=y.data;this.send(k,C)}this._sendLater.length=0,this.trigger("connected")}},{key:"connect",value:function(a){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";this.connecting||(this.disconnect(),this.connecting=!0,a instanceof HTMLIFrameElement&&(this.iframe=a),this.isChild=a===void 0,this.supported=!0,this.isChild&&(this.supported=window!=a),this.origin=d,window.addEventListener("message",this.receive),this.isChild&&(window===this.target?this.trigger("failed"):this.target.postMessage("connected",this.origin)))}},{key:"disconnect",value:function(){this.connected=!1,this.connecting=!1,this.origin=null,this.iframe=null,this.isChild=!0,this._sendLater.length=0,window.removeEventListener("message",this.receive)}},{key:"send",value:function(a){if(typeof a!="string")throw"The event type must be a string";var d={type:a,data:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}};this.logDebugMessage(!1,d),this.connecting?this._sendLater.push(d):this.target.postMessage(JSON.stringify(d),this.origin)}},{key:"fetch",value:function(a,d){var y=this,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!this.connecting&&!this.connected)throw"No connection, please call connect() first";this.on(a,function F(G){C&&y.off(G.type,F),d(G)}),this.send(a,k)}},{key:"respond",value:function(a){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=arguments.length>2&&arguments[2]!==void 0&&arguments[2],k=this,C=function(){var F,G=(F=Mt().mark(function N(J){return Mt().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(y&&k.off(J,C),typeof d!="function"){q.next=10;break}return q.t0=k,q.t1=J.type,q.next=6,d();case 6:q.t2=q.sent,q.t0.send.call(q.t0,q.t1,q.t2),q.next=11;break;case 10:k.send(J.type,d);case 11:case"end":return q.stop()}},N)}),function(){var N=this,J=arguments;return new Promise(function(q,ne){var re=F.apply(N,J);function he(be){mn(re,q,ne,he,oe,"next",be)}function oe(be){mn(re,q,ne,he,oe,"throw",be)}he(void 0)})});return function(N){return G.apply(this,arguments)}}();this.on(a,C)}},{key:"logDebugMessage",value:function(){var a=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1?arguments[1]:void 0;this.debug&&typeof this.debug=="function"?this.debug({isChild:this.isChild,received:a,message:d}):this.debug&&console.log("Bellhop Instance (".concat(this.isChild?"Child":"Parent",") ").concat(a?"Receieved":"Sent"),d)}},{key:"destroy",value:function(){It(Ye(o.prototype),"destroy",this).call(this),this.disconnect(),this._sendLater.length=0}},{key:"target",get:function(){return this.isChild?window.parent:this.iframe.contentWindow}}]),o}();function Fr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var it={exports:{}},bn;function Nr(){if(bn)return it.exports;bn=1;var u=typeof Reflect=="object"?Reflect:null,r=u&&typeof u.apply=="function"?u.apply:function(T,M,v){return Function.prototype.apply.call(T,M,v)},o;u&&typeof u.ownKeys=="function"?o=u.ownKeys:Object.getOwnPropertySymbols?o=function(T){return Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T))}:o=function(T){return Object.getOwnPropertyNames(T)};function a(S){console&&console.warn&&console.warn(S)}var d=Number.isNaN||function(T){return T!==T};function y(){y.init.call(this)}it.exports=y,it.exports.once=be,y.EventEmitter=y,y.prototype._events=void 0,y.prototype._eventsCount=0,y.prototype._maxListeners=void 0;var k=10;function C(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(y,"defaultMaxListeners",{enumerable:!0,get:function(){return k},set:function(S){if(typeof S!="number"||S<0||d(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");k=S}}),y.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},y.prototype.setMaxListeners=function(T){if(typeof T!="number"||T<0||d(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this};function F(S){return S._maxListeners===void 0?y.defaultMaxListeners:S._maxListeners}y.prototype.getMaxListeners=function(){return F(this)},y.prototype.emit=function(T){for(var M=[],v=1;v<arguments.length;v++)M.push(arguments[v]);var _=T==="error",H=this._events;if(H!==void 0)_=_&&H.error===void 0;else if(!_)return!1;if(_){var V;if(M.length>0&&(V=M[0]),V instanceof Error)throw V;var se=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw se.context=V,se}var ie=H[T];if(ie===void 0)return!1;if(typeof ie=="function")r(ie,this,M);else for(var ve=ie.length,$=re(ie,ve),v=0;v<ve;++v)r($[v],this,M);return!0};function G(S,T,M,v){var _,H,V;if(C(M),H=S._events,H===void 0?(H=S._events=Object.create(null),S._eventsCount=0):(H.newListener!==void 0&&(S.emit("newListener",T,M.listener?M.listener:M),H=S._events),V=H[T]),V===void 0)V=H[T]=M,++S._eventsCount;else if(typeof V=="function"?V=H[T]=v?[M,V]:[V,M]:v?V.unshift(M):V.push(M),_=F(S),_>0&&V.length>_&&!V.warned){V.warned=!0;var se=new Error("Possible EventEmitter memory leak detected. "+V.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");se.name="MaxListenersExceededWarning",se.emitter=S,se.type=T,se.count=V.length,a(se)}return S}y.prototype.addListener=function(T,M){return G(this,T,M,!1)},y.prototype.on=y.prototype.addListener,y.prototype.prependListener=function(T,M){return G(this,T,M,!0)};function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function J(S,T,M){var v={fired:!1,wrapFn:void 0,target:S,type:T,listener:M},_=N.bind(v);return _.listener=M,v.wrapFn=_,_}y.prototype.once=function(T,M){return C(M),this.on(T,J(this,T,M)),this},y.prototype.prependOnceListener=function(T,M){return C(M),this.prependListener(T,J(this,T,M)),this},y.prototype.removeListener=function(T,M){var v,_,H,V,se;if(C(M),_=this._events,_===void 0)return this;if(v=_[T],v===void 0)return this;if(v===M||v.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete _[T],_.removeListener&&this.emit("removeListener",T,v.listener||M));else if(typeof v!="function"){for(H=-1,V=v.length-1;V>=0;V--)if(v[V]===M||v[V].listener===M){se=v[V].listener,H=V;break}if(H<0)return this;H===0?v.shift():he(v,H),v.length===1&&(_[T]=v[0]),_.removeListener!==void 0&&this.emit("removeListener",T,se||M)}return this},y.prototype.off=y.prototype.removeListener,y.prototype.removeAllListeners=function(T){var M,v,_;if(v=this._events,v===void 0)return this;if(v.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):v[T]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete v[T]),this;if(arguments.length===0){var H=Object.keys(v),V;for(_=0;_<H.length;++_)V=H[_],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(M=v[T],typeof M=="function")this.removeListener(T,M);else if(M!==void 0)for(_=M.length-1;_>=0;_--)this.removeListener(T,M[_]);return this};function q(S,T,M){var v=S._events;if(v===void 0)return[];var _=v[T];return _===void 0?[]:typeof _=="function"?M?[_.listener||_]:[_]:M?oe(_):re(_,_.length)}y.prototype.listeners=function(T){return q(this,T,!0)},y.prototype.rawListeners=function(T){return q(this,T,!1)},y.listenerCount=function(S,T){return typeof S.listenerCount=="function"?S.listenerCount(T):ne.call(S,T)},y.prototype.listenerCount=ne;function ne(S){var T=this._events;if(T!==void 0){var M=T[S];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}y.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function re(S,T){for(var M=new Array(T),v=0;v<T;++v)M[v]=S[v];return M}function he(S,T){for(;T+1<S.length;T++)S[T]=S[T+1];S.pop()}function oe(S){for(var T=new Array(S.length),M=0;M<T.length;++M)T[M]=S[M].listener||S[M];return T}function be(S,T){return new Promise(function(M,v){function _(V){S.removeListener(T,H),v(V)}function H(){typeof S.removeListener=="function"&&S.removeListener("error",_),M([].slice.call(arguments))}ge(S,T,H,{once:!0}),T!=="error"&&pe(S,_,{once:!0})})}function pe(S,T,M){typeof S.on=="function"&&ge(S,"error",T,M)}function ge(S,T,M,v){if(typeof S.on=="function")v.once?S.once(T,M):S.on(T,M);else if(typeof S.addEventListener=="function")S.addEventListener(T,function _(H){v.once&&S.removeEventListener(T,_),M(H)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return it.exports}var Yr=Nr();const ke=Object.create(null);ke.open="0",ke.close="1",ke.ping="2",ke.pong="3",ke.message="4",ke.upgrade="5",ke.noop="6";const ot=Object.create(null);Object.keys(ke).forEach(u=>{ot[ke[u]]=u});const Ct={type:"error",data:"parser error"},wn=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",xn=typeof ArrayBuffer=="function",En=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,Rt=({type:u,data:r},o,a)=>wn&&r instanceof Blob?o?a(r):kn(r,a):xn&&(r instanceof ArrayBuffer||En(r))?o?a(r):kn(new Blob([r]),a):a(ke[u]+(r||"")),kn=(u,r)=>{const o=new FileReader;return o.onload=function(){const a=o.result.split(",")[1];r("b"+(a||""))},o.readAsDataURL(u)};function An(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let Dt;function zr(u,r){if(wn&&u.data instanceof Blob)return u.data.arrayBuffer().then(An).then(r);if(xn&&(u.data instanceof ArrayBuffer||En(u.data)))return r(An(u.data));Rt(u,!1,o=>{Dt||(Dt=new TextEncoder),r(Dt.encode(o))})}const Tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ve=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let u=0;u<Tn.length;u++)Ve[Tn.charCodeAt(u)]=u;const jr=u=>{let r=u.length*.75,o=u.length,a,d=0,y,k,C,F;u[u.length-1]==="="&&(r--,u[u.length-2]==="="&&r--);const G=new ArrayBuffer(r),N=new Uint8Array(G);for(a=0;a<o;a+=4)y=Ve[u.charCodeAt(a)],k=Ve[u.charCodeAt(a+1)],C=Ve[u.charCodeAt(a+2)],F=Ve[u.charCodeAt(a+3)],N[d++]=y<<2|k>>4,N[d++]=(k&15)<<4|C>>2,N[d++]=(C&3)<<6|F&63;return G},Gr=typeof ArrayBuffer=="function",Bt=(u,r)=>{if(typeof u!="string")return{type:"message",data:Sn(u,r)};const o=u.charAt(0);return o==="b"?{type:"message",data:Vr(u.substring(1),r)}:ot[o]?u.length>1?{type:ot[o],data:u.substring(1)}:{type:ot[o]}:Ct},Vr=(u,r)=>{if(Gr){const o=jr(u);return Sn(o,r)}else return{base64:!0,data:u}},Sn=(u,r)=>{switch(r){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}},On="",Ur=(u,r)=>{const o=u.length,a=new Array(o);let d=0;u.forEach((y,k)=>{Rt(y,!1,C=>{a[k]=C,++d===o&&r(a.join(On))})})},qr=(u,r)=>{const o=u.split(On),a=[];for(let d=0;d<o.length;d++){const y=Bt(o[d],r);if(a.push(y),y.type==="error")break}return a};function Wr(){return new TransformStream({transform(u,r){zr(u,o=>{const a=o.length;let d;if(a<126)d=new Uint8Array(1),new DataView(d.buffer).setUint8(0,a);else if(a<65536){d=new Uint8Array(3);const y=new DataView(d.buffer);y.setUint8(0,126),y.setUint16(1,a)}else{d=new Uint8Array(9);const y=new DataView(d.buffer);y.setUint8(0,127),y.setBigUint64(1,BigInt(a))}u.data&&typeof u.data!="string"&&(d[0]|=128),r.enqueue(d),r.enqueue(o)})}})}let Lt;function st(u){return u.reduce((r,o)=>r+o.length,0)}function at(u,r){if(u[0].length===r)return u.shift();const o=new Uint8Array(r);let a=0;for(let d=0;d<r;d++)o[d]=u[0][a++],a===u[0].length&&(u.shift(),a=0);return u.length&&a<u[0].length&&(u[0]=u[0].slice(a)),o}function Kr(u,r){Lt||(Lt=new TextDecoder);const o=[];let a=0,d=-1,y=!1;return new TransformStream({transform(k,C){for(o.push(k);;){if(a===0){if(st(o)<1)break;const F=at(o,1);y=(F[0]&128)===128,d=F[0]&127,d<126?a=3:d===126?a=1:a=2}else if(a===1){if(st(o)<2)break;const F=at(o,2);d=new DataView(F.buffer,F.byteOffset,F.length).getUint16(0),a=3}else if(a===2){if(st(o)<8)break;const F=at(o,8),G=new DataView(F.buffer,F.byteOffset,F.length),N=G.getUint32(0);if(N>Math.pow(2,21)-1){C.enqueue(Ct);break}d=N*Math.pow(2,32)+G.getUint32(4),a=3}else{if(st(o)<d)break;const F=at(o,d);C.enqueue(Bt(y?F:Lt.decode(F),r)),a=0}if(d===0||d>u){C.enqueue(Ct);break}}}})}const Mn=4;function te(u){if(u)return Zr(u)}function Zr(u){for(var r in te.prototype)u[r]=te.prototype[r];return u}te.prototype.on=te.prototype.addEventListener=function(u,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(r),this},te.prototype.once=function(u,r){function o(){this.off(u,o),r.apply(this,arguments)}return o.fn=r,this.on(u,o),this},te.prototype.off=te.prototype.removeListener=te.prototype.removeAllListeners=te.prototype.removeEventListener=function(u,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+u];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var a,d=0;d<o.length;d++)if(a=o[d],a===r||a.fn===r){o.splice(d,1);break}return o.length===0&&delete this._callbacks["$"+u],this},te.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),o=this._callbacks["$"+u],a=1;a<arguments.length;a++)r[a-1]=arguments[a];if(o){o=o.slice(0);for(var a=0,d=o.length;a<d;++a)o[a].apply(this,r)}return this},te.prototype.emitReserved=te.prototype.emit,te.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]},te.prototype.hasListeners=function(u){return!!this.listeners(u).length};const ct=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,o)=>o(r,0),ye=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Hr="arraybuffer";function rs(){}function In(u,...r){return r.reduce((o,a)=>(u.hasOwnProperty(a)&&(o[a]=u[a]),o),{})}const Jr=ye.setTimeout,Qr=ye.clearTimeout;function ut(u,r){r.useNativeTimers?(u.setTimeoutFn=Jr.bind(ye),u.clearTimeoutFn=Qr.bind(ye)):(u.setTimeoutFn=ye.setTimeout.bind(ye),u.clearTimeoutFn=ye.clearTimeout.bind(ye))}const Xr=1.33;function $r(u){return typeof u=="string"?ei(u):Math.ceil((u.byteLength||u.size)*Xr)}function ei(u){let r=0,o=0;for(let a=0,d=u.length;a<d;a++)r=u.charCodeAt(a),r<128?o+=1:r<2048?o+=2:r<55296||r>=57344?o+=3:(a++,o+=4);return o}function Pn(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ti(u){let r="";for(let o in u)u.hasOwnProperty(o)&&(r.length&&(r+="&"),r+=encodeURIComponent(o)+"="+encodeURIComponent(u[o]));return r}function ni(u){let r={},o=u.split("&");for(let a=0,d=o.length;a<d;a++){let y=o[a].split("=");r[decodeURIComponent(y[0])]=decodeURIComponent(y[1])}return r}class ri extends Error{constructor(r,o,a){super(r),this.description=o,this.context=a,this.type="TransportError"}}class _t extends te{constructor(r){super(),this.writable=!1,ut(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,o,a){return super.emitReserved("error",new ri(r,o,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const o=Bt(r,this.socket.binaryType);this.onPacket(o)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,o={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(o)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const o=ti(r);return o.length?"?"+o:""}}class ii extends _t{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const o=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||o()})),this.writable||(a++,this.once("drain",function(){--a||o()}))}else o()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const o=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};qr(r,this.socket.binaryType).forEach(o),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,Ur(r,o=>{this.doWrite(o,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",o=this.query||{};return this.opts.timestampRequests!==!1&&(o[this.opts.timestampParam]=Pn()),!this.supportsBinary&&!o.sid&&(o.b64=1),this.createUri(r,o)}}let Cn=!1;try{Cn=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const oi=Cn;function si(){}class ai extends ii{constructor(r){if(super(r),typeof location<"u"){const o=location.protocol==="https:";let a=location.port;a||(a=o?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||a!==r.port}}doWrite(r,o){const a=this.request({method:"POST",data:r});a.on("success",o),a.on("error",(d,y)=>{this.onError("xhr post error",d,y)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(o,a)=>{this.onError("xhr poll error",o,a)}),this.pollXhr=r}}class Ae extends te{constructor(r,o,a){super(),this.createRequest=r,ut(this,a),this._opts=a,this._method=a.method||"GET",this._uri=o,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var r;const o=In(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");o.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(o);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let d in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(d)&&a.setRequestHeader(d,this._opts.extraHeaders[d])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var d;a.readyState===3&&((d=this._opts.cookieJar)===null||d===void 0||d.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(d){this.setTimeoutFn(()=>{this._onError(d)},0);return}typeof document<"u"&&(this._index=Ae.requestsCount++,Ae.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=si,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ae.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Ae.requestsCount=0,Ae.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Rn);else if(typeof addEventListener=="function"){const u="onpagehide"in ye?"pagehide":"unload";addEventListener(u,Rn,!1)}}function Rn(){for(let u in Ae.requests)Ae.requests.hasOwnProperty(u)&&Ae.requests[u].abort()}const ci=function(){const u=Dn({xdomain:!1});return u&&u.responseType!==null}();class ui extends ai{constructor(r){super(r);const o=r&&r.forceBase64;this.supportsBinary=ci&&!o}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Ae(Dn,this.uri(),r)}}function Dn(u){const r=u.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||oi))return new XMLHttpRequest}catch{}if(!r)try{return new ye[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Bn=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class li extends _t{get name(){return"websocket"}doOpen(){const r=this.uri(),o=this.opts.protocols,a=Bn?{}:In(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,o,a)}catch(d){return this.emitReserved("error",d)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let o=0;o<r.length;o++){const a=r[o],d=o===r.length-1;Rt(a,this.supportsBinary,y=>{try{this.doWrite(a,y)}catch{}d&&ct(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",o=this.query||{};return this.opts.timestampRequests&&(o[this.opts.timestampParam]=Pn()),this.supportsBinary||(o.b64=1),this.createUri(r,o)}}const Ft=ye.WebSocket||ye.MozWebSocket;class fi extends li{createSocket(r,o,a){return Bn?new Ft(r,o,a):o?new Ft(r,o):new Ft(r)}doWrite(r,o){this.ws.send(o)}}class hi extends _t{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const o=Kr(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=r.readable.pipeThrough(o).getReader(),d=Wr();d.readable.pipeTo(r.writable),this._writer=d.writable.getWriter();const y=()=>{a.read().then(({done:C,value:F})=>{C||(this.onPacket(F),y())}).catch(C=>{})};y();const k={type:"open"};this.query.sid&&(k.data=`{"sid":"${this.query.sid}"}`),this._writer.write(k).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let o=0;o<r.length;o++){const a=r[o],d=o===r.length-1;this._writer.write(a).then(()=>{d&&ct(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const pi={websocket:fi,webtransport:hi,polling:ui},di=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gi=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Nt(u){if(u.length>8e3)throw"URI too long";const r=u,o=u.indexOf("["),a=u.indexOf("]");o!=-1&&a!=-1&&(u=u.substring(0,o)+u.substring(o,a).replace(/:/g,";")+u.substring(a,u.length));let d=di.exec(u||""),y={},k=14;for(;k--;)y[gi[k]]=d[k]||"";return o!=-1&&a!=-1&&(y.source=r,y.host=y.host.substring(1,y.host.length-1).replace(/;/g,":"),y.authority=y.authority.replace("[","").replace("]","").replace(/;/g,":"),y.ipv6uri=!0),y.pathNames=vi(y,y.path),y.queryKey=mi(y,y.query),y}function vi(u,r){const o=/\/{2,9}/g,a=r.replace(o,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&a.splice(0,1),r.slice(-1)=="/"&&a.splice(a.length-1,1),a}function mi(u,r){const o={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,d,y){d&&(o[d]=y)}),o}const Yt=typeof addEventListener=="function"&&typeof removeEventListener=="function",lt=[];Yt&&addEventListener("offline",()=>{lt.forEach(u=>u())},!1);class Ce extends te{constructor(r,o){if(super(),this.binaryType=Hr,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(o=r,r=null),r){const a=Nt(r);o.hostname=a.host,o.secure=a.protocol==="https"||a.protocol==="wss",o.port=a.port,a.query&&(o.query=a.query)}else o.host&&(o.hostname=Nt(o.host).host);ut(this,o),this.secure=o.secure!=null?o.secure:typeof location<"u"&&location.protocol==="https:",o.hostname&&!o.port&&(o.port=this.secure?"443":"80"),this.hostname=o.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=o.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},o.transports.forEach(a=>{const d=a.prototype.name;this.transports.push(d),this._transportsByName[d]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},o),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ni(this.opts.query)),Yt&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},lt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const o=Object.assign({},this.opts.query);o.EIO=Mn,o.transport=r,this.id&&(o.sid=this.id);const a=Object.assign({},this.opts,{query:o,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&Ce.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const o=this.createTransport(r);o.open(),this.setTransport(o)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",o=>this._onClose("transport close",o))}onOpen(){this.readyState="open",Ce.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const o=new Error("server error");o.code=r.data,this._onError(o);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let o=1;for(let a=0;a<this.writeBuffer.length;a++){const d=this.writeBuffer[a].data;if(d&&(o+=$r(d)),a>0&&o>this._maxPayload)return this.writeBuffer.slice(0,a);o+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,ct(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,o,a){return this._sendPacket("message",r,o,a),this}send(r,o,a){return this._sendPacket("message",r,o,a),this}_sendPacket(r,o,a,d){if(typeof o=="function"&&(d=o,o=void 0),typeof a=="function"&&(d=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const y={type:r,data:o,options:a};this.emitReserved("packetCreate",y),this.writeBuffer.push(y),d&&this.once("flush",d),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},o=()=>{this.off("upgrade",o),this.off("upgradeError",o),r()},a=()=>{this.once("upgrade",o),this.once("upgradeError",o)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():r()}):this.upgrading?a():r()),this}_onError(r){if(Ce.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Yt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=lt.indexOf(this._offlineEventListener);a!==-1&&lt.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,o),this.writeBuffer=[],this._prevBufferLen=0}}}Ce.protocol=Mn;class yi extends Ce{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let o=this.createTransport(r),a=!1;Ce.priorWebsocketSuccess=!1;const d=()=>{a||(o.send([{type:"ping",data:"probe"}]),o.once("packet",J=>{if(!a)if(J.type==="pong"&&J.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",o),!o)return;Ce.priorWebsocketSuccess=o.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(N(),this.setTransport(o),o.send([{type:"upgrade"}]),this.emitReserved("upgrade",o),o=null,this.upgrading=!1,this.flush())})}else{const q=new Error("probe error");q.transport=o.name,this.emitReserved("upgradeError",q)}}))};function y(){a||(a=!0,N(),o.close(),o=null)}const k=J=>{const q=new Error("probe error: "+J);q.transport=o.name,y(),this.emitReserved("upgradeError",q)};function C(){k("transport closed")}function F(){k("socket closed")}function G(J){o&&J.name!==o.name&&y()}const N=()=>{o.removeListener("open",d),o.removeListener("error",k),o.removeListener("close",C),this.off("close",F),this.off("upgrading",G)};o.once("open",d),o.once("error",k),o.once("close",C),this.once("close",F),this.once("upgrading",G),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{a||o.open()},200):o.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const o=[];for(let a=0;a<r.length;a++)~this.transports.indexOf(r[a])&&o.push(r[a]);return o}}let bi=class extends yi{constructor(r,o={}){const a=typeof r=="object"?r:o;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(d=>pi[d]).filter(d=>!!d)),super(r,a)}};function wi(u,r="",o){let a=u;o=o||typeof location<"u"&&location,u==null&&(u=o.protocol+"//"+o.host),typeof u=="string"&&(u.charAt(0)==="/"&&(u.charAt(1)==="/"?u=o.protocol+u:u=o.host+u),/^(https?|wss?):\/\//.test(u)||(typeof o<"u"?u=o.protocol+"//"+u:u="https://"+u),a=Nt(u)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const y=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+y+":"+a.port+r,a.href=a.protocol+"://"+y+(o&&o.port===a.port?"":":"+a.port),a}const xi=typeof ArrayBuffer=="function",Ei=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,Ln=Object.prototype.toString,ki=typeof Blob=="function"||typeof Blob<"u"&&Ln.call(Blob)==="[object BlobConstructor]",Ai=typeof File=="function"||typeof File<"u"&&Ln.call(File)==="[object FileConstructor]";function zt(u){return xi&&(u instanceof ArrayBuffer||Ei(u))||ki&&u instanceof Blob||Ai&&u instanceof File}function ft(u,r){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let o=0,a=u.length;o<a;o++)if(ft(u[o]))return!0;return!1}if(zt(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return ft(u.toJSON(),!0);for(const o in u)if(Object.prototype.hasOwnProperty.call(u,o)&&ft(u[o]))return!0;return!1}function Ti(u){const r=[],o=u.data,a=u;return a.data=jt(o,r),a.attachments=r.length,{packet:a,buffers:r}}function jt(u,r){if(!u)return u;if(zt(u)){const o={_placeholder:!0,num:r.length};return r.push(u),o}else if(Array.isArray(u)){const o=new Array(u.length);for(let a=0;a<u.length;a++)o[a]=jt(u[a],r);return o}else if(typeof u=="object"&&!(u instanceof Date)){const o={};for(const a in u)Object.prototype.hasOwnProperty.call(u,a)&&(o[a]=jt(u[a],r));return o}return u}function Si(u,r){return u.data=Gt(u.data,r),delete u.attachments,u}function Gt(u,r){if(!u)return u;if(u&&u._placeholder===!0){if(typeof u.num=="number"&&u.num>=0&&u.num<r.length)return r[u.num];throw new Error("illegal attachments")}else if(Array.isArray(u))for(let o=0;o<u.length;o++)u[o]=Gt(u[o],r);else if(typeof u=="object")for(const o in u)Object.prototype.hasOwnProperty.call(u,o)&&(u[o]=Gt(u[o],r));return u}const Oi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Mi=5;var Z;(function(u){u[u.CONNECT=0]="CONNECT",u[u.DISCONNECT=1]="DISCONNECT",u[u.EVENT=2]="EVENT",u[u.ACK=3]="ACK",u[u.CONNECT_ERROR=4]="CONNECT_ERROR",u[u.BINARY_EVENT=5]="BINARY_EVENT",u[u.BINARY_ACK=6]="BINARY_ACK"})(Z||(Z={}));class Ii{constructor(r){this.replacer=r}encode(r){return(r.type===Z.EVENT||r.type===Z.ACK)&&ft(r)?this.encodeAsBinary({type:r.type===Z.EVENT?Z.BINARY_EVENT:Z.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let o=""+r.type;return(r.type===Z.BINARY_EVENT||r.type===Z.BINARY_ACK)&&(o+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(o+=r.nsp+","),r.id!=null&&(o+=r.id),r.data!=null&&(o+=JSON.stringify(r.data,this.replacer)),o}encodeAsBinary(r){const o=Ti(r),a=this.encodeAsString(o.packet),d=o.buffers;return d.unshift(a),d}}function _n(u){return Object.prototype.toString.call(u)==="[object Object]"}class Vt extends te{constructor(r){super(),this.reviver=r}add(r){let o;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");o=this.decodeString(r);const a=o.type===Z.BINARY_EVENT;a||o.type===Z.BINARY_ACK?(o.type=a?Z.EVENT:Z.ACK,this.reconstructor=new Pi(o),o.attachments===0&&super.emitReserved("decoded",o)):super.emitReserved("decoded",o)}else if(zt(r)||r.base64)if(this.reconstructor)o=this.reconstructor.takeBinaryData(r),o&&(this.reconstructor=null,super.emitReserved("decoded",o));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let o=0;const a={type:Number(r.charAt(0))};if(Z[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===Z.BINARY_EVENT||a.type===Z.BINARY_ACK){const y=o+1;for(;r.charAt(++o)!=="-"&&o!=r.length;);const k=r.substring(y,o);if(k!=Number(k)||r.charAt(o)!=="-")throw new Error("Illegal attachments");a.attachments=Number(k)}if(r.charAt(o+1)==="/"){const y=o+1;for(;++o&&!(r.charAt(o)===","||o===r.length););a.nsp=r.substring(y,o)}else a.nsp="/";const d=r.charAt(o+1);if(d!==""&&Number(d)==d){const y=o+1;for(;++o;){const k=r.charAt(o);if(k==null||Number(k)!=k){--o;break}if(o===r.length)break}a.id=Number(r.substring(y,o+1))}if(r.charAt(++o)){const y=this.tryParse(r.substr(o));if(Vt.isPayloadValid(a.type,y))a.data=y;else throw new Error("invalid payload")}return a}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,o){switch(r){case Z.CONNECT:return _n(o);case Z.DISCONNECT:return o===void 0;case Z.CONNECT_ERROR:return typeof o=="string"||_n(o);case Z.EVENT:case Z.BINARY_EVENT:return Array.isArray(o)&&(typeof o[0]=="number"||typeof o[0]=="string"&&Oi.indexOf(o[0])===-1);case Z.ACK:case Z.BINARY_ACK:return Array.isArray(o)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Pi{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const o=Si(this.reconPack,this.buffers);return this.finishedReconstruction(),o}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ci=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Vt,Encoder:Ii,get PacketType(){return Z},protocol:Mi},Symbol.toStringTag,{value:"Module"}));function we(u,r,o){return u.on(r,o),function(){u.off(r,o)}}const Ri=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Fn extends te{constructor(r,o,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=r,this.nsp=o,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[we(r,"open",this.onopen.bind(this)),we(r,"packet",this.onpacket.bind(this)),we(r,"error",this.onerror.bind(this)),we(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...o){var a,d,y;if(Ri.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(o.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(o),this;const k={type:Z.EVENT,data:o};if(k.options={},k.options.compress=this.flags.compress!==!1,typeof o[o.length-1]=="function"){const N=this.ids++,J=o.pop();this._registerAckCallback(N,J),k.id=N}const C=(d=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||d===void 0?void 0:d.writable,F=this.connected&&!(!((y=this.io.engine)===null||y===void 0)&&y._hasPingExpired());return this.flags.volatile&&!C||(F?(this.notifyOutgoingListeners(k),this.packet(k)):this.sendBuffer.push(k)),this.flags={},this}_registerAckCallback(r,o){var a;const d=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(d===void 0){this.acks[r]=o;return}const y=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let C=0;C<this.sendBuffer.length;C++)this.sendBuffer[C].id===r&&this.sendBuffer.splice(C,1);o.call(this,new Error("operation has timed out"))},d),k=(...C)=>{this.io.clearTimeoutFn(y),o.apply(this,C)};k.withError=!0,this.acks[r]=k}emitWithAck(r,...o){return new Promise((a,d)=>{const y=(k,C)=>k?d(k):a(C);y.withError=!0,o.push(y),this.emit(r,...o)})}_addToQueue(r){let o;typeof r[r.length-1]=="function"&&(o=r.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((d,...y)=>a!==this._queue[0]?void 0:(d!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),o&&o(d)):(this._queue.shift(),o&&o(null,...y)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const o=this._queue[0];o.pending&&!r||(o.pending=!0,o.tryCount++,this.flags=o.flags,this.emit.apply(this,o.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,o){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,o),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(a=>String(a.id)===r)){const a=this.acks[r];delete this.acks[r],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Z.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Z.EVENT:case Z.BINARY_EVENT:this.onevent(r);break;case Z.ACK:case Z.BINARY_ACK:this.onack(r);break;case Z.DISCONNECT:this.ondisconnect();break;case Z.CONNECT_ERROR:this.destroy();const a=new Error(r.data.message);a.data=r.data.data,this.emitReserved("connect_error",a);break}}onevent(r){const o=r.data||[];r.id!=null&&o.push(this.ack(r.id)),this.connected?this.emitEvent(o):this.receiveBuffer.push(Object.freeze(o))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const o=this._anyListeners.slice();for(const a of o)a.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const o=this;let a=!1;return function(...d){a||(a=!0,o.packet({type:Z.ACK,id:r,data:d}))}}onack(r){const o=this.acks[r.id];typeof o=="function"&&(delete this.acks[r.id],o.withError&&r.data.unshift(null),o.apply(this,r.data))}onconnect(r,o){this.id=r,this.recovered=o&&this._pid===o,this._pid=o,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const o=this._anyListeners;for(let a=0;a<o.length;a++)if(r===o[a])return o.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const o=this._anyOutgoingListeners;for(let a=0;a<o.length;a++)if(r===o[a])return o.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const o=this._anyOutgoingListeners.slice();for(const a of o)a.apply(this,r.data)}}}function ze(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}ze.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),o=Math.floor(r*this.jitter*u);u=(Math.floor(r*10)&1)==0?u-o:u+o}return Math.min(u,this.max)|0},ze.prototype.reset=function(){this.attempts=0},ze.prototype.setMin=function(u){this.ms=u},ze.prototype.setMax=function(u){this.max=u},ze.prototype.setJitter=function(u){this.jitter=u};class Ut extends te{constructor(r,o){var a;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(o=r,r=void 0),o=o||{},o.path=o.path||"/socket.io",this.opts=o,ut(this,o),this.reconnection(o.reconnection!==!1),this.reconnectionAttempts(o.reconnectionAttempts||1/0),this.reconnectionDelay(o.reconnectionDelay||1e3),this.reconnectionDelayMax(o.reconnectionDelayMax||5e3),this.randomizationFactor((a=o.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new ze({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this._readyState="closed",this.uri=r;const d=o.parser||Ci;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=o.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var o;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(o=this.backoff)===null||o===void 0||o.setMin(r),this)}randomizationFactor(r){var o;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(o=this.backoff)===null||o===void 0||o.setJitter(r),this)}reconnectionDelayMax(r){var o;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(o=this.backoff)===null||o===void 0||o.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new bi(this.uri,this.opts);const o=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const d=we(o,"open",function(){a.onopen(),r&&r()}),y=C=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",C),r?r(C):this.maybeReconnectOnOpen()},k=we(o,"error",y);if(this._timeout!==!1){const C=this._timeout,F=this.setTimeoutFn(()=>{d(),y(new Error("timeout")),o.close()},C);this.opts.autoUnref&&F.unref(),this.subs.push(()=>{this.clearTimeoutFn(F)})}return this.subs.push(d),this.subs.push(k),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(we(r,"ping",this.onping.bind(this)),we(r,"data",this.ondata.bind(this)),we(r,"error",this.onerror.bind(this)),we(r,"close",this.onclose.bind(this)),we(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(o){this.onclose("parse error",o)}}ondecoded(r){ct(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,o){let a=this.nsps[r];return a?this._autoConnect&&!a.active&&a.connect():(a=new Fn(this,r,o),this.nsps[r]=a),a}_destroy(r){const o=Object.keys(this.nsps);for(const a of o)if(this.nsps[a].active)return;this._close()}_packet(r){const o=this.encoder.encode(r);for(let a=0;a<o.length;a++)this.engine.write(o[a],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,o){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,o),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const o=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(d=>{d?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",d)):r.onreconnect()}))},o);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Ue={};function ht(u,r){typeof u=="object"&&(r=u,u=void 0),r=r||{};const o=wi(u,r.path||"/socket.io"),a=o.source,d=o.id,y=o.path,k=Ue[d]&&y in Ue[d].nsps,C=r.forceNew||r["force new connection"]||r.multiplex===!1||k;let F;return C?F=new Ut(a,r):(Ue[d]||(Ue[d]=new Ut(a,r)),F=Ue[d]),o.query&&!r.query&&(r.query=o.queryKey),F.socket(o.path,r)}Object.assign(ht,{Manager:Ut,Socket:Fn,io:ht,connect:ht});class Di extends Error{code;constructor(r,o){super(o),this.code=r,this.message=o}}let de;class Bi extends Yr.EventEmitter{logger;constructor(r=console){super(),this.logger=r}connect(r,o){const a=this.logger;return new Promise((d,y)=>{de=ht(r,{query:{token:o.token}}),de.on("connect_error",k=>{a.error(`socket.io connect error, id: ${de.id}, err: ${k.message}`),y(new Di("connectError",k.message))}),de.on("connect",()=>{a.info(`socket.io connected, id: ${de.id}`)}),de.on("disconnect",()=>{a.warn(`socket.io disconnected, id: ${de.id}`)}),de.on("signal",k=>{this.emit("message",k)}),de.io.on("reconnect",k=>{a.info(`socket.io reconnected, attempt: ${k}`)}),de.io.on("reconnect_attempt",k=>{a.warn(`socket.io reconnect attempt, attempt: ${k}`),this.emit("reconnectAttempt")}),de.io.on("reconnect_error",k=>{a.error(`socket.io reconnect error, err: ${k.message}`)}),de.io.on("reconnect_failed",()=>{a.error("socket.io reconnect failed"),this.emit("reconnectFailed")})})}close(){return new Promise(r=>{de.close(),r()})}}const Li="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTDLI/zzH/TLI/z7P/TLI/zHH/jLH/zLI/zPH/7u9vDLH/+zm4TPH/9unoDPI/zHI/2CXpdvc3uHi4+/r57/Byfnz7NnX1VFFRTLI/zLH/k08OFVDPjPF+iMiKfvcvCoiITspIhkUE005Mkk0LFZIRC4cFUcwJjIlITIoKSIZFiYfHSslJxUNC+bHtkEwKPjdyB0RDB4eJzomHeHAr0A1NPz69EIsI+jKujotKvPPtExBP8mhjFQ/OEY4NT4xMCQlMO7Do8iVfDAhGsyZfPrYuNiqkNuwligqNWJSSx8cIFtNSSswPvDLr928q/fZxGhYUe/HqhoYHem/oevJs2xeV/nh0MOjm1g6L82eguPEs+i6mPnGsEFLXHRlXT5EUvi7pzXC9M2Rcvrn19i3qcqomfXUueu8rzI3RVE2LCcWDzc+TkM8PzgiGDbA78+snNekh73Ez2Q/M/nKtwwIBktLUPns3922ntGmjX1tZfjBqezMuenDrNmzoPm3oPW/rzMsL8WbiO3QwOa0kfbOq8GIcfnPveOtivXUwvnTruy/msKenElTYuC6pDe86Tq44dGwpHRSSrSQhTuz277M3/qxmu63qWZIP7+Bab6WibaeoOqlljUyN+rNvkOYstiQhEKPqfPEt8CQez6fwNiFejqnzXNDMEB7kZFYRU1aaH1bUtN6dbR6Y+2tnrqak1VVV9mxsYd3bqpzWfTJoeG5sNeceT2v045qYaJ8bNaVbeGkfNmci4hiWMyusMymp7CEb7CJfUCGoHlKP55fQOidjdWMX55mU5hzauq0n05ibaxqSr6qqUdxg8iTlvjz6qODecF+g4ZSOz5lfd9ZPsd2X8ZFLcWLj1JtcsNrV8u3sVdmXkmqxG92a1QwI9SbnMNURbh1d9+Latt7WN5pRuWVePakh8qGhamVl0wnGe1qW1eMlN/Z2GU1Iqi0vlmjspWOkI9KL/V3Z6ZqaFV8h1Z8a2yDeouCgeuSh9DLyM1jPpmkqvWIcZwvInaxuoV6iUdwTIaiDnQAAAEAdFJOUwCmMHAQxIDv3yD9YPxA/VCQ/ms+nre7FlD//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCfCrf8AABCMklEQVR42tScfVSTZ7b2j1Vbte3bvn9qUk4e8v1BI4SsNIYkaDxKCGpEKVELtI5ogKS2KVGp2Al1UFehLYlrJqCpWqwIlELhrSVtURAdULRlVKx2zlDrR61nVY8eu5ZLO+vMeq99B3C6VrWPHex0tqAUwcmPa+/r3ve+72f+7b7GuImPPfzgmDHjx0+Y8NDkWEyYMH78mMcffPjRB/7tXzLGPTr28fETGMqUKZN/ECP/+dD4x8c+Ou5fCOqBsWOAxDfGjxn76L8A1KNjxz/EROEfTLuxv+bMHPfwGAb182LCmMfG/TqpINXPhBqpvTEP/9rYHgXV6MSYx35FZvEgLyr+OTnxVyLWaFLFcnL8w//0yvoxsbByPfH85l07d+7ctvv48d3bdn74xhNTEM89/2HsU8eP7t+588Pnn8Nn7ygbqu1XhsWodu4/WplT2dDg95vyciqP79/15htvbN5Gn8wrKnIX4a8AtwOfvTPbhAcn/sqw3ti1Y/fhSr/Jo9d7TCaPRw+Q47sRDTlFGRnuDHcR2PAHfXb/rs3PP8ED7VeBtf9Ui18qNRGTNeIx6S2RiLsINHmeSFpaBkVaalwqIi3DnXf86I5db9wF7RdPyLE/VlvA2rn/sN8kEIstAgEjs1rwHgBLXAa4UlMz0tJSk5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KoCYmJDAY1mWVFR4zrt1TcwGMsQahVvOi2KB3e4uWnJRuAzQGYy76wVwJ2I8G2ORKyAWufsASJXvnrRcESZTtaTakV+VyN+HAAHGpsCa6wQgM+9GL+hOXYPdIsncGCSPrhWODT2qQJQdl2dgAjLB4cAFLuEuBPN9jBmP1UynGVC+uvTXo3TNPoo0MSgAIsBiM+6kz6ayE0f2vCVywfu8MEj3wxYZTuyXa0U7LWsLPnqyZxWA2NuSci0SsfoCSECxeHLd8a9Db0I5Eu2Z5EpZCgZ6bc1PDKsK6B6RBb2l3vxdfPPDB3hkwAKnvLIBN37Lx3XfffhtEf3q+SP8Lmdt8HocmP8EAAAAASUVORK5CYII=";var qe={exports:{}},_i=qe.exports,Nn;function Fi(){return Nn||(Nn=1,function(u,r){(function(o,a){u.exports=a()})(_i,function(){function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(i){F(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function d(t){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(t)}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,he(i.key),i)}}function C(t,e,n){return e&&k(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function F(t,e,n){return(e=he(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function G(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&J(t,e)}function N(t){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(t)}function J(t,e){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},J(t,e)}function q(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ne(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=N(t);if(e){var s=N(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(c,l){if(l&&(typeof l=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q(c)}(this,n)}}function re(){return re=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(c,l){for(;!Object.prototype.hasOwnProperty.call(c,l)&&(c=N(c))!==null;);return c}(t,e);if(i){var s=Object.getOwnPropertyDescriptor(i,e);return s.get?s.get.call(arguments.length<3?t:n):s.value}},re.apply(this,arguments)}function he(t){var e=function(n,i){if(typeof n!="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var c=s.call(n,i);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(t,"string");return typeof e=="symbol"?e:e+""}var oe=function(t){return!(!t||!t.Window)&&t instanceof t.Window},be=void 0,pe=void 0;function ge(t){be=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),pe=t}function S(t){return oe(t)?t:(t.ownerDocument||t).defaultView||pe.window}typeof window<"u"&&window&&ge(window);var T=function(t){return!!t&&d(t)==="object"},M=function(t){return typeof t=="function"},v={window:function(t){return t===pe||oe(t)},docFrag:function(t){return T(t)&&t.nodeType===11},object:T,func:M,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||d(t)!=="object")return!1;var e=S(t)||pe;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return T(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return T(t)&&t.length!==void 0&&M(t.splice)}};function _(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function H(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="drag"){var i=n.prepared.axis;if(i==="x"||i==="y"){var s=i==="x"?"y":"x";e.page[s]=n.coords.start.page[s],e.client[s]=n.coords.start.client[s],e.delta[s]=0}}}var V={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,i=t.defaults;n.prototype.draggable=V.draggable,e.map.drag=V,e.methodDict.drag="draggable",i.actions.drag=V.defaults},listeners:{"interactions:before-action-move":_,"interactions:action-resume":_,"interactions:action-move":H,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,i=t.buttons,s=n.options.drag;if(s&&s.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(i&n.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:s.lockAxis==="start"?s.startAxis:s.lockAxis},!1}},draggable:function(t){return v.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):v.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:_,move:H,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},se=V,ie={init:function(t){var e=t;ie.document=e.document,ie.DocumentFragment=e.DocumentFragment||ve,ie.SVGElement=e.SVGElement||ve,ie.SVGSVGElement=e.SVGSVGElement||ve,ie.SVGElementInstance=e.SVGElementInstance||ve,ie.Element=e.Element||ve,ie.HTMLElement=e.HTMLElement||ie.Element,ie.Event=e.Event,ie.Touch=e.Touch||ve,ie.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ve(){}var $=ie,ce={init:function(t){var e=$.Element,n=t.navigator||{};ce.supportsTouch="ontouchstart"in t||v.func(t.DocumentTouch)&&$.document instanceof t.DocumentTouch,ce.supportsPointerEvent=n.pointerEnabled!==!1&&!!$.PointerEvent,ce.isIOS=/iP(hone|od|ad)/.test(n.platform),ce.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),ce.isIe9=/MSIE 9/.test(n.userAgent),ce.isOperaMobile=n.appName==="Opera"&&ce.supportsTouch&&/Presto/.test(n.userAgent),ce.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",ce.pEventTypes=ce.supportsPointerEvent?$.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ce.wheelEvent=$.document&&"onmousewheel"in $.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},w=ce;function E(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function I(t,e){for(;v.element(t);){if(D(t,e))return t;t=Y(t)}return null}function Y(t){var e=t.parentNode;if(v.docFrag(e)){for(;(e=e.host)&&v.docFrag(e););return e}return e}function D(t,e){return pe!==be&&(e=e.replace(/\/deep\//g," ")),t[w.prefixedMatchesSelector](e)}var Q=function(t){return t.parentNode||t.host};function ee(t,e){for(var n,i=[],s=t;(n=Q(s))&&s!==e&&n!==s.ownerDocument;)i.unshift(s),s=n;return i}function ae(t,e,n){for(;v.element(t);){if(D(t,e))return!0;if((t=Y(t))===n)return D(t,e)}return!1}function ue(t){return t.correspondingUseElement||t}function Te(t){var e=t instanceof $.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function Oe(t){var e,n=Te(t);if(!w.isIOS7&&n){var i={x:(e=(e=S(t))||pe).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};n.left+=i.x,n.right+=i.x,n.top+=i.y,n.bottom+=i.y}return n}function Se(t){for(var e=[];t;)e.push(t),t=Y(t);return e}function zn(t){return!!v.string(t)&&($.document.querySelector(t),!0)}function L(t,e){for(var n in e)t[n]=e[n];return t}function jn(t,e,n){return t==="parent"?Y(n):t==="self"?e.getRect(n):I(n,t)}function We(t,e,n,i){var s=t;return v.string(s)?s=jn(s,e,n):v.func(s)&&(s=s.apply(void 0,i)),v.element(s)&&(s=Oe(s)),s}function pt(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function qt(t){return!t||"x"in t&&"y"in t||((t=L({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function dt(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function Ke(t,e,n){var i=n&&t.options[n];return pt(We(i&&i.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function _e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(h){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},v.string(t)&&t.search(" ")!==-1&&(t=Gn(t)),v.array(t))return t.forEach(function(h){return _e(h,e,n,i)}),i;if(v.object(t)&&(e=t,t=""),v.func(e)&&n(t))i[t]=i[t]||[],i[t].push(e);else if(v.array(e))for(var s=0,c=e;s<c.length;s++){var l=c[s];_e(t,l,n,i)}else if(v.object(e))for(var f in e)_e(Gn(f).map(function(h){return"".concat(t).concat(h)}),e[f],n,i);return i}function Gn(t){return t.trim().split(/ +/)}var Ze=function(t,e){return Math.sqrt(t*t+e*e)},Vi=["webkit","moz"];function gt(t,e){t.__set||(t.__set={});var n=function(s){if(Vi.some(function(c){return s.indexOf(c)===0}))return 1;typeof t[s]!="function"&&s!=="__set"&&Object.defineProperty(t,s,{get:function(){return s in t.__set?t.__set[s]:t.__set[s]=e[s]},set:function(c){t.__set[s]=c},configurable:!0})};for(var i in e)n(i);return t}function vt(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function Vn(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function Un(t){return t instanceof $.Event||t instanceof $.Touch}function mt(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function qn(t,e){return e=e||{x:0,y:0},w.isOperaMobile&&Un(t)?(mt("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):mt("page",t,e),e}function He(t){return v.number(t.pointerId)?t.pointerId:t.identifier}function Ui(t,e,n){var i=e.length>1?Wn(e):e[0];qn(i,t.page),function(s,c){c=c||{},w.isOperaMobile&&Un(s)?mt("screen",s,c):mt("client",s,c)}(i,t.client),t.timeStamp=n}function Wt(t){var e=[];return v.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function Wn(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var i=t[n];for(var s in e)e[s]+=i[s]}for(var c in e)e[c]/=t.length;return e}function Kt(t){if(!t.length)return null;var e=Wt(t),n=Math.min(e[0].pageX,e[1].pageX),i=Math.min(e[0].pageY,e[1].pageY),s=Math.max(e[0].pageX,e[1].pageX),c=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:i,left:n,top:i,right:s,bottom:c,width:s-n,height:c-i}}function Zt(t,e){var n=e+"X",i=e+"Y",s=Wt(t),c=s[0][n]-s[1][n],l=s[0][i]-s[1][i];return Ze(c,l)}function Ht(t,e){var n=e+"X",i=e+"Y",s=Wt(t),c=s[1][n]-s[0][n],l=s[1][i]-s[0][i];return 180*Math.atan2(l,c)/Math.PI}function Kn(t){return v.string(t.pointerType)?t.pointerType:v.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof $.Touch?"touch":"mouse"}function Zn(t){var e=v.func(t.composedPath)?t.composedPath():t.path;return[ue(e?e[0]:t.target),ue(t.currentTarget)]}var yt=function(){function t(e){y(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return C(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(yt.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Hn=function(t,e){for(var n=0;n<e.length;n++){var i=e[n];t.push(i)}return t},Jn=function(t){return Hn([],t)},Je=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},Qe=function(t,e){return t[Je(t,e)]},je=function(t){G(n,t);var e=ne(n);function n(i,s,c){var l;y(this,n),(l=e.call(this,s._interaction)).dropzone=void 0,l.dragEvent=void 0,l.relatedTarget=void 0,l.draggable=void 0,l.propagationStopped=!1,l.immediatePropagationStopped=!1;var f=c==="dragleave"?i.prev:i.cur,h=f.element,g=f.dropzone;return l.type=c,l.target=h,l.currentTarget=h,l.dropzone=g,l.dragEvent=s,l.relatedTarget=s.target,l.draggable=s.interactable,l.timeStamp=s.timeStamp,l}return C(n,[{key:"reject",value:function(){var i=this,s=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&s.cur.dropzone===this.dropzone&&s.cur.element===this.target)if(s.prev.dropzone=this.dropzone,s.prev.element=this.target,s.rejected=!0,s.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var c=s.activeDrops,l=Je(c,function(h){var g=h.dropzone,p=h.element;return g===i.dropzone&&p===i.target});s.activeDrops.splice(l,1);var f=new n(s,this.dragEvent,"dropdeactivate");f.dropzone=this.dropzone,f.target=this.target,this.dropzone.fire(f)}else this.dropzone.fire(new n(s,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}(yt);function Qn(t,e){for(var n=0,i=t.slice();n<i.length;n++){var s=i[n],c=s.dropzone,l=s.element;e.dropzone=c,e.target=l,c.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function Jt(t,e){for(var n=function(c,l){for(var f=[],h=0,g=c.interactables.list;h<g.length;h++){var p=g[h];if(p.options.drop.enabled){var m=p.options.drop.accept;if(!(v.element(m)&&m!==l||v.string(m)&&!D(l,m)||v.func(m)&&!m({dropzone:p,draggableElement:l})))for(var b=0,A=p.getAllElements();b<A.length;b++){var x=A[b];x!==l&&f.push({dropzone:p,element:x,rect:p.getRect(x)})}}}return f}(t,e),i=0;i<n.length;i++){var s=n[i];s.rect=s.dropzone.getRect(s.element)}return n}function Xn(t,e,n){for(var i=t.dropState,s=t.interactable,c=t.element,l=[],f=0,h=i.activeDrops;f<h.length;f++){var g=h[f],p=g.dropzone,m=g.element,b=g.rect,A=p.dropCheck(e,n,s,c,m,b);l.push(A?m:null)}var x=function(O){for(var R,P,B,U=[],K=0;K<O.length;K++){var z=O[K],W=O[R];if(z&&K!==R)if(W){var fe=Q(z),X=Q(W);if(fe!==z.ownerDocument)if(X!==z.ownerDocument)if(fe!==X){U=U.length?U:ee(W);var me=void 0;if(W instanceof $.HTMLElement&&z instanceof $.SVGElement&&!(z instanceof $.SVGSVGElement)){if(z===X)continue;me=z.ownerSVGElement}else me=z;for(var xe=ee(me,W.ownerDocument),Pe=0;xe[Pe]&&xe[Pe]===U[Pe];)Pe++;var Ot=[xe[Pe-1],xe[Pe],U[Pe]];if(Ot[0])for(var rt=Ot[0].lastChild;rt;){if(rt===Ot[1]){R=K,U=xe;break}if(rt===Ot[2])break;rt=rt.previousSibling}}else B=W,(parseInt(S(P=z).getComputedStyle(P).zIndex,10)||0)>=(parseInt(S(B).getComputedStyle(B).zIndex,10)||0)&&(R=K);else R=K}else R=K}return R}(l);return i.activeDrops[x]||null}function Qt(t,e,n){var i=t.dropState,s={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(s.activate=new je(i,n,"dropactivate"),s.activate.target=null,s.activate.dropzone=null),n.type==="dragend"&&(s.deactivate=new je(i,n,"dropdeactivate"),s.deactivate.target=null,s.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(s.leave=new je(i,n,"dragleave"),n.dragLeave=s.leave.target=i.prev.element,n.prevDropzone=s.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(s.enter=new je(i,n,"dragenter"),n.dragEnter=i.cur.element,n.dropzone=i.cur.dropzone)),n.type==="dragend"&&i.cur.dropzone&&(s.drop=new je(i,n,"drop"),n.dropzone=i.cur.dropzone,n.relatedTarget=i.cur.element),n.type==="dragmove"&&i.cur.dropzone&&(s.move=new je(i,n,"dropmove"),n.dropzone=i.cur.dropzone)),s}function Xt(t,e){var n=t.dropState,i=n.activeDrops,s=n.cur,c=n.prev;e.leave&&c.dropzone.fire(e.leave),e.enter&&s.dropzone.fire(e.enter),e.move&&s.dropzone.fire(e.move),e.drop&&s.dropzone.fire(e.drop),e.deactivate&&Qn(i,e.deactivate),n.prev.dropzone=s.dropzone,n.prev.element=s.element}function $n(t,e){var n=t.interaction,i=t.iEvent,s=t.event;if(i.type==="dragmove"||i.type==="dragend"){var c=n.dropState;e.dynamicDrop&&(c.activeDrops=Jt(e,n.element));var l=i,f=Xn(n,l,s);c.rejected=c.rejected&&!!f&&f.dropzone===c.cur.dropzone&&f.element===c.cur.element,c.cur.dropzone=f&&f.dropzone,c.cur.element=f&&f.element,c.events=Qt(n,0,l)}}var er={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,i=t.Interactable,s=t.defaults;t.usePlugin(se),i.prototype.dropzone=function(c){return function(l,f){if(v.object(f)){if(l.options.drop.enabled=f.enabled!==!1,f.listeners){var h=_e(f.listeners),g=Object.keys(h).reduce(function(m,b){return m[/^(enter|leave)/.test(b)?"drag".concat(b):/^(activate|deactivate|move)/.test(b)?"drop".concat(b):b]=h[b],m},{}),p=l.options.drop.listeners;p&&l.off(p),l.on(g),l.options.drop.listeners=g}return v.func(f.ondrop)&&l.on("drop",f.ondrop),v.func(f.ondropactivate)&&l.on("dropactivate",f.ondropactivate),v.func(f.ondropdeactivate)&&l.on("dropdeactivate",f.ondropdeactivate),v.func(f.ondragenter)&&l.on("dragenter",f.ondragenter),v.func(f.ondragleave)&&l.on("dragleave",f.ondragleave),v.func(f.ondropmove)&&l.on("dropmove",f.ondropmove),/^(pointer|center)$/.test(f.overlap)?l.options.drop.overlap=f.overlap:v.number(f.overlap)&&(l.options.drop.overlap=Math.max(Math.min(1,f.overlap),0)),"accept"in f&&(l.options.drop.accept=f.accept),"checker"in f&&(l.options.drop.checker=f.checker),l}return v.bool(f)?(l.options.drop.enabled=f,l):l.options.drop}(this,c)},i.prototype.dropCheck=function(c,l,f,h,g,p){return function(m,b,A,x,O,R,P){var B=!1;if(!(P=P||m.getRect(R)))return!!m.options.drop.checker&&m.options.drop.checker(b,A,B,m,R,x,O);var U=m.options.drop.overlap;if(U==="pointer"){var K=Ke(x,O,"drag"),z=qn(b);z.x+=K.x,z.y+=K.y;var W=z.x>P.left&&z.x<P.right,fe=z.y>P.top&&z.y<P.bottom;B=W&&fe}var X=x.getRect(O);if(X&&U==="center"){var me=X.left+X.width/2,xe=X.top+X.height/2;B=me>=P.left&&me<=P.right&&xe>=P.top&&xe<=P.bottom}return X&&v.number(U)&&(B=Math.max(0,Math.min(P.right,X.right)-Math.max(P.left,X.left))*Math.max(0,Math.min(P.bottom,X.bottom)-Math.max(P.top,X.top))/(X.width*X.height)>=U),m.options.drop.checker&&(B=m.options.drop.checker(b,A,B,m,R,x,O)),B}(this,c,l,f,h,g,p)},n.dynamicDrop=function(c){return v.bool(c)?(t.dynamicDrop=c,n):t.dynamicDrop},L(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,s.actions.drop=er.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,i=(t.event,t.iEvent);if(n.prepared.name==="drag"){var s=n.dropState;s.activeDrops=[],s.events={},s.activeDrops=Jt(e,n.element),s.events=Qt(n,0,i),s.events.activate&&(Qn(s.activeDrops,s.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:i}))}},"interactions:action-move":$n,"interactions:after-action-move":function(t,e){var n=t.interaction,i=t.iEvent;if(n.prepared.name==="drag"){var s=n.dropState;Xt(n,s.events),e.fire("actions/drop:move",{interaction:n,dragEvent:i}),s.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var n=t.interaction,i=t.iEvent;$n(t,e),Xt(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:i})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:Jt,getDrop:Xn,getDropEvents:Qt,fireDropEvents:Xt,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},qi=er;function $t(t){var e=t.interaction,n=t.iEvent,i=t.phase;if(e.prepared.name==="gesture"){var s=e.pointers.map(function(g){return g.pointer}),c=i==="start",l=i==="end",f=e.interactable.options.deltaSource;if(n.touches=[s[0],s[1]],c)n.distance=Zt(s,f),n.box=Kt(s),n.scale=1,n.ds=0,n.angle=Ht(s,f),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(l||e.pointers.length<2){var h=e.prevEvent;n.distance=h.distance,n.box=h.box,n.scale=h.scale,n.ds=0,n.angle=h.angle,n.da=0}else n.distance=Zt(s,f),n.box=Kt(s),n.scale=n.distance/e.gesture.startDistance,n.angle=Ht(s,f),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,v.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var en={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,i=t.defaults;n.prototype.gesturable=function(s){return v.object(s)?(this.options.gesture.enabled=s.enabled!==!1,this.setPerAction("gesture",s),this.setOnEvents("gesture",s),this):v.bool(s)?(this.options.gesture.enabled=s,this):this.options.gesture},e.map.gesture=en,e.methodDict.gesture="gesturable",i.actions.gesture=en.defaults},listeners:{"interactions:action-start":$t,"interactions:action-move":$t,"interactions:action-end":$t,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Wi=en;function Ki(t,e,n,i,s,c,l){if(!e)return!1;if(e===!0){var f=v.number(c.width)?c.width:c.right-c.left,h=v.number(c.height)?c.height:c.bottom-c.top;if(l=Math.min(l,Math.abs((t==="left"||t==="right"?f:h)/2)),f<0&&(t==="left"?t="right":t==="right"&&(t="left")),h<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var g=f>=0?c.left:c.right;return n.x<g+l}if(t==="top"){var p=h>=0?c.top:c.bottom;return n.y<p+l}if(t==="right")return n.x>(f>=0?c.right:c.left)-l;if(t==="bottom")return n.y>(h>=0?c.bottom:c.top)-l}return!!v.element(i)&&(v.element(e)?e===i:ae(i,e,s))}function tr(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.resizeAxes){var i=e;n.interactable.options.resize.square?(n.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=n.resizeAxes,n.resizeAxes==="x"?i.delta.y=0:n.resizeAxes==="y"&&(i.delta.x=0))}}var Me,Fe,Ie={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,i=t.Interactable,s=t.defaults;Ie.cursors=function(c){return c.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),Ie.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,i.prototype.resizable=function(c){return function(l,f,h){return v.object(f)?(l.options.resize.enabled=f.enabled!==!1,l.setPerAction("resize",f),l.setOnEvents("resize",f),v.string(f.axis)&&/^x$|^y$|^xy$/.test(f.axis)?l.options.resize.axis=f.axis:f.axis===null&&(l.options.resize.axis=h.defaults.actions.resize.axis),v.bool(f.preserveAspectRatio)?l.options.resize.preserveAspectRatio=f.preserveAspectRatio:v.bool(f.square)&&(l.options.resize.square=f.square),l):v.bool(f)?(l.options.resize.enabled=f,l):l.options.resize}(this,c,t)},e.map.resize=Ie,e.methodDict.resize="resizable",s.actions.resize=Ie.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var n=e.iEvent,i=e.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=n,c=i.rect;i._rects={start:L({},c),corrected:L({},c),previous:L({},c),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},s.edges=i.prepared.edges,s.rect=i._rects.corrected,s.deltaRect=i._rects.delta}})(t),tr(t)},"interactions:action-move":function(t){(function(e){var n=e.iEvent,i=e.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=n,c=i.interactable.options.resize.invert,l=c==="reposition"||c==="negate",f=i.rect,h=i._rects,g=h.start,p=h.corrected,m=h.delta,b=h.previous;if(L(b,p),l){if(L(p,f),c==="reposition"){if(p.top>p.bottom){var A=p.top;p.top=p.bottom,p.bottom=A}if(p.left>p.right){var x=p.left;p.left=p.right,p.right=x}}}else p.top=Math.min(f.top,g.bottom),p.bottom=Math.max(f.bottom,g.top),p.left=Math.min(f.left,g.right),p.right=Math.max(f.right,g.left);for(var O in p.width=p.right-p.left,p.height=p.bottom-p.top,p)m[O]=p[O]-b[O];s.edges=i.prepared.edges,s.rect=p,s.deltaRect=m}})(t),tr(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var i=e;i.edges=n.prepared.edges,i.rect=n._rects.corrected,i.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,i=t.element,s=t.rect,c=t.buttons;if(s){var l=L({},e.coords.cur.page),f=n.options.resize;if(f&&f.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(c&f.mouseButtons)!=0)){if(v.object(f.edges)){var h={left:!1,right:!1,top:!1,bottom:!1};for(var g in h)h[g]=Ki(g,f.edges[g],l,e._latestPointer.eventTarget,i,s,f.margin||Ie.defaultMargin);h.left=h.left&&!h.right,h.top=h.top&&!h.bottom,(h.left||h.right||h.top||h.bottom)&&(t.action={name:"resize",edges:h})}else{var p=f.axis!=="y"&&l.x>s.right-Ie.defaultMargin,m=f.axis!=="x"&&l.y>s.bottom-Ie.defaultMargin;(p||m)&&(t.action={name:"resize",axes:(p?"x":"")+(m?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,i=t.name,s=Ie.cursors,c=null;if(n)c=s[i+n];else if(e){for(var l="",f=0,h=["top","bottom","left","right"];f<h.length;f++){var g=h[f];e[g]&&(l+=g)}c=s[l]}return c},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Zi=Ie,Hi={id:"actions",install:function(t){t.usePlugin(Wi),t.usePlugin(Zi),t.usePlugin(se),t.usePlugin(qi)}},nr=0,Re={request:function(t){return Me(t)},cancel:function(t){return Fe(t)},init:function(t){if(Me=t.requestAnimationFrame,Fe=t.cancelAnimationFrame,!Me)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var i=e[n];Me=t["".concat(i,"RequestAnimationFrame")],Fe=t["".concat(i,"CancelAnimationFrame")]||t["".concat(i,"CancelRequestAnimationFrame")]}Me=Me&&Me.bind(t),Fe=Fe&&Fe.bind(t),Me||(Me=function(s){var c=Date.now(),l=Math.max(0,16-(c-nr)),f=t.setTimeout(function(){s(c+l)},l);return nr=c+l,f},Fe=function(s){return clearTimeout(s)})}},j={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){j.isScrolling=!0,Re.cancel(j.i),t.autoScroll=j,j.interaction=t,j.prevTime=j.now(),j.i=Re.request(j.scroll)},stop:function(){j.isScrolling=!1,j.interaction&&(j.interaction.autoScroll=null),Re.cancel(j.i)},scroll:function(){var t=j.interaction,e=t.interactable,n=t.element,i=t.prepared.name,s=e.options[i].autoScroll,c=rr(s.container,e,n),l=j.now(),f=(l-j.prevTime)/1e3,h=s.speed*f;if(h>=1){var g={x:j.x*h,y:j.y*h};if(g.x||g.y){var p=ir(c);v.window(c)?c.scrollBy(g.x,g.y):c&&(c.scrollLeft+=g.x,c.scrollTop+=g.y);var m=ir(c),b={x:m.x-p.x,y:m.y-p.y};(b.x||b.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:b,interaction:t,container:c})}j.prevTime=l}j.isScrolling&&(Re.cancel(j.i),j.i=Re.request(j.scroll))},check:function(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&j.check(e.interactable,e.prepared.name))if(e.simulation)j.x=j.y=0;else{var i,s,c,l,f=e.interactable,h=e.element,g=e.prepared.name,p=f.options[g].autoScroll,m=rr(p.container,f,h);if(v.window(m))l=n.clientX<j.margin,i=n.clientY<j.margin,s=n.clientX>m.innerWidth-j.margin,c=n.clientY>m.innerHeight-j.margin;else{var b=Te(m);l=n.clientX<b.left+j.margin,i=n.clientY<b.top+j.margin,s=n.clientX>b.right-j.margin,c=n.clientY>b.bottom-j.margin}j.x=s?1:l?-1:0,j.y=c?1:i?-1:0,j.isScrolling||(j.margin=p.margin,j.speed=p.speed,j.start(e))}}};function rr(t,e,n){return(v.string(t)?jn(t,e,n):t)||S(n)}function ir(t){return v.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Ji={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=j,j.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=j.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,j.stop(),j.interaction&&(j.interaction=null)},"interactions:stop":j.stop,"interactions:action-move":function(t){return j.onInteractionMove(t)}}},Qi=Ji;function Xe(t,e){var n=!1;return function(){return n||(pe.console.warn(e),n=!0),t.apply(this,arguments)}}function tn(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Xi(t){return v.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function $i(t){return v.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var eo={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(n,i,s,c){var l=function(f,h,g,p,m){var b=f.getRect(p),A=h.buttons||{0:1,1:4,3:8,4:16}[h.button],x={action:null,interactable:f,interaction:g,element:p,rect:b,buttons:A};return m.fire("auto-start:check",x),x.action}(this,i,s,c,t);return this.options.actionChecker?this.options.actionChecker(n,i,l,this,c,s):l},e.prototype.ignoreFrom=Xe(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Xe(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=$i,e.prototype.styleCursor=Xi}};function or(t,e,n,i,s){return e.testIgnoreAllow(e.options[t.name],n,i)&&e.options[t.name].enabled&&bt(e,n,t,s)?t:null}function to(t,e,n,i,s,c,l){for(var f=0,h=i.length;f<h;f++){var g=i[f],p=s[f],m=g.getAction(e,n,t,p);if(m){var b=or(m,g,p,c,l);if(b)return{action:b,interactable:g,element:p}}}return{action:null,interactable:null,element:null}}function sr(t,e,n,i,s){var c=[],l=[],f=i;function h(p){c.push(p),l.push(f)}for(;v.element(f);){c=[],l=[],s.interactables.forEachMatch(f,h);var g=to(t,e,n,c,l,i,s);if(g.action&&!g.interactable.options[g.action.name].manualStart)return g;f=Y(f)}return{action:null,interactable:null,element:null}}function ar(t,e,n){var i=e.action,s=e.interactable,c=e.element;i=i||{name:null},t.interactable=s,t.element=c,tn(t.prepared,i),t.rect=s&&i.name?s.getRect(c):null,ur(t,n),n.fire("autoStart:prepared",{interaction:t})}function bt(t,e,n,i){var s=t.options,c=s[n.name].max,l=s[n.name].maxPerElement,f=i.autoStart.maxInteractions,h=0,g=0,p=0;if(!(c&&l&&f))return!1;for(var m=0,b=i.interactions.list;m<b.length;m++){var A=b[m],x=A.prepared.name;if(A.interacting()&&(++h>=f||A.interactable===t&&((g+=x===n.name?1:0)>=c||A.element===e&&(p++,x===n.name&&p>=l))))return!1}return f>0}function cr(t,e){return v.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function nn(t,e,n){var i=n.autoStart.cursorElement;i&&i!==t&&(i.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function ur(t,e){var n=t.interactable,i=t.element,s=t.prepared;if(t.pointerType==="mouse"&&n&&n.options.styleCursor){var c="";if(s.name){var l=n.options[s.name].cursorChecker;c=v.func(l)?l(s,n,i,t._interacting):e.actions.map[s.name].getCursor(s)}nn(t.element,c||"",e)}else e.autoStart.cursorElement&&nn(e.autoStart.cursorElement,"",e)}var no={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(eo),n.base.actionChecker=null,n.base.styleCursor=!0,L(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(i){return cr(i,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:bt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,i=t.pointer,s=t.event,c=t.eventTarget;n.interacting()||ar(n,sr(n,i,s,c,e),e)},"interactions:move":function(t,e){(function(n,i){var s=n.interaction,c=n.pointer,l=n.event,f=n.eventTarget;s.pointerType!=="mouse"||s.pointerIsDown||s.interacting()||ar(s,sr(s,c,l,f,i),i)})(t,e),function(n,i){var s=n.interaction;if(s.pointerIsDown&&!s.interacting()&&s.pointerWasMoved&&s.prepared.name){i.fire("autoStart:before-start",n);var c=s.interactable,l=s.prepared.name;l&&c&&(c.options[l].manualStart||!bt(c,s.element,s.prepared,i)?s.stop():(s.start(s.prepared,c,s.element),ur(s,i)))}}(t,e)},"interactions:stop":function(t,e){var n=t.interaction,i=n.interactable;i&&i.options.styleCursor&&nn(n.element,"",e)}},maxInteractions:cr,withinInteractionLimit:bt,validateAction:or},rn=no,ro={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,i=t.eventTarget,s=t.dx,c=t.dy;if(n.prepared.name==="drag"){var l=Math.abs(s),f=Math.abs(c),h=n.interactable.options.drag,g=h.startAxis,p=l>f?"x":l<f?"y":"xy";if(n.prepared.axis=h.lockAxis==="start"?p[0]:h.lockAxis,p!=="xy"&&g!=="xy"&&g!==p){n.prepared.name=null;for(var m=i,b=function(x){if(x!==n.interactable){var O=n.interactable.options.drag;if(!O.manualStart&&x.testIgnoreAllow(O,m,i)){var R=x.getAction(n.downPointer,n.downEvent,n,m);if(R&&R.name==="drag"&&function(P,B){if(!B)return!1;var U=B.options.drag.startAxis;return P==="xy"||U==="xy"||U===P}(p,x)&&rn.validateAction(R,x,m,i,e))return x}}};v.element(m);){var A=e.interactables.forEachMatch(m,b);if(A){n.prepared.name="drag",n.interactable=A,n.element=m;break}m=Y(m)}}}}}};function on(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}var io={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(rn),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=on(e);n>0&&(e.autoStartHoldTimer=setTimeout(function(){e.start(e.prepared,e.interactable,e.element)},n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;on(e)>0&&(e.prepared.name=null)}},getHoldDuration:on},oo=io,so={id:"auto-start",install:function(t){t.usePlugin(rn),t.usePlugin(oo),t.usePlugin(ro)}},ao=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):v.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function co(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var lr={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=ao,e.prototype.checkAndPreventDefault=function(n){return function(i,s,c){var l=i.options.preventDefault;if(l!=="never")if(l!=="always"){if(s.events.supportsPassive&&/^touch(start|move)$/.test(c.type)){var f=S(c.target).document,h=s.getDocOptions(f);if(!h||!h.events||h.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(c.type)||v.element(c.target)&&D(c.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||c.preventDefault()}else c.preventDefault()}(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(n){for(var i=0,s=t.interactions.list;i<s.length;i++){var c=s[i];if(c.element&&(c.element===n.target||E(c.element,n.target)))return void c.interactable.checkAndPreventDefault(n)}}})},listeners:["down","move","up","cancel"].reduce(function(t,e){return t["interactions:".concat(e)]=co,t},{})};function wt(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}function Ge(t){var e={};for(var n in t){var i=t[n];v.plainObject(i)?e[n]=Ge(i):v.array(i)?e[n]=Jn(i):e[n]=i}return e}var sn=function(){function t(e){y(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=xt(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return C(t,[{key:"start",value:function(e,n){var i,s,c=e.phase,l=this.interaction,f=function(g){var p=g.interactable.options[g.prepared.name],m=p.modifiers;return m&&m.length?m:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(b){var A=p[b];return A&&A.enabled&&{options:A,methods:A._methods}}).filter(function(b){return!!b})}(l);this.prepareStates(f),this.startEdges=L({},l.edges),this.edges=L({},this.startEdges),this.startOffset=(i=l.rect,s=n,i?{left:s.x-i.left,top:s.y-i.top,right:i.right-s.x,bottom:i.bottom-s.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var h=this.fillArg({phase:c,pageCoords:n,preEnd:!1});return this.result=xt(),this.startAll(h),this.result=this.setAll(h)}},{key:"fillArg",value:function(e){var n=this.interaction;return e.interaction=n,e.interactable=n.interactable,e.element=n.element,e.rect||(e.rect=n.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var n=0,i=this.states;n<i.length;n++){var s=i[n];s.methods.start&&(e.state=s,s.methods.start(e))}}},{key:"setAll",value:function(e){var n=e.phase,i=e.preEnd,s=e.skipModifiers,c=e.rect,l=e.edges;e.coords=L({},e.pageCoords),e.rect=L({},c),e.edges=L({},l);for(var f=s?this.states.slice(s):this.states,h=xt(e.coords,e.rect),g=0;g<f.length;g++){var p,m=f[g],b=m.options,A=L({},e.coords),x=null;(p=m.methods)!=null&&p.set&&this.shouldDo(b,i,n)&&(e.state=m,x=m.methods.set(e),dt(e.edges,e.rect,{x:e.coords.x-A.x,y:e.coords.y-A.y})),h.eventProps.push(x)}L(this.edges,e.edges),h.delta.x=e.coords.x-e.pageCoords.x,h.delta.y=e.coords.y-e.pageCoords.y,h.rectDelta.left=e.rect.left-c.left,h.rectDelta.right=e.rect.right-c.right,h.rectDelta.top=e.rect.top-c.top,h.rectDelta.bottom=e.rect.bottom-c.bottom;var O=this.result.coords,R=this.result.rect;if(O&&R){var P=h.rect.left!==R.left||h.rect.right!==R.right||h.rect.top!==R.top||h.rect.bottom!==R.bottom;h.changed=P||O.x!==h.coords.x||O.y!==h.coords.y}return h}},{key:"applyToInteraction",value:function(e){var n=this.interaction,i=e.phase,s=n.coords.cur,c=n.coords.start,l=this.result,f=this.startDelta,h=l.delta;i==="start"&&L(this.startDelta,l.delta);for(var g=0,p=[[c,f],[s,h]];g<p.length;g++){var m=p[g],b=m[0],A=m[1];b.page.x+=A.x,b.page.y+=A.y,b.client.x+=A.x,b.client.y+=A.y}var x=this.result.rectDelta,O=e.rect||n.rect;O.left+=x.left,O.right+=x.right,O.top+=x.top,O.bottom+=x.bottom,O.width=O.right-O.left,O.height=O.bottom-O.top}},{key:"setAndApply",value:function(e){var n=this.interaction,i=e.phase,s=e.preEnd,c=e.skipModifiers,l=this.setAll(this.fillArg({preEnd:s,phase:i,pageCoords:e.modifiedCoords||n.coords.cur.page}));if(this.result=l,!l.changed&&(!c||c<this.states.length)&&n.interacting())return!1;if(e.modifiedCoords){var f=n.coords.cur.page,h={x:e.modifiedCoords.x-f.x,y:e.modifiedCoords.y-f.y};l.coords.x+=h.x,l.coords.y+=h.y,l.delta.x+=h.x,l.delta.y+=h.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var n=e.interaction,i=e.event,s=this.states;if(s&&s.length){for(var c=!1,l=0;l<s.length;l++){var f=s[l];e.state=f;var h=f.options,g=f.methods,p=g.beforeEnd&&g.beforeEnd(e);if(p)return this.endResult=p,!1;c=c||!c&&this.shouldDo(h,!0,e.phase,!0)}c&&n.move({event:i,preEnd:!0})}}},{key:"stop",value:function(e){var n=e.interaction;if(this.states&&this.states.length){var i=L({states:this.states,interactable:n.interactable,element:n.element,rect:null},e);this.fillArg(i);for(var s=0,c=this.states;s<c.length;s++){var l=c[s];i.state=l,l.methods.stop&&l.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var n=0;n<e.length;n++){var i=e[n],s=i.options,c=i.methods,l=i.name;this.states.push({options:s,methods:c,index:n,name:l})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var n=e.interaction,i=n.coords,s=n.rect,c=n.modification;if(c.result){for(var l=c.startDelta,f=c.result,h=f.delta,g=f.rectDelta,p=0,m=[[i.start,l],[i.cur,h]];p<m.length;p++){var b=m[p],A=b[0],x=b[1];A.page.x-=x.x,A.page.y-=x.y,A.client.x-=x.x,A.client.y-=x.y}s.left-=g.left,s.right-=g.right,s.top-=g.top,s.bottom-=g.bottom}}},{key:"shouldDo",value:function(e,n,i,s){return!(!e||e.enabled===!1||s&&!e.endOnly||e.endOnly&&!n||i==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map(function(n){return Ge(n)}),this.result=xt(L({},e.result.coords),L({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t}();function xt(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function De(t,e){var n=t.defaults,i={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},s=function(c){var l=c||{};for(var f in l.enabled=l.enabled!==!1,n)f in l||(l[f]=n[f]);var h={options:l,methods:i,name:e,enable:function(){return l.enabled=!0,h},disable:function(){return l.enabled=!1,h}};return h};return e&&typeof e=="string"&&(s._defaults=n,s._methods=i),s}function $e(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}var uo={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new sn(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,i=n.setAndApply(t);return e.edges=n.edges,i},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,i=n.beforeEnd(t);return e.edges=n.startEdges,i},"interactions:action-start":$e,"interactions:action-move":$e,"interactions:action-end":$e,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},fr=uo,hr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},an=function(t){G(n,t);var e=ne(n);function n(i,s,c,l,f,h,g){var p;y(this,n),(p=e.call(this,i)).relatedTarget=null,p.screenX=void 0,p.screenY=void 0,p.button=void 0,p.buttons=void 0,p.ctrlKey=void 0,p.shiftKey=void 0,p.altKey=void 0,p.metaKey=void 0,p.page=void 0,p.client=void 0,p.delta=void 0,p.rect=void 0,p.x0=void 0,p.y0=void 0,p.t0=void 0,p.dt=void 0,p.duration=void 0,p.clientX0=void 0,p.clientY0=void 0,p.velocity=void 0,p.speed=void 0,p.swipe=void 0,p.axes=void 0,p.preEnd=void 0,f=f||i.element;var m=i.interactable,b=(m&&m.options||hr).deltaSource,A=Ke(m,f,c),x=l==="start",O=l==="end",R=x?q(p):i.prevEvent,P=x?i.coords.start:O?{page:R.page,client:R.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return p.page=L({},P.page),p.client=L({},P.client),p.rect=L({},i.rect),p.timeStamp=P.timeStamp,O||(p.page.x-=A.x,p.page.y-=A.y,p.client.x-=A.x,p.client.y-=A.y),p.ctrlKey=s.ctrlKey,p.altKey=s.altKey,p.shiftKey=s.shiftKey,p.metaKey=s.metaKey,p.button=s.button,p.buttons=s.buttons,p.target=f,p.currentTarget=f,p.preEnd=h,p.type=g||c+(l||""),p.interactable=m,p.t0=x?i.pointers[i.pointers.length-1].downTime:R.t0,p.x0=i.coords.start.page.x-A.x,p.y0=i.coords.start.page.y-A.y,p.clientX0=i.coords.start.client.x-A.x,p.clientY0=i.coords.start.client.y-A.y,p.delta=x||O?{x:0,y:0}:{x:p[b].x-R[b].x,y:p[b].y-R[b].y},p.dt=i.coords.delta.timeStamp,p.duration=p.timeStamp-p.t0,p.velocity=L({},i.coords.velocity[b]),p.speed=Ze(p.velocity.x,p.velocity.y),p.swipe=O||l==="inertiastart"?p.getSwipe():null,p}return C(n,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var s=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;s<0&&(s+=360);var c=112.5<=s&&s<247.5,l=202.5<=s&&s<337.5;return{up:l,down:!l&&22.5<=s&&s<157.5,left:c,right:!c&&(292.5<=s||s<67.5),angle:s,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),n}(yt);Object.defineProperties(an.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var lo=C(function t(e,n,i,s,c){y(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=i,this.downTime=s,this.downTarget=c}),fo=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),pr=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),ho=0,po=function(){function t(e){var n=this,i=e.pointerType,s=e.scopeFire;y(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Xe(function(p){this.move(p)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=ho++,this._scopeFire=s,this.pointerType=i;var c=this;this._proxy={};var l=function(p){Object.defineProperty(n._proxy,p,{get:function(){return c[p]}})};for(var f in fo)l(f);var h=function(p){Object.defineProperty(n._proxy,p,{value:function(){return c[p].apply(c,arguments)}})};for(var g in pr)h(g);this._scopeFire("interactions:new",{interaction:this})}return C(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(e,n,i){var s=this.updatePointer(e,n,i,!0),c=this.pointers[s];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:i,pointerIndex:s,pointerInfo:c,type:"down",interaction:this})}},{key:"start",value:function(e,n,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled)&&(tn(this.prepared,e),this.interactable=n,this.element=i,this.rect=n.getRect(i),this.edges=this.prepared.edges?L({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(e,n,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(e,n,i,!1);var s,c,l=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(s=this.coords.cur.client.x-this.coords.start.client.x,c=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ze(s,c)>this.pointerMoveTolerance);var f,h,g,p=this.getPointerIndex(e),m={pointer:e,pointerIndex:p,pointerInfo:this.pointers[p],event:n,type:"move",eventTarget:i,dx:s,dy:c,duplicate:l,interaction:this};l||(f=this.coords.velocity,h=this.coords.delta,g=Math.max(h.timeStamp/1e3,.001),f.page.x=h.page.x/g,f.page.y=h.page.y/g,f.client.x=h.client.x/g,f.client.y=h.client.y/g,f.timeStamp=g),this._scopeFire("interactions:move",m),l||this.simulation||(this.interacting()&&(m.type=null,this.move(m)),this.pointerWasMoved&&vt(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||Vn(this.coords.delta),(e=L({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,n,i,s){var c=this.getPointerIndex(e);c===-1&&(c=this.updatePointer(e,n,i,!1));var l=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire("interactions:".concat(l),{pointer:e,pointerIndex:c,pointerInfo:this.pointers[c],event:n,eventTarget:i,type:l,curEventTarget:s,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var n;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var n=He(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Je(this.pointers,function(i){return i.id===n})}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,n,i,s){var c,l,f,h=He(e),g=this.getPointerIndex(e),p=this.pointers[g];return s=s!==!1&&(s||/(down|start)$/i.test(n.type)),p?p.pointer=e:(p=new lo(h,e,n,null,null),g=this.pointers.length,this.pointers.push(p)),Ui(this.coords.cur,this.pointers.map(function(m){return m.pointer}),this._now()),c=this.coords.delta,l=this.coords.prev,f=this.coords.cur,c.page.x=f.page.x-l.page.x,c.page.y=f.page.y-l.page.y,c.client.x=f.client.x-l.client.x,c.client.y=f.client.y-l.client.y,c.timeStamp=f.timeStamp-l.timeStamp,s&&(this.pointerIsDown=!0,p.downTime=this.coords.cur.timeStamp,p.downTarget=i,gt(this.downPointer,e),this.interacting()||(vt(this.coords.start,this.coords.cur),vt(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,i),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:i,down:s,pointerInfo:p,pointerIndex:g,interaction:this}),g}},{key:"removePointer",value:function(e,n){var i=this.getPointerIndex(e);if(i!==-1){var s=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:i,pointerInfo:s,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,n,i){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,n,i,s){return new an(this,e,this.prepared.name,n,this.element,i,s)}},{key:"_fireEvent",value:function(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var n=e.event,i=e.phase,s=e.preEnd,c=e.type,l=this.rect;if(l&&i==="move"&&(dt(this.edges,l,this.coords.delta[this.interactable.options.deltaSource]),l.width=l.right-l.left,l.height=l.bottom-l.top),this._scopeFire("interactions:before-action-".concat(i),e)===!1)return!1;var f=e.iEvent=this._createPreparedEvent(n,i,s,c);return this._scopeFire("interactions:action-".concat(i),e),i==="start"&&(this.prevEvent=f),this._fireEvent(f),this._scopeFire("interactions:after-action-".concat(i),e),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function dr(t){gr(t.interaction)}function gr(t){if(!function(n){return!(!n.offset.pending.x&&!n.offset.pending.y)}(t))return!1;var e=t.offset.pending;return cn(t.coords.cur,e),cn(t.coords.delta,e),dt(t.edges,t.rect,e),e.x=0,e.y=0,!0}function go(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function cn(t,e){var n=t.page,i=t.client,s=e.x,c=e.y;n.x+=s,n.y+=c,i.x+=s,i.y+=c}pr.offsetBy="";var vo={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=go},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(e){e.pointerIsDown&&(cn(e.coords.cur,e.offset.total),e.offset.pending.x=0,e.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":dr,"interactions:before-action-move":dr,"interactions:before-action-end":function(t){var e=t.interaction;if(gr(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},vr=vo,mo=function(){function t(e){y(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return C(t,[{key:"start",value:function(e){var n=this.interaction,i=Et(n);if(!i||!i.enabled)return!1;var s=n.coords.velocity.client,c=Ze(s.x,s.y),l=this.modification||(this.modification=new sn(n));if(l.copyFrom(n.modification),this.t0=n._now(),this.allowResume=i.allowResume,this.v0=c,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=l.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&c>i.minSpeed&&c>i.endSpeed)this.startInertia();else{if(l.result=l.setAll(this.modifierArg),!l.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:e,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,n=this.interaction.coords.velocity.client,i=Et(this.interaction),s=i.resistance,c=-Math.log(i.endSpeed/this.v0)/s;this.targetOffset={x:(n.x-c)/s,y:(n.y-c)/s},this.te=c,this.lambda_v0=s/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var l=this.modification,f=this.modifierArg;f.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},l.result=l.setAll(f),l.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+l.result.delta.x,y:this.targetOffset.y+l.result.delta.y}),this.onNextFrame(function(){return e.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return e.smoothEndTick()})}},{key:"onNextFrame",value:function(e){var n=this;this.timeout=Re.request(function(){n.active&&e()})}},{key:"inertiaTick",value:function(){var e,n,i,s,c,l,f,h=this,g=this.interaction,p=Et(g).resistance,m=(g._now()-this.t0)/1e3;if(m<this.te){var b,A=1-(Math.exp(-p*m)-this.lambda_v0)/this.one_ve_v0;this.isModified?(e=0,n=0,i=this.targetOffset.x,s=this.targetOffset.y,c=this.modifiedOffset.x,l=this.modifiedOffset.y,b={x:mr(f=A,e,i,c),y:mr(f,n,s,l)}):b={x:this.targetOffset.x*A,y:this.targetOffset.y*A};var x={x:b.x-this.currentOffset.x,y:b.y-this.currentOffset.y};this.currentOffset.x+=x.x,this.currentOffset.y+=x.y,g.offsetBy(x),g.move(),this.onNextFrame(function(){return h.inertiaTick()})}else g.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var e=this,n=this.interaction,i=n._now()-this.t0,s=Et(n).smoothEndDuration;if(i<s){var c={x:yr(i,0,this.targetOffset.x,s),y:yr(i,0,this.targetOffset.y,s)},l={x:c.x-this.currentOffset.x,y:c.y-this.currentOffset.y};this.currentOffset.x+=l.x,this.currentOffset.y+=l.y,n.offsetBy(l),n.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return e.smoothEndTick()})}else n.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(e){var n=e.pointer,i=e.event,s=e.eventTarget,c=this.interaction;c.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),c.updatePointer(n,i,s,!0),c._doPhase({interaction:c,event:i,phase:"resume"}),vt(c.coords.prev,c.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Re.cancel(this.timeout)}}]),t}();function Et(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}var yo={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(vr),t.usePlugin(fr),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new mo(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,i=e.inertia;if(i.active)for(var s=n;v.element(s);){if(s===e.element){i.resume(t);break}s=Y(s)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":$e,"interactions:action-inertiastart":$e,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function mr(t,e,n,i){var s=1-t;return s*s*e+2*s*t*n+t*t*i}function yr(t,e,n,i){return-n*(t/=i)*(t-2)+e}var bo=yo;function br(t,e){for(var n=0;n<e.length;n++){var i=e[n];if(t.immediatePropagationStopped)break;i(t)}}var wr=function(){function t(e){y(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=L({},e||{})}return C(t,[{key:"fire",value:function(e){var n,i=this.global;(n=this.types[e.type])&&br(e,n),!e.propagationStopped&&i&&(n=i[e.type])&&br(e,n)}},{key:"on",value:function(e,n){var i=_e(e,n);for(e in i)this.types[e]=Hn(this.types[e]||[],i[e])}},{key:"off",value:function(e,n){var i=_e(e,n);for(e in i){var s=this.types[e];if(s&&s.length)for(var c=0,l=i[e];c<l.length;c++){var f=l[c],h=s.indexOf(f);h!==-1&&s.splice(h,1)}}}},{key:"getRect",value:function(e){return null}}]),t}(),wo=function(){function t(e){y(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,gt(this,e)}return C(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function et(t){return v.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function kt(t,e){return t===e||(typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var xo={id:"events",install:function(t){var e,n=[],i={},s=[],c={add:l,remove:f,addDelegate:function(p,m,b,A,x){var O=et(x);if(!i[b]){i[b]=[];for(var R=0;R<s.length;R++){var P=s[R];l(P,b,h),l(P,b,g,!0)}}var B=i[b],U=Qe(B,function(K){return K.selector===p&&K.context===m});U||(U={selector:p,context:m,listeners:[]},B.push(U)),U.listeners.push({func:A,options:O})},removeDelegate:function(p,m,b,A,x){var O,R=et(x),P=i[b],B=!1;if(P)for(O=P.length-1;O>=0;O--){var U=P[O];if(U.selector===p&&U.context===m){for(var K=U.listeners,z=K.length-1;z>=0;z--){var W=K[z];if(W.func===A&&kt(W.options,R)){K.splice(z,1),K.length||(P.splice(O,1),f(m,b,h),f(m,b,g,!0)),B=!0;break}}if(B)break}}},delegateListener:h,delegateUseCapture:g,delegatedEvents:i,documents:s,targets:n,supportsOptions:!1,supportsPassive:!1};function l(p,m,b,A){if(p.addEventListener){var x=et(A),O=Qe(n,function(R){return R.eventTarget===p});O||(O={eventTarget:p,events:{}},n.push(O)),O.events[m]||(O.events[m]=[]),Qe(O.events[m],function(R){return R.func===b&&kt(R.options,x)})||(p.addEventListener(m,b,c.supportsOptions?x:x.capture),O.events[m].push({func:b,options:x}))}}function f(p,m,b,A){if(p.addEventListener&&p.removeEventListener){var x=Je(n,function(fe){return fe.eventTarget===p}),O=n[x];if(O&&O.events)if(m!=="all"){var R=!1,P=O.events[m];if(P){if(b==="all"){for(var B=P.length-1;B>=0;B--){var U=P[B];f(p,m,U.func,U.options)}return}for(var K=et(A),z=0;z<P.length;z++){var W=P[z];if(W.func===b&&kt(W.options,K)){p.removeEventListener(m,b,c.supportsOptions?K:K.capture),P.splice(z,1),P.length===0&&(delete O.events[m],R=!0);break}}}R&&!Object.keys(O.events).length&&n.splice(x,1)}else for(m in O.events)O.events.hasOwnProperty(m)&&f(p,m,"all")}}function h(p,m){for(var b=et(m),A=new wo(p),x=i[p.type],O=Zn(p)[0],R=O;v.element(R);){for(var P=0;P<x.length;P++){var B=x[P],U=B.selector,K=B.context;if(D(R,U)&&E(K,O)&&E(K,R)){var z=B.listeners;A.currentTarget=R;for(var W=0;W<z.length;W++){var fe=z[W];kt(fe.options,b)&&fe.func(A)}}}R=Y(R)}}function g(p){return h(p,!0)}return(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return c.supportsOptions=!0},get passive(){return c.supportsPassive=!0}}),t.events=c,c}},un={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,n=un.methodOrder;e<n.length;e++){var i=n[e],s=un[i](t);if(s)return s}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,i=t.eventTarget,s=t.scope;if(!/down|start/i.test(n))return null;for(var c=0,l=s.interactions.list;c<l.length;c++){var f=l[c],h=i;if(f.simulation&&f.simulation.allowResume&&f.pointerType===e)for(;h;){if(h===f.element)return f;h=Y(h)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,i=t.pointerType,s=t.eventType,c=t.scope;if(i!=="mouse"&&i!=="pen")return null;for(var l=0,f=c.interactions.list;l<f.length;l++){var h=f[l];if(h.pointerType===i){if(h.simulation&&!xr(h,n))continue;if(h.interacting())return h;e||(e=h)}}if(e)return e;for(var g=0,p=c.interactions.list;g<p.length;g++){var m=p[g];if(!(m.pointerType!==i||/down/i.test(s)&&m.simulation))return m}return null},hasPointer:function(t){for(var e=t.pointerId,n=0,i=t.scope.interactions.list;n<i.length;n++){var s=i[n];if(xr(s,e))return s}return null},idle:function(t){for(var e=t.pointerType,n=0,i=t.scope.interactions.list;n<i.length;n++){var s=i[n];if(s.pointers.length===1){var c=s.interactable;if(c&&(!c.options.gesture||!c.options.gesture.enabled))continue}else if(s.pointers.length>=2)continue;if(!s.interacting()&&e===s.pointerType)return s}return null}};function xr(t,e){return t.pointers.some(function(n){return n.id===e})}var Eo=un,ln=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Er(t,e){return function(n){var i=e.interactions.list,s=Kn(n),c=Zn(n),l=c[0],f=c[1],h=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var g=0,p=n.changedTouches;g<p.length;g++){var m=p[g],b={pointer:m,pointerId:He(m),pointerType:s,eventType:n.type,eventTarget:l,curEventTarget:f,scope:e},A=kr(b);h.push([b.pointer,b.eventTarget,b.curEventTarget,A])}}else{var x=!1;if(!w.supportsPointerEvent&&/mouse/.test(n.type)){for(var O=0;O<i.length&&!x;O++)x=i[O].pointerType!=="mouse"&&i[O].pointerIsDown;x=x||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!x){var R={pointer:n,pointerId:He(n),pointerType:s,eventType:n.type,curEventTarget:f,eventTarget:l,scope:e},P=kr(R);h.push([R.pointer,R.eventTarget,R.curEventTarget,P])}}for(var B=0;B<h.length;B++){var U=h[B],K=U[0],z=U[1],W=U[2];U[3][t](K,n,z,W)}}}function kr(t){var e=t.pointerType,n=t.scope,i={interaction:Eo.search(t),searchDetails:t};return n.fire("interactions:find",i),i.interaction||n.interactions.new({pointerType:e})}function fn(t,e){var n=t.doc,i=t.scope,s=t.options,c=i.interactions.docEvents,l=i.events,f=l[e];for(var h in i.browser.isIOS&&!s.events&&(s.events={passive:!1}),l.delegatedEvents)f(n,h,l.delegateListener),f(n,h,l.delegateUseCapture,!0);for(var g=s&&s.events,p=0;p<c.length;p++){var m=c[p];f(n,m.type,m.listener,g)}}var ko={id:"core/interactions",install:function(t){for(var e={},n=0;n<ln.length;n++){var i=ln[n];e[i]=Er(i,t)}var s,c=w.pEventTypes;function l(){for(var f=0,h=t.interactions.list;f<h.length;f++){var g=h[f];if(g.pointerIsDown&&g.pointerType==="touch"&&!g._interacting)for(var p=function(){var A=b[m];t.documents.some(function(x){return E(x.doc,A.downTarget)})||g.removePointer(A.pointer,A.event)},m=0,b=g.pointers;m<b.length;m++)p()}}(s=$.PointerEvent?[{type:c.down,listener:l},{type:c.down,listener:e.pointerDown},{type:c.move,listener:e.pointerMove},{type:c.up,listener:e.pointerUp},{type:c.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:l},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(f){for(var h=0,g=t.interactions.list;h<g.length;h++)g[h].documentBlur(f)}}),t.prevTouchTime=0,t.Interaction=function(f){G(g,f);var h=ne(g);function g(){return y(this,g),h.apply(this,arguments)}return C(g,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(p){t.interactions.pointerMoveTolerance=p}},{key:"_now",value:function(){return t.now()}}]),g}(po),t.interactions={list:[],new:function(f){f.scopeFire=function(g,p){return t.fire(g,p)};var h=new t.Interaction(f);return t.interactions.list.push(h),h},listeners:e,docEvents:s,pointerMoveTolerance:1},t.usePlugin(lr)},listeners:{"scope:add-document":function(t){return fn(t,"add")},"scope:remove-document":function(t){return fn(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,i=e.interactions.list.length-1;i>=0;i--){var s=e.interactions.list[i];s.interactable===n&&(s.stop(),e.fire("interactions:destroy",{interaction:s}),s.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(i,1))}}},onDocSignal:fn,doOnInteractions:Er,methodNames:ln},Ao=ko,Be=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Be||{}),To=function(){function t(e,n,i,s){y(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new wr,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||i,this._win=S(zn(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=s,this.set(n)}return C(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(e,n){return v.func(n.onstart)&&this.on("".concat(e,"start"),n.onstart),v.func(n.onmove)&&this.on("".concat(e,"move"),n.onmove),v.func(n.onend)&&this.on("".concat(e,"end"),n.onend),v.func(n.oninertiastart)&&this.on("".concat(e,"inertiastart"),n.oninertiastart),this}},{key:"updatePerActionListeners",value:function(e,n,i){var s,c=this,l=(s=this._actions.map[e])==null?void 0:s.filterEventType,f=function(h){return(l==null||l(h))&&wt(h,c._actions)};(v.array(n)||v.object(n))&&this._onOff(Be.Off,e,n,void 0,f),(v.array(i)||v.object(i))&&this._onOff(Be.On,e,i,void 0,f)}},{key:"setPerAction",value:function(e,n){var i=this._defaults;for(var s in n){var c=s,l=this.options[e],f=n[c];c==="listeners"&&this.updatePerActionListeners(e,l.listeners,f),v.array(f)?l[c]=Jn(f):v.plainObject(f)?(l[c]=L(l[c]||{},Ge(f)),v.object(i.perAction[c])&&"enabled"in i.perAction[c]&&(l[c].enabled=f.enabled!==!1)):v.bool(f)&&v.object(i.perAction[c])?l[c].enabled=f:l[c]=f}}},{key:"getRect",value:function(e){return e=e||(v.element(this.target)?this.target:null),v.string(this.target)&&(e=e||this._context.querySelector(this.target)),Oe(e)}},{key:"rectChecker",value:function(e){var n=this;return v.func(e)?(this.getRect=function(i){var s=L({},e.apply(n,i));return"width"in s||(s.width=s.right-s.left,s.height=s.bottom-s.top),s},this):e===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(e,n){if(zn(n)||v.object(n)){for(var i in this.options[e]=n,this._actions.map)this.options[i][e]=n;return this}return this.options[e]}},{key:"origin",value:function(e){return this._backCompatOption("origin",e)}},{key:"deltaSource",value:function(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var e=this.target;return v.string(e)?Array.from(this._context.querySelectorAll(e)):v.func(e)&&e.getAllElements?e.getAllElements():v.element(e)?[e]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(e){return this._context===e.ownerDocument||E(this._context,e)}},{key:"testIgnoreAllow",value:function(e,n,i){return!this.testIgnore(e.ignoreFrom,n,i)&&this.testAllow(e.allowFrom,n,i)}},{key:"testAllow",value:function(e,n,i){return!e||!!v.element(i)&&(v.string(e)?ae(i,e,n):!!v.element(e)&&E(e,i))}},{key:"testIgnore",value:function(e,n,i){return!(!e||!v.element(i))&&(v.string(e)?ae(i,e,n):!!v.element(e)&&E(e,i))}},{key:"fire",value:function(e){return this.events.fire(e),this}},{key:"_onOff",value:function(e,n,i,s,c){v.object(n)&&!v.array(n)&&(s=i,i=null);var l=_e(n,i,c);for(var f in l){f==="wheel"&&(f=w.wheelEvent);for(var h=0,g=l[f];h<g.length;h++){var p=g[h];wt(f,this._actions)?this.events[e===Be.On?"on":"off"](f,p):v.string(this.target)?this._scopeEvents[e===Be.On?"addDelegate":"removeDelegate"](this.target,this._context,f,p,s):this._scopeEvents[e===Be.On?"add":"remove"](this.target,f,p,s)}}return this}},{key:"on",value:function(e,n,i){return this._onOff(Be.On,e,n,i)}},{key:"off",value:function(e,n,i){return this._onOff(Be.Off,e,n,i)}},{key:"set",value:function(e){var n=this._defaults;for(var i in v.object(e)||(e={}),this.options=Ge(n.base),this._actions.methodDict){var s=i,c=this._actions.methodDict[s];this.options[s]={},this.setPerAction(s,L(L({},n.perAction),n.actions[s])),this[c](e[s])}for(var l in e)l!=="getRect"?v.func(this[l])&&this[l](e[l]):this.rectChecker(e.getRect);return this}},{key:"unset",value:function(){if(v.string(this.target))for(var e in this._scopeEvents.delegatedEvents)for(var n=this._scopeEvents.delegatedEvents[e],i=n.length-1;i>=0;i--){var s=n[i],c=s.selector,l=s.context,f=s.listeners;c===this.target&&l===this._context&&n.splice(i,1);for(var h=f.length-1;h>=0;h--)this._scopeEvents.removeDelegate(this.target,this._context,e,f[h][0],f[h][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),So=function(){function t(e){var n=this;y(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(i){var s=i.interactable,c=s.target,l=v.string(c)?n.selectorMap[c]:c[n.scope.id],f=Je(l,function(h){return h===s});l.splice(f,1)}})}return C(t,[{key:"new",value:function(e,n){n=L(n||{},{actions:this.scope.actions});var i=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),v.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(i)):(i.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:e,options:n,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(e,n){var i=n&&n.context||this.scope.document,s=v.string(e),c=s?this.selectorMap[e]:e[this.scope.id];if(c)return Qe(c,function(l){return l._context===i&&(s||l.inContext(e))})}},{key:"forEachMatch",value:function(e,n){for(var i=0,s=this.list;i<s.length;i++){var c=s[i],l=void 0;if((v.string(c.target)?v.element(e)&&D(e,c.target):e===c.target)&&c.inContext(e)&&(l=n(c)),l!==void 0)return l}}}]),t}(),Oo=function(){function t(){var e=this;y(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=w,this.defaults=Ge(hr),this.Eventable=wr,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var s=function c(l,f){var h=i.interactables.getExisting(l,f);return h||((h=i.interactables.new(l,f)).events.global=c.globalEvents),h};return s.getPointerAverage=Wn,s.getTouchBBox=Kt,s.getTouchDistance=Zt,s.getTouchAngle=Ht,s.getElementRect=Oe,s.getElementClientRect=Te,s.matchesSelector=D,s.closest=I,s.globalEvents={},s.version="1.10.27",s.scope=i,s.use=function(c,l){return this.scope.usePlugin(c,l),this},s.isSet=function(c,l){return!!this.scope.interactables.get(c,l&&l.context)},s.on=Xe(function(c,l,f){if(v.string(c)&&c.search(" ")!==-1&&(c=c.trim().split(/ +/)),v.array(c)){for(var h=0,g=c;h<g.length;h++){var p=g[h];this.on(p,l,f)}return this}if(v.object(c)){for(var m in c)this.on(m,c[m],l);return this}return wt(c,this.scope.actions)?this.globalEvents[c]?this.globalEvents[c].push(l):this.globalEvents[c]=[l]:this.scope.events.add(this.scope.document,c,l,{options:f}),this},"The interact.on() method is being deprecated"),s.off=Xe(function(c,l,f){if(v.string(c)&&c.search(" ")!==-1&&(c=c.trim().split(/ +/)),v.array(c)){for(var h=0,g=c;h<g.length;h++){var p=g[h];this.off(p,l,f)}return this}if(v.object(c)){for(var m in c)this.off(m,c[m],l);return this}var b;return wt(c,this.scope.actions)?c in this.globalEvents&&(b=this.globalEvents[c].indexOf(l))!==-1&&this.globalEvents[c].splice(b,1):this.scope.events.remove(this.scope.document,c,l,f),this},"The interact.off() method is being deprecated"),s.debug=function(){return this.scope},s.supportsTouch=function(){return w.supportsTouch},s.supportsPointerEvent=function(){return w.supportsPointerEvent},s.stop=function(){for(var c=0,l=this.scope.interactions.list;c<l.length;c++)l[c].stop();return this},s.pointerMoveTolerance=function(c){return v.number(c)?(this.scope.interactions.pointerMoveTolerance=c,this):this.scope.interactions.pointerMoveTolerance},s.addDocument=function(c,l){this.scope.addDocument(c,l)},s.removeDocument=function(c){this.scope.removeDocument(c)},s}(this),this.InteractEvent=an,this.Interactable=void 0,this.interactables=new So(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return e.removeDocument(i.target)};var n=this;this.Interactable=function(i){G(c,i);var s=ne(c);function c(){return y(this,c),s.apply(this,arguments)}return C(c,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(l){return re(N(c.prototype),"set",this).call(this,l),n.fire("interactable:set",{options:l,interactable:this}),this}},{key:"unset",value:function(){re(N(c.prototype),"unset",this).call(this);var l=n.interactables.list.indexOf(this);l<0||(n.interactables.list.splice(l,1),n.fire("interactable:unset",{interactable:this}))}}]),c}(To)}return C(t,[{key:"addListeners",value:function(e,n){this.listenerMaps.push({id:n,map:e})}},{key:"fire",value:function(e,n){for(var i=0,s=this.listenerMaps;i<s.length;i++){var c=s[i].map[e];if(c&&c(n,this,e)===!1)return!1}}},{key:"init",value:function(e){return this.isInitialized?this:function(n,i){return n.isInitialized=!0,v.window(i)&&ge(i),$.init(i),w.init(i),Re.init(i),n.window=i,n.document=i.document,n.usePlugin(Ao),n.usePlugin(xo),n}(this,e)}},{key:"pluginIsInstalled",value:function(e){var n=e.id;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}},{key:"usePlugin",value:function(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){for(var i=0,s=this.listenerMaps.length,c=e.before.reduce(function(f,h){return f[h]=!0,f[Ar(h)]=!0,f},{});i<s;i++){var l=this.listenerMaps[i].id;if(l&&(c[l]||c[Ar(l)]))break}this.listenerMaps.splice(i,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}},{key:"addDocument",value:function(e,n){if(this.getDocIndex(e)!==-1)return!1;var i=S(e);n=n?L({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:i,scope:this,options:n})}},{key:"removeDocument",value:function(e){var n=this.getDocIndex(e),i=S(e),s=this.documents[n].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:i,scope:this,options:s})}},{key:"getDocIndex",value:function(e){for(var n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}},{key:"getDocOptions",value:function(e){var n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ar(t){return t&&t.replace(/\/.*$/,"")}var Tr=new Oo,le=Tr.interactStatic,Mo=typeof globalThis<"u"?globalThis:window;Tr.init(Mo);var Io=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var s=i[0],c=i[1];return s in t||c in t}),n=function(i,s){for(var c=t.range,l=t.limits,f=l===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:l,h=t.offset,g=h===void 0?{x:0,y:0}:h,p={range:c,grid:t,x:null,y:null},m=0;m<e.length;m++){var b=e[m],A=b[0],x=b[1],O=Math.round((i-g.x)/t[A]),R=Math.round((s-g.y)/t[x]);p[A]=Math.max(f.left,Math.min(f.right,O*t[A]+g.x)),p[x]=Math.max(f.top,Math.min(f.bottom,R*t[x]+g.y))}return p};return n.grid=t,n.coordFields=e,n}}),Po={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=L(e.snappers||{},Io),e.createSnapGrid=e.snappers.grid}},Co=Po,Ro={start:function(t){var e=t.state,n=t.rect,i=t.edges,s=t.pageCoords,c=e.options,l=c.ratio,f=c.enabled,h=e.options,g=h.equalDelta,p=h.modifiers;l==="preserve"&&(l=n.width/n.height),e.startCoords=L({},s),e.startRect=L({},n),e.ratio=l,e.equalDelta=g;var m=e.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(e.xIsPrimaryAxis=!(!i.left&&!i.right),e.equalDelta){var b=(m.left?1:-1)*(m.top?1:-1);e.edgeSign={x:b,y:b}}else e.edgeSign={x:m.left?-1:1,y:m.top?-1:1};if(f!==!1&&L(i,m),p!=null&&p.length){var A=new sn(t.interaction);A.copyFrom(t.interaction.modification),A.prepareStates(p),e.subModification=A,A.startAll(a({},t))}},set:function(t){var e=t.state,n=t.rect,i=t.coords,s=e.linkedEdges,c=L({},i),l=e.equalDelta?Do:Bo;if(L(t.edges,s),l(e,e.xIsPrimaryAxis,i,n),!e.subModification)return null;var f=L({},n);dt(s,f,{x:i.x-c.x,y:i.y-c.y});var h=e.subModification.setAll(a(a({},t),{},{rect:f,edges:s,pageCoords:i,prevCoords:i,prevRect:f})),g=h.delta;return h.changed&&(l(e,Math.abs(g.x)>Math.abs(g.y),h.coords,h.rect),L(i,h.coords)),h.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Do(t,e,n){var i=t.startCoords,s=t.edgeSign;e?n.y=i.y+(n.x-i.x)*s.y:n.x=i.x+(n.y-i.y)*s.x}function Bo(t,e,n,i){var s=t.startRect,c=t.startCoords,l=t.ratio,f=t.edgeSign;if(e){var h=i.width/l;n.y=c.y+(h-s.height)*f.y}else{var g=i.height*l;n.x=c.x+(g-s.width)*f.x}}var Lo=De(Ro,"aspectRatio"),Sr=function(){};Sr._defaults={};var At=Sr;function Ne(t,e,n){return v.func(t)?We(t,e.interactable,e.element,[n.x,n.y,e]):We(t,e.interactable,e.element)}var Tt={start:function(t){var e=t.rect,n=t.startOffset,i=t.state,s=t.interaction,c=t.pageCoords,l=i.options,f=l.elementRect,h=L({left:0,top:0,right:0,bottom:0},l.offset||{});if(e&&f){var g=Ne(l.restriction,s,c);if(g){var p=g.right-g.left-e.width,m=g.bottom-g.top-e.height;p<0&&(h.left+=p,h.right+=p),m<0&&(h.top+=m,h.bottom+=m)}h.left+=n.left-e.width*f.left,h.top+=n.top-e.height*f.top,h.right+=n.right-e.width*(1-f.right),h.bottom+=n.bottom-e.height*(1-f.bottom)}i.offset=h},set:function(t){var e=t.coords,n=t.interaction,i=t.state,s=i.options,c=i.offset,l=Ne(s.restriction,n,e);if(l){var f=function(h){return!h||"left"in h&&"top"in h||((h=L({},h)).left=h.x||0,h.top=h.y||0,h.right=h.right||h.left+h.width,h.bottom=h.bottom||h.top+h.height),h}(l);e.x=Math.max(Math.min(f.right-c.right,e.x),f.left+c.left),e.y=Math.max(Math.min(f.bottom-c.bottom,e.y),f.top+c.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},_o=De(Tt,"restrict"),Or={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mr={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Ir(t,e){for(var n=0,i=["top","left","bottom","right"];n<i.length;n++){var s=i[n];s in t||(t[s]=e[s])}return t}var tt={noInner:Or,noOuter:Mr,start:function(t){var e,n=t.interaction,i=t.startOffset,s=t.state,c=s.options;c&&(e=pt(Ne(c.offset,n,n.coords.start.page))),e=e||{x:0,y:0},s.offset={top:e.y+i.top,left:e.x+i.left,bottom:e.y-i.bottom,right:e.x-i.right}},set:function(t){var e=t.coords,n=t.edges,i=t.interaction,s=t.state,c=s.offset,l=s.options;if(n){var f=L({},e),h=Ne(l.inner,i,f)||{},g=Ne(l.outer,i,f)||{};Ir(h,Or),Ir(g,Mr),n.top?e.y=Math.min(Math.max(g.top+c.top,f.y),h.top+c.top):n.bottom&&(e.y=Math.max(Math.min(g.bottom+c.bottom,f.y),h.bottom+c.bottom)),n.left?e.x=Math.min(Math.max(g.left+c.left,f.x),h.left+c.left):n.right&&(e.x=Math.max(Math.min(g.right+c.right,f.x),h.right+c.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Fo=De(tt,"restrictEdges"),No=L({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Tt.defaults),Yo=De({start:Tt.start,set:Tt.set,defaults:No},"restrictRect"),zo={width:-1/0,height:-1/0},jo={width:1/0,height:1/0},Go=De({start:function(t){return tt.start(t)},set:function(t){var e=t.interaction,n=t.state,i=t.rect,s=t.edges,c=n.options;if(s){var l=qt(Ne(c.min,e,t.coords))||zo,f=qt(Ne(c.max,e,t.coords))||jo;n.options={endOnly:c.endOnly,inner:L({},tt.noInner),outer:L({},tt.noOuter)},s.top?(n.options.inner.top=i.bottom-l.height,n.options.outer.top=i.bottom-f.height):s.bottom&&(n.options.inner.bottom=i.top+l.height,n.options.outer.bottom=i.top+f.height),s.left?(n.options.inner.left=i.right-l.width,n.options.outer.left=i.right-f.width):s.right&&(n.options.inner.right=i.left+l.width,n.options.outer.right=i.left+f.width),tt.set(t),n.options=c}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),hn={start:function(t){var e,n=t.interaction,i=t.interactable,s=t.element,c=t.rect,l=t.state,f=t.startOffset,h=l.options,g=h.offsetWithOrigin?function(b){var A=b.interaction.element,x=pt(We(b.state.options.origin,null,null,[A])),O=x||Ke(b.interactable,A,b.interaction.prepared.name);return O}(t):{x:0,y:0};if(h.offset==="startCoords")e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var p=We(h.offset,i,s,[n]);(e=pt(p)||{x:0,y:0}).x+=g.x,e.y+=g.y}var m=h.relativePoints;l.offsets=c&&m&&m.length?m.map(function(b,A){return{index:A,relativePoint:b,x:f.left-c.width*b.x+e.x,y:f.top-c.height*b.y+e.y}}):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,i=t.state,s=i.options,c=i.offsets,l=Ke(e.interactable,e.element,e.prepared.name),f=L({},n),h=[];s.offsetWithOrigin||(f.x-=l.x,f.y-=l.y);for(var g=0,p=c;g<p.length;g++)for(var m=p[g],b=f.x-m.x,A=f.y-m.y,x=0,O=s.targets.length;x<O;x++){var R=s.targets[x],P=void 0;(P=v.func(R)?R(b,A,e._proxy,m,x):R)&&h.push({x:(v.number(P.x)?P.x:b)+m.x,y:(v.number(P.y)?P.y:A)+m.y,range:v.number(P.range)?P.range:s.range,source:R,index:x,offset:m})}for(var B={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},U=0;U<h.length;U++){var K=h[U],z=K.range,W=K.x-f.x,fe=K.y-f.y,X=Ze(W,fe),me=X<=z;z===1/0&&B.inRange&&B.range!==1/0&&(me=!1),B.target&&!(me?B.inRange&&z!==1/0?X/z<B.distance/B.range:z===1/0&&B.range!==1/0||X<B.distance:!B.inRange&&X<B.distance)||(B.target=K,B.distance=X,B.range=z,B.inRange=me,B.delta.x=W,B.delta.y=fe)}return B.inRange&&(n.x=B.target.x,n.y=B.target.y),i.closest=B,B},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Vo=De(hn,"snap"),St={start:function(t){var e=t.state,n=t.edges,i=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],hn.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,i=t.coords,s=n.options,c=n.offsets,l={x:i.x-c[0].x,y:i.y-c[0].y};n.options=L({},s),n.options.targets=[];for(var f=0,h=s.targets||[];f<h.length;f++){var g=h[f],p=void 0;if(p=v.func(g)?g(l.x,l.y,e):g){for(var m=0,b=n.targetFields;m<b.length;m++){var A=b[m],x=A[0],O=A[1];if(x in p||O in p){p.x=p[x],p.y=p[O];break}}n.options.targets.push(p)}}var R=hn.set(t);return n.options=s,R},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Uo=De(St,"snapSize"),pn={aspectRatio:Lo,restrictEdges:Fo,restrict:_o,restrictRect:Yo,restrictSize:Go,snapEdges:De({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],St.start(t)):null},set:St.set,defaults:L(Ge(St.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Vo,snapSize:Uo,spring:At,avoid:At,transform:At,rubberband:At},qo={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(fr),t.usePlugin(Co),e.modifiers=pn,pn){var i=pn[n],s=i._defaults,c=i._methods;s._methods=c,t.defaults.perAction[n]=s}}},Wo=qo,Pr=function(t){G(n,t);var e=ne(n);function n(i,s,c,l,f,h){var g;if(y(this,n),gt(q(g=e.call(this,f)),c),c!==s&&gt(q(g),s),g.timeStamp=h,g.originalEvent=c,g.type=i,g.pointerId=He(s),g.pointerType=Kn(s),g.target=l,g.currentTarget=null,i==="tap"){var p=f.getPointerIndex(s);g.dt=g.timeStamp-f.pointers[p].downTime;var m=g.timeStamp-f.tapTime;g.double=!!f.prevTap&&f.prevTap.type!=="doubletap"&&f.prevTap.target===g.target&&m<500}else i==="doubletap"&&(g.dt=s.timeStamp-f.tapTime,g.double=!0);return g}return C(n,[{key:"_subtractOrigin",value:function(i){var s=i.x,c=i.y;return this.pageX-=s,this.pageY-=c,this.clientX-=s,this.clientY-=c,this}},{key:"_addOrigin",value:function(i){var s=i.x,c=i.y;return this.pageX+=s,this.pageY+=c,this.clientX+=s,this.clientY+=c,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),n}(yt),nt={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=nt,t.defaults.actions.pointerEvents=nt.defaults,L(t.actions.phaselessTypes,nt.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,i=t.pointer,s=t.event,c=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&dn(t),Le({interaction:n,pointer:i,event:s,eventTarget:c,type:"move"},e))},"interactions:down":function(t,e){(function(n,i){for(var s=n.interaction,c=n.pointer,l=n.event,f=n.eventTarget,h=n.pointerIndex,g=s.pointers[h].hold,p=Se(f),m={interaction:s,pointer:c,event:l,eventTarget:f,type:"hold",targets:[],path:p,node:null},b=0;b<p.length;b++){var A=p[b];m.node=A,i.fire("pointerEvents:collect-targets",m)}if(m.targets.length){for(var x=1/0,O=0,R=m.targets;O<R.length;O++){var P=R[O].eventable.options.holdDuration;P<x&&(x=P)}g.duration=x,g.timeout=setTimeout(function(){Le({interaction:s,eventTarget:f,pointer:c,event:l,type:"hold"},i)},x)}})(t,e),Le(t,e)},"interactions:up":function(t,e){dn(t),Le(t,e),function(n,i){var s=n.interaction,c=n.pointer,l=n.event,f=n.eventTarget;s.pointerWasMoved||Le({interaction:s,eventTarget:f,pointer:c,event:l,type:"tap"},i)}(t,e)},"interactions:cancel":function(t,e){dn(t),Le(t,e)}},PointerEvent:Pr,fire:Le,collectEventTargets:Cr,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Le(t,e){var n=t.interaction,i=t.pointer,s=t.event,c=t.eventTarget,l=t.type,f=t.targets,h=f===void 0?Cr(t,e):f,g=new Pr(l,i,s,c,n,e.now());e.fire("pointerEvents:new",{pointerEvent:g});for(var p={interaction:n,pointer:i,event:s,eventTarget:c,targets:h,type:l,pointerEvent:g},m=0;m<h.length;m++){var b=h[m];for(var A in b.props||{})g[A]=b.props[A];var x=Ke(b.eventable,b.node);if(g._subtractOrigin(x),g.eventable=b.eventable,g.currentTarget=b.node,b.eventable.fire(g),g._addOrigin(x),g.immediatePropagationStopped||g.propagationStopped&&m+1<h.length&&h[m+1].node!==g.currentTarget)break}if(e.fire("pointerEvents:fired",p),l==="tap"){var O=g.double?Le({interaction:n,pointer:i,event:s,eventTarget:c,type:"doubletap"},e):g;n.prevTap=O,n.tapTime=O.timeStamp}return g}function Cr(t,e){var n=t.interaction,i=t.pointer,s=t.event,c=t.eventTarget,l=t.type,f=n.getPointerIndex(i),h=n.pointers[f];if(l==="tap"&&(n.pointerWasMoved||!h||h.downTarget!==c))return[];for(var g=Se(c),p={interaction:n,pointer:i,event:s,eventTarget:c,type:l,path:g,targets:[],node:null},m=0;m<g.length;m++){var b=g[m];p.node=b,e.fire("pointerEvents:collect-targets",p)}return l==="hold"&&(p.targets=p.targets.filter(function(A){var x,O;return A.eventable.options.holdDuration===((x=n.pointers[f])==null||(O=x.hold)==null?void 0:O.duration)})),p.targets}function dn(t){var e=t.interaction,n=t.pointerIndex,i=e.pointers[n].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var Ko=Object.freeze({__proto__:null,default:nt});function Zo(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Ho={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(nt);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,e){return t["pointerEvents:".concat(e)]=Zo,t},{"pointerEvents:new":function(t){var e=t.pointerEvent;e.type==="hold"&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,i=t.pointerEvent,s=t.eventTarget,c=t.targets;if(i.type==="hold"&&c.length){var l=c[0].eventable.options.holdRepeatInterval;l<=0||(n.holdIntervalHandle=setTimeout(function(){e.pointerEvents.fire({interaction:n,eventTarget:s,type:"hold",pointer:i,event:i},e)},l))}}})},Jo=Ho,Qo={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(i){return L(this.events.options,i),this};var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(i,s){var c=n.call(this,i,s);return c===this&&(this.events.options[i]=s),c}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,i=t.node,s=t.type,c=t.eventTarget;e.interactables.forEachMatch(i,function(l){var f=l.events,h=f.options;f.types[s]&&f.types[s].length&&l.testIgnoreAllow(h,i,c)&&n.push({node:i,eventable:f,props:{interactable:l}})})},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(n){return e.getRect(n)}},"interactable:set":function(t,e){var n=t.interactable,i=t.options;L(n.events.options,e.pointerEvents.defaults),L(n.events.options,i.pointerEvents||{})}}},Xo=Qo,$o={id:"pointer-events",install:function(t){t.usePlugin(Ko),t.usePlugin(Jo),t.usePlugin(Xo)}},es=$o,ts={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(n){return function(i,s,c){for(var l=i.getAllElements(),f=c.window.Promise,h=f?[]:null,g=function(){var m=l[p],b=i.getRect(m);if(!b)return 1;var A,x=Qe(c.interactions.list,function(P){return P.interacting()&&P.interactable===i&&P.element===m&&P.prepared.name===s.name});if(x)x.move(),h&&(A=x._reflowPromise||new f(function(P){x._reflowResolve=P}));else{var O=qt(b),R=function(P){return{coords:P,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:O.x,y:O.y},client:{x:O.x,y:O.y},timeStamp:c.now()});A=function(P,B,U,K,z){var W=P.interactions.new({pointerType:"reflow"}),fe={interaction:W,event:z,pointer:z,eventTarget:U,phase:"reflow"};W.interactable=B,W.element=U,W.prevEvent=z,W.updatePointer(z,z,U,!0),Vn(W.coords.delta),tn(W.prepared,K),W._doPhase(fe);var X=P.window,me=X.Promise,xe=me?new me(function(Pe){W._reflowResolve=Pe}):void 0;return W._reflowPromise=xe,W.start(K,B,U),W._interacting?(W.move(fe),W.end(z)):(W.stop(),W._reflowResolve()),W.removePointer(z,z),xe}(c,i,m,s,R)}h&&h.push(A)},p=0;p<l.length&&!g();p++);return h&&f.all(h).then(function(){return i})}(this,n,t)}},listeners:{"interactions:stop":function(t,e){var n=t.interaction;n.pointerType==="reflow"&&(n._reflowResolve&&n._reflowResolve(),function(i,s){i.splice(i.indexOf(s),1)}(e.interactions.list,n))}}},ns=ts;if(le.use(lr),le.use(vr),le.use(es),le.use(bo),le.use(Wo),le.use(so),le.use(Hi),le.use(Qi),le.use(ns),le.default=le,d(u)==="object"&&u)try{u.exports=le}catch{}return le.default=le,le})}(qe,qe.exports)),qe.exports}var Ni=Fi();const Yn=Fr(Ni),Yi=u=>{const r=`
3
- <div class="agent-sdk-floating-button" id="agent-sdk-floating-button">
4
- <div class="agent-sdk-unread-count" id="agent-sdk-unread-count"></div>
5
- <img src="${Li}" alt="Chat" draggable="false"/>
6
- </div>
7
- `;document.body.insertAdjacentHTML("beforeend",r);const o=document.getElementById("agent-sdk-floating-button");if(!o)return;const a=document.getElementById("agent-sdk-ui-iframe");if(!a)return;const d=document.getElementById("agent-sdk-floating-reminder");if(!d)return;o.style.right=`${-o.offsetWidth/2}px`,o.style.bottom=`${u.options?.bottom?u.options.bottom:20}px`;let y=null;const k=()=>{y&&clearTimeout(y),y=setTimeout(()=>{u.hideButton(),y=null},5e3)};o.addEventListener("click",G=>{if(!G.target)return;const J=document.getElementById("agent-sdk-ui-iframe");if(!J)return;const q=document.getElementById("agent-sdk-floating-reminder");q&&(o.classList.contains("clicked")?(q.style.display="none",J.style.display==="none"?(u.showIframe(),clearTimeout(y)):u.hideIframe()):k(),u.showButton())});let C=null;const F=()=>{C&&C.unset(),C=Yn("#agent-sdk-floating-button").draggable({enabled:u.options?.draggable?u.options.draggable:!1,modifiers:[Yn.modifiers.restrictRect({restriction:"parent",endOnly:!0})],listeners:{start(){o.style.pointerEvents="none",clearTimeout(y)},move(G){requestAnimationFrame(()=>{if(d.style.display==="flex"||a.style.display==="block"||!o.classList.contains("clicked"))return;const N=G.target,J=parseFloat(N.style.right)||0,q=parseFloat(N.style.bottom)||0,ne=J-G.dx,re=q-G.dy;N.style.right=`${ne}px`,N.style.bottom=`${re}px`,N.setAttribute("data-right",ne),N.setAttribute("data-bottom",re)})},end(G){const N=G.target,J=parseFloat(N.style.right)||0,q=parseFloat(N.style.bottom)||0,ne=window.innerWidth,re=N.offsetWidth;ne-J-re/2<ne/2?(N.style.right=`${ne-re/2}px`,N.style.left="auto"):(N.style.right=`${-re/2}px`,N.style.left="auto"),N.setAttribute("data-right",parseFloat(N.style.right)),N.setAttribute("data-bottom",q),o.style.pointerEvents="auto",u.showButton(!1),k()}}})};u.options?.draggable&&u.options.draggable&&F()},zi=u=>{const r=`
8
- <iframe src="${u.options.uiIframeSrc}" class="agent-sdk-floating-iframe" id="agent-sdk-ui-iframe" allow="clipboard-write" style="display: none"></iframe>
9
- `;document.body.insertAdjacentHTML("beforeend",r);const o=document.getElementById("agent-sdk-ui-iframe");o&&(u.getDeviceType()==="PC"?(o.style.borderRadius="16px",o.style.boxShadow="0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",o.style.zIndex="2000",o.style.bottom=u.options?.bottom?`${u.options.bottom}px`:"20px",o.style.right=u.options?.right?`${u.options.right+70}px`:"90px",o.style.width="480px",o.style.height="80vh"):u.getDeviceType()==="H5"&&(o.style.zIndex="10000",o.style.bottom="0",o.style.right="0",o.style.width="100%",o.style.height="100%"))},ji=u=>{document.body.insertAdjacentHTML("beforeend",`
10
- <div class="agent-sdk-floating-reminder" id="agent-sdk-floating-reminder">
11
- <div class="title-container">
12
- <div class="title"></div>
13
- <svg class="close" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
14
- <path d="M14.9397 3.0603L3.0603 14.9397M3.0603 3.0603L14.9397 14.9397" stroke="#B2B8FF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
15
- </svg>
16
- </div>
17
- <div class="content"></div>
18
- <button></button>
19
- </div>
20
- `);const o=document.getElementById("agent-sdk-floating-reminder");if(!o)return;u.getDeviceType()==="PC"?(o.style.right=u.options?.right?`${u.options.right+70}px`:"90px",o.style.bottom=u.options?.bottom?`${u.options.bottom}px`:"20px",o.style.maxWidth="400px"):u.getDeviceType()==="H5"&&(o.style.right=u.options?.right?`${u.options.right}px`:"20px",o.style.bottom=u.options?.bottom?`${u.options.bottom+70}px`:"90px",o.style.maxWidth="278px");const a=document.querySelector(".agent-sdk-floating-reminder .close");a&&a.addEventListener("click",()=>{u.hideReminder()})};class Gi{options;bellhop;signalClient;signalServerUrl="wss://ai-signal.edusoho.net";shortcutList=[];events=new Map;constructor(r){r.uiIframeSrc||(r.uiIframeSrc="/ui.html"),this.options={...r,variables:{}},this.bellhop=new _r,this.signalClient=new Bi,this.signalClient.connect(r.signalServerUrl?r.signalServerUrl:this.signalServerUrl,{token:r.token}),this.signalClient.on("message",o=>{const a=document.getElementById("agent-sdk-unread-count"),d=document.getElementById("agent-sdk-ui-iframe");if(!a||!d)return;const y=JSON.parse(o);y.signal==="message.unread"&&(a.textContent=y.data.total,this.options.variables.unreadMessages=y.data.counters,d.style.display==="none"?(y.data.total==0?a.style.display="none":a.style.display="block",Number(y.data.total)&&this.showButton()):d.style.display==="block"&&(this.showIframe(),this.filterReadMessage()))})}getDeviceType(){const r=navigator.userAgent.toLowerCase(),o=/(ipad|tablet|playbook|silk)|(android(?!.*mobile))/i.test(r);return/mobile|android|iphone|ipod|blackberry|windows phone/i.test(r)||o?"H5":"PC"}filterReadMessage(){const r=document.getElementById("agent-sdk-unread-count");r&&(this.options.variables.unreadMessages=this.options.variables.unreadMessages.filter(o=>o.domainId!==this.options.variables.chatMetadata.domainId),this.options.variables.unreadMessages.length===0?r.style.display="none":(r.style.display="block",r.textContent=this.options.variables.unreadMessages.length))}on(r,o){this.events.has(r)||this.events.set(r,[]),this.events.get(r).push(o)}emit(r,o){const a=this.events.get(r);a&&a.forEach(d=>d(o))}off(r,o){const a=this.events.get(r);a&&this.events.set(r,a.filter(d=>d!==o))}setVariable(r,o){this.options.variables[r]=o}setChatMetadata(r){this.setVariable("chatMetadata",r)}addShortcut(r,o){const a=this.shortcutList.findIndex(d=>d.key===r);a>=0?this.shortcutList[a].content=o:this.shortcutList.push({key:r,content:o})}removeShortcut(r){const o=this.shortcutList?.findIndex(a=>a.key===r)??-1;o!==-1&&this.shortcutList.splice(o,1)}boot(){ji(this),zi(this),Yi(this);const r=document.getElementById("agent-sdk-ui-iframe");r&&(this.bellhop.connect(r),this.bellhop.send("init",{apiBaseUrl:this.options.apiBaseUrl,deviceType:this.getDeviceType(),token:this.options.token,shortcutList:this.shortcutList,variables:this.options.variables}),this.bellhop.on("hideIframe",()=>{this.hideIframe()}),this.bellhop.on("clickLink",o=>{this.emit("clickLink",o.data)}))}shutdown(){const r=document.getElementById("agent-sdk-ui-iframe"),o=document.getElementById("agent-sdk-floating-button"),a=document.getElementById("agent-sdk-floating-reminder");!r||!o||!a||(r.remove(),o.remove(),a.remove())}showIframe(r){const o=document.getElementById("agent-sdk-ui-iframe"),a=document.getElementById("agent-sdk-floating-reminder");o&&a&&(a.style.display="none",o.style.display="block",this.options.variables?.unreadMessages&&this.options.variables?.unreadMessages.filter(d=>d.domainId===this.options.variables.chatMetadata.domainId).length>0?(this.filterReadMessage(),this.bellhop.send("showIframe",{loadUnreadMessages:!0,chatMessage:r||null})):this.bellhop.send("showIframe",{loadUnreadMessages:!1,chatMessage:r||null}),this.showButton())}hideIframe(){const r=document.getElementById("agent-sdk-ui-iframe");if(!r)return;const o=document.getElementById("agent-sdk-floating-reminder");o&&(r.style.display="none",o.style.display="none",this.hideButton())}showButton(r=!0){const o=document.getElementById("agent-sdk-floating-button");if(!o)return;r?o.style.transition="transform 0.3s":o.style.transition="",o.classList.add("clicked"),o.style.opacity="1";const a=window.innerWidth,d=o.offsetWidth;(parseFloat(o.style.right)||0-d/2)<a/2?o.style.transform=`translateX(-${this.options?.right?this.options.right+d/2:20+d/2}px)`:o.style.transform=`translateX(${this.options?.right?this.options.right+d/2:20+d/2}px)`}hideButton(r=!0){const o=document.getElementById("agent-sdk-floating-button");o&&(r?o.style.transition="transform 0.3s":o.style.transition="",o.classList.remove("clicked"),o.style.transform="",o.style.opacity="60%")}chat(r,o){const a={content:r,workflow:o};this.showIframe(a)}async showReminder(r){this.showButton();const o=document.querySelector(".agent-sdk-floating-reminder"),a=document.querySelector(".agent-sdk-floating-reminder .title"),d=document.querySelector(".agent-sdk-floating-reminder .content"),y=document.querySelector(".agent-sdk-floating-reminder .close"),k=document.querySelector(".agent-sdk-floating-reminder button");o&&a&&d&&y&&k&&(y.style.display="block",a.style.display="none",d.style.display="none",k.style.display="none",o.style.display="flex",r?.title&&(a.style.display="block",a.textContent=r.title),r?.content&&(d.style.display="block",d.textContent=r.content,a.style.display==="block"&&(d.style.marginTop="8px")),r?.buttonContent&&(k.style.display="block",(a.style.display==="block"||d.style.display==="block")&&(k.style.marginTop="8px"),r.buttonContent==="plan.generate"?(k.textContent="制定学习计划",k.addEventListener("click",()=>{this.chat("制定学习计划",null)})):r.buttonContent==="teacher.question"&&(k.textContent="立即解惑",k.addEventListener("click",()=>{this.chat(r?.chatContent,r?.workflow)}))),r.duration&&r.duration>0?(y.style.display="none",setTimeout(()=>{this.hideReminder(),this.hideButton()},r.duration)):y.style.display="block")}hideReminder(){const r=document.getElementById("agent-sdk-floating-reminder");r&&(r.style.display="none",this.hideButton())}}return Gi}();