vue-wiguet-chatweb 0.0.11 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- (function(ee,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(ee=typeof globalThis<"u"?globalThis:ee||self,d(ee["vue-wiguet-chatweb"]={},ee.Vue))})(this,function(ee,d){"use strict";let He;const wr=new Uint8Array(16);function Sr(){if(!He&&(He=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!He))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return He(wr)}const F=[];for(let t=0;t<256;++t)F.push((t+256).toString(16).slice(1));function br(t,e=0){return F[t[e+0]]+F[t[e+1]]+F[t[e+2]]+F[t[e+3]]+"-"+F[t[e+4]]+F[t[e+5]]+"-"+F[t[e+6]]+F[t[e+7]]+"-"+F[t[e+8]]+F[t[e+9]]+"-"+F[t[e+10]]+F[t[e+11]]+F[t[e+12]]+F[t[e+13]]+F[t[e+14]]+F[t[e+15]]}const cn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kr(t,e,n){if(cn.randomUUID&&!e&&!t)return cn.randomUUID();t=t||{};const s=t.random||(t.rng||Sr)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let r=0;r<16;++r)e[n+r]=s[r];return e}return br(s)}var Er=Object.defineProperty,Tr=(t,e,n)=>e in t?Er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e,n)=>(Tr(t,typeof e!="symbol"?e+"":e,n),n);const Ce={LF:`
1
+ (function(ee,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(ee=typeof globalThis<"u"?globalThis:ee||self,u(ee["vue-wiguet-chatweb"]={},ee.Vue))})(this,function(ee,u){"use strict";let He;const wr=new Uint8Array(16);function Sr(){if(!He&&(He=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!He))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return He(wr)}const V=[];for(let t=0;t<256;++t)V.push((t+256).toString(16).slice(1));function br(t,e=0){return V[t[e+0]]+V[t[e+1]]+V[t[e+2]]+V[t[e+3]]+"-"+V[t[e+4]]+V[t[e+5]]+"-"+V[t[e+6]]+V[t[e+7]]+"-"+V[t[e+8]]+V[t[e+9]]+"-"+V[t[e+10]]+V[t[e+11]]+V[t[e+12]]+V[t[e+13]]+V[t[e+14]]+V[t[e+15]]}const cn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kr(t,e,n){if(cn.randomUUID&&!e&&!t)return cn.randomUUID();t=t||{};const s=t.random||(t.rng||Sr)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let r=0;r<16;++r)e[n+r]=s[r];return e}return br(s)}var Er=Object.defineProperty,Tr=(t,e,n)=>e in t?Er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e,n)=>(Tr(t,typeof e!="symbol"?e+"":e,n),n);const Ce={LF:`
2
2
  `,NULL:"\0"};class te{constructor(e){const{command:n,headers:s,body:r,binaryBody:i,escapeHeaderValues:o,skipContentLengthHeader:a}=e;this.command=n,this.headers=Object.assign({},s||{}),i?(this._binaryBody=i,this.isBinaryBody=!0):(this._body=r||"",this.isBinaryBody=!1),this.escapeHeaderValues=o||!1,this.skipContentLengthHeader=a||!1}get body(){return!this._body&&this.isBinaryBody&&(this._body=new TextDecoder().decode(this._binaryBody)),this._body||""}get binaryBody(){return!this._binaryBody&&!this.isBinaryBody&&(this._binaryBody=new TextEncoder().encode(this._body)),this._binaryBody}static fromRawFrame(e,n){const s={},r=i=>i.replace(/^\s+|\s+$/g,"");for(const i of e.headers.reverse()){i.indexOf(":");const o=r(i[0]);let a=r(i[1]);n&&e.command!=="CONNECT"&&e.command!=="CONNECTED"&&(a=te.hdrValueUnEscape(a)),s[o]=a}return new te({command:e.command,headers:s,binaryBody:e.binaryBody,escapeHeaderValues:n})}toString(){return this.serializeCmdAndHeaders()}serialize(){const e=this.serializeCmdAndHeaders();return this.isBinaryBody?te.toUnit8Array(e,this._binaryBody).buffer:e+this._body+Ce.NULL}serializeCmdAndHeaders(){const e=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(const n of Object.keys(this.headers||{})){const s=this.headers[n];this.escapeHeaderValues&&this.command!=="CONNECT"&&this.command!=="CONNECTED"?e.push(`${n}:${te.hdrValueEscape(`${s}`)}`):e.push(`${n}:${s}`)}return(this.isBinaryBody||!this.isBodyEmpty()&&!this.skipContentLengthHeader)&&e.push(`content-length:${this.bodyLength()}`),e.join(Ce.LF)+Ce.LF+Ce.LF}isBodyEmpty(){return this.bodyLength()===0}bodyLength(){const e=this.binaryBody;return e?e.length:0}static sizeOfUTF8(e){return e?new TextEncoder().encode(e).length:0}static toUnit8Array(e,n){const s=new TextEncoder().encode(e),r=new Uint8Array([0]),i=new Uint8Array(s.length+n.length+r.length);return i.set(s),i.set(n,s.length),i.set(r,s.length+n.length),i}static marshall(e){return new te(e).serialize()}static hdrValueEscape(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")}static hdrValueUnEscape(e){return e.replace(/\\r/g,"\r").replace(/\\n/g,`
3
- `).replace(/\\c/g,":").replace(/\\\\/g,"\\")}}const ln=0,Pe=10,ze=13,Or=58;class Cr{constructor(e,n){this.onFrame=e,this.onIncomingPing=n,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}parseChunk(e,n=!1){let s;if(typeof e=="string"?s=this._encoder.encode(e):s=new Uint8Array(e),n&&s[s.length-1]!==0){const r=new Uint8Array(s.length+1);r.set(s,0),r[s.length]=0,s=r}for(let r=0;r<s.length;r++){const i=s[r];this._onByte(i)}}_collectFrame(e){if(e!==ln&&e!==ze){if(e===Pe){this.onIncomingPing();return}this._onByte=this._collectCommand,this._reinjectByte(e)}}_collectCommand(e){if(e!==ze){if(e===Pe){this._results.command=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaders;return}this._consumeByte(e)}}_collectHeaders(e){if(e!==ze){if(e===Pe){this._setupCollectBody();return}this._onByte=this._collectHeaderKey,this._reinjectByte(e)}}_reinjectByte(e){this._onByte(e)}_collectHeaderKey(e){if(e===Or){this._headerKey=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaderValue;return}this._consumeByte(e)}_collectHeaderValue(e){if(e!==ze){if(e===Pe){this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,this._onByte=this._collectHeaders;return}this._consumeByte(e)}}_setupCollectBody(){const e=this._results.headers.filter(n=>n[0]==="content-length")[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}_collectBodyNullTerminated(e){if(e===ln){this._retrievedBody();return}this._consumeByte(e)}_collectBodyFixedSize(e){if(this._bodyBytesRemaining--===0){this._retrievedBody();return}this._consumeByte(e)}_retrievedBody(){this._results.binaryBody=this._consumeTokenAsRaw();try{this.onFrame(this._results)}catch(e){console.log("Ignoring an exception thrown by a frame handler. Original exception: ",e)}this._initState()}_consumeByte(e){this._token.push(e)}_consumeTokenAsUTF8(){return this._decoder.decode(this._consumeTokenAsRaw())}_consumeTokenAsRaw(){const e=new Uint8Array(this._token);return this._token=[],e}_initState(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}}var K;(function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSING=2]="CLOSING",t[t.CLOSED=3]="CLOSED"})(K=K||(K={}));var U;(function(t){t[t.ACTIVE=0]="ACTIVE",t[t.DEACTIVATING=1]="DEACTIVATING",t[t.INACTIVE=2]="INACTIVE"})(U=U||(U={}));class R{constructor(e){this.versions=e}supportedVersions(){return this.versions.join(",")}protocolVersions(){return this.versions.map(e=>`v${e.replace(".","")}.stomp`)}}R.V1_0="1.0",R.V1_1="1.1",R.V1_2="1.2",R.default=new R([R.V1_2,R.V1_1,R.V1_0]);function Nr(t,e){t.terminate=function(){const n=()=>{};this.onerror=n,this.onmessage=n,this.onopen=n;const s=new Date,r=Math.random().toString().substring(2,8),i=this.onclose;this.onclose=o=>{const a=new Date().getTime()-s.getTime();e(`Discarded socket (#${r}) closed after ${a}ms, with code/reason: ${o.code}/${o.reason}`)},this.close(),i==null||i.call(t,{code:4001,reason:`Quick discarding socket (#${r}) without waiting for the shutdown sequence.`,wasClean:!1})}}class Ir{constructor(e,n,s){this._client=e,this._webSocket=n,this._connected=!1,this._serverFrameHandlers={CONNECTED:r=>{this.debug(`connected to server ${r.headers.server}`),this._connected=!0,this._connectedVersion=r.headers.version,this._connectedVersion===R.V1_2&&(this._escapeHeaderValues=!0),this._setupHeartbeat(r.headers),this.onConnect(r)},MESSAGE:r=>{const i=r.headers.subscription,o=this._subscriptions[i]||this.onUnhandledMessage,a=r,c=this,l=this._connectedVersion===R.V1_2?a.headers.ack:a.headers["message-id"];a.ack=(u={})=>c.ack(l,i,u),a.nack=(u={})=>c.nack(l,i,u),o(a)},RECEIPT:r=>{const i=this._receiptWatchers[r.headers["receipt-id"]];i?(i(r),delete this._receiptWatchers[r.headers["receipt-id"]]):this.onUnhandledReceipt(r)},ERROR:r=>{this.onStompError(r)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.debug=s.debug,this.stompVersions=s.stompVersions,this.connectHeaders=s.connectHeaders,this.disconnectHeaders=s.disconnectHeaders,this.heartbeatIncoming=s.heartbeatIncoming,this.heartbeatOutgoing=s.heartbeatOutgoing,this.splitLargeFrames=s.splitLargeFrames,this.maxWebSocketChunkSize=s.maxWebSocketChunkSize,this.forceBinaryWSFrames=s.forceBinaryWSFrames,this.logRawCommunication=s.logRawCommunication,this.appendMissingNULLonIncoming=s.appendMissingNULLonIncoming,this.discardWebsocketOnCommFailure=s.discardWebsocketOnCommFailure,this.onConnect=s.onConnect,this.onDisconnect=s.onDisconnect,this.onStompError=s.onStompError,this.onWebSocketClose=s.onWebSocketClose,this.onWebSocketError=s.onWebSocketError,this.onUnhandledMessage=s.onUnhandledMessage,this.onUnhandledReceipt=s.onUnhandledReceipt,this.onUnhandledFrame=s.onUnhandledFrame}get connectedVersion(){return this._connectedVersion}get connected(){return this._connected}start(){const e=new Cr(n=>{const s=te.fromRawFrame(n,this._escapeHeaderValues);this.logRawCommunication||this.debug(`<<< ${s}`),(this._serverFrameHandlers[s.command]||this.onUnhandledFrame)(s)},()=>{this.debug("<<< PONG")});this._webSocket.onmessage=n=>{if(this.debug("Received data"),this._lastServerActivityTS=Date.now(),this.logRawCommunication){const s=n.data instanceof ArrayBuffer?new TextDecoder().decode(n.data):n.data;this.debug(`<<< ${s}`)}e.parseChunk(n.data,this.appendMissingNULLonIncoming)},this._webSocket.onclose=n=>{this.debug(`Connection closed to ${this._webSocket.url}`),this._cleanUp(),this.onWebSocketClose(n)},this._webSocket.onerror=n=>{this.onWebSocketError(n)},this._webSocket.onopen=()=>{const n=Object.assign({},this.connectHeaders);this.debug("Web Socket Opened..."),n["accept-version"]=this.stompVersions.supportedVersions(),n["heart-beat"]=[this.heartbeatOutgoing,this.heartbeatIncoming].join(","),this._transmit({command:"CONNECT",headers:n})}}_setupHeartbeat(e){if(e.version!==R.V1_1&&e.version!==R.V1_2||!e["heart-beat"])return;const[n,s]=e["heart-beat"].split(",").map(r=>parseInt(r,10));if(this.heartbeatOutgoing!==0&&s!==0){const r=Math.max(this.heartbeatOutgoing,s);this.debug(`send PING every ${r}ms`),this._pinger=setInterval(()=>{this._webSocket.readyState===K.OPEN&&(this._webSocket.send(Ce.LF),this.debug(">>> PING"))},r)}if(this.heartbeatIncoming!==0&&n!==0){const r=Math.max(this.heartbeatIncoming,n);this.debug(`check PONG every ${r}ms`),this._ponger=setInterval(()=>{const i=Date.now()-this._lastServerActivityTS;i>r*2&&(this.debug(`did not receive server activity for the last ${i}ms`),this._closeOrDiscardWebsocket())},r)}}_closeOrDiscardWebsocket(){this.discardWebsocketOnCommFailure?(this.debug("Discarding websocket, the underlying socket may linger for a while"),this.discardWebsocket()):(this.debug("Issuing close on the websocket"),this._closeWebsocket())}forceDisconnect(){this._webSocket&&(this._webSocket.readyState===K.CONNECTING||this._webSocket.readyState===K.OPEN)&&this._closeOrDiscardWebsocket()}_closeWebsocket(){this._webSocket.onmessage=()=>{},this._webSocket.close()}discardWebsocket(){typeof this._webSocket.terminate!="function"&&Nr(this._webSocket,e=>this.debug(e)),this._webSocket.terminate()}_transmit(e){const{command:n,headers:s,body:r,binaryBody:i,skipContentLengthHeader:o}=e,a=new te({command:n,headers:s,body:r,binaryBody:i,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:o});let c=a.serialize();if(this.logRawCommunication?this.debug(`>>> ${c}`):this.debug(`>>> ${a}`),this.forceBinaryWSFrames&&typeof c=="string"&&(c=new TextEncoder().encode(c)),typeof c!="string"||!this.splitLargeFrames)this._webSocket.send(c);else{let l=c;for(;l.length>0;){const u=l.substring(0,this.maxWebSocketChunkSize);l=l.substring(this.maxWebSocketChunkSize),this._webSocket.send(u),this.debug(`chunk sent = ${u.length}, remaining = ${l.length}`)}}}dispose(){if(this.connected)try{const e=Object.assign({},this.disconnectHeaders);e.receipt||(e.receipt=`close-${this._counter++}`),this.watchForReceipt(e.receipt,n=>{this._closeWebsocket(),this._cleanUp(),this.onDisconnect(n)}),this._transmit({command:"DISCONNECT",headers:e})}catch(e){this.debug(`Ignoring error during disconnect ${e}`)}else(this._webSocket.readyState===K.CONNECTING||this._webSocket.readyState===K.OPEN)&&this._closeWebsocket()}_cleanUp(){this._connected=!1,this._pinger&&(clearInterval(this._pinger),this._pinger=void 0),this._ponger&&(clearInterval(this._ponger),this._ponger=void 0)}publish(e){const{destination:n,headers:s,body:r,binaryBody:i,skipContentLengthHeader:o}=e,a=Object.assign({destination:n},s);this._transmit({command:"SEND",headers:a,body:r,binaryBody:i,skipContentLengthHeader:o})}watchForReceipt(e,n){this._receiptWatchers[e]=n}subscribe(e,n,s={}){s=Object.assign({},s),s.id||(s.id=`sub-${this._counter++}`),s.destination=e,this._subscriptions[s.id]=n,this._transmit({command:"SUBSCRIBE",headers:s});const r=this;return{id:s.id,unsubscribe(i){return r.unsubscribe(s.id,i)}}}unsubscribe(e,n={}){n=Object.assign({},n),delete this._subscriptions[e],n.id=e,this._transmit({command:"UNSUBSCRIBE",headers:n})}begin(e){const n=e||`tx-${this._counter++}`;this._transmit({command:"BEGIN",headers:{transaction:n}});const s=this;return{id:n,commit(){s.commit(n)},abort(){s.abort(n)}}}commit(e){this._transmit({command:"COMMIT",headers:{transaction:e}})}abort(e){this._transmit({command:"ABORT",headers:{transaction:e}})}ack(e,n,s={}){s=Object.assign({},s),this._connectedVersion===R.V1_2?s.id=e:s["message-id"]=e,s.subscription=n,this._transmit({command:"ACK",headers:s})}nack(e,n,s={}){return s=Object.assign({},s),this._connectedVersion===R.V1_2?s.id=e:s["message-id"]=e,s.subscription=n,this._transmit({command:"NACK",headers:s})}}class Dr{constructor(e={}){this.stompVersions=R.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8*1024,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.discardWebsocketOnCommFailure=!1,this.state=U.INACTIVE;const n=()=>{};this.debug=n,this.beforeConnect=n,this.onConnect=n,this.onDisconnect=n,this.onUnhandledMessage=n,this.onUnhandledReceipt=n,this.onUnhandledFrame=n,this.onStompError=n,this.onWebSocketClose=n,this.onWebSocketError=n,this.logRawCommunication=!1,this.onChangeState=n,this.connectHeaders={},this._disconnectHeaders={},this.configure(e)}get webSocket(){var e;return(e=this._stompHandler)==null?void 0:e._webSocket}get disconnectHeaders(){return this._disconnectHeaders}set disconnectHeaders(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}get connected(){return!!this._stompHandler&&this._stompHandler.connected}get connectedVersion(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}get active(){return this.state===U.ACTIVE}_changeState(e){this.state=e,this.onChangeState(e)}configure(e){Object.assign(this,e)}activate(){const e=()=>{if(this.active){this.debug("Already ACTIVE, ignoring request to activate");return}this._changeState(U.ACTIVE),this._connect()};this.state===U.DEACTIVATING?(this.debug("Waiting for deactivation to finish before activating"),this.deactivate().then(()=>{e()})):e()}async _connect(){if(await this.beforeConnect(),this._stompHandler){this.debug("There is already a stompHandler, skipping the call to connect");return}if(!this.active){this.debug("Client has been marked inactive, will not attempt to connect");return}this.connectionTimeout>0&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout(()=>{this.connected||(this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`),this.forceDisconnect())},this.connectionTimeout)),this.debug("Opening Web Socket...");const e=this._createWebSocket();this._stompHandler=new Ir(this,e,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:n=>{if(this._connectionWatcher&&(clearTimeout(this._connectionWatcher),this._connectionWatcher=void 0),!this.active){this.debug("STOMP got connected while deactivate was issued, will disconnect now"),this._disposeStompHandler();return}this.onConnect(n)},onDisconnect:n=>{this.onDisconnect(n)},onStompError:n=>{this.onStompError(n)},onWebSocketClose:n=>{this._stompHandler=void 0,this.state===U.DEACTIVATING&&this._changeState(U.INACTIVE),this.onWebSocketClose(n),this.active&&this._schedule_reconnect()},onWebSocketError:n=>{this.onWebSocketError(n)},onUnhandledMessage:n=>{this.onUnhandledMessage(n)},onUnhandledReceipt:n=>{this.onUnhandledReceipt(n)},onUnhandledFrame:n=>{this.onUnhandledFrame(n)}}),this._stompHandler.start()}_createWebSocket(){let e;if(this.webSocketFactory)e=this.webSocketFactory();else if(this.brokerURL)e=new WebSocket(this.brokerURL,this.stompVersions.protocolVersions());else throw new Error("Either brokerURL or webSocketFactory must be provided");return e.binaryType="arraybuffer",e}_schedule_reconnect(){this.reconnectDelay>0&&(this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`),this._reconnector=setTimeout(()=>{this._connect()},this.reconnectDelay))}async deactivate(e={}){var n;const s=e.force||!1,r=this.active;let i;if(this.state===U.INACTIVE)return this.debug("Already INACTIVE, nothing more to do"),Promise.resolve();if(this._changeState(U.DEACTIVATING),this._reconnector&&(clearTimeout(this._reconnector),this._reconnector=void 0),this._stompHandler&&this.webSocket.readyState!==K.CLOSED){const o=this._stompHandler.onWebSocketClose;i=new Promise((a,c)=>{this._stompHandler.onWebSocketClose=l=>{o(l),a()}})}else return this._changeState(U.INACTIVE),Promise.resolve();return s?(n=this._stompHandler)==null||n.discardWebsocket():r&&this._disposeStompHandler(),i}forceDisconnect(){this._stompHandler&&this._stompHandler.forceDisconnect()}_disposeStompHandler(){this._stompHandler&&this._stompHandler.dispose()}publish(e){this._checkConnection(),this._stompHandler.publish(e)}_checkConnection(){if(!this.connected)throw new TypeError("There is no underlying STOMP connection")}watchForReceipt(e,n){this._checkConnection(),this._stompHandler.watchForReceipt(e,n)}subscribe(e,n,s={}){return this._checkConnection(),this._stompHandler.subscribe(e,n,s)}unsubscribe(e,n={}){this._checkConnection(),this._stompHandler.unsubscribe(e,n)}begin(e){return this._checkConnection(),this._stompHandler.begin(e)}commit(e){this._checkConnection(),this._stompHandler.commit(e)}abort(e){this._checkConnection(),this._stompHandler.abort(e)}ack(e,n,s={}){this._checkConnection(),this._stompHandler.ack(e,n,s)}nack(e,n,s={}){this._checkConnection(),this._stompHandler.nack(e,n,s)}}class vr{constructor(e,n){_r(this,"client"),this.virtualHost=e,this.queue=n,this.client=new Dr({brokerURL:window.VITE_BROKER_URL?window.VITE_BROKER_URL:"ws://192.168.20.107:15674/ws",connectHeaders:{login:window.VITE_USERNAME?window.VITE_USERNAME:"admin",passcode:window.VITE_PASSWORD?window.VITE_PASSWORD:"password",host:this.virtualHost}})}async connect(){return new Promise((e,n)=>{this.client.onConnect=()=>{e()},this.client.activate()})}async disconnectClient(){this.client.onDisconnect=()=>{},this.client.deactivate(),this.client.unsubscribe("")}async subscribe(e){await this.connect(),this.client.subscribe(`/queue/${this.queue}`,n=>{const s=JSON.parse(n.body);e(s)})}async publish(e){this.client.publish({destination:`/queue/${this.queue}`,body:JSON.stringify({data:e})})}}var un=(t=>(t.NEW_MESSAGE="new_message",t))(un||{});const ne=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},xr={},Mr={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ar=[d.createElementVNode("path",{d:"M16 31C24.2843 31 31 24.2843 31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31Z",stroke:"#B3B3B3","stroke-miterlimit":"10"},null,-1),d.createElementVNode("path",{d:"M19.78 22.3L15.98 16.63H15.9601L12.2001 22.3H11.0701L15.37 15.8899L11.25 9.69995H12.38L15.98 15.08H16L19.67 9.69995H20.8L16.55 15.82L20.92 22.3H19.77H19.78Z",fill:"#B3B3B3"},null,-1)];function Fr(t,e){return d.openBlock(),d.createElementBlock("svg",Mr,Ar)}const Vr=ne(xr,[["render",Fr]]),Rr={},Lr={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Wr=[d.createElementVNode("path",{fill:"#F28B0C",d:"M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376V479.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"},null,-1)];function Br(t,e){return d.openBlock(),d.createElementBlock("svg",Lr,Wr)}const Ur=ne(Rr,[["render",Br]]);function dn(t,e){return function(){return t.apply(e,arguments)}}const{toString:$r}=Object.prototype,{getPrototypeOf:bt}=Object,Ze=(t=>e=>{const n=$r.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),e=>Ze(e)===t),qe=t=>e=>typeof e===t,{isArray:me}=Array,Ne=qe("undefined");function Hr(t){return t!==null&&!Ne(t)&&t.constructor!==null&&!Ne(t.constructor)&&$(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const hn=Y("ArrayBuffer");function Pr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&hn(t.buffer),e}const zr=qe("string"),$=qe("function"),fn=qe("number"),je=t=>t!==null&&typeof t=="object",Zr=t=>t===!0||t===!1,Ge=t=>{if(Ze(t)!=="object")return!1;const e=bt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},qr=Y("Date"),jr=Y("File"),Gr=Y("Blob"),Yr=Y("FileList"),Jr=t=>je(t)&&$(t.pipe),Kr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||$(t.append)&&((e=Ze(t))==="formdata"||e==="object"&&$(t.toString)&&t.toString()==="[object FormData]"))},Qr=Y("URLSearchParams"),Xr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ie(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,r;if(typeof t!="object"&&(t=[t]),me(t))for(s=0,r=t.length;s<r;s++)e.call(null,t[s],s,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(s=0;s<o;s++)a=i[s],e.call(null,t[a],a,t)}}function mn(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,r;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const yn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),pn=t=>!Ne(t)&&t!==yn;function kt(){const{caseless:t}=pn(this)&&this||{},e={},n=(s,r)=>{const i=t&&mn(e,r)||r;Ge(e[i])&&Ge(s)?e[i]=kt(e[i],s):Ge(s)?e[i]=kt({},s):me(s)?e[i]=s.slice():e[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Ie(arguments[s],n);return e}const ei=(t,e,n,{allOwnKeys:s}={})=>(Ie(e,(r,i)=>{n&&$(r)?t[i]=dn(r,n):t[i]=r},{allOwnKeys:s}),t),ti=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ni=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},si=(t,e,n,s)=>{let r,i,o;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)o=r[i],(!s||s(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&bt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ri=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},ii=t=>{if(!t)return null;if(me(t))return t;let e=t.length;if(!fn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},oi=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&bt(Uint8Array)),ai=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=s.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},ci=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},li=Y("HTMLFormElement"),ui=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),gn=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),di=Y("RegExp"),wn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};Ie(n,(r,i)=>{e(r,i,t)!==!1&&(s[i]=r)}),Object.defineProperties(t,s)},hi=t=>{wn(t,(e,n)=>{if($(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if($(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fi=(t,e)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return me(t)?s(t):s(String(t).split(e)),n},mi=()=>{},yi=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Et="abcdefghijklmnopqrstuvwxyz",Sn="0123456789",bn={DIGIT:Sn,ALPHA:Et,ALPHA_DIGIT:Et+Et.toUpperCase()+Sn},pi=(t=16,e=bn.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function gi(t){return!!(t&&$(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const wi=t=>{const e=new Array(10),n=(s,r)=>{if(je(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[r]=s;const i=me(s)?[]:{};return Ie(s,(o,a)=>{const c=n(o,r+1);!Ne(c)&&(i[a]=c)}),e[r]=void 0,i}}return s};return n(t,0)},Si=Y("AsyncFunction"),h={isArray:me,isArrayBuffer:hn,isBuffer:Hr,isFormData:Kr,isArrayBufferView:Pr,isString:zr,isNumber:fn,isBoolean:Zr,isObject:je,isPlainObject:Ge,isUndefined:Ne,isDate:qr,isFile:jr,isBlob:Gr,isRegExp:di,isFunction:$,isStream:Jr,isURLSearchParams:Qr,isTypedArray:oi,isFileList:Yr,forEach:Ie,merge:kt,extend:ei,trim:Xr,stripBOM:ti,inherits:ni,toFlatObject:si,kindOf:Ze,kindOfTest:Y,endsWith:ri,toArray:ii,forEachEntry:ai,matchAll:ci,isHTMLForm:li,hasOwnProperty:gn,hasOwnProp:gn,reduceDescriptors:wn,freezeMethods:hi,toObjectSet:fi,toCamelCase:ui,noop:mi,toFiniteNumber:yi,findKey:mn,global:yn,isContextDefined:pn,ALPHABET:bn,generateString:pi,isSpecCompliantForm:gi,toJSONObject:wi,isAsyncFn:Si,isThenable:t=>t&&(je(t)||$(t))&&$(t.then)&&$(t.catch)};function T(t,e,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r)}h.inherits(T,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const kn=T.prototype,En={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{En[t]={value:t}}),Object.defineProperties(T,En),Object.defineProperty(kn,"isAxiosError",{value:!0}),T.from=(t,e,n,s,r,i)=>{const o=Object.create(kn);return h.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),T.call(o,t.message,e,n,s,r),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const bi=null;function Tt(t){return h.isPlainObject(t)||h.isArray(t)}function Tn(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function _n(t,e,n){return t?t.concat(e).map(function(r,i){return r=Tn(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function ki(t){return h.isArray(t)&&!t.some(Tt)}const Ei=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,N){return!h.isUndefined(N[g])});const s=n.metaTokens,r=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(h.isDate(m))return m.toISOString();if(!c&&h.isBlob(m))throw new T("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(m)||h.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,g,N){let k=m;if(m&&!N&&typeof m=="object"){if(h.endsWith(g,"{}"))g=s?g:g.slice(0,-2),m=JSON.stringify(m);else if(h.isArray(m)&&ki(m)||(h.isFileList(m)||h.endsWith(g,"[]"))&&(k=h.toArray(m)))return g=Tn(g),k.forEach(function(I,x){!(h.isUndefined(I)||I===null)&&e.append(o===!0?_n([g],x,i):o===null?g:g+"[]",l(I))}),!1}return Tt(m)?!0:(e.append(_n(N,g,i),l(m)),!1)}const f=[],w=Object.assign(Ei,{defaultVisitor:u,convertValue:l,isVisitable:Tt});function y(m,g){if(!h.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),h.forEach(m,function(k,E){(!(h.isUndefined(k)||k===null)&&r.call(e,k,h.isString(E)?E.trim():E,g,w))===!0&&y(k,g?g.concat(E):[E])}),f.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return y(t),e}function On(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function _t(t,e){this._pairs=[],t&&Ye(t,this,e)}const Cn=_t.prototype;Cn.append=function(e,n){this._pairs.push([e,n])},Cn.toString=function(e){const n=e?function(s){return e.call(this,s,On)}:On;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Ti(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nn(t,e,n){if(!e)return t;const s=n&&n.encode||Ti,r=n&&n.serialize;let i;if(r?i=r(e,n):i=h.isURLSearchParams(e)?e.toString():new _t(e,n).toString(s),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class _i{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(s){s!==null&&e(s)})}}const In=_i,Dn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oi=typeof URLSearchParams<"u"?URLSearchParams:_t,Ci=typeof FormData<"u"?FormData:null,Ni=typeof Blob<"u"?Blob:null,Ii=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Di=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),J={isBrowser:!0,classes:{URLSearchParams:Oi,FormData:Ci,Blob:Ni},isStandardBrowserEnv:Ii,isStandardBrowserWebWorkerEnv:Di,protocols:["http","https","file","blob","url","data"]};function vi(t,e){return Ye(t,new J.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return J.isNode&&h.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function xi(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Mi(t){const e={},n=Object.keys(t);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],e[i]=t[i];return e}function vn(t){function e(n,s,r,i){let o=n[i++];const a=Number.isFinite(+o),c=i>=n.length;return o=!o&&h.isArray(r)?r.length:o,c?(h.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!h.isObject(r[o]))&&(r[o]=[]),e(n,s,r[o],i)&&h.isArray(r[o])&&(r[o]=Mi(r[o])),!a)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(s,r)=>{e(xi(s),r,n,0)}),n}return null}const Ai={"Content-Type":void 0};function Fi(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const Je={transitional:Dn,adapter:["xhr","http"],transformRequest:[function(e,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=h.isObject(e);if(i&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r&&r?JSON.stringify(vn(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return vi(e,this.formSerializer).toString();if((a=h.isFileList(e))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ye(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),Fi(e)):e}],transformResponse:[function(e){const n=this.transitional||Je.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?T.from(a,T.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};h.forEach(["delete","get","head"],function(e){Je.headers[e]={}}),h.forEach(["post","put","patch"],function(e){Je.headers[e]=h.merge(Ai)});const Ot=Je,Vi=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ri=t=>{const e={};let n,s,r;return t&&t.split(`
4
- `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||e[n]&&Vi[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},xn=Symbol("internals");function De(t){return t&&String(t).trim().toLowerCase()}function Ke(t){return t===!1||t==null?t:h.isArray(t)?t.map(Ke):String(t)}function Li(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Wi=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ct(t,e,n,s,r){if(h.isFunction(s))return s.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(s))return e.indexOf(s)!==-1;if(h.isRegExp(s))return s.test(e)}}function Bi(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function Ui(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(r,i,o){return this[s].call(this,e,r,i,o)},configurable:!0})})}class Qe{constructor(e){e&&this.set(e)}set(e,n,s){const r=this;function i(a,c,l){const u=De(c);if(!u)throw new Error("header name must be a non-empty string");const f=h.findKey(r,u);(!f||r[f]===void 0||l===!0||l===void 0&&r[f]!==!1)&&(r[f||c]=Ke(a))}const o=(a,c)=>h.forEach(a,(l,u)=>i(l,u,c));return h.isPlainObject(e)||e instanceof this.constructor?o(e,n):h.isString(e)&&(e=e.trim())&&!Wi(e)?o(Ri(e),n):e!=null&&i(n,e,s),this}get(e,n){if(e=De(e),e){const s=h.findKey(this,e);if(s){const r=this[s];if(!n)return r;if(n===!0)return Li(r);if(h.isFunction(n))return n.call(this,r,s);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=De(e),e){const s=h.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Ct(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let r=!1;function i(o){if(o=De(o),o){const a=h.findKey(s,o);a&&(!n||Ct(s,s[a],a,n))&&(delete s[a],r=!0)}}return h.isArray(e)?e.forEach(i):i(e),r}clear(e){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!e||Ct(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const n=this,s={};return h.forEach(this,(r,i)=>{const o=h.findKey(s,i);if(o){n[o]=Ke(r),delete n[i];return}const a=e?Bi(i):String(i).trim();a!==i&&delete n[i],n[a]=Ke(r),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=e&&h.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
5
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[xn]=this[xn]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=De(o);s[a]||(Ui(r,o),s[a]=!0)}return h.isArray(e)?e.forEach(i):i(e),this}}Qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.freezeMethods(Qe.prototype),h.freezeMethods(Qe);const Q=Qe;function Nt(t,e){const n=this||Ot,s=e||n,r=Q.from(s.headers);let i=s.data;return h.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function Mn(t){return!!(t&&t.__CANCEL__)}function ve(t,e,n){T.call(this,t??"canceled",T.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(ve,T,{__CANCEL__:!0});function $i(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Hi=J.isStandardBrowserEnv?function(){return{write:function(n,s,r,i,o,a){const c=[];c.push(n+"="+encodeURIComponent(s)),h.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),h.isString(i)&&c.push("path="+i),h.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Pi(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zi(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function An(t,e){return t&&!Pi(e)?zi(t,e):e}const Zi=J.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(o){const a=h.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function qi(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ji(t,e){t=t||10;const n=new Array(t),s=new Array(t);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=s[i];o||(o=l),n[r]=c,s[r]=l;let f=i,w=0;for(;f!==r;)w+=n[f++],f=f%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),l-o<e)return;const y=u&&l-u;return y?Math.round(w*1e3/y):void 0}}function Fn(t,e){let n=0;const s=ji(50,250);return r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,a=i-n,c=s(a),l=i<=o;n=i;const u={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-i)/c:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const Xe={http:bi,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,s){let r=t.data;const i=Q.from(t.headers).normalize(),o=t.responseType;let a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}h.isFormData(r)&&(J.isStandardBrowserEnv||J.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(t.auth){const y=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(y+":"+m))}const u=An(t.baseURL,t.url);l.open(t.method.toUpperCase(),Nn(u,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function f(){if(!l)return;const y=Q.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:y,config:t,request:l};$i(function(k){n(k),c()},function(k){s(k),c()},g),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(s(new T("Request aborted",T.ECONNABORTED,t,l)),l=null)},l.onerror=function(){s(new T("Network Error",T.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const g=t.transitional||Dn;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),s(new T(m,g.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,t,l)),l=null},J.isStandardBrowserEnv){const y=(t.withCredentials||Zi(u))&&t.xsrfCookieName&&Hi.read(t.xsrfCookieName);y&&i.set(t.xsrfHeaderName,y)}r===void 0&&i.setContentType(null),"setRequestHeader"in l&&h.forEach(i.toJSON(),function(m,g){l.setRequestHeader(g,m)}),h.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),o&&o!=="json"&&(l.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&l.addEventListener("progress",Fn(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Fn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=y=>{l&&(s(!y||y.type?new ve(null,t,l):y),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const w=qi(u);if(w&&J.protocols.indexOf(w)===-1){s(new T("Unsupported protocol "+w+":",T.ERR_BAD_REQUEST,t));return}l.send(r||null)})}};h.forEach(Xe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Gi={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,s;for(let r=0;r<e&&(n=t[r],!(s=h.isString(n)?Xe[n.toLowerCase()]:n));r++);if(!s)throw s===!1?new T(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(h.hasOwnProp(Xe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!h.isFunction(s))throw new TypeError("adapter is not a function");return s},adapters:Xe};function It(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ve(null,t)}function Vn(t){return It(t),t.headers=Q.from(t.headers),t.data=Nt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Gi.getAdapter(t.adapter||Ot.adapter)(t).then(function(s){return It(t),s.data=Nt.call(t,t.transformResponse,s),s.headers=Q.from(s.headers),s},function(s){return Mn(s)||(It(t),s&&s.response&&(s.response.data=Nt.call(t,t.transformResponse,s.response),s.response.headers=Q.from(s.response.headers))),Promise.reject(s)})}const Rn=t=>t instanceof Q?t.toJSON():t;function ye(t,e){e=e||{};const n={};function s(l,u,f){return h.isPlainObject(l)&&h.isPlainObject(u)?h.merge.call({caseless:f},l,u):h.isPlainObject(u)?h.merge({},u):h.isArray(u)?u.slice():u}function r(l,u,f){if(h.isUndefined(u)){if(!h.isUndefined(l))return s(void 0,l,f)}else return s(l,u,f)}function i(l,u){if(!h.isUndefined(u))return s(void 0,u)}function o(l,u){if(h.isUndefined(u)){if(!h.isUndefined(l))return s(void 0,l)}else return s(void 0,u)}function a(l,u,f){if(f in e)return s(l,u);if(f in t)return s(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u)=>r(Rn(l),Rn(u),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=c[u]||r,w=f(t[u],e[u],u);h.isUndefined(w)&&f!==a||(n[u]=w)}),n}const Ln="1.4.0",Dt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Dt[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Wn={};Dt.transitional=function(e,n,s){function r(i,o){return"[Axios v"+Ln+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(e===!1)throw new T(r(o," has been removed"+(n?" in "+n:"")),T.ERR_DEPRECATED);return n&&!Wn[o]&&(Wn[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Yi(t,e,n){if(typeof t!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let r=s.length;for(;r-- >0;){const i=s[r],o=e[i];if(o){const a=t[i],c=a===void 0||o(a,i,t);if(c!==!0)throw new T("option "+i+" must be "+c,T.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new T("Unknown option "+i,T.ERR_BAD_OPTION)}}const vt={assertOptions:Yi,validators:Dt},se=vt.validators;class et{constructor(e){this.defaults=e,this.interceptors={request:new In,response:new In}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ye(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&vt.assertOptions(s,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:vt.assertOptions(r,{encode:se.function,serialize:se.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&h.merge(i.common,i[n.method]),o&&h.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Q.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let u,f=0,w;if(!c){const m=[Vn.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),w=m.length,u=Promise.resolve(n);f<w;)u=u.then(m[f++],m[f++]);return u}w=a.length;let y=n;for(f=0;f<w;){const m=a[f++],g=a[f++];try{y=m(y)}catch(N){g.call(this,N);break}}try{u=Vn.call(this,y)}catch(m){return Promise.reject(m)}for(f=0,w=l.length;f<w;)u=u.then(l[f++],l[f++]);return u}getUri(e){e=ye(this.defaults,e);const n=An(e.baseURL,e.url);return Nn(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){et.prototype[e]=function(n,s){return this.request(ye(s||{},{method:e,url:n,data:(s||{}).data}))}}),h.forEach(["post","put","patch"],function(e){function n(s){return function(i,o,a){return this.request(ye(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}et.prototype[e]=n(),et.prototype[e+"Form"]=n(!0)});const tt=et;class xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new ve(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new xt(function(r){e=r}),cancel:e}}}const Ji=xt;function Ki(t){return function(n){return t.apply(null,n)}}function Qi(t){return h.isObject(t)&&t.isAxiosError===!0}const Mt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mt).forEach(([t,e])=>{Mt[e]=t});const Xi=Mt;function Bn(t){const e=new tt(t),n=dn(tt.prototype.request,e);return h.extend(n,tt.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Bn(ye(t,r))},n}const A=Bn(Ot);A.Axios=tt,A.CanceledError=ve,A.CancelToken=Ji,A.isCancel=Mn,A.VERSION=Ln,A.toFormData=Ye,A.AxiosError=T,A.Cancel=A.CanceledError,A.all=function(e){return Promise.all(e)},A.spread=Ki,A.isAxiosError=Qi,A.mergeConfig=ye,A.AxiosHeaders=Q,A.formToJSON=t=>vn(h.isHTMLForm(t)?new FormData(t):t),A.HttpStatusCode=Xi,A.default=A;const eo=A,At=async function(t){const e=t,n=window.VITE_BACKEND_URL?window.VITE_BACKEND_URL:"http://172.27.39.27:3000",s={method:e.method,url:`${n}${e.url}`,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json; charset=utf-8",...e.headers},data:e.data};return eo(s).then(async function(r){return r.data}).catch(async function(r){console.error(r)})},to=async t=>{const e={url:"/v1/message/list-messages",method:"POST",data:t.body,token:t.token};return await At(e).then(n=>n.response).catch(n=>{console.error(n)})},no=async(t,e)=>await At({url:"/v1/message/send-message",method:"POST",data:t,token:e}).then(s=>s).catch(s=>{console.error(s)}),Un=async t=>At({url:"/v1/app-chats/web-chat",method:"GET",token:t}).then(n=>n).catch(n=>{console.error(n)});function so(t){return d.getCurrentScope()?(d.onScopeDispose(t),!0):!1}function $n(t){return typeof t=="function"?t():d.unref(t)}const ro=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const io=t=>t!=null,Ft=()=>{};function Vt(t){var e;const n=$n(t);return(e=n==null?void 0:n.$el)!=null?e:n}const oo=ro?window:void 0;function ao(){const t=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{t.value=!0},e),t}function co(t){const e=ao();return d.computed(()=>(e.value,!!t()))}function lo(t,e,n={}){const{root:s,rootMargin:r="0px",threshold:i=.1,window:o=oo,immediate:a=!0}=n,c=co(()=>o&&"IntersectionObserver"in o),l=d.computed(()=>{const m=$n(t);return(Array.isArray(m)?m:[m]).map(Vt).filter(io)});let u=Ft;const f=d.ref(a),w=c.value?d.watch(()=>[l.value,Vt(s),f.value],([m,g])=>{if(u(),!f.value||!m.length)return;const N=new IntersectionObserver(e,{root:Vt(g),rootMargin:r,threshold:i});m.forEach(k=>k&&N.observe(k)),u=()=>{N.disconnect(),u=Ft}},{immediate:a,flush:"post"}):Ft,y=()=>{u(),w(),f.value=!1};return so(y),{isSupported:c,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:y}}class ce extends Error{}class uo extends ce{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class ho extends ce{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class fo extends ce{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class pe extends ce{}class Hn extends ce{constructor(e){super(`Invalid unit ${e}`)}}class W extends ce{}class re extends ce{constructor(){super("Zone is an abstract class")}}const p="numeric",Z="short",B="long",nt={year:p,month:p,day:p},Pn={year:p,month:Z,day:p},mo={year:p,month:Z,day:p,weekday:Z},zn={year:p,month:B,day:p},Zn={year:p,month:B,day:p,weekday:B},qn={hour:p,minute:p},jn={hour:p,minute:p,second:p},Gn={hour:p,minute:p,second:p,timeZoneName:Z},Yn={hour:p,minute:p,second:p,timeZoneName:B},Jn={hour:p,minute:p,hourCycle:"h23"},Kn={hour:p,minute:p,second:p,hourCycle:"h23"},Qn={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:Z},Xn={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:B},es={year:p,month:p,day:p,hour:p,minute:p},ts={year:p,month:p,day:p,hour:p,minute:p,second:p},ns={year:p,month:Z,day:p,hour:p,minute:p},ss={year:p,month:Z,day:p,hour:p,minute:p,second:p},yo={year:p,month:Z,day:p,weekday:Z,hour:p,minute:p},rs={year:p,month:B,day:p,hour:p,minute:p,timeZoneName:Z},is={year:p,month:B,day:p,hour:p,minute:p,second:p,timeZoneName:Z},os={year:p,month:B,day:p,weekday:B,hour:p,minute:p,timeZoneName:B},as={year:p,month:B,day:p,weekday:B,hour:p,minute:p,second:p,timeZoneName:B};class xe{get type(){throw new re}get name(){throw new re}get ianaName(){return this.name}get isUniversal(){throw new re}offsetName(e,n){throw new re}formatOffset(e,n){throw new re}offset(e){throw new re}equals(e){throw new re}get isValid(){throw new re}}let Rt=null;class st extends xe{static get instance(){return Rt===null&&(Rt=new st),Rt}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return xs(e,n,s)}formatOffset(e,n){return Ve(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let rt={};function po(t){return rt[t]||(rt[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),rt[t]}const go={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function wo(t,e){const n=t.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,o,a,c,l,u]=s;return[o,r,i,a,c,l,u]}function So(t,e){const n=t.formatToParts(e),s=[];for(let r=0;r<n.length;r++){const{type:i,value:o}=n[r],a=go[i];i==="era"?s[a]=o:S(a)||(s[a]=parseInt(o,10))}return s}let it={};class X extends xe{static create(e){return it[e]||(it[e]=new X(e)),it[e]}static resetCache(){it={},rt={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=X.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return xs(e,n,s,this.name)}formatOffset(e,n){return Ve(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const s=po(this.name);let[r,i,o,a,c,l,u]=s.formatToParts?So(s,n):wo(s,n);a==="BC"&&(r=-Math.abs(r)+1);const w=ut({year:r,month:i,day:o,hour:c===24?0:c,minute:l,second:u,millisecond:0});let y=+n;const m=y%1e3;return y-=m>=0?m:1e3+m,(w-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let cs={};function bo(t,e={}){const n=JSON.stringify([t,e]);let s=cs[n];return s||(s=new Intl.ListFormat(t,e),cs[n]=s),s}let Lt={};function Wt(t,e={}){const n=JSON.stringify([t,e]);let s=Lt[n];return s||(s=new Intl.DateTimeFormat(t,e),Lt[n]=s),s}let Bt={};function ko(t,e={}){const n=JSON.stringify([t,e]);let s=Bt[n];return s||(s=new Intl.NumberFormat(t,e),Bt[n]=s),s}let Ut={};function Eo(t,e={}){const{base:n,...s}=e,r=JSON.stringify([t,s]);let i=Ut[r];return i||(i=new Intl.RelativeTimeFormat(t,e),Ut[r]=i),i}let Me=null;function To(){return Me||(Me=new Intl.DateTimeFormat().resolvedOptions().locale,Me)}let ls={};function _o(t){let e=ls[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,ls[t]=e}return e}function Oo(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let s,r;try{s=Wt(t).resolvedOptions(),r=t}catch{const c=t.substring(0,n);s=Wt(c).resolvedOptions(),r=c}const{numberingSystem:i,calendar:o}=s;return[r,i,o]}}function Co(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function No(t){const e=[];for(let n=1;n<=12;n++){const s=b.utc(2009,n,1);e.push(t(s))}return e}function Io(t){const e=[];for(let n=1;n<=7;n++){const s=b.utc(2016,11,13+n);e.push(t(s))}return e}function ot(t,e,n,s){const r=t.listingMode();return r==="error"?null:r==="en"?n(e):s(e)}function Do(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class vo{constructor(e,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...o}=s;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=ko(e,a)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):jt(e,3);return M(n,this.padTo)}}}class xo{constructor(e,n,s){this.opts=s,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&X.create(a).valid?(r=a,this.dt=e):(r="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Wt(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Mo{constructor(e,n,s){this.opts={style:"long",...s},!n&&Ns()&&(this.rtf=Eo(e,s))}format(e,n){return this.rtf?this.rtf.format(e,n):Qo(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Ao={firstDay:1,minimalDays:4,weekend:[6,7]};class C{static fromOpts(e){return C.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,s,r,i=!1){const o=e||v.defaultLocale,a=o||(i?"en-US":To()),c=n||v.defaultNumberingSystem,l=s||v.defaultOutputCalendar,u=Zt(r)||v.defaultWeekSettings;return new C(a,c,l,u,o)}static resetCache(){Me=null,Lt={},Bt={},Ut={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:s,weekSettings:r}={}){return C.create(e,n,s,r)}constructor(e,n,s,r,i){const[o,a,c]=Oo(e);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=s||c||null,this.weekSettings=r,this.intl=Co(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Do(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:C.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Zt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return ot(this,e,Fs,()=>{const s=n?{month:e,day:"numeric"}:{month:e},r=n?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=No(i=>this.extract(i,s,"month"))),this.monthsCache[r][e]})}weekdays(e,n=!1){return ot(this,e,Ls,()=>{const s=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Io(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return ot(this,void 0,()=>Ws,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ot(this,e,Bs,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[e]})}extract(e,n,s){const r=this.dtFormatter(e,n),i=r.formatToParts(),o=i.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(e={}){return new vo(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new xo(e,this.intl,n)}relFormatter(e={}){return new Mo(this.intl,this.isEnglish(),e)}listFormatter(e={}){return bo(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Is()?_o(this.locale):Ao}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let $t=null;class L extends xe{static get utcInstance(){return $t===null&&($t=new L(0)),$t}static instance(e){return e===0?L.utcInstance:new L(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new L(dt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ve(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ve(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Ve(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Fo extends xe{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ie(t,e){if(S(t)||t===null)return e;if(t instanceof xe)return t;if(Lo(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?st.instance:n==="utc"||n==="gmt"?L.utcInstance:L.parseSpecifier(n)||X.create(t)}else return le(t)?L.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Fo(t)}let us=()=>Date.now(),ds="system",hs=null,fs=null,ms=null,ys=60,ps,gs=null;class v{static get now(){return us}static set now(e){us=e}static set defaultZone(e){ds=e}static get defaultZone(){return ie(ds,st.instance)}static get defaultLocale(){return hs}static set defaultLocale(e){hs=e}static get defaultNumberingSystem(){return fs}static set defaultNumberingSystem(e){fs=e}static get defaultOutputCalendar(){return ms}static set defaultOutputCalendar(e){ms=e}static get defaultWeekSettings(){return gs}static set defaultWeekSettings(e){gs=Zt(e)}static get twoDigitCutoffYear(){return ys}static set twoDigitCutoffYear(e){ys=e%100}static get throwOnInvalid(){return ps}static set throwOnInvalid(e){ps=e}static resetCaches(){C.resetCache(),X.resetCache()}}class q{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ws=[0,31,59,90,120,151,181,212,243,273,304,334],Ss=[0,31,60,91,121,152,182,213,244,274,305,335];function H(t,e){return new q("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ht(t,e,n){const s=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function bs(t,e,n){return n+(Ae(t)?Ss:ws)[e-1]}function ks(t,e){const n=Ae(t)?Ss:ws,s=n.findIndex(i=>i<e),r=e-n[s];return{month:s+1,day:r}}function Pt(t,e){return(t-e+7)%7+1}function at(t,e=4,n=1){const{year:s,month:r,day:i}=t,o=bs(s,r,i),a=Pt(Ht(s,r,i),n);let c=Math.floor((o-a+14-e)/7),l;return c<1?(l=s-1,c=Fe(l,e,n)):c>Fe(s,e,n)?(l=s+1,c=1):l=s,{weekYear:l,weekNumber:c,weekday:a,...ft(t)}}function Es(t,e=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=t,o=Pt(Ht(s,1,e),n),a=we(s);let c=r*7+i-o-7+e,l;c<1?(l=s-1,c+=we(l)):c>a?(l=s+1,c-=we(s)):l=s;const{month:u,day:f}=ks(l,c);return{year:l,month:u,day:f,...ft(t)}}function zt(t){const{year:e,month:n,day:s}=t,r=bs(e,n,s);return{year:e,ordinal:r,...ft(t)}}function Ts(t){const{year:e,ordinal:n}=t,{month:s,day:r}=ks(e,n);return{year:e,month:s,day:r,...ft(t)}}function _s(t,e){if(!S(t.localWeekday)||!S(t.localWeekNumber)||!S(t.localWeekYear)){if(!S(t.weekday)||!S(t.weekNumber)||!S(t.weekYear))throw new pe("Cannot mix locale-based week fields with ISO-based week fields");return S(t.localWeekday)||(t.weekday=t.localWeekday),S(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),S(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Vo(t,e=4,n=1){const s=ct(t.weekYear),r=P(t.weekNumber,1,Fe(t.weekYear,e,n)),i=P(t.weekday,1,7);return s?r?i?!1:H("weekday",t.weekday):H("week",t.weekNumber):H("weekYear",t.weekYear)}function Ro(t){const e=ct(t.year),n=P(t.ordinal,1,we(t.year));return e?n?!1:H("ordinal",t.ordinal):H("year",t.year)}function Os(t){const e=ct(t.year),n=P(t.month,1,12),s=P(t.day,1,lt(t.year,t.month));return e?n?s?!1:H("day",t.day):H("month",t.month):H("year",t.year)}function Cs(t){const{hour:e,minute:n,second:s,millisecond:r}=t,i=P(e,0,23)||e===24&&n===0&&s===0&&r===0,o=P(n,0,59),a=P(s,0,59),c=P(r,0,999);return i?o?a?c?!1:H("millisecond",r):H("second",s):H("minute",n):H("hour",e)}function S(t){return typeof t>"u"}function le(t){return typeof t=="number"}function ct(t){return typeof t=="number"&&t%1===0}function Lo(t){return typeof t=="string"}function Wo(t){return Object.prototype.toString.call(t)==="[object Date]"}function Ns(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Is(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Bo(t){return Array.isArray(t)?t:[t]}function Ds(t,e,n){if(t.length!==0)return t.reduce((s,r)=>{const i=[e(r),r];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function Uo(t,e){return e.reduce((n,s)=>(n[s]=t[s],n),{})}function ge(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Zt(t){if(t==null)return null;if(typeof t!="object")throw new W("Week settings must be an object");if(!P(t.firstDay,1,7)||!P(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!P(e,1,7)))throw new W("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function P(t,e,n){return ct(t)&&t>=e&&t<=n}function $o(t,e){return t-e*Math.floor(t/e)}function M(t,e=2){const n=t<0;let s;return n?s="-"+(""+-t).padStart(e,"0"):s=(""+t).padStart(e,"0"),s}function oe(t){if(!(S(t)||t===null||t===""))return parseInt(t,10)}function ue(t){if(!(S(t)||t===null||t===""))return parseFloat(t)}function qt(t){if(!(S(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function jt(t,e,n=!1){const s=10**e;return(n?Math.trunc:Math.round)(t*s)/s}function Ae(t){return t%4===0&&(t%100!==0||t%400===0)}function we(t){return Ae(t)?366:365}function lt(t,e){const n=$o(e-1,12)+1,s=t+(e-n)/12;return n===2?Ae(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ut(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function vs(t,e,n){return-Pt(Ht(t,1,e),n)+e-1}function Fe(t,e=4,n=1){const s=vs(t,e,n),r=vs(t+1,e,n);return(we(t)-s+r)/7}function Gt(t){return t>99?t:t>v.twoDigitCutoffYear?1900+t:2e3+t}function xs(t,e,n,s=null){const r=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const o={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(r).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function dt(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const s=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-s:s;return n*60+r}function Ms(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new W(`Invalid unit value ${t}`);return e}function ht(t,e){const n={};for(const s in t)if(ge(t,s)){const r=t[s];if(r==null)continue;n[e(s)]=Ms(r)}return n}function Ve(t,e){const n=Math.trunc(Math.abs(t/60)),s=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${M(n,2)}:${M(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${M(n,2)}${M(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ft(t){return Uo(t,["hour","minute","second","millisecond"])}const Ho=["January","February","March","April","May","June","July","August","September","October","November","December"],As=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Po=["J","F","M","A","M","J","J","A","S","O","N","D"];function Fs(t){switch(t){case"narrow":return[...Po];case"short":return[...As];case"long":return[...Ho];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Vs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Rs=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zo=["M","T","W","T","F","S","S"];function Ls(t){switch(t){case"narrow":return[...zo];case"short":return[...Rs];case"long":return[...Vs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ws=["AM","PM"],Zo=["Before Christ","Anno Domini"],qo=["BC","AD"],jo=["B","A"];function Bs(t){switch(t){case"narrow":return[...jo];case"short":return[...qo];case"long":return[...Zo];default:return null}}function Go(t){return Ws[t.hour<12?0:1]}function Yo(t,e){return Ls(e)[t.weekday-1]}function Jo(t,e){return Fs(e)[t.month-1]}function Ko(t,e){return Bs(e)[t.year<0?0:1]}function Qo(t,e,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){const f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${r[t][0]}`;case-1:return f?"yesterday":`last ${r[t][0]}`;case 0:return f?"today":`this ${r[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,l=r[t],u=s?c?l[1]:l[2]||l[1]:c?r[t][0]:t;return o?`${a} ${u} ago`:`in ${a} ${u}`}function Us(t,e){let n="";for(const s of t)s.literal?n+=s.val:n+=e(s.val);return n}const Xo={D:nt,DD:Pn,DDD:zn,DDDD:Zn,t:qn,tt:jn,ttt:Gn,tttt:Yn,T:Jn,TT:Kn,TTT:Qn,TTTT:Xn,f:es,ff:ns,fff:rs,ffff:os,F:ts,FF:ss,FFF:is,FFFF:as};class V{static create(e,n={}){return new V(e,n)}static parseFormat(e){let n=null,s="",r=!1;const i=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?(s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),n=null,s="",r=!r):r||a===n?s+=a:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Xo[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return M(e,n);const s={...this.opts};return n>0&&(s.padTo=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,n){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(y,m)=>this.loc.extract(e,y,m),o=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",a=()=>s?Go(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(y,m)=>s?Jo(e,y):i(m?{month:y}:{month:y,day:"numeric"},"month"),l=(y,m)=>s?Yo(e,y):i(m?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),u=y=>{const m=V.macroTokenToFormatOpts(y);return m?this.formatWithSystemDefault(e,m):y},f=y=>s?Ko(e,y):i({era:y},"era"),w=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(y)}};return Us(V.parseFormat(n),w)}formatDurationFromString(e,n){const s=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=c=>l=>{const u=s(l);return u?this.num(c.get(u),l.length):l},i=V.parseFormat(n),o=i.reduce((c,{literal:l,val:u})=>l?c:c.concat(u),[]),a=e.shiftTo(...o.map(s).filter(c=>c));return Us(i,r(a))}}const $s=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Se(...t){const e=t.reduce((n,s)=>n+s.source,"");return RegExp(`^${e}$`)}function be(...t){return e=>t.reduce(([n,s,r],i)=>{const[o,a,c]=i(e,r);return[{...n,...o},a||s,c]},[{},null,1]).slice(0,2)}function ke(t,...e){if(t==null)return[null,null];for(const[n,s]of e){const r=n.exec(t);if(r)return s(r)}return[null,null]}function Hs(...t){return(e,n)=>{const s={};let r;for(r=0;r<t.length;r++)s[t[r]]=oe(e[n+r]);return[s,null,n+r]}}const Ps=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ea=`(?:${Ps.source}?(?:\\[(${$s.source})\\])?)?`,Yt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,zs=RegExp(`${Yt.source}${ea}`),Jt=RegExp(`(?:T${zs.source})?`),ta=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,na=/(\d{4})-?W(\d\d)(?:-?(\d))?/,sa=/(\d{4})-?(\d{3})/,ra=Hs("weekYear","weekNumber","weekDay"),ia=Hs("year","ordinal"),oa=/(\d{4})-(\d\d)-(\d\d)/,Zs=RegExp(`${Yt.source} ?(?:${Ps.source}|(${$s.source}))?`),aa=RegExp(`(?: ${Zs.source})?`);function Ee(t,e,n){const s=t[e];return S(s)?n:oe(s)}function ca(t,e){return[{year:Ee(t,e),month:Ee(t,e+1,1),day:Ee(t,e+2,1)},null,e+3]}function Te(t,e){return[{hours:Ee(t,e,0),minutes:Ee(t,e+1,0),seconds:Ee(t,e+2,0),milliseconds:qt(t[e+3])},null,e+4]}function Re(t,e){const n=!t[e]&&!t[e+1],s=dt(t[e+1],t[e+2]),r=n?null:L.instance(s);return[{},r,e+3]}function Le(t,e){const n=t[e]?X.create(t[e]):null;return[{},n,e+1]}const la=RegExp(`^T?${Yt.source}$`),ua=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function da(t){const[e,n,s,r,i,o,a,c,l]=t,u=e[0]==="-",f=c&&c[0]==="-",w=(y,m=!1)=>y!==void 0&&(m||y&&u)?-y:y;return[{years:w(ue(n)),months:w(ue(s)),weeks:w(ue(r)),days:w(ue(i)),hours:w(ue(o)),minutes:w(ue(a)),seconds:w(ue(c),c==="-0"),milliseconds:w(qt(l),f)}]}const ha={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Kt(t,e,n,s,r,i,o){const a={year:e.length===2?Gt(oe(e)):oe(e),month:As.indexOf(n)+1,day:oe(s),hour:oe(r),minute:oe(i)};return o&&(a.second=oe(o)),t&&(a.weekday=t.length>3?Vs.indexOf(t)+1:Rs.indexOf(t)+1),a}const fa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ma(t){const[,e,n,s,r,i,o,a,c,l,u,f]=t,w=Kt(e,r,s,n,i,o,a);let y;return c?y=ha[c]:l?y=0:y=dt(u,f),[w,new L(y)]}function ya(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pa=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ga=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,wa=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qs(t){const[,e,n,s,r,i,o,a]=t;return[Kt(e,r,s,n,i,o,a),L.utcInstance]}function Sa(t){const[,e,n,s,r,i,o,a]=t;return[Kt(e,a,n,s,r,i,o),L.utcInstance]}const ba=Se(ta,Jt),ka=Se(na,Jt),Ea=Se(sa,Jt),Ta=Se(zs),js=be(ca,Te,Re,Le),_a=be(ra,Te,Re,Le),Oa=be(ia,Te,Re,Le),Ca=be(Te,Re,Le);function Na(t){return ke(t,[ba,js],[ka,_a],[Ea,Oa],[Ta,Ca])}function Ia(t){return ke(ya(t),[fa,ma])}function Da(t){return ke(t,[pa,qs],[ga,qs],[wa,Sa])}function va(t){return ke(t,[ua,da])}const xa=be(Te);function Ma(t){return ke(t,[la,xa])}const Aa=Se(oa,aa),Fa=Se(Zs),Va=be(Te,Re,Le);function Ra(t){return ke(t,[Aa,js],[Fa,Va])}const Gs="Invalid Duration",Ys={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},La={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Ys},z=146097/400,_e=146097/4800,Wa={years:{quarters:4,months:12,weeks:z/7,days:z,hours:z*24,minutes:z*24*60,seconds:z*24*60*60,milliseconds:z*24*60*60*1e3},quarters:{months:3,weeks:z/28,days:z/4,hours:z*24/4,minutes:z*24*60/4,seconds:z*24*60*60/4,milliseconds:z*24*60*60*1e3/4},months:{weeks:_e/7,days:_e,hours:_e*24,minutes:_e*24*60,seconds:_e*24*60*60,milliseconds:_e*24*60*60*1e3},...Ys},de=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ba=de.slice(0).reverse();function ae(t,e,n=!1){const s={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new _(s)}function Js(t,e){let n=e.milliseconds??0;for(const s of Ba.slice(1))e[s]&&(n+=e[s]*t[s].milliseconds);return n}function Ks(t,e){const n=Js(t,e)<0?-1:1;de.reduceRight((s,r)=>{if(S(e[r]))return s;if(s){const i=e[s]*n,o=t[r][s],a=Math.floor(i/o);e[r]+=a*n,e[s]-=a*o*n}return r},null),de.reduce((s,r)=>{if(S(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*t[s][r]}return r},null)}function Ua(t){const e={};for(const[n,s]of Object.entries(t))s!==0&&(e[n]=s);return e}class _{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let s=n?Wa:La;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||C.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,n){return _.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new W(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new _({values:ht(e,_.normalizeUnit),loc:C.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(le(e))return _.fromMillis(e);if(_.isDuration(e))return e;if(typeof e=="object")return _.fromObject(e);throw new W(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[s]=va(e);return s?_.fromObject(s,n):_.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[s]=Ma(e);return s?_.fromObject(s,n):_.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the Duration is invalid");const s=e instanceof q?e:new q(e,n);if(v.throwOnInvalid)throw new fo(s);return new _({invalid:s})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new Hn(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?V.create(this.loc,s).formatDurationFromString(this,e):Gs}toHuman(e={}){if(!this.isValid)return Gs;const n=de.map(s=>{const r=this.values[s];return S(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(r)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=jt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},b.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Js(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e),s={};for(const r of de)(ge(n.values,r)||ge(this.values,r))&&(s[r]=n.get(r)+this.get(r));return ae(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=Ms(e(this.values[s],s));return ae(this,{values:n},!0)}get(e){return this[_.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...ht(e,_.normalizeUnit)};return ae(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:s,matrix:r}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:s};return ae(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ks(this.matrix,e),ae(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Ua(this.normalize().shiftToAll().toObject());return ae(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>_.normalizeUnit(o));const n={},s={},r=this.toObject();let i;for(const o of de)if(e.indexOf(o)>=0){i=o;let a=0;for(const l in s)a+=this.matrix[l][o]*s[l],s[l]=0;le(r[o])&&(a+=r[o]);const c=Math.trunc(a);n[o]=c,s[o]=(a*1e3-c*1e3)/1e3}else le(r[o])&&(s[o]=r[o]);for(const o in s)s[o]!==0&&(n[i]+=o===i?s[o]:s[o]/this.matrix[i][o]);return Ks(this.matrix,n),ae(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return ae(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of de)if(!n(this.values[s],e.values[s]))return!1;return!0}}const Oe="Invalid Interval";function $a(t,e){return!t||!t.isValid?D.invalid("missing or invalid start"):!e||!e.isValid?D.invalid("missing or invalid end"):e<t?D.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class D{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the Interval is invalid");const s=e instanceof q?e:new q(e,n);if(v.throwOnInvalid)throw new ho(s);return new D({invalid:s})}static fromDateTimes(e,n){const s=Be(e),r=Be(n),i=$a(s,r);return i??new D({start:s,end:r})}static after(e,n){const s=_.fromDurationLike(n),r=Be(e);return D.fromDateTimes(r,r.plus(s))}static before(e,n){const s=_.fromDurationLike(n),r=Be(e);return D.fromDateTimes(r.minus(s),r)}static fromISO(e,n){const[s,r]=(e||"").split("/",2);if(s&&r){let i,o;try{i=b.fromISO(s,n),o=i.isValid}catch{o=!1}let a,c;try{a=b.fromISO(r,n),c=a.isValid}catch{c=!1}if(o&&c)return D.fromDateTimes(i,a);if(o){const l=_.fromISO(r,n);if(l.isValid)return D.after(i,l)}else if(c){const l=_.fromISO(s,n);if(l.isValid)return D.before(a,l)}}return D.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const s=this.start.startOf(e,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,n),Math.floor(r.diff(s,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?D.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Be).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const o=n[i]||this.e,a=+o>+this.e?this.e:o;s.push(D.fromDateTimes(r,a)),r=a,i+=1}return s}splitBy(e){const n=_.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,r=1,i;const o=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(c=>c*r));i=+a>+this.e?this.e:a,o.push(D.fromDateTimes(s,i)),s=i,r+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return n>=s?null:D.fromDateTimes(n,s)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return D.fromDateTimes(n,s)}static merge(e){const[n,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[r,i.union(o)]:[r.concat([i]),o]:[r,o],[[],null]);return s&&n.push(s),n}static xor(e){let n=null,s=0;const r=[],i=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),o=Array.prototype.concat(...i),a=o.sort((c,l)=>c.time-l.time);for(const c of a)s+=c.type==="s"?1:-1,s===1?n=c.time:(n&&+n!=+c.time&&r.push(D.fromDateTimes(n,c.time)),n=null);return D.merge(r)}difference(...e){return D.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Oe}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=nt,n={}){return this.isValid?V.create(this.s.loc.clone(n),e).formatInterval(this):Oe}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Oe}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Oe}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Oe}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Oe}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):_.invalid(this.invalidReason)}mapEndpoints(e){return D.fromDateTimes(e(this.s),e(this.e))}}class mt{static hasDST(e=v.defaultZone){const n=b.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return X.isValidZone(e)}static normalizeZone(e){return ie(e,v.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||C.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||C.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||C.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||C.create(n,s,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||C.create(n,s,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||C.create(n,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||C.create(n,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return C.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return C.create(n,null,"gregory").eras(e)}static features(){return{relative:Ns(),localeWeek:Is()}}}function Qs(t,e){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(e)-n(t);return Math.floor(_.fromMillis(s).as("days"))}function Ha(t,e,n){const s=[["years",(c,l)=>l.year-c.year],["quarters",(c,l)=>l.quarter-c.quarter+(l.year-c.year)*4],["months",(c,l)=>l.month-c.month+(l.year-c.year)*12],["weeks",(c,l)=>{const u=Qs(c,l);return(u-u%7)/7}],["days",Qs]],r={},i=t;let o,a;for(const[c,l]of s)n.indexOf(c)>=0&&(o=c,r[c]=l(t,e),a=i.plus(r),a>e?(r[c]--,t=i.plus(r),t>e&&(a=t,r[c]--,t=i.plus(r))):t=a);return[t,r,a,o]}function Pa(t,e,n,s){let[r,i,o,a]=Ha(t,e,n);const c=e-r,l=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);l.length===0&&(o<e&&(o=r.plus({[a]:1})),o!==r&&(i[a]=(i[a]||0)+c/(o-r)));const u=_.fromObject(i,s);return l.length>0?_.fromMillis(c,s).shiftTo(...l).plus(u):u}const Qt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Xs={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},za=Qt.hanidec.replace(/[\[|\]]/g,"").split("");function Za(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(t[n].search(Qt.hanidec)!==-1)e+=za.indexOf(t[n]);else for(const r in Xs){const[i,o]=Xs[r];s>=i&&s<=o&&(e+=s-i)}}return parseInt(e,10)}else return e}function j({numberingSystem:t},e=""){return new RegExp(`${Qt[t||"latn"]}${e}`)}const qa="missing Intl.DateTimeFormat.formatToParts support";function O(t,e=n=>n){return{regex:t,deser:([n])=>e(Za(n))}}const er=`[ ${String.fromCharCode(160)}]`,tr=new RegExp(er,"g");function ja(t){return t.replace(/\./g,"\\.?").replace(tr,er)}function nr(t){return t.replace(/\./g,"").replace(tr," ").toLowerCase()}function G(t,e){return t===null?null:{regex:RegExp(t.map(ja).join("|")),deser:([n])=>t.findIndex(s=>nr(n)===nr(s))+e}}function sr(t,e){return{regex:t,deser:([,n,s])=>dt(n,s),groups:e}}function yt(t){return{regex:t,deser:([e])=>e}}function Ga(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ya(t,e){const n=j(e),s=j(e,"{2}"),r=j(e,"{3}"),i=j(e,"{4}"),o=j(e,"{6}"),a=j(e,"{1,2}"),c=j(e,"{1,3}"),l=j(e,"{1,6}"),u=j(e,"{1,9}"),f=j(e,"{2,4}"),w=j(e,"{4,6}"),y=N=>({regex:RegExp(Ga(N.val)),deser:([k])=>k,literal:!0}),g=(N=>{if(t.literal)return y(N);switch(N.val){case"G":return G(e.eras("short"),0);case"GG":return G(e.eras("long"),0);case"y":return O(l);case"yy":return O(f,Gt);case"yyyy":return O(i);case"yyyyy":return O(w);case"yyyyyy":return O(o);case"M":return O(a);case"MM":return O(s);case"MMM":return G(e.months("short",!0),1);case"MMMM":return G(e.months("long",!0),1);case"L":return O(a);case"LL":return O(s);case"LLL":return G(e.months("short",!1),1);case"LLLL":return G(e.months("long",!1),1);case"d":return O(a);case"dd":return O(s);case"o":return O(c);case"ooo":return O(r);case"HH":return O(s);case"H":return O(a);case"hh":return O(s);case"h":return O(a);case"mm":return O(s);case"m":return O(a);case"q":return O(a);case"qq":return O(s);case"s":return O(a);case"ss":return O(s);case"S":return O(c);case"SSS":return O(r);case"u":return yt(u);case"uu":return yt(a);case"uuu":return O(n);case"a":return G(e.meridiems(),0);case"kkkk":return O(i);case"kk":return O(f,Gt);case"W":return O(a);case"WW":return O(s);case"E":case"c":return O(n);case"EEE":return G(e.weekdays("short",!1),1);case"EEEE":return G(e.weekdays("long",!1),1);case"ccc":return G(e.weekdays("short",!0),1);case"cccc":return G(e.weekdays("long",!0),1);case"Z":case"ZZ":return sr(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return sr(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return yt(/[a-z_+-/]{1,256}?/i);case" ":return yt(/[^\S\n\r]/);default:return y(N)}})(t)||{invalidReason:qa};return g.token=t,g}const Ja={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Ka(t,e,n){const{type:s,value:r}=t;if(s==="literal"){const c=/^\s+$/.test(r);return{literal:!c,val:c?" ":r}}const i=e[s];let o=s;s==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let a=Ja[o];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function Qa(t){return[`^${t.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,t]}function Xa(t,e,n){const s=t.match(e);if(s){const r={};let i=1;for(const o in n)if(ge(n,o)){const a=n[o],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(s.slice(i,i+c))),i+=c}return[s,r]}else return[s,{}]}function ec(t){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return S(t.z)||(n=X.create(t.z)),S(t.Z)||(n||(n=new L(t.Z)),s=t.Z),S(t.q)||(t.M=(t.q-1)*3+1),S(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),S(t.u)||(t.S=qt(t.u)),[Object.keys(t).reduce((i,o)=>{const a=e(o);return a&&(i[a]=t[o]),i},{}),n,s]}let Xt=null;function tc(){return Xt||(Xt=b.fromMillis(1555555555555)),Xt}function nc(t,e){if(t.literal)return t;const n=V.macroTokenToFormatOpts(t.val),s=or(n,e);return s==null||s.includes(void 0)?t:s}function rr(t,e){return Array.prototype.concat(...t.map(n=>nc(n,e)))}function ir(t,e,n){const s=rr(V.parseFormat(n),t),r=s.map(o=>Ya(o,t)),i=r.find(o=>o.invalidReason);if(i)return{input:e,tokens:s,invalidReason:i.invalidReason};{const[o,a]=Qa(r),c=RegExp(o,"i"),[l,u]=Xa(e,c,a),[f,w,y]=u?ec(u):[null,null,void 0];if(ge(u,"a")&&ge(u,"H"))throw new pe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:s,regex:c,rawMatches:l,matches:u,result:f,zone:w,specificOffset:y}}}function sc(t,e,n){const{result:s,zone:r,specificOffset:i,invalidReason:o}=ir(t,e,n);return[s,r,i,o]}function or(t,e){if(!t)return null;const s=V.create(e,t).dtFormatter(tc()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(o=>Ka(o,t,i))}const en="Invalid DateTime",ar=864e13;function pt(t){return new q("unsupported zone",`the zone "${t.name}" is not supported`)}function tn(t){return t.weekData===null&&(t.weekData=at(t.c)),t.weekData}function nn(t){return t.localWeekData===null&&(t.localWeekData=at(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function he(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new b({...n,...e,old:n})}function cr(t,e,n){let s=t-e*60*1e3;const r=n.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=n.offset(s);return r===i?[s,r]:[t-Math.min(r,i)*60*1e3,Math.max(r,i)]}function gt(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function wt(t,e,n){return cr(ut(t),e,n)}function lr(t,e){const n=t.o,s=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:s,month:r,day:Math.min(t.c.day,lt(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=_.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=ut(i);let[c,l]=cr(a,n,t.zone);return o!==0&&(c+=o,l=t.zone.offset(c)),{ts:c,o:l}}function We(t,e,n,s,r,i){const{setZone:o,zone:a}=n;if(t&&Object.keys(t).length!==0||e){const c=e||a,l=b.fromObject(t,{...n,zone:c,specificOffset:i});return o?l:l.setZone(a)}else return b.invalid(new q("unparsable",`the input "${r}" can't be parsed as ${s}`))}function St(t,e,n=!0){return t.isValid?V.create(C.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function sn(t,e){const n=t.c.year>9999||t.c.year<0;let s="";return n&&t.c.year>=0&&(s+="+"),s+=M(t.c.year,n?6:4),e?(s+="-",s+=M(t.c.month),s+="-",s+=M(t.c.day)):(s+=M(t.c.month),s+=M(t.c.day)),s}function ur(t,e,n,s,r,i){let o=M(t.c.hour);return e?(o+=":",o+=M(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=M(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=M(t.c.second),(t.c.millisecond!==0||!s)&&(o+=".",o+=M(t.c.millisecond,3))),r&&(t.isOffsetFixed&&t.offset===0&&!i?o+="Z":t.o<0?(o+="-",o+=M(Math.trunc(-t.o/60)),o+=":",o+=M(Math.trunc(-t.o%60))):(o+="+",o+=M(Math.trunc(t.o/60)),o+=":",o+=M(Math.trunc(t.o%60)))),i&&(o+="["+t.zone.ianaName+"]"),o}const dr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ic={ordinal:1,hour:0,minute:0,second:0,millisecond:0},hr=["year","month","day","hour","minute","second","millisecond"],oc=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ac=["year","ordinal","hour","minute","second","millisecond"];function cc(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Hn(t);return e}function fr(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cc(t)}}function mr(t,e){const n=ie(e.zone,v.defaultZone),s=C.fromObject(e),r=v.now();let i,o;if(S(t.year))i=r;else{for(const l of hr)S(t[l])&&(t[l]=dr[l]);const a=Os(t)||Cs(t);if(a)return b.invalid(a);const c=n.offset(r);[i,o]=wt(t,c,n)}return new b({ts:i,zone:n,loc:s,o})}function yr(t,e,n){const s=S(n.round)?!0:n.round,r=(o,a)=>(o=jt(o,s||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,a)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return r(i(n.unit),n.unit);for(const o of n.units){const a=i(o);if(Math.abs(a)>=1)return r(a,o)}return r(t>e?-0:0,n.units[n.units.length-1])}function pr(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class b{constructor(e){const n=e.zone||v.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new q("invalid input"):null)||(n.isValid?null:pt(n));this.ts=S(e.ts)?v.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,i]=[e.old.c,e.old.o];else{const a=n.offset(this.ts);r=gt(this.ts,a),s=Number.isNaN(r.year)?new q("invalid input"):null,r=s?null:r,i=s?null:a}this._zone=n,this.loc=e.loc||C.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[e,n]=pr(arguments),[s,r,i,o,a,c,l]=n;return mr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static utc(){const[e,n]=pr(arguments),[s,r,i,o,a,c,l]=n;return e.zone=L.utcInstance,mr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static fromJSDate(e,n={}){const s=Wo(e)?e.valueOf():NaN;if(Number.isNaN(s))return b.invalid("invalid input");const r=ie(n.zone,v.defaultZone);return r.isValid?new b({ts:s,zone:r,loc:C.fromObject(n)}):b.invalid(pt(r))}static fromMillis(e,n={}){if(le(e))return e<-ar||e>ar?b.invalid("Timestamp out of range"):new b({ts:e,zone:ie(n.zone,v.defaultZone),loc:C.fromObject(n)});throw new W(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(le(e))return new b({ts:e*1e3,zone:ie(n.zone,v.defaultZone),loc:C.fromObject(n)});throw new W("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const s=ie(n.zone,v.defaultZone);if(!s.isValid)return b.invalid(pt(s));const r=C.fromObject(n),i=ht(e,fr),{minDaysInFirstWeek:o,startOfWeek:a}=_s(i,r),c=v.now(),l=S(n.specificOffset)?s.offset(c):n.specificOffset,u=!S(i.ordinal),f=!S(i.year),w=!S(i.month)||!S(i.day),y=f||w,m=i.weekYear||i.weekNumber;if((y||u)&&m)throw new pe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&u)throw new pe("Can't mix ordinal dates with month/day");const g=m||i.weekday&&!y;let N,k,E=gt(c,l);g?(N=oc,k=rc,E=at(E,o,a)):u?(N=ac,k=ic,E=zt(E)):(N=hr,k=dr);let I=!1;for(const $e of N){const Kc=i[$e];S(Kc)?I?i[$e]=k[$e]:i[$e]=E[$e]:I=!0}const x=g?Vo(i,o,a):u?Ro(i):Os(i),fe=x||Cs(i);if(fe)return b.invalid(fe);const Ue=g?Es(i,o,a):u?Ts(i):i,[rn,on]=wt(Ue,l,s),an=new b({ts:rn,zone:s,o:on,loc:r});return i.weekday&&y&&e.weekday!==an.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${an.toISO()}`):an}static fromISO(e,n={}){const[s,r]=Na(e);return We(s,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[s,r]=Ia(e);return We(s,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[s,r]=Da(e);return We(s,r,n,"HTTP",n)}static fromFormat(e,n,s={}){if(S(e)||S(n))throw new W("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,o=C.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,c,l,u]=sc(o,e,n);return u?b.invalid(u):We(a,c,s,`format ${n}`,e,l)}static fromString(e,n,s={}){return b.fromFormat(e,n,s)}static fromSQL(e,n={}){const[s,r]=Ra(e);return We(s,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the DateTime is invalid");const s=e instanceof q?e:new q(e,n);if(v.throwOnInvalid)throw new uo(s);return new b({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const s=or(e,C.fromObject(n));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return rr(V.parseFormat(e),C.fromObject(n)).map(r=>r.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?tn(this).weekYear:NaN}get weekNumber(){return this.isValid?tn(this).weekNumber:NaN}get weekday(){return this.isValid?tn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?nn(this).weekday:NaN}get localWeekNumber(){return this.isValid?nn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?nn(this).weekYear:NaN}get ordinal(){return this.isValid?zt(this.c).ordinal:NaN}get monthShort(){return this.isValid?mt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?mt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?mt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?mt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,s=ut(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),o=this.zone.offset(s-r*n),a=this.zone.offset(s-i*n);if(o===a)return[this];const c=s-o*n,l=s-a*n,u=gt(c,o),f=gt(l,a);return u.hour===f.hour&&u.minute===f.minute&&u.second===f.second&&u.millisecond===f.millisecond?[he(this,{ts:c}),he(this,{ts:l})]:[this]}get isInLeapYear(){return Ae(this.year)}get daysInMonth(){return lt(this.year,this.month)}get daysInYear(){return this.isValid?we(this.year):NaN}get weeksInWeekYear(){return this.isValid?Fe(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Fe(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:s,calendar:r}=V.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(L.instance(e),n)}toLocal(){return this.setZone(v.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(e=ie(e,v.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||s){const i=e.offset(this.ts),o=this.toObject();[r]=wt(o,i,e)}return he(this,{ts:r,zone:e})}else return b.invalid(pt(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:s});return he(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=ht(e,fr),{minDaysInFirstWeek:s,startOfWeek:r}=_s(n,this.loc),i=!S(n.weekYear)||!S(n.weekNumber)||!S(n.weekday),o=!S(n.ordinal),a=!S(n.year),c=!S(n.month)||!S(n.day),l=a||c,u=n.weekYear||n.weekNumber;if((l||o)&&u)throw new pe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new pe("Can't mix ordinal dates with month/day");let f;i?f=Es({...at(this.c,s,r),...n},s,r):S(n.ordinal)?(f={...this.toObject(),...n},S(n.day)&&(f.day=Math.min(lt(f.year,f.month),f.day))):f=Ts({...zt(this.c),...n});const[w,y]=wt(f,this.o,this.zone);return he(this,{ts:w,o:y})}plus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e);return he(this,lr(this,n))}minus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e).negate();return he(this,lr(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},r=_.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:o}=this;o<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?V.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):en}toLocaleString(e=nt,n={}){return this.isValid?V.create(this.loc.clone(n),e).formatDateTime(this):en}toLocaleParts(e={}){return this.isValid?V.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o=e==="extended";let a=sn(this,o);return a+="T",a+=ur(this,o,n,s,r,i),a}toISODate({format:e="extended"}={}){return this.isValid?sn(this,e==="extended"):null}toISOWeekDate(){return St(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended"}={}){return this.isValid?(r?"T":"")+ur(this,o==="extended",n,e,s,i):null}toRFC2822(){return St(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return St(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sn(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(n||e)&&(s&&(r+=" "),n?r+="z":e&&(r+="ZZ")),St(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():en}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",s={}){if(!this.isValid||!e.isValid)return _.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Bo(n).map(_.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,c=o?e:this,l=Pa(a,c,i,r);return o?l.negate():l}diffNow(e="milliseconds",n={}){return this.diff(b.now(),e,n)}until(e){return this.isValid?D.fromDateTimes(this,e):this}hasSame(e,n,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,s)<=r&&r<=i.endOf(n,s)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||b.fromObject({},{zone:this.zone}),s=e.padding?this<n?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),yr(n,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?yr(e.base||b.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(b.isDateTime))throw new W("min requires all arguments be DateTimes");return Ds(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(b.isDateTime))throw new W("max requires all arguments be DateTimes");return Ds(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,s={}){const{locale:r=null,numberingSystem:i=null}=s,o=C.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return ir(o,e,n)}static fromStringExplain(e,n,s={}){return b.fromFormatExplain(e,n,s)}static get DATE_SHORT(){return nt}static get DATE_MED(){return Pn}static get DATE_MED_WITH_WEEKDAY(){return mo}static get DATE_FULL(){return zn}static get DATE_HUGE(){return Zn}static get TIME_SIMPLE(){return qn}static get TIME_WITH_SECONDS(){return jn}static get TIME_WITH_SHORT_OFFSET(){return Gn}static get TIME_WITH_LONG_OFFSET(){return Yn}static get TIME_24_SIMPLE(){return Jn}static get TIME_24_WITH_SECONDS(){return Kn}static get TIME_24_WITH_SHORT_OFFSET(){return Qn}static get TIME_24_WITH_LONG_OFFSET(){return Xn}static get DATETIME_SHORT(){return es}static get DATETIME_SHORT_WITH_SECONDS(){return ts}static get DATETIME_MED(){return ns}static get DATETIME_MED_WITH_SECONDS(){return ss}static get DATETIME_MED_WITH_WEEKDAY(){return yo}static get DATETIME_FULL(){return rs}static get DATETIME_FULL_WITH_SECONDS(){return is}static get DATETIME_HUGE(){return os}static get DATETIME_HUGE_WITH_SECONDS(){return as}}function Be(t){if(b.isDateTime(t))return t;if(t&&t.valueOf&&le(t.valueOf()))return b.fromJSDate(t);if(t&&typeof t=="object")return b.fromObject(t);throw new W(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const lc={},uc={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},dc=[d.createElementVNode("path",{fill:"rgb(248 113 113)",d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"},null,-1)];function hc(t,e){return d.openBlock(),d.createElementBlock("svg",uc,dc)}const fc=ne(lc,[["render",hc]]),mc={class:"message-container"},yc={key:0,class:"btn-container"},pc=["onClick"],gc={class:"chat-message"},wc={class:"message"},Sc={class:"detail-message flex justify-content-between"},bc={key:0,class:"mr-5"},kc={key:1,class:"mr-5"},Ec=d.defineComponent({__name:"MessageList",props:{messages:{type:Array,default:()=>[]},canLoadMoreMessages:{type:Boolean,default:!1}},emits:["loadMore","retry"],setup(t,{emit:e}){const n=t,s=d.ref(),{pause:r,resume:i}=lo(s,([{isIntersecting:o}])=>{o&&e("loadMore")});return d.onBeforeMount(()=>{n.canLoadMoreMessages||r()}),d.watch(()=>n.canLoadMoreMessages,o=>{if(o){i();return}r()}),(o,a)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",{ref_key:"target",ref:s,class:"target"},null,512),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.messages,c=>{var l,u;return d.openBlock(),d.createElementBlock("div",{key:c.id,style:{width:"100%"},class:d.normalizeClass(c.esCliente?"message-left":"message-right")},[d.createElementVNode("div",mc,[c.error&&c.esCliente?(d.openBlock(),d.createElementBlock("div",yc,[d.createElementVNode("button",{text:"",rounded:"",class:"btn-danger",icon:"fa-solid fa-circle-exclamation","aria-label":"Cancel",onClick:f=>e("retry",c)},[d.createVNode(fc)],8,pc)])):d.createCommentVNode("",!0),d.createElementVNode("div",gc,[d.createElementVNode("div",{class:d.normalizeClass(["bubble",c.esCliente?"left":"right"])},[d.createElementVNode("div",{class:d.normalizeClass(c.esCliente?"content-left":"content-right")},[d.createElementVNode("div",wc,d.toDisplayString(c.message),1),d.createElementVNode("div",Sc,[(l=c.sender)!=null&&l.nombreCompleto?(d.openBlock(),d.createElementBlock("span",bc,d.toDisplayString((u=c.sender)==null?void 0:u.nombreCompleto),1)):(d.openBlock(),d.createElementBlock("span",kc)),d.createElementVNode("span",null,d.toDisplayString(d.unref(b).fromISO(c.createdAt).toFormat("dd-MM-yyyy HH:mm")),1)])],2)],2)])])],2)}),128))],64))}}),al="",Tc=ne(Ec,[["__scopeId","data-v-b45e4c4e"]]),cl="",_c={},gr=t=>(d.pushScopeId("data-v-d9a6b2b7"),t=t(),d.popScopeId(),t),Oc={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{width:"28px",height:"28px"}},Cc=[gr(()=>d.createElementVNode("path",{d:"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",opacity:".25"},null,-1)),gr(()=>d.createElementVNode("path",{d:"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",class:"spinner_ajPY"},null,-1))];function Nc(t,e){return d.openBlock(),d.createElementBlock("svg",Oc,Cc)}const Ic=ne(_c,[["render",Nc],["__scopeId","data-v-d9a6b2b7"]]);function Dc(t,e,n){for(let s=t.length-1;s>=0;s--)if(t[s][e]===n)return s;return-1}const vc={class:"widget"},xc={class:"header-widget"},Mc={class:"title-chat"},Ac={key:0,class:"loader"},Fc={class:"input-message w-full"},Vc=["onSubmit"],Rc={class:"form-message"},Lc={class:"jl-inputgroup-chat"},Wc={type:"submit",class:"pointer btn-primary"},Bc=d.defineComponent({__name:"Chat",props:{titlePrincipal:{type:String,default:"Comunicación en linea para consultas"},toggleChat:{type:Function,required:!0},tokenAuth:{type:String,required:!0},user:{type:Object,required:!0},visible:{type:Boolean,required:!0}},emits:["show-toast","show-confirm","new-message","clear-new-messages"],setup(t,{emit:e}){const n=t,s=d.ref(null),r=d.ref(""),i=d.ref({data:[],canLoadMoreMessages:!1}),o=d.ref({virtualhost:""}),a=d.ref(""),c=d.ref(!1),l=d.ref(null);d.watch(()=>n.visible,async k=>{if(k){if(e("clear-new-messages"),!o.value||!a.value){const I=(await Un(n.tokenAuth)).response.data;o.value=I.virtualHost,a.value=I.appChat.id,m()}i.value.data.length===0&&w()}}),d.onMounted(async()=>{if(!o.value||!a.value){const E=(await Un(n.tokenAuth)).response.data;o.value=E.virtualHost,a.value=E.appChat.id,m()}});const u=async k=>{var x;if(k.preventDefault(),((x=r.value)==null?void 0:x.length)>300){e("show-toast",{severity:"warn",summary:"Error",detail:"El mensaje no puede superar los 300 caracteres",life:5e3});return}if(!r.value.trim()){e("show-toast",{severity:"warn",summary:"Error",detail:"Por favor ingrese un mensaje",life:5e3});return}const E={id:kr(),message:r.value,visto:!0,multimedia:!1,esCliente:!0,appChatId:a.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),sender:{nombreCompleto:n.user.nombreCompleto,ci:n.user.ci,msPersonaId:n.user.msPersonaId}},I=i.value.data.push(E)-1;try{const fe=await f(r.value,a.value);i.value.data[I]=fe.response.data}catch{i.value.data[I].error={error:!0,id:E.id},e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3})}finally{r.value="",g()}},f=async(k,E)=>no({esCliente:!0,message:k,appChatId:E},n.tokenAuth),w=async()=>{var k,E,I;try{c.value=!0;const x=(k=i.value.data[0])==null?void 0:k.id,fe={limit:10,lastMessagesId:x,appChatId:a.value},Ue=await to({body:fe,token:n.tokenAuth});i.value.data.unshift(...Ue.data.sort((rn,on)=>-on.createdAt.localeCompare(rn.createdAt))),i.value.canLoadMoreMessages=Ue.pagination.total>Ue.pagination.limit,x&&((E=l.value)!=null&&E.scrollHeight)&&N((I=l.value)==null?void 0:I.scrollHeight),x||g()}catch(x){throw c.value=!1,x}finally{c.value=!1}},y=async k=>{e("show-confirm",async()=>{var E;try{if(!((E=k.error)!=null&&E.id))return;const I=await f(k.message,a.value),x=Dc(i.value.data,"id",k.error.id);i.value.data[x]={...I.response.data,error:void 0}}catch{e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3})}finally{g()}})},m=(k="webchat")=>{const{virtualhost:E}=o.value;if(!sessionStorage.getItem("tabBrowser")){let x=Date.now();sessionStorage.setItem("tabBrowser",`${x}`)}s.value=new vr(`${E}`,`widget_chat_${sessionStorage.getItem("tabBrowser")}`),s.value.connect(),s.value.subscribe(async x=>{x.event&&x.event===un.NEW_MESSAGE&&!x.message.esCliente&&(i.value.data.push(x.message),n.visible===!1&&e("new-message"))})},g=()=>{d.nextTick(()=>{l.value&&(l.value.scrollTop=l.value.scrollHeight)})},N=k=>{d.nextTick(()=>{const E=l.value;E&&(E.scrollTop=E.scrollHeight-k)})};return(k,E)=>(d.openBlock(),d.createElementBlock("div",vc,[d.createElementVNode("div",xc,[d.createElementVNode("h4",Mc,d.toDisplayString(t.titlePrincipal),1),d.createElementVNode("button",{onClick:E[0]||(E[0]=()=>t.toggleChat()),class:"btn-close"},[d.createVNode(Vr,{class:"pointer"})])]),d.createElementVNode("div",{class:"messages-container",ref_key:"messageContainerRef",ref:l},[c.value?(d.openBlock(),d.createElementBlock("div",Ac,[d.createVNode(Ic)])):d.createCommentVNode("",!0),d.createVNode(Tc,{messages:i.value.data,canLoadMoreMessages:i.value.canLoadMoreMessages,onLoadMore:w,onRetry:y},null,8,["messages","canLoadMoreMessages"])],512),d.createElementVNode("div",Fc,[d.createElementVNode("form",{class:"message-send",onSubmit:d.withModifiers(u,["prevent"])},[d.createElementVNode("div",Rc,[d.createElementVNode("div",Lc,[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":E[1]||(E[1]=I=>r.value=I),class:"jl2-input-chat",required:""},null,512),[[d.vModelText,r.value]]),d.createElementVNode("button",Wc,[d.createVNode(Ur,{style:{width:"20px",height:"20px"}})])])])],40,Vc)])]))}}),dl="",Uc=ne(Bc,[["__scopeId","data-v-c9263219"]]),$c={},Hc={width:"87",height:"87",viewBox:"0 0 87 87",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pc=[d.createStaticVNode('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="#F28B0C" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="#F28B0C"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="#F28B0C"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="#F28B0C"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="#F28B0C"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>',2)];function zc(t,e){return d.openBlock(),d.createElementBlock("svg",Hc,Pc)}const Zc=ne($c,[["render",zc]]),qc={key:0,class:"new-message-badge"},jc={class:"chat-box"},Gc=d.defineComponent({__name:"Widget",props:{tokenAuth:{type:String,required:!0},titlePrincipal:{type:String},user:{type:Object,required:!0}},emits:["show-toast","show-confirm"],setup(t,{emit:e}){const n=d.ref(!1),s=d.ref(0),r=()=>{n.value=!n.value};return(i,o)=>(d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",{id:"chat-circle",onClick:r,class:"widget-container"},[s.value?(d.openBlock(),d.createElementBlock("div",qc,d.toDisplayString(s.value>9?"9+":s.value),1)):d.createCommentVNode("",!0),d.createVNode(Zc)]),d.withDirectives(d.createElementVNode("div",jc,[d.createVNode(Uc,{visible:n.value,titlePrincipal:t.titlePrincipal,toggleChat:r,tokenAuth:t.tokenAuth,user:t.user,onShowToast:o[0]||(o[0]=a=>e("show-toast",a)),onShowConfirm:o[1]||(o[1]=a=>e("show-confirm",a)),onClearNewMessages:o[2]||(o[2]=a=>s.value=0),onNewMessage:o[3]||(o[3]=()=>s.value++)},null,8,["visible","titlePrincipal","tokenAuth","user"])],512),[[d.vShow,n.value]])]))}}),fl="",Yc=ne(Gc,[["__scopeId","data-v-689c29e3"]]),Jc={install(t,e){window.VITE_BACKEND_URL=e.VITE_BACKEND_URL,window.VITE_BROKER_URL=e.VITE_BROKER_URL,window.VITE_USERNAME=e.VITE_USERNAME,window.VITE_PASSWORD=e.VITE_PASSWORD}};ee.Widget=Yc,ee.default=Jc,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
3
+ `).replace(/\\c/g,":").replace(/\\\\/g,"\\")}}const ln=0,Pe=10,ze=13,Or=58;class Cr{constructor(e,n){this.onFrame=e,this.onIncomingPing=n,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}parseChunk(e,n=!1){let s;if(typeof e=="string"?s=this._encoder.encode(e):s=new Uint8Array(e),n&&s[s.length-1]!==0){const r=new Uint8Array(s.length+1);r.set(s,0),r[s.length]=0,s=r}for(let r=0;r<s.length;r++){const i=s[r];this._onByte(i)}}_collectFrame(e){if(e!==ln&&e!==ze){if(e===Pe){this.onIncomingPing();return}this._onByte=this._collectCommand,this._reinjectByte(e)}}_collectCommand(e){if(e!==ze){if(e===Pe){this._results.command=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaders;return}this._consumeByte(e)}}_collectHeaders(e){if(e!==ze){if(e===Pe){this._setupCollectBody();return}this._onByte=this._collectHeaderKey,this._reinjectByte(e)}}_reinjectByte(e){this._onByte(e)}_collectHeaderKey(e){if(e===Or){this._headerKey=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaderValue;return}this._consumeByte(e)}_collectHeaderValue(e){if(e!==ze){if(e===Pe){this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,this._onByte=this._collectHeaders;return}this._consumeByte(e)}}_setupCollectBody(){const e=this._results.headers.filter(n=>n[0]==="content-length")[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}_collectBodyNullTerminated(e){if(e===ln){this._retrievedBody();return}this._consumeByte(e)}_collectBodyFixedSize(e){if(this._bodyBytesRemaining--===0){this._retrievedBody();return}this._consumeByte(e)}_retrievedBody(){this._results.binaryBody=this._consumeTokenAsRaw();try{this.onFrame(this._results)}catch(e){console.log("Ignoring an exception thrown by a frame handler. Original exception: ",e)}this._initState()}_consumeByte(e){this._token.push(e)}_consumeTokenAsUTF8(){return this._decoder.decode(this._consumeTokenAsRaw())}_consumeTokenAsRaw(){const e=new Uint8Array(this._token);return this._token=[],e}_initState(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}}var K;(function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSING=2]="CLOSING",t[t.CLOSED=3]="CLOSED"})(K=K||(K={}));var U;(function(t){t[t.ACTIVE=0]="ACTIVE",t[t.DEACTIVATING=1]="DEACTIVATING",t[t.INACTIVE=2]="INACTIVE"})(U=U||(U={}));class R{constructor(e){this.versions=e}supportedVersions(){return this.versions.join(",")}protocolVersions(){return this.versions.map(e=>`v${e.replace(".","")}.stomp`)}}R.V1_0="1.0",R.V1_1="1.1",R.V1_2="1.2",R.default=new R([R.V1_2,R.V1_1,R.V1_0]);function Nr(t,e){t.terminate=function(){const n=()=>{};this.onerror=n,this.onmessage=n,this.onopen=n;const s=new Date,r=Math.random().toString().substring(2,8),i=this.onclose;this.onclose=o=>{const a=new Date().getTime()-s.getTime();e(`Discarded socket (#${r}) closed after ${a}ms, with code/reason: ${o.code}/${o.reason}`)},this.close(),i==null||i.call(t,{code:4001,reason:`Quick discarding socket (#${r}) without waiting for the shutdown sequence.`,wasClean:!1})}}class Ir{constructor(e,n,s){this._client=e,this._webSocket=n,this._connected=!1,this._serverFrameHandlers={CONNECTED:r=>{this.debug(`connected to server ${r.headers.server}`),this._connected=!0,this._connectedVersion=r.headers.version,this._connectedVersion===R.V1_2&&(this._escapeHeaderValues=!0),this._setupHeartbeat(r.headers),this.onConnect(r)},MESSAGE:r=>{const i=r.headers.subscription,o=this._subscriptions[i]||this.onUnhandledMessage,a=r,c=this,l=this._connectedVersion===R.V1_2?a.headers.ack:a.headers["message-id"];a.ack=(d={})=>c.ack(l,i,d),a.nack=(d={})=>c.nack(l,i,d),o(a)},RECEIPT:r=>{const i=this._receiptWatchers[r.headers["receipt-id"]];i?(i(r),delete this._receiptWatchers[r.headers["receipt-id"]]):this.onUnhandledReceipt(r)},ERROR:r=>{this.onStompError(r)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.debug=s.debug,this.stompVersions=s.stompVersions,this.connectHeaders=s.connectHeaders,this.disconnectHeaders=s.disconnectHeaders,this.heartbeatIncoming=s.heartbeatIncoming,this.heartbeatOutgoing=s.heartbeatOutgoing,this.splitLargeFrames=s.splitLargeFrames,this.maxWebSocketChunkSize=s.maxWebSocketChunkSize,this.forceBinaryWSFrames=s.forceBinaryWSFrames,this.logRawCommunication=s.logRawCommunication,this.appendMissingNULLonIncoming=s.appendMissingNULLonIncoming,this.discardWebsocketOnCommFailure=s.discardWebsocketOnCommFailure,this.onConnect=s.onConnect,this.onDisconnect=s.onDisconnect,this.onStompError=s.onStompError,this.onWebSocketClose=s.onWebSocketClose,this.onWebSocketError=s.onWebSocketError,this.onUnhandledMessage=s.onUnhandledMessage,this.onUnhandledReceipt=s.onUnhandledReceipt,this.onUnhandledFrame=s.onUnhandledFrame}get connectedVersion(){return this._connectedVersion}get connected(){return this._connected}start(){const e=new Cr(n=>{const s=te.fromRawFrame(n,this._escapeHeaderValues);this.logRawCommunication||this.debug(`<<< ${s}`),(this._serverFrameHandlers[s.command]||this.onUnhandledFrame)(s)},()=>{this.debug("<<< PONG")});this._webSocket.onmessage=n=>{if(this.debug("Received data"),this._lastServerActivityTS=Date.now(),this.logRawCommunication){const s=n.data instanceof ArrayBuffer?new TextDecoder().decode(n.data):n.data;this.debug(`<<< ${s}`)}e.parseChunk(n.data,this.appendMissingNULLonIncoming)},this._webSocket.onclose=n=>{this.debug(`Connection closed to ${this._webSocket.url}`),this._cleanUp(),this.onWebSocketClose(n)},this._webSocket.onerror=n=>{this.onWebSocketError(n)},this._webSocket.onopen=()=>{const n=Object.assign({},this.connectHeaders);this.debug("Web Socket Opened..."),n["accept-version"]=this.stompVersions.supportedVersions(),n["heart-beat"]=[this.heartbeatOutgoing,this.heartbeatIncoming].join(","),this._transmit({command:"CONNECT",headers:n})}}_setupHeartbeat(e){if(e.version!==R.V1_1&&e.version!==R.V1_2||!e["heart-beat"])return;const[n,s]=e["heart-beat"].split(",").map(r=>parseInt(r,10));if(this.heartbeatOutgoing!==0&&s!==0){const r=Math.max(this.heartbeatOutgoing,s);this.debug(`send PING every ${r}ms`),this._pinger=setInterval(()=>{this._webSocket.readyState===K.OPEN&&(this._webSocket.send(Ce.LF),this.debug(">>> PING"))},r)}if(this.heartbeatIncoming!==0&&n!==0){const r=Math.max(this.heartbeatIncoming,n);this.debug(`check PONG every ${r}ms`),this._ponger=setInterval(()=>{const i=Date.now()-this._lastServerActivityTS;i>r*2&&(this.debug(`did not receive server activity for the last ${i}ms`),this._closeOrDiscardWebsocket())},r)}}_closeOrDiscardWebsocket(){this.discardWebsocketOnCommFailure?(this.debug("Discarding websocket, the underlying socket may linger for a while"),this.discardWebsocket()):(this.debug("Issuing close on the websocket"),this._closeWebsocket())}forceDisconnect(){this._webSocket&&(this._webSocket.readyState===K.CONNECTING||this._webSocket.readyState===K.OPEN)&&this._closeOrDiscardWebsocket()}_closeWebsocket(){this._webSocket.onmessage=()=>{},this._webSocket.close()}discardWebsocket(){typeof this._webSocket.terminate!="function"&&Nr(this._webSocket,e=>this.debug(e)),this._webSocket.terminate()}_transmit(e){const{command:n,headers:s,body:r,binaryBody:i,skipContentLengthHeader:o}=e,a=new te({command:n,headers:s,body:r,binaryBody:i,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:o});let c=a.serialize();if(this.logRawCommunication?this.debug(`>>> ${c}`):this.debug(`>>> ${a}`),this.forceBinaryWSFrames&&typeof c=="string"&&(c=new TextEncoder().encode(c)),typeof c!="string"||!this.splitLargeFrames)this._webSocket.send(c);else{let l=c;for(;l.length>0;){const d=l.substring(0,this.maxWebSocketChunkSize);l=l.substring(this.maxWebSocketChunkSize),this._webSocket.send(d),this.debug(`chunk sent = ${d.length}, remaining = ${l.length}`)}}}dispose(){if(this.connected)try{const e=Object.assign({},this.disconnectHeaders);e.receipt||(e.receipt=`close-${this._counter++}`),this.watchForReceipt(e.receipt,n=>{this._closeWebsocket(),this._cleanUp(),this.onDisconnect(n)}),this._transmit({command:"DISCONNECT",headers:e})}catch(e){this.debug(`Ignoring error during disconnect ${e}`)}else(this._webSocket.readyState===K.CONNECTING||this._webSocket.readyState===K.OPEN)&&this._closeWebsocket()}_cleanUp(){this._connected=!1,this._pinger&&(clearInterval(this._pinger),this._pinger=void 0),this._ponger&&(clearInterval(this._ponger),this._ponger=void 0)}publish(e){const{destination:n,headers:s,body:r,binaryBody:i,skipContentLengthHeader:o}=e,a=Object.assign({destination:n},s);this._transmit({command:"SEND",headers:a,body:r,binaryBody:i,skipContentLengthHeader:o})}watchForReceipt(e,n){this._receiptWatchers[e]=n}subscribe(e,n,s={}){s=Object.assign({},s),s.id||(s.id=`sub-${this._counter++}`),s.destination=e,this._subscriptions[s.id]=n,this._transmit({command:"SUBSCRIBE",headers:s});const r=this;return{id:s.id,unsubscribe(i){return r.unsubscribe(s.id,i)}}}unsubscribe(e,n={}){n=Object.assign({},n),delete this._subscriptions[e],n.id=e,this._transmit({command:"UNSUBSCRIBE",headers:n})}begin(e){const n=e||`tx-${this._counter++}`;this._transmit({command:"BEGIN",headers:{transaction:n}});const s=this;return{id:n,commit(){s.commit(n)},abort(){s.abort(n)}}}commit(e){this._transmit({command:"COMMIT",headers:{transaction:e}})}abort(e){this._transmit({command:"ABORT",headers:{transaction:e}})}ack(e,n,s={}){s=Object.assign({},s),this._connectedVersion===R.V1_2?s.id=e:s["message-id"]=e,s.subscription=n,this._transmit({command:"ACK",headers:s})}nack(e,n,s={}){return s=Object.assign({},s),this._connectedVersion===R.V1_2?s.id=e:s["message-id"]=e,s.subscription=n,this._transmit({command:"NACK",headers:s})}}class Dr{constructor(e={}){this.stompVersions=R.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8*1024,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.discardWebsocketOnCommFailure=!1,this.state=U.INACTIVE;const n=()=>{};this.debug=n,this.beforeConnect=n,this.onConnect=n,this.onDisconnect=n,this.onUnhandledMessage=n,this.onUnhandledReceipt=n,this.onUnhandledFrame=n,this.onStompError=n,this.onWebSocketClose=n,this.onWebSocketError=n,this.logRawCommunication=!1,this.onChangeState=n,this.connectHeaders={},this._disconnectHeaders={},this.configure(e)}get webSocket(){var e;return(e=this._stompHandler)==null?void 0:e._webSocket}get disconnectHeaders(){return this._disconnectHeaders}set disconnectHeaders(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}get connected(){return!!this._stompHandler&&this._stompHandler.connected}get connectedVersion(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}get active(){return this.state===U.ACTIVE}_changeState(e){this.state=e,this.onChangeState(e)}configure(e){Object.assign(this,e)}activate(){const e=()=>{if(this.active){this.debug("Already ACTIVE, ignoring request to activate");return}this._changeState(U.ACTIVE),this._connect()};this.state===U.DEACTIVATING?(this.debug("Waiting for deactivation to finish before activating"),this.deactivate().then(()=>{e()})):e()}async _connect(){if(await this.beforeConnect(),this._stompHandler){this.debug("There is already a stompHandler, skipping the call to connect");return}if(!this.active){this.debug("Client has been marked inactive, will not attempt to connect");return}this.connectionTimeout>0&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout(()=>{this.connected||(this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`),this.forceDisconnect())},this.connectionTimeout)),this.debug("Opening Web Socket...");const e=this._createWebSocket();this._stompHandler=new Ir(this,e,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:n=>{if(this._connectionWatcher&&(clearTimeout(this._connectionWatcher),this._connectionWatcher=void 0),!this.active){this.debug("STOMP got connected while deactivate was issued, will disconnect now"),this._disposeStompHandler();return}this.onConnect(n)},onDisconnect:n=>{this.onDisconnect(n)},onStompError:n=>{this.onStompError(n)},onWebSocketClose:n=>{this._stompHandler=void 0,this.state===U.DEACTIVATING&&this._changeState(U.INACTIVE),this.onWebSocketClose(n),this.active&&this._schedule_reconnect()},onWebSocketError:n=>{this.onWebSocketError(n)},onUnhandledMessage:n=>{this.onUnhandledMessage(n)},onUnhandledReceipt:n=>{this.onUnhandledReceipt(n)},onUnhandledFrame:n=>{this.onUnhandledFrame(n)}}),this._stompHandler.start()}_createWebSocket(){let e;if(this.webSocketFactory)e=this.webSocketFactory();else if(this.brokerURL)e=new WebSocket(this.brokerURL,this.stompVersions.protocolVersions());else throw new Error("Either brokerURL or webSocketFactory must be provided");return e.binaryType="arraybuffer",e}_schedule_reconnect(){this.reconnectDelay>0&&(this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`),this._reconnector=setTimeout(()=>{this._connect()},this.reconnectDelay))}async deactivate(e={}){var n;const s=e.force||!1,r=this.active;let i;if(this.state===U.INACTIVE)return this.debug("Already INACTIVE, nothing more to do"),Promise.resolve();if(this._changeState(U.DEACTIVATING),this._reconnector&&(clearTimeout(this._reconnector),this._reconnector=void 0),this._stompHandler&&this.webSocket.readyState!==K.CLOSED){const o=this._stompHandler.onWebSocketClose;i=new Promise((a,c)=>{this._stompHandler.onWebSocketClose=l=>{o(l),a()}})}else return this._changeState(U.INACTIVE),Promise.resolve();return s?(n=this._stompHandler)==null||n.discardWebsocket():r&&this._disposeStompHandler(),i}forceDisconnect(){this._stompHandler&&this._stompHandler.forceDisconnect()}_disposeStompHandler(){this._stompHandler&&this._stompHandler.dispose()}publish(e){this._checkConnection(),this._stompHandler.publish(e)}_checkConnection(){if(!this.connected)throw new TypeError("There is no underlying STOMP connection")}watchForReceipt(e,n){this._checkConnection(),this._stompHandler.watchForReceipt(e,n)}subscribe(e,n,s={}){return this._checkConnection(),this._stompHandler.subscribe(e,n,s)}unsubscribe(e,n={}){this._checkConnection(),this._stompHandler.unsubscribe(e,n)}begin(e){return this._checkConnection(),this._stompHandler.begin(e)}commit(e){this._checkConnection(),this._stompHandler.commit(e)}abort(e){this._checkConnection(),this._stompHandler.abort(e)}ack(e,n,s={}){this._checkConnection(),this._stompHandler.ack(e,n,s)}nack(e,n,s={}){this._checkConnection(),this._stompHandler.nack(e,n,s)}}class vr{constructor(e,n){_r(this,"client"),this.virtualHost=e,this.queue=n,this.client=new Dr({brokerURL:window.VITE_BROKER_URL?window.VITE_BROKER_URL:"ws://192.168.20.107:15674/ws",connectHeaders:{login:window.VITE_USERNAME?window.VITE_USERNAME:"admin",passcode:window.VITE_PASSWORD?window.VITE_PASSWORD:"password",host:this.virtualHost}})}async connect(){return new Promise((e,n)=>{this.client.onConnect=()=>{e()},this.client.activate()})}async disconnectClient(){this.client.onDisconnect=()=>{},this.client.deactivate(),this.client.unsubscribe("")}async subscribe(e){await this.connect(),this.client.subscribe(`/queue/${this.queue}`,n=>{const s=JSON.parse(n.body);e(s)})}async publish(e){this.client.publish({destination:`/queue/${this.queue}`,body:JSON.stringify({data:e})})}}var un=(t=>(t.NEW_MESSAGE="new_message",t))(un||{});const ne=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},xr={},Mr={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ar=[u.createElementVNode("path",{d:"M16 31C24.2843 31 31 24.2843 31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31Z",stroke:"#B3B3B3","stroke-miterlimit":"10"},null,-1),u.createElementVNode("path",{d:"M19.78 22.3L15.98 16.63H15.9601L12.2001 22.3H11.0701L15.37 15.8899L11.25 9.69995H12.38L15.98 15.08H16L19.67 9.69995H20.8L16.55 15.82L20.92 22.3H19.77H19.78Z",fill:"#B3B3B3"},null,-1)];function Vr(t,e){return u.openBlock(),u.createElementBlock("svg",Mr,Ar)}const Fr=ne(xr,[["render",Vr]]),Rr={},Lr={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Wr=[u.createElementVNode("path",{fill:"#F28B0C",d:"M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376V479.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"},null,-1)];function Br(t,e){return u.openBlock(),u.createElementBlock("svg",Lr,Wr)}const Ur=ne(Rr,[["render",Br]]);function dn(t,e){return function(){return t.apply(e,arguments)}}const{toString:$r}=Object.prototype,{getPrototypeOf:bt}=Object,Ze=(t=>e=>{const n=$r.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),e=>Ze(e)===t),qe=t=>e=>typeof e===t,{isArray:me}=Array,Ne=qe("undefined");function Hr(t){return t!==null&&!Ne(t)&&t.constructor!==null&&!Ne(t.constructor)&&$(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const hn=Y("ArrayBuffer");function Pr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&hn(t.buffer),e}const zr=qe("string"),$=qe("function"),fn=qe("number"),je=t=>t!==null&&typeof t=="object",Zr=t=>t===!0||t===!1,Ge=t=>{if(Ze(t)!=="object")return!1;const e=bt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},qr=Y("Date"),jr=Y("File"),Gr=Y("Blob"),Yr=Y("FileList"),Jr=t=>je(t)&&$(t.pipe),Kr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||$(t.append)&&((e=Ze(t))==="formdata"||e==="object"&&$(t.toString)&&t.toString()==="[object FormData]"))},Qr=Y("URLSearchParams"),Xr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ie(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,r;if(typeof t!="object"&&(t=[t]),me(t))for(s=0,r=t.length;s<r;s++)e.call(null,t[s],s,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(s=0;s<o;s++)a=i[s],e.call(null,t[a],a,t)}}function mn(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,r;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const yn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),pn=t=>!Ne(t)&&t!==yn;function kt(){const{caseless:t}=pn(this)&&this||{},e={},n=(s,r)=>{const i=t&&mn(e,r)||r;Ge(e[i])&&Ge(s)?e[i]=kt(e[i],s):Ge(s)?e[i]=kt({},s):me(s)?e[i]=s.slice():e[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Ie(arguments[s],n);return e}const ei=(t,e,n,{allOwnKeys:s}={})=>(Ie(e,(r,i)=>{n&&$(r)?t[i]=dn(r,n):t[i]=r},{allOwnKeys:s}),t),ti=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ni=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},si=(t,e,n,s)=>{let r,i,o;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)o=r[i],(!s||s(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&bt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ri=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},ii=t=>{if(!t)return null;if(me(t))return t;let e=t.length;if(!fn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},oi=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&bt(Uint8Array)),ai=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=s.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},ci=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},li=Y("HTMLFormElement"),ui=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),gn=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),di=Y("RegExp"),wn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};Ie(n,(r,i)=>{e(r,i,t)!==!1&&(s[i]=r)}),Object.defineProperties(t,s)},hi=t=>{wn(t,(e,n)=>{if($(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if($(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fi=(t,e)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return me(t)?s(t):s(String(t).split(e)),n},mi=()=>{},yi=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Et="abcdefghijklmnopqrstuvwxyz",Sn="0123456789",bn={DIGIT:Sn,ALPHA:Et,ALPHA_DIGIT:Et+Et.toUpperCase()+Sn},pi=(t=16,e=bn.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function gi(t){return!!(t&&$(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const wi=t=>{const e=new Array(10),n=(s,r)=>{if(je(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[r]=s;const i=me(s)?[]:{};return Ie(s,(o,a)=>{const c=n(o,r+1);!Ne(c)&&(i[a]=c)}),e[r]=void 0,i}}return s};return n(t,0)},Si=Y("AsyncFunction"),h={isArray:me,isArrayBuffer:hn,isBuffer:Hr,isFormData:Kr,isArrayBufferView:Pr,isString:zr,isNumber:fn,isBoolean:Zr,isObject:je,isPlainObject:Ge,isUndefined:Ne,isDate:qr,isFile:jr,isBlob:Gr,isRegExp:di,isFunction:$,isStream:Jr,isURLSearchParams:Qr,isTypedArray:oi,isFileList:Yr,forEach:Ie,merge:kt,extend:ei,trim:Xr,stripBOM:ti,inherits:ni,toFlatObject:si,kindOf:Ze,kindOfTest:Y,endsWith:ri,toArray:ii,forEachEntry:ai,matchAll:ci,isHTMLForm:li,hasOwnProperty:gn,hasOwnProp:gn,reduceDescriptors:wn,freezeMethods:hi,toObjectSet:fi,toCamelCase:ui,noop:mi,toFiniteNumber:yi,findKey:mn,global:yn,isContextDefined:pn,ALPHABET:bn,generateString:pi,isSpecCompliantForm:gi,toJSONObject:wi,isAsyncFn:Si,isThenable:t=>t&&(je(t)||$(t))&&$(t.then)&&$(t.catch)};function T(t,e,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r)}h.inherits(T,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const kn=T.prototype,En={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{En[t]={value:t}}),Object.defineProperties(T,En),Object.defineProperty(kn,"isAxiosError",{value:!0}),T.from=(t,e,n,s,r,i)=>{const o=Object.create(kn);return h.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),T.call(o,t.message,e,n,s,r),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const bi=null;function Tt(t){return h.isPlainObject(t)||h.isArray(t)}function Tn(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function _n(t,e,n){return t?t.concat(e).map(function(r,i){return r=Tn(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function ki(t){return h.isArray(t)&&!t.some(Tt)}const Ei=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,N){return!h.isUndefined(N[g])});const s=n.metaTokens,r=n.visitor||d,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(h.isDate(m))return m.toISOString();if(!c&&h.isBlob(m))throw new T("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(m)||h.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,g,N){let k=m;if(m&&!N&&typeof m=="object"){if(h.endsWith(g,"{}"))g=s?g:g.slice(0,-2),m=JSON.stringify(m);else if(h.isArray(m)&&ki(m)||(h.isFileList(m)||h.endsWith(g,"[]"))&&(k=h.toArray(m)))return g=Tn(g),k.forEach(function(I,x){!(h.isUndefined(I)||I===null)&&e.append(o===!0?_n([g],x,i):o===null?g:g+"[]",l(I))}),!1}return Tt(m)?!0:(e.append(_n(N,g,i),l(m)),!1)}const f=[],w=Object.assign(Ei,{defaultVisitor:d,convertValue:l,isVisitable:Tt});function y(m,g){if(!h.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),h.forEach(m,function(k,E){(!(h.isUndefined(k)||k===null)&&r.call(e,k,h.isString(E)?E.trim():E,g,w))===!0&&y(k,g?g.concat(E):[E])}),f.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return y(t),e}function On(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function _t(t,e){this._pairs=[],t&&Ye(t,this,e)}const Cn=_t.prototype;Cn.append=function(e,n){this._pairs.push([e,n])},Cn.toString=function(e){const n=e?function(s){return e.call(this,s,On)}:On;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Ti(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nn(t,e,n){if(!e)return t;const s=n&&n.encode||Ti,r=n&&n.serialize;let i;if(r?i=r(e,n):i=h.isURLSearchParams(e)?e.toString():new _t(e,n).toString(s),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class _i{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(s){s!==null&&e(s)})}}const In=_i,Dn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oi=typeof URLSearchParams<"u"?URLSearchParams:_t,Ci=typeof FormData<"u"?FormData:null,Ni=typeof Blob<"u"?Blob:null,Ii=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Di=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),J={isBrowser:!0,classes:{URLSearchParams:Oi,FormData:Ci,Blob:Ni},isStandardBrowserEnv:Ii,isStandardBrowserWebWorkerEnv:Di,protocols:["http","https","file","blob","url","data"]};function vi(t,e){return Ye(t,new J.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return J.isNode&&h.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function xi(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Mi(t){const e={},n=Object.keys(t);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],e[i]=t[i];return e}function vn(t){function e(n,s,r,i){let o=n[i++];const a=Number.isFinite(+o),c=i>=n.length;return o=!o&&h.isArray(r)?r.length:o,c?(h.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!h.isObject(r[o]))&&(r[o]=[]),e(n,s,r[o],i)&&h.isArray(r[o])&&(r[o]=Mi(r[o])),!a)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(s,r)=>{e(xi(s),r,n,0)}),n}return null}const Ai={"Content-Type":void 0};function Vi(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const Je={transitional:Dn,adapter:["xhr","http"],transformRequest:[function(e,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=h.isObject(e);if(i&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r&&r?JSON.stringify(vn(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return vi(e,this.formSerializer).toString();if((a=h.isFileList(e))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ye(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),Vi(e)):e}],transformResponse:[function(e){const n=this.transitional||Je.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?T.from(a,T.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};h.forEach(["delete","get","head"],function(e){Je.headers[e]={}}),h.forEach(["post","put","patch"],function(e){Je.headers[e]=h.merge(Ai)});const Ot=Je,Fi=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ri=t=>{const e={};let n,s,r;return t&&t.split(`
4
+ `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||e[n]&&Fi[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},xn=Symbol("internals");function De(t){return t&&String(t).trim().toLowerCase()}function Ke(t){return t===!1||t==null?t:h.isArray(t)?t.map(Ke):String(t)}function Li(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Wi=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ct(t,e,n,s,r){if(h.isFunction(s))return s.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(s))return e.indexOf(s)!==-1;if(h.isRegExp(s))return s.test(e)}}function Bi(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function Ui(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(r,i,o){return this[s].call(this,e,r,i,o)},configurable:!0})})}class Qe{constructor(e){e&&this.set(e)}set(e,n,s){const r=this;function i(a,c,l){const d=De(c);if(!d)throw new Error("header name must be a non-empty string");const f=h.findKey(r,d);(!f||r[f]===void 0||l===!0||l===void 0&&r[f]!==!1)&&(r[f||c]=Ke(a))}const o=(a,c)=>h.forEach(a,(l,d)=>i(l,d,c));return h.isPlainObject(e)||e instanceof this.constructor?o(e,n):h.isString(e)&&(e=e.trim())&&!Wi(e)?o(Ri(e),n):e!=null&&i(n,e,s),this}get(e,n){if(e=De(e),e){const s=h.findKey(this,e);if(s){const r=this[s];if(!n)return r;if(n===!0)return Li(r);if(h.isFunction(n))return n.call(this,r,s);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=De(e),e){const s=h.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Ct(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let r=!1;function i(o){if(o=De(o),o){const a=h.findKey(s,o);a&&(!n||Ct(s,s[a],a,n))&&(delete s[a],r=!0)}}return h.isArray(e)?e.forEach(i):i(e),r}clear(e){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!e||Ct(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const n=this,s={};return h.forEach(this,(r,i)=>{const o=h.findKey(s,i);if(o){n[o]=Ke(r),delete n[i];return}const a=e?Bi(i):String(i).trim();a!==i&&delete n[i],n[a]=Ke(r),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=e&&h.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
5
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[xn]=this[xn]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=De(o);s[a]||(Ui(r,o),s[a]=!0)}return h.isArray(e)?e.forEach(i):i(e),this}}Qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.freezeMethods(Qe.prototype),h.freezeMethods(Qe);const Q=Qe;function Nt(t,e){const n=this||Ot,s=e||n,r=Q.from(s.headers);let i=s.data;return h.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function Mn(t){return!!(t&&t.__CANCEL__)}function ve(t,e,n){T.call(this,t??"canceled",T.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(ve,T,{__CANCEL__:!0});function $i(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Hi=J.isStandardBrowserEnv?function(){return{write:function(n,s,r,i,o,a){const c=[];c.push(n+"="+encodeURIComponent(s)),h.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),h.isString(i)&&c.push("path="+i),h.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Pi(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zi(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function An(t,e){return t&&!Pi(e)?zi(t,e):e}const Zi=J.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(o){const a=h.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function qi(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ji(t,e){t=t||10;const n=new Array(t),s=new Array(t);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),d=s[i];o||(o=l),n[r]=c,s[r]=l;let f=i,w=0;for(;f!==r;)w+=n[f++],f=f%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),l-o<e)return;const y=d&&l-d;return y?Math.round(w*1e3/y):void 0}}function Vn(t,e){let n=0;const s=ji(50,250);return r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,a=i-n,c=s(a),l=i<=o;n=i;const d={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-i)/c:void 0,event:r};d[e?"download":"upload"]=!0,t(d)}}const Xe={http:bi,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,s){let r=t.data;const i=Q.from(t.headers).normalize(),o=t.responseType;let a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}h.isFormData(r)&&(J.isStandardBrowserEnv||J.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(t.auth){const y=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(y+":"+m))}const d=An(t.baseURL,t.url);l.open(t.method.toUpperCase(),Nn(d,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function f(){if(!l)return;const y=Q.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:y,config:t,request:l};$i(function(k){n(k),c()},function(k){s(k),c()},g),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(s(new T("Request aborted",T.ECONNABORTED,t,l)),l=null)},l.onerror=function(){s(new T("Network Error",T.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const g=t.transitional||Dn;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),s(new T(m,g.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,t,l)),l=null},J.isStandardBrowserEnv){const y=(t.withCredentials||Zi(d))&&t.xsrfCookieName&&Hi.read(t.xsrfCookieName);y&&i.set(t.xsrfHeaderName,y)}r===void 0&&i.setContentType(null),"setRequestHeader"in l&&h.forEach(i.toJSON(),function(m,g){l.setRequestHeader(g,m)}),h.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),o&&o!=="json"&&(l.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&l.addEventListener("progress",Vn(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Vn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=y=>{l&&(s(!y||y.type?new ve(null,t,l):y),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const w=qi(d);if(w&&J.protocols.indexOf(w)===-1){s(new T("Unsupported protocol "+w+":",T.ERR_BAD_REQUEST,t));return}l.send(r||null)})}};h.forEach(Xe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Gi={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,s;for(let r=0;r<e&&(n=t[r],!(s=h.isString(n)?Xe[n.toLowerCase()]:n));r++);if(!s)throw s===!1?new T(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(h.hasOwnProp(Xe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!h.isFunction(s))throw new TypeError("adapter is not a function");return s},adapters:Xe};function It(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ve(null,t)}function Fn(t){return It(t),t.headers=Q.from(t.headers),t.data=Nt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Gi.getAdapter(t.adapter||Ot.adapter)(t).then(function(s){return It(t),s.data=Nt.call(t,t.transformResponse,s),s.headers=Q.from(s.headers),s},function(s){return Mn(s)||(It(t),s&&s.response&&(s.response.data=Nt.call(t,t.transformResponse,s.response),s.response.headers=Q.from(s.response.headers))),Promise.reject(s)})}const Rn=t=>t instanceof Q?t.toJSON():t;function ye(t,e){e=e||{};const n={};function s(l,d,f){return h.isPlainObject(l)&&h.isPlainObject(d)?h.merge.call({caseless:f},l,d):h.isPlainObject(d)?h.merge({},d):h.isArray(d)?d.slice():d}function r(l,d,f){if(h.isUndefined(d)){if(!h.isUndefined(l))return s(void 0,l,f)}else return s(l,d,f)}function i(l,d){if(!h.isUndefined(d))return s(void 0,d)}function o(l,d){if(h.isUndefined(d)){if(!h.isUndefined(l))return s(void 0,l)}else return s(void 0,d)}function a(l,d,f){if(f in e)return s(l,d);if(f in t)return s(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,d)=>r(Rn(l),Rn(d),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(d){const f=c[d]||r,w=f(t[d],e[d],d);h.isUndefined(w)&&f!==a||(n[d]=w)}),n}const Ln="1.4.0",Dt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Dt[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Wn={};Dt.transitional=function(e,n,s){function r(i,o){return"[Axios v"+Ln+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(e===!1)throw new T(r(o," has been removed"+(n?" in "+n:"")),T.ERR_DEPRECATED);return n&&!Wn[o]&&(Wn[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Yi(t,e,n){if(typeof t!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let r=s.length;for(;r-- >0;){const i=s[r],o=e[i];if(o){const a=t[i],c=a===void 0||o(a,i,t);if(c!==!0)throw new T("option "+i+" must be "+c,T.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new T("Unknown option "+i,T.ERR_BAD_OPTION)}}const vt={assertOptions:Yi,validators:Dt},se=vt.validators;class et{constructor(e){this.defaults=e,this.interceptors={request:new In,response:new In}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ye(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&vt.assertOptions(s,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:vt.assertOptions(r,{encode:se.function,serialize:se.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&h.merge(i.common,i[n.method]),o&&h.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Q.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,f=0,w;if(!c){const m=[Fn.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),w=m.length,d=Promise.resolve(n);f<w;)d=d.then(m[f++],m[f++]);return d}w=a.length;let y=n;for(f=0;f<w;){const m=a[f++],g=a[f++];try{y=m(y)}catch(N){g.call(this,N);break}}try{d=Fn.call(this,y)}catch(m){return Promise.reject(m)}for(f=0,w=l.length;f<w;)d=d.then(l[f++],l[f++]);return d}getUri(e){e=ye(this.defaults,e);const n=An(e.baseURL,e.url);return Nn(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){et.prototype[e]=function(n,s){return this.request(ye(s||{},{method:e,url:n,data:(s||{}).data}))}}),h.forEach(["post","put","patch"],function(e){function n(s){return function(i,o,a){return this.request(ye(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}et.prototype[e]=n(),et.prototype[e+"Form"]=n(!0)});const tt=et;class xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new ve(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new xt(function(r){e=r}),cancel:e}}}const Ji=xt;function Ki(t){return function(n){return t.apply(null,n)}}function Qi(t){return h.isObject(t)&&t.isAxiosError===!0}const Mt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mt).forEach(([t,e])=>{Mt[e]=t});const Xi=Mt;function Bn(t){const e=new tt(t),n=dn(tt.prototype.request,e);return h.extend(n,tt.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Bn(ye(t,r))},n}const A=Bn(Ot);A.Axios=tt,A.CanceledError=ve,A.CancelToken=Ji,A.isCancel=Mn,A.VERSION=Ln,A.toFormData=Ye,A.AxiosError=T,A.Cancel=A.CanceledError,A.all=function(e){return Promise.all(e)},A.spread=Ki,A.isAxiosError=Qi,A.mergeConfig=ye,A.AxiosHeaders=Q,A.formToJSON=t=>vn(h.isHTMLForm(t)?new FormData(t):t),A.HttpStatusCode=Xi,A.default=A;const eo=A,At=async function(t){const e=t,n=window.VITE_BACKEND_URL?window.VITE_BACKEND_URL:"http://172.27.39.27:3000",s={method:e.method,url:`${n}${e.url}`,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json; charset=utf-8",...e.headers},data:e.data};return eo(s).then(async function(r){return r.data}).catch(async function(r){console.error(r)})},to=async t=>{const e={url:"/v1/message/list-messages",method:"POST",data:t.body,token:t.token};return await At(e).then(n=>n.response).catch(n=>{console.error(n)})},no=async(t,e)=>await At({url:"/v1/message/send-message",method:"POST",data:t,token:e}).then(s=>s).catch(s=>{console.error(s)}),Un=async t=>At({url:"/v1/app-chats/web-chat",method:"GET",token:t}).then(n=>n).catch(n=>{console.error(n)});function so(t){return u.getCurrentScope()?(u.onScopeDispose(t),!0):!1}function $n(t){return typeof t=="function"?t():u.unref(t)}const ro=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const io=t=>t!=null,Vt=()=>{};function Ft(t){var e;const n=$n(t);return(e=n==null?void 0:n.$el)!=null?e:n}const oo=ro?window:void 0;function ao(){const t=u.ref(!1),e=u.getCurrentInstance();return e&&u.onMounted(()=>{t.value=!0},e),t}function co(t){const e=ao();return u.computed(()=>(e.value,!!t()))}function lo(t,e,n={}){const{root:s,rootMargin:r="0px",threshold:i=.1,window:o=oo,immediate:a=!0}=n,c=co(()=>o&&"IntersectionObserver"in o),l=u.computed(()=>{const m=$n(t);return(Array.isArray(m)?m:[m]).map(Ft).filter(io)});let d=Vt;const f=u.ref(a),w=c.value?u.watch(()=>[l.value,Ft(s),f.value],([m,g])=>{if(d(),!f.value||!m.length)return;const N=new IntersectionObserver(e,{root:Ft(g),rootMargin:r,threshold:i});m.forEach(k=>k&&N.observe(k)),d=()=>{N.disconnect(),d=Vt}},{immediate:a,flush:"post"}):Vt,y=()=>{d(),w(),f.value=!1};return so(y),{isSupported:c,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:y}}class ce extends Error{}class uo extends ce{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class ho extends ce{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class fo extends ce{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class pe extends ce{}class Hn extends ce{constructor(e){super(`Invalid unit ${e}`)}}class W extends ce{}class re extends ce{constructor(){super("Zone is an abstract class")}}const p="numeric",Z="short",B="long",nt={year:p,month:p,day:p},Pn={year:p,month:Z,day:p},mo={year:p,month:Z,day:p,weekday:Z},zn={year:p,month:B,day:p},Zn={year:p,month:B,day:p,weekday:B},qn={hour:p,minute:p},jn={hour:p,minute:p,second:p},Gn={hour:p,minute:p,second:p,timeZoneName:Z},Yn={hour:p,minute:p,second:p,timeZoneName:B},Jn={hour:p,minute:p,hourCycle:"h23"},Kn={hour:p,minute:p,second:p,hourCycle:"h23"},Qn={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:Z},Xn={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:B},es={year:p,month:p,day:p,hour:p,minute:p},ts={year:p,month:p,day:p,hour:p,minute:p,second:p},ns={year:p,month:Z,day:p,hour:p,minute:p},ss={year:p,month:Z,day:p,hour:p,minute:p,second:p},yo={year:p,month:Z,day:p,weekday:Z,hour:p,minute:p},rs={year:p,month:B,day:p,hour:p,minute:p,timeZoneName:Z},is={year:p,month:B,day:p,hour:p,minute:p,second:p,timeZoneName:Z},os={year:p,month:B,day:p,weekday:B,hour:p,minute:p,timeZoneName:B},as={year:p,month:B,day:p,weekday:B,hour:p,minute:p,second:p,timeZoneName:B};class xe{get type(){throw new re}get name(){throw new re}get ianaName(){return this.name}get isUniversal(){throw new re}offsetName(e,n){throw new re}formatOffset(e,n){throw new re}offset(e){throw new re}equals(e){throw new re}get isValid(){throw new re}}let Rt=null;class st extends xe{static get instance(){return Rt===null&&(Rt=new st),Rt}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return xs(e,n,s)}formatOffset(e,n){return Fe(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let rt={};function po(t){return rt[t]||(rt[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),rt[t]}const go={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function wo(t,e){const n=t.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,o,a,c,l,d]=s;return[o,r,i,a,c,l,d]}function So(t,e){const n=t.formatToParts(e),s=[];for(let r=0;r<n.length;r++){const{type:i,value:o}=n[r],a=go[i];i==="era"?s[a]=o:S(a)||(s[a]=parseInt(o,10))}return s}let it={};class X extends xe{static create(e){return it[e]||(it[e]=new X(e)),it[e]}static resetCache(){it={},rt={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=X.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return xs(e,n,s,this.name)}formatOffset(e,n){return Fe(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const s=po(this.name);let[r,i,o,a,c,l,d]=s.formatToParts?So(s,n):wo(s,n);a==="BC"&&(r=-Math.abs(r)+1);const w=ut({year:r,month:i,day:o,hour:c===24?0:c,minute:l,second:d,millisecond:0});let y=+n;const m=y%1e3;return y-=m>=0?m:1e3+m,(w-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let cs={};function bo(t,e={}){const n=JSON.stringify([t,e]);let s=cs[n];return s||(s=new Intl.ListFormat(t,e),cs[n]=s),s}let Lt={};function Wt(t,e={}){const n=JSON.stringify([t,e]);let s=Lt[n];return s||(s=new Intl.DateTimeFormat(t,e),Lt[n]=s),s}let Bt={};function ko(t,e={}){const n=JSON.stringify([t,e]);let s=Bt[n];return s||(s=new Intl.NumberFormat(t,e),Bt[n]=s),s}let Ut={};function Eo(t,e={}){const{base:n,...s}=e,r=JSON.stringify([t,s]);let i=Ut[r];return i||(i=new Intl.RelativeTimeFormat(t,e),Ut[r]=i),i}let Me=null;function To(){return Me||(Me=new Intl.DateTimeFormat().resolvedOptions().locale,Me)}let ls={};function _o(t){let e=ls[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,ls[t]=e}return e}function Oo(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let s,r;try{s=Wt(t).resolvedOptions(),r=t}catch{const c=t.substring(0,n);s=Wt(c).resolvedOptions(),r=c}const{numberingSystem:i,calendar:o}=s;return[r,i,o]}}function Co(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function No(t){const e=[];for(let n=1;n<=12;n++){const s=b.utc(2009,n,1);e.push(t(s))}return e}function Io(t){const e=[];for(let n=1;n<=7;n++){const s=b.utc(2016,11,13+n);e.push(t(s))}return e}function ot(t,e,n,s){const r=t.listingMode();return r==="error"?null:r==="en"?n(e):s(e)}function Do(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class vo{constructor(e,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...o}=s;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=ko(e,a)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):jt(e,3);return M(n,this.padTo)}}}class xo{constructor(e,n,s){this.opts=s,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&X.create(a).valid?(r=a,this.dt=e):(r="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Wt(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Mo{constructor(e,n,s){this.opts={style:"long",...s},!n&&Ns()&&(this.rtf=Eo(e,s))}format(e,n){return this.rtf?this.rtf.format(e,n):Qo(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Ao={firstDay:1,minimalDays:4,weekend:[6,7]};class C{static fromOpts(e){return C.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,s,r,i=!1){const o=e||v.defaultLocale,a=o||(i?"en-US":To()),c=n||v.defaultNumberingSystem,l=s||v.defaultOutputCalendar,d=Zt(r)||v.defaultWeekSettings;return new C(a,c,l,d,o)}static resetCache(){Me=null,Lt={},Bt={},Ut={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:s,weekSettings:r}={}){return C.create(e,n,s,r)}constructor(e,n,s,r,i){const[o,a,c]=Oo(e);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=s||c||null,this.weekSettings=r,this.intl=Co(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Do(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:C.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Zt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return ot(this,e,Vs,()=>{const s=n?{month:e,day:"numeric"}:{month:e},r=n?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=No(i=>this.extract(i,s,"month"))),this.monthsCache[r][e]})}weekdays(e,n=!1){return ot(this,e,Ls,()=>{const s=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Io(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return ot(this,void 0,()=>Ws,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ot(this,e,Bs,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[e]})}extract(e,n,s){const r=this.dtFormatter(e,n),i=r.formatToParts(),o=i.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(e={}){return new vo(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new xo(e,this.intl,n)}relFormatter(e={}){return new Mo(this.intl,this.isEnglish(),e)}listFormatter(e={}){return bo(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Is()?_o(this.locale):Ao}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let $t=null;class L extends xe{static get utcInstance(){return $t===null&&($t=new L(0)),$t}static instance(e){return e===0?L.utcInstance:new L(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new L(dt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Fe(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Fe(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Fe(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Vo extends xe{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ie(t,e){if(S(t)||t===null)return e;if(t instanceof xe)return t;if(Lo(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?st.instance:n==="utc"||n==="gmt"?L.utcInstance:L.parseSpecifier(n)||X.create(t)}else return le(t)?L.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Vo(t)}let us=()=>Date.now(),ds="system",hs=null,fs=null,ms=null,ys=60,ps,gs=null;class v{static get now(){return us}static set now(e){us=e}static set defaultZone(e){ds=e}static get defaultZone(){return ie(ds,st.instance)}static get defaultLocale(){return hs}static set defaultLocale(e){hs=e}static get defaultNumberingSystem(){return fs}static set defaultNumberingSystem(e){fs=e}static get defaultOutputCalendar(){return ms}static set defaultOutputCalendar(e){ms=e}static get defaultWeekSettings(){return gs}static set defaultWeekSettings(e){gs=Zt(e)}static get twoDigitCutoffYear(){return ys}static set twoDigitCutoffYear(e){ys=e%100}static get throwOnInvalid(){return ps}static set throwOnInvalid(e){ps=e}static resetCaches(){C.resetCache(),X.resetCache()}}class q{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ws=[0,31,59,90,120,151,181,212,243,273,304,334],Ss=[0,31,60,91,121,152,182,213,244,274,305,335];function H(t,e){return new q("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ht(t,e,n){const s=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function bs(t,e,n){return n+(Ae(t)?Ss:ws)[e-1]}function ks(t,e){const n=Ae(t)?Ss:ws,s=n.findIndex(i=>i<e),r=e-n[s];return{month:s+1,day:r}}function Pt(t,e){return(t-e+7)%7+1}function at(t,e=4,n=1){const{year:s,month:r,day:i}=t,o=bs(s,r,i),a=Pt(Ht(s,r,i),n);let c=Math.floor((o-a+14-e)/7),l;return c<1?(l=s-1,c=Ve(l,e,n)):c>Ve(s,e,n)?(l=s+1,c=1):l=s,{weekYear:l,weekNumber:c,weekday:a,...ft(t)}}function Es(t,e=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=t,o=Pt(Ht(s,1,e),n),a=we(s);let c=r*7+i-o-7+e,l;c<1?(l=s-1,c+=we(l)):c>a?(l=s+1,c-=we(s)):l=s;const{month:d,day:f}=ks(l,c);return{year:l,month:d,day:f,...ft(t)}}function zt(t){const{year:e,month:n,day:s}=t,r=bs(e,n,s);return{year:e,ordinal:r,...ft(t)}}function Ts(t){const{year:e,ordinal:n}=t,{month:s,day:r}=ks(e,n);return{year:e,month:s,day:r,...ft(t)}}function _s(t,e){if(!S(t.localWeekday)||!S(t.localWeekNumber)||!S(t.localWeekYear)){if(!S(t.weekday)||!S(t.weekNumber)||!S(t.weekYear))throw new pe("Cannot mix locale-based week fields with ISO-based week fields");return S(t.localWeekday)||(t.weekday=t.localWeekday),S(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),S(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Fo(t,e=4,n=1){const s=ct(t.weekYear),r=P(t.weekNumber,1,Ve(t.weekYear,e,n)),i=P(t.weekday,1,7);return s?r?i?!1:H("weekday",t.weekday):H("week",t.weekNumber):H("weekYear",t.weekYear)}function Ro(t){const e=ct(t.year),n=P(t.ordinal,1,we(t.year));return e?n?!1:H("ordinal",t.ordinal):H("year",t.year)}function Os(t){const e=ct(t.year),n=P(t.month,1,12),s=P(t.day,1,lt(t.year,t.month));return e?n?s?!1:H("day",t.day):H("month",t.month):H("year",t.year)}function Cs(t){const{hour:e,minute:n,second:s,millisecond:r}=t,i=P(e,0,23)||e===24&&n===0&&s===0&&r===0,o=P(n,0,59),a=P(s,0,59),c=P(r,0,999);return i?o?a?c?!1:H("millisecond",r):H("second",s):H("minute",n):H("hour",e)}function S(t){return typeof t>"u"}function le(t){return typeof t=="number"}function ct(t){return typeof t=="number"&&t%1===0}function Lo(t){return typeof t=="string"}function Wo(t){return Object.prototype.toString.call(t)==="[object Date]"}function Ns(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Is(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Bo(t){return Array.isArray(t)?t:[t]}function Ds(t,e,n){if(t.length!==0)return t.reduce((s,r)=>{const i=[e(r),r];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function Uo(t,e){return e.reduce((n,s)=>(n[s]=t[s],n),{})}function ge(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Zt(t){if(t==null)return null;if(typeof t!="object")throw new W("Week settings must be an object");if(!P(t.firstDay,1,7)||!P(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!P(e,1,7)))throw new W("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function P(t,e,n){return ct(t)&&t>=e&&t<=n}function $o(t,e){return t-e*Math.floor(t/e)}function M(t,e=2){const n=t<0;let s;return n?s="-"+(""+-t).padStart(e,"0"):s=(""+t).padStart(e,"0"),s}function oe(t){if(!(S(t)||t===null||t===""))return parseInt(t,10)}function ue(t){if(!(S(t)||t===null||t===""))return parseFloat(t)}function qt(t){if(!(S(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function jt(t,e,n=!1){const s=10**e;return(n?Math.trunc:Math.round)(t*s)/s}function Ae(t){return t%4===0&&(t%100!==0||t%400===0)}function we(t){return Ae(t)?366:365}function lt(t,e){const n=$o(e-1,12)+1,s=t+(e-n)/12;return n===2?Ae(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ut(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function vs(t,e,n){return-Pt(Ht(t,1,e),n)+e-1}function Ve(t,e=4,n=1){const s=vs(t,e,n),r=vs(t+1,e,n);return(we(t)-s+r)/7}function Gt(t){return t>99?t:t>v.twoDigitCutoffYear?1900+t:2e3+t}function xs(t,e,n,s=null){const r=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const o={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(r).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function dt(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const s=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-s:s;return n*60+r}function Ms(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new W(`Invalid unit value ${t}`);return e}function ht(t,e){const n={};for(const s in t)if(ge(t,s)){const r=t[s];if(r==null)continue;n[e(s)]=Ms(r)}return n}function Fe(t,e){const n=Math.trunc(Math.abs(t/60)),s=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${M(n,2)}:${M(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${M(n,2)}${M(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ft(t){return Uo(t,["hour","minute","second","millisecond"])}const Ho=["January","February","March","April","May","June","July","August","September","October","November","December"],As=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Po=["J","F","M","A","M","J","J","A","S","O","N","D"];function Vs(t){switch(t){case"narrow":return[...Po];case"short":return[...As];case"long":return[...Ho];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Fs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Rs=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zo=["M","T","W","T","F","S","S"];function Ls(t){switch(t){case"narrow":return[...zo];case"short":return[...Rs];case"long":return[...Fs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ws=["AM","PM"],Zo=["Before Christ","Anno Domini"],qo=["BC","AD"],jo=["B","A"];function Bs(t){switch(t){case"narrow":return[...jo];case"short":return[...qo];case"long":return[...Zo];default:return null}}function Go(t){return Ws[t.hour<12?0:1]}function Yo(t,e){return Ls(e)[t.weekday-1]}function Jo(t,e){return Vs(e)[t.month-1]}function Ko(t,e){return Bs(e)[t.year<0?0:1]}function Qo(t,e,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){const f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${r[t][0]}`;case-1:return f?"yesterday":`last ${r[t][0]}`;case 0:return f?"today":`this ${r[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,l=r[t],d=s?c?l[1]:l[2]||l[1]:c?r[t][0]:t;return o?`${a} ${d} ago`:`in ${a} ${d}`}function Us(t,e){let n="";for(const s of t)s.literal?n+=s.val:n+=e(s.val);return n}const Xo={D:nt,DD:Pn,DDD:zn,DDDD:Zn,t:qn,tt:jn,ttt:Gn,tttt:Yn,T:Jn,TT:Kn,TTT:Qn,TTTT:Xn,f:es,ff:ns,fff:rs,ffff:os,F:ts,FF:ss,FFF:is,FFFF:as};class F{static create(e,n={}){return new F(e,n)}static parseFormat(e){let n=null,s="",r=!1;const i=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?(s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),n=null,s="",r=!r):r||a===n?s+=a:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Xo[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return M(e,n);const s={...this.opts};return n>0&&(s.padTo=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,n){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(y,m)=>this.loc.extract(e,y,m),o=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",a=()=>s?Go(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(y,m)=>s?Jo(e,y):i(m?{month:y}:{month:y,day:"numeric"},"month"),l=(y,m)=>s?Yo(e,y):i(m?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),d=y=>{const m=F.macroTokenToFormatOpts(y);return m?this.formatWithSystemDefault(e,m):y},f=y=>s?Ko(e,y):i({era:y},"era"),w=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(y)}};return Us(F.parseFormat(n),w)}formatDurationFromString(e,n){const s=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=c=>l=>{const d=s(l);return d?this.num(c.get(d),l.length):l},i=F.parseFormat(n),o=i.reduce((c,{literal:l,val:d})=>l?c:c.concat(d),[]),a=e.shiftTo(...o.map(s).filter(c=>c));return Us(i,r(a))}}const $s=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Se(...t){const e=t.reduce((n,s)=>n+s.source,"");return RegExp(`^${e}$`)}function be(...t){return e=>t.reduce(([n,s,r],i)=>{const[o,a,c]=i(e,r);return[{...n,...o},a||s,c]},[{},null,1]).slice(0,2)}function ke(t,...e){if(t==null)return[null,null];for(const[n,s]of e){const r=n.exec(t);if(r)return s(r)}return[null,null]}function Hs(...t){return(e,n)=>{const s={};let r;for(r=0;r<t.length;r++)s[t[r]]=oe(e[n+r]);return[s,null,n+r]}}const Ps=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ea=`(?:${Ps.source}?(?:\\[(${$s.source})\\])?)?`,Yt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,zs=RegExp(`${Yt.source}${ea}`),Jt=RegExp(`(?:T${zs.source})?`),ta=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,na=/(\d{4})-?W(\d\d)(?:-?(\d))?/,sa=/(\d{4})-?(\d{3})/,ra=Hs("weekYear","weekNumber","weekDay"),ia=Hs("year","ordinal"),oa=/(\d{4})-(\d\d)-(\d\d)/,Zs=RegExp(`${Yt.source} ?(?:${Ps.source}|(${$s.source}))?`),aa=RegExp(`(?: ${Zs.source})?`);function Ee(t,e,n){const s=t[e];return S(s)?n:oe(s)}function ca(t,e){return[{year:Ee(t,e),month:Ee(t,e+1,1),day:Ee(t,e+2,1)},null,e+3]}function Te(t,e){return[{hours:Ee(t,e,0),minutes:Ee(t,e+1,0),seconds:Ee(t,e+2,0),milliseconds:qt(t[e+3])},null,e+4]}function Re(t,e){const n=!t[e]&&!t[e+1],s=dt(t[e+1],t[e+2]),r=n?null:L.instance(s);return[{},r,e+3]}function Le(t,e){const n=t[e]?X.create(t[e]):null;return[{},n,e+1]}const la=RegExp(`^T?${Yt.source}$`),ua=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function da(t){const[e,n,s,r,i,o,a,c,l]=t,d=e[0]==="-",f=c&&c[0]==="-",w=(y,m=!1)=>y!==void 0&&(m||y&&d)?-y:y;return[{years:w(ue(n)),months:w(ue(s)),weeks:w(ue(r)),days:w(ue(i)),hours:w(ue(o)),minutes:w(ue(a)),seconds:w(ue(c),c==="-0"),milliseconds:w(qt(l),f)}]}const ha={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Kt(t,e,n,s,r,i,o){const a={year:e.length===2?Gt(oe(e)):oe(e),month:As.indexOf(n)+1,day:oe(s),hour:oe(r),minute:oe(i)};return o&&(a.second=oe(o)),t&&(a.weekday=t.length>3?Fs.indexOf(t)+1:Rs.indexOf(t)+1),a}const fa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ma(t){const[,e,n,s,r,i,o,a,c,l,d,f]=t,w=Kt(e,r,s,n,i,o,a);let y;return c?y=ha[c]:l?y=0:y=dt(d,f),[w,new L(y)]}function ya(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pa=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ga=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,wa=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qs(t){const[,e,n,s,r,i,o,a]=t;return[Kt(e,r,s,n,i,o,a),L.utcInstance]}function Sa(t){const[,e,n,s,r,i,o,a]=t;return[Kt(e,a,n,s,r,i,o),L.utcInstance]}const ba=Se(ta,Jt),ka=Se(na,Jt),Ea=Se(sa,Jt),Ta=Se(zs),js=be(ca,Te,Re,Le),_a=be(ra,Te,Re,Le),Oa=be(ia,Te,Re,Le),Ca=be(Te,Re,Le);function Na(t){return ke(t,[ba,js],[ka,_a],[Ea,Oa],[Ta,Ca])}function Ia(t){return ke(ya(t),[fa,ma])}function Da(t){return ke(t,[pa,qs],[ga,qs],[wa,Sa])}function va(t){return ke(t,[ua,da])}const xa=be(Te);function Ma(t){return ke(t,[la,xa])}const Aa=Se(oa,aa),Va=Se(Zs),Fa=be(Te,Re,Le);function Ra(t){return ke(t,[Aa,js],[Va,Fa])}const Gs="Invalid Duration",Ys={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},La={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Ys},z=146097/400,_e=146097/4800,Wa={years:{quarters:4,months:12,weeks:z/7,days:z,hours:z*24,minutes:z*24*60,seconds:z*24*60*60,milliseconds:z*24*60*60*1e3},quarters:{months:3,weeks:z/28,days:z/4,hours:z*24/4,minutes:z*24*60/4,seconds:z*24*60*60/4,milliseconds:z*24*60*60*1e3/4},months:{weeks:_e/7,days:_e,hours:_e*24,minutes:_e*24*60,seconds:_e*24*60*60,milliseconds:_e*24*60*60*1e3},...Ys},de=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ba=de.slice(0).reverse();function ae(t,e,n=!1){const s={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new _(s)}function Js(t,e){let n=e.milliseconds??0;for(const s of Ba.slice(1))e[s]&&(n+=e[s]*t[s].milliseconds);return n}function Ks(t,e){const n=Js(t,e)<0?-1:1;de.reduceRight((s,r)=>{if(S(e[r]))return s;if(s){const i=e[s]*n,o=t[r][s],a=Math.floor(i/o);e[r]+=a*n,e[s]-=a*o*n}return r},null),de.reduce((s,r)=>{if(S(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*t[s][r]}return r},null)}function Ua(t){const e={};for(const[n,s]of Object.entries(t))s!==0&&(e[n]=s);return e}class _{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let s=n?Wa:La;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||C.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,n){return _.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new W(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new _({values:ht(e,_.normalizeUnit),loc:C.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(le(e))return _.fromMillis(e);if(_.isDuration(e))return e;if(typeof e=="object")return _.fromObject(e);throw new W(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[s]=va(e);return s?_.fromObject(s,n):_.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[s]=Ma(e);return s?_.fromObject(s,n):_.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the Duration is invalid");const s=e instanceof q?e:new q(e,n);if(v.throwOnInvalid)throw new fo(s);return new _({invalid:s})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new Hn(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?F.create(this.loc,s).formatDurationFromString(this,e):Gs}toHuman(e={}){if(!this.isValid)return Gs;const n=de.map(s=>{const r=this.values[s];return S(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(r)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=jt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},b.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Js(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e),s={};for(const r of de)(ge(n.values,r)||ge(this.values,r))&&(s[r]=n.get(r)+this.get(r));return ae(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=Ms(e(this.values[s],s));return ae(this,{values:n},!0)}get(e){return this[_.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...ht(e,_.normalizeUnit)};return ae(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:s,matrix:r}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:s};return ae(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ks(this.matrix,e),ae(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Ua(this.normalize().shiftToAll().toObject());return ae(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>_.normalizeUnit(o));const n={},s={},r=this.toObject();let i;for(const o of de)if(e.indexOf(o)>=0){i=o;let a=0;for(const l in s)a+=this.matrix[l][o]*s[l],s[l]=0;le(r[o])&&(a+=r[o]);const c=Math.trunc(a);n[o]=c,s[o]=(a*1e3-c*1e3)/1e3}else le(r[o])&&(s[o]=r[o]);for(const o in s)s[o]!==0&&(n[i]+=o===i?s[o]:s[o]/this.matrix[i][o]);return Ks(this.matrix,n),ae(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return ae(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of de)if(!n(this.values[s],e.values[s]))return!1;return!0}}const Oe="Invalid Interval";function $a(t,e){return!t||!t.isValid?D.invalid("missing or invalid start"):!e||!e.isValid?D.invalid("missing or invalid end"):e<t?D.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class D{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the Interval is invalid");const s=e instanceof q?e:new q(e,n);if(v.throwOnInvalid)throw new ho(s);return new D({invalid:s})}static fromDateTimes(e,n){const s=Be(e),r=Be(n),i=$a(s,r);return i??new D({start:s,end:r})}static after(e,n){const s=_.fromDurationLike(n),r=Be(e);return D.fromDateTimes(r,r.plus(s))}static before(e,n){const s=_.fromDurationLike(n),r=Be(e);return D.fromDateTimes(r.minus(s),r)}static fromISO(e,n){const[s,r]=(e||"").split("/",2);if(s&&r){let i,o;try{i=b.fromISO(s,n),o=i.isValid}catch{o=!1}let a,c;try{a=b.fromISO(r,n),c=a.isValid}catch{c=!1}if(o&&c)return D.fromDateTimes(i,a);if(o){const l=_.fromISO(r,n);if(l.isValid)return D.after(i,l)}else if(c){const l=_.fromISO(s,n);if(l.isValid)return D.before(a,l)}}return D.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const s=this.start.startOf(e,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,n),Math.floor(r.diff(s,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?D.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Be).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const o=n[i]||this.e,a=+o>+this.e?this.e:o;s.push(D.fromDateTimes(r,a)),r=a,i+=1}return s}splitBy(e){const n=_.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,r=1,i;const o=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(c=>c*r));i=+a>+this.e?this.e:a,o.push(D.fromDateTimes(s,i)),s=i,r+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return n>=s?null:D.fromDateTimes(n,s)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return D.fromDateTimes(n,s)}static merge(e){const[n,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[r,i.union(o)]:[r.concat([i]),o]:[r,o],[[],null]);return s&&n.push(s),n}static xor(e){let n=null,s=0;const r=[],i=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),o=Array.prototype.concat(...i),a=o.sort((c,l)=>c.time-l.time);for(const c of a)s+=c.type==="s"?1:-1,s===1?n=c.time:(n&&+n!=+c.time&&r.push(D.fromDateTimes(n,c.time)),n=null);return D.merge(r)}difference(...e){return D.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Oe}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=nt,n={}){return this.isValid?F.create(this.s.loc.clone(n),e).formatInterval(this):Oe}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Oe}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Oe}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Oe}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Oe}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):_.invalid(this.invalidReason)}mapEndpoints(e){return D.fromDateTimes(e(this.s),e(this.e))}}class mt{static hasDST(e=v.defaultZone){const n=b.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return X.isValidZone(e)}static normalizeZone(e){return ie(e,v.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||C.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||C.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||C.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||C.create(n,s,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||C.create(n,s,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||C.create(n,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||C.create(n,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return C.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return C.create(n,null,"gregory").eras(e)}static features(){return{relative:Ns(),localeWeek:Is()}}}function Qs(t,e){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(e)-n(t);return Math.floor(_.fromMillis(s).as("days"))}function Ha(t,e,n){const s=[["years",(c,l)=>l.year-c.year],["quarters",(c,l)=>l.quarter-c.quarter+(l.year-c.year)*4],["months",(c,l)=>l.month-c.month+(l.year-c.year)*12],["weeks",(c,l)=>{const d=Qs(c,l);return(d-d%7)/7}],["days",Qs]],r={},i=t;let o,a;for(const[c,l]of s)n.indexOf(c)>=0&&(o=c,r[c]=l(t,e),a=i.plus(r),a>e?(r[c]--,t=i.plus(r),t>e&&(a=t,r[c]--,t=i.plus(r))):t=a);return[t,r,a,o]}function Pa(t,e,n,s){let[r,i,o,a]=Ha(t,e,n);const c=e-r,l=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);l.length===0&&(o<e&&(o=r.plus({[a]:1})),o!==r&&(i[a]=(i[a]||0)+c/(o-r)));const d=_.fromObject(i,s);return l.length>0?_.fromMillis(c,s).shiftTo(...l).plus(d):d}const Qt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Xs={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},za=Qt.hanidec.replace(/[\[|\]]/g,"").split("");function Za(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(t[n].search(Qt.hanidec)!==-1)e+=za.indexOf(t[n]);else for(const r in Xs){const[i,o]=Xs[r];s>=i&&s<=o&&(e+=s-i)}}return parseInt(e,10)}else return e}function j({numberingSystem:t},e=""){return new RegExp(`${Qt[t||"latn"]}${e}`)}const qa="missing Intl.DateTimeFormat.formatToParts support";function O(t,e=n=>n){return{regex:t,deser:([n])=>e(Za(n))}}const er=`[ ${String.fromCharCode(160)}]`,tr=new RegExp(er,"g");function ja(t){return t.replace(/\./g,"\\.?").replace(tr,er)}function nr(t){return t.replace(/\./g,"").replace(tr," ").toLowerCase()}function G(t,e){return t===null?null:{regex:RegExp(t.map(ja).join("|")),deser:([n])=>t.findIndex(s=>nr(n)===nr(s))+e}}function sr(t,e){return{regex:t,deser:([,n,s])=>dt(n,s),groups:e}}function yt(t){return{regex:t,deser:([e])=>e}}function Ga(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ya(t,e){const n=j(e),s=j(e,"{2}"),r=j(e,"{3}"),i=j(e,"{4}"),o=j(e,"{6}"),a=j(e,"{1,2}"),c=j(e,"{1,3}"),l=j(e,"{1,6}"),d=j(e,"{1,9}"),f=j(e,"{2,4}"),w=j(e,"{4,6}"),y=N=>({regex:RegExp(Ga(N.val)),deser:([k])=>k,literal:!0}),g=(N=>{if(t.literal)return y(N);switch(N.val){case"G":return G(e.eras("short"),0);case"GG":return G(e.eras("long"),0);case"y":return O(l);case"yy":return O(f,Gt);case"yyyy":return O(i);case"yyyyy":return O(w);case"yyyyyy":return O(o);case"M":return O(a);case"MM":return O(s);case"MMM":return G(e.months("short",!0),1);case"MMMM":return G(e.months("long",!0),1);case"L":return O(a);case"LL":return O(s);case"LLL":return G(e.months("short",!1),1);case"LLLL":return G(e.months("long",!1),1);case"d":return O(a);case"dd":return O(s);case"o":return O(c);case"ooo":return O(r);case"HH":return O(s);case"H":return O(a);case"hh":return O(s);case"h":return O(a);case"mm":return O(s);case"m":return O(a);case"q":return O(a);case"qq":return O(s);case"s":return O(a);case"ss":return O(s);case"S":return O(c);case"SSS":return O(r);case"u":return yt(d);case"uu":return yt(a);case"uuu":return O(n);case"a":return G(e.meridiems(),0);case"kkkk":return O(i);case"kk":return O(f,Gt);case"W":return O(a);case"WW":return O(s);case"E":case"c":return O(n);case"EEE":return G(e.weekdays("short",!1),1);case"EEEE":return G(e.weekdays("long",!1),1);case"ccc":return G(e.weekdays("short",!0),1);case"cccc":return G(e.weekdays("long",!0),1);case"Z":case"ZZ":return sr(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return sr(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return yt(/[a-z_+-/]{1,256}?/i);case" ":return yt(/[^\S\n\r]/);default:return y(N)}})(t)||{invalidReason:qa};return g.token=t,g}const Ja={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Ka(t,e,n){const{type:s,value:r}=t;if(s==="literal"){const c=/^\s+$/.test(r);return{literal:!c,val:c?" ":r}}const i=e[s];let o=s;s==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let a=Ja[o];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function Qa(t){return[`^${t.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,t]}function Xa(t,e,n){const s=t.match(e);if(s){const r={};let i=1;for(const o in n)if(ge(n,o)){const a=n[o],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(s.slice(i,i+c))),i+=c}return[s,r]}else return[s,{}]}function ec(t){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return S(t.z)||(n=X.create(t.z)),S(t.Z)||(n||(n=new L(t.Z)),s=t.Z),S(t.q)||(t.M=(t.q-1)*3+1),S(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),S(t.u)||(t.S=qt(t.u)),[Object.keys(t).reduce((i,o)=>{const a=e(o);return a&&(i[a]=t[o]),i},{}),n,s]}let Xt=null;function tc(){return Xt||(Xt=b.fromMillis(1555555555555)),Xt}function nc(t,e){if(t.literal)return t;const n=F.macroTokenToFormatOpts(t.val),s=or(n,e);return s==null||s.includes(void 0)?t:s}function rr(t,e){return Array.prototype.concat(...t.map(n=>nc(n,e)))}function ir(t,e,n){const s=rr(F.parseFormat(n),t),r=s.map(o=>Ya(o,t)),i=r.find(o=>o.invalidReason);if(i)return{input:e,tokens:s,invalidReason:i.invalidReason};{const[o,a]=Qa(r),c=RegExp(o,"i"),[l,d]=Xa(e,c,a),[f,w,y]=d?ec(d):[null,null,void 0];if(ge(d,"a")&&ge(d,"H"))throw new pe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:s,regex:c,rawMatches:l,matches:d,result:f,zone:w,specificOffset:y}}}function sc(t,e,n){const{result:s,zone:r,specificOffset:i,invalidReason:o}=ir(t,e,n);return[s,r,i,o]}function or(t,e){if(!t)return null;const s=F.create(e,t).dtFormatter(tc()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(o=>Ka(o,t,i))}const en="Invalid DateTime",ar=864e13;function pt(t){return new q("unsupported zone",`the zone "${t.name}" is not supported`)}function tn(t){return t.weekData===null&&(t.weekData=at(t.c)),t.weekData}function nn(t){return t.localWeekData===null&&(t.localWeekData=at(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function he(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new b({...n,...e,old:n})}function cr(t,e,n){let s=t-e*60*1e3;const r=n.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=n.offset(s);return r===i?[s,r]:[t-Math.min(r,i)*60*1e3,Math.max(r,i)]}function gt(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function wt(t,e,n){return cr(ut(t),e,n)}function lr(t,e){const n=t.o,s=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:s,month:r,day:Math.min(t.c.day,lt(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=_.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=ut(i);let[c,l]=cr(a,n,t.zone);return o!==0&&(c+=o,l=t.zone.offset(c)),{ts:c,o:l}}function We(t,e,n,s,r,i){const{setZone:o,zone:a}=n;if(t&&Object.keys(t).length!==0||e){const c=e||a,l=b.fromObject(t,{...n,zone:c,specificOffset:i});return o?l:l.setZone(a)}else return b.invalid(new q("unparsable",`the input "${r}" can't be parsed as ${s}`))}function St(t,e,n=!0){return t.isValid?F.create(C.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function sn(t,e){const n=t.c.year>9999||t.c.year<0;let s="";return n&&t.c.year>=0&&(s+="+"),s+=M(t.c.year,n?6:4),e?(s+="-",s+=M(t.c.month),s+="-",s+=M(t.c.day)):(s+=M(t.c.month),s+=M(t.c.day)),s}function ur(t,e,n,s,r,i){let o=M(t.c.hour);return e?(o+=":",o+=M(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=M(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=M(t.c.second),(t.c.millisecond!==0||!s)&&(o+=".",o+=M(t.c.millisecond,3))),r&&(t.isOffsetFixed&&t.offset===0&&!i?o+="Z":t.o<0?(o+="-",o+=M(Math.trunc(-t.o/60)),o+=":",o+=M(Math.trunc(-t.o%60))):(o+="+",o+=M(Math.trunc(t.o/60)),o+=":",o+=M(Math.trunc(t.o%60)))),i&&(o+="["+t.zone.ianaName+"]"),o}const dr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ic={ordinal:1,hour:0,minute:0,second:0,millisecond:0},hr=["year","month","day","hour","minute","second","millisecond"],oc=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ac=["year","ordinal","hour","minute","second","millisecond"];function cc(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Hn(t);return e}function fr(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cc(t)}}function mr(t,e){const n=ie(e.zone,v.defaultZone),s=C.fromObject(e),r=v.now();let i,o;if(S(t.year))i=r;else{for(const l of hr)S(t[l])&&(t[l]=dr[l]);const a=Os(t)||Cs(t);if(a)return b.invalid(a);const c=n.offset(r);[i,o]=wt(t,c,n)}return new b({ts:i,zone:n,loc:s,o})}function yr(t,e,n){const s=S(n.round)?!0:n.round,r=(o,a)=>(o=jt(o,s||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,a)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return r(i(n.unit),n.unit);for(const o of n.units){const a=i(o);if(Math.abs(a)>=1)return r(a,o)}return r(t>e?-0:0,n.units[n.units.length-1])}function pr(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class b{constructor(e){const n=e.zone||v.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new q("invalid input"):null)||(n.isValid?null:pt(n));this.ts=S(e.ts)?v.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,i]=[e.old.c,e.old.o];else{const a=n.offset(this.ts);r=gt(this.ts,a),s=Number.isNaN(r.year)?new q("invalid input"):null,r=s?null:r,i=s?null:a}this._zone=n,this.loc=e.loc||C.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[e,n]=pr(arguments),[s,r,i,o,a,c,l]=n;return mr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static utc(){const[e,n]=pr(arguments),[s,r,i,o,a,c,l]=n;return e.zone=L.utcInstance,mr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static fromJSDate(e,n={}){const s=Wo(e)?e.valueOf():NaN;if(Number.isNaN(s))return b.invalid("invalid input");const r=ie(n.zone,v.defaultZone);return r.isValid?new b({ts:s,zone:r,loc:C.fromObject(n)}):b.invalid(pt(r))}static fromMillis(e,n={}){if(le(e))return e<-ar||e>ar?b.invalid("Timestamp out of range"):new b({ts:e,zone:ie(n.zone,v.defaultZone),loc:C.fromObject(n)});throw new W(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(le(e))return new b({ts:e*1e3,zone:ie(n.zone,v.defaultZone),loc:C.fromObject(n)});throw new W("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const s=ie(n.zone,v.defaultZone);if(!s.isValid)return b.invalid(pt(s));const r=C.fromObject(n),i=ht(e,fr),{minDaysInFirstWeek:o,startOfWeek:a}=_s(i,r),c=v.now(),l=S(n.specificOffset)?s.offset(c):n.specificOffset,d=!S(i.ordinal),f=!S(i.year),w=!S(i.month)||!S(i.day),y=f||w,m=i.weekYear||i.weekNumber;if((y||d)&&m)throw new pe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&d)throw new pe("Can't mix ordinal dates with month/day");const g=m||i.weekday&&!y;let N,k,E=gt(c,l);g?(N=oc,k=rc,E=at(E,o,a)):d?(N=ac,k=ic,E=zt(E)):(N=hr,k=dr);let I=!1;for(const $e of N){const Qc=i[$e];S(Qc)?I?i[$e]=k[$e]:i[$e]=E[$e]:I=!0}const x=g?Fo(i,o,a):d?Ro(i):Os(i),fe=x||Cs(i);if(fe)return b.invalid(fe);const Ue=g?Es(i,o,a):d?Ts(i):i,[rn,on]=wt(Ue,l,s),an=new b({ts:rn,zone:s,o:on,loc:r});return i.weekday&&y&&e.weekday!==an.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${an.toISO()}`):an}static fromISO(e,n={}){const[s,r]=Na(e);return We(s,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[s,r]=Ia(e);return We(s,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[s,r]=Da(e);return We(s,r,n,"HTTP",n)}static fromFormat(e,n,s={}){if(S(e)||S(n))throw new W("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,o=C.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,c,l,d]=sc(o,e,n);return d?b.invalid(d):We(a,c,s,`format ${n}`,e,l)}static fromString(e,n,s={}){return b.fromFormat(e,n,s)}static fromSQL(e,n={}){const[s,r]=Ra(e);return We(s,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the DateTime is invalid");const s=e instanceof q?e:new q(e,n);if(v.throwOnInvalid)throw new uo(s);return new b({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const s=or(e,C.fromObject(n));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return rr(F.parseFormat(e),C.fromObject(n)).map(r=>r.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?tn(this).weekYear:NaN}get weekNumber(){return this.isValid?tn(this).weekNumber:NaN}get weekday(){return this.isValid?tn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?nn(this).weekday:NaN}get localWeekNumber(){return this.isValid?nn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?nn(this).weekYear:NaN}get ordinal(){return this.isValid?zt(this.c).ordinal:NaN}get monthShort(){return this.isValid?mt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?mt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?mt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?mt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,s=ut(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),o=this.zone.offset(s-r*n),a=this.zone.offset(s-i*n);if(o===a)return[this];const c=s-o*n,l=s-a*n,d=gt(c,o),f=gt(l,a);return d.hour===f.hour&&d.minute===f.minute&&d.second===f.second&&d.millisecond===f.millisecond?[he(this,{ts:c}),he(this,{ts:l})]:[this]}get isInLeapYear(){return Ae(this.year)}get daysInMonth(){return lt(this.year,this.month)}get daysInYear(){return this.isValid?we(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ve(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ve(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:s,calendar:r}=F.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(L.instance(e),n)}toLocal(){return this.setZone(v.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(e=ie(e,v.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||s){const i=e.offset(this.ts),o=this.toObject();[r]=wt(o,i,e)}return he(this,{ts:r,zone:e})}else return b.invalid(pt(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:s});return he(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=ht(e,fr),{minDaysInFirstWeek:s,startOfWeek:r}=_s(n,this.loc),i=!S(n.weekYear)||!S(n.weekNumber)||!S(n.weekday),o=!S(n.ordinal),a=!S(n.year),c=!S(n.month)||!S(n.day),l=a||c,d=n.weekYear||n.weekNumber;if((l||o)&&d)throw new pe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new pe("Can't mix ordinal dates with month/day");let f;i?f=Es({...at(this.c,s,r),...n},s,r):S(n.ordinal)?(f={...this.toObject(),...n},S(n.day)&&(f.day=Math.min(lt(f.year,f.month),f.day))):f=Ts({...zt(this.c),...n});const[w,y]=wt(f,this.o,this.zone);return he(this,{ts:w,o:y})}plus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e);return he(this,lr(this,n))}minus(e){if(!this.isValid)return this;const n=_.fromDurationLike(e).negate();return he(this,lr(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},r=_.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:o}=this;o<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?F.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):en}toLocaleString(e=nt,n={}){return this.isValid?F.create(this.loc.clone(n),e).formatDateTime(this):en}toLocaleParts(e={}){return this.isValid?F.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o=e==="extended";let a=sn(this,o);return a+="T",a+=ur(this,o,n,s,r,i),a}toISODate({format:e="extended"}={}){return this.isValid?sn(this,e==="extended"):null}toISOWeekDate(){return St(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended"}={}){return this.isValid?(r?"T":"")+ur(this,o==="extended",n,e,s,i):null}toRFC2822(){return St(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return St(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sn(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(n||e)&&(s&&(r+=" "),n?r+="z":e&&(r+="ZZ")),St(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():en}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",s={}){if(!this.isValid||!e.isValid)return _.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Bo(n).map(_.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,c=o?e:this,l=Pa(a,c,i,r);return o?l.negate():l}diffNow(e="milliseconds",n={}){return this.diff(b.now(),e,n)}until(e){return this.isValid?D.fromDateTimes(this,e):this}hasSame(e,n,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,s)<=r&&r<=i.endOf(n,s)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||b.fromObject({},{zone:this.zone}),s=e.padding?this<n?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),yr(n,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?yr(e.base||b.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(b.isDateTime))throw new W("min requires all arguments be DateTimes");return Ds(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(b.isDateTime))throw new W("max requires all arguments be DateTimes");return Ds(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,s={}){const{locale:r=null,numberingSystem:i=null}=s,o=C.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return ir(o,e,n)}static fromStringExplain(e,n,s={}){return b.fromFormatExplain(e,n,s)}static get DATE_SHORT(){return nt}static get DATE_MED(){return Pn}static get DATE_MED_WITH_WEEKDAY(){return mo}static get DATE_FULL(){return zn}static get DATE_HUGE(){return Zn}static get TIME_SIMPLE(){return qn}static get TIME_WITH_SECONDS(){return jn}static get TIME_WITH_SHORT_OFFSET(){return Gn}static get TIME_WITH_LONG_OFFSET(){return Yn}static get TIME_24_SIMPLE(){return Jn}static get TIME_24_WITH_SECONDS(){return Kn}static get TIME_24_WITH_SHORT_OFFSET(){return Qn}static get TIME_24_WITH_LONG_OFFSET(){return Xn}static get DATETIME_SHORT(){return es}static get DATETIME_SHORT_WITH_SECONDS(){return ts}static get DATETIME_MED(){return ns}static get DATETIME_MED_WITH_SECONDS(){return ss}static get DATETIME_MED_WITH_WEEKDAY(){return yo}static get DATETIME_FULL(){return rs}static get DATETIME_FULL_WITH_SECONDS(){return is}static get DATETIME_HUGE(){return os}static get DATETIME_HUGE_WITH_SECONDS(){return as}}function Be(t){if(b.isDateTime(t))return t;if(t&&t.valueOf&&le(t.valueOf()))return b.fromJSDate(t);if(t&&typeof t=="object")return b.fromObject(t);throw new W(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const lc={},uc={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},dc=[u.createElementVNode("path",{fill:"rgb(248 113 113)",d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"},null,-1)];function hc(t,e){return u.openBlock(),u.createElementBlock("svg",uc,dc)}const fc=ne(lc,[["render",hc]]),mc={class:"messages-container-list"},yc={class:"message-container"},pc={key:0,class:"btn-container"},gc=["onClick"],wc={class:"chat-message"},Sc={class:"message-text"},bc={class:"detail-message flex justify-content-between"},kc={key:0,class:"mr-5"},Ec={key:1,class:"mr-5"},Tc=u.defineComponent({__name:"MessageList",props:{messages:{type:Array,default:()=>[]},canLoadMoreMessages:{type:Boolean,default:!1}},emits:["loadMore","retry"],setup(t,{emit:e}){const n=t,s=u.ref(),{pause:r,resume:i}=lo(s,([{isIntersecting:o}])=>{o&&e("loadMore")});return u.onBeforeMount(()=>{n.canLoadMoreMessages||r()}),u.watch(()=>n.canLoadMoreMessages,o=>{if(o){i();return}r()}),(o,a)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",{ref_key:"target",ref:s,class:"target"},null,512),u.createElementVNode("div",mc,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.messages,c=>{var l,d;return u.openBlock(),u.createElementBlock("div",{key:c.id,class:u.normalizeClass(["message",c.esCliente?"message-left":"message-right"])},[u.createElementVNode("div",yc,[c.error&&c.esCliente?(u.openBlock(),u.createElementBlock("div",pc,[u.createElementVNode("button",{text:"",rounded:"",class:"btn-danger",icon:"fa-solid fa-circle-exclamation","aria-label":"Cancel",onClick:f=>e("retry",c)},[u.createVNode(fc)],8,gc)])):u.createCommentVNode("",!0),u.createElementVNode("div",wc,[u.createElementVNode("div",{class:u.normalizeClass(["bubble",c.esCliente?"left":"right"])},[u.createElementVNode("div",{class:u.normalizeClass(c.esCliente?"content-left":"content-right")},[u.createElementVNode("div",Sc,u.toDisplayString(c.message),1),u.createElementVNode("div",bc,[(l=c.sender)!=null&&l.nombreCompleto?(u.openBlock(),u.createElementBlock("span",kc,u.toDisplayString((d=c.sender)==null?void 0:d.nombreCompleto),1)):(u.openBlock(),u.createElementBlock("span",Ec)),u.createElementVNode("span",null,u.toDisplayString(u.unref(b).fromISO(c.createdAt).toFormat("dd-MM-yyyy HH:mm")),1)])],2)],2)])])],2)}),128))])],64))}}),cl="",_c=ne(Tc,[["__scopeId","data-v-3e307a49"]]),ll="",Oc={},gr=t=>(u.pushScopeId("data-v-d9a6b2b7"),t=t(),u.popScopeId(),t),Cc={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{width:"28px",height:"28px"}},Nc=[gr(()=>u.createElementVNode("path",{d:"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",opacity:".25"},null,-1)),gr(()=>u.createElementVNode("path",{d:"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",class:"spinner_ajPY"},null,-1))];function Ic(t,e){return u.openBlock(),u.createElementBlock("svg",Cc,Nc)}const Dc=ne(Oc,[["render",Ic],["__scopeId","data-v-d9a6b2b7"]]);function vc(t,e,n){for(let s=t.length-1;s>=0;s--)if(t[s][e]===n)return s;return-1}const xc={class:"widget"},Mc={class:"header-widget"},Ac={class:"title-chat"},Vc={key:0,class:"loader"},Fc={class:"w-full"},Rc=["onSubmit"],Lc={class:"form-message"},Wc={class:"jl-inputgroup-chat"},Bc={type:"submit",class:"pointer btn-primary"},Uc=u.defineComponent({__name:"Chat",props:{titlePrincipal:{type:String,default:"Comunicación en linea para consultas"},toggleChat:{type:Function,required:!0},tokenAuth:{type:String,required:!0},user:{type:Object,required:!0},visible:{type:Boolean,required:!0}},emits:["show-toast","show-confirm","new-message","clear-new-messages"],setup(t,{emit:e}){const n=t,s=u.ref(null),r=u.ref(""),i=u.ref({data:[],canLoadMoreMessages:!1}),o=u.ref({virtualhost:""}),a=u.ref(""),c=u.ref(!1),l=u.ref(null);u.watch(()=>n.visible,async k=>{if(k){if(e("clear-new-messages"),!o.value||!a.value){const I=(await Un(n.tokenAuth)).response.data;o.value=I.virtualHost,a.value=I.appChat.id,m()}i.value.data.length===0&&w()}}),u.onMounted(async()=>{if(!o.value||!a.value){const E=(await Un(n.tokenAuth)).response.data;o.value=E.virtualHost,a.value=E.appChat.id,m()}});const d=async k=>{var x;if(k.preventDefault(),((x=r.value)==null?void 0:x.length)>300){e("show-toast",{severity:"warn",summary:"Error",detail:"El mensaje no puede superar los 300 caracteres",life:5e3});return}if(!r.value.trim()){e("show-toast",{severity:"warn",summary:"Error",detail:"Por favor ingrese un mensaje",life:5e3});return}const E={id:kr(),message:r.value,visto:!0,multimedia:!1,esCliente:!0,appChatId:a.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),sender:{nombreCompleto:n.user.nombreCompleto,ci:n.user.ci,msPersonaId:n.user.msPersonaId}},I=i.value.data.push(E)-1;try{const fe=await f(r.value,a.value);i.value.data[I]=fe.response.data}catch{i.value.data[I].error={error:!0,id:E.id},e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3})}finally{r.value="",g()}},f=async(k,E)=>no({esCliente:!0,message:k,appChatId:E},n.tokenAuth),w=async()=>{var k,E,I;try{c.value=!0;const x=(k=i.value.data[0])==null?void 0:k.id,fe={limit:10,lastMessagesId:x,appChatId:a.value},Ue=await to({body:fe,token:n.tokenAuth});i.value.data.unshift(...Ue.data.sort((rn,on)=>-on.createdAt.localeCompare(rn.createdAt))),i.value.canLoadMoreMessages=Ue.pagination.total>Ue.pagination.limit,x&&((E=l.value)!=null&&E.scrollHeight)&&N((I=l.value)==null?void 0:I.scrollHeight),x||g()}catch(x){throw c.value=!1,x}finally{c.value=!1}},y=async k=>{e("show-confirm",async()=>{var E;try{if(!((E=k.error)!=null&&E.id))return;const I=await f(k.message,a.value),x=vc(i.value.data,"id",k.error.id);i.value.data[x]={...I.response.data,error:void 0}}catch{e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3})}finally{g()}})},m=(k="webchat")=>{const{virtualhost:E}=o.value;if(!sessionStorage.getItem("tabBrowser")){let x=Date.now();sessionStorage.setItem("tabBrowser",`${x}`)}s.value=new vr(`${E}`,`widget_chat_${sessionStorage.getItem("tabBrowser")}`),s.value.connect(),s.value.subscribe(async x=>{x.event&&x.event===un.NEW_MESSAGE&&!x.message.esCliente&&(i.value.data.push(x.message),n.visible===!1&&e("new-message"))})},g=()=>{u.nextTick(()=>{l.value&&(l.value.scrollTop=l.value.scrollHeight)})},N=k=>{u.nextTick(()=>{const E=l.value;E&&(E.scrollTop=E.scrollHeight-k)})};return(k,E)=>(u.openBlock(),u.createElementBlock("div",xc,[u.createElementVNode("div",Mc,[u.createElementVNode("h4",Ac,u.toDisplayString(t.titlePrincipal),1),u.createElementVNode("button",{onClick:E[0]||(E[0]=()=>t.toggleChat()),class:"btn-close"},[u.createVNode(Fr,{class:"pointer"})])]),u.createElementVNode("div",{class:"messages-container",ref_key:"messageContainerRef",ref:l},[c.value?(u.openBlock(),u.createElementBlock("div",Vc,[u.createVNode(Dc)])):u.createCommentVNode("",!0),u.createVNode(_c,{messages:i.value.data,canLoadMoreMessages:i.value.canLoadMoreMessages,onLoadMore:w,onRetry:y},null,8,["messages","canLoadMoreMessages"])],512),u.createElementVNode("div",Fc,[u.createElementVNode("form",{class:"message-send",onSubmit:u.withModifiers(d,["prevent"])},[u.createElementVNode("div",Lc,[u.createElementVNode("div",Wc,[u.withDirectives(u.createElementVNode("input",{"onUpdate:modelValue":E[1]||(E[1]=I=>r.value=I),class:"jl2-input-chat",required:""},null,512),[[u.vModelText,r.value]]),u.createElementVNode("button",Bc,[u.createVNode(Ur,{style:{width:"20px",height:"20px"}})])])])],40,Rc)])]))}}),hl="",$c=ne(Uc,[["__scopeId","data-v-adddbb91"]]),Hc={},Pc={width:"87",height:"87",viewBox:"0 0 87 87",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zc=[u.createStaticVNode('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="#F28B0C" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="#F28B0C"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="#F28B0C"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="#F28B0C"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="#F28B0C"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>',2)];function Zc(t,e){return u.openBlock(),u.createElementBlock("svg",Pc,zc)}const qc=ne(Hc,[["render",Zc]]),jc={key:0,class:"new-message-badge"},Gc={class:"chat-box"},Yc=u.defineComponent({__name:"Widget",props:{tokenAuth:{type:String,required:!0},titlePrincipal:{type:String},user:{type:Object,required:!0},isDarkMode:{type:Boolean,default:!1}},emits:["show-toast","show-confirm"],setup(t,{emit:e}){const n=u.ref(!1),s=u.ref(0),r=()=>{n.value=!n.value};return(i,o)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["widget-css-reset widget-container",t.isDarkMode?"chat-dark-mode":""])},[u.withDirectives(u.createElementVNode("div",{id:"chat-circle",onClick:r,class:"widget-container"},[s.value?(u.openBlock(),u.createElementBlock("div",jc,u.toDisplayString(s.value>9?"9+":s.value),1)):u.createCommentVNode("",!0),u.createVNode(qc)],512),[[u.vShow,!n.value]]),u.withDirectives(u.createElementVNode("div",Gc,[u.createVNode($c,{visible:n.value,titlePrincipal:t.titlePrincipal,toggleChat:r,tokenAuth:t.tokenAuth,user:t.user,onShowToast:o[0]||(o[0]=a=>e("show-toast",a)),onShowConfirm:o[1]||(o[1]=a=>e("show-confirm",a)),onClearNewMessages:o[2]||(o[2]=a=>s.value=0),onNewMessage:o[3]||(o[3]=()=>s.value++)},null,8,["visible","titlePrincipal","tokenAuth","user"])],512),[[u.vShow,n.value]])],2))}}),ml="",yl="",Jc=ne(Yc,[["__scopeId","data-v-88f4149c"]]),Kc={install(t,e){window.VITE_BACKEND_URL=e.VITE_BACKEND_URL,window.VITE_BROKER_URL=e.VITE_BROKER_URL,window.VITE_USERNAME=e.VITE_USERNAME,window.VITE_PASSWORD=e.VITE_PASSWORD}};ee.Widget=Jc,ee.default=Kc,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});